@visa-check-r/integrations 0.0.1
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 +43 -0
- package/dist/index.cjs.js +1584 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.mts +1015 -0
- package/dist/index.d.ts +1015 -0
- package/dist/index.esm.js +1473 -0
- package/dist/index.esm.js.map +1 -0
- package/package.json +64 -0
package/README.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// generate read me
|
|
2
|
+
# OgaBai Api Integrations
|
|
3
|
+
|
|
4
|
+
### Follow the test guard for this integration
|
|
5
|
+
```ts
|
|
6
|
+
const client = new GraphQLClient({
|
|
7
|
+
url: "http://localhost:8080/graphql",
|
|
8
|
+
headersFactory: async () => ({
|
|
9
|
+
"authorization": "",
|
|
10
|
+
"ojami-store-id": ""
|
|
11
|
+
}),
|
|
12
|
+
});
|
|
13
|
+
const authService = createAuthService(client)
|
|
14
|
+
const res = await authService.signUp({
|
|
15
|
+
pin: "12345678",
|
|
16
|
+
phone: "08034668633",
|
|
17
|
+
storeName: "test store",
|
|
18
|
+
});
|
|
19
|
+
const res = await authService.login({
|
|
20
|
+
pin: "12345678",
|
|
21
|
+
phone: "08034668633",
|
|
22
|
+
});
|
|
23
|
+
const res = await authService.signUp({
|
|
24
|
+
pin: "12345678",
|
|
25
|
+
phone: "08034668633",
|
|
26
|
+
storeName: "test store",
|
|
27
|
+
});
|
|
28
|
+
const res = await authService.sendOTP({
|
|
29
|
+
phone: "08034668633",
|
|
30
|
+
});
|
|
31
|
+
const res = await authService.verifyOTP({
|
|
32
|
+
phone: "08034668633",
|
|
33
|
+
otp,
|
|
34
|
+
});
|
|
35
|
+
const res = await authService.resetPin({
|
|
36
|
+
pin: "12345678",
|
|
37
|
+
phone: "08034668633",
|
|
38
|
+
},{}, {
|
|
39
|
+
header: {
|
|
40
|
+
"X-Otp-Verified-Access-Token": ""
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
```
|