@ingridab/sdk 0.2.0 → 0.3.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/README.md +5 -3
- package/dist/LICENSES.md +1 -35
- package/dist/index.d.ts +962 -1055
- package/dist/index.js +574 -4137
- package/dist/internal.d.ts +42 -0
- package/package.json +8 -8
package/dist/index.d.ts
CHANGED
|
@@ -1,22 +1,82 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @description
|
|
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
|
|
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
|
|
10
|
-
| '
|
|
11
|
-
| '
|
|
12
|
-
| '
|
|
13
|
-
| '
|
|
14
|
-
| '
|
|
24
|
+
declare type AddonTypeEnum =
|
|
25
|
+
| 'insurance'
|
|
26
|
+
| 'signature'
|
|
27
|
+
| 'age_verification'
|
|
28
|
+
| 'id_verification'
|
|
29
|
+
| 'notification'
|
|
30
|
+
| 'other';
|
|
15
31
|
|
|
16
32
|
/**
|
|
17
|
-
* @description
|
|
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?:
|
|
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
|
|
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?:
|
|
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?:
|
|
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:
|
|
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:
|
|
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
|
|
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
|
|
695
|
+
declare type CarrierProduct = {
|
|
608
696
|
/**
|
|
609
|
-
* @description
|
|
697
|
+
* @description ID is the unique identifier for the product.
|
|
610
698
|
* @type string
|
|
611
699
|
*/
|
|
612
|
-
|
|
700
|
+
id: string;
|
|
613
701
|
/**
|
|
614
|
-
* @description
|
|
702
|
+
* @description Name is the display name of the product.
|
|
615
703
|
* @type string
|
|
616
704
|
*/
|
|
617
|
-
|
|
705
|
+
name: string;
|
|
618
706
|
/**
|
|
619
|
-
* @description
|
|
707
|
+
* @description Description is a description of the product.
|
|
620
708
|
* @type string | undefined
|
|
621
709
|
*/
|
|
622
|
-
|
|
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
|
/**
|
|
@@ -745,733 +880,346 @@ DeepPartial<U>[]
|
|
|
745
880
|
: T;
|
|
746
881
|
|
|
747
882
|
/**
|
|
748
|
-
* @description
|
|
883
|
+
* @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
884
|
*/
|
|
750
|
-
declare type
|
|
885
|
+
declare type DeliveryAddress = {
|
|
751
886
|
/**
|
|
752
|
-
* @description
|
|
753
|
-
* @type string
|
|
887
|
+
* @description CountryCode is the ISO 3166-1 alpha-2 country code.
|
|
754
888
|
*/
|
|
755
|
-
|
|
889
|
+
countryCode: CountryCode;
|
|
756
890
|
/**
|
|
757
|
-
* @description
|
|
758
|
-
* @type string
|
|
891
|
+
* @description PostalCode is the postal code. Formatting and validation rules are\nconditional on the country code.
|
|
892
|
+
* @type string
|
|
759
893
|
*/
|
|
760
|
-
|
|
894
|
+
postalCode: string;
|
|
761
895
|
/**
|
|
762
|
-
* @description
|
|
896
|
+
* @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
897
|
* @type string | undefined
|
|
764
898
|
*/
|
|
765
|
-
|
|
899
|
+
administrativeArea?: string;
|
|
766
900
|
/**
|
|
767
|
-
* @description
|
|
768
|
-
* @type
|
|
901
|
+
* @description SubAdministrativeArea is the second-level administrative subdivision\n(county, district, etc.). Typically not required unless the country\nreference says otherwise.
|
|
902
|
+
* @type string | undefined
|
|
769
903
|
*/
|
|
770
|
-
|
|
904
|
+
subAdministrativeArea?: string;
|
|
771
905
|
/**
|
|
772
|
-
* @description
|
|
773
|
-
* @type
|
|
906
|
+
* @description Locality is the primary locality of the address — usually the city,\ntown, village, or municipality.
|
|
907
|
+
* @type string | undefined
|
|
774
908
|
*/
|
|
775
|
-
|
|
909
|
+
locality?: string;
|
|
776
910
|
/**
|
|
777
|
-
* @description
|
|
911
|
+
* @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
912
|
* @type string | undefined
|
|
779
913
|
*/
|
|
780
|
-
|
|
914
|
+
subLocality?: string;
|
|
915
|
+
/**
|
|
916
|
+
* @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).
|
|
917
|
+
* @type array | undefined
|
|
918
|
+
*/
|
|
919
|
+
addressLines?: string[];
|
|
920
|
+
/**
|
|
921
|
+
* @description Type is the kind of address (residential, commercial, etc.).
|
|
922
|
+
*/
|
|
923
|
+
type?: AddressType;
|
|
781
924
|
/**
|
|
782
|
-
* @description
|
|
925
|
+
* @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
926
|
* @type string | undefined
|
|
784
927
|
*/
|
|
785
|
-
|
|
928
|
+
instructions?: string;
|
|
786
929
|
/**
|
|
787
|
-
* @description
|
|
930
|
+
* @description RecipientName is the name of the recipient, formatted as expected in the destination country.
|
|
788
931
|
* @type string | undefined
|
|
789
932
|
*/
|
|
790
|
-
|
|
933
|
+
recipientName?: string;
|
|
791
934
|
};
|
|
792
935
|
|
|
793
936
|
/**
|
|
794
|
-
* @description
|
|
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
|
|
937
|
+
* @description DeliveryCategory groups services by delivery type and provides display\nmetadata to organise the UI.
|
|
809
938
|
*/
|
|
810
|
-
declare type
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
939
|
+
declare type DeliveryCategory = {
|
|
940
|
+
/**
|
|
941
|
+
* @description ID is the unique identifier for this category.
|
|
942
|
+
* @type string
|
|
943
|
+
*/
|
|
944
|
+
id: string;
|
|
945
|
+
/**
|
|
946
|
+
* @description Name is the display name for this category.
|
|
947
|
+
* @type string
|
|
948
|
+
*/
|
|
949
|
+
name: string;
|
|
950
|
+
/**
|
|
951
|
+
* @description DeliveryType is the kind of delivery for all services in this category.
|
|
952
|
+
*/
|
|
953
|
+
deliveryType: DeliveryType;
|
|
954
|
+
/**
|
|
955
|
+
* @description Services are the available delivery services in this category.
|
|
956
|
+
* @type array
|
|
957
|
+
*/
|
|
958
|
+
services: DeliveryService_2[];
|
|
818
959
|
/**
|
|
819
|
-
* @description
|
|
960
|
+
* @description Preselected indicates whether this category should be pre-selected\nby default. At most one category per delivery group is preselected.
|
|
961
|
+
* @type boolean | undefined
|
|
962
|
+
*/
|
|
963
|
+
preselected?: boolean;
|
|
964
|
+
/**
|
|
965
|
+
* @description SortOrder is the sort order for displaying this category (lower numbers first).
|
|
966
|
+
* @type integer | undefined, int32
|
|
967
|
+
*/
|
|
968
|
+
sortOrder?: number;
|
|
969
|
+
/**
|
|
970
|
+
* @description CustomText is custom text to display alongside this category.
|
|
971
|
+
* @type string | undefined
|
|
972
|
+
*/
|
|
973
|
+
customText?: string;
|
|
974
|
+
/**
|
|
975
|
+
* @description WarningText is warning text to display for this category (e.g. delivery delays).
|
|
976
|
+
* @type string | undefined
|
|
977
|
+
*/
|
|
978
|
+
warningText?: string;
|
|
979
|
+
/**
|
|
980
|
+
* @description Tags are additional categorisation/filtering tags.
|
|
820
981
|
* @type array | undefined
|
|
821
982
|
*/
|
|
822
|
-
|
|
983
|
+
tags?: string[];
|
|
984
|
+
/**
|
|
985
|
+
* @description ExternalID is an external identifier for merchant-specific integrations.
|
|
986
|
+
* @type string | undefined
|
|
987
|
+
*/
|
|
988
|
+
externalId?: string;
|
|
823
989
|
};
|
|
824
990
|
|
|
825
991
|
/**
|
|
826
|
-
* @description
|
|
992
|
+
* @description DeliveryGroup holds the delivery options for a single shipment. In\nsplit-shipment scenarios the response carries multiple groups.
|
|
827
993
|
*/
|
|
828
|
-
declare type
|
|
994
|
+
declare type DeliveryGroup = {
|
|
829
995
|
/**
|
|
830
|
-
* @description
|
|
996
|
+
* @description ID is the unique identifier for this delivery group. Used to\ncorrelate with fulfillment groups in the request.
|
|
831
997
|
* @type string
|
|
832
998
|
*/
|
|
833
999
|
id: string;
|
|
834
1000
|
/**
|
|
835
|
-
* @description
|
|
836
|
-
* @type
|
|
1001
|
+
* @description Categories are the available delivery categories for this group.\nCategories organise services by delivery type (home delivery,\npickup, etc.).
|
|
1002
|
+
* @type array
|
|
837
1003
|
*/
|
|
838
|
-
|
|
1004
|
+
categories: DeliveryCategory[];
|
|
839
1005
|
/**
|
|
840
|
-
* @description
|
|
1006
|
+
* @description FulfillmentGroupRef references the fulfillment group in the request that this delivery group corresponds to.
|
|
841
1007
|
* @type string | undefined
|
|
842
1008
|
*/
|
|
843
|
-
|
|
1009
|
+
fulfillmentGroupRef?: string;
|
|
1010
|
+
};
|
|
1011
|
+
|
|
1012
|
+
declare type DeliveryMoleculeParams = {
|
|
1013
|
+
mode: 'active' | 'passive';
|
|
1014
|
+
name: string;
|
|
1015
|
+
customization?: {
|
|
1016
|
+
choice?: {
|
|
1017
|
+
carrierInstructions?: 'off' | 'inline' | 'popup';
|
|
1018
|
+
gaplessAddonsList?: boolean;
|
|
1019
|
+
gaplessCarrierList?: boolean;
|
|
1020
|
+
gaplessDeliveryList?: boolean;
|
|
1021
|
+
labels?: 'off' | 'chips' | 'text';
|
|
1022
|
+
showAddons?: boolean;
|
|
1023
|
+
showCustomInfoText?: boolean;
|
|
1024
|
+
showCustomText?: boolean;
|
|
1025
|
+
showDiscountedPrice?: boolean;
|
|
1026
|
+
zeroPriceDisplay?: 'free' | '0';
|
|
1027
|
+
showFreeShippingIndicator?: boolean;
|
|
1028
|
+
showPrice?: boolean;
|
|
1029
|
+
showRadioIndicator?: boolean;
|
|
1030
|
+
showReturnPromise?: boolean;
|
|
1031
|
+
showShippingLogo?: boolean;
|
|
1032
|
+
showDeliveryTime?: boolean;
|
|
1033
|
+
showLocationSection?: boolean;
|
|
1034
|
+
showLocationAddress?: boolean;
|
|
1035
|
+
showLocationCarrierName?: boolean;
|
|
1036
|
+
showLocationType?: boolean;
|
|
1037
|
+
categoryLabel?: 'name' | 'type';
|
|
1038
|
+
};
|
|
1039
|
+
location?: {
|
|
1040
|
+
gaplessList?: boolean;
|
|
1041
|
+
mapDefaultVisible?: boolean;
|
|
1042
|
+
mapDefaultZoom?: number;
|
|
1043
|
+
mapFitboundsMaxZoom?: number;
|
|
1044
|
+
mapPosition?: 'start' | 'end';
|
|
1045
|
+
mapToggleEnabled?: boolean;
|
|
1046
|
+
zeroPriceDisplay?: 'free' | '0';
|
|
1047
|
+
displayMode?: 'popup' | 'inline';
|
|
1048
|
+
selectionControl?: 'radio' | 'disabled';
|
|
1049
|
+
selectionAlignment?: 'left' | 'right';
|
|
1050
|
+
showLocationAddress?: boolean;
|
|
1051
|
+
showCarrierName?: boolean;
|
|
1052
|
+
showLocationType?: boolean;
|
|
1053
|
+
showOpeningHours?: boolean;
|
|
1054
|
+
showPrice?: boolean;
|
|
1055
|
+
};
|
|
1056
|
+
productList?: {
|
|
1057
|
+
defaultView?: 'off' | 'list' | 'summary';
|
|
1058
|
+
showImage?: boolean;
|
|
1059
|
+
showMetadata?: boolean;
|
|
1060
|
+
showPrice?: boolean;
|
|
1061
|
+
showQuantity?: boolean;
|
|
1062
|
+
summaryText?: 'none' | 'products' | 'firstProductAndMore';
|
|
1063
|
+
zeroPriceDisplay?: 'free' | '0';
|
|
1064
|
+
};
|
|
1065
|
+
summary?: {
|
|
1066
|
+
previewAddons?: boolean;
|
|
1067
|
+
showFreeShippingIndicator?: boolean;
|
|
1068
|
+
showDiscountedPrice?: boolean;
|
|
1069
|
+
zeroPriceDisplay?: 'free' | '0';
|
|
1070
|
+
categoryLabel?: 'name' | 'type';
|
|
1071
|
+
};
|
|
1072
|
+
};
|
|
844
1073
|
};
|
|
845
1074
|
|
|
1075
|
+
declare const deliveryMoleculeParamsValidator = z.object({
|
|
1076
|
+
customization: deliveryCustomizationValidator,
|
|
1077
|
+
mode: z.enum(['active', 'passive']),
|
|
1078
|
+
name: z.string(),
|
|
1079
|
+
}) satisfies z.ZodType<DeliveryMoleculeParams>;
|
|
1080
|
+
|
|
846
1081
|
/**
|
|
847
|
-
* @description
|
|
1082
|
+
* @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
1083
|
*/
|
|
849
|
-
declare type
|
|
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;
|
|
1084
|
+
declare type DeliveryOptionsResponse = {
|
|
855
1085
|
/**
|
|
856
|
-
* @description
|
|
857
|
-
* @type
|
|
1086
|
+
* @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.
|
|
1087
|
+
* @type array
|
|
858
1088
|
*/
|
|
859
|
-
|
|
1089
|
+
groups: DeliveryGroup[];
|
|
860
1090
|
};
|
|
861
1091
|
|
|
862
1092
|
/**
|
|
863
|
-
* @description
|
|
1093
|
+
* @description DeliveryRoute is the journey from origin to destination for a delivery.\nComplex deliveries may include multiple legs.
|
|
864
1094
|
*/
|
|
865
|
-
declare type
|
|
1095
|
+
declare type DeliveryRoute = {
|
|
866
1096
|
/**
|
|
867
|
-
* @description
|
|
1097
|
+
* @description ID is the unique identifier for this route.
|
|
868
1098
|
* @type string
|
|
869
1099
|
*/
|
|
870
1100
|
id: string;
|
|
871
1101
|
/**
|
|
872
|
-
* @description
|
|
873
|
-
* @type
|
|
1102
|
+
* @description Legs are the individual steps of the delivery journey.
|
|
1103
|
+
* @type array
|
|
874
1104
|
*/
|
|
875
|
-
|
|
1105
|
+
legs: RouteLeg[];
|
|
1106
|
+
};
|
|
1107
|
+
|
|
1108
|
+
declare type DeliveryService = {
|
|
1109
|
+
getDeliveryOptions: DataResolver<GetDeliveryOptionsArgs, DeliveryOptionsResponse>;
|
|
1110
|
+
listLocations: DataResolver<ListLocationsArgs, ListLocationsResponse>;
|
|
1111
|
+
};
|
|
1112
|
+
|
|
1113
|
+
/**
|
|
1114
|
+
* @description DeliveryService is a specific, selectable shipping option.
|
|
1115
|
+
*/
|
|
1116
|
+
declare type DeliveryService_2 = {
|
|
876
1117
|
/**
|
|
877
|
-
* @description
|
|
878
|
-
* @type string
|
|
1118
|
+
* @description Carrier provides this delivery service.
|
|
879
1119
|
*/
|
|
880
|
-
|
|
1120
|
+
carrier: Carrier;
|
|
881
1121
|
/**
|
|
882
|
-
* @description
|
|
883
|
-
* @type string
|
|
1122
|
+
* @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
1123
|
*/
|
|
885
|
-
|
|
1124
|
+
product: CarrierProduct;
|
|
886
1125
|
/**
|
|
887
|
-
* @description
|
|
888
|
-
* @type integer | undefined, int32
|
|
1126
|
+
* @description DeliveryTime is when the delivery is expected to arrive.
|
|
889
1127
|
*/
|
|
890
|
-
|
|
1128
|
+
deliveryTime: DeliveryTime;
|
|
891
1129
|
/**
|
|
892
|
-
* @description
|
|
893
|
-
* @type string
|
|
1130
|
+
* @description Price is the price for this delivery option.
|
|
894
1131
|
*/
|
|
895
|
-
|
|
1132
|
+
price: ServicePrice;
|
|
896
1133
|
/**
|
|
897
|
-
* @description
|
|
898
|
-
* @type array
|
|
1134
|
+
* @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
1135
|
*/
|
|
900
|
-
|
|
1136
|
+
location?: Location_2;
|
|
901
1137
|
/**
|
|
902
|
-
* @description
|
|
1138
|
+
* @description TimeSlots are the available time slots for scheduled delivery (if applicable).
|
|
903
1139
|
* @type array | undefined
|
|
904
1140
|
*/
|
|
905
|
-
|
|
1141
|
+
timeSlots?: TimeSlot[];
|
|
906
1142
|
/**
|
|
907
|
-
* @description
|
|
908
|
-
* @type
|
|
1143
|
+
* @description Routes describe the delivery journey from origin to destination.
|
|
1144
|
+
* @type array | undefined
|
|
909
1145
|
*/
|
|
910
|
-
|
|
1146
|
+
routes?: DeliveryRoute[];
|
|
911
1147
|
/**
|
|
912
|
-
* @description
|
|
913
|
-
* @type boolean | undefined
|
|
1148
|
+
* @description Supports lists features supported by this service.
|
|
914
1149
|
*/
|
|
915
|
-
|
|
1150
|
+
supports?: ServiceSupports;
|
|
916
1151
|
/**
|
|
917
|
-
* @description
|
|
918
|
-
* @type
|
|
1152
|
+
* @description AvailableAddons are the add-ons that can be selected with this service.
|
|
1153
|
+
* @type array | undefined
|
|
919
1154
|
*/
|
|
920
|
-
|
|
1155
|
+
availableAddons?: ServiceAddon[];
|
|
921
1156
|
/**
|
|
922
|
-
* @description
|
|
1157
|
+
* @description DefaultAddons are the add-ons included by default with this service.
|
|
923
1158
|
* @type array | undefined
|
|
924
1159
|
*/
|
|
925
|
-
|
|
1160
|
+
defaultAddons?: ServiceAddon[];
|
|
926
1161
|
/**
|
|
927
|
-
* @description
|
|
928
|
-
* @type
|
|
1162
|
+
* @description Meta carries carrier-specific metadata.
|
|
1163
|
+
* @type object | undefined
|
|
929
1164
|
*/
|
|
930
|
-
|
|
1165
|
+
meta?: object;
|
|
931
1166
|
/**
|
|
932
|
-
* @description
|
|
1167
|
+
* @description ExternalMethodID is an external method identifier for merchant integrations.
|
|
933
1168
|
* @type string | undefined
|
|
934
1169
|
*/
|
|
935
|
-
|
|
1170
|
+
externalMethodId?: string;
|
|
936
1171
|
/**
|
|
937
|
-
* @description
|
|
938
|
-
* @type
|
|
1172
|
+
* @description Preselected indicates whether this service is pre-selected within\nits category. At most one service per category is preselected.
|
|
1173
|
+
* @type boolean | undefined
|
|
939
1174
|
*/
|
|
940
|
-
|
|
1175
|
+
preselected?: boolean;
|
|
941
1176
|
/**
|
|
942
|
-
* @
|
|
1177
|
+
* @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.
|
|
1178
|
+
* @type string
|
|
943
1179
|
*/
|
|
944
|
-
|
|
1180
|
+
token: string;
|
|
945
1181
|
};
|
|
946
1182
|
|
|
947
1183
|
/**
|
|
948
|
-
* @description
|
|
1184
|
+
* @description DeliveryTime is the window in which a delivery is expected to occur.
|
|
949
1185
|
*/
|
|
950
|
-
declare type
|
|
1186
|
+
declare type DeliveryTime = {
|
|
951
1187
|
/**
|
|
952
|
-
* @description
|
|
953
|
-
* @type string
|
|
1188
|
+
* @description Earliest expected delivery date/time. When the time component is\n00:00:00, only the date is promised.
|
|
1189
|
+
* @type string, date-time
|
|
954
1190
|
*/
|
|
955
|
-
|
|
1191
|
+
earliest: string;
|
|
956
1192
|
/**
|
|
957
|
-
* @description
|
|
958
|
-
* @type string
|
|
1193
|
+
* @description Latest expected delivery date/time. When the time component is\n00:00:00, only the date is promised.
|
|
1194
|
+
* @type string, date-time
|
|
959
1195
|
*/
|
|
960
|
-
|
|
1196
|
+
latest: string;
|
|
961
1197
|
/**
|
|
962
|
-
* @description
|
|
963
|
-
* @type string | undefined
|
|
1198
|
+
* @description Expires is when this delivery time estimate expires and may need to be refreshed.
|
|
1199
|
+
* @type string | undefined, date-time
|
|
964
1200
|
*/
|
|
965
|
-
|
|
1201
|
+
expires?: string;
|
|
966
1202
|
/**
|
|
967
|
-
* @description
|
|
1203
|
+
* @description Formatted is a human-readable formatted delivery time for display,\npre-formatted according to locale and merchant preferences.
|
|
968
1204
|
* @type string | undefined
|
|
969
1205
|
*/
|
|
970
|
-
|
|
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.
|
|
1453
|
-
* @type string | undefined, date-time
|
|
1454
|
-
*/
|
|
1455
|
-
readonly update_time?: string;
|
|
1456
|
-
/**
|
|
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.
|
|
1458
|
-
* @type string | undefined
|
|
1459
|
-
*/
|
|
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;
|
|
1206
|
+
formatted?: string;
|
|
1466
1207
|
};
|
|
1467
1208
|
|
|
1209
|
+
/**
|
|
1210
|
+
* @description DeliveryType is the kind of delivery a service performs.
|
|
1211
|
+
*/
|
|
1212
|
+
declare type DeliveryType = DeliveryTypeEnum;
|
|
1213
|
+
|
|
1468
1214
|
/**
|
|
1469
1215
|
* @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
1216
|
* @default UNKNOWN
|
|
1471
1217
|
*/
|
|
1472
|
-
declare type
|
|
1218
|
+
declare type DeliveryType_2 = DeliveryTypeEnum_2;
|
|
1219
|
+
|
|
1220
|
+
declare type DeliveryTypeEnum = 'delivery' | 'pickup' | 'mailbox' | 'instore';
|
|
1473
1221
|
|
|
1474
|
-
declare type
|
|
1222
|
+
declare type DeliveryTypeEnum_2 =
|
|
1475
1223
|
| 'UNKNOWN'
|
|
1476
1224
|
| 'DELIVERY'
|
|
1477
1225
|
| 'PICKUP'
|
|
@@ -1519,103 +1267,70 @@ declare type DisplayItem = {
|
|
|
1519
1267
|
total_price?: number;
|
|
1520
1268
|
};
|
|
1521
1269
|
|
|
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
1270
|
/**
|
|
1536
|
-
* @description
|
|
1271
|
+
* @description DistanceDetail is a detailed distance measurement with optional\ntravel-time estimate.
|
|
1537
1272
|
*/
|
|
1538
|
-
declare type
|
|
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;
|
|
1273
|
+
declare type DistanceDetail = {
|
|
1544
1274
|
/**
|
|
1545
|
-
* @description
|
|
1546
|
-
* @type
|
|
1275
|
+
* @description Meters is the distance value in meters.
|
|
1276
|
+
* @type integer, int32
|
|
1547
1277
|
*/
|
|
1548
|
-
|
|
1549
|
-
};
|
|
1550
|
-
|
|
1551
|
-
/**
|
|
1552
|
-
* @description Custom represents an ETD in a human-readable text format.
|
|
1553
|
-
*/
|
|
1554
|
-
declare type ETDCustom = {
|
|
1278
|
+
meters: number;
|
|
1555
1279
|
/**
|
|
1556
|
-
* @description
|
|
1557
|
-
* @type
|
|
1280
|
+
* @description DurationMinutes is the estimated travel duration in minutes.
|
|
1281
|
+
* @type integer | undefined, int32
|
|
1558
1282
|
*/
|
|
1559
|
-
|
|
1283
|
+
durationMinutes?: number;
|
|
1560
1284
|
};
|
|
1561
1285
|
|
|
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;
|
|
1286
|
+
declare type EstimatedTime = {
|
|
1571
1287
|
/**
|
|
1572
|
-
* @description
|
|
1573
|
-
* @type
|
|
1288
|
+
* @description Earliest date in RFC3339 format.
|
|
1289
|
+
* @type string | undefined
|
|
1574
1290
|
*/
|
|
1575
|
-
earliest?:
|
|
1291
|
+
earliest?: string;
|
|
1576
1292
|
/**
|
|
1577
|
-
* @description
|
|
1578
|
-
* @type
|
|
1293
|
+
* @description Latest date in RFC3339 format.
|
|
1294
|
+
* @type string | undefined
|
|
1579
1295
|
*/
|
|
1580
|
-
latest?:
|
|
1296
|
+
latest?: string;
|
|
1581
1297
|
};
|
|
1582
1298
|
|
|
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
1299
|
declare type Event_2<T> = { payload: T };
|
|
1599
1300
|
|
|
1600
1301
|
/**
|
|
1601
1302
|
* Map of all events emitted by the Ingrid compound.
|
|
1602
1303
|
*
|
|
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
|
|
1304
|
+
* | Event | When it fires |
|
|
1305
|
+
* | ----------------- | --------------------------------------------------------------------- |
|
|
1306
|
+
* | `ready` | Compound is mounted and interactive |
|
|
1307
|
+
* | `addressSubmit` | Shopper confirms the address form |
|
|
1308
|
+
* | `countryChange` | Shopper selects a different country |
|
|
1309
|
+
* | `selectionChange` | Shopper selects a delivery option |
|
|
1310
|
+
* | `error` | An unhandled error occurs during mount or is caught by the compound's error boundary at runtime |
|
|
1610
1311
|
*
|
|
1611
|
-
* @remarks
|
|
1312
|
+
* @remarks
|
|
1313
|
+
* The `error` event fires in two situations:
|
|
1314
|
+
* - **Mount failure** — an error thrown while loading or initialising the compound.
|
|
1315
|
+
* - **Runtime boundary** — an unhandled React error caught by the compound's top-level
|
|
1316
|
+
* error boundary. In this case the compound renders a generic fallback UI and remains
|
|
1317
|
+
* alive; the integrator can use this event to log or react to the failure.
|
|
1318
|
+
*
|
|
1319
|
+
* Event names and payload shapes may evolve before the stable release.
|
|
1612
1320
|
*
|
|
1613
1321
|
* @public
|
|
1614
1322
|
*/
|
|
1615
1323
|
export declare type EventsMap = {
|
|
1616
1324
|
countryChange: (event: Event_2<{ country_code: string }>) => void;
|
|
1617
1325
|
addressSubmit: (event: Event_2<Partial<AddressContactEntry>>) => void;
|
|
1618
|
-
|
|
1326
|
+
/**
|
|
1327
|
+
* Fires when the shopper selects a delivery option. `groupId`/`categoryId`
|
|
1328
|
+
* identify the choice within the options response; `serviceToken` is the
|
|
1329
|
+
* signed offer token to hand to the orchestrator for backend order creation.
|
|
1330
|
+
*/
|
|
1331
|
+
selectionChange: (
|
|
1332
|
+
event: Event_2<{ groupId: string; categoryId: string; serviceToken: string }>
|
|
1333
|
+
) => void;
|
|
1619
1334
|
ready: () => void;
|
|
1620
1335
|
error: (error: unknown) => void;
|
|
1621
1336
|
};
|
|
@@ -1639,7 +1354,7 @@ declare type FormMeta = {
|
|
|
1639
1354
|
/**
|
|
1640
1355
|
* @description ISO 3166-1 alpha-2 country code for this form configuration.
|
|
1641
1356
|
*/
|
|
1642
|
-
countryCode:
|
|
1357
|
+
countryCode: CountryCode_2;
|
|
1643
1358
|
/**
|
|
1644
1359
|
* @description Text direction. `rtl` (Right-to-Left) is critical for\nlanguages like Arabic or Hebrew.
|
|
1645
1360
|
*/
|
|
@@ -1651,12 +1366,20 @@ declare type FormMeta = {
|
|
|
1651
1366
|
language: string;
|
|
1652
1367
|
};
|
|
1653
1368
|
|
|
1369
|
+
/**
|
|
1370
|
+
* @description Selects which address form configuration to return.
|
|
1371
|
+
*/
|
|
1372
|
+
declare type FormType = FormTypeEnum;
|
|
1373
|
+
|
|
1374
|
+
declare type FormTypeEnum = 'delivery' | 'billing';
|
|
1375
|
+
|
|
1654
1376
|
declare const freeShippingIndicatorMoleculeParamsValidator = z.object({
|
|
1655
1377
|
name: z.string(),
|
|
1656
1378
|
deliveryId: z.string().optional(),
|
|
1657
1379
|
customization: z
|
|
1658
1380
|
.object({
|
|
1659
1381
|
showExhaustedLevelsMessage: z.boolean().optional(),
|
|
1382
|
+
zeroPriceDisplay: z.enum(['free', '0']).optional(),
|
|
1660
1383
|
})
|
|
1661
1384
|
.optional(),
|
|
1662
1385
|
}) satisfies z.ZodType<FreeShippingIndicatorParams>;
|
|
@@ -1666,25 +1389,10 @@ declare type FreeShippingIndicatorParams = {
|
|
|
1666
1389
|
deliveryId?: string;
|
|
1667
1390
|
customization?: {
|
|
1668
1391
|
showExhaustedLevelsMessage?: boolean;
|
|
1392
|
+
zeroPriceDisplay?: 'free' | '0';
|
|
1669
1393
|
};
|
|
1670
1394
|
};
|
|
1671
1395
|
|
|
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
1396
|
/**
|
|
1689
1397
|
* @description The request has succeeded.
|
|
1690
1398
|
*/
|
|
@@ -1755,7 +1463,7 @@ declare type GetAddressFormQueryParams = {
|
|
|
1755
1463
|
* @pattern ^[A-Z]{2}$
|
|
1756
1464
|
* @type string
|
|
1757
1465
|
*/
|
|
1758
|
-
countryCode:
|
|
1466
|
+
countryCode: CountryCode_2;
|
|
1759
1467
|
/**
|
|
1760
1468
|
* @description Site identifier, referring to which site the form configurations are related to.
|
|
1761
1469
|
* @type string
|
|
@@ -1766,9 +1474,28 @@ declare type GetAddressFormQueryParams = {
|
|
|
1766
1474
|
* @type string | undefined
|
|
1767
1475
|
*/
|
|
1768
1476
|
postalCode?: string;
|
|
1477
|
+
/**
|
|
1478
|
+
* @description Selects which address form configuration to return.
|
|
1479
|
+
* @type string | undefined
|
|
1480
|
+
*/
|
|
1481
|
+
type?: FormType;
|
|
1769
1482
|
};
|
|
1770
1483
|
|
|
1771
|
-
|
|
1484
|
+
/**
|
|
1485
|
+
* Arguments for fetching delivery options in the stateless model.
|
|
1486
|
+
*
|
|
1487
|
+
* The cart/fulfillment data lives in the immutable snapshot referenced by
|
|
1488
|
+
* `deliveryCriteria` (created server-to-server via `POST /v1/delivery-criteria`).
|
|
1489
|
+
* Only per-request inputs are passed here.
|
|
1490
|
+
*/
|
|
1491
|
+
declare type GetDeliveryOptionsArgs = {
|
|
1492
|
+
/** Opaque reference to the immutable delivery-criteria snapshot. */
|
|
1493
|
+
deliveryCriteria: string;
|
|
1494
|
+
/** Destination address; resolved from the snapshot when omitted. */
|
|
1495
|
+
destination?: DeliveryAddress;
|
|
1496
|
+
/** Personalisation/analytics context, unrelated to the snapshot. */
|
|
1497
|
+
context?: Context;
|
|
1498
|
+
} & SDKManagedTokenArg;
|
|
1772
1499
|
|
|
1773
1500
|
declare type GetTrackingDataArgs =
|
|
1774
1501
|
| ({ locale: Locale } & SDKManagedTokenArg)
|
|
@@ -1796,6 +1523,10 @@ declare type GetTrackingDataResponse = {
|
|
|
1796
1523
|
* @type string
|
|
1797
1524
|
*/
|
|
1798
1525
|
tos_id: string;
|
|
1526
|
+
/**
|
|
1527
|
+
* @type object | undefined
|
|
1528
|
+
*/
|
|
1529
|
+
withdrawal?: Withdrawal;
|
|
1799
1530
|
};
|
|
1800
1531
|
|
|
1801
1532
|
declare type GetTrackingDataResponseOptions = {
|
|
@@ -1894,10 +1625,26 @@ export declare interface IngridInitParams {
|
|
|
1894
1625
|
token?: string;
|
|
1895
1626
|
/**
|
|
1896
1627
|
* Optional callback for short-lived Ingrid API tokens, which are preferred.
|
|
1897
|
-
* Call your backend to
|
|
1898
|
-
* expiration timestamp: `{ accessToken, expiresAt }`.
|
|
1628
|
+
* Call your backend to fetch and return a fresh Ingrid API token along with its expiration timestamp: `{ accessToken, expiresAt }`.
|
|
1899
1629
|
*/
|
|
1900
1630
|
refreshToken?: () => Promise<TokenRefreshResult>;
|
|
1631
|
+
/**
|
|
1632
|
+
* Callback that returns a fresh delivery-context reference (the opaque
|
|
1633
|
+
* `deliveryCriteria` snapshot your backend creates via
|
|
1634
|
+
* `POST /v1/delivery-criteria`). Required for the delivery molecule.
|
|
1635
|
+
*
|
|
1636
|
+
* The SDK calls this to bootstrap the delivery flow and again to transparently
|
|
1637
|
+
* recover when a reference expires or is superseded.
|
|
1638
|
+
*
|
|
1639
|
+
* @example
|
|
1640
|
+
* ```ts
|
|
1641
|
+
* deliveryContextProvider: async () => {
|
|
1642
|
+
* const { deliveryContextReference } = await myBackend.getIngridDeliveryContext();
|
|
1643
|
+
* return deliveryContextReference;
|
|
1644
|
+
* }
|
|
1645
|
+
* ```
|
|
1646
|
+
*/
|
|
1647
|
+
deliveryContextProvider?: () => Promise<string>;
|
|
1901
1648
|
/** Ingrid site identifier. */
|
|
1902
1649
|
siteId: string;
|
|
1903
1650
|
/** The locale to use for the experience. */
|
|
@@ -1939,6 +1686,13 @@ export declare interface IngridInstance {
|
|
|
1939
1686
|
setPurchaseCountry(countryCode: string): void;
|
|
1940
1687
|
/** Updates the active currency. */
|
|
1941
1688
|
setCurrency(currency: string): void;
|
|
1689
|
+
/**
|
|
1690
|
+
* Pre-emptively sets the current delivery-context reference (e.g. after the
|
|
1691
|
+
* cart changes and your backend issues a fresh `deliveryCriteria`). The
|
|
1692
|
+
* delivery molecule discards stale options and refetches with the new
|
|
1693
|
+
* reference.
|
|
1694
|
+
*/
|
|
1695
|
+
setDeliveryContext(reference: string): void;
|
|
1942
1696
|
/* Excluded from this release type: __internal */
|
|
1943
1697
|
}
|
|
1944
1698
|
|
|
@@ -2018,17 +1772,9 @@ declare type ItemVariant = {
|
|
|
2018
1772
|
};
|
|
2019
1773
|
|
|
2020
1774
|
/**
|
|
2021
|
-
* @description
|
|
2022
|
-
* @default LABEL_TYPE_UNKNOWN
|
|
1775
|
+
* @description Latitude is in decimal degrees (WGS 84) and ranges from -90 to 90.
|
|
2023
1776
|
*/
|
|
2024
|
-
declare type
|
|
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';
|
|
1777
|
+
declare type Latitude = number;
|
|
2032
1778
|
|
|
2033
1779
|
declare type LineItem = {
|
|
2034
1780
|
/**
|
|
@@ -2078,34 +1824,98 @@ declare type LineItem = {
|
|
|
2078
1824
|
};
|
|
2079
1825
|
|
|
2080
1826
|
/**
|
|
2081
|
-
*
|
|
1827
|
+
* Arguments for searching pickup locations for a given location-based product.
|
|
1828
|
+
* Pickup locations are not embedded in the options response; they are fetched
|
|
1829
|
+
* lazily here using the selected service's `product.id`.
|
|
1830
|
+
*/
|
|
1831
|
+
declare type ListLocationsArgs = {
|
|
1832
|
+
/** Opaque reference to the immutable delivery-criteria snapshot. */
|
|
1833
|
+
deliveryCriteria: string;
|
|
1834
|
+
/** The carrier product to look up locations for (`DeliveryService.product.id`). */
|
|
1835
|
+
productId: string;
|
|
1836
|
+
/** Area to search around; resolved from the snapshot destination when omitted. */
|
|
1837
|
+
address?: Address;
|
|
1838
|
+
/** Optional coordinates to sort results by distance from. */
|
|
1839
|
+
latitude?: number;
|
|
1840
|
+
longitude?: number;
|
|
1841
|
+
/** Max number of locations to return (defaults to 10, capped at 20). */
|
|
1842
|
+
limit?: number;
|
|
1843
|
+
/** Personalisation/analytics context, unrelated to the snapshot. */
|
|
1844
|
+
context?: Context;
|
|
1845
|
+
} & SDKManagedTokenArg;
|
|
1846
|
+
|
|
1847
|
+
/**
|
|
1848
|
+
* @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.
|
|
2082
1849
|
*/
|
|
2083
|
-
declare type
|
|
1850
|
+
declare type ListLocationsResponse = {
|
|
2084
1851
|
/**
|
|
2085
|
-
* @description
|
|
2086
|
-
* @type
|
|
1852
|
+
* @description ForProductID is the carrier product the locations are listed for.
|
|
1853
|
+
* @type string
|
|
2087
1854
|
*/
|
|
2088
|
-
|
|
1855
|
+
forProductId: string;
|
|
2089
1856
|
/**
|
|
2090
|
-
* @description
|
|
2091
|
-
* @type integer, int32
|
|
1857
|
+
* @description ForAddress is the address the locations are listed for, after applying snapshot defaults.
|
|
2092
1858
|
*/
|
|
2093
|
-
|
|
1859
|
+
forAddress: Address;
|
|
2094
1860
|
/**
|
|
2095
|
-
* @description
|
|
2096
|
-
|
|
1861
|
+
* @description ForLatitude is the latitude used for distance-based sorting, when supplied.
|
|
1862
|
+
*/
|
|
1863
|
+
forLatitude?: Latitude;
|
|
1864
|
+
/**
|
|
1865
|
+
* @description ForLongitude is the longitude used for distance-based sorting, when supplied.
|
|
1866
|
+
*/
|
|
1867
|
+
forLongitude?: Longitude;
|
|
1868
|
+
/**
|
|
1869
|
+
* @description Locations matching the request, ordered by distance from the\nreference point when one was supplied. May be empty if no\nlocations match.
|
|
1870
|
+
* @type array
|
|
2097
1871
|
*/
|
|
2098
|
-
|
|
1872
|
+
locations: Location_2[];
|
|
2099
1873
|
};
|
|
2100
1874
|
|
|
2101
1875
|
declare type Locale = 'en-US' | 'pl-PL' | 'sv-SE';
|
|
2102
1876
|
|
|
1877
|
+
/**
|
|
1878
|
+
* @description Location is a pickup point (service point, locker, store, etc.) where\nparcels can be collected.
|
|
1879
|
+
*/
|
|
2103
1880
|
declare type Location_2 = {
|
|
1881
|
+
/**
|
|
1882
|
+
* @description ID is the unique identifier for this location.
|
|
1883
|
+
* @type string
|
|
1884
|
+
*/
|
|
1885
|
+
id: string;
|
|
1886
|
+
/**
|
|
1887
|
+
* @description Name is the display name of the location.
|
|
1888
|
+
* @type string
|
|
1889
|
+
*/
|
|
1890
|
+
name: string;
|
|
1891
|
+
/**
|
|
1892
|
+
* @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.
|
|
1893
|
+
*/
|
|
1894
|
+
distance?: LocationDistance;
|
|
1895
|
+
/**
|
|
1896
|
+
* @description Address is the physical address of the location.
|
|
1897
|
+
*/
|
|
1898
|
+
address: Address;
|
|
1899
|
+
/**
|
|
1900
|
+
* @description Coordinates are the geographic coordinates of the location.
|
|
1901
|
+
*/
|
|
1902
|
+
coordinates?: Coordinates;
|
|
1903
|
+
/**
|
|
1904
|
+
* @description LocationType is the kind of pickup location.
|
|
1905
|
+
*/
|
|
1906
|
+
locationType?: LocationType;
|
|
1907
|
+
/**
|
|
1908
|
+
* @description OperationalHours are the operating hours for each day of the week.
|
|
1909
|
+
*/
|
|
1910
|
+
operationalHours?: OperationalHours;
|
|
1911
|
+
};
|
|
1912
|
+
|
|
1913
|
+
declare type Location_3 = {
|
|
2104
1914
|
/**
|
|
2105
1915
|
* @description Common address entity that used almost everywhere in Ingrid\'s API.
|
|
2106
1916
|
* @type object
|
|
2107
1917
|
*/
|
|
2108
|
-
address:
|
|
1918
|
+
address: Address_2;
|
|
2109
1919
|
/**
|
|
2110
1920
|
* @description location_external_id - external identifier for the location.
|
|
2111
1921
|
* @type string | undefined
|
|
@@ -2119,7 +1929,7 @@ declare type Location_2 = {
|
|
|
2119
1929
|
/**
|
|
2120
1930
|
* @type object | undefined
|
|
2121
1931
|
*/
|
|
2122
|
-
operational_hours?:
|
|
1932
|
+
operational_hours?: OperationalHours_2;
|
|
2123
1933
|
/**
|
|
2124
1934
|
* @description pickup_instructions - instructions for the customer to pick up the parcel.
|
|
2125
1935
|
* @type string | undefined
|
|
@@ -2128,41 +1938,30 @@ declare type Location_2 = {
|
|
|
2128
1938
|
};
|
|
2129
1939
|
|
|
2130
1940
|
/**
|
|
2131
|
-
* @description
|
|
1941
|
+
* @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
1942
|
*/
|
|
2133
|
-
declare type
|
|
1943
|
+
declare type LocationDistance = {
|
|
2134
1944
|
/**
|
|
2135
|
-
* @description
|
|
2136
|
-
|
|
1945
|
+
* @description Walking distance and estimated duration.
|
|
1946
|
+
*/
|
|
1947
|
+
walking?: DistanceDetail;
|
|
1948
|
+
/**
|
|
1949
|
+
* @description Driving distance and estimated duration.
|
|
2137
1950
|
*/
|
|
2138
|
-
|
|
1951
|
+
driving?: DistanceDetail;
|
|
2139
1952
|
};
|
|
2140
1953
|
|
|
2141
1954
|
/**
|
|
2142
|
-
* @description
|
|
1955
|
+
* @description LocationType classifies a pickup location.
|
|
2143
1956
|
*/
|
|
2144
|
-
declare type
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
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
|
-
};
|
|
1957
|
+
declare type LocationType = LocationTypeEnum;
|
|
1958
|
+
|
|
1959
|
+
declare type LocationTypeEnum = 'manned' | 'locker' | 'post_office' | 'store';
|
|
1960
|
+
|
|
1961
|
+
/**
|
|
1962
|
+
* @description Longitude is in decimal degrees (WGS 84) and ranges from -180 to 180.
|
|
1963
|
+
*/
|
|
1964
|
+
declare type Longitude = number;
|
|
2166
1965
|
|
|
2167
1966
|
export declare type MethodOverrides<T> = {
|
|
2168
1967
|
[K in keyof T]?: T[K] extends (...args: any[]) => any ? T[K] | WithDefaultProvider<T[K]> : never;
|
|
@@ -2202,7 +2001,46 @@ declare type MoleculesConfig = {
|
|
|
2202
2001
|
|
|
2203
2002
|
declare type MoleculeType = keyof MoleculeMapType;
|
|
2204
2003
|
|
|
2004
|
+
/**
|
|
2005
|
+
* @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.
|
|
2006
|
+
*/
|
|
2205
2007
|
declare type OperationalHours = {
|
|
2008
|
+
/**
|
|
2009
|
+
* @type string | undefined
|
|
2010
|
+
*/
|
|
2011
|
+
monday?: string;
|
|
2012
|
+
/**
|
|
2013
|
+
* @type string | undefined
|
|
2014
|
+
*/
|
|
2015
|
+
tuesday?: string;
|
|
2016
|
+
/**
|
|
2017
|
+
* @type string | undefined
|
|
2018
|
+
*/
|
|
2019
|
+
wednesday?: string;
|
|
2020
|
+
/**
|
|
2021
|
+
* @type string | undefined
|
|
2022
|
+
*/
|
|
2023
|
+
thursday?: string;
|
|
2024
|
+
/**
|
|
2025
|
+
* @type string | undefined
|
|
2026
|
+
*/
|
|
2027
|
+
friday?: string;
|
|
2028
|
+
/**
|
|
2029
|
+
* @type string | undefined
|
|
2030
|
+
*/
|
|
2031
|
+
saturday?: string;
|
|
2032
|
+
/**
|
|
2033
|
+
* @type string | undefined
|
|
2034
|
+
*/
|
|
2035
|
+
sunday?: string;
|
|
2036
|
+
/**
|
|
2037
|
+
* @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.
|
|
2038
|
+
* @type array | undefined
|
|
2039
|
+
*/
|
|
2040
|
+
freeText?: string[];
|
|
2041
|
+
};
|
|
2042
|
+
|
|
2043
|
+
declare type OperationalHours_2 = {
|
|
2206
2044
|
/**
|
|
2207
2045
|
* @type array | undefined
|
|
2208
2046
|
*/
|
|
@@ -2395,7 +2233,7 @@ declare type Parcel = {
|
|
|
2395
2233
|
* @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
2234
|
* @type string | undefined
|
|
2397
2235
|
*/
|
|
2398
|
-
delivery_type?:
|
|
2236
|
+
delivery_type?: DeliveryType_2;
|
|
2399
2237
|
/**
|
|
2400
2238
|
* @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
2239
|
* @type string | undefined
|
|
@@ -2425,7 +2263,7 @@ declare type Parcel = {
|
|
|
2425
2263
|
/**
|
|
2426
2264
|
* @type object | undefined
|
|
2427
2265
|
*/
|
|
2428
|
-
location?:
|
|
2266
|
+
location?: Location_3;
|
|
2429
2267
|
/**
|
|
2430
2268
|
* @type array | undefined
|
|
2431
2269
|
*/
|
|
@@ -2450,97 +2288,6 @@ declare type Parcel = {
|
|
|
2450
2288
|
tracking_number?: string;
|
|
2451
2289
|
};
|
|
2452
2290
|
|
|
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
2291
|
/**
|
|
2545
2292
|
* @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
2293
|
* @default UNKNOWN_PICKUP_LOCATION_TYPE
|
|
@@ -2603,29 +2350,65 @@ declare type PredictionType = PredictionTypeEnum;
|
|
|
2603
2350
|
|
|
2604
2351
|
declare type PredictionTypeEnum = 'streetAddress' | 'postalCode' | 'locality' | 'premise' | 'street';
|
|
2605
2352
|
|
|
2606
|
-
|
|
2353
|
+
/**
|
|
2354
|
+
* @description Price is a monetary amount in a specific currency, expressed in minor units.
|
|
2355
|
+
*/
|
|
2356
|
+
declare type Price = {
|
|
2357
|
+
/**
|
|
2358
|
+
* @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`.
|
|
2359
|
+
* @type integer, int32
|
|
2360
|
+
*/
|
|
2361
|
+
amount: number;
|
|
2362
|
+
/**
|
|
2363
|
+
* @description Currency is the ISO 4217 currency code.
|
|
2364
|
+
*/
|
|
2365
|
+
currency: Currency;
|
|
2366
|
+
};
|
|
2367
|
+
|
|
2368
|
+
/**
|
|
2369
|
+
* @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`).
|
|
2370
|
+
*/
|
|
2371
|
+
declare type PriceComponent = {
|
|
2607
2372
|
/**
|
|
2608
|
-
* @description
|
|
2609
|
-
* @type
|
|
2373
|
+
* @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.
|
|
2374
|
+
* @type string
|
|
2610
2375
|
*/
|
|
2611
|
-
|
|
2376
|
+
id: string;
|
|
2612
2377
|
/**
|
|
2613
|
-
* @description
|
|
2614
|
-
* @type boolean | undefined
|
|
2378
|
+
* @description Type is the categorical kind of price component.
|
|
2615
2379
|
*/
|
|
2616
|
-
|
|
2380
|
+
type: PriceComponentType;
|
|
2617
2381
|
/**
|
|
2618
|
-
* @description
|
|
2619
|
-
* @type
|
|
2382
|
+
* @description Amount for this component in minor currency units. Components sum to the parent `ServicePrice.amount`.
|
|
2383
|
+
* @type integer, int32
|
|
2620
2384
|
*/
|
|
2621
|
-
|
|
2385
|
+
amount: number;
|
|
2622
2386
|
/**
|
|
2623
|
-
* @description
|
|
2624
|
-
* @type
|
|
2387
|
+
* @description NetAmount is the net amount before tax, in minor currency units.
|
|
2388
|
+
* @type integer | undefined, int32
|
|
2389
|
+
*/
|
|
2390
|
+
netAmount?: number;
|
|
2391
|
+
/**
|
|
2392
|
+
* @description TaxRate is the tax rate expressed as a decimal fraction in the range [0, 1].
|
|
2393
|
+
* @minLength 0
|
|
2394
|
+
* @maxLength 1
|
|
2395
|
+
* @type number | undefined, float
|
|
2396
|
+
*/
|
|
2397
|
+
taxRate?: number;
|
|
2398
|
+
/**
|
|
2399
|
+
* @description TaxAmount is the tax amount in minor currency units.
|
|
2400
|
+
* @type integer | undefined, int32
|
|
2625
2401
|
*/
|
|
2626
|
-
|
|
2402
|
+
taxAmount?: number;
|
|
2627
2403
|
};
|
|
2628
2404
|
|
|
2405
|
+
/**
|
|
2406
|
+
* @description PriceComponentType classifies a price component.
|
|
2407
|
+
*/
|
|
2408
|
+
declare type PriceComponentType = PriceComponentTypeEnum;
|
|
2409
|
+
|
|
2410
|
+
declare type PriceComponentTypeEnum = 'shipping' | 'addon' | 'discount' | 'surcharge';
|
|
2411
|
+
|
|
2629
2412
|
declare type ProgressItem = {
|
|
2630
2413
|
/**
|
|
2631
2414
|
* @description Provides a date interval. Depending on a case, `start` and `end` parts are not guaranteed to be present.
|
|
@@ -2754,14 +2537,21 @@ declare type RawTranslationKey =
|
|
|
2754
2537
|
| 'delivery.courier_instructions.edit'
|
|
2755
2538
|
| 'delivery.courier_instructions.remove'
|
|
2756
2539
|
| 'delivery.courier_instructions.save'
|
|
2540
|
+
| 'delivery.filter_option.delivery'
|
|
2541
|
+
| 'delivery.filter_option.instore'
|
|
2542
|
+
| 'delivery.filter_option.mailbox'
|
|
2543
|
+
| 'delivery.filter_option.pickup'
|
|
2757
2544
|
| 'delivery.fsi_levels_exhausted'
|
|
2758
2545
|
| 'delivery.fsi_progress_bar_label'
|
|
2759
|
-
| 'delivery.fsi_remaining.
|
|
2760
|
-
| 'delivery.fsi_remaining.
|
|
2761
|
-
| 'delivery.fsi_remaining.
|
|
2762
|
-
| 'delivery.fsi_remaining.
|
|
2763
|
-
| 'delivery.fsi_remaining.PICKUP'
|
|
2546
|
+
| 'delivery.fsi_remaining.delivery'
|
|
2547
|
+
| 'delivery.fsi_remaining.instore'
|
|
2548
|
+
| 'delivery.fsi_remaining.mailbox'
|
|
2549
|
+
| 'delivery.fsi_remaining.pickup'
|
|
2764
2550
|
| 'delivery.hide_details'
|
|
2551
|
+
| 'delivery.location.type.locker'
|
|
2552
|
+
| 'delivery.location.type.manned'
|
|
2553
|
+
| 'delivery.location.type.post_office'
|
|
2554
|
+
| 'delivery.location.type.store'
|
|
2765
2555
|
| 'delivery.select_carrier'
|
|
2766
2556
|
| 'delivery.show_details'
|
|
2767
2557
|
| 'global.add_services'
|
|
@@ -2782,8 +2572,8 @@ declare type RawTranslationKey =
|
|
|
2782
2572
|
| 'global.loading'
|
|
2783
2573
|
| 'global.pickup_locations'
|
|
2784
2574
|
| 'global.postal_code'
|
|
2785
|
-
| 'global.
|
|
2786
|
-
| 'global.
|
|
2575
|
+
| 'global.save'
|
|
2576
|
+
| 'global.select_location'
|
|
2787
2577
|
| 'global.show'
|
|
2788
2578
|
| 'global.show_available_services'
|
|
2789
2579
|
| 'global.validation.invalid'
|
|
@@ -2835,6 +2625,61 @@ declare type RawTranslationKey =
|
|
|
2835
2625
|
|
|
2836
2626
|
declare type RecursiveObjectValues<T> = T extends object ? RecursiveObjectValues<T[keyof T]> : T;
|
|
2837
2627
|
|
|
2628
|
+
/**
|
|
2629
|
+
* @description RouteLeg is a single leg in a delivery route.
|
|
2630
|
+
*/
|
|
2631
|
+
declare type RouteLeg = {
|
|
2632
|
+
/**
|
|
2633
|
+
* @description Sequence is the order of this leg in the route (1-based, unique within a route).
|
|
2634
|
+
* @minLength 1
|
|
2635
|
+
* @type integer, int32
|
|
2636
|
+
*/
|
|
2637
|
+
sequence: number;
|
|
2638
|
+
/**
|
|
2639
|
+
* @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.
|
|
2640
|
+
* @type string
|
|
2641
|
+
*/
|
|
2642
|
+
shippingMethod: string;
|
|
2643
|
+
/**
|
|
2644
|
+
* @description DeliveryType is the kind of delivery for this leg.
|
|
2645
|
+
*/
|
|
2646
|
+
deliveryType: DeliveryType;
|
|
2647
|
+
/**
|
|
2648
|
+
* @description From is the origin of this leg.
|
|
2649
|
+
*/
|
|
2650
|
+
from: RouteLocation;
|
|
2651
|
+
/**
|
|
2652
|
+
* @description To is the destination of this leg.
|
|
2653
|
+
*/
|
|
2654
|
+
to: RouteLocation;
|
|
2655
|
+
};
|
|
2656
|
+
|
|
2657
|
+
/**
|
|
2658
|
+
* @description RouteLocation is one endpoint of a route leg.
|
|
2659
|
+
*/
|
|
2660
|
+
declare type RouteLocation = {
|
|
2661
|
+
/**
|
|
2662
|
+
* @description Type is the kind of location.
|
|
2663
|
+
*/
|
|
2664
|
+
type: RouteLocationType;
|
|
2665
|
+
/**
|
|
2666
|
+
* @description Address of the location. Optional for warehouse/home which are known from context.
|
|
2667
|
+
*/
|
|
2668
|
+
address?: Address;
|
|
2669
|
+
/**
|
|
2670
|
+
* @description ExternalID is an external identifier (e.g. service-point ID, store ID).
|
|
2671
|
+
* @type string | undefined
|
|
2672
|
+
*/
|
|
2673
|
+
externalId?: string;
|
|
2674
|
+
};
|
|
2675
|
+
|
|
2676
|
+
/**
|
|
2677
|
+
* @description RouteLocationType classifies a location in a delivery route.
|
|
2678
|
+
*/
|
|
2679
|
+
declare type RouteLocationType = RouteLocationTypeEnum;
|
|
2680
|
+
|
|
2681
|
+
declare type RouteLocationTypeEnum = 'warehouse' | 'store' | 'home' | 'pickup' | 'hub';
|
|
2682
|
+
|
|
2838
2683
|
declare interface SDKInternal {
|
|
2839
2684
|
readonly [_internalBrand]: never;
|
|
2840
2685
|
}
|
|
@@ -2856,40 +2701,95 @@ declare type SearchAddressesResponse = {
|
|
|
2856
2701
|
};
|
|
2857
2702
|
|
|
2858
2703
|
/**
|
|
2859
|
-
* @description
|
|
2704
|
+
* @description ServiceAddon is an add-on service that can be selected with a delivery.
|
|
2860
2705
|
*/
|
|
2861
|
-
declare type
|
|
2706
|
+
declare type ServiceAddon = {
|
|
2862
2707
|
/**
|
|
2863
|
-
* @description
|
|
2864
|
-
* @type
|
|
2708
|
+
* @description ID is the unique identifier for this add-on.
|
|
2709
|
+
* @type string
|
|
2710
|
+
*/
|
|
2711
|
+
id: string;
|
|
2712
|
+
/**
|
|
2713
|
+
* @description Name is the display name of the add-on.
|
|
2714
|
+
* @type string
|
|
2715
|
+
*/
|
|
2716
|
+
name: string;
|
|
2717
|
+
/**
|
|
2718
|
+
* @description Description is a description of the add-on.
|
|
2719
|
+
* @type string | undefined
|
|
2720
|
+
*/
|
|
2721
|
+
description?: string;
|
|
2722
|
+
/**
|
|
2723
|
+
* @description Price for this add-on.
|
|
2724
|
+
*/
|
|
2725
|
+
price?: Price;
|
|
2726
|
+
/**
|
|
2727
|
+
* @description ExternalID is an external identifier for merchant integrations.
|
|
2728
|
+
* @type string | undefined
|
|
2729
|
+
*/
|
|
2730
|
+
externalId?: string;
|
|
2731
|
+
/**
|
|
2732
|
+
* @description Type is the kind of add-on.
|
|
2733
|
+
*/
|
|
2734
|
+
type?: AddonType;
|
|
2735
|
+
/**
|
|
2736
|
+
* @description Selected indicates whether this add-on is currently selected.
|
|
2737
|
+
* @type boolean | undefined
|
|
2865
2738
|
*/
|
|
2866
|
-
|
|
2739
|
+
selected?: boolean;
|
|
2867
2740
|
};
|
|
2868
2741
|
|
|
2869
2742
|
/**
|
|
2870
|
-
* @description
|
|
2743
|
+
* @description ServicePrice is the pricing information for a delivery service.
|
|
2871
2744
|
*/
|
|
2872
|
-
declare type
|
|
2745
|
+
declare type ServicePrice = {
|
|
2873
2746
|
/**
|
|
2874
|
-
* @description
|
|
2875
|
-
* @type
|
|
2747
|
+
* @description Amount is the total price for this delivery option in minor currency units (e.g. cents/öre).
|
|
2748
|
+
* @type integer, int32
|
|
2876
2749
|
*/
|
|
2877
|
-
|
|
2750
|
+
amount: number;
|
|
2878
2751
|
/**
|
|
2879
|
-
* @description
|
|
2880
|
-
|
|
2752
|
+
* @description Currency is the ISO 4217 currency code.
|
|
2753
|
+
*/
|
|
2754
|
+
currency: Currency;
|
|
2755
|
+
/**
|
|
2756
|
+
* @description NetAmount is the net price before tax, in minor currency units. Populated when tax is applicable.
|
|
2757
|
+
* @type integer | undefined, int32
|
|
2758
|
+
*/
|
|
2759
|
+
netAmount?: number;
|
|
2760
|
+
/**
|
|
2761
|
+
* @description TaxRate is the tax rate expressed as a decimal fraction in the range\n[0, 1]. For example, `0.25` represents 25% VAT.
|
|
2762
|
+
* @minLength 0
|
|
2763
|
+
* @maxLength 1
|
|
2764
|
+
* @type number | undefined, float
|
|
2765
|
+
*/
|
|
2766
|
+
taxRate?: number;
|
|
2767
|
+
/**
|
|
2768
|
+
* @description TaxAmount is the tax amount in minor currency units. Equals `amount - netAmount` when both are populated.
|
|
2769
|
+
* @type integer | undefined, int32
|
|
2770
|
+
*/
|
|
2771
|
+
taxAmount?: number;
|
|
2772
|
+
/**
|
|
2773
|
+
* @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`.
|
|
2774
|
+
* @type array | undefined
|
|
2881
2775
|
*/
|
|
2882
|
-
|
|
2776
|
+
components?: PriceComponent[];
|
|
2883
2777
|
/**
|
|
2884
|
-
* @description
|
|
2778
|
+
* @description Formatted is a human-readable formatted price for display.
|
|
2885
2779
|
* @type string | undefined
|
|
2886
2780
|
*/
|
|
2887
|
-
|
|
2781
|
+
formatted?: string;
|
|
2782
|
+
/**
|
|
2783
|
+
* @description IsFromPrice indicates whether this is a \"from\" price (the actual price may vary).
|
|
2784
|
+
* @type boolean | undefined
|
|
2785
|
+
*/
|
|
2786
|
+
isFromPrice?: boolean;
|
|
2888
2787
|
};
|
|
2889
2788
|
|
|
2890
2789
|
declare type Services = {
|
|
2891
2790
|
delivery: {
|
|
2892
|
-
|
|
2791
|
+
getDeliveryOptions: DeliveryService['getDeliveryOptions'];
|
|
2792
|
+
listLocations: DeliveryService['listLocations'];
|
|
2893
2793
|
};
|
|
2894
2794
|
tracking: {
|
|
2895
2795
|
getTrackingData: TrackingService['getTrackingData'];
|
|
@@ -2941,49 +2841,31 @@ export declare type ServicesOverrides = {
|
|
|
2941
2841
|
};
|
|
2942
2842
|
|
|
2943
2843
|
/**
|
|
2944
|
-
* @description
|
|
2844
|
+
* @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
2845
|
*/
|
|
2946
|
-
declare type
|
|
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;
|
|
2846
|
+
declare type ServiceSupports = {
|
|
2957
2847
|
/**
|
|
2958
|
-
* @description
|
|
2959
|
-
* @type
|
|
2848
|
+
* @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`.
|
|
2849
|
+
* @type boolean | undefined
|
|
2960
2850
|
*/
|
|
2961
|
-
|
|
2851
|
+
search?: boolean;
|
|
2962
2852
|
/**
|
|
2963
|
-
* @description
|
|
2964
|
-
* @type
|
|
2853
|
+
* @description DoorCode indicates whether a door code can be supplied via `selections[].doorCode`.
|
|
2854
|
+
* @type boolean | undefined
|
|
2965
2855
|
*/
|
|
2966
|
-
|
|
2856
|
+
doorCode?: boolean;
|
|
2967
2857
|
/**
|
|
2968
|
-
* @description
|
|
2969
|
-
* @type
|
|
2858
|
+
* @description CourierInstructions indicates whether free-text courier instructions\ncan be supplied via `selections[].courierInstructions`.
|
|
2859
|
+
* @type boolean | undefined
|
|
2970
2860
|
*/
|
|
2971
|
-
|
|
2861
|
+
courierInstructions?: boolean;
|
|
2972
2862
|
/**
|
|
2973
|
-
* @description
|
|
2974
|
-
* @type
|
|
2863
|
+
* @description CustomerNumber indicates whether a customer number is required or supported by the carrier (e.g. DHL lockers).
|
|
2864
|
+
* @type boolean | undefined
|
|
2975
2865
|
*/
|
|
2976
|
-
|
|
2866
|
+
customerNumber?: boolean;
|
|
2977
2867
|
};
|
|
2978
2868
|
|
|
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
2869
|
/**
|
|
2988
2870
|
* @default STEP_UNKNOWN
|
|
2989
2871
|
*/
|
|
@@ -3020,6 +2902,41 @@ declare type TextDirectionEnum = 'ltr' | 'rtl';
|
|
|
3020
2902
|
|
|
3021
2903
|
declare type ThemeCssVariables = `--${RecursiveObjectValues<typeof variableNames>}`;
|
|
3022
2904
|
|
|
2905
|
+
/**
|
|
2906
|
+
* @description TimeSlot is a selectable window for a scheduled delivery.
|
|
2907
|
+
*/
|
|
2908
|
+
declare type TimeSlot = {
|
|
2909
|
+
/**
|
|
2910
|
+
* @description ID is the unique identifier for this time slot. Use this when selecting a specific delivery window.
|
|
2911
|
+
* @type string
|
|
2912
|
+
*/
|
|
2913
|
+
id: string;
|
|
2914
|
+
/**
|
|
2915
|
+
* @description Start is the start of the delivery window.
|
|
2916
|
+
* @type string, date-time
|
|
2917
|
+
*/
|
|
2918
|
+
start: string;
|
|
2919
|
+
/**
|
|
2920
|
+
* @description End is the end of the delivery window.
|
|
2921
|
+
* @type string, date-time
|
|
2922
|
+
*/
|
|
2923
|
+
end: string;
|
|
2924
|
+
/**
|
|
2925
|
+
* @description Expires is when this time slot expires and is no longer bookable.
|
|
2926
|
+
* @type string | undefined, date-time
|
|
2927
|
+
*/
|
|
2928
|
+
expires?: string;
|
|
2929
|
+
/**
|
|
2930
|
+
* @description Formatted is a human-readable formatted time slot for display.
|
|
2931
|
+
* @type string | undefined
|
|
2932
|
+
*/
|
|
2933
|
+
formatted?: string;
|
|
2934
|
+
/**
|
|
2935
|
+
* @description AdditionalPrice is an additional price for selecting this time slot (if different from the base price).
|
|
2936
|
+
*/
|
|
2937
|
+
additionalPrice?: Price;
|
|
2938
|
+
};
|
|
2939
|
+
|
|
3023
2940
|
/** Value returned by the SDK `refreshToken` callback. */
|
|
3024
2941
|
declare type TokenRefreshResult = {
|
|
3025
2942
|
/** Fresh short-lived Ingrid API token. */
|
|
@@ -3070,126 +2987,29 @@ export declare interface UpdatableConfig {
|
|
|
3070
2987
|
}
|
|
3071
2988
|
|
|
3072
2989
|
/**
|
|
3073
|
-
* @description
|
|
2990
|
+
* @description User describes the end user the request is being made on behalf of.
|
|
3074
2991
|
*/
|
|
3075
|
-
declare type
|
|
2992
|
+
declare type User = {
|
|
3076
2993
|
/**
|
|
3077
|
-
* @description \
|
|
2994
|
+
* @description ExternalRef is the merchant\'s reference for this user (e.g. customer ID).
|
|
3078
2995
|
* @type string
|
|
3079
2996
|
*/
|
|
3080
|
-
|
|
2997
|
+
externalRef: string;
|
|
3081
2998
|
/**
|
|
3082
|
-
* @description
|
|
2999
|
+
* @description Name is the full name of the user.
|
|
3083
3000
|
* @type string | undefined
|
|
3084
3001
|
*/
|
|
3085
|
-
|
|
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;
|
|
3002
|
+
name?: string;
|
|
3117
3003
|
/**
|
|
3118
|
-
* @description
|
|
3004
|
+
* @description Email is the email address of the user.
|
|
3119
3005
|
* @type string | undefined
|
|
3120
3006
|
*/
|
|
3121
3007
|
email?: string;
|
|
3122
3008
|
/**
|
|
3123
|
-
* @description
|
|
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.
|
|
3009
|
+
* @description Phone is the phone number of the user, including country code (E.164 format recommended).
|
|
3139
3010
|
* @type string | undefined
|
|
3140
3011
|
*/
|
|
3141
|
-
|
|
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[];
|
|
3012
|
+
phone?: string;
|
|
3193
3013
|
};
|
|
3194
3014
|
|
|
3195
3015
|
/**
|
|
@@ -3227,7 +3047,7 @@ declare type ValidateAddressRequest = {
|
|
|
3227
3047
|
/**
|
|
3228
3048
|
* @description The address to validate against postal reference data.
|
|
3229
3049
|
*/
|
|
3230
|
-
address:
|
|
3050
|
+
address: Address_3;
|
|
3231
3051
|
};
|
|
3232
3052
|
|
|
3233
3053
|
/**
|
|
@@ -3256,7 +3076,7 @@ declare type ValidationResult = {
|
|
|
3256
3076
|
/**
|
|
3257
3077
|
* @description The standardized, corrected address.\nPresent if `status` is `valid` or `suspect`. Absent if `invalid`.
|
|
3258
3078
|
*/
|
|
3259
|
-
candidate?:
|
|
3079
|
+
candidate?: Address_3;
|
|
3260
3080
|
/**
|
|
3261
3081
|
* @description Metadata about the quality of the match.
|
|
3262
3082
|
*/
|
|
@@ -3557,4 +3377,91 @@ declare type WithDefaultProvider<T extends (...args: any[]) => any> = {
|
|
|
3557
3377
|
*/
|
|
3558
3378
|
export declare const withDefaultProvider: <T extends (...args: any[]) => any>(factory: (defaultFn: T) => T) => WithDefaultProvider<T>;
|
|
3559
3379
|
|
|
3380
|
+
declare type Withdrawal = {
|
|
3381
|
+
/**
|
|
3382
|
+
* @type string | undefined
|
|
3383
|
+
*/
|
|
3384
|
+
acknowledged_at?: string;
|
|
3385
|
+
/**
|
|
3386
|
+
* @type string | undefined
|
|
3387
|
+
*/
|
|
3388
|
+
available_until?: string;
|
|
3389
|
+
/**
|
|
3390
|
+
* @type integer | undefined, int32
|
|
3391
|
+
*/
|
|
3392
|
+
days_remaining?: number;
|
|
3393
|
+
/**
|
|
3394
|
+
* @type object | undefined
|
|
3395
|
+
*/
|
|
3396
|
+
declared_by?: WithdrawalContact;
|
|
3397
|
+
/**
|
|
3398
|
+
* @type array | undefined
|
|
3399
|
+
*/
|
|
3400
|
+
items?: WithdrawalItem[];
|
|
3401
|
+
/**
|
|
3402
|
+
* @type string | undefined
|
|
3403
|
+
*/
|
|
3404
|
+
state?: WithdrawalState;
|
|
3405
|
+
/**
|
|
3406
|
+
* @type string | undefined
|
|
3407
|
+
*/
|
|
3408
|
+
withdrawal_form_url?: string;
|
|
3409
|
+
};
|
|
3410
|
+
|
|
3411
|
+
declare type WithdrawalContact = {
|
|
3412
|
+
/**
|
|
3413
|
+
* @type string | undefined
|
|
3414
|
+
*/
|
|
3415
|
+
email?: string;
|
|
3416
|
+
/**
|
|
3417
|
+
* @type string | undefined
|
|
3418
|
+
*/
|
|
3419
|
+
full_name?: string;
|
|
3420
|
+
};
|
|
3421
|
+
|
|
3422
|
+
declare type WithdrawalItem = {
|
|
3423
|
+
/**
|
|
3424
|
+
* @description Discount for a given item in cents. Example `20000` represents `200.00`.
|
|
3425
|
+
* @type integer | undefined, int32
|
|
3426
|
+
*/
|
|
3427
|
+
discount?: number;
|
|
3428
|
+
/**
|
|
3429
|
+
* @description Image is an URL of the image of the given cart item.
|
|
3430
|
+
* @type string | undefined
|
|
3431
|
+
*/
|
|
3432
|
+
image?: string;
|
|
3433
|
+
/**
|
|
3434
|
+
* @description Name is a product name or title.
|
|
3435
|
+
* @type string | undefined
|
|
3436
|
+
*/
|
|
3437
|
+
name?: string;
|
|
3438
|
+
/**
|
|
3439
|
+
* @description Price of the single item with applied discounts in cents. Example `20000` represents `200.00`.
|
|
3440
|
+
* @type integer | undefined, int32
|
|
3441
|
+
*/
|
|
3442
|
+
price?: number;
|
|
3443
|
+
/**
|
|
3444
|
+
* @description Quantity is a total number of a given product item in the cart.
|
|
3445
|
+
* @type integer | undefined, int32
|
|
3446
|
+
*/
|
|
3447
|
+
quantity?: number;
|
|
3448
|
+
/**
|
|
3449
|
+
* @type string | undefined
|
|
3450
|
+
*/
|
|
3451
|
+
sku?: string;
|
|
3452
|
+
};
|
|
3453
|
+
|
|
3454
|
+
/**
|
|
3455
|
+
* @default STATE_UNSPECIFIED
|
|
3456
|
+
*/
|
|
3457
|
+
declare type WithdrawalState = WithdrawalStateEnum;
|
|
3458
|
+
|
|
3459
|
+
declare type WithdrawalStateEnum =
|
|
3460
|
+
| 'STATE_UNSPECIFIED'
|
|
3461
|
+
| 'STATE_AVAILABLE'
|
|
3462
|
+
| 'STATE_ALREADY_ACKNOWLEDGED'
|
|
3463
|
+
| 'STATE_NOT_DELIVERED_YET'
|
|
3464
|
+
| 'STATE_WITHDRAWAL_WINDOW_EXPIRED'
|
|
3465
|
+
| 'STATE_COUNTRY_NOT_ELIGIBLE';
|
|
3466
|
+
|
|
3560
3467
|
export { }
|