@thirstie/thirstieservices 0.1.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/CHANGELOG.md ADDED
@@ -0,0 +1,38 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ # 0.1.0 (2024-10-07)
7
+
8
+
9
+ ### Features
10
+
11
+ * allow restoring age gate settings ([2030773](https://github.com/ThirstieAdmin/thirstiejs-monorepo/commit/2030773073df53b56a08a3dd5937afac63c87217))
12
+ * simplify saving session state ([fa0ba48](https://github.com/ThirstieAdmin/thirstiejs-monorepo/commit/fa0ba48d29140961e7c035605a0bee82ac7f0b17))
13
+ * update user actions ([2f8cf07](https://github.com/ThirstieAdmin/thirstiejs-monorepo/commit/2f8cf07f9bafbca4fd5d57435a37189541449ded))
14
+
15
+
16
+
17
+
18
+
19
+ # Changelog
20
+
21
+ All notable changes to this project will be documented in this file.
22
+
23
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
24
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
25
+
26
+ ## [Unreleased]
27
+
28
+ ### Fixed
29
+
30
+ - n/a
31
+
32
+ ### Added
33
+
34
+ - n/a
35
+
36
+ ### Removed
37
+
38
+ - n/a
package/README.md ADDED
@@ -0,0 +1,41 @@
1
+ # ThirstieClient
2
+
3
+ ThirstieClient provides a service layer for using the Thirstie ECommerce API which
4
+ can be imported as a CommonJS or ES module.
5
+
6
+ ## Installation
7
+
8
+ - `npm install @thirstie/thirstieclient`
9
+
10
+ ## Minimum Requirements
11
+
12
+ - Node.js: v18+
13
+
14
+ ## Usage
15
+
16
+ You must have an Thirstie API Client Key (provided by your Thirstie representative)
17
+ to initialize `ThirstieClient`. Optionally, you can also provide a Google API key to
18
+ enable location services using Google's Maps / Places API.
19
+
20
+ ```js
21
+ async function main (apiKey, mapsKey) {
22
+ const thirstieapp = new ThirstieClient({ apiKey, mapsKey });
23
+ const res = await thirstieapp.initSession();
24
+ console.log(res);
25
+ }
26
+
27
+ main();
28
+ ```
29
+
30
+ Expected output:
31
+
32
+ ```js
33
+ {
34
+ application_name: '<your thirstie application name>',
35
+ session_uuid: '<session uuid>',
36
+ token: '<access jwt>',
37
+ token_type: 'Bearer',
38
+ user: null,
39
+ uuid: '<thirstie application uuid>'
40
+ }
41
+ ```