@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 CHANGED
@@ -22,6 +22,7 @@ import ingrid, { createAddressMolecule } from '@ingridab/sdk';
22
22
 
23
23
  const instance = await ingrid.init({
24
24
  token: 'your-auth-token',
25
+ refreshToken: () => fetch('/your-backend/ingrid-token').then(r => r.json()),
25
26
  siteId: 'your-site-id',
26
27
  locale: 'en-US',
27
28
  countryCode: 'US',
@@ -34,9 +35,10 @@ await instance.compound.mount('#ingrid-container');
34
35
 
35
36
  ### Auth
36
37
 
37
- `refreshToken` is optional. Use it with short-lived Ingrid API tokens, which are
38
- preferred. The callback should call your backend and return a fresh token issued by the
39
- integrator with its expiration timestamp: `{ accessToken, expiresAt }`.
38
+ The `refreshToken` parameter on `ingrid.init` is optional. Use it with
39
+ short-lived Ingrid API tokens, which are preferred. The callback should call
40
+ your backend, fetch a fresh Ingrid API token
41
+ server-side, and return it with its expiration timestamp: `{ accessToken, expiresAt }`.
40
42
 
41
43
  ### Listening to events
42
44
 
package/dist/LICENSES.md CHANGED
@@ -1,37 +1,3 @@
1
1
  # Licenses
2
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.
3
+ The app does not bundle any dependencies with licenses.