@ingridab/sdk 0.2.0 → 0.4.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/dist/index.d.ts CHANGED
@@ -1,22 +1,82 @@
1
1
  import { z } from 'zod';
2
2
 
3
3
  /**
4
- * @description AddonType defines the specific type of addon offered.\n\n - ADDON_TYPE_UNSPECIFIED: Addon type is unspecified or unknown.\n - CUSTOM: A custom addon specified by the carrier or merchant.\n - CARRY_IN: An addon for carrying the delivery item into the recipient\'s premises.\n - LEAVE_AT_DOOR: An addon for leaving the item at the door without requiring a signature.\n - UNWRAPPING: An addon for unwrapping the delivered item.
5
- * @default ADDON_TYPE_UNSPECIFIED
4
+ * @description ABTest is the A/B test assignment associated with this request.\nNot supported yet.
6
5
  */
7
- declare type AddonAddonType = AddonAddonTypeEnum;
6
+ declare type ABTest = {
7
+ /**
8
+ * @description ExperimentID is the identifier of the experiment.
9
+ * @type string
10
+ */
11
+ experimentId: string;
12
+ /**
13
+ * @description VariantID is the identifier of the variant the user has been assigned to.
14
+ * @type string
15
+ */
16
+ variantId: string;
17
+ };
18
+
19
+ /**
20
+ * @description AddonType classifies an add-on service.
21
+ */
22
+ declare type AddonType = AddonTypeEnum;
8
23
 
9
- declare type AddonAddonTypeEnum =
10
- | 'ADDON_TYPE_UNSPECIFIED'
11
- | 'CUSTOM'
12
- | 'CARRY_IN'
13
- | 'LEAVE_AT_DOOR'
14
- | 'UNWRAPPING';
24
+ declare type AddonTypeEnum =
25
+ | 'insurance'
26
+ | 'signature'
27
+ | 'age_verification'
28
+ | 'id_verification'
29
+ | 'notification'
30
+ | 'other';
15
31
 
16
32
  /**
17
- * @description Common address entity that used almost everywhere in Ingrid\'s API.
33
+ * @description Address is a physical location in a global addressing context.\n\nValidation of postal code, administrative area, and other locality fields\nis conditional on the country code.
18
34
  */
19
35
  declare type Address = {
36
+ /**
37
+ * @description CountryCode is the ISO 3166-1 alpha-2 country code.
38
+ */
39
+ countryCode: CountryCode;
40
+ /**
41
+ * @description PostalCode is the postal code. Formatting and validation rules are\nconditional on the country code.
42
+ * @type string
43
+ */
44
+ postalCode: string;
45
+ /**
46
+ * @description AdministrativeArea is the first-level administrative subdivision\n(state, province, prefecture, etc.) as the ISO 3166-2 subdivision\ncode. Required for some destination countries — e.g. US, CA, MX, BR,\nAR, AU, CN, JP, MY, KR, ID, TH, IT, ES, IE — and ignored elsewhere.\nUse the country reference for specifics.
47
+ * @type string | undefined
48
+ */
49
+ administrativeArea?: string;
50
+ /**
51
+ * @description SubAdministrativeArea is the second-level administrative subdivision\n(county, district, etc.). Typically not required unless the country\nreference says otherwise.
52
+ * @type string | undefined
53
+ */
54
+ subAdministrativeArea?: string;
55
+ /**
56
+ * @description Locality is the primary locality of the address — usually the city,\ntown, village, or municipality.
57
+ * @type string | undefined
58
+ */
59
+ locality?: string;
60
+ /**
61
+ * @description SubLocality is the neighborhood, suburb, or district within the\nlocality. Required by some countries (e.g. JP chome, UK London\ndistricts, Latin-American colonias); see the country reference.
62
+ * @type string | undefined
63
+ */
64
+ subLocality?: string;
65
+ /**
66
+ * @description AddressLines are the ordered street address lines.\nIndex 0 holds primary street info (street name + number, or block\nnumber); subsequent indices hold secondary info (apartment, suite,\nfloor, building name).
67
+ * @type array | undefined
68
+ */
69
+ addressLines?: string[];
70
+ /**
71
+ * @description Type is the kind of address (residential, commercial, etc.).
72
+ */
73
+ type?: AddressType;
74
+ };
75
+
76
+ /**
77
+ * @description Common address entity that used almost everywhere in Ingrid\'s API.
78
+ */
79
+ declare type Address_2 = {
20
80
  /**
21
81
  * @type array | undefined
22
82
  */
@@ -45,7 +105,7 @@ declare type Address = {
45
105
  /**
46
106
  * @type object | undefined
47
107
  */
48
- coordinates?: Coordinates;
108
+ coordinates?: Coordinates_2;
49
109
  /**
50
110
  * @description Country should be specified as two uppercase letters (ISO Alpha-2).\nExample `SE` for Sweden, `ES` for Spain.
51
111
  * @type string | undefined
@@ -94,7 +154,7 @@ declare type Address = {
94
154
  /**
95
155
  * @description Ingrid Address API helps to collect clean addresses.\n\nAll errors follow RFC 7807 Problem Details format.
96
156
  */
97
- declare type Address_2 = {
157
+ declare type Address_3 = {
98
158
  /**
99
159
  * @description ISO 3166-1 alpha-2 country code.
100
160
  * @minLength 2
@@ -135,7 +195,7 @@ declare type Address_2 = {
135
195
  /**
136
196
  * @type string | undefined
137
197
  */
138
- type?: AddressType;
198
+ type?: AddressType_2;
139
199
  };
140
200
 
141
201
  /**
@@ -161,7 +221,7 @@ declare type AddressContactEntry = {
161
221
  companyName?: string;
162
222
 
163
223
  /** The address of the contact. */
164
- address?: Address_2;
224
+ address?: Address_3;
165
225
 
166
226
  /** The email address of the contact. */
167
227
  email?: string;
@@ -194,7 +254,7 @@ declare type AddressDetailsResponse = {
194
254
  /**
195
255
  * @description The full address resolved from the prediction.
196
256
  */
197
- address: Address_2;
257
+ address: Address_3;
198
258
  };
199
259
 
200
260
  /**
@@ -299,10 +359,17 @@ declare type AddressSuggestionsService = {
299
359
  >;
300
360
  };
301
361
 
362
+ /**
363
+ * @description AddressType classifies an address.
364
+ */
302
365
  declare type AddressType = AddressTypeEnum;
303
366
 
367
+ declare type AddressType_2 = AddressTypeEnum_2;
368
+
304
369
  declare type AddressTypeEnum = 'unknown' | 'residential' | 'commercial';
305
370
 
371
+ declare type AddressTypeEnum_2 = 'unknown' | 'residential' | 'commercial';
372
+
306
373
  declare type AddressValidationService = {
307
374
  validateAddress: DataResolver<
308
375
  { payload: ValidateAddressMutation['Request'] } & SDKManagedTokenArg,
@@ -555,7 +622,7 @@ declare type AutocompleteAddressQueryParams = {
555
622
  * @pattern ^[A-Z]{2}$
556
623
  * @type string
557
624
  */
558
- countryCode: CountryCode;
625
+ countryCode: CountryCode_2;
559
626
  /**
560
627
  * @description Site identifier, referring to which site the autocompletion is performed for.
561
628
  * @type string
@@ -602,24 +669,45 @@ declare type BaseMoleculeDef<K extends MoleculeType> = {
602
669
  };
603
670
 
604
671
  /**
605
- * @description A phone number, including region and optional extension.
672
+ * @description Carrier identifies a delivery carrier.
673
+ */
674
+ declare type Carrier = {
675
+ /**
676
+ * @description ID is the unique identifier for the carrier.
677
+ * @type string
678
+ */
679
+ id: string;
680
+ /**
681
+ * @description Name is the display name of the carrier.
682
+ * @type string
683
+ */
684
+ name: string;
685
+ /**
686
+ * @description LogoURL points to the carrier\'s logo image.
687
+ * @type string | undefined
688
+ */
689
+ logoUrl?: string;
690
+ };
691
+
692
+ /**
693
+ * @description CarrierProduct identifies a specific product offered by a carrier.
606
694
  */
607
- declare type ContactPhoneNumber = {
695
+ declare type CarrierProduct = {
608
696
  /**
609
- * @description \nThe country code where the delivery will occur (ISO 3166-1 alpha-2).
697
+ * @description ID is the unique identifier for the product.
610
698
  * @type string
611
699
  */
612
- country_code: string;
700
+ id: string;
613
701
  /**
614
- * @description The main phone number, formatted as per the region\'s conventions.
702
+ * @description Name is the display name of the product.
615
703
  * @type string
616
704
  */
617
- number: string;
705
+ name: string;
618
706
  /**
619
- * @description An optional phone number extension.
707
+ * @description Description is a description of the product.
620
708
  * @type string | undefined
621
709
  */
622
- extension?: string;
710
+ description?: string;
623
711
  };
624
712
 
625
713
  declare type ContactsService = {
@@ -655,7 +743,40 @@ declare type ContactsService = {
655
743
  >;
656
744
  };
657
745
 
746
+ /**
747
+ * @description Context is caller-supplied information used for personalisation and\nanalytics. All fields are optional and are not validated against the\noffer token.
748
+ */
749
+ declare type Context = {
750
+ /**
751
+ * @description User describes the end user the request is being made on behalf of.
752
+ */
753
+ user?: User;
754
+ /**
755
+ * @description ABTest carries the A/B test assignment for this request. Not supported yet.
756
+ */
757
+ abTest?: ABTest;
758
+ /**
759
+ * @description Fingerprint is an opaque, caller-generated fingerprint of the end user (e.g. for fraud or analytics).
760
+ * @type string | undefined
761
+ */
762
+ fingerprint?: string;
763
+ };
764
+
765
+ /**
766
+ * @description Coordinates are geographic coordinates in the WGS 84 reference system.
767
+ */
658
768
  declare type Coordinates = {
769
+ /**
770
+ * @description Latitude in decimal degrees, in the range [-90, 90].
771
+ */
772
+ latitude: Latitude;
773
+ /**
774
+ * @description Longitude in decimal degrees, in the range [-180, 180].
775
+ */
776
+ longitude: Longitude;
777
+ };
778
+
779
+ declare type Coordinates_2 = {
659
780
  /**
660
781
  * @type number | undefined, double
661
782
  */
@@ -667,10 +788,18 @@ declare type Coordinates = {
667
788
  };
668
789
 
669
790
  /**
791
+ * @description CountryCode is an ISO 3166-1 alpha-2 two-letter country code.
792
+ * @minLength 2
793
+ * @maxLength 2
670
794
  * @pattern ^[A-Z]{2}$
671
795
  */
672
796
  declare type CountryCode = string;
673
797
 
798
+ /**
799
+ * @pattern ^[A-Z]{2}$
800
+ */
801
+ declare type CountryCode_2 = string;
802
+
674
803
  declare const countrySelectorMoleculeParamsValidator = z.object({
675
804
  mode: z.enum(['select']),
676
805
  name: z.string(),
@@ -717,6 +846,12 @@ export declare const createAddressMolecule: ({ mode, customization }: MoleculePa
717
846
  };
718
847
  };
719
848
 
849
+ /**
850
+ * @description Currency is an ISO 4217 three-letter currency code.
851
+ * @pattern ^[A-Z]{3}$
852
+ */
853
+ declare type Currency = string;
854
+
720
855
  declare type DataResolver<Args, Output> = (args: Args) => Promise<Output>;
721
856
 
722
857
  /**
@@ -734,6 +869,12 @@ declare type DateTimeRange = {
734
869
  start?: string;
735
870
  };
736
871
 
872
+ declare type DeepNonNullable<T> = T extends (...args: unknown[]) => unknown
873
+ ? T
874
+ : T extends object
875
+ ? { [K in keyof T]-?: DeepNonNullable<T[K]> }
876
+ : NonNullable<T>;
877
+
737
878
  declare type DeepPartial<T> = T extends (infer U)[]
738
879
  ? // this prevents the array elements from being undefined
739
880
  // DeepPartial<string[]> would be string[] | undefined instead of (string | undefined)[]
@@ -745,733 +886,351 @@ DeepPartial<U>[]
745
886
  : T;
746
887
 
747
888
  /**
748
- * @description An Addon represents an additional service or feature offered with a delivery.
889
+ * @description DeliveryAddress is a delivery destination address.\n\nIt extends Address with recipient- and delivery-specific fields and is used\nas the destination on `POST /v1/delivery/options` and\n`POST /v1/delivery/orders`.
749
890
  */
750
- declare type DeliveryAddon = {
891
+ declare type DeliveryAddress = {
751
892
  /**
752
- * @description The display-friendly name of the addon, e.g., \"Gift Wrapping\", \"Leave at Door\".\nDisplay name and description are localized, if translations are provided.
753
- * @type string
893
+ * @description CountryCode is the ISO 3166-1 alpha-2 country code.
754
894
  */
755
- display_name: string;
895
+ countryCode: CountryCode;
756
896
  /**
757
- * @description The price of the addon in minor currency units, e.g., cents.
758
- * @type string | undefined, int64
897
+ * @description PostalCode is the postal code. Formatting and validation rules are\nconditional on the country code.
898
+ * @type string
759
899
  */
760
- readonly price?: string;
900
+ postalCode: string;
761
901
  /**
762
- * @description AddonType defines the specific type of addon offered.\n\n - ADDON_TYPE_UNSPECIFIED: Addon type is unspecified or unknown.\n - CUSTOM: A custom addon specified by the carrier or merchant.\n - CARRY_IN: An addon for carrying the delivery item into the recipient\'s premises.\n - LEAVE_AT_DOOR: An addon for leaving the item at the door without requiring a signature.\n - UNWRAPPING: An addon for unwrapping the delivered item.
902
+ * @description AdministrativeArea is the first-level administrative subdivision\n(state, province, prefecture, etc.) as the ISO 3166-2 subdivision\ncode. Required for some destination countries e.g. US, CA, MX, BR,\nAR, AU, CN, JP, MY, KR, ID, TH, IT, ES, IE and ignored elsewhere.\nUse the country reference for specifics.
763
903
  * @type string | undefined
764
904
  */
765
- addon_type?: AddonAddonType;
905
+ administrativeArea?: string;
766
906
  /**
767
- * @description Indicates if this addon should be preselected by default.
768
- * @type boolean | undefined
907
+ * @description SubAdministrativeArea is the second-level administrative subdivision\n(county, district, etc.). Typically not required unless the country\nreference says otherwise.
908
+ * @type string | undefined
769
909
  */
770
- preselected?: boolean;
910
+ subAdministrativeArea?: string;
771
911
  /**
772
- * @description Indicates if this addon was chosen.
773
- * @type boolean | undefined
912
+ * @description Locality is the primary locality of the address — usually the city,\ntown, village, or municipality.
913
+ * @type string | undefined
774
914
  */
775
- chosen?: boolean;
915
+ locality?: string;
776
916
  /**
777
- * @description Unique addon identifier.
917
+ * @description SubLocality is the neighborhood, suburb, or district within the\nlocality. Required by some countries (e.g. JP chome, UK London\ndistricts, Latin-American colonias); see the country reference.
778
918
  * @type string | undefined
779
919
  */
780
- readonly id?: string;
920
+ subLocality?: string;
921
+ /**
922
+ * @description AddressLines are the ordered street address lines.\nIndex 0 holds primary street info (street name + number, or block\nnumber); subsequent indices hold secondary info (apartment, suite,\nfloor, building name).
923
+ * @type array | undefined
924
+ */
925
+ addressLines?: string[];
926
+ /**
927
+ * @description Type is the kind of address (residential, commercial, etc.).
928
+ */
929
+ type?: AddressType;
781
930
  /**
782
- * @description The external identifier of an addon, used for integration purposes.
931
+ * @description Instructions are free-text notes for the courier (door code, parking\nnotes, etc.). Honoured only when the selected service has\n`supports.courierInstructions: true`.
783
932
  * @type string | undefined
784
933
  */
785
- readonly external_id?: string;
934
+ instructions?: string;
786
935
  /**
787
- * @description The display-friendly description of the addon.\nDisplay name and description are localized, if translations are provided.
936
+ * @description RecipientName is the name of the recipient, formatted as expected in the destination country.
788
937
  * @type string | undefined
789
938
  */
790
- readonly description?: string;
939
+ recipientName?: string;
791
940
  };
792
941
 
793
942
  /**
794
- * @description DeliveryType defines the method or mode of delivery.\n\n - DELIVERY_TYPE_UNSPECIFIED: Delivery type is unspecified or unknown.\n - DELIVERY: Delivery to a customer\'s home or address.\n - PICKUP: Delivery to a service point or locker.\n - MAILBOX: Delivery to a customer\'s mailbox.\n - INSTORE: Delivery to a merchant\'s store for in-store pickup.
795
- * @default DELIVERY_TYPE_UNSPECIFIED
796
- */
797
- declare type DeliveryCategoryDeliveryType = DeliveryCategoryDeliveryTypeEnum;
798
-
799
- declare type DeliveryCategoryDeliveryTypeEnum =
800
- | 'DELIVERY_TYPE_UNSPECIFIED'
801
- | 'DELIVERY'
802
- | 'PICKUP'
803
- | 'MAILBOX'
804
- | 'INSTORE';
805
-
806
- /**
807
- * @description OptionsSource specifies the origin of the delivery options.\n\n - OPTIONS_SOURCE_UNSPECIFIED: Source of the options is unspecified.\n - FALLBACK: Delivery options come from a fallback configuration.\n - CARRIER: Delivery options are sourced directly from the carrier.
808
- * @default OPTIONS_SOURCE_UNSPECIFIED
943
+ * @description DeliveryCategory groups services by delivery type and provides display\nmetadata to organise the UI.
809
944
  */
810
- declare type DeliveryCategoryOptionsSource = DeliveryCategoryOptionsSourceEnum;
811
-
812
- declare type DeliveryCategoryOptionsSourceEnum =
813
- | 'OPTIONS_SOURCE_UNSPECIFIED'
814
- | 'FALLBACK'
815
- | 'CARRIER';
816
-
817
- declare type DeliveryCategoryPriceLevels = {
945
+ declare type DeliveryCategory = {
946
+ /**
947
+ * @description ID is the unique identifier for this category.
948
+ * @type string
949
+ */
950
+ id: string;
951
+ /**
952
+ * @description Name is the display name for this category.
953
+ * @type string
954
+ */
955
+ name: string;
956
+ /**
957
+ * @description DeliveryType is the kind of delivery for all services in this category.
958
+ */
959
+ deliveryType: DeliveryType;
960
+ /**
961
+ * @description Services are the available delivery services in this category.
962
+ * @type array
963
+ */
964
+ services: DeliveryService_2[];
965
+ /**
966
+ * @description Preselected indicates whether this category should be pre-selected\nby default. At most one category per delivery group is preselected.
967
+ * @type boolean | undefined
968
+ */
969
+ preselected?: boolean;
970
+ /**
971
+ * @description SortOrder is the sort order for displaying this category (lower numbers first).
972
+ * @type integer | undefined, int32
973
+ */
974
+ sortOrder?: number;
975
+ /**
976
+ * @description CustomText is custom text to display alongside this category.
977
+ * @type string | undefined
978
+ */
979
+ customText?: string;
818
980
  /**
819
- * @description Available price levels for the carrier product.\nOnly the base price and prices with the `total_value` price rule are included.
981
+ * @description WarningText is warning text to display for this category (e.g. delivery delays).
982
+ * @type string | undefined
983
+ */
984
+ warningText?: string;
985
+ /**
986
+ * @description Tags are additional categorisation/filtering tags.
820
987
  * @type array | undefined
821
988
  */
822
- price_levels?: PriceLevelsPriceLevel[];
989
+ tags?: string[];
990
+ /**
991
+ * @description ExternalID is an external identifier for merchant-specific integrations.
992
+ * @type string | undefined
993
+ */
994
+ externalId?: string;
823
995
  };
824
996
 
825
997
  /**
826
- * @description Information about a warehouse.\nAll this data is stored in the site configuration.
998
+ * @description DeliveryGroup holds the delivery options for a single shipment. In\nsplit-shipment scenarios the response carries multiple groups.
827
999
  */
828
- declare type DeliveryCategoryWarehouse = {
1000
+ declare type DeliveryGroup = {
829
1001
  /**
830
- * @description Unique identifier of the warehouse.
1002
+ * @description ID is the unique identifier for this delivery group. Used to\ncorrelate with fulfillment groups in the request.
831
1003
  * @type string
832
1004
  */
833
1005
  id: string;
834
1006
  /**
835
- * @description Represents an address suitable for delivery.
836
- * @type object
1007
+ * @description Categories are the available delivery categories for this group.\nCategories organise services by delivery type (home delivery,\npickup, etc.).
1008
+ * @type array
837
1009
  */
838
- address: V1AlphaDeliveryAddress;
1010
+ categories: DeliveryCategory[];
839
1011
  /**
840
- * @description The external identifier of a warehouse, used for integration purposes.
1012
+ * @description FulfillmentGroupRef references the fulfillment group in the request that this delivery group corresponds to.
841
1013
  * @type string | undefined
842
1014
  */
843
- external_id?: string;
1015
+ fulfillmentGroupRef?: string;
1016
+ };
1017
+
1018
+ /* Excluded from this release type: DeliveryMoleculeCustomization */
1019
+
1020
+ declare type DeliveryMoleculeParams = {
1021
+ mode: 'active' | 'passive';
1022
+ name: string;
1023
+ customization?: {
1024
+ choice?: {
1025
+ carrierInstructions?: 'off' | 'inline' | 'popup';
1026
+ gaplessAddonsList?: boolean;
1027
+ gaplessCarrierList?: boolean;
1028
+ gaplessDeliveryList?: boolean;
1029
+ gaplessDeliveryTimeList?: boolean;
1030
+ labels?: 'off' | 'chips' | 'text';
1031
+ showAddons?: boolean;
1032
+ showCustomInfoText?: boolean;
1033
+ showCustomText?: boolean;
1034
+ showDiscountedPrice?: boolean;
1035
+ zeroPriceDisplay?: 'free' | '0';
1036
+ showFreeShippingIndicator?: boolean;
1037
+ showPrice?: boolean;
1038
+ showRadioIndicator?: boolean;
1039
+ showReturnPromise?: boolean;
1040
+ showCarrierLogo?: boolean;
1041
+ showCarrierName?: boolean;
1042
+ showDeliveryTime?: boolean;
1043
+ showLocationSection?: boolean;
1044
+ showLocationAddress?: boolean;
1045
+ showLocationCarrierName?: boolean;
1046
+ showLocationType?: boolean;
1047
+ categoryLabel?: 'name' | 'type';
1048
+ deliveryTime?: 'off' | 'inline' | 'popup';
1049
+ };
1050
+ location?: {
1051
+ gaplessList?: boolean;
1052
+ mapDefaultVisible?: boolean;
1053
+ mapDefaultZoom?: number;
1054
+ mapFitboundsMaxZoom?: number;
1055
+ mapPosition?: 'start' | 'end';
1056
+ mapToggleEnabled?: boolean;
1057
+ zeroPriceDisplay?: 'free' | '0';
1058
+ displayMode?: 'popup' | 'inline';
1059
+ selectionControl?: 'radio' | 'disabled';
1060
+ selectionAlignment?: 'left' | 'right';
1061
+ showLocationAddress?: boolean;
1062
+ showCarrierName?: boolean;
1063
+ showLocationType?: boolean;
1064
+ showOpeningHours?: boolean;
1065
+ showPrice?: boolean;
1066
+ };
1067
+ productList?: {
1068
+ defaultView?: 'off' | 'list' | 'summary';
1069
+ showImage?: boolean;
1070
+ showMetadata?: boolean;
1071
+ showPrice?: boolean;
1072
+ showQuantity?: boolean;
1073
+ summaryText?: 'none' | 'products' | 'firstProductAndMore';
1074
+ zeroPriceDisplay?: 'free' | '0';
1075
+ };
1076
+ summary?: {
1077
+ previewAddons?: boolean;
1078
+ showFreeShippingIndicator?: boolean;
1079
+ showDiscountedPrice?: boolean;
1080
+ zeroPriceDisplay?: 'free' | '0';
1081
+ categoryLabel?: 'name' | 'type';
1082
+ };
1083
+ };
844
1084
  };
845
1085
 
1086
+ declare const deliveryMoleculeParamsValidator = z.object({
1087
+ customization: deliveryCustomizationValidator,
1088
+ mode: z.enum(['active', 'passive']),
1089
+ name: z.string(),
1090
+ }) satisfies z.ZodType<DeliveryMoleculeParams>;
1091
+
846
1092
  /**
847
- * @description Represents a latitude/longitude pair.\nUnless specified otherwise, this must conform to the WGS84 standard.\nValues must be within normalized ranges.
1093
+ * @description DeliveryOptionsResponse is the response returned for a request to compute\ndelivery options.\n\nOptions are organised into groups (one per requested fulfillment group)\nand, within each group, into categories (by delivery type). Each service\nwithin a category is a selectable delivery option.
848
1094
  */
849
- declare type DeliveryCoordinates = {
850
- /**
851
- * @description The latitude in degrees. Must be within the range -90.0 to +90.0, inclusive.
852
- * @type number, double
853
- */
854
- lat: number;
1095
+ declare type DeliveryOptionsResponse = {
855
1096
  /**
856
- * @description The longitude in degrees. Must be within the range -180.0 to +180.0, inclusive.
857
- * @type number, double
1097
+ * @description Groups are the delivery groups, one per fulfillment group in the\nrequest. For single-shipment orders this contains exactly one group;\nfor split shipments each group represents a separate delivery.
1098
+ * @type array
858
1099
  */
859
- lng: number;
1100
+ groups: DeliveryGroup[];
860
1101
  };
861
1102
 
862
1103
  /**
863
- * @description The DeliveryCategory represents a grouping of delivery options that share the same type and other characteristics.
1104
+ * @description DeliveryRoute is the journey from origin to destination for a delivery.\nComplex deliveries may include multiple legs.
864
1105
  */
865
- declare type DeliveryDeliveryCategory = {
1106
+ declare type DeliveryRoute = {
866
1107
  /**
867
- * @description The unique identifier of a delivery category.
1108
+ * @description ID is the unique identifier for this route.
868
1109
  * @type string
869
1110
  */
870
1111
  id: string;
871
1112
  /**
872
- * @description The external identifier of a category, used for integration purposes.
873
- * @type string | undefined
1113
+ * @description Legs are the individual steps of the delivery journey.
1114
+ * @type array
874
1115
  */
875
- external_id?: string;
1116
+ legs: RouteLeg[];
1117
+ };
1118
+
1119
+ declare type DeliveryService = {
1120
+ getDeliveryOptions: DataResolver<GetDeliveryOptionsArgs, DeliveryOptionsResponse>;
1121
+ listLocations: DataResolver<ListLocationsArgs, ListLocationsResponse>;
1122
+ };
1123
+
1124
+ /**
1125
+ * @description DeliveryService is a specific, selectable shipping option.
1126
+ */
1127
+ declare type DeliveryService_2 = {
876
1128
  /**
877
- * @description DeliveryType defines the method or mode of delivery.\n\n - DELIVERY_TYPE_UNSPECIFIED: Delivery type is unspecified or unknown.\n - DELIVERY: Delivery to a customer\'s home or address.\n - PICKUP: Delivery to a service point or locker.\n - MAILBOX: Delivery to a customer\'s mailbox.\n - INSTORE: Delivery to a merchant\'s store for in-store pickup.
878
- * @type string
1129
+ * @description Carrier provides this delivery service.
879
1130
  */
880
- delivery_type: DeliveryCategoryDeliveryType;
1131
+ carrier: Carrier;
881
1132
  /**
882
- * @description A human-readable name of the category, which will be presented to the customer.
883
- * @type string
1133
+ * @description Product is the carrier product for this delivery option. The product\n`id` is globally unique and should be used when selecting this\nservice.
884
1134
  */
885
- display_name: string;
1135
+ product: CarrierProduct;
886
1136
  /**
887
- * @description Defines the order in which the category will be presented to the customer.
888
- * @type integer | undefined, int32
1137
+ * @description DeliveryTime is when the delivery is expected to arrive.
889
1138
  */
890
- sort_order?: number;
1139
+ deliveryTime: DeliveryTime;
891
1140
  /**
892
- * @description OptionsSource specifies the origin of the delivery options.\n\n - OPTIONS_SOURCE_UNSPECIFIED: Source of the options is unspecified.\n - FALLBACK: Delivery options come from a fallback configuration.\n - CARRIER: Delivery options are sourced directly from the carrier.
893
- * @type string
1141
+ * @description Price is the price for this delivery option.
894
1142
  */
895
- options_source: DeliveryCategoryOptionsSource;
1143
+ price: ServicePrice;
896
1144
  /**
897
- * @description The delivery options available within this category.
898
- * @type array
1145
+ * @description Location holds location details for the service.\n\n- For `instore` services this is set to the merchant store location.\n- For `pickup` services it is **not** populated by `/v1/delivery/options`.\n Pickup locations are fetched separately via `POST /v1/delivery/locations`,\n passing the service\'s `product.id` and the same `deliveryCriteria`.\n This keeps the options response small and avoids unnecessary location\n lookups when many pickup products are returned.
899
1146
  */
900
- delivery_options: DeliveryDeliveryOption[];
1147
+ location?: Location_2;
901
1148
  /**
902
- * @description Add-ons that are available for this category, e.g., gift wrapping, insurance.
1149
+ * @description TimeSlots are the available time slots for scheduled delivery (if applicable).
903
1150
  * @type array | undefined
904
1151
  */
905
- addons?: DeliveryAddon[];
1152
+ timeSlots?: TimeSlot[];
906
1153
  /**
907
- * @description Indicates if this category should be preselected by default.
908
- * @type boolean | undefined
1154
+ * @description Routes describe the delivery journey from origin to destination.
1155
+ * @type array | undefined
909
1156
  */
910
- preselected?: boolean;
1157
+ routes?: DeliveryRoute[];
911
1158
  /**
912
- * @description Indicates if this category was chosen by the user.
913
- * @type boolean | undefined
1159
+ * @description Supports lists features supported by this service.
914
1160
  */
915
- chosen?: boolean;
1161
+ supports?: ServiceSupports;
916
1162
  /**
917
- * @description Information about a warehouse.\nAll this data is stored in the site configuration.
918
- * @type object | undefined
1163
+ * @description AvailableAddons are the add-ons that can be selected with this service.
1164
+ * @type array | undefined
919
1165
  */
920
- warehouse?: DeliveryCategoryWarehouse;
1166
+ availableAddons?: ServiceAddon[];
921
1167
  /**
922
- * @description Tags associated with the delivery category, used for cross-reference purposes.
1168
+ * @description DefaultAddons are the add-ons included by default with this service.
923
1169
  * @type array | undefined
924
1170
  */
925
- readonly tags?: string[];
1171
+ defaultAddons?: ServiceAddon[];
926
1172
  /**
927
- * @description Information about active labels associated with the delivery category.\nLabels name and description are localized, if translations are provided.
928
- * @type array | undefined
1173
+ * @description Meta carries carrier-specific metadata.
1174
+ * @type object | undefined
929
1175
  */
930
- readonly labels?: DeliveryDeliveryCategoryLabel[];
1176
+ meta?: object;
931
1177
  /**
932
- * @description Additional text that can be displayed with the category.\nThe presence of this field depends on the locale.
1178
+ * @description ExternalMethodID is an external method identifier for merchant integrations.
933
1179
  * @type string | undefined
934
1180
  */
935
- readonly custom_text?: string;
1181
+ externalMethodId?: string;
936
1182
  /**
937
- * @description Additional information that can be displayed with the category.\nThe presence of this field depends on the locale.
938
- * @type string | undefined
1183
+ * @description Preselected indicates whether this service is pre-selected within\nits category. At most one service per category is preselected.
1184
+ * @type boolean | undefined
939
1185
  */
940
- readonly custom_info_text?: string;
1186
+ preselected?: boolean;
941
1187
  /**
942
- * @type object | undefined
1188
+ * @description Token is an opaque token representing this delivery offer. Pass\nthis token in the `selections` array when creating an order to\nselect this service.\n\nThe token is a signed, self-contained payload that encodes the\noffered price, delivery details, and a hash of the request context\n(fulfillment groups + destination).\n\nThe token has a limited validity period. When `deliveryTime.expires`\nis set, the offer is valid until that timestamp; when it is not\nset, the offer is subject to the default validity window for the\ncarrier and may still be rejected with `offer-expired` at\norder-creation time.\n\nAt order creation time, the server validates the token\'s signature,\nexpiry, and that the submitted cart and destination match what was\noriginally offered.
1189
+ * @type string
943
1190
  */
944
- readonly price_levels?: Record<string, DeliveryCategoryPriceLevels>;
1191
+ token: string;
945
1192
  };
946
1193
 
947
1194
  /**
948
- * @description Labels provide additional, customer-facing information for the delivery category.
1195
+ * @description DeliveryTime is the window in which a delivery is expected to occur.
949
1196
  */
950
- declare type DeliveryDeliveryCategoryLabel = {
1197
+ declare type DeliveryTime = {
951
1198
  /**
952
- * @description Unique identifier of the label.
953
- * @type string | undefined
1199
+ * @description Earliest expected delivery date/time. When the time component is\n00:00:00, only the date is promised.
1200
+ * @type string, date-time
954
1201
  */
955
- id?: string;
1202
+ earliest: string;
956
1203
  /**
957
- * @description Display name of the label.
958
- * @type string | undefined
1204
+ * @description Latest expected delivery date/time. When the time component is\n00:00:00, only the date is promised.
1205
+ * @type string, date-time
959
1206
  */
960
- name?: string;
1207
+ latest: string;
961
1208
  /**
962
- * @description Description of the label displayed to the customer.
963
- * @type string | undefined
964
- */
965
- description?: string;
966
- /**
967
- * @description LabelType defines the type of label.\n\n - LABEL_TYPE_UNKNOWN: Label type is unknown.\n - LABEL_TYPE_SUSTAINABILITY: A sustainability-related label.\n - LABEL_TYPE_PRIORITY: A priority delivery label.\n - LABEL_TYPE_CUSTOM: A custom label defined by the merchant.\n - LABEL_TYPE_SWAN: A Nordic Swan eco-label.
968
- * @type string | undefined
969
- */
970
- type?: LabelLabelType;
971
- /**
972
- * @description Color code for the label, e.g., hex value.
973
- * @type string | undefined
974
- */
975
- color?: string;
976
- /**
977
- * @description URI or identifier for the label icon.
978
- * @type string | undefined
979
- */
980
- icon?: string;
981
- /**
982
- * @description Color code for the label in dark mode, e.g., hex value.
983
- * @type string | undefined
984
- */
985
- dark_mode_color?: string;
986
- };
987
-
988
- declare type DeliveryDeliveryNode = {
989
- /**
990
- * @description Constraints on the node\'s handoff.
991
- * @type object | undefined
992
- */
993
- handoff?: DeliveryNodeHandoff;
994
- /**
995
- * @description Where the node is physically located.
996
- * @type object
997
- */
998
- location: DeliveryDeliveryNodeLocation;
999
- /**
1000
- * @description What roles the node can perform.
1001
- * @type array
1002
- */
1003
- roles: DeliveryNodeRole[];
1004
- /**
1005
- * @description Additional metadata about the node.\nFor cross-reference purposes.
1006
- * @type array | undefined
1007
- */
1008
- tags?: string[];
1009
- };
1010
-
1011
- /**
1012
- * @description Where the node is physically located.
1013
- */
1014
- declare type DeliveryDeliveryNodeLocation = {
1015
- /**
1016
- * @description To provide full information about the location.
1017
- * @type object | undefined
1018
- */
1019
- by_value?: LocationByValue;
1020
- /**
1021
- * @description To reference an existing location.
1022
- * @type object | undefined
1023
- */
1024
- by_ref?: LocationByRef;
1025
- };
1026
-
1027
- /**
1028
- * @description The DeliveryOption represents the details of a specific delivery option.
1029
- */
1030
- declare type DeliveryDeliveryOption = {
1031
- /**
1032
- * @description The unique identifier of the delivery option.
1033
- * @type string
1034
- */
1035
- id: string;
1036
- /**
1037
- * @description The Carrier contains details about the shipping carrier associated with this delivery option.
1038
- * @type object
1039
- */
1040
- carrier: DeliveryOptionCarrier;
1041
- /**
1042
- * @description The PickupLocation represents a physical location from which a delivery can be retrieved.
1043
- * @type object | undefined
1044
- */
1045
- pickup_location?: DeliveryPickupLocation;
1046
- /**
1047
- * @description ETD stands for Estimated Time of Delivery.
1048
- * @type object
1049
- */
1050
- etd: DeliveryETD;
1051
- /**
1052
- * @description Indicates if this delivery option should be preselected by default.
1053
- * @type boolean | undefined
1054
- */
1055
- preselected?: boolean;
1056
- /**
1057
- * @description Indicates if this delivery option was chosen by the customer.
1058
- * @type boolean | undefined
1059
- */
1060
- chosen?: boolean;
1061
- /**
1062
- * @description The expiration timestamp in UTC of the delivery option.
1063
- * @type string | undefined, date-time
1064
- */
1065
- expire_time?: string;
1066
- /**
1067
- * @description Price associated with the delivery option in minor currency units, e.g., cents.
1068
- * @type string, int64
1069
- */
1070
- price: string;
1071
- /**
1072
- * @description Where delivery originates from.
1073
- * @type object
1074
- */
1075
- origin: DeliveryOptionOrigin;
1076
- };
1077
-
1078
- /**
1079
- * @description Represents a distance measurement with both spatial distance and estimated travel time.
1080
- */
1081
- declare type DeliveryDistance = {
1082
- /**
1083
- * @description Approximate distance in meters.
1084
- * @type string | undefined, int64
1085
- */
1086
- readonly meters?: string;
1087
- /**
1088
- * @description Approximate duration in minutes.
1089
- * @type string | undefined, int64
1090
- */
1091
- readonly minutes?: string;
1092
- };
1093
-
1094
- /**
1095
- * @description ETD stands for Estimated Time of Delivery.
1096
- */
1097
- declare type DeliveryETD = {
1098
- /**
1099
- * @description Relative represents an ETD as a range of time units.
1100
- * @type object | undefined
1101
- */
1102
- relative?: ETDRelative;
1103
- /**
1104
- * @description Absolute represents an ETD as a single or pair of timestamps.
1105
- * @type object | undefined
1106
- */
1107
- absolute?: ETDAbsolute;
1108
- /**
1109
- * @description Custom represents an ETD in a human-readable text format.
1110
- * @type object | undefined
1111
- */
1112
- custom?: ETDCustom;
1113
- };
1114
-
1115
- /**
1116
- * @description A Fulfillment details when a delivery can be fulfilled.
1117
- */
1118
- declare type DeliveryFulfillment = {
1119
- /**
1120
- * @description Readiness specifies a time range when the goods will be ready for shipment.
1121
- * @type object
1122
- */
1123
- readiness: FulfillmentReadiness;
1124
- /**
1125
- * @description List of category tags, to which the `Readiness` applies.\nIf empty, the `Readiness` applies to all categories.
1126
- * @type array | undefined
1127
- */
1128
- category_tags?: string[];
1129
- };
1130
-
1131
- /**
1132
- * @description Represents a single item.
1133
- */
1134
- declare type DeliveryLineItem = {
1135
- /**
1136
- * @description The unique item identifier of the item.
1137
- * @type string
1138
- */
1139
- sku: string;
1140
- /**
1141
- * @description The item name or title, which is suitable for presentation to the customer.
1142
- * @type string
1143
- */
1144
- title: string;
1145
- /**
1146
- * @description Total quantity of the item.
1147
- * @type integer, int32
1148
- */
1149
- quantity: number;
1150
- /**
1151
- * @description Weight of a single item in grams, must be greater than 0.
1152
- * @type integer | undefined, int32
1153
- */
1154
- weight?: number;
1155
- /**
1156
- * @description Represents the dimensions of the item.
1157
- * @type object | undefined
1158
- */
1159
- dimensions?: LineItemDimensions;
1160
- /**
1161
- * @description Non-negative discount applied to the item, or items. Unit is cents.
1162
- * @type string | undefined, int64
1163
- */
1164
- discount?: string;
1165
- /**
1166
- * @description Non-negative price of a single item after applying discounts. Unit is cents.
1167
- * @type string | undefined, int64
1168
- */
1169
- price?: string;
1170
- /**
1171
- * @description URI of the product image, e.g., thumbnail.
1172
- * @type string | undefined
1173
- */
1174
- image_uri?: string;
1175
- /**
1176
- * @description Used to control the behaviour of the filter/price rules.\nEquivalent of cart_items_attributes in the `Delivery Checkout` API.
1177
- * @type array | undefined
1178
- */
1179
- attributes?: string[];
1180
- };
1181
-
1182
- declare type DeliveryMoleculeParams = {
1183
- mode: 'active' | 'passive';
1184
- name: string;
1185
- customization?: {
1186
- choice?: {
1187
- carrierInstructions?: 'off' | 'inline' | 'popup';
1188
- gaplessAddonsList?: boolean;
1189
- gaplessCarrierList?: boolean;
1190
- gaplessDeliveryList?: boolean;
1191
- labels?: 'off' | 'chips' | 'text';
1192
- showAddons?: boolean;
1193
- showCustomInfoText?: boolean;
1194
- showCustomText?: boolean;
1195
- showDiscountedPrice?: boolean;
1196
- showFreeShippingIndicator?: boolean;
1197
- showPrice?: boolean;
1198
- showRadioIndicator?: boolean;
1199
- showReturnPromise?: boolean;
1200
- showShippingLogo?: boolean;
1201
- };
1202
- location?: {
1203
- gaplessList?: boolean;
1204
- mapDefaultVisible?: boolean;
1205
- mapDefaultZoom?: number;
1206
- mapFitboundsMaxZoom?: number;
1207
- mapPosition?: 'start' | 'end';
1208
- mapToggleEnabled?: boolean;
1209
- };
1210
- productList?: {
1211
- defaultView?: 'off' | 'list' | 'summary';
1212
- showImage?: boolean;
1213
- showMetadata?: boolean;
1214
- showPrice?: boolean;
1215
- showQuantity?: boolean;
1216
- summaryText?: 'none' | 'products' | 'firstProductAndMore';
1217
- };
1218
- summary?: {
1219
- previewAddons?: boolean;
1220
- showFreeShippingIndicator?: boolean;
1221
- };
1222
- };
1223
- };
1224
-
1225
- declare const deliveryMoleculeParamsValidator = z.object({
1226
- customization: deliveryCustomizationValidator,
1227
- mode: z.enum(['active', 'passive']),
1228
- name: z.string(),
1229
- }) satisfies z.ZodType<DeliveryMoleculeParams>;
1230
-
1231
- /**
1232
- * @description Constraints on the node\'s handoff.
1233
- */
1234
- declare type DeliveryNodeHandoff = {
1235
- /**
1236
- * @description The earliest time the node can hand off the delivery.
1237
- * @type string | undefined, date-time
1238
- */
1239
- earliest_time?: string;
1240
- /**
1241
- * @description The latest time the node can hand off the delivery.
1242
- * @type string | undefined, date-time
1243
- */
1244
- latest_time?: string;
1245
- };
1246
-
1247
- /**
1248
- * @description Set of available roles for the node.\n\n - ROLE_UNSPECIFIED: Role is unspecified.\n - ORIGIN: The node is the origin of the delivery.\n - DESTINATION: The node is the destination of the delivery.
1249
- * @default ROLE_UNSPECIFIED
1250
- */
1251
- declare type DeliveryNodeRole = DeliveryNodeRoleEnum;
1252
-
1253
- declare type DeliveryNodeRoleEnum = 'ROLE_UNSPECIFIED' | 'ORIGIN' | 'DESTINATION';
1254
-
1255
- /**
1256
- * @description The Carrier contains details about the shipping carrier associated with this delivery option.
1257
- */
1258
- declare type DeliveryOptionCarrier = {
1259
- /**
1260
- * @description The name of the carrier company, e.g., \"DHL\", \"FedEx\".
1261
- * @type string
1262
- */
1263
- name: string;
1264
- /**
1265
- * @description The product or service level name provided by the carrier, e.g., \"Parcel\", \"Standard\".
1266
- * @type string
1267
- */
1268
- product_name: string;
1269
- /**
1270
- * @description The product or service level identifier provided by the carrier, e.g., \"dhl-par\", \"ups-std\".
1271
- * @type string
1272
- */
1273
- product_id: string;
1274
- /**
1275
- * @description The original sort order assigned by the carrier.
1276
- * @type integer | undefined, int32
1277
- */
1278
- sort_order?: number;
1279
- /**
1280
- * @description Carrier-specific metadata.
1281
- * @type object | undefined
1282
- */
1283
- meta?: Record<string, string>;
1284
- /**
1285
- * @description Merchant-specific carrier product identifier.
1286
- * @type string
1287
- */
1288
- external_id: string;
1289
- };
1290
-
1291
- /**
1292
- * @description Where delivery originates from.
1293
- */
1294
- declare type DeliveryOptionOrigin = {
1295
- /**
1296
- * @description Unique identifier of the origin.
1297
- * @type string
1298
- */
1299
- id: string;
1300
- /**
1301
- * @description Represents an address suitable for delivery.
1302
- * @type object
1303
- */
1304
- address: V1AlphaDeliveryAddress;
1305
- /**
1306
- * @description External identifier of the origin, used for integration purposes.
1307
- * @type string | undefined
1308
- */
1309
- external_id?: string;
1310
- };
1311
-
1312
- /**
1313
- * @description The PickupLocation represents a physical location from which a delivery can be retrieved.
1314
- */
1315
- declare type DeliveryPickupLocation = {
1316
- /**
1317
- * @description Internal location identifier, used within the system.
1318
- * @type string
1319
- */
1320
- id: string;
1321
- /**
1322
- * @description External identifier provided by the merchant or carrier.
1323
- * @type string
1324
- */
1325
- external_id: string;
1326
- /**
1327
- * @description LocationType defines the type of the pickup location.\n\n - LOCATION_TYPE_UNSPECIFIED: Unspecified type.\n - LOCKER: A locker pickup location.\n - STORE: A store pickup location.\n - POSTOFFICE: A post office pickup location.\n - MANNED: A manned pickup location, e.g., staffed desk.
1328
- * @type string | undefined
1329
- */
1330
- location_type?: PickupLocationLocationType;
1331
- /**
1332
- * @description The title of the location displayed to the customer.
1333
- * @type string
1334
- */
1335
- title: string;
1336
- /**
1337
- * @description Contact represents generic contact information.
1338
- * @type object | undefined
1339
- */
1340
- visiting_contact?: V1AlphaDeliveryContact;
1341
- /**
1342
- * @description Contact represents generic contact information.
1343
- * @type object | undefined
1344
- */
1345
- delivery_contact?: V1AlphaDeliveryContact;
1346
- /**
1347
- * @description OperationalHours define when the pickup location is operating.
1348
- * @type object | undefined
1349
- */
1350
- operational_hours?: PickupLocationOperationalHours;
1351
- /**
1352
- * @description Additional informational sections about the pickup location.
1353
- * @type array | undefined
1354
- */
1355
- sections?: PickupLocationSection[];
1356
- /**
1357
- * @description Distances define the walking and driving distances to the pickup location.
1358
- * @type object | undefined
1359
- */
1360
- distances?: PickupLocationDistances;
1361
- };
1362
-
1363
- /**
1364
- * @description ReturnPromise contains promise for returns and exchanges for a user and a cart.
1365
- */
1366
- declare type DeliveryReturnsPromise = {
1367
- /**
1368
- * @description Unique identifier for the return promise.
1369
- * @type string | undefined
1370
- */
1371
- readonly id?: string;
1372
- /**
1373
- * @description Currency code for the return promise, e.g., \"USD\", \"EUR\".
1374
- * @type string | undefined
1375
- */
1376
- readonly currency_code?: string;
1377
- /**
1378
- * @description Indicates whether returns are enabled. See `return_cost` for the associated cost.
1379
- * @type boolean | undefined
1380
- */
1381
- readonly returns_enabled?: boolean;
1382
- /**
1383
- * @description Non-negative cost of returning the item, or items. Unit is cents.
1384
- * @type string | undefined, int64
1385
- */
1386
- readonly return_cost?: string;
1387
- /**
1388
- * @description Indicates whether exchanges are enabled. See `exchange_cost` for the associated cost.
1389
- * @type boolean | undefined
1390
- */
1391
- readonly exchanges_enabled?: boolean;
1392
- /**
1393
- * @description Non-negative cost of exchanging the item, or items. Unit is cents.
1394
- * @type string | undefined, int64
1395
- */
1396
- readonly exchange_cost?: string;
1397
- /**
1398
- * @description Time in days to return or exchange the item.
1399
- * @type integer | undefined, int32
1400
- */
1401
- readonly return_time_days?: number;
1402
- /**
1403
- * @description Return Policy text suitable for presentation to the customer.
1404
- * @type string | undefined
1405
- */
1406
- readonly return_policy_text?: string;
1407
- /**
1408
- * @description Return Policy URL, which is suitable for presentation to the customer.
1409
- * @type string | undefined
1410
- */
1411
- readonly return_policy_url?: string;
1412
- /**
1413
- * @description Indicates if the return promise is unavailable due to API failures or other issues.\nWhen true, consider displaying a \"Return details unavailable\" message to the end user.
1414
- * @type boolean | undefined
1415
- */
1416
- readonly is_unavailable?: boolean;
1417
- };
1418
-
1419
- declare type DeliveryService = {
1420
- getSession: DataResolver<GetDeliverySessionArgs, DeliverySession>;
1421
- };
1422
-
1423
- /**
1424
- * @description A Session is the primary resource for handling the delivery options and the customer lifecycle.
1425
- */
1426
- declare type DeliverySession = {
1427
- /**
1428
- * @type string | undefined
1429
- */
1430
- name?: string;
1431
- /**
1432
- * @description State defines the current state of the session.\n\n - STATE_UNSPECIFIED: Default value. This value is unused.\n - ACTIVE: Session is active and can be modified.\n - COMPLETED: Session is completed and can not be modified.
1433
- * @type string | undefined
1434
- */
1435
- state?: SessionState;
1436
- /**
1437
- * @description Purchase describes purchase experience.
1438
- * @type object
1439
- */
1440
- purchase: SessionPurchase;
1441
- /**
1442
- * @description The deliveries included in this session.
1443
- * @type array
1444
- */
1445
- deliveries: V1AlphaDeliveryDelivery[];
1446
- /**
1447
- * @description The timestamp when the session was created.
1448
- * @type string | undefined, date-time
1449
- */
1450
- readonly create_time?: string;
1451
- /**
1452
- * @description The timestamp when the session was last updated.
1209
+ * @description Expires is when this delivery time estimate expires and may need to be refreshed.
1453
1210
  * @type string | undefined, date-time
1454
1211
  */
1455
- readonly update_time?: string;
1212
+ expires?: string;
1456
1213
  /**
1457
- * @description The current etag of the session.\nIf an etag is provided and does not match the current etag of the session,\nupdates and completion will be blocked and an ABORTED error will be returned.
1214
+ * @description Formatted is a human-readable formatted delivery time for display,\npre-formatted according to locale and merchant preferences.
1458
1215
  * @type string | undefined
1459
1216
  */
1460
- etag?: string;
1461
- /**
1462
- * @description ReturnPromise contains promise for returns and exchanges for a user and a cart.
1463
- * @type object | undefined
1464
- */
1465
- returns_promise?: DeliveryReturnsPromise;
1217
+ formatted?: string;
1466
1218
  };
1467
1219
 
1220
+ /**
1221
+ * @description DeliveryType is the kind of delivery a service performs.
1222
+ */
1223
+ declare type DeliveryType = DeliveryTypeEnum;
1224
+
1468
1225
  /**
1469
1226
  * @description - UNKNOWN: Delivery type is not known for some reason\n - DELIVERY: Home delivery\n - PICKUP: Delivery to a service point or a locker\n - MAILBOX: Delivery to customer\'s mailbox\n - INSTORE: Delivery to one of the merchants stores\n - INWAREHOUSE: Delivery to the warehouse. This type is used with chain delivery in warehouse-warehouse-delivery/pickup.
1470
1227
  * @default UNKNOWN
1471
1228
  */
1472
- declare type DeliveryType = DeliveryTypeEnum;
1229
+ declare type DeliveryType_2 = DeliveryTypeEnum_2;
1473
1230
 
1474
- declare type DeliveryTypeEnum =
1231
+ declare type DeliveryTypeEnum = 'delivery' | 'pickup' | 'mailbox' | 'instore';
1232
+
1233
+ declare type DeliveryTypeEnum_2 =
1475
1234
  | 'UNKNOWN'
1476
1235
  | 'DELIVERY'
1477
1236
  | 'PICKUP'
@@ -1519,103 +1278,77 @@ declare type DisplayItem = {
1519
1278
  total_price?: number;
1520
1279
  };
1521
1280
 
1522
- declare type EstimatedTime = {
1523
- /**
1524
- * @description Earliest date in RFC3339 format.
1525
- * @type string | undefined
1526
- */
1527
- earliest?: string;
1528
- /**
1529
- * @description Latest date in RFC3339 format.
1530
- * @type string | undefined
1531
- */
1532
- latest?: string;
1533
- };
1534
-
1535
1281
  /**
1536
- * @description Absolute represents an ETD as a single or pair of timestamps.
1282
+ * @description DistanceDetail is a detailed distance measurement with optional\ntravel-time estimate.
1537
1283
  */
1538
- declare type ETDAbsolute = {
1539
- /**
1540
- * @description The earliest possible delivery time. If unspecified, delivery is considered to be immediate.
1541
- * @type string | undefined, date-time
1542
- */
1543
- earliest_time?: string;
1284
+ declare type DistanceDetail = {
1544
1285
  /**
1545
- * @description The latest possible delivery time. If unspecified, there is no guaranteed maximum time.
1546
- * @type string | undefined, date-time
1286
+ * @description Meters is the distance value in meters.
1287
+ * @type integer, int32
1547
1288
  */
1548
- latest_time?: string;
1549
- };
1550
-
1551
- /**
1552
- * @description Custom represents an ETD in a human-readable text format.
1553
- */
1554
- declare type ETDCustom = {
1289
+ meters: number;
1555
1290
  /**
1556
- * @description Description in a text form, e.g., \"Before Christmas\", \"Same day if ordered before 2PM\".
1557
- * @type string
1291
+ * @description DurationMinutes is the estimated travel duration in minutes.
1292
+ * @type integer | undefined, int32
1558
1293
  */
1559
- text: string;
1294
+ durationMinutes?: number;
1560
1295
  };
1561
1296
 
1562
- /**
1563
- * @description Relative represents an ETD as a range of time units.
1564
- */
1565
- declare type ETDRelative = {
1566
- /**
1567
- * @description TimeUnit specifies the unit of time measurement for ETD.\n\n - TIME_UNIT_UNSPECIFIED: Default value. This value is unused.\n - TIME_UNIT_MINUTE: Minutes\n - TIME_UNIT_HOUR: Hours\n - TIME_UNIT_DAY: Calendar days\n - TIME_UNIT_BUSINESS_DAY: Business days (excluding weekends and holidays)\n - TIME_UNIT_WEEK: Calendar weeks\n - TIME_UNIT_MONTH: Calendar months
1568
- * @type string
1569
- */
1570
- unit: ETDTimeUnit;
1297
+ declare type EstimatedTime = {
1571
1298
  /**
1572
- * @description The minimum number of time units. If unspecified, there is no lower bound.\nValue of zero means delivery within the same time unit period (e.g., same day if unit is DAY).
1573
- * @type integer | undefined, int32
1299
+ * @description Earliest date in RFC3339 format.
1300
+ * @type string | undefined
1574
1301
  */
1575
- earliest?: number;
1302
+ earliest?: string;
1576
1303
  /**
1577
- * @description Maximum number of time units. If unspecified, there is no upper bound.\nValue of zero means delivery within the same time unit period (e.g., same day if unit is DAY).
1578
- * @type integer | undefined, int32
1304
+ * @description Latest date in RFC3339 format.
1305
+ * @type string | undefined
1579
1306
  */
1580
- latest?: number;
1307
+ latest?: string;
1581
1308
  };
1582
1309
 
1583
- /**
1584
- * @description TimeUnit specifies the unit of time measurement for ETD.\n\n - TIME_UNIT_UNSPECIFIED: Default value. This value is unused.\n - TIME_UNIT_MINUTE: Minutes\n - TIME_UNIT_HOUR: Hours\n - TIME_UNIT_DAY: Calendar days\n - TIME_UNIT_BUSINESS_DAY: Business days (excluding weekends and holidays)\n - TIME_UNIT_WEEK: Calendar weeks\n - TIME_UNIT_MONTH: Calendar months
1585
- * @default TIME_UNIT_UNSPECIFIED
1586
- */
1587
- declare type ETDTimeUnit = ETDTimeUnitEnum;
1588
-
1589
- declare type ETDTimeUnitEnum =
1590
- | 'TIME_UNIT_UNSPECIFIED'
1591
- | 'TIME_UNIT_MINUTE'
1592
- | 'TIME_UNIT_HOUR'
1593
- | 'TIME_UNIT_DAY'
1594
- | 'TIME_UNIT_BUSINESS_DAY'
1595
- | 'TIME_UNIT_WEEK'
1596
- | 'TIME_UNIT_MONTH';
1597
-
1598
1310
  declare type Event_2<T> = { payload: T };
1599
1311
 
1600
1312
  /**
1601
1313
  * Map of all events emitted by the Ingrid compound.
1602
1314
  *
1603
- * | Event | When it fires |
1604
- * | ----------------- | ---------------------------------------------- |
1605
- * | `ready` | Compound is mounted and interactive |
1606
- * | `addressSubmit` | Shopper confirms the address form |
1607
- * | `countryChange` | Shopper selects a different country |
1608
- * | `selectionChange` | Shopper selects a delivery option |
1609
- * | `error` | An error occurs during mount or at runtime |
1315
+ * | Event | When it fires |
1316
+ * | ----------------- | --------------------------------------------------------------------- |
1317
+ * | `ready` | Compound is mounted and interactive |
1318
+ * | `addressSubmit` | Shopper confirms the address form or submits a postal code |
1319
+ * | `countryChange` | Shopper selects a different country |
1320
+ * | `selectionChange` | Shopper selects a delivery option |
1321
+ * | `error` | An unhandled error occurs during mount or is caught by the compound's error boundary at runtime |
1322
+ *
1323
+ * @remarks
1324
+ * The `error` event fires in two situations:
1325
+ * - **Mount failure** — an error thrown while loading or initialising the compound.
1326
+ * - **Runtime boundary** — an unhandled React error caught by the compound's top-level
1327
+ * error boundary. In this case the compound renders a generic fallback UI and remains
1328
+ * alive; the integrator can use this event to log or react to the failure.
1610
1329
  *
1611
- * @remarks Event names and payload shapes may evolve before the stable release.
1330
+ * Event names and payload shapes may evolve before the stable release.
1612
1331
  *
1613
1332
  * @public
1614
1333
  */
1615
1334
  export declare type EventsMap = {
1616
1335
  countryChange: (event: Event_2<{ country_code: string }>) => void;
1617
1336
  addressSubmit: (event: Event_2<Partial<AddressContactEntry>>) => void;
1618
- selectionChange: (event: Event_2<{ deliveryId: string; categoryId: string }>) => void;
1337
+ /**
1338
+ * Fires when the shopper selects a delivery option. `groupId`/`categoryId`
1339
+ * identify the choice within the options response; `serviceToken` is the
1340
+ * signed offer token to hand to the orchestrator for backend order creation.
1341
+ * `timeSlotId` is the selected scheduled-delivery window (one of the
1342
+ * service's `timeSlots[].id`), present only when the user picked a slot.
1343
+ */
1344
+ selectionChange: (
1345
+ event: Event_2<{
1346
+ groupId: string;
1347
+ categoryId: string;
1348
+ serviceToken: string;
1349
+ timeSlotId?: string;
1350
+ }>
1351
+ ) => void;
1619
1352
  ready: () => void;
1620
1353
  error: (error: unknown) => void;
1621
1354
  };
@@ -1639,7 +1372,7 @@ declare type FormMeta = {
1639
1372
  /**
1640
1373
  * @description ISO 3166-1 alpha-2 country code for this form configuration.
1641
1374
  */
1642
- countryCode: CountryCode;
1375
+ countryCode: CountryCode_2;
1643
1376
  /**
1644
1377
  * @description Text direction. `rtl` (Right-to-Left) is critical for\nlanguages like Arabic or Hebrew.
1645
1378
  */
@@ -1651,12 +1384,20 @@ declare type FormMeta = {
1651
1384
  language: string;
1652
1385
  };
1653
1386
 
1387
+ /**
1388
+ * @description Selects which address form configuration to return.
1389
+ */
1390
+ declare type FormType = FormTypeEnum;
1391
+
1392
+ declare type FormTypeEnum = 'delivery' | 'billing';
1393
+
1654
1394
  declare const freeShippingIndicatorMoleculeParamsValidator = z.object({
1655
1395
  name: z.string(),
1656
1396
  deliveryId: z.string().optional(),
1657
1397
  customization: z
1658
1398
  .object({
1659
1399
  showExhaustedLevelsMessage: z.boolean().optional(),
1400
+ zeroPriceDisplay: z.enum(['free', '0']).optional(),
1660
1401
  })
1661
1402
  .optional(),
1662
1403
  }) satisfies z.ZodType<FreeShippingIndicatorParams>;
@@ -1666,25 +1407,10 @@ declare type FreeShippingIndicatorParams = {
1666
1407
  deliveryId?: string;
1667
1408
  customization?: {
1668
1409
  showExhaustedLevelsMessage?: boolean;
1410
+ zeroPriceDisplay?: 'free' | '0';
1669
1411
  };
1670
1412
  };
1671
1413
 
1672
- /**
1673
- * @description Readiness specifies a time range when the goods will be ready for shipment.
1674
- */
1675
- declare type FulfillmentReadiness = {
1676
- /**
1677
- * @description The earliest timestamp when the goods will be ready for shipment.
1678
- * @type string, date-time
1679
- */
1680
- earliest_time: string;
1681
- /**
1682
- * @description The latest timestamp when the goods will be ready for shipment.\nIf not specified, the goods will be ready indefinitely after start_time.
1683
- * @type string | undefined, date-time
1684
- */
1685
- latest_time?: string;
1686
- };
1687
-
1688
1414
  /**
1689
1415
  * @description The request has succeeded.
1690
1416
  */
@@ -1755,7 +1481,7 @@ declare type GetAddressFormQueryParams = {
1755
1481
  * @pattern ^[A-Z]{2}$
1756
1482
  * @type string
1757
1483
  */
1758
- countryCode: CountryCode;
1484
+ countryCode: CountryCode_2;
1759
1485
  /**
1760
1486
  * @description Site identifier, referring to which site the form configurations are related to.
1761
1487
  * @type string
@@ -1766,9 +1492,28 @@ declare type GetAddressFormQueryParams = {
1766
1492
  * @type string | undefined
1767
1493
  */
1768
1494
  postalCode?: string;
1495
+ /**
1496
+ * @description Selects which address form configuration to return.
1497
+ * @type string | undefined
1498
+ */
1499
+ type?: FormType;
1769
1500
  };
1770
1501
 
1771
- declare type GetDeliverySessionArgs = { sessionId: string } & SDKManagedTokenArg;
1502
+ /**
1503
+ * Arguments for fetching delivery options in the stateless model.
1504
+ *
1505
+ * The cart/fulfillment data lives in the immutable snapshot referenced by
1506
+ * `deliveryCriteria` (created server-to-server via `POST /v1/delivery-criteria`).
1507
+ * Only per-request inputs are passed here.
1508
+ */
1509
+ declare type GetDeliveryOptionsArgs = {
1510
+ /** Opaque reference to the immutable delivery-criteria snapshot. */
1511
+ deliveryCriteria: string;
1512
+ /** Destination address; resolved from the snapshot when omitted. */
1513
+ destination?: DeliveryAddress;
1514
+ /** Personalisation/analytics context, unrelated to the snapshot. */
1515
+ context?: Context;
1516
+ } & SDKManagedTokenArg;
1772
1517
 
1773
1518
  declare type GetTrackingDataArgs =
1774
1519
  | ({ locale: Locale } & SDKManagedTokenArg)
@@ -1796,6 +1541,10 @@ declare type GetTrackingDataResponse = {
1796
1541
  * @type string
1797
1542
  */
1798
1543
  tos_id: string;
1544
+ /**
1545
+ * @type object | undefined
1546
+ */
1547
+ withdrawal?: Withdrawal;
1799
1548
  };
1800
1549
 
1801
1550
  declare type GetTrackingDataResponseOptions = {
@@ -1894,10 +1643,26 @@ export declare interface IngridInitParams {
1894
1643
  token?: string;
1895
1644
  /**
1896
1645
  * Optional callback for short-lived Ingrid API tokens, which are preferred.
1897
- * Call your backend to issue and return a fresh Ingrid API token along with its expiration timestamp
1898
- * expiration timestamp: `{ accessToken, expiresAt }`.
1646
+ * Call your backend to fetch and return a fresh Ingrid API token along with its expiration timestamp: `{ accessToken, expiresAt }`.
1899
1647
  */
1900
1648
  refreshToken?: () => Promise<TokenRefreshResult>;
1649
+ /**
1650
+ * Callback that returns a fresh delivery-context reference (the opaque
1651
+ * `deliveryCriteria` snapshot your backend creates via
1652
+ * `POST /v1/delivery-criteria`). Required for the delivery molecule.
1653
+ *
1654
+ * The SDK calls this to bootstrap the delivery flow and again to transparently
1655
+ * recover when a reference expires or is superseded.
1656
+ *
1657
+ * @example
1658
+ * ```ts
1659
+ * deliveryContextProvider: async () => {
1660
+ * const { deliveryContextReference } = await myBackend.getIngridDeliveryContext();
1661
+ * return deliveryContextReference;
1662
+ * }
1663
+ * ```
1664
+ */
1665
+ deliveryContextProvider?: () => Promise<string>;
1901
1666
  /** Ingrid site identifier. */
1902
1667
  siteId: string;
1903
1668
  /** The locale to use for the experience. */
@@ -1939,6 +1704,13 @@ export declare interface IngridInstance {
1939
1704
  setPurchaseCountry(countryCode: string): void;
1940
1705
  /** Updates the active currency. */
1941
1706
  setCurrency(currency: string): void;
1707
+ /**
1708
+ * Pre-emptively sets the current delivery-context reference (e.g. after the
1709
+ * cart changes and your backend issues a fresh `deliveryCriteria`). The
1710
+ * delivery molecule discards stale options and refetches with the new
1711
+ * reference.
1712
+ */
1713
+ setDeliveryContext(reference: string): void;
1942
1714
  /* Excluded from this release type: __internal */
1943
1715
  }
1944
1716
 
@@ -2018,17 +1790,9 @@ declare type ItemVariant = {
2018
1790
  };
2019
1791
 
2020
1792
  /**
2021
- * @description LabelType defines the type of label.\n\n - LABEL_TYPE_UNKNOWN: Label type is unknown.\n - LABEL_TYPE_SUSTAINABILITY: A sustainability-related label.\n - LABEL_TYPE_PRIORITY: A priority delivery label.\n - LABEL_TYPE_CUSTOM: A custom label defined by the merchant.\n - LABEL_TYPE_SWAN: A Nordic Swan eco-label.
2022
- * @default LABEL_TYPE_UNKNOWN
1793
+ * @description Latitude is in decimal degrees (WGS 84) and ranges from -90 to 90.
2023
1794
  */
2024
- declare type LabelLabelType = LabelLabelTypeEnum;
2025
-
2026
- declare type LabelLabelTypeEnum =
2027
- | 'LABEL_TYPE_UNKNOWN'
2028
- | 'LABEL_TYPE_SUSTAINABILITY'
2029
- | 'LABEL_TYPE_PRIORITY'
2030
- | 'LABEL_TYPE_CUSTOM'
2031
- | 'LABEL_TYPE_SWAN';
1795
+ declare type Latitude = number;
2032
1796
 
2033
1797
  declare type LineItem = {
2034
1798
  /**
@@ -2078,34 +1842,98 @@ declare type LineItem = {
2078
1842
  };
2079
1843
 
2080
1844
  /**
2081
- * @description Represents the dimensions of the item.
1845
+ * Arguments for searching pickup locations for a given location-based product.
1846
+ * Pickup locations are not embedded in the options response; they are fetched
1847
+ * lazily here using the selected service's `product.id`.
2082
1848
  */
2083
- declare type LineItemDimensions = {
1849
+ declare type ListLocationsArgs = {
1850
+ /** Opaque reference to the immutable delivery-criteria snapshot. */
1851
+ deliveryCriteria: string;
1852
+ /** The carrier product to look up locations for (`DeliveryService.product.id`). */
1853
+ productId: string;
1854
+ /** Area to search around; resolved from the snapshot destination when omitted. */
1855
+ address?: Address;
1856
+ /** Optional coordinates to sort results by distance from. */
1857
+ latitude?: number;
1858
+ longitude?: number;
1859
+ /** Max number of locations to return (defaults to 10, capped at 20). */
1860
+ limit?: number;
1861
+ /** Personalisation/analytics context, unrelated to the snapshot. */
1862
+ context?: Context;
1863
+ } & SDKManagedTokenArg;
1864
+
1865
+ /**
1866
+ * @description ListLocationsResponse is the response containing pickup locations\nmatching the request.\n\nThe `for*` fields echo back the resolved request inputs (with snapshot\ndefaults applied) so the caller can see exactly which product, address,\nand reference point produced the listed locations.
1867
+ */
1868
+ declare type ListLocationsResponse = {
2084
1869
  /**
2085
- * @description Height of the item in millimeters, must be greater than 0.
2086
- * @type integer, int32
1870
+ * @description ForProductID is the carrier product the locations are listed for.
1871
+ * @type string
2087
1872
  */
2088
- height: number;
1873
+ forProductId: string;
2089
1874
  /**
2090
- * @description Length of the item in millimeters, must be greater than 0.
2091
- * @type integer, int32
1875
+ * @description ForAddress is the address the locations are listed for, after applying snapshot defaults.
2092
1876
  */
2093
- length: number;
1877
+ forAddress: Address;
2094
1878
  /**
2095
- * @description Width of the item in millimeters, must be greater than 0.
2096
- * @type integer, int32
1879
+ * @description ForLatitude is the latitude used for distance-based sorting, when supplied.
1880
+ */
1881
+ forLatitude?: Latitude;
1882
+ /**
1883
+ * @description ForLongitude is the longitude used for distance-based sorting, when supplied.
1884
+ */
1885
+ forLongitude?: Longitude;
1886
+ /**
1887
+ * @description Locations matching the request, ordered by distance from the\nreference point when one was supplied. May be empty if no\nlocations match.
1888
+ * @type array
2097
1889
  */
2098
- width: number;
1890
+ locations: Location_2[];
2099
1891
  };
2100
1892
 
2101
1893
  declare type Locale = 'en-US' | 'pl-PL' | 'sv-SE';
2102
1894
 
1895
+ /**
1896
+ * @description Location is a pickup point (service point, locker, store, etc.) where\nparcels can be collected.
1897
+ */
2103
1898
  declare type Location_2 = {
1899
+ /**
1900
+ * @description ID is the unique identifier for this location.
1901
+ * @type string
1902
+ */
1903
+ id: string;
1904
+ /**
1905
+ * @description Name is the display name of the location.
1906
+ * @type string
1907
+ */
1908
+ name: string;
1909
+ /**
1910
+ * @description Distance from the reference point (the customer\'s address or\ncoordinates supplied in the request) to this location. Only\npopulated when a reference point was supplied.
1911
+ */
1912
+ distance?: LocationDistance;
1913
+ /**
1914
+ * @description Address is the physical address of the location.
1915
+ */
1916
+ address: Address;
1917
+ /**
1918
+ * @description Coordinates are the geographic coordinates of the location.
1919
+ */
1920
+ coordinates?: Coordinates;
1921
+ /**
1922
+ * @description LocationType is the kind of pickup location.
1923
+ */
1924
+ locationType?: LocationType;
1925
+ /**
1926
+ * @description OperationalHours are the operating hours for each day of the week.
1927
+ */
1928
+ operationalHours?: OperationalHours;
1929
+ };
1930
+
1931
+ declare type Location_3 = {
2104
1932
  /**
2105
1933
  * @description Common address entity that used almost everywhere in Ingrid\'s API.
2106
1934
  * @type object
2107
1935
  */
2108
- address: Address;
1936
+ address: Address_2;
2109
1937
  /**
2110
1938
  * @description location_external_id - external identifier for the location.
2111
1939
  * @type string | undefined
@@ -2119,7 +1947,7 @@ declare type Location_2 = {
2119
1947
  /**
2120
1948
  * @type object | undefined
2121
1949
  */
2122
- operational_hours?: OperationalHours;
1950
+ operational_hours?: OperationalHours_2;
2123
1951
  /**
2124
1952
  * @description pickup_instructions - instructions for the customer to pick up the parcel.
2125
1953
  * @type string | undefined
@@ -2128,41 +1956,30 @@ declare type Location_2 = {
2128
1956
  };
2129
1957
 
2130
1958
  /**
2131
- * @description To reference an existing location.
1959
+ * @description LocationDistance is the distance from a reference point to a location.\nAt least one mode of travel is populated when a reference point is\nsupplied.
2132
1960
  */
2133
- declare type LocationByRef = {
1961
+ declare type LocationDistance = {
2134
1962
  /**
2135
- * @description External identifier provided by the merchant or carrier.
2136
- * @type string
1963
+ * @description Walking distance and estimated duration.
1964
+ */
1965
+ walking?: DistanceDetail;
1966
+ /**
1967
+ * @description Driving distance and estimated duration.
2137
1968
  */
2138
- external_id: string;
1969
+ driving?: DistanceDetail;
2139
1970
  };
2140
1971
 
2141
1972
  /**
2142
- * @description To provide full information about the location.
1973
+ * @description LocationType classifies a pickup location.
2143
1974
  */
2144
- declare type LocationByValue = {
2145
- /**
2146
- * @description External identifier provided by the merchant or carrier.
2147
- * @type string
2148
- */
2149
- external_id: string;
2150
- /**
2151
- * @description Contact represents generic contact information.
2152
- * @type object
2153
- */
2154
- delivery_contact: V1AlphaDeliveryContact;
2155
- /**
2156
- * @description Contact represents generic contact information.
2157
- * @type object | undefined
2158
- */
2159
- visiting_contact?: V1AlphaDeliveryContact;
2160
- /**
2161
- * @description Location name that is displayed to the customer.
2162
- * @type string | undefined
2163
- */
2164
- display_name?: string;
2165
- };
1975
+ declare type LocationType = LocationTypeEnum;
1976
+
1977
+ declare type LocationTypeEnum = 'manned' | 'locker' | 'post_office' | 'store';
1978
+
1979
+ /**
1980
+ * @description Longitude is in decimal degrees (WGS 84) and ranges from -180 to 180.
1981
+ */
1982
+ declare type Longitude = number;
2166
1983
 
2167
1984
  export declare type MethodOverrides<T> = {
2168
1985
  [K in keyof T]?: T[K] extends (...args: any[]) => any ? T[K] | WithDefaultProvider<T[K]> : never;
@@ -2173,8 +1990,9 @@ declare type MoleculeCustomizationConfig<T extends MoleculeType> = MoleculeCusto
2173
1990
  declare type MoleculeCustomizationConfigMap = {
2174
1991
  address: AddressMoleculeCustomization;
2175
1992
  countrySelector: CountrySelectorParams['customization'];
2176
- delivery: DeliveryMoleculeParams['customization'];
1993
+ delivery: DeliveryMoleculeCustomization;
2177
1994
  freeShippingIndicator: FreeShippingIndicatorParams['customization'];
1995
+ postalCode: PostalCodeMoleculeCustomization;
2178
1996
  tracking: TrackingNumberParams['customization'];
2179
1997
  };
2180
1998
 
@@ -2185,6 +2003,7 @@ declare type MoleculeMapType = {
2185
2003
  freeShippingIndicator: {
2186
2004
  readonly validator: typeof freeShippingIndicatorMoleculeParamsValidator;
2187
2005
  };
2006
+ postalCode: { readonly validator: typeof postalCodeMoleculeParamsValidator };
2188
2007
  tracking: { readonly validator: typeof trackingNumberParamsValidator };
2189
2008
  };
2190
2009
 
@@ -2193,6 +2012,7 @@ declare type MoleculeParamsMap = {
2193
2012
  countrySelector: CountrySelectorParams;
2194
2013
  delivery: DeliveryMoleculeParams;
2195
2014
  freeShippingIndicator: FreeShippingIndicatorParams;
2015
+ postalCode: PostalCodeParams;
2196
2016
  tracking: TrackingNumberParams;
2197
2017
  };
2198
2018
 
@@ -2202,7 +2022,46 @@ declare type MoleculesConfig = {
2202
2022
 
2203
2023
  declare type MoleculeType = keyof MoleculeMapType;
2204
2024
 
2025
+ /**
2026
+ * @description OperationalHours are the operating hours for a location, organised by\nday of the week.\n\nEach day field contains a free-form, human-readable representation of\nthe day\'s hours. Common forms:\n\n- A single window: `\"08:00-20:00\"`\n- Multiple windows separated by commas: `\"08:00-12:00, 13:00-18:00\"`\n- Closed: `\"closed\"`\n- Open all day: `\"24h\"` or `\"00:00-24:00\"`\n\nIf structured per-day data is not available from the carrier, populate\n`freeText` instead and leave the per-day fields empty. Times are\nexpressed in the location\'s local timezone.
2027
+ */
2205
2028
  declare type OperationalHours = {
2029
+ /**
2030
+ * @type string | undefined
2031
+ */
2032
+ monday?: string;
2033
+ /**
2034
+ * @type string | undefined
2035
+ */
2036
+ tuesday?: string;
2037
+ /**
2038
+ * @type string | undefined
2039
+ */
2040
+ wednesday?: string;
2041
+ /**
2042
+ * @type string | undefined
2043
+ */
2044
+ thursday?: string;
2045
+ /**
2046
+ * @type string | undefined
2047
+ */
2048
+ friday?: string;
2049
+ /**
2050
+ * @type string | undefined
2051
+ */
2052
+ saturday?: string;
2053
+ /**
2054
+ * @type string | undefined
2055
+ */
2056
+ sunday?: string;
2057
+ /**
2058
+ * @description FreeText holds free-text operational hours when structured data is\nnot available. Used as a fallback when hours cannot be parsed into a\nday-by-day format.
2059
+ * @type array | undefined
2060
+ */
2061
+ freeText?: string[];
2062
+ };
2063
+
2064
+ declare type OperationalHours_2 = {
2206
2065
  /**
2207
2066
  * @type array | undefined
2208
2067
  */
@@ -2395,7 +2254,7 @@ declare type Parcel = {
2395
2254
  * @description - UNKNOWN: Delivery type is not known for some reason\n - DELIVERY: Home delivery\n - PICKUP: Delivery to a service point or a locker\n - MAILBOX: Delivery to customer\'s mailbox\n - INSTORE: Delivery to one of the merchants stores\n - INWAREHOUSE: Delivery to the warehouse. This type is used with chain delivery in warehouse-warehouse-delivery/pickup.
2396
2255
  * @type string | undefined
2397
2256
  */
2398
- delivery_type?: DeliveryType;
2257
+ delivery_type?: DeliveryType_2;
2399
2258
  /**
2400
2259
  * @description Indicates intended direction of parcel, shipment etc.\n\n - OUTBOUND: From merchant to customer.\n - RETURN: Return from customer to merchant.\n - UNSPECIFIED: Unspecified means we do not know the direction. It is the default state when we do not know any better.
2401
2260
  * @type string | undefined
@@ -2425,7 +2284,7 @@ declare type Parcel = {
2425
2284
  /**
2426
2285
  * @type object | undefined
2427
2286
  */
2428
- location?: Location_2;
2287
+ location?: Location_3;
2429
2288
  /**
2430
2289
  * @type array | undefined
2431
2290
  */
@@ -2450,97 +2309,6 @@ declare type Parcel = {
2450
2309
  tracking_number?: string;
2451
2310
  };
2452
2311
 
2453
- /**
2454
- * @description Distances define the walking and driving distances to the pickup location.
2455
- */
2456
- declare type PickupLocationDistances = {
2457
- /**
2458
- * @description Represents a distance measurement with both spatial distance and estimated travel time.
2459
- * @type object | undefined
2460
- */
2461
- walking?: DeliveryDistance;
2462
- /**
2463
- * @description Represents a distance measurement with both spatial distance and estimated travel time.
2464
- * @type object | undefined
2465
- */
2466
- driving?: DeliveryDistance;
2467
- };
2468
-
2469
- /**
2470
- * @description LocationType defines the type of the pickup location.\n\n - LOCATION_TYPE_UNSPECIFIED: Unspecified type.\n - LOCKER: A locker pickup location.\n - STORE: A store pickup location.\n - POSTOFFICE: A post office pickup location.\n - MANNED: A manned pickup location, e.g., staffed desk.
2471
- * @default LOCATION_TYPE_UNSPECIFIED
2472
- */
2473
- declare type PickupLocationLocationType = PickupLocationLocationTypeEnum;
2474
-
2475
- declare type PickupLocationLocationTypeEnum =
2476
- | 'LOCATION_TYPE_UNSPECIFIED'
2477
- | 'LOCKER'
2478
- | 'STORE'
2479
- | 'POSTOFFICE'
2480
- | 'MANNED';
2481
-
2482
- /**
2483
- * @description OperationalHours define when the pickup location is operating.
2484
- */
2485
- declare type PickupLocationOperationalHours = {
2486
- /**
2487
- * @description Opening hours for Monday.
2488
- * @type array | undefined
2489
- */
2490
- monday?: string[];
2491
- /**
2492
- * @description Opening hours for Tuesday.
2493
- * @type array | undefined
2494
- */
2495
- tuesday?: string[];
2496
- /**
2497
- * @description Opening hours for Wednesday.
2498
- * @type array | undefined
2499
- */
2500
- wednesday?: string[];
2501
- /**
2502
- * @description Opening hours for Thursday.
2503
- * @type array | undefined
2504
- */
2505
- thursday?: string[];
2506
- /**
2507
- * @description Opening hours for Friday.
2508
- * @type array | undefined
2509
- */
2510
- friday?: string[];
2511
- /**
2512
- * @description Opening hours for Saturday.
2513
- * @type array | undefined
2514
- */
2515
- saturday?: string[];
2516
- /**
2517
- * @description Opening hours for Sunday.
2518
- * @type array | undefined
2519
- */
2520
- sunday?: string[];
2521
- /**
2522
- * @description Free-text operational hours for fallback.
2523
- * @type array | undefined
2524
- */
2525
- free_text?: string[];
2526
- };
2527
-
2528
- /**
2529
- * @description Section provides extra information about the pickup location.
2530
- */
2531
- declare type PickupLocationSection = {
2532
- /**
2533
- * @description The title of the section displayed to the customer.
2534
- * @type string
2535
- */
2536
- title: string;
2537
- /**
2538
- * @description The columns of items in the section.
2539
- * @type array
2540
- */
2541
- columns: SectionColumn[];
2542
- };
2543
-
2544
2312
  /**
2545
2313
  * @description - UNKNOWN_PICKUP_LOCATION_TYPE: Location type is not known for some reason\n - LOCKER: Locker location type. Example Instabox or a DHL locker\n - STORE: Can be a merchant\'s store or any other store that handles logistics\n - POSTOFFICE: Postal office\n - MANNED: A manned service point\n - AGE_VERIFICATION: Location that supports age verification (age check)
2546
2314
  * @default UNKNOWN_PICKUP_LOCATION_TYPE
@@ -2555,6 +2323,17 @@ declare type PickupLocationTypeEnum =
2555
2323
  | 'MANNED'
2556
2324
  | 'AGE_VERIFICATION';
2557
2325
 
2326
+ /* Excluded from this release type: PostalCodeMoleculeCustomization */
2327
+
2328
+ declare const postalCodeMoleculeParamsValidator = z.object({
2329
+ customization: z.object({}).optional(),
2330
+ }) satisfies z.ZodType<PostalCodeParams>;
2331
+
2332
+ declare type PostalCodeParams = {
2333
+ // No customization flags yet
2334
+ customization?: Record<never, never>;
2335
+ };
2336
+
2558
2337
  /**
2559
2338
  * @description A single address prediction returned by the autocomplete endpoint.
2560
2339
  */
@@ -2603,29 +2382,65 @@ declare type PredictionType = PredictionTypeEnum;
2603
2382
 
2604
2383
  declare type PredictionTypeEnum = 'streetAddress' | 'postalCode' | 'locality' | 'premise' | 'street';
2605
2384
 
2606
- declare type PriceLevelsPriceLevel = {
2385
+ /**
2386
+ * @description Price is a monetary amount in a specific currency, expressed in minor units.
2387
+ */
2388
+ declare type Price = {
2389
+ /**
2390
+ * @description Amount is the price in minor currency units (e.g. öre for SEK, cents\nfor USD). For example, `12500` represents `125.00 SEK` when\n`currency` is `SEK`.
2391
+ * @type integer, int32
2392
+ */
2393
+ amount: number;
2394
+ /**
2395
+ * @description Currency is the ISO 4217 currency code.
2396
+ */
2397
+ currency: Currency;
2398
+ };
2399
+
2400
+ /**
2401
+ * @description PriceComponent is one component of a service\'s total price.\n\n`type` is the categorical kind of the component (machine-readable enum),\nwhile `id` is a stable identifier for this specific component within the\nservice. The same `type` may appear multiple times with different `id`s\n(e.g. two add-ons of type `addon`).
2402
+ */
2403
+ declare type PriceComponent = {
2607
2404
  /**
2608
- * @description Indicates if this price level is active.
2609
- * @type boolean | undefined
2405
+ * @description ID is a stable identifier for this component within the service.\nDistinct from `type` — two components may share a `type` but always\nhave distinct `id`s.
2406
+ * @type string
2610
2407
  */
2611
- active?: boolean;
2408
+ id: string;
2612
2409
  /**
2613
- * @description Indicates if this is the base price.
2614
- * @type boolean | undefined
2410
+ * @description Type is the categorical kind of price component.
2615
2411
  */
2616
- base?: boolean;
2412
+ type: PriceComponentType;
2617
2413
  /**
2618
- * @description The activation price for this level.\nUnit is the smallest currency unit, e.g., cents for USD, yen for JPY.
2619
- * @type string | undefined, int64
2414
+ * @description Amount for this component in minor currency units. Components sum to the parent `ServicePrice.amount`.
2415
+ * @type integer, int32
2620
2416
  */
2621
- activation_price?: string;
2417
+ amount: number;
2622
2418
  /**
2623
- * @description The delivery price for this level.\nUnit is the smallest currency unit, e.g., cents for USD, yen for JPY.
2624
- * @type string | undefined, int64
2419
+ * @description NetAmount is the net amount before tax, in minor currency units.
2420
+ * @type integer | undefined, int32
2421
+ */
2422
+ netAmount?: number;
2423
+ /**
2424
+ * @description TaxRate is the tax rate expressed as a decimal fraction in the range [0, 1].
2425
+ * @minLength 0
2426
+ * @maxLength 1
2427
+ * @type number | undefined, float
2428
+ */
2429
+ taxRate?: number;
2430
+ /**
2431
+ * @description TaxAmount is the tax amount in minor currency units.
2432
+ * @type integer | undefined, int32
2625
2433
  */
2626
- delivery_price?: string;
2434
+ taxAmount?: number;
2627
2435
  };
2628
2436
 
2437
+ /**
2438
+ * @description PriceComponentType classifies a price component.
2439
+ */
2440
+ declare type PriceComponentType = PriceComponentTypeEnum;
2441
+
2442
+ declare type PriceComponentTypeEnum = 'shipping' | 'addon' | 'discount' | 'surcharge';
2443
+
2629
2444
  declare type ProgressItem = {
2630
2445
  /**
2631
2446
  * @description Provides a date interval. Depending on a case, `start` and `end` parts are not guaranteed to be present.
@@ -2754,14 +2569,21 @@ declare type RawTranslationKey =
2754
2569
  | 'delivery.courier_instructions.edit'
2755
2570
  | 'delivery.courier_instructions.remove'
2756
2571
  | 'delivery.courier_instructions.save'
2572
+ | 'delivery.filter_option.delivery'
2573
+ | 'delivery.filter_option.instore'
2574
+ | 'delivery.filter_option.mailbox'
2575
+ | 'delivery.filter_option.pickup'
2757
2576
  | 'delivery.fsi_levels_exhausted'
2758
2577
  | 'delivery.fsi_progress_bar_label'
2759
- | 'delivery.fsi_remaining.DELIVERY'
2760
- | 'delivery.fsi_remaining.DELIVERY_TYPE_UNSPECIFIED'
2761
- | 'delivery.fsi_remaining.INSTORE'
2762
- | 'delivery.fsi_remaining.MAILBOX'
2763
- | 'delivery.fsi_remaining.PICKUP'
2578
+ | 'delivery.fsi_remaining.delivery'
2579
+ | 'delivery.fsi_remaining.instore'
2580
+ | 'delivery.fsi_remaining.mailbox'
2581
+ | 'delivery.fsi_remaining.pickup'
2764
2582
  | 'delivery.hide_details'
2583
+ | 'delivery.location.type.locker'
2584
+ | 'delivery.location.type.manned'
2585
+ | 'delivery.location.type.post_office'
2586
+ | 'delivery.location.type.store'
2765
2587
  | 'delivery.select_carrier'
2766
2588
  | 'delivery.show_details'
2767
2589
  | 'global.add_services'
@@ -2782,8 +2604,9 @@ declare type RawTranslationKey =
2782
2604
  | 'global.loading'
2783
2605
  | 'global.pickup_locations'
2784
2606
  | 'global.postal_code'
2785
- | 'global.save_my_choice'
2786
- | 'global.select_pickup_location'
2607
+ | 'global.save'
2608
+ | 'global.select_delivery_time'
2609
+ | 'global.select_location'
2787
2610
  | 'global.show'
2788
2611
  | 'global.show_available_services'
2789
2612
  | 'global.validation.invalid'
@@ -2835,6 +2658,61 @@ declare type RawTranslationKey =
2835
2658
 
2836
2659
  declare type RecursiveObjectValues<T> = T extends object ? RecursiveObjectValues<T[keyof T]> : T;
2837
2660
 
2661
+ /**
2662
+ * @description RouteLeg is a single leg in a delivery route.
2663
+ */
2664
+ declare type RouteLeg = {
2665
+ /**
2666
+ * @description Sequence is the order of this leg in the route (1-based, unique within a route).
2667
+ * @minLength 1
2668
+ * @type integer, int32
2669
+ */
2670
+ sequence: number;
2671
+ /**
2672
+ * @description ShippingMethod is the carrier-specific shipping method used for this\nleg, in the `<carrier>-<product>` form. Independent from the\ntop-level `DeliveryService.product.id` because a service may chain\nmultiple shipping methods across legs.
2673
+ * @type string
2674
+ */
2675
+ shippingMethod: string;
2676
+ /**
2677
+ * @description DeliveryType is the kind of delivery for this leg.
2678
+ */
2679
+ deliveryType: DeliveryType;
2680
+ /**
2681
+ * @description From is the origin of this leg.
2682
+ */
2683
+ from: RouteLocation;
2684
+ /**
2685
+ * @description To is the destination of this leg.
2686
+ */
2687
+ to: RouteLocation;
2688
+ };
2689
+
2690
+ /**
2691
+ * @description RouteLocation is one endpoint of a route leg.
2692
+ */
2693
+ declare type RouteLocation = {
2694
+ /**
2695
+ * @description Type is the kind of location.
2696
+ */
2697
+ type: RouteLocationType;
2698
+ /**
2699
+ * @description Address of the location. Optional for warehouse/home which are known from context.
2700
+ */
2701
+ address?: Address;
2702
+ /**
2703
+ * @description ExternalID is an external identifier (e.g. service-point ID, store ID).
2704
+ * @type string | undefined
2705
+ */
2706
+ externalId?: string;
2707
+ };
2708
+
2709
+ /**
2710
+ * @description RouteLocationType classifies a location in a delivery route.
2711
+ */
2712
+ declare type RouteLocationType = RouteLocationTypeEnum;
2713
+
2714
+ declare type RouteLocationTypeEnum = 'warehouse' | 'store' | 'home' | 'pickup' | 'hub';
2715
+
2838
2716
  declare interface SDKInternal {
2839
2717
  readonly [_internalBrand]: never;
2840
2718
  }
@@ -2856,40 +2734,95 @@ declare type SearchAddressesResponse = {
2856
2734
  };
2857
2735
 
2858
2736
  /**
2859
- * @description Column contains a list of items displayed in a single section column.
2737
+ * @description ServiceAddon is an add-on service that can be selected with a delivery.
2860
2738
  */
2861
- declare type SectionColumn = {
2739
+ declare type ServiceAddon = {
2862
2740
  /**
2863
- * @description The items within the column.
2864
- * @type array
2741
+ * @description ID is the unique identifier for this add-on.
2742
+ * @type string
2743
+ */
2744
+ id: string;
2745
+ /**
2746
+ * @description Name is the display name of the add-on.
2747
+ * @type string
2748
+ */
2749
+ name: string;
2750
+ /**
2751
+ * @description Description is a description of the add-on.
2752
+ * @type string | undefined
2753
+ */
2754
+ description?: string;
2755
+ /**
2756
+ * @description Price for this add-on.
2757
+ */
2758
+ price?: Price;
2759
+ /**
2760
+ * @description ExternalID is an external identifier for merchant integrations.
2761
+ * @type string | undefined
2762
+ */
2763
+ externalId?: string;
2764
+ /**
2765
+ * @description Type is the kind of add-on.
2766
+ */
2767
+ type?: AddonType;
2768
+ /**
2769
+ * @description Selected indicates whether this add-on is currently selected.
2770
+ * @type boolean | undefined
2865
2771
  */
2866
- items: SectionItem[];
2772
+ selected?: boolean;
2867
2773
  };
2868
2774
 
2869
2775
  /**
2870
- * @description Item represents a single piece of information in a section.
2776
+ * @description ServicePrice is the pricing information for a delivery service.
2871
2777
  */
2872
- declare type SectionItem = {
2778
+ declare type ServicePrice = {
2873
2779
  /**
2874
- * @description The URI for the item\'s icon.
2875
- * @type string | undefined
2780
+ * @description Amount is the total price for this delivery option in minor currency units (e.g. cents/öre).
2781
+ * @type integer, int32
2876
2782
  */
2877
- icon_uri?: string;
2783
+ amount: number;
2878
2784
  /**
2879
- * @description The text description of the item.
2880
- * @type string | undefined
2785
+ * @description Currency is the ISO 4217 currency code.
2786
+ */
2787
+ currency: Currency;
2788
+ /**
2789
+ * @description NetAmount is the net price before tax, in minor currency units. Populated when tax is applicable.
2790
+ * @type integer | undefined, int32
2791
+ */
2792
+ netAmount?: number;
2793
+ /**
2794
+ * @description TaxRate is the tax rate expressed as a decimal fraction in the range\n[0, 1]. For example, `0.25` represents 25% VAT.
2795
+ * @minLength 0
2796
+ * @maxLength 1
2797
+ * @type number | undefined, float
2798
+ */
2799
+ taxRate?: number;
2800
+ /**
2801
+ * @description TaxAmount is the tax amount in minor currency units. Equals `amount - netAmount` when both are populated.
2802
+ * @type integer | undefined, int32
2803
+ */
2804
+ taxAmount?: number;
2805
+ /**
2806
+ * @description Components is the breakdown of the parts that make up `amount`\n(shipping, add-ons, surcharges, discounts). When populated, the\ncomponents sum to `amount`.
2807
+ * @type array | undefined
2881
2808
  */
2882
- text?: string;
2809
+ components?: PriceComponent[];
2883
2810
  /**
2884
- * @description The URI for a link associated with the item.
2811
+ * @description Formatted is a human-readable formatted price for display.
2885
2812
  * @type string | undefined
2886
2813
  */
2887
- link_uri?: string;
2814
+ formatted?: string;
2815
+ /**
2816
+ * @description IsFromPrice indicates whether this is a \"from\" price (the actual price may vary).
2817
+ * @type boolean | undefined
2818
+ */
2819
+ isFromPrice?: boolean;
2888
2820
  };
2889
2821
 
2890
2822
  declare type Services = {
2891
2823
  delivery: {
2892
- getSession: DeliveryService['getSession'];
2824
+ getDeliveryOptions: DeliveryService['getDeliveryOptions'];
2825
+ listLocations: DeliveryService['listLocations'];
2893
2826
  };
2894
2827
  tracking: {
2895
2828
  getTrackingData: TrackingService['getTrackingData'];
@@ -2941,49 +2874,31 @@ export declare type ServicesOverrides = {
2941
2874
  };
2942
2875
 
2943
2876
  /**
2944
- * @description Purchase describes purchase experience.
2877
+ * @description ServiceSupports describes which optional inputs and capabilities a\ndelivery service accepts at order-creation time.\n\nA flag set to `false` (or omitted) means the corresponding input is\nignored if supplied.
2945
2878
  */
2946
- declare type SessionPurchase = {
2947
- /**
2948
- * @description \nThe country code where the delivery will occur (ISO 3166-1 alpha-2).
2949
- * @type string
2950
- */
2951
- country_code: string;
2952
- /**
2953
- * @description The currency code for the transaction (ISO 4217).
2954
- * @type string
2955
- */
2956
- currency_code: string;
2879
+ declare type ServiceSupports = {
2957
2880
  /**
2958
- * @description The total discount applied to the purchase (non-negative, in cents).
2959
- * @type string | undefined, int64
2881
+ * @description Search indicates whether location search is available — i.e. the\ncaller can list alternative pickup locations via\n`POST /v1/delivery/locations` and override the preselected one in\nthe order\'s `selections[].locationId`.
2882
+ * @type boolean | undefined
2960
2883
  */
2961
- total_discount?: string;
2884
+ search?: boolean;
2962
2885
  /**
2963
- * @description The total value of the purchase after discounts are applied (non-negative, in cents).
2964
- * @type string | undefined, int64
2886
+ * @description DoorCode indicates whether a door code can be supplied via `selections[].doorCode`.
2887
+ * @type boolean | undefined
2965
2888
  */
2966
- total_value?: string;
2889
+ doorCode?: boolean;
2967
2890
  /**
2968
- * @description List of vouchers.
2969
- * @type array | undefined
2891
+ * @description CourierInstructions indicates whether free-text courier instructions\ncan be supplied via `selections[].courierInstructions`.
2892
+ * @type boolean | undefined
2970
2893
  */
2971
- vouchers?: string[];
2894
+ courierInstructions?: boolean;
2972
2895
  /**
2973
- * @description Locales list defined as lc-CC compliant with ISO 3166-1, in order of preference(first supported one will be chosen).
2974
- * @type array | undefined
2896
+ * @description CustomerNumber indicates whether a customer number is required or supported by the carrier (e.g. DHL lockers).
2897
+ * @type boolean | undefined
2975
2898
  */
2976
- locales?: string[];
2899
+ customerNumber?: boolean;
2977
2900
  };
2978
2901
 
2979
- /**
2980
- * @description State defines the current state of the session.\n\n - STATE_UNSPECIFIED: Default value. This value is unused.\n - ACTIVE: Session is active and can be modified.\n - COMPLETED: Session is completed and can not be modified.
2981
- * @default STATE_UNSPECIFIED
2982
- */
2983
- declare type SessionState = SessionStateEnum;
2984
-
2985
- declare type SessionStateEnum = 'STATE_UNSPECIFIED' | 'ACTIVE' | 'COMPLETED';
2986
-
2987
2902
  /**
2988
2903
  * @default STEP_UNKNOWN
2989
2904
  */
@@ -3020,6 +2935,41 @@ declare type TextDirectionEnum = 'ltr' | 'rtl';
3020
2935
 
3021
2936
  declare type ThemeCssVariables = `--${RecursiveObjectValues<typeof variableNames>}`;
3022
2937
 
2938
+ /**
2939
+ * @description TimeSlot is a selectable window for a scheduled delivery.
2940
+ */
2941
+ declare type TimeSlot = {
2942
+ /**
2943
+ * @description ID is the unique identifier for this time slot. Use this when selecting a specific delivery window.
2944
+ * @type string
2945
+ */
2946
+ id: string;
2947
+ /**
2948
+ * @description Start is the start of the delivery window.
2949
+ * @type string, date-time
2950
+ */
2951
+ start: string;
2952
+ /**
2953
+ * @description End is the end of the delivery window.
2954
+ * @type string, date-time
2955
+ */
2956
+ end: string;
2957
+ /**
2958
+ * @description Expires is when this time slot expires and is no longer bookable.
2959
+ * @type string | undefined, date-time
2960
+ */
2961
+ expires?: string;
2962
+ /**
2963
+ * @description Formatted is a human-readable formatted time slot for display.
2964
+ * @type string | undefined
2965
+ */
2966
+ formatted?: string;
2967
+ /**
2968
+ * @description AdditionalPrice is an additional price for selecting this time slot (if different from the base price).
2969
+ */
2970
+ additionalPrice?: Price;
2971
+ };
2972
+
3023
2973
  /** Value returned by the SDK `refreshToken` callback. */
3024
2974
  declare type TokenRefreshResult = {
3025
2975
  /** Fresh short-lived Ingrid API token. */
@@ -3070,126 +3020,29 @@ export declare interface UpdatableConfig {
3070
3020
  }
3071
3021
 
3072
3022
  /**
3073
- * @description Represents an address suitable for delivery.
3023
+ * @description User describes the end user the request is being made on behalf of.
3074
3024
  */
3075
- declare type V1AlphaDeliveryAddress = {
3025
+ declare type User = {
3076
3026
  /**
3077
- * @description \nRefers to a ISO-3166 alpha 2 country code.
3027
+ * @description ExternalRef is the merchant\'s reference for this user (e.g. customer ID).
3078
3028
  * @type string
3079
3029
  */
3080
- country_code: string;
3030
+ externalRef: string;
3081
3031
  /**
3082
- * @description Refers to a first-level administrative subdivision code (ISO-3166-2) without the country_code prefix.\nExample: region for Washington, D.C. = `DC` (from `US-DC`).\nException: for some countries (e.g. Mexico, Hong Kong) the subdivision name is used instead.\nExample: region for Hong Kong = `Kowloon`.
3032
+ * @description Name is the full name of the user.
3083
3033
  * @type string | undefined
3084
3034
  */
3085
- region_code?: string;
3086
- /**
3087
- * @description Refers to a postal code or zipcode.
3088
- * @type string | undefined
3089
- */
3090
- postal_code?: string;
3091
- /**
3092
- * @description Refers to a city, postal_town or locality.
3093
- * @type string | undefined
3094
- */
3095
- city?: string;
3096
- /**
3097
- * @description List of strings, each a part of the address, e.g., street name, street number, building name, floor.
3098
- * @type array | undefined
3099
- */
3100
- address_lines?: string[];
3101
- /**
3102
- * @description Represents a latitude/longitude pair.\nUnless specified otherwise, this must conform to the WGS84 standard.\nValues must be within normalized ranges.
3103
- * @type object | undefined
3104
- */
3105
- coordinates?: DeliveryCoordinates;
3106
- };
3107
-
3108
- /**
3109
- * @description Contact represents generic contact information.
3110
- */
3111
- declare type V1AlphaDeliveryContact = {
3112
- /**
3113
- * @description Represents an address suitable for delivery.
3114
- * @type object
3115
- */
3116
- address: V1AlphaDeliveryAddress;
3035
+ name?: string;
3117
3036
  /**
3118
- * @description The email address of the contact.
3037
+ * @description Email is the email address of the user.
3119
3038
  * @type string | undefined
3120
3039
  */
3121
3040
  email?: string;
3122
3041
  /**
3123
- * @description A phone number, including region and optional extension.
3124
- * @type object | undefined
3125
- */
3126
- phone_number?: ContactPhoneNumber;
3127
- /**
3128
- * @description The given name of the recipient.\nUses AIP-148 terminology; prefer given_name over first_name as the given name\nis not placed first in many cultures.\nIf the integrator cannot differentiate between given and family name,\nthe entire name may be supplied in this field.
3129
- * @type string | undefined
3130
- */
3131
- given_name?: string;
3132
- /**
3133
- * @description The family name of the recipient.\nUses AIP-148 terminology; prefer family_name over last_name as the family name\nis not placed last in many cultures.
3134
- * @type string | undefined
3135
- */
3136
- family_name?: string;
3137
- /**
3138
- * @description The company name of the recipient.
3042
+ * @description Phone is the phone number of the user, including country code (E.164 format recommended).
3139
3043
  * @type string | undefined
3140
3044
  */
3141
- company_name?: string;
3142
- };
3143
-
3144
- /**
3145
- * @description The delivery represents a single delivery of goods to a recipient.\nIt includes information about the goods, the recipient details, the fulfillment methods and the delivery options.
3146
- */
3147
- declare type V1AlphaDeliveryDelivery = {
3148
- /**
3149
- * @description The unique identifier of a delivery.
3150
- * @type string
3151
- */
3152
- id: string;
3153
- /**
3154
- * @description The goods that are to be delivered.
3155
- * @type array
3156
- */
3157
- line_items: DeliveryLineItem[];
3158
- /**
3159
- * @description The available fulfillments for the delivery.\nIn the future this will be deprecated in favour of `nodes`.
3160
- * @type array
3161
- */
3162
- fulfillments: DeliveryFulfillment[];
3163
- /**
3164
- * @description Contact represents generic contact information.
3165
- * @type object
3166
- */
3167
- recipient_contact: V1AlphaDeliveryContact;
3168
- /**
3169
- * @description Used to control the behaviour of the filter/price rules.\nEquivalent of cart_attributes in the `Delivery Checkout` API.
3170
- * @type array | undefined
3171
- */
3172
- attributes?: string[];
3173
- /**
3174
- * @description The available delivery categories for this delivery.
3175
- * @type array | undefined
3176
- */
3177
- readonly delivery_categories?: DeliveryDeliveryCategory[];
3178
- /**
3179
- * @description ID of the TOS, only present for the session `complete` and `get` calls.
3180
- * @type string | undefined
3181
- */
3182
- readonly tos_id?: string;
3183
- /**
3184
- * @description ID assigned by the merchant to a specific delivery.\nOnly present for the session `complete` and `get` calls.\nUsed as external ID of the TOS.
3185
- * @type string | undefined
3186
- */
3187
- readonly external_id?: string;
3188
- /**
3189
- * @description List of nodes that take part in the delivery.
3190
- * @type array | undefined
3191
- */
3192
- nodes?: DeliveryDeliveryNode[];
3045
+ phone?: string;
3193
3046
  };
3194
3047
 
3195
3048
  /**
@@ -3227,7 +3080,7 @@ declare type ValidateAddressRequest = {
3227
3080
  /**
3228
3081
  * @description The address to validate against postal reference data.
3229
3082
  */
3230
- address: Address_2;
3083
+ address: Address_3;
3231
3084
  };
3232
3085
 
3233
3086
  /**
@@ -3256,7 +3109,7 @@ declare type ValidationResult = {
3256
3109
  /**
3257
3110
  * @description The standardized, corrected address.\nPresent if `status` is `valid` or `suspect`. Absent if `invalid`.
3258
3111
  */
3259
- candidate?: Address_2;
3112
+ candidate?: Address_3;
3260
3113
  /**
3261
3114
  * @description Metadata about the quality of the match.
3262
3115
  */
@@ -3557,4 +3410,91 @@ declare type WithDefaultProvider<T extends (...args: any[]) => any> = {
3557
3410
  */
3558
3411
  export declare const withDefaultProvider: <T extends (...args: any[]) => any>(factory: (defaultFn: T) => T) => WithDefaultProvider<T>;
3559
3412
 
3413
+ declare type Withdrawal = {
3414
+ /**
3415
+ * @type string | undefined
3416
+ */
3417
+ acknowledged_at?: string;
3418
+ /**
3419
+ * @type string | undefined
3420
+ */
3421
+ available_until?: string;
3422
+ /**
3423
+ * @type integer | undefined, int32
3424
+ */
3425
+ days_remaining?: number;
3426
+ /**
3427
+ * @type object | undefined
3428
+ */
3429
+ declared_by?: WithdrawalContact;
3430
+ /**
3431
+ * @type array | undefined
3432
+ */
3433
+ items?: WithdrawalItem[];
3434
+ /**
3435
+ * @type string | undefined
3436
+ */
3437
+ state?: WithdrawalState;
3438
+ /**
3439
+ * @type string | undefined
3440
+ */
3441
+ withdrawal_form_url?: string;
3442
+ };
3443
+
3444
+ declare type WithdrawalContact = {
3445
+ /**
3446
+ * @type string | undefined
3447
+ */
3448
+ email?: string;
3449
+ /**
3450
+ * @type string | undefined
3451
+ */
3452
+ full_name?: string;
3453
+ };
3454
+
3455
+ declare type WithdrawalItem = {
3456
+ /**
3457
+ * @description Discount for a given item in cents. Example `20000` represents `200.00`.
3458
+ * @type integer | undefined, int32
3459
+ */
3460
+ discount?: number;
3461
+ /**
3462
+ * @description Image is an URL of the image of the given cart item.
3463
+ * @type string | undefined
3464
+ */
3465
+ image?: string;
3466
+ /**
3467
+ * @description Name is a product name or title.
3468
+ * @type string | undefined
3469
+ */
3470
+ name?: string;
3471
+ /**
3472
+ * @description Price of the single item with applied discounts in cents. Example `20000` represents `200.00`.
3473
+ * @type integer | undefined, int32
3474
+ */
3475
+ price?: number;
3476
+ /**
3477
+ * @description Quantity is a total number of a given product item in the cart.
3478
+ * @type integer | undefined, int32
3479
+ */
3480
+ quantity?: number;
3481
+ /**
3482
+ * @type string | undefined
3483
+ */
3484
+ sku?: string;
3485
+ };
3486
+
3487
+ /**
3488
+ * @default STATE_UNSPECIFIED
3489
+ */
3490
+ declare type WithdrawalState = WithdrawalStateEnum;
3491
+
3492
+ declare type WithdrawalStateEnum =
3493
+ | 'STATE_UNSPECIFIED'
3494
+ | 'STATE_AVAILABLE'
3495
+ | 'STATE_ALREADY_ACKNOWLEDGED'
3496
+ | 'STATE_NOT_DELIVERED_YET'
3497
+ | 'STATE_WITHDRAWAL_WINDOW_EXPIRED'
3498
+ | 'STATE_COUNTRY_NOT_ELIGIBLE';
3499
+
3560
3500
  export { }