From 61325c3d556e144ceb69fb335949d7fc039275d6 Mon Sep 17 00:00:00 2001 From: Irena Szukala Date: Fri, 13 Mar 2026 13:40:46 +0100 Subject: [PATCH] chore: release 9.8.0 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 --- README.md | 51 +++++++++++++++++--- examples/example/ios/Podfile.lock | 2 +- examples/with-notifications/ios/Podfile.lock | 2 +- package.json | 2 +- 4 files changed, 47 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index c2844190..9a1ee1cf 100644 --- a/README.md +++ b/README.md @@ -828,18 +828,55 @@ This is a user that doesn't have any identifiable information such as a userId o --- -### `Intercom.loginUserWithUserAttributes({email,userId})` +### `Intercom.loginUserWithUserAttributes(userAttributes)` -Login a user with identifiable information. +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. + +###### One of `email` or `userId` is required. + +```javascript +Intercom.loginUserWithUserAttributes({ + email: 'name@intercom.com', + userId: 'userId', + name: 'Name', + phone: '010-1234-5678', + languageOverride: 'languageOverride', + signedUpAt: 1621844451, + unsubscribedFromEmails: true, + companies: [ + { + createdAt: 1621844451, + id: 'companyId', + monthlySpend: 100, + name: 'CompanyName', + plan: 'plan', + customAttributes: { + city: 'New York', + }, + }, + ], + customAttributes: { + userCustomAttribute: 123, + hasUserCustomAttribute: true, + }, +}); +``` ### Options -One of below fields is required. +| Type | Type | Required | +| ---------------------- | -------------------------------------- | -------- | +| userId | string | yes* | +| email | string | yes* | +| name | string | no | +| phone | string | no | +| languageOverride | string | no | +| signedUpAt | number (timestamp) | no | +| unsubscribedFromEmails | boolean | no | +| companies | array | no | +| customAttributes | object `{key: boolean,string, number}` | no | -| Type | Type | Required | -| ------ | ------ | -------- | -| email | string | no | -| userId | string | no | +\* One of `email` or `userId` is required. ### Returns diff --git a/examples/example/ios/Podfile.lock b/examples/example/ios/Podfile.lock index 13b29534..0367417c 100644 --- a/examples/example/ios/Podfile.lock +++ b/examples/example/ios/Podfile.lock @@ -5,7 +5,7 @@ PODS: - fmt (9.1.0) - glog (0.3.5) - Intercom (19.5.4) - - intercom-react-native (9.7.1): + - intercom-react-native (9.8.0): - DoubleConversion - glog - Intercom (~> 19.5.4) diff --git a/examples/with-notifications/ios/Podfile.lock b/examples/with-notifications/ios/Podfile.lock index 6e3e97f7..d88ce841 100644 --- a/examples/with-notifications/ios/Podfile.lock +++ b/examples/with-notifications/ios/Podfile.lock @@ -9,7 +9,7 @@ PODS: - hermes-engine/Pre-built (= 0.81.1) - hermes-engine/Pre-built (0.81.1) - Intercom (19.5.4) - - intercom-react-native (9.7.1): + - intercom-react-native (9.8.0): - boost - DoubleConversion - fast_float diff --git a/package.json b/package.json index 32b774c5..012dbcf5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@intercom/intercom-react-native", - "version": "9.7.1", + "version": "9.8.0", "description": "React Native wrapper to bridge our iOS and Android SDK", "source": "./src/index.tsx", "main": "./lib/commonjs/index.js",