Skip to content

Commit 39c235d

Browse files
committed
Fix the React Native and Expo SDK callouts
1 parent 5bd5e85 commit 39c235d

File tree

3 files changed

+43
-30
lines changed

3 files changed

+43
-30
lines changed

fern/docs/pages/sdks/mobile/react-native/features.mdx

Lines changed: 35 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ To access certain features of the DevRev SDK, user identification is required.
66

77
The identification function should be placed appropriately in your app after the user logs in. If you have the user information available at app launch, call the function after the `DevRev.configure(appID:)` method.
88

9-
<Callout intent="note">
9+
<Callout intent="tip">
1010
On iOS, if you haven't previously identified the user, the DevRev SDK will automatically create an anonymous user for you immediately after the SDK is configured.
1111
</Callout>
1212

13-
<Callout intent="note">
13+
<Callout intent="tip">
1414
The `Identity` structure allows for custom fields in the user, organization, and account traits. These fields must be configured through the DevRev app before they can be used. For more information, refer to [Object customization](https://devrev.ai/docs/product/object-customization).
1515
</Callout>
1616

@@ -41,25 +41,30 @@ The steps to identify a verified user are as follows:
4141
2. Exchange your AAT for a session token for each user of your system.
4242
3. Pass the user identifier and the exchanged session token to the `DevRev.identifyVerifiedUser(_:sessionToken:)` method.
4343

44-
> [!CAUTION]
45-
> For security reasons we **strongly recommend** that the token exchange is executed on your backend to prevent exposing your application access token (AAT).
44+
<Callout intent="warning">
45+
For security reasons we **strongly recommend** that the token exchange is executed on your backend to prevent exposing your application access token (AAT).
46+
</Callout>
4647

4748
#### Generate an AAT
4849

4950
1. Open the DevRev web app at [https://app.devrev.ai](https://app.devrev.ai) and go to the **Settings** page.
5051
2. Open the **PLuG Tokens** page.
5152
3. Under the **Application access tokens** panel, click **New token** and copy the token that's displayed.
5253

53-
> [!IMPORTANT]
54-
> Ensure that you copy the generated application access token, as you cannot view it again.
54+
<Callout intent="warning">
55+
Ensure that you copy the generated application access token, as you cannot view it again.
56+
</Callout>
5557

5658
#### Exchange your AAT for a session token
5759

5860
In order to proceed with identifying the user, you need to exchange your AAT for a session token. This step will help you identify a user of your own system within the DevRev platform.
5961

6062
Here is a simple example of an API request to the DevRev backend to exchange your AAT for a session token:
61-
> [!CAUTION]
62-
> Make sure that you replace the `<AAT>` and `<YOUR_USER_ID>` with the actual values.
63+
64+
<Callout intent="warning">
65+
Make sure that you replace the `<AAT>` and `<YOUR_USER_ID>` with the actual values.
66+
</Callout>
67+
6368
```bash
6469
curl \
6570
--location 'https://api.devrev.ai/auth-tokens.create' \
@@ -75,8 +80,9 @@ curl \
7580

7681
The response of the API call will contain a session token that you can use with the verified identification method in your app.
7782

78-
> [!NOTE]
79-
> As a good practice, **your** app should retrieve the exchanged session token from **your** backend at app launch or any relevant app lifecycle event.
83+
<Callout intent="warning">
84+
As a good practice, **your** app should retrieve the exchanged session token from **your** backend at app launch or any relevant app lifecycle event.
85+
</Callout>
8086

8187
#### Identifying the verified user
8288

@@ -94,7 +100,7 @@ You can update the user's information using the following method:
94100
DevRev.updateUser(identity: Identity)
95101
```
96102

97-
<Callout intent="note">
103+
<Callout intent="warning">
98104
The `userID` property cannot be updated.
99105
</Callout>
100106

@@ -122,15 +128,18 @@ The `Identity` class contains the following properties:
122128
| `organizationTraits` | `OrganizationTraits?` || Additional information about the organization |
123129
| `accountTraits` | `AccountTraits?` || Additional information about the account |
124130

125-
> [!NOTE]
126-
> The custom fields properties defined as part of the user, organization and account traits, must be configured in the DevRev web app **before** they can be used. See [Object customization](https://devrev.ai/docs/product/object-customization) for more information.
131+
<Callout intent="note">
132+
The custom fields properties defined as part of the user, organization and account traits, must be configured in the DevRev web app **before** they can be used. See [Object customization](https://devrev.ai/docs/product/object-customization) for more information.
133+
</Callout>
127134

128135
##### UserTraits
129136

130137
The `UserTraits` class contains detailed information about the user:
131138

132-
> [!NOTE]
133-
> All properties in `UserTraits` are optional.
139+
<Callout intent="note">
140+
All properties in `UserTraits` are optional.
141+
</Callout>
142+
134143
| Property | Type | Description |
135144
|----------|------|-------------|
136145
| `displayName` | `string?` | The displayed name of the user |
@@ -143,8 +152,10 @@ The `UserTraits` class contains detailed information about the user:
143152

144153
The `OrganizationTraits` class contains detailed information about the organization:
145154

146-
> [!NOTE]
147-
> All properties in `OrganizationTraits` are optional.
155+
<Callout intent="note">
156+
All properties in `OrganizationTraits` are optional.
157+
</Callout>
158+
148159
| Property | Type | Description |
149160
|----------|------|-------------|
150161
| `displayName` | `string?` | The displayed name of the organization |
@@ -158,8 +169,10 @@ The `OrganizationTraits` class contains detailed information about the organizat
158169

159170
The `AccountTraits` class contains detailed information about the account:
160171

161-
> [!NOTE]
162-
> All properties in `AccountTraits` are optional.
172+
<Callout intent="note">
173+
All properties in `AccountTraits` are optional.
174+
</Callout>
175+
163176
| Property | Type | Description |
164177
|----------|------|-------------|
165178
| `displayName` | `string?` | The displayed name of the account |
@@ -174,10 +187,6 @@ The `AccountTraits` class contains detailed information about the account:
174187

175188
Once user identification is complete, you can start using the chat (conversations) dialog supported by our DevRev SDK. The support chat feature can be shown as a modal screen from the top-most screen.
176189

177-
<Callout intent="note">
178-
This feature requires the SDK to be configured and the user to be identified, whether they are unverified or anonymous.
179-
</Callout>
180-
181190
```typescript
182191
DevRev.showSupport()
183192
```
@@ -202,8 +211,8 @@ Setting this flag to true applies the system's default behavior for opening link
202211

203212
### In-app link callback
204213

205-
<Callout intent="note">
206-
This feature is for Android only.
214+
<Callout intent="tip">
215+
This feature is supported only on Android.
207216
</Callout>
208217

209218
For scenarios where custom handling is needed, links from the support chat can be captured with the following method:
@@ -224,10 +233,6 @@ DevRev.setPrefersSystemTheme(value: boolean)
224233

225234
## Analytics
226235

227-
<Callout intent="note">
228-
This feature requires the SDK to be configured and the user to be identified, whether they are unverified or anonymous.
229-
</Callout>
230-
231236
The DevRev SDK allows you to send custom analytic events by using a properties map. You can track these events using the following function:
232237

233238
```typescript
@@ -338,7 +343,7 @@ To receive push notifications, you need to configure your DevRev organization by
338343

339344
### Register for push notifications
340345

341-
<Callout intent="note">
346+
<Callout intent="tip">
342347
Push notifications require that the SDK has been configured and the user has been identified, to ensure delivery to the correct user.
343348
</Callout>
344349

fern/docs/pages/sdks/mobile/react-native/quickstart-expo.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ DevRev SDK, used for integrating DevRev services into your Expo app.
3737
2. Under **PLuG settings** copy the value under **Your unique App ID**.
3838
3. After obtaining the credentials, you can configure the DevRev SDK in your app.
3939

40+
<Callout intent="warning">
41+
The DevRev SDK must be configured before you can use any of its features.
42+
</Callout>
43+
4044
The SDK becomes ready for use once the following configuration method is executed.
4145

4246
```typescript

fern/docs/pages/sdks/mobile/react-native/quickstart.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ npm install @devrev/sdk-react-native
1919
2. Under **PLuG settings** copy the value under **Your unique App ID**.
2020
3. After obtaining the credentials, you can configure the DevRev SDK in your app.
2121

22+
<Callout intent="warning">
23+
The DevRev SDK must be configured before you can use any of its features.
24+
</Callout>
25+
2226
The SDK becomes ready for use once the following configuration method is executed.
2327

2428
```typescript

0 commit comments

Comments
 (0)