@myparcel-dev/pdk-common 1.11.0
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.
- package/CHANGELOG.md +426 -0
- package/dist/data/common.d.ts +21 -0
- package/dist/data/constants.d.ts +18 -0
- package/dist/data/endpoints.d.ts +97 -0
- package/dist/data/index.d.ts +3 -0
- package/dist/index.d.ts +2 -0
- package/dist/types/endpoints.types.d.ts +13 -0
- package/dist/types/generic.types.d.ts +7 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/php-pdk.types.d.ts +750 -0
- package/dist/types/pluginSettings.types.d.ts +29 -0
- package/package.json +48 -0
- package/src/__tests__/__snapshots__/exports.spec.ts.snap +14 -0
- package/src/__tests__/exports.spec.ts +8 -0
- package/src/data/common.ts +23 -0
- package/src/data/constants.ts +21 -0
- package/src/data/endpoints.ts +114 -0
- package/src/data/index.ts +3 -0
- package/src/index.ts +2 -0
- package/src/types/endpoints.types.ts +29 -0
- package/src/types/generic.types.ts +10 -0
- package/src/types/index.ts +4 -0
- package/src/types/php-pdk.types.ts +880 -0
- package/src/types/pluginSettings.types.ts +42 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import {type PackageTypeName} from '@myparcel-dev/constants';
|
|
2
|
+
import {type TriState} from '../data';
|
|
3
|
+
|
|
4
|
+
export type LabelFormat = 'a4' | 'a6';
|
|
5
|
+
|
|
6
|
+
export type LabelOutput = 'open' | 'download';
|
|
7
|
+
|
|
8
|
+
type LabelPositionNumber = 1 | 2 | 3 | 4;
|
|
9
|
+
|
|
10
|
+
export type LabelPosition = LabelPositionNumber | `${LabelPositionNumber}`;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @see 'allowedShippingMethodsKeys' in pdk config
|
|
14
|
+
*/
|
|
15
|
+
export type ShippingMethodType =
|
|
16
|
+
| TriState.Off
|
|
17
|
+
| TriState.Inherit
|
|
18
|
+
| PackageTypeName.Package
|
|
19
|
+
| PackageTypeName.PackageSmall
|
|
20
|
+
| PackageTypeName.Mailbox
|
|
21
|
+
| PackageTypeName.DigitalStamp
|
|
22
|
+
| PackageTypeName.Letter;
|
|
23
|
+
|
|
24
|
+
export type ShippingMethodId = string;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Shipping method types as keys and an array of shipping method IDs as values. Each shipping method ID can only be in one array.
|
|
28
|
+
*
|
|
29
|
+
* Example:
|
|
30
|
+
* ```json
|
|
31
|
+
* {
|
|
32
|
+
* "off": [ "method_5" ],
|
|
33
|
+
* "inherit": [ "method_1", "method_2" ],
|
|
34
|
+
* "package": [ "method_3" ],
|
|
35
|
+
* "package_small": [],
|
|
36
|
+
* "mailbox": [ "method_4" ],
|
|
37
|
+
* "digital_stamp": [],
|
|
38
|
+
* "letter": []
|
|
39
|
+
* }
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export type ShippingMethodTypeMap = Record<ShippingMethodType, ShippingMethodId[]>;
|