cbs-4px-merchant-cli 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/README.4px.md +38 -5
  2. package/README.cainiao.md +38 -5
  3. package/README.md +38 -5
  4. package/dist/cli.js +242 -1
  5. package/dist/cli.js.map +1 -1
  6. package/dist/commands/address.js +6 -26
  7. package/dist/commands/address.js.map +1 -1
  8. package/dist/commands/claim.js +14 -34
  9. package/dist/commands/claim.js.map +1 -1
  10. package/dist/commands/config.js +222 -0
  11. package/dist/commands/config.js.map +1 -1
  12. package/dist/commands/country.js +6 -26
  13. package/dist/commands/country.js.map +1 -1
  14. package/dist/commands/customs.js +17 -65
  15. package/dist/commands/customs.js.map +1 -1
  16. package/dist/commands/finance.js +56 -204
  17. package/dist/commands/finance.js.map +1 -1
  18. package/dist/commands/label.js +6 -26
  19. package/dist/commands/label.js.map +1 -1
  20. package/dist/commands/notice.js +22 -86
  21. package/dist/commands/notice.js.map +1 -1
  22. package/dist/commands/onboarding.d.ts +79 -0
  23. package/dist/commands/onboarding.js +384 -0
  24. package/dist/commands/onboarding.js.map +1 -0
  25. package/dist/commands/order.d.ts +26 -0
  26. package/dist/commands/order.js +254 -58
  27. package/dist/commands/order.js.map +1 -1
  28. package/dist/commands/pickup.js +29 -97
  29. package/dist/commands/pickup.js.map +1 -1
  30. package/dist/commands/platform.d.ts +26 -0
  31. package/dist/commands/platform.js +254 -0
  32. package/dist/commands/platform.js.map +1 -0
  33. package/dist/commands/problem.js +56 -170
  34. package/dist/commands/problem.js.map +1 -1
  35. package/dist/commands/product.js +52 -155
  36. package/dist/commands/product.js.map +1 -1
  37. package/dist/commands/service.js +64 -186
  38. package/dist/commands/service.js.map +1 -1
  39. package/dist/commands/skill.d.ts +1 -1
  40. package/dist/commands/skill.js +1 -1
  41. package/dist/commands/track.js +20 -74
  42. package/dist/commands/track.js.map +1 -1
  43. package/dist/commands/update.js +1 -1
  44. package/dist/digital-employee-skills/cbs-4px-merchant-cli-order-fulfillment.zip +0 -0
  45. package/dist/digital-employee-skills/cbs-cainiao-merchant-cli-order-fulfillment.zip +0 -0
  46. package/dist/index.js +0 -0
  47. package/dist/services/api-client.d.ts +38 -1
  48. package/dist/services/api-client.js +275 -9
  49. package/dist/services/api-client.js.map +1 -1
  50. package/dist/types/index.d.ts +294 -0
  51. package/dist/utils/confirm.d.ts +18 -0
  52. package/dist/utils/confirm.js +50 -0
  53. package/dist/utils/confirm.js.map +1 -0
  54. package/dist/utils/run-command.d.ts +24 -0
  55. package/dist/utils/run-command.js +58 -0
  56. package/dist/utils/run-command.js.map +1 -0
  57. package/package.json +2 -1
  58. package/scripts/postinstall.js +1 -1
  59. package/skill/SKILL.md +112 -4
  60. package/skill/package.json +3 -1
  61. package/skill/reference/index.md +30 -3
  62. package/skill/reference/onboarding.md +573 -0
  63. package/skill/reference/order.md +194 -0
  64. package/skill/reference/platform.md +317 -0
  65. package/skill/reference/update.md +1 -1
@@ -760,3 +760,297 @@ export interface NotifyTypeItem {
760
760
  export interface NotifyTypeListResp {
761
761
  list: NotifyTypeItem[];
762
762
  }
763
+ export interface SellerAccountItem {
764
+ id: string | null;
765
+ accountType: string | null;
766
+ accountName: string | null;
767
+ merchantId: string | null;
768
+ amazonMarketplaceId: string | null;
769
+ site: string | null;
770
+ status: string | null;
771
+ }
772
+ export interface SellerAccountListResp {
773
+ pageNum: number;
774
+ pageSize: number;
775
+ total: number;
776
+ list: SellerAccountItem[];
777
+ }
778
+ export interface PlatformOrderSyncResp {
779
+ success: boolean | null;
780
+ message: string | null;
781
+ }
782
+ export interface SyncOrderRecordItem {
783
+ id: string | null;
784
+ sellerAccount: string | null;
785
+ syncStartTime: string | null;
786
+ syncEndTime: string | null;
787
+ status: string | null;
788
+ totalQuantity: number | null;
789
+ actualSaveQuantity: number | null;
790
+ message: string | null;
791
+ }
792
+ export interface SyncOrderRecordListResp {
793
+ pageNum: number;
794
+ pageSize: number;
795
+ total: number;
796
+ list: SyncOrderRecordItem[];
797
+ }
798
+ export interface PlatformOrderItem {
799
+ id: string | null;
800
+ platformOrderNo: string | null;
801
+ customerOrderNo: string | null;
802
+ sellerAccount: string | null;
803
+ receiverName: string | null;
804
+ receiverCountryName: string | null;
805
+ productName: string | null;
806
+ totalPrice: string | null;
807
+ currency: string | null;
808
+ createdTime: string | null;
809
+ pushTime: string | null;
810
+ }
811
+ export interface PlatformOrderListResp {
812
+ pageNum: number;
813
+ pageSize: number;
814
+ total: number;
815
+ list: PlatformOrderItem[];
816
+ }
817
+ export interface PlatformOrderItemDetail {
818
+ itemTitle: string | null;
819
+ sku: string | null;
820
+ quantity: number | null;
821
+ price: string | null;
822
+ weight: string | null;
823
+ currency: string | null;
824
+ hsCode: string | null;
825
+ }
826
+ export interface PlatformOrderDetailResp {
827
+ id: string | null;
828
+ platformOrderNo: string | null;
829
+ customerOrderNo: string | null;
830
+ platform: string | null;
831
+ sellerAccountName: string | null;
832
+ exportStatus: string | null;
833
+ receiverName: string | null;
834
+ receiverCountryName: string | null;
835
+ city: string | null;
836
+ stateOrProvince: string | null;
837
+ postalCode: string | null;
838
+ phoneNumber: string | null;
839
+ productName: string | null;
840
+ productCode: string | null;
841
+ totalPrice: string | null;
842
+ currency: string | null;
843
+ weight: string | null;
844
+ trackingNo: string | null;
845
+ buyerId: string | null;
846
+ buyerNote: string | null;
847
+ createdTime: string | null;
848
+ items: PlatformOrderItemDetail[] | null;
849
+ }
850
+ export interface IndivAuthRequest {
851
+ name: string;
852
+ certNumber: string;
853
+ mobile: string;
854
+ /** 0=手机号验证,1=银行卡验证 */
855
+ authType: string;
856
+ /** authType=1 时必填 */
857
+ bankCard?: string;
858
+ /** 企业认证中的经办人实名认证传 true */
859
+ isAgent?: boolean;
860
+ }
861
+ export interface CheckAuthCodeRequest {
862
+ authCode: string;
863
+ authType?: string;
864
+ /** start_indiv_real_name_auth 返回的流程 ID */
865
+ flowId: string;
866
+ isAgent?: boolean;
867
+ }
868
+ export interface OrganAuthRequest {
869
+ name: string;
870
+ certNumber: string;
871
+ certType?: number;
872
+ agentAccountId?: string;
873
+ }
874
+ export interface OpenBrandRequest {
875
+ serviceCode: string;
876
+ customerType?: number;
877
+ country: string;
878
+ address: string;
879
+ state?: string;
880
+ city?: string;
881
+ county?: string;
882
+ customerName: string;
883
+ contactName: string;
884
+ mobile: string;
885
+ email: string;
886
+ /** 企业客户必填 */
887
+ cLegalName?: string;
888
+ }
889
+ export interface GATAuthRequest {
890
+ /** 1=港澳台,2=海外 */
891
+ customerProfile: string;
892
+ /** 1=个人,2=企业。字段名沿用后端拼写(enitity),不要改成 entity */
893
+ enitity: string;
894
+ name: string;
895
+ mobile: string;
896
+ email: string;
897
+ contactName?: string;
898
+ legalPerson?: string;
899
+ certNumber?: string;
900
+ country?: string;
901
+ countryCode?: string;
902
+ alpha2Code?: string;
903
+ state?: string;
904
+ stateCode?: string;
905
+ city?: string;
906
+ cityCode?: string;
907
+ county?: string;
908
+ countyCode?: string;
909
+ address?: string;
910
+ }
911
+ export interface OnboardingProgressResp {
912
+ certification: boolean | null;
913
+ contractApply: boolean | null;
914
+ contractSign: boolean | null;
915
+ /** 当前所处节点:certification | contractApply | contractSign | brandSuccess */
916
+ currentNode: string | null;
917
+ /** 0=中国大陆、1=港澳台、2=海外 */
918
+ customerProfile: string | null;
919
+ /** 经济主体:1=个人、2=企业 */
920
+ entity: string | null;
921
+ }
922
+ export interface AuthScheduleResp {
923
+ /** 0=未开始、1=进行中、2=已完成、3=认证失败、4=待对公打款验证 */
924
+ authStatus: number | null;
925
+ /** 0=大陆、1=港澳台、2=海外 */
926
+ customerType: string | null;
927
+ /** 0=个人认证、1=企业认证 */
928
+ authType: number | null;
929
+ }
930
+ export interface CustomerTypeItem {
931
+ customerName: string | null;
932
+ customerCode: string | null;
933
+ /** 1 表示当前客户所属类型 */
934
+ isValid: string | null;
935
+ }
936
+ export interface BrandAuthOption {
937
+ authName: string | null;
938
+ authCode: string | null;
939
+ disable: boolean | null;
940
+ }
941
+ export interface BrandAndAuthItem {
942
+ brandName: string | null;
943
+ brandCode: string | null;
944
+ disable: boolean | null;
945
+ info: string | null;
946
+ authList: BrandAuthOption[] | null;
947
+ }
948
+ /** ContractDTO 字段极多,这里只声明 CLI 会渲染的部分。 */
949
+ export interface ContractItem {
950
+ code: string | null;
951
+ name: string | null;
952
+ type: number | null;
953
+ status: number | null;
954
+ serviceName: string | null;
955
+ customerName: string | null;
956
+ effectiveStartTime: string | null;
957
+ effectiveEndTime: string | null;
958
+ applyTime: string | null;
959
+ signFinishTime: string | null;
960
+ }
961
+ export interface ContractListResp {
962
+ pageNum: number;
963
+ pageSize: number;
964
+ pages: number;
965
+ total: number;
966
+ data: ContractItem[];
967
+ }
968
+ /**
969
+ * `order create` / `order edit` 是唯二使用 JSON body 的接口(后端以
970
+ * `@Body` 绑定);客户端其他 POST 均为 form-urlencoded。以下类型逐字段
971
+ * 对齐后端 DTO,避免未知字段在后端被静默丢弃后造成难以发现的错误。
972
+ */
973
+ export interface OrderSenderInfo {
974
+ name?: string;
975
+ company?: string;
976
+ phone?: string;
977
+ address?: string;
978
+ country?: string;
979
+ postcode?: string;
980
+ city?: string;
981
+ province?: string;
982
+ }
983
+ export interface OrderReceiverInfo {
984
+ name?: string;
985
+ company?: string;
986
+ phone?: string;
987
+ mobile?: string;
988
+ address?: string;
989
+ city?: string;
990
+ province?: string;
991
+ postcode?: string;
992
+ country?: string;
993
+ email?: string;
994
+ }
995
+ export interface OrderParcelInfo {
996
+ weight?: number;
997
+ length?: number;
998
+ width?: number;
999
+ height?: number;
1000
+ dutyPayMode?: string;
1001
+ }
1002
+ export interface OrderDeclareItemInfo {
1003
+ ename?: string;
1004
+ cname?: string;
1005
+ qty?: number;
1006
+ unitPrice?: number;
1007
+ currency?: string;
1008
+ weight?: number;
1009
+ hsCode?: string;
1010
+ }
1011
+ /** `P` = 预报(直接提交),`D` = 草稿(保存不提交)。后端默认 `P`。 */
1012
+ export type OrderWriteStatus = 'P' | 'D';
1013
+ export interface CreateOrderRequest {
1014
+ productCode: string;
1015
+ destinationCountry: string;
1016
+ originCountry?: string;
1017
+ status?: OrderWriteStatus;
1018
+ customerOrderNo?: string;
1019
+ sender?: OrderSenderInfo;
1020
+ receiver?: OrderReceiverInfo;
1021
+ parcel?: OrderParcelInfo;
1022
+ declareItems?: OrderDeclareItemInfo[];
1023
+ }
1024
+ export interface CreateOrderResp {
1025
+ orderId: number | null;
1026
+ orderNo: string | null;
1027
+ status: string | null;
1028
+ customerOrderNo: string | null;
1029
+ }
1030
+ export interface EditOrderRequest extends Partial<Omit<CreateOrderRequest, 'status'>> {
1031
+ orderId: number;
1032
+ status?: OrderWriteStatus;
1033
+ }
1034
+ export interface EditOrderResp {
1035
+ orderId: number | null;
1036
+ orderNo: string | null;
1037
+ status: string | null;
1038
+ updateSuccess: boolean | null;
1039
+ }
1040
+ export interface ForecastOrderResp {
1041
+ successCount: number | null;
1042
+ failCount: number | null;
1043
+ failDetails: string | null;
1044
+ }
1045
+ export interface CancelOrderResp {
1046
+ success: boolean | null;
1047
+ message: string | null;
1048
+ }
1049
+ export interface InterceptOrderResult {
1050
+ orderId: string | null;
1051
+ success: boolean | null;
1052
+ failReason: string | null;
1053
+ }
1054
+ export interface InterceptOrderResp {
1055
+ results: InterceptOrderResult[] | null;
1056
+ }
@@ -0,0 +1,18 @@
1
+ import type { GlobalOptions } from '../types/index.js';
2
+ export interface WriteOptions extends GlobalOptions {
3
+ yes?: boolean;
4
+ }
5
+ /**
6
+ * Decide whether a write command may proceed. Returns false when the caller
7
+ * must abort — and has already told the user why.
8
+ *
9
+ * `--dry-run` passes through: ApiClient prints the request and throws
10
+ * DryRunSignal before anything leaves the machine, so there is nothing to
11
+ * confirm.
12
+ *
13
+ * Non-interactive callers (pipes, CI, AI agents) are refused rather than
14
+ * waved through. `update` waves them through, but nothing it does is
15
+ * irreversible; submitting an identity document is, so silence must not read
16
+ * as consent here.
17
+ */
18
+ export declare function confirmWrite(opts: WriteOptions, summary: string): Promise<boolean>;
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Confirmation gate for write operations.
3
+ *
4
+ * Every other command in this CLI is a read: the worst a wrong flag can do is
5
+ * return the wrong rows. The `platform` push/sync and `onboarding` auth/brand
6
+ * commands are not — they submit real-name material, open brands and hand
7
+ * orders to carriers. So they ask first.
8
+ */
9
+ import chalk from 'chalk';
10
+ import { createInterface } from 'node:readline';
11
+ import * as logger from './logger.js';
12
+ /**
13
+ * Decide whether a write command may proceed. Returns false when the caller
14
+ * must abort — and has already told the user why.
15
+ *
16
+ * `--dry-run` passes through: ApiClient prints the request and throws
17
+ * DryRunSignal before anything leaves the machine, so there is nothing to
18
+ * confirm.
19
+ *
20
+ * Non-interactive callers (pipes, CI, AI agents) are refused rather than
21
+ * waved through. `update` waves them through, but nothing it does is
22
+ * irreversible; submitting an identity document is, so silence must not read
23
+ * as consent here.
24
+ */
25
+ export async function confirmWrite(opts, summary) {
26
+ if (opts.dryRun)
27
+ return true;
28
+ if (opts.yes)
29
+ return true;
30
+ if (!process.stdin.isTTY) {
31
+ logger.error('该命令会提交写操作,非交互环境下必须显式加 -y 确认');
32
+ logger.info('或先用 --dry-run 查看将要发送的请求');
33
+ process.exitCode = 1;
34
+ return false;
35
+ }
36
+ const ok = await ask(`${summary} ?`);
37
+ if (!ok)
38
+ logger.warn('已取消');
39
+ return ok;
40
+ }
41
+ function ask(question) {
42
+ return new Promise((resolve) => {
43
+ const rl = createInterface({ input: process.stdin, output: process.stderr });
44
+ rl.question(`${chalk.yellow('?')} ${question} [y/N] `, (answer) => {
45
+ rl.close();
46
+ resolve(/^y(es)?$/i.test(answer.trim()));
47
+ });
48
+ });
49
+ }
50
+ //# sourceMappingURL=confirm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confirm.js","sourceRoot":"","sources":["../../src/utils/confirm.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,MAAM,OAAO,C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@@ -0,0 +1,24 @@
1
+ import { ApiClient } from '../services/api-client.js';
2
+ import type { GlobalOptions } from '../types/index.js';
3
+ export interface RunCommandConfig<TData> {
4
+ /** Spinner text shown during execution */
5
+ spinner: string;
6
+ /** The API call to execute */
7
+ exec: (client: ApiClient) => Promise<TData | null | undefined>;
8
+ /** Render data in human-readable text format (TTY mode) */
9
+ render: (data: TData) => void;
10
+ /** Message shown when API returns null/empty data (default: '暂无数据') */
11
+ emptyMessage?: string;
12
+ }
13
+ /**
14
+ * Low-level shell: manages the spinner lifecycle, builds the ApiClient, and
15
+ * centralizes error handling. The spinner is stopped right after `fetch`
16
+ * resolves and before `consume` runs — matching the hand-written commands,
17
+ * which always stop the spinner before writing output.
18
+ *
19
+ * Use this when a command's output logic does not fit the standard
20
+ * `runCommand` shape (e.g. always-JSON output, custom empty checks, or no
21
+ * empty branch at all): `consume` owns every output decision.
22
+ */
23
+ export declare function withClient<TData>(globalOptions: GlobalOptions, spinnerText: string, fetch: (client: ApiClient) => Promise<TData>, consume: (data: TData) => void): Promise<void>;
24
+ export declare function runCommand<TData>(globalOptions: GlobalOptions, config: RunCommandConfig<TData>): Promise<void>;
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Unified command execution shell.
3
+ *
4
+ * Eliminates the repeated spinner → ApiClient → try/catch → json/text branch
5
+ * pattern found across all command files (~50 occurrences).
6
+ *
7
+ * Usage:
8
+ * await runCommand(opts, {
9
+ * spinner: '正在查询...',
10
+ * exec: (client) => client.getTrackDetail(orderNo),
11
+ * render: printTrackDetail,
12
+ * });
13
+ */
14
+ import chalk from 'chalk';
15
+ import { createSpinner } from './logger.js';
16
+ import { ConfigManager } from '../services/config-manager.js';
17
+ import { ApiClient } from '../services/api-client.js';
18
+ import { handleError } from '../commands/error-handler.js';
19
+ /**
20
+ * Low-level shell: manages the spinner lifecycle, builds the ApiClient, and
21
+ * centralizes error handling. The spinner is stopped right after `fetch`
22
+ * resolves and before `consume` runs — matching the hand-written commands,
23
+ * which always stop the spinner before writing output.
24
+ *
25
+ * Use this when a command's output logic does not fit the standard
26
+ * `runCommand` shape (e.g. always-JSON output, custom empty checks, or no
27
+ * empty branch at all): `consume` owns every output decision.
28
+ */
29
+ export async function withClient(globalOptions, spinnerText, fetch, consume) {
30
+ const spinner = createSpinner(spinnerText);
31
+ try {
32
+ spinner.start();
33
+ const client = new ApiClient(new ConfigManager(), globalOptions);
34
+ const data = await fetch(client);
35
+ spinner.stop();
36
+ consume(data);
37
+ }
38
+ catch (error) {
39
+ spinner.stop();
40
+ handleError(error);
41
+ }
42
+ }
43
+ export async function runCommand(globalOptions, config) {
44
+ await withClient(globalOptions, config.spinner, (client) => config.exec(client), (data) => {
45
+ if (globalOptions.output === 'json') {
46
+ console.log(JSON.stringify(data ?? null, null, 2));
47
+ return;
48
+ }
49
+ if (!data) {
50
+ console.log('');
51
+ console.log(chalk.yellow(` ${config.emptyMessage ?? '暂无数据'}`));
52
+ console.log('');
53
+ return;
54
+ }
55
+ config.render(data);
56
+ });
57
+ }
58
+ //# sourceMappingURL=run-command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-command.js","sourceRoot":"","sources":["../../src/utils/run-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAc3D;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAC9B,aAA4B,EAC5B,WAAmB,EACnB,KAA4C,EAC5C,OAA8B;IAE9B,MAAM,OAAO,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC;IAC3C,IAAI,CAAC;QACH,OAAO,CAAC,KAAK,EAAE,CAA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s merchant CLI tool",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -25,6 +25,7 @@
25
25
  "build:4px:pre": "SITE=4px ENV=pre npm run build",
26
26
  "build:cainiao:test": "SITE=cainiao ENV=test npm run build",
27
27
  "build:cainiao:pre": "SITE=cainiao ENV=pre npm run build",
28
+ "package:role-skills": "bash scripts/package-role-skills.sh",
28
29
  "dev:4px:test": "SITE=4px ENV=test npm run build && node dist/index.js skill install",
29
30
  "dev:4px:pre": "SITE=4px ENV=pre npm run build && node dist/index.js skill install",
30
31
  "dev:cainiao:test": "SITE=cainiao ENV=test npm run build && node dist/index.js skill install",
@@ -8,7 +8,7 @@
8
8
  * versions that still run install scripts get the skill without a second step.
9
9
  *
10
10
  * It deliberately owns no logic of its own, because it cannot be relied upon:
11
- * npm 11 blocks dependency install scripts by default and *still exits 0*, so
11
+ * npm 12 blocks dependency install scripts by default and *still exits 0*, so
12
12
  * anything that must happen cannot live here. When the hook is skipped, the
13
13
  * install docs' second step (`<bin> skill install`) covers it.
14
14
  *