Skip to content

Commit 54367bd

Browse files
committed
feat: add filters for system country codes
1 parent ef523bb commit 54367bd

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

src/endpoints/private/system-country-codes/GetSystemCountryCodes.ts

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1+
import {type SystemCountryCodesPerCountry, type GetSystemCountryCodesParams} from './SystemCountryCodes.types';
12
import {AbstractPrivateEndpoint} from '@/model/endpoint/AbstractPrivateEndpoint';
2-
import {type CarrierId} from '@myparcel/constants';
33
import {type CreateDefinition} from '@/model/endpoint/AbstractEndpoint.types';
4-
import {type SystemCountryCodesPerCountry} from './SystemCountryCodes.types';
54

65
type GetSystemCountryCodesDefinition = CreateDefinition<{
76
name: typeof GetSystemCountryCodes.name;
8-
parameters: {
9-
carrier_id?: CarrierId;
10-
};
7+
parameters: GetSystemCountryCodesParams;
118
response: SystemCountryCodesPerCountry;
129
}>;
1310

Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1+
import {type CarrierId} from '@myparcel/constants';
2+
13
export interface SystemCountryCode {
24
label: string;
35
region: string;
46
}
57

68
export type SystemCountryCodesPerCountry = Record<string, SystemCountryCode>[];
9+
10+
export type GetSystemCountryCodesParams = {
11+
carrier_id?: CarrierId;
12+
unfiltered?: boolean;
13+
};

0 commit comments

Comments
 (0)