@planningcenter/chat-react-native 4.4.1-qa-staging.36 → 4.4.1-qa-staging.38

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.
@@ -22,6 +22,10 @@ export function SettingsScreen({}: SettingsScreenProps) {
22
22
  navigation.navigate('NotificationSettings', {})
23
23
  }, [navigation])
24
24
 
25
+ const handleFlagTest = useCallback(() => {
26
+ navigation.navigate('FlagTest')
27
+ }, [navigation])
28
+
25
29
  const handleGetHelp = useCallback(() => {
26
30
  navigation.navigate('GetHelp', { type: 'chat' })
27
31
  }, [navigation])
@@ -51,6 +55,7 @@ export function SettingsScreen({}: SettingsScreenProps) {
51
55
  )}
52
56
  <NavRow label="Notification settings" onPress={handleNotificationSettings} />
53
57
  {appName !== 'services' && <NavRow label="Get help" onPress={handleGetHelp} />}
58
+ <NavRow label="Flag test (staging)" onPress={handleFlagTest} />
54
59
  </View>
55
60
  </ScrollView>
56
61
  <View style={styles.footer}>
@@ -1,12 +1,19 @@
1
1
  import { getRequestQueryKey } from '../../hooks/use_suspense_api'
2
+ import { chatReactNativeVersion } from '../package_version'
2
3
 
3
- export const getFeaturesRequestArgs = () => {
4
+ export const getFeaturesRequestArgs = (names: readonly string[]) => {
4
5
  const url = '/me/features'
5
6
 
6
7
  return {
7
8
  url,
9
+ headers: {
10
+ 'X-PCO-API-Version': '2026-10-26',
11
+ 'X-PCO-Chat-React-Native-Version': chatReactNativeVersion,
12
+ },
8
13
  data: {
9
- perPage: 100,
14
+ where: {
15
+ name: names.join(','),
16
+ },
10
17
  fields: {
11
18
  Feature: ['name', 'enabled'],
12
19
  },
@@ -14,7 +21,7 @@ export const getFeaturesRequestArgs = () => {
14
21
  }
15
22
  }
16
23
 
17
- export const getFeaturesQueryKey = () => {
18
- const requestArgs = getFeaturesRequestArgs()
24
+ export const getFeaturesQueryKey = (names: readonly string[]) => {
25
+ const requestArgs = getFeaturesRequestArgs(names)
19
26
  return getRequestQueryKey(requestArgs)
20
27
  }