-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3813cfb
commit 01f60eb
Showing
3 changed files
with
40 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@cn-international-express-sdk/wanb': major | ||
--- | ||
|
||
chore: 类型调整到 namespace 里头 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,42 @@ | ||
/* eslint-disable @typescript-eslint/no-namespace */ | ||
export interface WanbConfig { | ||
app_token: string; | ||
user_id: string; | ||
base_url?: string; | ||
} | ||
|
||
export interface WanbGetShippingMethodsRes { | ||
Data: { | ||
ShippingMethods: { | ||
Code: string; | ||
Name: string; | ||
IsTracking: boolean; | ||
IsVolumeWeight: boolean; | ||
MaxVolumeWeightInCm: number; | ||
Region: string; | ||
}[]; | ||
}; | ||
} | ||
export namespace WanbTypes { | ||
export interface GetShippingMethodsRes { | ||
Data: { | ||
ShippingMethods: { | ||
Code: string; | ||
Name: string; | ||
IsTracking: boolean; | ||
IsVolumeWeight: boolean; | ||
MaxVolumeWeightInCm: number; | ||
Region: string; | ||
}[]; | ||
}; | ||
} | ||
|
||
export type WanbAddOrderRes = | ||
| { | ||
Succeeded: false; | ||
Error: { | ||
Message: string; | ||
}; | ||
} | ||
| { | ||
Succeeded: true; | ||
Data: { | ||
ProcessCode: string; | ||
IndexNumber: string; | ||
ReferenceId: string; | ||
TrackingNumber: string; | ||
IsVirtualTrackingNumber: boolean; | ||
SortCode: string; | ||
IsRemoteArea: boolean; | ||
Status: string; | ||
export type AddOrderRes = | ||
| { | ||
Succeeded: false; | ||
Error: { | ||
Message: string; | ||
}; | ||
} | ||
| { | ||
Succeeded: true; | ||
Data: { | ||
ProcessCode: string; | ||
IndexNumber: string; | ||
ReferenceId: string; | ||
TrackingNumber: string; | ||
IsVirtualTrackingNumber: boolean; | ||
SortCode: string; | ||
IsRemoteArea: boolean; | ||
Status: string; | ||
}; | ||
}; | ||
}; | ||
} |