Skip to content

Commit 8a5e1d7

Browse files
imSzukalaclaude
andauthored
chore: release 9.8.0 (#393)
Minor bump for the broadened loginUserWithUserAttributes TypeScript signature (now accepts full UserAttributes, not just email/userId). Updates README docs to match the new API surface. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 036a4a7 commit 8a5e1d7

File tree

4 files changed

+47
-10
lines changed

4 files changed

+47
-10
lines changed

README.md

Lines changed: 44 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -828,18 +828,55 @@ This is a user that doesn't have any identifiable information such as a userId o
828828

829829
---
830830

831-
### `Intercom.loginUserWithUserAttributes({email,userId})`
831+
### `Intercom.loginUserWithUserAttributes(userAttributes)`
832832

833-
Login a user with identifiable information.
833+
Login a user with identifiable information. You can pass any user attributes at login time, allowing you to set user data in a single call rather than requiring a separate `updateUser` call.
834+
835+
###### One of `email` or `userId` is required.
836+
837+
```javascript
838+
Intercom.loginUserWithUserAttributes({
839+
email: 'name@intercom.com',
840+
userId: 'userId',
841+
name: 'Name',
842+
phone: '010-1234-5678',
843+
languageOverride: 'languageOverride',
844+
signedUpAt: 1621844451,
845+
unsubscribedFromEmails: true,
846+
companies: [
847+
{
848+
createdAt: 1621844451,
849+
id: 'companyId',
850+
monthlySpend: 100,
851+
name: 'CompanyName',
852+
plan: 'plan',
853+
customAttributes: {
854+
city: 'New York',
855+
},
856+
},
857+
],
858+
customAttributes: {
859+
userCustomAttribute: 123,
860+
hasUserCustomAttribute: true,
861+
},
862+
});
863+
```
834864

835865
### Options
836866

837-
One of below fields is required.
867+
| Type | Type | Required |
868+
| ---------------------- | -------------------------------------- | -------- |
869+
| userId | string | yes* |
870+
| email | string | yes* |
871+
| name | string | no |
872+
| phone | string | no |
873+
| languageOverride | string | no |
874+
| signedUpAt | number (timestamp) | no |
875+
| unsubscribedFromEmails | boolean | no |
876+
| companies | array | no |
877+
| customAttributes | object `{key: boolean,string, number}` | no |
838878

839-
| Type | Type | Required |
840-
| ------ | ------ | -------- |
841-
| email | string | no |
842-
| userId | string | no |
879+
\* One of `email` or `userId` is required.
843880

844881
### Returns
845882

examples/example/ios/Podfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ PODS:
55
- fmt (9.1.0)
66
- glog (0.3.5)
77
- Intercom (19.5.4)
8-
- intercom-react-native (9.7.1):
8+
- intercom-react-native (9.8.0):
99
- DoubleConversion
1010
- glog
1111
- Intercom (~> 19.5.4)

examples/with-notifications/ios/Podfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ PODS:
99
- hermes-engine/Pre-built (= 0.81.1)
1010
- hermes-engine/Pre-built (0.81.1)
1111
- Intercom (19.5.4)
12-
- intercom-react-native (9.7.1):
12+
- intercom-react-native (9.8.0):
1313
- boost
1414
- DoubleConversion
1515
- fast_float

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@intercom/intercom-react-native",
3-
"version": "9.7.1",
3+
"version": "9.8.0",
44
"description": "React Native wrapper to bridge our iOS and Android SDK",
55
"source": "./src/index.tsx",
66
"main": "./lib/commonjs/index.js",

0 commit comments

Comments
 (0)