@myparcel-dev/pdk-common 2.1.2 → 2.2.1

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 CHANGED
@@ -2,6 +2,26 @@
2
2
 
3
3
  <!-- MONOWEAVE:BELOW -->
4
4
 
5
+ ## [2.2.1](https://github.com/myparcelnl/js-pdk/compare/@myparcel-dev/pdk-common@2.2.0...@myparcel-dev/pdk-common@2.2.1) "@myparcel-dev/pdk-common" (2026-09-24)
6
+
7
+
8
+ ### Reverts
9
+
10
+ * build(deps): update vitest to 4 and vite to 8 ([7696c6f](https://github.com/myparcelnl/js-pdk/commit/7696c6f8d344619c2e554f0fae5ed5db2d5c71f8)), closes [#463](https://github.com/myparcelnl/js-pdk/issues/463)
11
+
12
+
13
+
14
+
15
+ ## [2.2.0](https://github.com/myparcelnl/js-pdk/compare/@myparcel-dev/pdk-common@2.1.2...@myparcel-dev/pdk-common@2.2.0) "@myparcel-dev/pdk-common" (2026-09-24)
16
+
17
+
18
+ ### Features
19
+
20
+ * **checkout:** refresh the context when the recipient business flag changes ([#461](https://github.com/myparcelnl/js-pdk/issues/461)) ([0689762](https://github.com/myparcelnl/js-pdk/commit/0689762ae5b14c592e664b286612796aed0c7a9d)), closes [myparcelnl/woocommerce#1848](https://github.com/myparcelnl/woocommerce/issues/1848) [#359](https://github.com/myparcelnl/js-pdk/issues/359)
21
+
22
+
23
+
24
+
5
25
  ## [2.1.2](https://github.com/myparcelnl/js-pdk/compare/@myparcel-dev/pdk-common@2.1.1...@myparcel-dev/pdk-common@2.1.2) "@myparcel-dev/pdk-common" (2026-08-19)
6
26
 
7
27
 
@@ -266,6 +266,8 @@ export declare namespace Plugin {
266
266
  pickupLocationsDefaultView: string;
267
267
  priceStandardDelivery: number;
268
268
  carrierSettings: unknown[];
269
+ /** Whether the context was built for a business recipient. Decides which carriers it holds. */
270
+ isBusiness: boolean;
269
271
  };
270
272
  type ModelContextCheckoutContextSettings = {
271
273
  actions: {
@@ -280,7 +282,7 @@ export declare namespace Plugin {
280
282
  carriersWithTaxFields: CarrierName[];
281
283
  };
282
284
  type ModelContextCheckoutContext = {
283
- config: Shipment.ModelDeliveryOptions;
285
+ config: ModelContextDeliveryOptionsConfig;
284
286
  platformConfig: Record<'carriers', unknown[]>;
285
287
  endpoints: EndpointRequestCollection;
286
288
  settings: ModelContextCheckoutContextSettings;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myparcel-dev/pdk-common",
3
- "version": "2.1.2",
3
+ "version": "2.2.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/myparcelnl/js-pdk.git",
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "devDependencies": {
35
35
  "typescript": "^5.2.2",
36
- "vitest": "^3.2.6"
36
+ "vitest": "^4.1.11"
37
37
  },
38
38
  "engines": {
39
39
  "node": ">=20"
@@ -324,6 +324,8 @@ export namespace Plugin {
324
324
  pickupLocationsDefaultView: string;
325
325
  priceStandardDelivery: number;
326
326
  carrierSettings: unknown[];
327
+ /** Whether the context was built for a business recipient. Decides which carriers it holds. */
328
+ isBusiness: boolean;
327
329
  };
328
330
 
329
331
  export type ModelContextCheckoutContextSettings = {
@@ -348,7 +350,7 @@ export namespace Plugin {
348
350
  };
349
351
 
350
352
  export type ModelContextCheckoutContext = {
351
- config: Shipment.ModelDeliveryOptions;
353
+ config: ModelContextDeliveryOptionsConfig;
352
354
  platformConfig: Record<'carriers', unknown[]>; // @todo this is a temporary generic type, until capabilities is implemented in the deliveryOptions
353
355
  endpoints: EndpointRequestCollection;
354
356
  settings: ModelContextCheckoutContextSettings;