@playbasis-ai/qwikcard-sdk 2.3.4 → 2.3.5
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 +19 -19
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# @
|
|
1
|
+
# @playbasis-ai/qwikcard-sdk
|
|
2
2
|
|
|
3
3
|
> Official React Native SDK for Playbasis gamification integration
|
|
4
4
|
|
|
5
|
-
[](https://www.npmjs.com/package/@playbasis-ai/qwikcard-sdk)
|
|
6
6
|
[](https://www.typescriptlang.org/)
|
|
7
7
|
[](https://reactnative.dev/)
|
|
8
8
|
|
|
@@ -17,15 +17,15 @@
|
|
|
17
17
|
## Installation
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
|
-
npm install @
|
|
20
|
+
npm install @playbasis-ai/qwikcard-sdk
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
### Peer Dependencies
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
This SDK requires the following peer dependencies. Please ensure they are installed in your project with the specified versions:
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
|
-
npm install react-native-linear-gradient react-native-svg react-native-webview
|
|
28
|
+
npm install react-native-linear-gradient@>=2.0.0 react-native-svg@>=12.0.0 react-native-webview@>=11.0.0
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
### Local Installation (if not published to npm)
|
|
@@ -45,12 +45,12 @@ npm install /absolute/path/to/playbasis-sdk
|
|
|
45
45
|
|
|
46
46
|
#### 2. From a Tarball (.tgz or .zip)
|
|
47
47
|
|
|
48
|
-
If you have a file like `playbasis-qwikcard-sdk-
|
|
48
|
+
If you have a file like `playbasis-ai-qwikcard-sdk-2.3.4.tgz`, you can install directly:
|
|
49
49
|
|
|
50
50
|
```bash
|
|
51
|
-
yarn add ./client-sdks/qwikcard-sdk/playbasis-qwikcard-sdk-
|
|
51
|
+
yarn add ./client-sdks/qwikcard-sdk-v1.3.0-pkg/playbasis-ai-qwikcard-sdk-2.3.4.tgz
|
|
52
52
|
# or
|
|
53
|
-
npm install ./client-sdks/qwikcard-sdk/playbasis-qwikcard-sdk-
|
|
53
|
+
npm install ./client-sdks/qwikcard-sdk-v1.3.0-pkg/playbasis-ai-qwikcard-sdk-2.3.4.tgz
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
#### 3. npm/yarn link (for active development)
|
|
@@ -66,9 +66,9 @@ yarn link
|
|
|
66
66
|
In your project folder:
|
|
67
67
|
|
|
68
68
|
```bash
|
|
69
|
-
npm link @
|
|
69
|
+
npm link @playbasis-ai/qwikcard-sdk
|
|
70
70
|
# or
|
|
71
|
-
yarn link @
|
|
71
|
+
yarn link @playbasis-ai/qwikcard-sdk
|
|
72
72
|
```
|
|
73
73
|
|
|
74
74
|
#### 4. From a Git Repository
|
|
@@ -76,9 +76,9 @@ yarn link @foremost-ai/qwikcard-sdk
|
|
|
76
76
|
If the SDK is hosted in a private Git repo:
|
|
77
77
|
|
|
78
78
|
```bash
|
|
79
|
-
yarn add git+https://github.com/
|
|
79
|
+
yarn add git+https://github.com/Foremost-AI/playbasis-qwikcard-sdk.git
|
|
80
80
|
# or
|
|
81
|
-
npm install git+https://github.com/
|
|
81
|
+
npm install git+https://github.com/Foremost-AI/playbasis-qwikcard-sdk.git
|
|
82
82
|
```
|
|
83
83
|
|
|
84
84
|
---
|
|
@@ -86,9 +86,9 @@ npm install git+https://github.com/your-org/playbasis-qwikcard-sdk.git
|
|
|
86
86
|
If the package is published to npm, you can install as usual:
|
|
87
87
|
|
|
88
88
|
```bash
|
|
89
|
-
npm install @
|
|
89
|
+
npm install @playbasis-ai/qwikcard-sdk
|
|
90
90
|
# or
|
|
91
|
-
yarn add @
|
|
91
|
+
yarn add @playbasis-ai/qwikcard-sdk
|
|
92
92
|
```
|
|
93
93
|
|
|
94
94
|
## Requirements
|
|
@@ -103,7 +103,7 @@ yarn add @foremost-ai/qwikcard-sdk
|
|
|
103
103
|
`QwikCardApp` renders the full Playbasis experience using a WebView-embedded Widget UI, while keeping API calls on the React Native side.
|
|
104
104
|
|
|
105
105
|
```tsx
|
|
106
|
-
import { QwikCardApp } from '@
|
|
106
|
+
import { QwikCardApp } from '@playbasis-ai/qwikcard-sdk';
|
|
107
107
|
|
|
108
108
|
export default function RewardsAndGamificationScreen() {
|
|
109
109
|
return (
|
|
@@ -130,7 +130,7 @@ If you need direct access to the API client for custom UI/logic, you can still u
|
|
|
130
130
|
#### Wrap Your App
|
|
131
131
|
|
|
132
132
|
```tsx
|
|
133
|
-
import { PlaybasisProvider } from '@
|
|
133
|
+
import { PlaybasisProvider } from '@playbasis-ai/qwikcard-sdk';
|
|
134
134
|
|
|
135
135
|
export default function App() {
|
|
136
136
|
return (
|
|
@@ -148,7 +148,7 @@ export default function App() {
|
|
|
148
148
|
### 2. Use Hooks (with your own screens)
|
|
149
149
|
|
|
150
150
|
```tsx
|
|
151
|
-
import { useQuests, useRewards, useBadges, usePoints } from '@
|
|
151
|
+
import { useQuests, useRewards, useBadges, usePoints } from '@playbasis-ai/qwikcard-sdk';
|
|
152
152
|
|
|
153
153
|
function RewardsScreen() {
|
|
154
154
|
const { rewards } = useRewards();
|
|
@@ -168,7 +168,7 @@ function RewardsScreen() {
|
|
|
168
168
|
### 3. Use Components (with your own screens)
|
|
169
169
|
|
|
170
170
|
```tsx
|
|
171
|
-
import { QuestProgress, RewardCard, BadgeIcon, PointsBalance } from '@
|
|
171
|
+
import { QuestProgress, RewardCard, BadgeIcon, PointsBalance } from '@playbasis-ai/qwikcard-sdk';
|
|
172
172
|
|
|
173
173
|
function QuestsScreen() {
|
|
174
174
|
const { quests } = useQuests();
|
|
@@ -190,7 +190,7 @@ function QuestsScreen() {
|
|
|
190
190
|
For custom operations:
|
|
191
191
|
|
|
192
192
|
```tsx
|
|
193
|
-
import { usePlaybasis } from '@
|
|
193
|
+
import { usePlaybasis } from '@playbasis-ai/qwikcard-sdk';
|
|
194
194
|
|
|
195
195
|
function TransactionLogger() {
|
|
196
196
|
const { client, playerId } = usePlaybasis();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@playbasis-ai/qwikcard-sdk",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.5",
|
|
4
4
|
"description": "Playbasis SDK for QwikCard College Rewards - React Native gamification integration",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -83,4 +83,4 @@
|
|
|
83
83
|
"publishConfig": {
|
|
84
84
|
"registry": "https://registry.npmjs.org/"
|
|
85
85
|
}
|
|
86
|
-
}
|
|
86
|
+
}
|