Skip to content

Commit

Permalink
fix!: rename small_parcel to package_small (#112)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: rename small_parcel to package_small
  • Loading branch information
Mark-Ernst authored and EdieLemoine committed Feb 14, 2024
1 parent 0d3a887 commit 6998a21
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions src/__snapshots__/exports.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -687,15 +687,15 @@ exports[`module exports > exposes the correct data from index 1`] = `
"3": "letter",
"4": "digital_stamp",
"5": "pallet",
"6": "small_parcel",
"6": "package_small",
},
"PACKAGE_TYPE_NAMES_TO_IDS": {
"digital_stamp": 4,
"letter": 3,
"mailbox": 2,
"package": 1,
"package_small": 6,
"pallet": 5,
"small_parcel": 6,
},
"PLATFORM_IDS_TO_DOMAINS": {
"1": "myparcel.nl",
Expand Down Expand Up @@ -723,21 +723,21 @@ exports[`module exports > exposes the correct data from index 1`] = `
"3": "Letter",
"4": "DigitalStamp",
"5": "Pallet",
"6": "SmallParcel",
"6": "PackageSmall",
"DigitalStamp": 4,
"Letter": 3,
"Mailbox": 2,
"Package": 1,
"PackageSmall": 6,
"Pallet": 5,
"SmallParcel": 6,
},
"PackageTypeName": {
"DigitalStamp": "digital_stamp",
"Letter": "letter",
"Mailbox": "mailbox",
"Package": "package",
"PackageSmall": "package_small",
"Pallet": "pallet",
"SmallParcel": "small_parcel",
},
"PlatformDomain": {
"Flespakket": "flespakket.nl",
Expand Down
8 changes: 4 additions & 4 deletions src/types/packageType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export enum PackageTypeId {
Letter = 3,
DigitalStamp = 4,
Pallet = 5,
SmallParcel = 6,
PackageSmall = 6,
}

/** @see https://myparcelnl.github.io/api/#6_A_1 */
Expand All @@ -17,7 +17,7 @@ export enum PackageTypeName {
Letter = 'letter',
DigitalStamp = 'digital_stamp',
Pallet = 'pallet',
SmallParcel = 'small_parcel',
PackageSmall = 'package_small',
}

export type PackageTypeNameOrId = PackageTypeName | PackageTypeId;
Expand All @@ -32,7 +32,7 @@ export const PACKAGE_TYPE_NAMES_TO_IDS = {
[PackageTypeName.Letter]: PackageTypeId.Letter,
[PackageTypeName.DigitalStamp]: PackageTypeId.DigitalStamp,
[PackageTypeName.Pallet]: PackageTypeId.Pallet,
[PackageTypeName.SmallParcel]: PackageTypeId.SmallParcel,
[PackageTypeName.PackageSmall]: PackageTypeId.PackageSmall,
} as const;

export const PACKAGE_TYPE_IDS_TO_NAMES = {
Expand All @@ -41,5 +41,5 @@ export const PACKAGE_TYPE_IDS_TO_NAMES = {
[PackageTypeId.Letter]: PackageTypeName.Letter,
[PackageTypeId.DigitalStamp]: PackageTypeName.DigitalStamp,
[PackageTypeId.Pallet]: PackageTypeName.Pallet,
[PackageTypeId.SmallParcel]: PackageTypeName.SmallParcel,
[PackageTypeId.PackageSmall]: PackageTypeName.PackageSmall,
} as const;

0 comments on commit 6998a21

Please sign in to comment.