@matech/thebigpos-sdk 2.43.0-aibi-3 → 2.43.8

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
@@ -1,73 +1,73 @@
1
- # The BIG POS Typescript SDK
2
-
3
- ## Installation
4
- Using npm:
5
-
6
- ```bash
7
- $ npm install @matech/thebigpos-sdk
8
- ```
9
-
10
- Using yarn:
11
-
12
- ```bash
13
- $ yarn add @matech/thebigpos-sdk
14
- ```
15
-
16
- ## Quick Start
17
- ```js
18
- import { Api } from "@matech/thebigpos-sdk";
19
-
20
- const securityWorker = (data: any) => {
21
- return { headers: data }
22
- }
23
-
24
- const setBearerSecurityWorker = (accessToken:string) => {
25
- const data = {
26
- Authorization: `Bearer ${accessToken}`
27
- };
28
-
29
- apiClient.setSecurityData(data);
30
- };
31
-
32
- const apiClient = new Api({
33
- baseURL:
34
- process.env.REACT_APP_POS_API_HOST || 'https://api.thebigpos.com',
35
- securityWorker,
36
- })
37
-
38
- apiClient.api.getSiteConfiguration().then((response) => {
39
- console.log(response.data);
40
- });
41
- ```
42
-
43
- ## Generate SDK from Swagger
44
-
45
- To regenerate the SDK from a specific API version, run:
46
-
47
- ```bash
48
- npx swagger-typescript-api generate -p https://api.thebigpos.dev/swagger/{version}/swagger.json -o ./src -n index.ts -r true --axios --enum-names-as-values --generate-union-enums
49
- ```
50
-
51
- Replace `{version}` with the target API version (e.g. `v2.34.0`):
52
-
53
- ```bash
54
- npx swagger-typescript-api generate -p https://api.thebigpos.dev/swagger/v2.34.0/swagger.json -o ./src -n index.ts -r true --axios --enum-names-as-values --generate-union-enums
55
- ```
56
-
57
- ## Publishing
58
-
59
- 1. Update the `version` field in `package.json` before publishing.
60
- 2. Build the project:
61
-
62
- ```bash
63
- yarn build
64
- ```
65
-
66
- 3. Publish to npm:
67
-
68
- ```bash
69
- yarn publish
70
- ```
71
-
72
- ____
73
- © 2024 Mortgage Automation Technologies. All rights reserved
1
+ # The BIG POS Typescript SDK
2
+
3
+ ## Installation
4
+ Using npm:
5
+
6
+ ```bash
7
+ $ npm install @matech/thebigpos-sdk
8
+ ```
9
+
10
+ Using yarn:
11
+
12
+ ```bash
13
+ $ yarn add @matech/thebigpos-sdk
14
+ ```
15
+
16
+ ## Quick Start
17
+ ```js
18
+ import { Api } from "@matech/thebigpos-sdk";
19
+
20
+ const securityWorker = (data: any) => {
21
+ return { headers: data }
22
+ }
23
+
24
+ const setBearerSecurityWorker = (accessToken:string) => {
25
+ const data = {
26
+ Authorization: `Bearer ${accessToken}`
27
+ };
28
+
29
+ apiClient.setSecurityData(data);
30
+ };
31
+
32
+ const apiClient = new Api({
33
+ baseURL:
34
+ process.env.REACT_APP_POS_API_HOST || 'https://api.thebigpos.com',
35
+ securityWorker,
36
+ })
37
+
38
+ apiClient.api.getSiteConfiguration().then((response) => {
39
+ console.log(response.data);
40
+ });
41
+ ```
42
+
43
+ ## Generate SDK from Swagger
44
+
45
+ To regenerate the SDK from a specific API version, run:
46
+
47
+ ```bash
48
+ npx swagger-typescript-api generate -p https://api.thebigpos.dev/swagger/{version}/swagger.json -o ./src -n index.ts -r true --axios --enum-names-as-values --enum-style union
49
+ ```
50
+
51
+ Replace `{version}` with the target API version (e.g. `v2.34.0`):
52
+
53
+ ```bash
54
+ npx swagger-typescript-api generate -p https://api.thebigpos.dev/swagger/v2.34.0/swagger.json -o ./src -n index.ts -r true --axios --enum-names-as-values --enum-style union
55
+ ```
56
+
57
+ ## Publishing
58
+
59
+ 1. Update the `version` field in `package.json` before publishing.
60
+ 2. Build the project:
61
+
62
+ ```bash
63
+ yarn build
64
+ ```
65
+
66
+ 3. Publish to npm:
67
+
68
+ ```bash
69
+ yarn publish
70
+ ```
71
+
72
+ ____
73
+ © 2024 Mortgage Automation Technologies. All rights reserved