Skip to content

Commit

Permalink
feat(ZHXT): 定义纵横讯通物流返回数据结构类型
Browse files Browse the repository at this point in the history
  • Loading branch information
wangjue666 committed Jun 3, 2024
1 parent 09497e9 commit 0f68807
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/zhxt/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cn-international-express-sdk/zhxt",
"version": "2.0.1",
"version": "2.0.2",
"types": "./dist/types/index.d.ts",
"main": "./dist/lib/index.js",
"module": "./dist/es/index.js",
Expand Down
7 changes: 2 additions & 5 deletions packages/zhxt/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import { Recordable, postRequest } from '@cn-international-express-sdk/utils';
import { ZhxtConfig } from './state';

export interface ZhxtConfig {
app_key: string;
app_token: string;
base_url?: string;
}
export * from './state';

export class Zhxt {
public config: ZhxtConfig;
Expand Down
65 changes: 65 additions & 0 deletions packages/zhxt/src/state.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/* eslint-disable @typescript-eslint/no-namespace */
export interface ZhxtConfig {
app_key: string;
app_token: string;
base_url?: string;
}

export namespace ZhxtTypes {
export interface GetShipTypesRes {
data: {
cnname: string;
code: string;
}[];
}

export interface PrintOrderNumberRes {
success: number;
data: {
lable_file: string;
}[];
}

export interface GoodDetailItem {
invoice_enname: string;
invoice_cnname: string;
invoice_quantity: number;
invoice_unitcharge: number;
hs_code: string;
sku: string;
}

export interface GetTrackRes {
success: number;
data: {
channel_hawbcode: string;
server_hawbcode: string;
details: {
track_occur_date: string;
}[];
}[];
}

export interface GetBusinessFeeRes {
success: number;
data: {
amount: number;
fee_kind_name: string;
}[];
}

export interface GetBusinessWeightRes {
success: number;
data: {
grossweight: number;
};
}

export interface CreateOrderRes {
success: number;
cnmessage: string;
data: {
shipping_method_no: string;
};
}
}

0 comments on commit 0f68807

Please sign in to comment.