@ingridab/sdk 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -122,16 +122,26 @@ export declare const createDeliveryMolecule: ({ mode, name, customization, }: Mo
122
122
  gaplessAddonsList?: boolean;
123
123
  gaplessCarrierList?: boolean;
124
124
  gaplessDeliveryList?: boolean;
125
+ gaplessDeliveryTimeList?: boolean;
125
126
  labels?: "off" | "chips" | "text";
126
127
  showAddons?: boolean;
127
128
  showCustomInfoText?: boolean;
128
129
  showCustomText?: boolean;
129
130
  showDiscountedPrice?: boolean;
131
+ zeroPriceDisplay?: "free" | "0";
130
132
  showFreeShippingIndicator?: boolean;
131
133
  showPrice?: boolean;
132
134
  showRadioIndicator?: boolean;
133
135
  showReturnPromise?: boolean;
134
- showShippingLogo?: boolean;
136
+ showCarrierLogo?: boolean;
137
+ showCarrierName?: boolean;
138
+ showDeliveryTime?: boolean;
139
+ showLocationSection?: boolean;
140
+ showLocationAddress?: boolean;
141
+ showLocationCarrierName?: boolean;
142
+ showLocationType?: boolean;
143
+ categoryLabel?: "name" | "type";
144
+ deliveryTime?: "off" | "inline" | "popup";
135
145
  };
136
146
  location?: {
137
147
  gaplessList?: boolean;
@@ -140,6 +150,15 @@ export declare const createDeliveryMolecule: ({ mode, name, customization, }: Mo
140
150
  mapFitboundsMaxZoom?: number;
141
151
  mapPosition?: "start" | "end";
142
152
  mapToggleEnabled?: boolean;
153
+ zeroPriceDisplay?: "free" | "0";
154
+ displayMode?: "popup" | "inline";
155
+ selectionControl?: "radio" | "disabled";
156
+ selectionAlignment?: "left" | "right";
157
+ showLocationAddress?: boolean;
158
+ showCarrierName?: boolean;
159
+ showLocationType?: boolean;
160
+ showOpeningHours?: boolean;
161
+ showPrice?: boolean;
143
162
  };
144
163
  productList?: {
145
164
  defaultView?: "off" | "list" | "summary";
@@ -148,10 +167,14 @@ export declare const createDeliveryMolecule: ({ mode, name, customization, }: Mo
148
167
  showPrice?: boolean;
149
168
  showQuantity?: boolean;
150
169
  summaryText?: "none" | "products" | "firstProductAndMore";
170
+ zeroPriceDisplay?: "free" | "0";
151
171
  };
152
172
  summary?: {
153
173
  previewAddons?: boolean;
154
174
  showFreeShippingIndicator?: boolean;
175
+ showDiscountedPrice?: boolean;
176
+ zeroPriceDisplay?: "free" | "0";
177
+ categoryLabel?: "name" | "type";
155
178
  };
156
179
  } | undefined;
157
180
  params: {
@@ -190,12 +213,42 @@ export declare const createFreeShippingIndicatorMolecule: ({ name, customization
190
213
  type: "freeShippingIndicator";
191
214
  customization: {
192
215
  showExhaustedLevelsMessage?: boolean;
216
+ zeroPriceDisplay?: "free" | "0";
193
217
  } | undefined;
194
218
  params: {
195
219
  name: string;
196
220
  };
197
221
  };
198
222
 
223
+ /**
224
+ * UNSTABLE - DO NOT USE
225
+ *
226
+ * Creates a molecule configuration for the postal code particle.
227
+ *
228
+ * Renders a postal code input that lets the shopper provide the postal code used
229
+ * to resolve available delivery options.
230
+ *
231
+ * @returns A molecule descriptor to pass to the `molecules` array in {@link IngridInitParams}.
232
+ *
233
+ * @example
234
+ * ```ts
235
+ * const instance = await ingrid.init({
236
+ * token: 'your-auth-token',
237
+ * siteId: 'your-site-id',
238
+ * locale: 'en-US',
239
+ * countryCode: 'US',
240
+ * currency: 'USD',
241
+ * molecules: [
242
+ * createPostalCodeMolecule(),
243
+ * ],
244
+ * });
245
+ * ```
246
+ */
247
+ export declare const createPostalCodeMolecule: () => {
248
+ type: "postalCode";
249
+ params: {};
250
+ };
251
+
199
252
  declare type DeliveryMoleculeParams = {
200
253
  mode: 'active' | 'passive';
201
254
  name: string;
@@ -205,16 +258,26 @@ declare type DeliveryMoleculeParams = {
205
258
  gaplessAddonsList?: boolean;
206
259
  gaplessCarrierList?: boolean;
207
260
  gaplessDeliveryList?: boolean;
261
+ gaplessDeliveryTimeList?: boolean;
208
262
  labels?: 'off' | 'chips' | 'text';
209
263
  showAddons?: boolean;
210
264
  showCustomInfoText?: boolean;
211
265
  showCustomText?: boolean;
212
266
  showDiscountedPrice?: boolean;
267
+ zeroPriceDisplay?: 'free' | '0';
213
268
  showFreeShippingIndicator?: boolean;
214
269
  showPrice?: boolean;
215
270
  showRadioIndicator?: boolean;
216
271
  showReturnPromise?: boolean;
217
- showShippingLogo?: boolean;
272
+ showCarrierLogo?: boolean;
273
+ showCarrierName?: boolean;
274
+ showDeliveryTime?: boolean;
275
+ showLocationSection?: boolean;
276
+ showLocationAddress?: boolean;
277
+ showLocationCarrierName?: boolean;
278
+ showLocationType?: boolean;
279
+ categoryLabel?: 'name' | 'type';
280
+ deliveryTime?: 'off' | 'inline' | 'popup';
218
281
  };
219
282
  location?: {
220
283
  gaplessList?: boolean;
@@ -223,6 +286,15 @@ declare type DeliveryMoleculeParams = {
223
286
  mapFitboundsMaxZoom?: number;
224
287
  mapPosition?: 'start' | 'end';
225
288
  mapToggleEnabled?: boolean;
289
+ zeroPriceDisplay?: 'free' | '0';
290
+ displayMode?: 'popup' | 'inline';
291
+ selectionControl?: 'radio' | 'disabled';
292
+ selectionAlignment?: 'left' | 'right';
293
+ showLocationAddress?: boolean;
294
+ showCarrierName?: boolean;
295
+ showLocationType?: boolean;
296
+ showOpeningHours?: boolean;
297
+ showPrice?: boolean;
226
298
  };
227
299
  productList?: {
228
300
  defaultView?: 'off' | 'list' | 'summary';
@@ -231,10 +303,14 @@ declare type DeliveryMoleculeParams = {
231
303
  showPrice?: boolean;
232
304
  showQuantity?: boolean;
233
305
  summaryText?: 'none' | 'products' | 'firstProductAndMore';
306
+ zeroPriceDisplay?: 'free' | '0';
234
307
  };
235
308
  summary?: {
236
309
  previewAddons?: boolean;
237
310
  showFreeShippingIndicator?: boolean;
311
+ showDiscountedPrice?: boolean;
312
+ zeroPriceDisplay?: 'free' | '0';
313
+ categoryLabel?: 'name' | 'type';
238
314
  };
239
315
  };
240
316
  };
@@ -244,6 +320,7 @@ declare type FreeShippingIndicatorParams = {
244
320
  deliveryId?: string;
245
321
  customization?: {
246
322
  showExhaustedLevelsMessage?: boolean;
323
+ zeroPriceDisplay?: 'free' | '0';
247
324
  };
248
325
  };
249
326
 
@@ -252,9 +329,15 @@ declare type MoleculeParamsMap = {
252
329
  countrySelector: CountrySelectorParams;
253
330
  delivery: DeliveryMoleculeParams;
254
331
  freeShippingIndicator: FreeShippingIndicatorParams;
332
+ postalCode: PostalCodeParams;
255
333
  tracking: TrackingNumberParams;
256
334
  };
257
335
 
336
+ declare type PostalCodeParams = {
337
+ // No customization flags yet
338
+ customization?: Record<never, never>;
339
+ };
340
+
258
341
  declare type TrackingNumberParams = {
259
342
  parcelIndex: string;
260
343
  customization?: Record<never, never>;
package/dist/internal.js CHANGED
@@ -1,35 +1,39 @@
1
- const c = ({
1
+ const r = ({
2
2
  mode: e,
3
- name: r
3
+ name: t
4
4
  }) => ({
5
5
  type: "countrySelector",
6
6
  params: {
7
7
  mode: e,
8
- name: r
8
+ name: t
9
9
  }
10
- }), o = ({
10
+ }), c = ({
11
11
  mode: e,
12
- name: r,
13
- customization: t
12
+ name: t,
13
+ customization: o
14
14
  }) => ({
15
15
  type: "delivery",
16
- customization: t,
16
+ customization: o,
17
17
  params: {
18
18
  mode: e,
19
- name: r
19
+ name: t
20
20
  }
21
21
  }), a = ({
22
22
  name: e,
23
- customization: r
23
+ customization: t
24
24
  }) => ({
25
25
  type: "freeShippingIndicator",
26
- customization: r,
26
+ customization: t,
27
27
  params: {
28
28
  name: e
29
29
  }
30
+ }), l = () => ({
31
+ type: "postalCode",
32
+ params: {}
30
33
  });
31
34
  export {
32
- c as createCountrySelectorMolecule,
33
- o as createDeliveryMolecule,
34
- a as createFreeShippingIndicatorMolecule
35
+ r as createCountrySelectorMolecule,
36
+ c as createDeliveryMolecule,
37
+ a as createFreeShippingIndicatorMolecule,
38
+ l as createPostalCodeMolecule
35
39
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ingridab/sdk",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "main": "./dist/index.js",
@@ -32,13 +32,14 @@
32
32
  "registry": "https://registry.npmjs.org"
33
33
  },
34
34
  "dependencies": {
35
- "@tanstack/react-query": "5.55.0",
36
- "jotai": "2.13.1",
37
- "axios": "1.16.1",
38
- "i18next": "25.5.2",
39
- "zod": "3.24.1"
35
+ "@tanstack/query-core": "^5.100.14",
36
+ "axios": "^1.16.1",
37
+ "i18next": "^25.5.2",
38
+ "jotai": "^2.13.1",
39
+ "zod": "^3.24.1"
40
40
  },
41
41
  "devDependencies": {
42
+ "@ingrid/third-party-notices": "0.0.0-b9145ca",
42
43
  "@microsoft/api-extractor": "7.58.0",
43
44
  "dotenv": "17.2.3",
44
45
  "jsdom": "24.1.3",
@@ -48,9 +49,9 @@
48
49
  "typedoc-plugin-markdown": "4.11.0",
49
50
  "vite": "7.3.1",
50
51
  "vite-plugin-dts": "4.5.4",
51
- "vitest": "4.0.18",
52
- "@ingridab/bergman-system": "0.1.1",
53
- "@ingridab/api-types": "0.2.0",
52
+ "vitest": "4.1.0",
53
+ "@ingridab/api-types": "0.4.0",
54
+ "@ingridab/bergman-system": "0.2.0",
54
55
  "@ingridab/config": "^0.0.0"
55
56
  },
56
57
  "scripts": {
package/dist/LICENSES.md DELETED
@@ -1,37 +0,0 @@
1
- # Licenses
2
-
3
- The app bundles dependencies which contain the following licenses:
4
-
5
- ## axios - 1.16.1 (MIT)
6
-
7
- # Copyright (c) 2014-present Matt Zabriskie & Collaborators
8
-
9
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14
-
15
- ## i18next - 25.5.2 (MIT)
16
-
17
- The MIT License (MIT)
18
-
19
- Copyright (c) 2025 i18next
20
-
21
- Permission is hereby granted, free of charge, to any person obtaining a copy
22
- of this software and associated documentation files (the "Software"), to deal
23
- in the Software without restriction, including without limitation the rights
24
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
25
- copies of the Software, and to permit persons to whom the Software is
26
- furnished to do so, subject to the following conditions:
27
-
28
- The above copyright notice and this permission notice shall be included in all
29
- copies or substantial portions of the Software.
30
-
31
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
32
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
33
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
34
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
35
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
36
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
37
- SOFTWARE.