@cometchat/skills 4.4.2 → 5.0.0
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/.claude-plugin/marketplace.json +55 -0
- package/.claude-plugin/plugin.json +14 -0
- package/CHANGELOG.md +36 -0
- package/LICENSE +21 -0
- package/README.md +41 -163
- package/RULES.md +114 -0
- package/bin/cometchat-skills.mjs +1180 -0
- package/bin/legacy-skills.json +95 -0
- package/catalogs/android-v6.json +1646 -0
- package/catalogs/flutter-v6.json +651 -0
- package/catalogs/ios-v5.json +1383 -0
- package/catalogs/rn-calls-v5.json +134 -0
- package/catalogs/rn-calls-v5.symbols.txt +58 -0
- package/catalogs/rn-sdk-v4.json +672 -0
- package/catalogs/rn-v5.json +449 -0
- package/catalogs/rn-v5.symbols.txt +216 -0
- package/catalogs/sdk-android-v5.json +514 -0
- package/contracts.android-calls-v5.json +122 -0
- package/contracts.android-v6.json +135 -0
- package/contracts.angular-v5.json +694 -0
- package/contracts.flutter-calls-v5.json +77 -0
- package/contracts.flutter-v6.json +126 -0
- package/contracts.ios-calls-v5.json +67 -0
- package/contracts.ios-v5.json +436 -0
- package/contracts.json +82 -0
- package/contracts.rn-calls-v5.json +77 -0
- package/contracts.rn-v5.json +727 -0
- package/contracts.sdk-android-v5.json +15 -0
- package/contracts.web-calls-v5.json +45 -0
- package/features.android-calls-v5.json +246 -0
- package/features.android-v6.json +65 -0
- package/features.angular-v5.json +521 -0
- package/features.flutter-calls-v5.json +286 -0
- package/features.flutter-v6.json +484 -0
- package/features.ios-calls-v5.json +236 -0
- package/features.ios-v5.json +573 -0
- package/features.json +61 -0
- package/features.rn-calls-v5.json +187 -0
- package/features.rn-v5.json +614 -0
- package/features.sdk-android-v5.json +40 -0
- package/features.sdk-jsv4.json +24 -0
- package/features.web-calls-v5.json +108 -0
- package/package.json +151 -74
- package/peers.yaml +312 -0
- package/registry/README.md +31 -0
- package/registry/android-calls-v5.json +54 -0
- package/registry/android-v6.json +137 -0
- package/registry/angular-v5.json +114 -0
- package/registry/flutter-calls-v5.json +54 -0
- package/registry/flutter-v6.json +119 -0
- package/registry/ios-calls-v5.json +59 -0
- package/registry/ios-v5.json +97 -0
- package/registry/rn-calls-v5.json +59 -0
- package/registry/rn-v5.json +129 -0
- package/registry/sdk-android-v5.json +53 -0
- package/registry/sdk-jsv4.json +53 -0
- package/registry/web-calls-v5.json +54 -0
- package/registry/web-v7.json +99 -0
- package/skills/cometchat/SKILL.md +42 -2096
- package/skills/cometchat-android-v5-calls-sdk/SKILL.md +206 -0
- package/skills/cometchat-android-v5-calls-sdk/references/build-truth.md +63 -0
- package/skills/cometchat-android-v5-calls-sdk/references/docs-map.md +119 -0
- package/skills/cometchat-android-v5-calls-sdk/references/method-map.md +53 -0
- package/skills/cometchat-android-v5-calls-sdk/references/pitfalls.md +72 -0
- package/skills/cometchat-android-v5-calls-sdk/references/ringing.md +92 -0
- package/skills/cometchat-android-v5-calls-sdk/references/user-switch.md +90 -0
- package/skills/cometchat-android-v5-sdk/SKILL.md +127 -0
- package/skills/cometchat-android-v5-sdk/references/app-surface.md +88 -0
- package/skills/cometchat-android-v5-sdk/references/docs-map.md +91 -0
- package/skills/cometchat-android-v6-builder-settings/SKILL.md +51 -137
- package/skills/cometchat-android-v6-calls/SKILL.md +128 -413
- package/skills/cometchat-android-v6-compose-components/SKILL.md +84 -194
- package/skills/cometchat-android-v6-compose-customization/SKILL.md +66 -411
- package/skills/cometchat-android-v6-compose-placement/SKILL.md +154 -237
- package/skills/cometchat-android-v6-core/SKILL.md +236 -672
- package/skills/cometchat-android-v6-core/references/anti-patterns.md +31 -0
- package/skills/cometchat-android-v6-core/references/component-props.md +168 -0
- package/skills/cometchat-android-v6-core/references/docs-map.md +153 -0
- package/skills/cometchat-android-v6-core/references/layout.md +112 -0
- package/skills/cometchat-android-v6-core/references/lifecycle.md +75 -0
- package/skills/cometchat-android-v6-core/references/setup-credentials.md +105 -0
- package/skills/cometchat-android-v6-core/references/troubleshooting.md +36 -0
- package/skills/cometchat-android-v6-events/SKILL.md +46 -184
- package/skills/cometchat-android-v6-extensions/SKILL.md +39 -179
- package/skills/cometchat-android-v6-features/SKILL.md +74 -143
- package/skills/cometchat-android-v6-kotlin-components/SKILL.md +75 -193
- package/skills/cometchat-android-v6-kotlin-customization/SKILL.md +67 -419
- package/skills/cometchat-android-v6-kotlin-placement/SKILL.md +77 -223
- package/skills/cometchat-android-v6-migration/SKILL.md +67 -378
- package/skills/cometchat-android-v6-production/SKILL.md +40 -179
- package/skills/cometchat-android-v6-push/SKILL.md +39 -289
- package/skills/cometchat-android-v6-testing/SKILL.md +50 -265
- package/skills/cometchat-android-v6-troubleshooting/SKILL.md +70 -254
- package/skills/cometchat-angular-v5-calls/SKILL.md +193 -0
- package/skills/cometchat-angular-v5-components/SKILL.md +131 -0
- package/skills/cometchat-angular-v5-components/references/catalog.md +111 -0
- package/skills/cometchat-angular-v5-components/references/host-composed.md +46 -0
- package/skills/cometchat-angular-v5-core/SKILL.md +300 -0
- package/skills/cometchat-angular-v5-core/references/anti-patterns.md +49 -0
- package/skills/cometchat-angular-v5-core/references/component-props.md +55 -0
- package/skills/cometchat-angular-v5-core/references/dependencies.md +66 -0
- package/skills/cometchat-angular-v5-core/references/docs-map.md +132 -0
- package/skills/cometchat-angular-v5-core/references/layout.md +64 -0
- package/skills/cometchat-angular-v5-core/references/lifecycle.md +202 -0
- package/skills/cometchat-angular-v5-core/references/setup-credentials.md +137 -0
- package/skills/cometchat-angular-v5-core/references/theming.md +70 -0
- package/skills/cometchat-angular-v5-core/references/troubleshooting.md +27 -0
- package/skills/cometchat-angular-v5-customization/SKILL.md +94 -0
- package/skills/cometchat-angular-v5-features/SKILL.md +107 -0
- package/skills/cometchat-angular-v5-features/references/custom-messages.md +133 -0
- package/skills/cometchat-angular-v5-features/references/formatters.md +28 -0
- package/skills/cometchat-angular-v5-features/references/host-composed-extensions.md +85 -0
- package/skills/cometchat-angular-v5-migration/SKILL.md +40 -0
- package/skills/cometchat-angular-v5-migration/references/migration-guide.md +165 -0
- package/skills/cometchat-angular-v5-patterns/SKILL.md +107 -0
- package/skills/cometchat-angular-v5-placement/SKILL.md +133 -0
- package/skills/cometchat-angular-v5-placement/references/combined-app.md +174 -0
- package/skills/cometchat-angular-v5-placement/references/core-surface.md +199 -0
- package/skills/cometchat-angular-v5-production/SKILL.md +101 -0
- package/skills/cometchat-angular-v5-push/SKILL.md +61 -0
- package/skills/cometchat-angular-v5-testing/SKILL.md +112 -0
- package/skills/cometchat-angular-v5-troubleshooting/SKILL.md +96 -0
- package/skills/cometchat-flutter-v5-sdk/SKILL.md +188 -0
- package/skills/cometchat-flutter-v5-sdk/references/doc-corrections.md +55 -0
- package/skills/cometchat-flutter-v5-sdk/references/docs-map.md +211 -0
- package/skills/cometchat-flutter-v5-sdk/references/platform-notes.md +48 -0
- package/skills/cometchat-flutter-v5-sdk/references/transcription.md +87 -0
- package/skills/cometchat-flutter-v6-calls/SKILL.md +75 -389
- package/skills/cometchat-flutter-v6-components/SKILL.md +88 -361
- package/skills/cometchat-flutter-v6-core/SKILL.md +154 -593
- package/skills/cometchat-flutter-v6-core/references/anti-patterns.md +55 -0
- package/skills/cometchat-flutter-v6-core/references/docs-map.md +143 -0
- package/skills/cometchat-flutter-v6-core/references/layout.md +45 -0
- package/skills/cometchat-flutter-v6-core/references/lifecycle.md +87 -0
- package/skills/cometchat-flutter-v6-core/references/setup-credentials.md +84 -0
- package/skills/cometchat-flutter-v6-core/references/troubleshooting.md +26 -0
- package/skills/cometchat-flutter-v6-customization/SKILL.md +70 -712
- package/skills/cometchat-flutter-v6-events/SKILL.md +79 -174
- package/skills/cometchat-flutter-v6-features/SKILL.md +55 -394
- package/skills/cometchat-flutter-v6-migration/SKILL.md +68 -367
- package/skills/cometchat-flutter-v6-migration/references/migration-guide.md +131 -0
- package/skills/cometchat-flutter-v6-patterns/SKILL.md +61 -0
- package/skills/cometchat-flutter-v6-placement/SKILL.md +94 -381
- package/skills/cometchat-flutter-v6-production/SKILL.md +58 -615
- package/skills/cometchat-flutter-v6-push/SKILL.md +46 -455
- package/skills/cometchat-flutter-v6-testing/SKILL.md +68 -299
- package/skills/cometchat-flutter-v6-troubleshooting/SKILL.md +54 -878
- package/skills/cometchat-ios-calls/SKILL.md +112 -563
- package/skills/cometchat-ios-components/SKILL.md +44 -834
- package/skills/cometchat-ios-core/SKILL.md +181 -1068
- package/skills/cometchat-ios-core/references/anti-patterns.md +80 -0
- package/skills/cometchat-ios-core/references/docs-map.md +123 -0
- package/skills/cometchat-ios-core/references/install.md +23 -0
- package/skills/cometchat-ios-core/references/layout.md +186 -0
- package/skills/cometchat-ios-core/references/setup-credentials.md +197 -0
- package/skills/cometchat-ios-core/references/swiftui.md +91 -0
- package/skills/cometchat-ios-core/references/troubleshooting.md +100 -0
- package/skills/cometchat-ios-customization/SKILL.md +33 -968
- package/skills/cometchat-ios-features/SKILL.md +29 -738
- package/skills/cometchat-ios-migration/SKILL.md +39 -0
- package/skills/cometchat-ios-placement/SKILL.md +51 -729
- package/skills/cometchat-ios-push/SKILL.md +24 -602
- package/skills/cometchat-ios-v5-sdk/SKILL.md +161 -0
- package/skills/cometchat-ios-v5-sdk/references/docs-map.md +326 -0
- package/skills/cometchat-js-v5-sdk/SKILL.md +95 -0
- package/skills/cometchat-js-v5-sdk/references/docs-map.md +114 -0
- package/skills/cometchat-onboarding/SKILL.md +89 -0
- package/skills/cometchat-onboarding/references/archetypes.md +51 -0
- package/skills/cometchat-onboarding/references/calling-first.md +77 -0
- package/skills/cometchat-onboarding/references/not-in-this-pack.md +8 -0
- package/skills/cometchat-onboarding/references/plan-artifact.md +133 -0
- package/skills/cometchat-onboarding/references/platforms.md +90 -0
- package/skills/cometchat-react-native-bare-patterns/SKILL.md +120 -0
- package/skills/cometchat-react-native-calls/SKILL.md +200 -0
- package/skills/cometchat-react-native-components/SKILL.md +142 -0
- package/skills/cometchat-react-native-core/SKILL.md +313 -0
- package/skills/cometchat-react-native-core/references/anti-patterns.md +79 -0
- package/skills/cometchat-react-native-core/references/component-props.md +105 -0
- package/skills/cometchat-react-native-core/references/dependencies.md +62 -0
- package/skills/cometchat-react-native-core/references/docs-map.md +126 -0
- package/skills/cometchat-react-native-core/references/layout.md +61 -0
- package/skills/cometchat-react-native-core/references/lifecycle.md +64 -0
- package/skills/cometchat-react-native-core/references/setup-credentials.md +39 -0
- package/skills/cometchat-react-native-customization/SKILL.md +198 -0
- package/skills/cometchat-react-native-expo-patterns/SKILL.md +116 -0
- package/skills/cometchat-react-native-features/SKILL.md +122 -0
- package/skills/cometchat-react-native-migration/SKILL.md +103 -0
- package/skills/cometchat-react-native-placement/SKILL.md +158 -0
- package/skills/cometchat-react-native-production/SKILL.md +78 -0
- package/skills/cometchat-react-native-push/SKILL.md +88 -0
- package/skills/cometchat-react-native-sdk/SKILL.md +126 -0
- package/skills/cometchat-react-native-sdk/references/method-map.md +239 -0
- package/skills/cometchat-react-native-sdk/references/page-map.md +96 -0
- package/skills/cometchat-react-native-testing/SKILL.md +94 -0
- package/skills/cometchat-react-native-troubleshooting/SKILL.md +116 -0
- package/skills/cometchat-react-native-v5-sdk/SKILL.md +150 -0
- package/skills/cometchat-react-native-v5-sdk/references/docs-map.md +127 -0
- package/skills/cometchat-react-native-v5-sdk/references/ringing-voip.md +369 -0
- package/skills/cometchat-react-v7-calls/SKILL.md +75 -0
- package/skills/cometchat-react-v7-components/SKILL.md +72 -0
- package/skills/cometchat-react-v7-core/SKILL.md +101 -0
- package/skills/cometchat-react-v7-core/references/anti-patterns.md +19 -0
- package/skills/cometchat-react-v7-core/references/component-props.md +82 -0
- package/skills/cometchat-react-v7-core/references/dependencies.md +23 -0
- package/skills/cometchat-react-v7-core/references/docs-map.md +117 -0
- package/skills/cometchat-react-v7-core/references/i18n-rtl-a11y.md +22 -0
- package/skills/cometchat-react-v7-core/references/layout.md +158 -0
- package/skills/cometchat-react-v7-core/references/lifecycle.md +74 -0
- package/skills/cometchat-react-v7-core/references/setup-credentials.md +58 -0
- package/skills/cometchat-react-v7-core/references/ssr.md +11 -0
- package/skills/cometchat-react-v7-core/references/theming.md +52 -0
- package/skills/cometchat-react-v7-core/references/troubleshooting.md +28 -0
- package/skills/cometchat-react-v7-customization/SKILL.md +84 -0
- package/skills/cometchat-react-v7-features/SKILL.md +92 -0
- package/skills/cometchat-react-v7-migration/SKILL.md +39 -0
- package/skills/cometchat-react-v7-migration/references/migration-guide.md +119 -0
- package/skills/cometchat-react-v7-patterns/SKILL.md +43 -0
- package/skills/cometchat-react-v7-placement/SKILL.md +106 -0
- package/skills/cometchat-react-v7-placement/references/recipes.md +354 -0
- package/skills/cometchat-react-v7-push/SKILL.md +53 -0
- package/test-suite/README.md +70 -0
- package/test-suite/catalogs/android-calls-v5.json +830 -0
- package/test-suite/catalogs/android-calls-v5.symbols.txt +499 -0
- package/test-suite/catalogs/android-v6.json +1646 -0
- package/test-suite/catalogs/android-v6.symbols.txt +298 -0
- package/test-suite/catalogs/angular-v5.json +7587 -0
- package/test-suite/catalogs/flutter-calls-v5.json +196 -0
- package/test-suite/catalogs/flutter-calls-v5.symbols.txt +59 -0
- package/test-suite/catalogs/flutter-v6.json +651 -0
- package/test-suite/catalogs/ios-calls-v5.json +158 -0
- package/test-suite/catalogs/ios-calls-v5.symbols.txt +70 -0
- package/test-suite/catalogs/ios-v5.json +1383 -0
- package/test-suite/catalogs/ios-v5.symbols.txt +699 -0
- package/test-suite/catalogs/rn-calls-v5.json +134 -0
- package/test-suite/catalogs/rn-sdk-v4.json +672 -0
- package/test-suite/catalogs/rn-v5.json +449 -0
- package/test-suite/catalogs/sdk-android-v5.json +514 -0
- package/test-suite/catalogs/sdk-android-v5.symbols.txt +254 -0
- package/test-suite/catalogs/sdk-jsv4.json +800 -0
- package/test-suite/catalogs/web-calls-v5.json +195 -0
- package/test-suite/catalogs/web-v7.json +1243 -0
- package/test-suite/scripts/build-registry.mjs +113 -0
- package/test-suite/scripts/catalog-refresh-dart.mjs +151 -0
- package/test-suite/scripts/catalog-refresh.mjs +100 -0
- package/test-suite/scripts/lint-skills.mjs +909 -0
- package/test-suite/scripts/measure-tokens.mjs +169 -0
- package/test-suite/scripts/typecheck-fences-dart.mjs +437 -0
- package/test-suite/scripts/typecheck-fences-kotlin.mjs +269 -0
- package/test-suite/scripts/typecheck-fences.mjs +206 -0
- package/test-suite/scripts/verify-catalog.mjs +242 -0
- package/test-suite/scripts/verify-contract-fences.mjs +94 -0
- package/test-suite/scripts/verify-detection.mjs +178 -0
- package/test-suite/scripts/verify-docs-base.mjs +91 -0
- package/test-suite/scripts/verify-family-agnostic.mjs +130 -0
- package/test-suite/scripts/verify-golden-path.mjs +138 -0
- package/test-suite/scripts/verify-oracle-components.mjs +133 -0
- package/test-suite/scripts/verify-template-bindings.mjs +148 -0
- package/test-suite/typecheck/angular-v5/package.json +21 -0
- package/test-suite/typecheck/angular-v5/tsconfig.json +21 -0
- package/test-suite/typecheck/flutter-v6/analysis_options.yaml +25 -0
- package/test-suite/typecheck/flutter-v6/pubspec.yaml +21 -0
- package/test-suite/typecheck/web-v7/package.json +18 -0
- package/test-suite/typecheck/web-v7/tsconfig.json +19 -0
- package/bin/install.js +0 -1003
- package/skills/.claude-plugin/marketplace.json +0 -86
- package/skills/cometchat/references/asking-questions.md +0 -48
- package/skills/cometchat-a11y/SKILL.md +0 -477
- package/skills/cometchat-android-v5/SKILL.md +0 -121
- package/skills/cometchat-android-v5-calls/SKILL.md +0 -429
- package/skills/cometchat-android-v5-calls/references/README.md +0 -53
- package/skills/cometchat-android-v5-calls/references/add-calls-to-existing-chat.md +0 -197
- package/skills/cometchat-android-v5-calls/references/audio-controls.md +0 -91
- package/skills/cometchat-android-v5-calls/references/background-handling.md +0 -168
- package/skills/cometchat-android-v5-calls/references/call-layouts.md +0 -131
- package/skills/cometchat-android-v5-calls/references/call-logs.md +0 -113
- package/skills/cometchat-android-v5-calls/references/call-session.md +0 -274
- package/skills/cometchat-android-v5-calls/references/custom-ui.md +0 -150
- package/skills/cometchat-android-v5-calls/references/event-listeners.md +0 -123
- package/skills/cometchat-android-v5-calls/references/group-calls.md +0 -205
- package/skills/cometchat-android-v5-calls/references/idle-timeout.md +0 -117
- package/skills/cometchat-android-v5-calls/references/in-call-chat.md +0 -134
- package/skills/cometchat-android-v5-calls/references/join-session.md +0 -120
- package/skills/cometchat-android-v5-calls/references/migration-v4-to-v5.md +0 -222
- package/skills/cometchat-android-v5-calls/references/participant-management.md +0 -110
- package/skills/cometchat-android-v5-calls/references/picture-in-picture.md +0 -106
- package/skills/cometchat-android-v5-calls/references/raise-hand.md +0 -248
- package/skills/cometchat-android-v5-calls/references/recording.md +0 -101
- package/skills/cometchat-android-v5-calls/references/ringing-integration.md +0 -152
- package/skills/cometchat-android-v5-calls/references/screen-sharing.md +0 -78
- package/skills/cometchat-android-v5-calls/references/server-fcm-voip.md +0 -215
- package/skills/cometchat-android-v5-calls/references/session-settings.md +0 -121
- package/skills/cometchat-android-v5-calls/references/setup.md +0 -137
- package/skills/cometchat-android-v5-calls/references/share-invite.md +0 -156
- package/skills/cometchat-android-v5-calls/references/video-controls.md +0 -87
- package/skills/cometchat-android-v5-calls/references/voip-calling.md +0 -526
- package/skills/cometchat-android-v5-components/SKILL.md +0 -431
- package/skills/cometchat-android-v5-core/SKILL.md +0 -486
- package/skills/cometchat-android-v5-customization/SKILL.md +0 -469
- package/skills/cometchat-android-v5-extensions/SKILL.md +0 -127
- package/skills/cometchat-android-v5-features/SKILL.md +0 -131
- package/skills/cometchat-android-v5-placement/SKILL.md +0 -277
- package/skills/cometchat-android-v5-production/SKILL.md +0 -95
- package/skills/cometchat-android-v5-push/SKILL.md +0 -619
- package/skills/cometchat-android-v5-testing/SKILL.md +0 -188
- package/skills/cometchat-android-v5-theming/SKILL.md +0 -167
- package/skills/cometchat-android-v5-troubleshooting/SKILL.md +0 -74
- package/skills/cometchat-android-v6/SKILL.md +0 -108
- package/skills/cometchat-android-v6-calls/references/add-calls-to-existing-chat.md +0 -97
- package/skills/cometchat-android-v6-calls/references/advanced-features.md +0 -87
- package/skills/cometchat-android-v6-calls/references/call-layouts.md +0 -100
- package/skills/cometchat-android-v6-calls/references/call-session.md +0 -163
- package/skills/cometchat-android-v6-calls/references/device-management.md +0 -172
- package/skills/cometchat-android-v6-calls/references/group-calls.md +0 -191
- package/skills/cometchat-android-v6-calls/references/idle-timeout.md +0 -110
- package/skills/cometchat-android-v6-calls/references/in-call-chat.md +0 -141
- package/skills/cometchat-android-v6-calls/references/raise-hand.md +0 -188
- package/skills/cometchat-android-v6-calls/references/ringing-integration.md +0 -176
- package/skills/cometchat-android-v6-calls/references/server-fcm-voip.md +0 -127
- package/skills/cometchat-android-v6-calls/references/share-invite.md +0 -105
- package/skills/cometchat-android-v6-compose-theming/SKILL.md +0 -250
- package/skills/cometchat-android-v6-kotlin-theming/SKILL.md +0 -233
- package/skills/cometchat-angular-calls/SKILL.md +0 -380
- package/skills/cometchat-angular-calls/references/add-calls-to-existing-chat.md +0 -96
- package/skills/cometchat-angular-calls/references/call-layouts.md +0 -123
- package/skills/cometchat-angular-calls/references/call-session.md +0 -167
- package/skills/cometchat-angular-calls/references/custom-ui.md +0 -239
- package/skills/cometchat-angular-calls/references/device-management.md +0 -154
- package/skills/cometchat-angular-calls/references/group-calls.md +0 -433
- package/skills/cometchat-angular-calls/references/idle-timeout.md +0 -161
- package/skills/cometchat-angular-calls/references/in-call-chat.md +0 -148
- package/skills/cometchat-angular-calls/references/lazy-loading-pitfalls.md +0 -205
- package/skills/cometchat-angular-calls/references/migration-v4-to-v5.md +0 -53
- package/skills/cometchat-angular-calls/references/ngzone-and-async-callbacks.md +0 -184
- package/skills/cometchat-angular-calls/references/picture-in-picture.md +0 -285
- package/skills/cometchat-angular-calls/references/raise-hand.md +0 -172
- package/skills/cometchat-angular-calls/references/recording-screen-share.md +0 -260
- package/skills/cometchat-angular-calls/references/ringing-integration.md +0 -133
- package/skills/cometchat-angular-calls/references/server-web-push-vapid.md +0 -100
- package/skills/cometchat-angular-calls/references/share-invite.md +0 -122
- package/skills/cometchat-angular-calls/references/virtual-background.md +0 -29
- package/skills/cometchat-angular-components/SKILL.md +0 -235
- package/skills/cometchat-angular-core/SKILL.md +0 -386
- package/skills/cometchat-angular-customization/SKILL.md +0 -616
- package/skills/cometchat-angular-features/SKILL.md +0 -329
- package/skills/cometchat-angular-patterns/SKILL.md +0 -256
- package/skills/cometchat-angular-placement/SKILL.md +0 -314
- package/skills/cometchat-angular-production/SKILL.md +0 -564
- package/skills/cometchat-angular-push/SKILL.md +0 -389
- package/skills/cometchat-angular-testing/SKILL.md +0 -605
- package/skills/cometchat-angular-theming/SKILL.md +0 -290
- package/skills/cometchat-angular-troubleshooting/SKILL.md +0 -364
- package/skills/cometchat-astro-patterns/SKILL.md +0 -708
- package/skills/cometchat-calls/SKILL.md +0 -364
- package/skills/cometchat-calls/references/use-case-broadcast.md +0 -199
- package/skills/cometchat-calls/references/use-case-marketplace.md +0 -157
- package/skills/cometchat-calls/references/use-case-support.md +0 -189
- package/skills/cometchat-calls/references/use-case-team.md +0 -180
- package/skills/cometchat-calls/references/use-case-telehealth.md +0 -153
- package/skills/cometchat-components/SKILL.md +0 -1142
- package/skills/cometchat-core/SKILL.md +0 -1048
- package/skills/cometchat-customization/SKILL.md +0 -580
- package/skills/cometchat-customization/references/component-catalog.md +0 -236
- package/skills/cometchat-features/SKILL.md +0 -861
- package/skills/cometchat-flutter-v5/SKILL.md +0 -173
- package/skills/cometchat-flutter-v5-calls/SKILL.md +0 -455
- package/skills/cometchat-flutter-v5-calls/references/add-calls-to-existing-chat.md +0 -193
- package/skills/cometchat-flutter-v5-calls/references/call-layouts.md +0 -103
- package/skills/cometchat-flutter-v5-calls/references/call-session.md +0 -285
- package/skills/cometchat-flutter-v5-calls/references/device-management.md +0 -124
- package/skills/cometchat-flutter-v5-calls/references/group-calls.md +0 -181
- package/skills/cometchat-flutter-v5-calls/references/idle-timeout.md +0 -99
- package/skills/cometchat-flutter-v5-calls/references/in-call-chat.md +0 -135
- package/skills/cometchat-flutter-v5-calls/references/migration-v4-to-v5.md +0 -210
- package/skills/cometchat-flutter-v5-calls/references/raise-hand.md +0 -255
- package/skills/cometchat-flutter-v5-calls/references/ringing-integration.md +0 -196
- package/skills/cometchat-flutter-v5-calls/references/server-push-bridge.md +0 -101
- package/skills/cometchat-flutter-v5-calls/references/share-invite.md +0 -148
- package/skills/cometchat-flutter-v5-conversations/SKILL.md +0 -118
- package/skills/cometchat-flutter-v5-core/SKILL.md +0 -239
- package/skills/cometchat-flutter-v5-customization/SKILL.md +0 -358
- package/skills/cometchat-flutter-v5-events/SKILL.md +0 -156
- package/skills/cometchat-flutter-v5-messages/SKILL.md +0 -259
- package/skills/cometchat-flutter-v5-production/SKILL.md +0 -216
- package/skills/cometchat-flutter-v5-push/SKILL.md +0 -285
- package/skills/cometchat-flutter-v5-testing/SKILL.md +0 -401
- package/skills/cometchat-flutter-v5-theming/SKILL.md +0 -161
- package/skills/cometchat-flutter-v5-troubleshooting/SKILL.md +0 -130
- package/skills/cometchat-flutter-v5-users-groups/SKILL.md +0 -152
- package/skills/cometchat-flutter-v6/SKILL.md +0 -446
- package/skills/cometchat-flutter-v6-calls/references/add-calls-to-existing-chat.md +0 -136
- package/skills/cometchat-flutter-v6-calls/references/advanced-features.md +0 -89
- package/skills/cometchat-flutter-v6-calls/references/call-layouts.md +0 -105
- package/skills/cometchat-flutter-v6-calls/references/call-session.md +0 -229
- package/skills/cometchat-flutter-v6-calls/references/device-management.md +0 -105
- package/skills/cometchat-flutter-v6-calls/references/group-calls.md +0 -190
- package/skills/cometchat-flutter-v6-calls/references/idle-timeout.md +0 -88
- package/skills/cometchat-flutter-v6-calls/references/in-call-chat.md +0 -125
- package/skills/cometchat-flutter-v6-calls/references/raise-hand.md +0 -275
- package/skills/cometchat-flutter-v6-calls/references/ringing-integration.md +0 -171
- package/skills/cometchat-flutter-v6-calls/references/server-push-bridge.md +0 -93
- package/skills/cometchat-flutter-v6-calls/references/share-invite.md +0 -102
- package/skills/cometchat-flutter-v6-conversations/SKILL.md +0 -238
- package/skills/cometchat-flutter-v6-messages/SKILL.md +0 -384
- package/skills/cometchat-flutter-v6-theming/SKILL.md +0 -293
- package/skills/cometchat-flutter-v6-users-groups/SKILL.md +0 -224
- package/skills/cometchat-i18n/SKILL.md +0 -419
- package/skills/cometchat-ios/SKILL.md +0 -325
- package/skills/cometchat-ios-calls/references/add-calls-to-existing-chat.md +0 -181
- package/skills/cometchat-ios-calls/references/audio-modes-and-controls.md +0 -45
- package/skills/cometchat-ios-calls/references/avaudiosession-routing.md +0 -188
- package/skills/cometchat-ios-calls/references/call-layouts.md +0 -76
- package/skills/cometchat-ios-calls/references/call-session.md +0 -218
- package/skills/cometchat-ios-calls/references/callkit-and-pushkit.md +0 -357
- package/skills/cometchat-ios-calls/references/custom-ui.md +0 -322
- package/skills/cometchat-ios-calls/references/device-management.md +0 -171
- package/skills/cometchat-ios-calls/references/group-calls.md +0 -359
- package/skills/cometchat-ios-calls/references/idle-timeout.md +0 -184
- package/skills/cometchat-ios-calls/references/in-call-chat.md +0 -179
- package/skills/cometchat-ios-calls/references/migration-v4-to-v5.md +0 -196
- package/skills/cometchat-ios-calls/references/picture-in-picture.md +0 -246
- package/skills/cometchat-ios-calls/references/raise-hand.md +0 -26
- package/skills/cometchat-ios-calls/references/recording-screen-share.md +0 -252
- package/skills/cometchat-ios-calls/references/ringing-integration.md +0 -143
- package/skills/cometchat-ios-calls/references/server-apns-pushkit.md +0 -267
- package/skills/cometchat-ios-calls/references/share-invite.md +0 -148
- package/skills/cometchat-ios-calls/references/swiftui-uikit-hosting.md +0 -246
- package/skills/cometchat-ios-calls/references/voip-cert-setup.md +0 -166
- package/skills/cometchat-ios-production/SKILL.md +0 -738
- package/skills/cometchat-ios-testing/SKILL.md +0 -376
- package/skills/cometchat-ios-theming/SKILL.md +0 -667
- package/skills/cometchat-ios-troubleshooting/SKILL.md +0 -1003
- package/skills/cometchat-native-bare-patterns/SKILL.md +0 -550
- package/skills/cometchat-native-calls/SKILL.md +0 -671
- package/skills/cometchat-native-calls/references/add-calls-to-existing-chat.md +0 -203
- package/skills/cometchat-native-calls/references/call-layouts.md +0 -125
- package/skills/cometchat-native-calls/references/call-session.md +0 -182
- package/skills/cometchat-native-calls/references/custom-ui.md +0 -254
- package/skills/cometchat-native-calls/references/device-management.md +0 -158
- package/skills/cometchat-native-calls/references/expo-vs-bare.md +0 -179
- package/skills/cometchat-native-calls/references/group-calls.md +0 -296
- package/skills/cometchat-native-calls/references/idle-timeout.md +0 -128
- package/skills/cometchat-native-calls/references/in-call-chat.md +0 -145
- package/skills/cometchat-native-calls/references/migration-v4-to-v5.md +0 -72
- package/skills/cometchat-native-calls/references/picture-in-picture.md +0 -276
- package/skills/cometchat-native-calls/references/raise-hand.md +0 -205
- package/skills/cometchat-native-calls/references/recording-screen-share.md +0 -169
- package/skills/cometchat-native-calls/references/ringing-integration.md +0 -118
- package/skills/cometchat-native-calls/references/server-push-bridge.md +0 -135
- package/skills/cometchat-native-calls/references/server-push-payloads.md +0 -193
- package/skills/cometchat-native-calls/references/share-invite.md +0 -146
- package/skills/cometchat-native-calls/references/voip-push-end-to-end.md +0 -319
- package/skills/cometchat-native-components/SKILL.md +0 -628
- package/skills/cometchat-native-core/SKILL.md +0 -679
- package/skills/cometchat-native-customization/SKILL.md +0 -716
- package/skills/cometchat-native-expo-patterns/SKILL.md +0 -552
- package/skills/cometchat-native-features/SKILL.md +0 -638
- package/skills/cometchat-native-placement/SKILL.md +0 -509
- package/skills/cometchat-native-production/SKILL.md +0 -700
- package/skills/cometchat-native-push/SKILL.md +0 -594
- package/skills/cometchat-native-testing/SKILL.md +0 -582
- package/skills/cometchat-native-theming/SKILL.md +0 -681
- package/skills/cometchat-native-troubleshooting/SKILL.md +0 -501
- package/skills/cometchat-nextjs-patterns/SKILL.md +0 -899
- package/skills/cometchat-placement/SKILL.md +0 -1360
- package/skills/cometchat-production/SKILL.md +0 -1027
- package/skills/cometchat-react-calls/SKILL.md +0 -752
- package/skills/cometchat-react-calls/references/add-calls-to-existing-chat.md +0 -146
- package/skills/cometchat-react-calls/references/call-layouts.md +0 -160
- package/skills/cometchat-react-calls/references/call-session.md +0 -235
- package/skills/cometchat-react-calls/references/custom-ui.md +0 -247
- package/skills/cometchat-react-calls/references/device-management.md +0 -210
- package/skills/cometchat-react-calls/references/group-calls.md +0 -257
- package/skills/cometchat-react-calls/references/idle-timeout.md +0 -188
- package/skills/cometchat-react-calls/references/in-call-chat.md +0 -212
- package/skills/cometchat-react-calls/references/migration-v4-to-v5.md +0 -170
- package/skills/cometchat-react-calls/references/picture-in-picture.md +0 -245
- package/skills/cometchat-react-calls/references/raise-hand.md +0 -238
- package/skills/cometchat-react-calls/references/recording-screen-share.md +0 -144
- package/skills/cometchat-react-calls/references/ringing-integration.md +0 -255
- package/skills/cometchat-react-calls/references/server-web-push-vapid.md +0 -241
- package/skills/cometchat-react-calls/references/share-invite.md +0 -175
- package/skills/cometchat-react-calls/references/testing-calls-on-web.md +0 -216
- package/skills/cometchat-react-calls/references/virtual-background.md +0 -32
- package/skills/cometchat-react-calls/references/voip-and-web-push.md +0 -165
- package/skills/cometchat-react-patterns/SKILL.md +0 -628
- package/skills/cometchat-react-push/SKILL.md +0 -634
- package/skills/cometchat-react-router-patterns/SKILL.md +0 -758
- package/skills/cometchat-react-testing/SKILL.md +0 -413
- package/skills/cometchat-theming/SKILL.md +0 -498
- package/skills/cometchat-troubleshooting/SKILL.md +0 -294
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cometchat-react-native-sdk
|
|
3
|
+
description: "The headless CometChat Chat SDK for React Native — a method → contract map for the fallback path, plus init/login ordering and listener lifecycle. Use when the UI Kit has no component for what you need, or when building a fully custom chat UI. Triggers: CometChat SDK React Native, headless chat RN, custom chat UI React Native, sendMessage React Native, CometChat listener leak, banned members RN, change my avatar, update my profile, update user details React Native, log the user out."
|
|
4
|
+
license: "MIT"
|
|
5
|
+
compatibility: "React Native >=0.77; @cometchat/chat-sdk-react-native ^4.0.28"
|
|
6
|
+
metadata:
|
|
7
|
+
author: "CometChat"
|
|
8
|
+
version: "1.0.0"
|
|
9
|
+
tags: "chat cometchat react-native sdk headless methods listeners fallback"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
> **Ground truth:** `@cometchat/chat-sdk-react-native@4` + catalog `rn-sdk-v4.json` (317 symbols).
|
|
13
|
+
> Signatures in `references/method-map.md` are verbatim from the installed `.d.ts`, not from prose.
|
|
14
|
+
> Docs: `/sdk/react-native/llms-react-native-v4.md` (scoped index).
|
|
15
|
+
|
|
16
|
+
## Companion skills (read first)
|
|
17
|
+
- `cometchat-react-native-core` — install, provider chain, init→login→render. Assumed, not repeated here.
|
|
18
|
+
|
|
19
|
+
## Use this skill when
|
|
20
|
+
- **the UI Kit has no component** for what you need — the common case, see below
|
|
21
|
+
- "build my own chat UI" · "just give me the data layer" · "sendMessage in React Native"
|
|
22
|
+
- "duplicate messages" · "listener leak" · "how do I page through history"
|
|
23
|
+
|
|
24
|
+
## Prerequisites & install
|
|
25
|
+
The SDK ships **under** the UI Kit — if `core` is installed, so is this. A headless-only app
|
|
26
|
+
installs it alone:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npm install @cometchat/chat-sdk-react-native@4 @react-native-async-storage/async-storage@^2.1.2
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
⚠️ Not `@cometchat/chat-sdk-javascript` — that is the web package.
|
|
33
|
+
|
|
34
|
+
## The rule: UI Kit first, SDK as fallback
|
|
35
|
+
|
|
36
|
+
For any feature, check whether the UI Kit has a component (`components` skill + the catalog).
|
|
37
|
+
**If it does, use it.** Reach for the SDK only when it does not.
|
|
38
|
+
|
|
39
|
+
On React Native that fallback path is **not rare**. Kit v5 removed the detail and management
|
|
40
|
+
screens, so these have no component at all and are pure SDK work:
|
|
41
|
+
|
|
42
|
+
| Need | Why there is no component | Map section |
|
|
43
|
+
|---|---|---|
|
|
44
|
+
| user / group details | `CometChatDetails` removed in v5 | Users & groups |
|
|
45
|
+
| add members | `CometChatAddMembers` removed | Users & groups |
|
|
46
|
+
| **view / unban banned members** | **no UI surface exists at all** | Users & groups |
|
|
47
|
+
| transfer ownership | `CometChatTransferOwnership` removed | Users & groups |
|
|
48
|
+
| call log detail | only the list ships | Calls |
|
|
49
|
+
|
|
50
|
+
## The maps — page-wise first
|
|
51
|
+
|
|
52
|
+
**`references/page-map.md`** — the primary index, **page-wise like the JavaScript SDK repo**:
|
|
53
|
+
intent → the docs page → the methods that page demonstrates → the contract facts the RN page
|
|
54
|
+
does not carry. 37 pages, derived from the live docs so it cannot drift. Start here.
|
|
55
|
+
|
|
56
|
+
**`references/method-map.md`** — the per-method companion for when you already know the method
|
|
57
|
+
and need its exact signature, return type and constraints. 80 methods, 127/127 accounted for.
|
|
58
|
+
|
|
59
|
+
Both open with the same **fallback ladder**, and it matters: these cover most of the SDK, not
|
|
60
|
+
all of it, so **"not listed" never means "does not exist."** Rung 2 is the catalog — that, not
|
|
61
|
+
a map, is the existence authority.
|
|
62
|
+
|
|
63
|
+
**Load `page-map.md` for any SDK question.** It answers, per method: signature, what it resolves to, what it
|
|
64
|
+
rejects with, prerequisites, and what it will refuse to do. That last one matters most — it records
|
|
65
|
+
**negative facts** a docs page cannot express by omission, e.g. *there is no `sendCardMessage()`*,
|
|
66
|
+
which an agent would otherwise invent by symmetry with the three send methods that do exist.
|
|
67
|
+
|
|
68
|
+
Each row is marked `D` (backed by the RN docs) or `T` (recovered from the `.d.ts` because the RN
|
|
69
|
+
page is thin — **RN-G15**). Do not present a `T` row as documented; it is correct, and the docs gap
|
|
70
|
+
is real.
|
|
71
|
+
|
|
72
|
+
## Ordering — the invariant
|
|
73
|
+
|
|
74
|
+
`init()` must resolve before `login()`. `login()` must resolve before you fetch or send.
|
|
75
|
+
Anything else fails quietly rather than throwing.
|
|
76
|
+
|
|
77
|
+
```tsx
|
|
78
|
+
import { CometChat } from "@cometchat/chat-sdk-react-native";
|
|
79
|
+
|
|
80
|
+
const settings = new CometChat.AppSettingsBuilder()
|
|
81
|
+
.setRegion(REGION)
|
|
82
|
+
.subscribePresenceForAllUsers()
|
|
83
|
+
.autoEstablishSocketConnection(true)
|
|
84
|
+
.build();
|
|
85
|
+
|
|
86
|
+
await CometChat.init(APP_ID, settings);
|
|
87
|
+
await CometChat.login(UID, AUTH_KEY); // dev only; production passes an auth token
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
⚠️ `login` is **variadic and untyped** in the `.d.ts` (`login(...args: any)`), so TypeScript will
|
|
91
|
+
**not** catch a wrong call. The two real shapes are `login(uid, authKey)` and `login(authToken)`.
|
|
92
|
+
|
|
93
|
+
## Listener lifecycle — the defect this skill exists to prevent
|
|
94
|
+
|
|
95
|
+
```tsx
|
|
96
|
+
useEffect(() => {
|
|
97
|
+
const id = "chat-screen";
|
|
98
|
+
CometChat.addMessageListener(id, new CometChat.MessageListener({
|
|
99
|
+
onTextMessageReceived: (m) => setMessages((prev) => [...prev, m]),
|
|
100
|
+
}));
|
|
101
|
+
return () => CometChat.removeMessageListener(id); // NOT optional
|
|
102
|
+
}, []);
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
`addMessageListener` returns **void**, not a subscription — the string id is your only handle. The
|
|
106
|
+
SDK holds the listener, not React, so it survives navigation and unmount. Omitting the cleanup is
|
|
107
|
+
the top cause of duplicate messages, and it worsens the longer the app runs.
|
|
108
|
+
|
|
109
|
+
## Fetching is always a builder
|
|
110
|
+
Lists are paginated: `new CometChat.XRequestBuilder().setLimit(n).build()` then `.fetchNext()`.
|
|
111
|
+
An empty array means the end — it does not throw. There is no bare `getMessages()`.
|
|
112
|
+
|
|
113
|
+
## Common pitfalls
|
|
114
|
+
1. **Dropping the listener cleanup** — duplicate messages that grow over time.
|
|
115
|
+
2. **Calling a bare `sendMessage()`** — everything is namespaced under `CometChat`.
|
|
116
|
+
3. **Inventing `sendCardMessage()`** — card messages are receive-only.
|
|
117
|
+
4. **`await`ing `startTyping`** — it returns void.
|
|
118
|
+
5. **Treating `getLoggedinUser()` returning `null` as an error** — it is the normal no-session answer. (Note the lowercase `in`.)
|
|
119
|
+
6. **Shipping ban without unban** — `CometChatGroupMembers` shows active members only; wire `BannedMembersRequestBuilder` + `unbanGroupMember` too.
|
|
120
|
+
7. **Registering a push token before `login` resolves** — it belongs to no user.
|
|
121
|
+
|
|
122
|
+
## Verify it works
|
|
123
|
+
- Every symbol appears in `catalogs/rn-sdk-v4.json`.
|
|
124
|
+
- `npm run verify:fences:rn-v5` is green.
|
|
125
|
+
- Every `add*Listener` has a matching `remove*Listener` on the teardown path.
|
|
126
|
+
- Pagination, error handling and the ban round trip are wired — not just the happy path.
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
# method-map — CometChat React Native Chat SDK v4
|
|
2
|
+
|
|
3
|
+
The **fallback lookup**: which method, what it returns, what it throws, what it refuses to do.
|
|
4
|
+
|
|
5
|
+
Field names follow the **JavaScript SDK's** contract schema (derived from all 20 of its
|
|
6
|
+
documented pages), so the two read identically:
|
|
7
|
+
`Package` · `Import` · `Key methods` · `Key classes` · `Primary output` · `Prerequisites` ·
|
|
8
|
+
`Constraints` · `Listeners registered` · `Request builder` · `Related`.
|
|
9
|
+
|
|
10
|
+
Signatures are **verbatim from the installed `.d.ts`** of `@cometchat/chat-sdk-react-native@4.0.28`.
|
|
11
|
+
Every symbol is in `catalogs/rn-sdk-v4.json` (317 symbols).
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## ⚠️ IF IT IS NOT IN THIS MAP — the fallback ladder
|
|
16
|
+
|
|
17
|
+
This map covers **~60 of the SDK's 127 methods**. That is deliberate: a dump of all 127 would
|
|
18
|
+
include internals nobody should call, and a map nobody reads is worse than no map.
|
|
19
|
+
|
|
20
|
+
**So "not listed here" does NOT mean "does not exist."** Never conclude absence from this file.
|
|
21
|
+
Walk the ladder instead — each rung is cheaper than the one below it:
|
|
22
|
+
|
|
23
|
+
| # | Rung | Answers | Cost |
|
|
24
|
+
|---|---|---|---|
|
|
25
|
+
| 1 | **this map** | full contract | free |
|
|
26
|
+
| 2 | **`catalogs/rn-sdk-v4.json`** | *does it exist at all?* **Not in the catalog ⇒ it does not exist — do not emit it.** | free |
|
|
27
|
+
| 3 | **scoped SDK index** — `{DOCS_BASE}/sdk/react-native/llms-react-native-v4.md` | which page covers it | ~3k tok |
|
|
28
|
+
| 4 | **that page + `.md`** | its Quick Reference accordion, then prose | 1 page |
|
|
29
|
+
| 5 | **the installed `.d.ts`** | the signature, when the page is thin | last resort |
|
|
30
|
+
|
|
31
|
+
**Rung 5 carries an obligation.** If you had to read the `.d.ts` because the docs did not answer,
|
|
32
|
+
that is a **DOCS GAP** — flag it for the developer (page · what is missing · why it mattered).
|
|
33
|
+
Never silently source-fill: a gap that is filled quietly is a gap that is never fixed, and the
|
|
34
|
+
next agent re-derives it from scratch.
|
|
35
|
+
|
|
36
|
+
Two things this map will never cover, by design:
|
|
37
|
+
- **calls** — a different package (`@cometchat/calls-sdk-react-native`); see the `calls` skill
|
|
38
|
+
- **internals** — `getApiKey` · `getAppId` · `connect` · `disconnect` · `isInitialized` ·
|
|
39
|
+
`getConnectionStatus` · `setSource` · `setDemoMetaInfo`. They exist; a chat integration has
|
|
40
|
+
no reason to call them.
|
|
41
|
+
|
|
42
|
+
> Everything hangs off the namespace: `import { CometChat } from "@cometchat/chat-sdk-react-native"`.
|
|
43
|
+
> A bare `sendMessage()` does not exist. The RN docs frequently print the bare form.
|
|
44
|
+
|
|
45
|
+
Row source: **`D`** = backed by the RN docs · **`T`** = recovered from the `.d.ts` because the RN
|
|
46
|
+
page is thin (**RN-G15**). A `T` row is correct but **not documented** — say so if you rely on it.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Lifecycle
|
|
51
|
+
|
|
52
|
+
| Field | Value |
|
|
53
|
+
|---|---|
|
|
54
|
+
| Package | `@cometchat/chat-sdk-react-native` |
|
|
55
|
+
| Import | `import { CometChat } from "@cometchat/chat-sdk-react-native";` |
|
|
56
|
+
| Key classes | `AppSettingsBuilder` · `AppSettings` · `User` · `CometChatException` |
|
|
57
|
+
| Prerequisites | none — this is the entry point |
|
|
58
|
+
| Constraints | `init` must **resolve** before `login`; `login` must resolve before any fetch or send. Out of order fails **quietly**, not loudly. |
|
|
59
|
+
|
|
60
|
+
| Method | Signature | Returns | Notes | Src |
|
|
61
|
+
|---|---|---|---|---|
|
|
62
|
+
| `init` | `init(appId: any, appSettings: AppSettings): Promise<boolean>` | `true` | rejects `CometChatException`; always `await` and log | D |
|
|
63
|
+
| `initFromSettings` | `initFromSettings(settings): Promise<boolean>` | `true` | settings-object form; also sets telemetry attribution | T |
|
|
64
|
+
| `login` | `login(...args: any): Promise<User>` | `User` | **VARIADIC AND UNTYPED** — TS catches nothing. Real shapes: `login(uid, authKey)` dev, `login(authToken)` prod | T |
|
|
65
|
+
| `logout` | `logout(): Promise<Object>` | — | unregister the push token **first** | D |
|
|
66
|
+
| `getLoggedinUser` | `getLoggedinUser(): Promise<User \| null>` | `User` or **`null`** | `null` = no session, **not an error**. Lowercase **`in`** | T |
|
|
67
|
+
|
|
68
|
+
## Messaging — send
|
|
69
|
+
|
|
70
|
+
| Field | Value |
|
|
71
|
+
|---|---|
|
|
72
|
+
| Key classes | `TextMessage` · `MediaMessage` · `CustomMessage` · `InteractiveMessage` |
|
|
73
|
+
| Primary output | `Promise<BaseMessage>` — resolves the **sent** message; rejects `CometChatException` |
|
|
74
|
+
| Receiver targeting | `RECEIVER_TYPE.USER` → a **UID** · `RECEIVER_TYPE.GROUP` → a **GUID** |
|
|
75
|
+
| Constraints | **There is no `sendCardMessage()`.** Card/interactive messages are **receive-only** from the client — verified absent from the catalog. Do not invent it by symmetry with the three that exist. |
|
|
76
|
+
| Receive counterpart | `addMessageListener` — see Listeners |
|
|
77
|
+
|
|
78
|
+
| Method | Signature | Notes | Src |
|
|
79
|
+
|---|---|---|---|
|
|
80
|
+
| `sendMessage` | `sendMessage(message: TextMessage \| MediaMessage \| CustomMessage \| InteractiveMessage \| any): Promise<…>` | the one you want in almost every case | D |
|
|
81
|
+
| `sendMediaMessage` | `sendMediaMessage(message: Object): Promise<…>` | attachment count is server-capped; over it **rejects**, not truncates | T |
|
|
82
|
+
| `sendCustomMessage` | `sendCustomMessage(message): Promise<…>` | app-defined JSON payloads | D |
|
|
83
|
+
| `sendInteractiveMessage` | `sendInteractiveMessage(message): Promise<…>` | forms/schedulers | T |
|
|
84
|
+
| `sendTransientMessage` | `sendTransientMessage(message): void` | ephemeral (live reactions); **not persisted, returns void** | T |
|
|
85
|
+
| `sendDirectMessage` | `sendDirectMessage(message: Object): Promise<…>` | 1:1 variant — **coexists with `sendMessage`, neither marked deprecated.** Prefer `sendMessage`; the docs use it | T |
|
|
86
|
+
| `sendGroupMessage` | `sendGroupMessage(message: any): Promise<…>` | group variant, same caveat | T |
|
|
87
|
+
|
|
88
|
+
## Messaging — modify & moderate
|
|
89
|
+
|
|
90
|
+
| Method | Signature | Notes | Src |
|
|
91
|
+
|---|---|---|---|
|
|
92
|
+
| `editMessage` | `editMessage(message): Promise<BaseMessage>` | resolves the edited message | T |
|
|
93
|
+
| `deleteMessage` | `deleteMessage(messageId): Promise<BaseMessage>` | soft delete — resolves a **tombstone**, the message does not vanish | T |
|
|
94
|
+
| `getMessageDetails` | `getMessageDetails(messageId): Promise<BaseMessage>` | single message by id | T |
|
|
95
|
+
| `flagMessage` | `flagMessage(messageId, reason): Promise<…>` | moderation report | T |
|
|
96
|
+
| `getFlagReasons` | `getFlagReasons(): Promise<…>` | fetch the allowed reasons — **do not hardcode them** | T |
|
|
97
|
+
| `addReaction` | `addReaction(messageId, reaction: string): Promise<BaseMessage>` | reactions are **core** in v5, no extension to enable | T |
|
|
98
|
+
| `removeReaction` | `removeReaction(messageId, reaction: string): Promise<BaseMessage>` | | T |
|
|
99
|
+
|
|
100
|
+
## Receipts, typing & unread
|
|
101
|
+
|
|
102
|
+
| Method | Signature | Notes | Src |
|
|
103
|
+
|---|---|---|---|
|
|
104
|
+
| `markAsRead` | `markAsRead(...args: any): any` | **untyped, returns `any`** — treat as fire-and-forget | T |
|
|
105
|
+
| `markAsDelivered` | `markAsDelivered(...args): any` | usually automatic; call only for custom flows | T |
|
|
106
|
+
| `markAsUnread` | `markAsUnread(message): Promise<…>` | | T |
|
|
107
|
+
| `markConversationAsRead` | `markConversationAsRead(conversation): Promise<…>` | whole conversation at once | T |
|
|
108
|
+
| `getMessageReceipts` | `getMessageReceipts(messageId): Promise<Array<MessageReceipt>>` | per-recipient delivery/read state | T |
|
|
109
|
+
| `markConversationAsDelivered` | `markConversationAsDelivered(conversation): Promise<…>` | conversation-level pair of `markConversationAsRead` | T |
|
|
110
|
+
| `markMessageAsUnread` | `markMessageAsUnread(message): Promise<…>` | **coexists with `markAsUnread`**, neither deprecated — prefer `markAsUnread` | T |
|
|
111
|
+
| `getLastDeliveredMessageId` | `getLastDeliveredMessageId(...): any` | resume point for a receipt sync | T |
|
|
112
|
+
| `markAsInteracted` | `markAsInteracted(messageId, interactionElementId): Promise<…>` | required for **interactive** messages, or engagement never registers | T |
|
|
113
|
+
| `startTyping` | `startTyping(typingNotification): void` | **void — do not `await`** | T |
|
|
114
|
+
| `endTyping` | `endTyping(typingNotification): void` | must be called explicitly; no client-side auto-expiry | T |
|
|
115
|
+
| `getUnreadMessageCount` | `getUnreadMessageCount(...): Promise<Object>` | **Family:** `…ForUser` · `…ForGroup` · `…ForAllUsers` · `…ForAllGroups` are scoped variants with the same shape — pick by scope; not listed individually | T |
|
|
116
|
+
|
|
117
|
+
## Users
|
|
118
|
+
|
|
119
|
+
| Field | Value |
|
|
120
|
+
|---|---|
|
|
121
|
+
| Key classes | `User` · `UsersRequestBuilder` |
|
|
122
|
+
| Request builder | `new CometChat.UsersRequestBuilder().setLimit(n).build()` then `.fetchNext()` |
|
|
123
|
+
| Constraints | **`createUser` needs the Auth Key** → it is a **backend** call. A client that can create users can create *any* user. |
|
|
124
|
+
|
|
125
|
+
| Method | Signature | Notes | Src |
|
|
126
|
+
|---|---|---|---|
|
|
127
|
+
| `getUser` | `getUser(uid: any): Promise<User>` | | D |
|
|
128
|
+
| `updateUser` | `updateUser(user, authKey): Promise<User>` | Auth Key ⇒ backend only | T |
|
|
129
|
+
| `updateCurrentUserDetails` | `updateCurrentUserDetails(user): Promise<User>` | the **client-safe** way for a user to edit themselves | T |
|
|
130
|
+
| `blockUsers` | `blockUsers(uids: Array<string>): Promise<Object>` | takes an **array**, not one uid | T |
|
|
131
|
+
| `unblockUsers` | `unblockUsers(uids: Array<string>): Promise<Object>` | | T |
|
|
132
|
+
| `getOnlineUserCount` | `getOnlineUserCount(): Promise<number>` | cheaper than paging users just to count presence | T |
|
|
133
|
+
| `getOnlineGroupMemberCount` | `getOnlineGroupMemberCount(guids): Promise<Object>` | per-group online counts | T |
|
|
134
|
+
|
|
135
|
+
## Groups
|
|
136
|
+
|
|
137
|
+
| Field | Value |
|
|
138
|
+
|---|---|
|
|
139
|
+
| Key classes | `Group` · `GroupMember` · `GroupMembersRequestBuilder` · `BannedMembersRequestBuilder` |
|
|
140
|
+
| Request builder | `GroupMembersRequestBuilder` lists **active** members · `BannedMembersRequestBuilder` lists **banned** ones |
|
|
141
|
+
| Constraints | ban/unban/kick/transfer are **admin or owner scope only**. Kit v5 ships **no component** for add-members, banned-members, details or transfer — this is the whole implementation surface. |
|
|
142
|
+
|
|
143
|
+
| Method | Signature | Notes | Src |
|
|
144
|
+
|---|---|---|---|
|
|
145
|
+
| `createGroup` | `createGroup(group): Promise<Group>` | | T |
|
|
146
|
+
| `createGroupWithMembers` | `createGroupWithMembers(group, members, banned): Promise<Object>` | create + seed in one call — saves an `addMembersToGroup` round trip | T |
|
|
147
|
+
| `getGroup` | `getGroup(guid: string \| Object): Promise<Group>` | | D |
|
|
148
|
+
| `updateGroup` | `updateGroup(group: any): Promise<Group>` | | T |
|
|
149
|
+
| `deleteGroup` | `deleteGroup(guid): Promise<boolean>` | | T |
|
|
150
|
+
| `joinGroup` | `joinGroup(guid, type, password?): Promise<Group>` | password only for password-protected groups | T |
|
|
151
|
+
| `leaveGroup` | `leaveGroup(guid): Promise<boolean>` | | T |
|
|
152
|
+
| `addMembersToGroup` | `addMembersToGroup(guid: string, groupMembers: Array<GroupMember>, bannedMembersList: Array<string>): Promise<Object>` | **THREE args** — the third is easy to forget | T |
|
|
153
|
+
| `kickGroupMember` | `kickGroupMember(guid, uid): Promise<boolean>` | reversible — the user may rejoin | T |
|
|
154
|
+
| `banGroupMember` | `banGroupMember(guid, uid): Promise<boolean>` | **one half of a round trip** ↓ | T |
|
|
155
|
+
| `unbanGroupMember` | `unbanGroupMember(guid, uid): Promise<boolean>` | the other half | T |
|
|
156
|
+
| `updateGroupMemberScope` | `updateGroupMemberScope(guid, uid, scope): Promise<string>` | promote/demote | T |
|
|
157
|
+
| `transferGroupOwnership` | `transferGroupOwnership(guid, uid): Promise<string>` | resolves a **string**, not a `Group` | T |
|
|
158
|
+
|
|
159
|
+
> ⚠️ **The ban round trip.** `CometChatGroupMembers` shows **active** members only and v5 ships no
|
|
160
|
+
> banned-members UI. An app that offers ban and nothing else leaves the admin unable to see or
|
|
161
|
+
> reverse it. Always ship `BannedMembersRequestBuilder` + `unbanGroupMember` alongside `banGroupMember`.
|
|
162
|
+
|
|
163
|
+
## Conversations
|
|
164
|
+
|
|
165
|
+
| Field | Value |
|
|
166
|
+
|---|---|
|
|
167
|
+
| Request builder | `new CometChat.ConversationsRequestBuilder().setLimit(n).build()` → `.fetchNext()`; an **empty array means the end**, it does not throw |
|
|
168
|
+
|
|
169
|
+
| Method | Signature | Notes | Src |
|
|
170
|
+
|---|---|---|---|
|
|
171
|
+
| `getConversation` | `getConversation(conversationWith, type): Promise<Conversation>` | | T |
|
|
172
|
+
| `deleteConversation` | `deleteConversation(conversationWith, type): Promise<string>` | | T |
|
|
173
|
+
| `muteConversations` | `muteConversations(...): Promise<…>` | | T |
|
|
174
|
+
| `unmuteConversations` | `unmuteConversations(...): Promise<…>` | | T |
|
|
175
|
+
| `tagConversation` | `tagConversation(...): Promise<Conversation>` | custom tags (pin, archive) | T |
|
|
176
|
+
| `getMutedConversations` | `getMutedConversations(): Promise<Array<Conversation>>` | the read side of mute/unmute — without it the mute state is write-only | T |
|
|
177
|
+
|
|
178
|
+
## Listeners — every `add` has a `remove`
|
|
179
|
+
|
|
180
|
+
| Field | Value |
|
|
181
|
+
|---|---|
|
|
182
|
+
| Primary output | **`void`** — not a subscription. The string `name` is your only handle. |
|
|
183
|
+
| Constraints | The **SDK** holds the listener, not React — it survives unmount and navigation. Omitting the removal is the top cause of duplicate messages, and it worsens the longer the app runs. |
|
|
184
|
+
|
|
185
|
+
| Register | Remove | Covers | Src |
|
|
186
|
+
|---|---|---|---|
|
|
187
|
+
| `addMessageListener(name, l)` | `removeMessageListener(name)` | messages, typing, receipts, reactions | D |
|
|
188
|
+
| `addUserListener(name, l)` | `removeUserListener(name)` | presence (online/offline) | T |
|
|
189
|
+
| `addGroupListener(name, l)` | `removeGroupListener(name)` | joins, leaves, kicks, bans, scope changes | T |
|
|
190
|
+
| `addCallListener(name, l)` | `removeCallListener(name)` | call lifecycle — see the `calls` skill | T |
|
|
191
|
+
| `addLoginListener(name, l)` | `removeLoginListener(name)` | session/token expiry | T |
|
|
192
|
+
| `addConnectionListener(name, l)` | `removeConnectionListener(name)` | socket connect/disconnect | T |
|
|
193
|
+
| `addAIAssistantListener(name, l)` | `removeAIAssistantListener(name)` | AI assistant streaming | T |
|
|
194
|
+
| `addNotificationFeedListener(name, l)` | `removeNotificationFeedListener(name)` | in-app notification feed | T |
|
|
195
|
+
|
|
196
|
+
## Push
|
|
197
|
+
|
|
198
|
+
| Method | Signature | Notes | Src |
|
|
199
|
+
|---|---|---|---|
|
|
200
|
+
| `CometChatNotifications.registerPushToken` | `registerPushToken(pushToken: string, platform: PushPlatforms, providerId?: string): Promise<string>` | **the one the docs use.** Register **after** `login` resolves. Platform constant differs per OS — fetch it, do not guess | D |
|
|
201
|
+
| `CometChatNotifications.unregisterPushToken` | `unregisterPushToken(): Promise<string>` | on logout — skip it and the next user of the device gets the previous user's pushes | D |
|
|
202
|
+
| `markPushNotificationDelivered` | `markPushNotificationDelivered(...): Promise<…>` | delivery analytics; optional | T |
|
|
203
|
+
| `markPushNotificationClicked` | `markPushNotificationClicked(...): Promise<…>` | click-through analytics; optional | T |
|
|
204
|
+
| `registerTokenForPushNotification` | `registerTokenForPushNotification(token: string, settings?: {}): Promise<string>` | **an older, different signature that still exists and is NOT marked deprecated.** Two live ways to do one thing — prefer `registerPushToken`; flagged so the wrong one is not picked by accident | T |
|
|
205
|
+
|
|
206
|
+
## AI & feature gates
|
|
207
|
+
|
|
208
|
+
| Method | Signature | Notes | Src |
|
|
209
|
+
|---|---|---|---|
|
|
210
|
+
| `getConversationSummary` | `getConversationSummary(receiverId, receiverType): Promise<string>` | dashboard-gated | T |
|
|
211
|
+
| `getConversationStarter` | `getConversationStarter(receiverId, receiverType): Promise<Array<string>>` | dashboard-gated | T |
|
|
212
|
+
| `getSmartReplies` | `getSmartReplies(receiverId, receiverType): Promise<Object>` | dashboard-gated | T |
|
|
213
|
+
| `askBot` | `askBot(...): Promise<Object>` | AI bots | T |
|
|
214
|
+
| `isFeatureEnabled` | `isFeatureEnabled(feature: string): boolean` | check before offering a gated feature | T |
|
|
215
|
+
| `isAIFeatureEnabled` | `isAIFeatureEnabled(feature: string): boolean` | AI equivalent | T |
|
|
216
|
+
| `isExtensionEnabled` | `isExtensionEnabled(extensionId: string): boolean` | check before wiring a dashboard extension | T |
|
|
217
|
+
| `getExtensionDetails` | `getExtensionDetails(extensionId): Promise<Object>` | config for an enabled extension | T |
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## Deliberately excluded — and why
|
|
222
|
+
|
|
223
|
+
Named here so "absent" reads as *out of scope*, never as *forgotten*:
|
|
224
|
+
|
|
225
|
+
| Excluded | Count | Why |
|
|
226
|
+
|---|---|---|
|
|
227
|
+
| calls (`initiateCall`, `acceptCall`, `endCall`, …) | 11 | different package; the `calls` skill owns them |
|
|
228
|
+
| internals (`getApiKey`, `connect`, `isInitialized`, …) | 11 | a chat integration has no reason to call them |
|
|
229
|
+
| unread-count scoped variants | 4 | same shape as `getUnreadMessageCount`; documented as a family |
|
|
230
|
+
| preferences / push-preferences / timezone | 8 | niche; reach them via the ladder |
|
|
231
|
+
| notification-feed item methods | 5 | narrow feature; `addNotificationFeedListener` is the entry point |
|
|
232
|
+
| `createUploadFileRequest` | 1 | internal upload plumbing — **not even a public export** (absent from `catalogs/rn-sdk-v4.json`); `sendMediaMessage` is the public path |
|
|
233
|
+
| `reportFeedEngagement` | 1 | notification-feed analytics; same cluster as above |
|
|
234
|
+
|
|
235
|
+
**Accounting: 127 of 127.** Every method in the SDK is either mapped above or excluded here with
|
|
236
|
+
a reason. Nothing is silently absent — that is the property that makes rung 2 of the ladder
|
|
237
|
+
trustworthy.
|
|
238
|
+
|
|
239
|
+
Anything above is still **in the catalog** — rung 2 confirms it exists, rung 3 finds its page.
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# page-map — CometChat React Native Chat SDK v4: intent → page → contract
|
|
2
|
+
|
|
3
|
+
**Page-wise, exactly like the JavaScript SDK repo.** One row per docs page: the intent it
|
|
4
|
+
answers, the page to fetch, the methods it demonstrates, and the contract facts the RN page
|
|
5
|
+
does **not** carry.
|
|
6
|
+
|
|
7
|
+
Fetch a page as `{SDK_DOCS_BASE}/sdk/react-native/<page>` **+ `.md`**. `QR` marks pages that
|
|
8
|
+
already carry an "AI Integration Quick Reference" accordion — read it first when present.
|
|
9
|
+
|
|
10
|
+
Rows and method lists are **derived from the live RN docs pages**, not hand-typed, so they
|
|
11
|
+
cannot drift from what the pages actually demonstrate. Every method named is in
|
|
12
|
+
`catalogs/rn-sdk-v4.json`.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## ⚠️ IF THE PAGE OR METHOD IS NOT HERE — the fallback ladder
|
|
17
|
+
|
|
18
|
+
This maps **37 pages**. It is not the whole SDK, and **"not listed" NEVER means "does not
|
|
19
|
+
exist."** Walk the ladder, cheapest rung first:
|
|
20
|
+
|
|
21
|
+
| # | Rung | Answers |
|
|
22
|
+
|---|---|---|
|
|
23
|
+
| 1 | **this page-map** | which page · which methods · the traps |
|
|
24
|
+
| 2 | **`catalogs/rn-sdk-v4.json`** (317 symbols) | *does it exist at all?* **Not in the catalog ⇒ do not emit it.** |
|
|
25
|
+
| 3 | **scoped index** `/sdk/react-native/llms-react-native-v4.md` | which page covers it (~3k tok) |
|
|
26
|
+
| 4 | **that page + `.md`** | its Quick Reference, then prose |
|
|
27
|
+
| 5 | **the installed `.d.ts`** | the signature — last resort, **and flag a DOCS GAP** |
|
|
28
|
+
|
|
29
|
+
Rung 5 carries an obligation: if the docs did not answer and you read the `.d.ts`, that **is** a
|
|
30
|
+
docs gap — flag it (page · what is missing · why it mattered). Silently source-filling
|
|
31
|
+
guarantees the next agent re-derives it.
|
|
32
|
+
|
|
33
|
+
**Not covered here by design:** calls (a different package — see the `calls` skill) and SDK
|
|
34
|
+
internals (`getApiKey`, `getAppId`, `connect`, `disconnect`, `isInitialized`, `setSource`).
|
|
35
|
+
|
|
36
|
+
> Everything is namespaced: `import { CometChat } from "@cometchat/chat-sdk-react-native"`.
|
|
37
|
+
> A bare `sendMessage()` does not exist — the RN docs often print the bare form.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
| Intent | Page (`+ .md`) | Methods it demonstrates | QR | Contract facts the page does NOT carry |
|
|
42
|
+
|---|---|---|---|---|
|
|
43
|
+
| AI agents | [`ai-agents`](/sdk/react-native/ai-agents) | `addAIAssistantListener` · `addMessageListener` · `init` · `login` · `removeAIAssistantListener` · `removeMessageListener` | ✓ | |
|
|
44
|
+
| add members | [`group-add-members`](/sdk/react-native/group-add-members) | `addGroupListener` · `addMembersToGroup` · `removeGroupListener` | ✓ | `addMembersToGroup(guid, groupMembers, bannedMembersList)` takes **three** args — the third is easy to omit. |
|
|
45
|
+
| all listeners | [`real-time-listeners`](/sdk/react-native/real-time-listeners) | `addCallListener` · `addGroupListener` · `addMessageListener` · `addUserListener` · `removeCallListener` · `removeGroupListener` … | ✓ | **Every `add*Listener(id, …)` needs `remove*Listener(id)` on teardown.** The SDK holds the listener, not React, so it survives unmount — the top cause of duplicate messages. |
|
|
46
|
+
| attachments | [`upload-files`](/sdk/react-native/upload-files) | `logout` · `sendMediaMessage` | — | |
|
|
47
|
+
| block · unblock | [`block-users`](/sdk/react-native/block-users) | `blockUsers` · `unblockUsers` | ✓ | `blockUsers` / `unblockUsers` take an **array** of uids, not a single uid. |
|
|
48
|
+
| campaigns · notification feed | [`campaigns`](/sdk/react-native/campaigns) | `addMessageListener` · `addNotificationFeedListener` · `getNotificationFeedItem` · `getNotificationFeedUnreadCount` · `markFeedItemAsDelivered` · `markFeedItemAsRead` … | — | |
|
|
49
|
+
| connection state | [`connection-status`](/sdk/react-native/connection-status) | `addConnectionListener` · `getConnectionStatus` · `init` · `removeConnectionListener` | ✓ | `connect`/`disconnect` are internals — only for manual socket control, which most apps should not do. |
|
|
50
|
+
| conversation list | [`retrieve-conversations`](/sdk/react-native/retrieve-conversations) | `getConversation` · `tagConversation` | ✓ | Paginated: `new CometChat.ConversationsRequestBuilder().setLimit(n).build()` → `.fetchNext()`. An **empty array means the end** — it does not throw. |
|
|
51
|
+
| create a group | [`create-group`](/sdk/react-native/create-group) | `createGroup` · `createGroupWithMembers` | ✓ | |
|
|
52
|
+
| create/update a user | [`user-management`](/sdk/react-native/user-management) | `createUser` · `updateCurrentUserDetails` · `updateUser` | ✓ | `updateUser` needs the Auth Key ⇒ backend. `updateCurrentUserDetails` is the **client-safe** way for a user to edit themselves. |
|
|
53
|
+
| delete a conversation | [`delete-conversation`](/sdk/react-native/delete-conversation) | `deleteConversation` | ✓ | |
|
|
54
|
+
| delete a group | [`delete-group`](/sdk/react-native/delete-group) | `deleteGroup` | ✓ | |
|
|
55
|
+
| delete a message | [`delete-message`](/sdk/react-native/delete-message) | `addMessageListener` · `deleteMessage` | ✓ | Soft delete — resolves a **tombstone**; the message does not vanish. |
|
|
56
|
+
| edit a message | [`edit-message`](/sdk/react-native/edit-message) | `addMessageListener` · `editMessage` · `removeMessageListener` | ✓ | |
|
|
57
|
+
| ephemeral messages | [`transient-messages`](/sdk/react-native/transient-messages) | `addMessageListener` · `sendTransientMessage` | ✓ | `sendTransientMessage` returns **void** and is **not persisted**. |
|
|
58
|
+
| group list | [`retrieve-groups`](/sdk/react-native/retrieve-groups) | `getGroup` · `getOnlineGroupMemberCount` | ✓ | Paginated via `GroupsRequestBuilder`. |
|
|
59
|
+
| install · init | [`setup-sdk`](/sdk/react-native/setup-sdk) | `init` · `login` | ✓ | `init` must **resolve** before `login`. Build settings with `AppSettingsBuilder`. Out of order fails **quietly**. |
|
|
60
|
+
| join a group | [`join-group`](/sdk/react-native/join-group) | `addGroupListener` · `joinGroup` · `removeGroupListener` | ✓ | |
|
|
61
|
+
| kick · ban · unban | [`group-kick-ban-members`](/sdk/react-native/group-kick-ban-members) | `addGroupListener` · `banGroupMember` · `kickGroupMember` · `removeGroupListener` · `unbanGroupMember` | ✓ | ⚠️ **The ban round trip.** `CometChatGroupMembers` lists **active** members only and kit v5 ships no banned-members UI. Pair `banGroupMember` with `BannedMembersRequestBuilder` + `unbanGroupMember`, or the admin cannot see or reverse a ban (RN twin of React AUDIT-082). |
|
|
62
|
+
| leave a group | [`leave-group`](/sdk/react-native/leave-group) | `addGroupListener` · `leaveGroup` · `removeGroupListener` | ✓ | |
|
|
63
|
+
| login · logout · session | [`authentication-overview`](/sdk/react-native/authentication-overview) | `createUser` · `getLoggedinUser` · `login` · `logout` | ✓ | `login(...args: any)` is **variadic and untyped** — TS catches nothing. Shapes: `login(uid, authKey)` dev, `login(authToken)` prod. `getLoggedinUser()` returns `User \| null`; `null` is the normal no-session answer. Note the lowercase **`in`**. `createUser` needs the Auth Key ⇒ **backend only**. |
|
|
64
|
+
| manual socket control | [`managing-web-sockets-connections-manually`](/sdk/react-native/managing-web-sockets-connections-manually) | `connect` · `disconnect` · `getLoggedinUser` · `init` · `login` · `ping` | ✓ | |
|
|
65
|
+
| mentions | [`mentions`](/sdk/react-native/mentions) | `sendMessage` | ✓ | |
|
|
66
|
+
| moderation | [`ai-moderation`](/sdk/react-native/ai-moderation) | `addMessageListener` · `removeMessageListener` · `sendMessage` | ✓ | |
|
|
67
|
+
| online/offline presence | [`user-presence`](/sdk/react-native/user-presence) | `addUserListener` · `init` · `removeUserListener` | ✓ | Requires `subscribePresenceForAllUsers()` in `AppSettingsBuilder` at init. |
|
|
68
|
+
| orientation | [`overview`](/sdk/react-native/overview) | `getLoggedinUser` · `init` · `login` | ✓ | |
|
|
69
|
+
| promote/demote a member | [`group-change-member-scope`](/sdk/react-native/group-change-member-scope) | `addGroupListener` · `removeGroupListener` · `updateGroupMemberScope` | ✓ | |
|
|
70
|
+
| reactions | [`reactions`](/sdk/react-native/reactions) | `addMessageListener` · `addReaction` · `removeMessageListener` · `removeReaction` | ✓ | Reactions are **core** in kit v5 — there is no extension to enable. Offering the legacy dashboard extension is a defect (React AUDIT-077). |
|
|
71
|
+
| receipts | [`delivery-read-receipts`](/sdk/react-native/delivery-read-receipts) | `addMessageListener` · `getMessageReceipts` · `markAsDelivered` · `markAsRead` · `markConversationAsDelivered` · `markConversationAsRead` … | ✓ | `markAsRead(...args: any): any` is **untyped** — treat as fire-and-forget. |
|
|
72
|
+
| receive messages · unread counts | [`receive-messages`](/sdk/react-native/receive-messages) | `addMessageListener` · `getLastDeliveredMessageId` · `getMessageDetails` · `getUnreadMessageCount` · `getUnreadMessageCountForAllGroups` · `getUnreadMessageCountForAllUsers` … | ✓ | `addMessageListener` returns **void**, not a subscription — the string id is your only handle. `getUnreadMessageCount` has scoped variants (`…ForUser` / `ForGroup` / `ForAllUsers` / `ForAllGroups`) with the same shape. |
|
|
73
|
+
| report a message | [`flag-message`](/sdk/react-native/flag-message) | `flagMessage` · `getFlagReasons` | ✓ | Fetch the allowed reasons with `getFlagReasons()` — **do not hardcode them**. |
|
|
74
|
+
| send a message | [`send-message`](/sdk/react-native/send-message) | `sendCustomMessage` · `sendMediaMessage` · `sendMessage` | ✓ | **There is no `sendCardMessage()`** — card/interactive messages are receive-only from the client (verified absent from the catalog). Do not invent it by symmetry. `receiverType`: `RECEIVER_TYPE.USER` → a **UID**, `GROUP` → a **GUID**. |
|
|
75
|
+
| threads | [`threaded-messages`](/sdk/react-native/threaded-messages) | `addMessageListener` · `removeMessageListener` · `sendMessage` | ✓ | |
|
|
76
|
+
| transfer ownership | [`transfer-group-ownership`](/sdk/react-native/transfer-group-ownership) | `transferGroupOwnership` | ✓ | resolves a **string**, not a `Group`. |
|
|
77
|
+
| typing | [`typing-indicators`](/sdk/react-native/typing-indicators) | `addMessageListener` · `endTyping` · `removeMessageListener` · `startTyping` | ✓ | `startTyping` / `endTyping` return **void — do not `await`**. `endTyping` must be called explicitly; there is no client-side auto-expiry. |
|
|
78
|
+
| update a group | [`update-group`](/sdk/react-native/update-group) | `updateGroup` | ✓ | |
|
|
79
|
+
| user list · presence count | [`retrieve-users`](/sdk/react-native/retrieve-users) | `getLoggedinUser` · `getOnlineUserCount` · `getUser` | ✓ | Paginated via `UsersRequestBuilder`. `getOnlineUserCount()` is cheaper than paging just to count presence. |
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## RN-G15 — why the "contract facts" column exists at all
|
|
84
|
+
|
|
85
|
+
The **JavaScript** SDK carries a full contract table on every page — `Package` · `Import` ·
|
|
86
|
+
`Key methods` · `Primary output` · `Prerequisites` · `Constraints` · `Key classes` ·
|
|
87
|
+
`Listeners registered` · `Request builder` · `Related` · `Full reference` — median **10 rows**
|
|
88
|
+
across its 20 documented pages.
|
|
89
|
+
|
|
90
|
+
The React Native pages carry a name list or a bare code snippet, and are thinner on **13 of 15**
|
|
91
|
+
shared pages. So return types, error types and constraints are largely absent.
|
|
92
|
+
|
|
93
|
+
Everything in the last column was recovered from the installed `.d.ts` or from the kit source.
|
|
94
|
+
It is correct, and it is **not documented** — say so when you rely on it, rather than presenting
|
|
95
|
+
it as if the page said it. When RN's pages gain the JS-style table, this column shrinks to a
|
|
96
|
+
pointer.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cometchat-react-native-testing
|
|
3
|
+
description: "Test a CometChat React Native integration — mock the SDK for Jest unit tests, assert init-before-render ordering and no-Auth-Key-in-source, and use Detox for the flows only a device can prove. Triggers: test CometChat React Native, mock CometChat SDK jest, detox CometChat, unit test chat screen RN, CI tests for chat."
|
|
4
|
+
license: "MIT"
|
|
5
|
+
compatibility: "React Native >=0.77; Jest; @testing-library/react-native; Detox (e2e)"
|
|
6
|
+
metadata:
|
|
7
|
+
author: "CometChat"
|
|
8
|
+
version: "1.0.0"
|
|
9
|
+
tags: "chat cometchat react-native testing jest detox mocking ci"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
> **Ground truth:** `catalogs/rn-v5.json` + `catalogs/rn-sdk-v4.json`.
|
|
13
|
+
> **Build the feature; do NOT test it unless asked.** Use this skill only when the developer asks for
|
|
14
|
+
> tests. Never add a test framework, e2e suite or CI to a project that did not request one.
|
|
15
|
+
|
|
16
|
+
## Companion skills (read first)
|
|
17
|
+
- `cometchat-react-native-core` — install, provider chain, init→login→render. Assumed, not repeated here.
|
|
18
|
+
|
|
19
|
+
## Use this skill when
|
|
20
|
+
- "write tests for the chat screen" · "mock CometChat in Jest" · "add Detox coverage for chat"
|
|
21
|
+
|
|
22
|
+
## Prerequisites & install
|
|
23
|
+
React Native ships Jest. Add the renderer:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm install --save-dev @testing-library/react-native
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Mock the SDK — never let a unit test hit the network
|
|
30
|
+
CometChat opens a websocket and needs real credentials. Mock at the module boundary:
|
|
31
|
+
|
|
32
|
+
```js
|
|
33
|
+
jest.mock("@cometchat/chat-sdk-react-native", () => ({
|
|
34
|
+
CometChat: {
|
|
35
|
+
init: jest.fn().mockResolvedValue(true),
|
|
36
|
+
login: jest.fn().mockResolvedValue({ getUid: () => "test-uid" }),
|
|
37
|
+
logout: jest.fn().mockResolvedValue(true),
|
|
38
|
+
AppSettings: { SUBSCRIPTION_TYPE_ALL_USERS: "ALL_USERS" },
|
|
39
|
+
},
|
|
40
|
+
}));
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
The UI Kit also pulls native modules, so mock the peers your test path touches —
|
|
44
|
+
`react-native-gesture-handler`, `react-native-svg`, `react-native-video`,
|
|
45
|
+
`@react-native-async-storage/async-storage`. Without them the failure is a NativeModule error that
|
|
46
|
+
never mentions CometChat: the same confusing shape as a missing install.
|
|
47
|
+
|
|
48
|
+
## What is worth asserting
|
|
49
|
+
|
|
50
|
+
**Ordering** — the invariant most likely to regress: `init` resolves before `login`, and no chat
|
|
51
|
+
component renders until login resolves.
|
|
52
|
+
|
|
53
|
+
**No Auth Key in source** — a cheap grep test that stops a shipped secret ever landing:
|
|
54
|
+
|
|
55
|
+
```js
|
|
56
|
+
it("has no auth key in source", () => {
|
|
57
|
+
const src = require("fs").readFileSync("src/config.ts", "utf8");
|
|
58
|
+
expect(src).not.toMatch(/authKey\s*:\s*["'][A-Za-z0-9]{20,}/);
|
|
59
|
+
});
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**Wiring, not rendering** — that `onItemPress` navigates, that `onBack` returns, that an opened
|
|
63
|
+
surface can be closed. Unwired affordances are the defect class worth catching.
|
|
64
|
+
|
|
65
|
+
Do **not** assert on kit internals — bubble markup, class names, child order. Those change between
|
|
66
|
+
minors, so the test breaks with nothing actually wrong.
|
|
67
|
+
|
|
68
|
+
## Detox for what only a device proves
|
|
69
|
+
|
|
70
|
+
| Flow | Why it cannot be a unit test |
|
|
71
|
+
|---|---|
|
|
72
|
+
| composer survives the keyboard | needs a real soft keyboard |
|
|
73
|
+
| hardware back navigates | needs the OS back gesture |
|
|
74
|
+
| gestures respond | proves `GestureHandlerRootView` is wired |
|
|
75
|
+
| release-build startup | catches the gesture-handler import-order crash |
|
|
76
|
+
|
|
77
|
+
**Calls and push are outside Detox too** — they need real hardware, real permissions and a second
|
|
78
|
+
device. Record them as manual device checks rather than pretending they are automated.
|
|
79
|
+
|
|
80
|
+
## CI
|
|
81
|
+
Jest with mocks runs anywhere. Detox needs a simulator — heavier, but feasible. Neither can verify
|
|
82
|
+
calls or push, so a green CI run is not evidence that either works.
|
|
83
|
+
|
|
84
|
+
## Common pitfalls
|
|
85
|
+
1. **Unmocked native peers** — confusing NativeModule errors.
|
|
86
|
+
2. **Asserting kit internals** — breaks on minor upgrades.
|
|
87
|
+
3. **Real credentials in tests** — network flakes and leaked keys.
|
|
88
|
+
4. **Claiming push/calls coverage** from a simulator run.
|
|
89
|
+
5. **Adding tests nobody asked for.**
|
|
90
|
+
|
|
91
|
+
## Verify it works
|
|
92
|
+
- Tests pass with no network access.
|
|
93
|
+
- No real credentials anywhere in the test tree.
|
|
94
|
+
- `npm run verify:fences:rn-v5` is green.
|