@nlabs/metropolisjs 0.1.2 → 0.3.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/.github/copilot-instructions.md +167 -0
- package/AGENTS.md +13 -0
- package/CHANGELOG.md +112 -0
- package/GRAPHQL_VALIDATION_RESULTS.md +158 -0
- package/PERMISSION_GRAPHQL_INTEGRATION.md +293 -0
- package/PERMISSION_IMPLEMENTATION_SUMMARY.md +243 -0
- package/README.md +1123 -112
- package/SIGNIN_GRAPHQL_VALIDATION.md +125 -0
- package/VAULT_GRAPHQL_API_FINDINGS.md +312 -0
- package/docs/ACTIONS.md +63 -0
- package/docs/COLLECTIONS.md +1038 -0
- package/docs/CONNECTIONS.md +1367 -0
- package/docs/CRUD_INTEGRATION.md +702 -0
- package/examples/connections-usage.tsx +909 -0
- package/examples/content-actions-usage.ts +144 -0
- package/examples/crud-usage.tsx +847 -0
- package/examples/extensibility-usage.tsx +889 -0
- package/examples/i18n-import-examples.ts +86 -0
- package/examples/i18n-namespace-usage.ts +118 -0
- package/examples/i18next-singleton-demo.ts +187 -0
- package/examples/permission-system-usage.tsx +415 -0
- package/examples/project-details.tsx +397 -0
- package/examples/shared-i18n-usage.tsx +203 -0
- package/examples/signup-error-handling.ts +100 -0
- package/examples/translation-types.ts +86 -0
- package/examples/translation-usage.tsx +336 -0
- package/index.js +1 -0
- package/jest.config.mjs +28 -0
- package/lex.config.mjs +11 -2
- package/lib/__tests__/e2e/helpers/testGraphQLServer.d.ts +22 -0
- package/lib/__tests__/e2e/helpers/testGraphQLServer.d.ts.map +1 -0
- package/lib/__tests__/e2e/helpers/testGraphQLServer.js +197 -0
- package/lib/__tests__/e2e/helpers/testGraphQLServerSimple.d.ts +3 -0
- package/lib/__tests__/e2e/helpers/testGraphQLServerSimple.d.ts.map +1 -0
- package/lib/__tests__/e2e/helpers/testGraphQLServerSimple.js +52 -0
- package/lib/actions/appActions/appActions.d.ts +29 -0
- package/lib/actions/appActions/appActions.d.ts.map +1 -0
- package/lib/actions/appActions/appActions.js +159 -0
- package/lib/actions/connectionActions/connectionActions.d.ts +19 -0
- package/lib/actions/connectionActions/connectionActions.d.ts.map +1 -0
- package/lib/actions/connectionActions/connectionActions.js +131 -0
- package/lib/actions/contentActions/contentActions.d.ts +34 -0
- package/lib/actions/contentActions/contentActions.d.ts.map +1 -0
- package/lib/actions/contentActions/contentActions.js +314 -0
- package/lib/actions/conversationActions/conversationActions.d.ts +30 -0
- package/lib/actions/conversationActions/conversationActions.d.ts.map +1 -0
- package/lib/actions/conversationActions/conversationActions.js +225 -0
- package/lib/actions/eventActions/eventActions.d.ts +27 -7
- package/lib/actions/eventActions/eventActions.d.ts.map +1 -0
- package/lib/actions/eventActions/eventActions.js +436 -2
- package/lib/actions/groupActions/groupActions.d.ts +30 -0
- package/lib/actions/groupActions/groupActions.d.ts.map +1 -0
- package/lib/actions/groupActions/groupActions.js +229 -0
- package/lib/actions/imageActions/imageActions.d.ts +16 -10
- package/lib/actions/imageActions/imageActions.d.ts.map +1 -0
- package/lib/actions/imageActions/imageActions.js +593 -2
- package/lib/actions/index.d.ts +21 -9
- package/lib/actions/index.d.ts.map +1 -0
- package/lib/actions/index.js +22 -2
- package/lib/actions/locationActions/locationActions.d.ts +11 -9
- package/lib/actions/locationActions/locationActions.d.ts.map +1 -0
- package/lib/actions/locationActions/locationActions.js +388 -2
- package/lib/actions/messageActions/messageActions.d.ts +16 -32
- package/lib/actions/messageActions/messageActions.d.ts.map +1 -0
- package/lib/actions/messageActions/messageActions.js +235 -2
- package/lib/actions/permissionActions/permissionActions.d.ts +34 -0
- package/lib/actions/permissionActions/permissionActions.d.ts.map +1 -0
- package/lib/actions/permissionActions/permissionActions.js +330 -0
- package/lib/actions/personaActions/personaActions.d.ts +65 -0
- package/lib/actions/personaActions/personaActions.d.ts.map +1 -0
- package/lib/actions/personaActions/personaActions.js +572 -0
- package/lib/actions/postActions/postActions.d.ts +12 -32
- package/lib/actions/postActions/postActions.d.ts.map +1 -0
- package/lib/actions/postActions/postActions.js +447 -2
- package/lib/actions/reactionActions/reactionActions.d.ts +13 -27
- package/lib/actions/reactionActions/reactionActions.d.ts.map +1 -0
- package/lib/actions/reactionActions/reactionActions.js +413 -2
- package/lib/actions/sseActions/sseActions.d.ts +1 -0
- package/lib/actions/sseActions/sseActions.d.ts.map +1 -0
- package/lib/actions/sseActions/sseActions.js +148 -2
- package/lib/actions/subscriptionActions/subscriptionActions.d.ts +24 -0
- package/lib/actions/subscriptionActions/subscriptionActions.d.ts.map +1 -0
- package/lib/actions/subscriptionActions/subscriptionActions.js +329 -0
- package/lib/actions/tagActions/tagActions.d.ts +13 -31
- package/lib/actions/tagActions/tagActions.d.ts.map +1 -0
- package/lib/actions/tagActions/tagActions.js +347 -2
- package/lib/actions/translationActions/translationActions.d.ts +38 -0
- package/lib/actions/translationActions/translationActions.d.ts.map +1 -0
- package/lib/actions/translationActions/translationActions.js +189 -0
- package/lib/actions/userActions/userActions.d.ts +44 -95
- package/lib/actions/userActions/userActions.d.ts.map +1 -0
- package/lib/actions/userActions/userActions.js +870 -2
- package/lib/actions/videoActions/videoActions.d.ts +41 -0
- package/lib/actions/videoActions/videoActions.d.ts.map +1 -0
- package/lib/actions/videoActions/videoActions.js +532 -0
- package/lib/actions/websocketActions/websocketActions.d.ts +20 -21
- package/lib/actions/websocketActions/websocketActions.d.ts.map +1 -0
- package/lib/actions/websocketActions/websocketActions.js +377 -2
- package/lib/adapters/appAdapter/appAdapter.d.ts +8 -0
- package/lib/adapters/appAdapter/appAdapter.d.ts.map +1 -0
- package/lib/adapters/appAdapter/appAdapter.js +90 -0
- package/lib/adapters/arangoAdapter/arangoAdapter.d.ts +3 -2
- package/lib/adapters/arangoAdapter/arangoAdapter.d.ts.map +1 -0
- package/lib/adapters/arangoAdapter/arangoAdapter.js +75 -2
- package/lib/adapters/contentAdapter/contentAdapter.d.ts +3 -2
- package/lib/adapters/contentAdapter/contentAdapter.d.ts.map +1 -0
- package/lib/adapters/contentAdapter/contentAdapter.js +107 -2
- package/lib/adapters/conversationAdapter/conversationAdapter.d.ts +3 -2
- package/lib/adapters/conversationAdapter/conversationAdapter.d.ts.map +1 -0
- package/lib/adapters/conversationAdapter/conversationAdapter.js +75 -2
- package/lib/adapters/eventAdapter/eventAdapter.d.ts +5 -2
- package/lib/adapters/eventAdapter/eventAdapter.d.ts.map +1 -0
- package/lib/adapters/eventAdapter/eventAdapter.js +162 -2
- package/lib/adapters/fileAdapter/fileAdapter.d.ts +3 -2
- package/lib/adapters/fileAdapter/fileAdapter.d.ts.map +1 -0
- package/lib/adapters/fileAdapter/fileAdapter.js +118 -2
- package/lib/adapters/groupAdapter/groupAdapter.d.ts +28 -0
- package/lib/adapters/groupAdapter/groupAdapter.d.ts.map +1 -0
- package/lib/adapters/groupAdapter/groupAdapter.js +66 -0
- package/lib/adapters/imageAdapter/imageAdapter.d.ts +9 -2
- package/lib/adapters/imageAdapter/imageAdapter.d.ts.map +1 -0
- package/lib/adapters/imageAdapter/imageAdapter.js +134 -2
- package/lib/adapters/index.d.ts +34 -16
- package/lib/adapters/index.d.ts.map +1 -0
- package/lib/adapters/index.js +19 -2
- package/lib/adapters/locationAdapter/locationAdapter.d.ts +3 -2
- package/lib/adapters/locationAdapter/locationAdapter.d.ts.map +1 -0
- package/lib/adapters/locationAdapter/locationAdapter.js +95 -2
- package/lib/adapters/messageAdapter/messageAdapter.d.ts +23 -19
- package/lib/adapters/messageAdapter/messageAdapter.d.ts.map +1 -0
- package/lib/adapters/messageAdapter/messageAdapter.js +82 -2
- package/lib/adapters/permissionAdapter/permissionAdapter.d.ts +41 -0
- package/lib/adapters/permissionAdapter/permissionAdapter.d.ts.map +1 -0
- package/lib/adapters/permissionAdapter/permissionAdapter.js +120 -0
- package/lib/adapters/personaAdapter/personaAdapter.d.ts +28 -2
- package/lib/adapters/personaAdapter/personaAdapter.d.ts.map +1 -0
- package/lib/adapters/personaAdapter/personaAdapter.js +161 -2
- package/lib/adapters/postAdapter/postAdapter.d.ts +3 -2
- package/lib/adapters/postAdapter/postAdapter.d.ts.map +1 -0
- package/lib/adapters/postAdapter/postAdapter.js +115 -2
- package/lib/adapters/reactionAdapter/reactionAdapter.d.ts +5 -2
- package/lib/adapters/reactionAdapter/reactionAdapter.d.ts.map +1 -0
- package/lib/adapters/reactionAdapter/reactionAdapter.js +81 -2
- package/lib/adapters/reaktorAdapter/reaktorAdapter.d.ts +3 -2
- package/lib/adapters/reaktorAdapter/reaktorAdapter.d.ts.map +1 -0
- package/lib/adapters/reaktorAdapter/reaktorAdapter.js +58 -2
- package/lib/adapters/sessionAdapter/sessionAdapter.d.ts +3 -2
- package/lib/adapters/sessionAdapter/sessionAdapter.d.ts.map +1 -0
- package/lib/adapters/sessionAdapter/sessionAdapter.js +80 -2
- package/lib/adapters/tagAdapter/tagAdapter.d.ts +3 -2
- package/lib/adapters/tagAdapter/tagAdapter.d.ts.map +1 -0
- package/lib/adapters/tagAdapter/tagAdapter.js +98 -2
- package/lib/adapters/translationAdapter/translationAdapter.d.ts +21 -0
- package/lib/adapters/translationAdapter/translationAdapter.d.ts.map +1 -0
- package/lib/adapters/translationAdapter/translationAdapter.js +55 -0
- package/lib/adapters/userAdapter/userAdapter.d.ts +18 -6
- package/lib/adapters/userAdapter/userAdapter.d.ts.map +1 -0
- package/lib/adapters/userAdapter/userAdapter.js +302 -2
- package/lib/adapters/videoAdapter/videoAdapter.d.ts +8 -0
- package/lib/adapters/videoAdapter/videoAdapter.d.ts.map +1 -0
- package/lib/adapters/videoAdapter/videoAdapter.js +194 -0
- package/lib/config/index.d.ts +19 -6
- package/lib/config/index.d.ts.map +1 -0
- package/lib/config/index.js +97 -2
- package/lib/constants/Collections.d.ts +44 -0
- package/lib/constants/Collections.d.ts.map +1 -0
- package/lib/constants/Collections.js +40 -0
- package/lib/constants/MetropolisConstants.d.ts +1 -0
- package/lib/constants/MetropolisConstants.d.ts.map +1 -0
- package/lib/constants/MetropolisConstants.js +15 -2
- package/lib/graphql/message.d.ts +1 -0
- package/lib/graphql/message.d.ts.map +1 -0
- package/lib/graphql/message.js +6 -4
- package/lib/graphql/notification.d.ts +1 -0
- package/lib/graphql/notification.d.ts.map +1 -0
- package/lib/graphql/notification.js +6 -4
- package/lib/graphql/session.d.ts +1 -0
- package/lib/graphql/session.d.ts.map +1 -0
- package/lib/graphql/session.js +4 -3
- package/lib/index.d.ts +45 -22
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +248 -2
- package/lib/stores/appStore.d.ts +1 -0
- package/lib/stores/appStore.d.ts.map +1 -0
- package/lib/stores/appStore.js +23 -2
- package/lib/stores/contentStore.d.ts +36 -0
- package/lib/stores/contentStore.d.ts.map +1 -0
- package/lib/stores/contentStore.js +139 -0
- package/lib/stores/conversationStore.d.ts +38 -0
- package/lib/stores/conversationStore.d.ts.map +1 -0
- package/lib/stores/conversationStore.js +117 -0
- package/lib/stores/eventStore.d.ts +4 -1
- package/lib/stores/eventStore.d.ts.map +1 -0
- package/lib/stores/eventStore.js +47 -2
- package/lib/stores/groupStore.d.ts +37 -0
- package/lib/stores/groupStore.d.ts.map +1 -0
- package/lib/stores/groupStore.js +68 -0
- package/lib/stores/imageStore.d.ts +6 -1
- package/lib/stores/imageStore.d.ts.map +1 -0
- package/lib/stores/imageStore.js +53 -2
- package/lib/stores/index.d.ts +20 -11
- package/lib/stores/index.d.ts.map +1 -0
- package/lib/stores/index.js +24 -2
- package/lib/stores/locationStore.d.ts +2 -1
- package/lib/stores/locationStore.d.ts.map +1 -0
- package/lib/stores/locationStore.js +42 -2
- package/lib/stores/messageStore.d.ts +19 -4
- package/lib/stores/messageStore.d.ts.map +1 -0
- package/lib/stores/messageStore.js +137 -2
- package/lib/stores/notificationStore.d.ts +33 -0
- package/lib/stores/notificationStore.d.ts.map +1 -0
- package/lib/stores/notificationStore.js +55 -0
- package/lib/stores/permissionStore.d.ts +37 -0
- package/lib/stores/permissionStore.d.ts.map +1 -0
- package/lib/stores/permissionStore.js +117 -0
- package/lib/stores/personaStore.d.ts +26 -0
- package/lib/stores/personaStore.d.ts.map +1 -0
- package/lib/stores/personaStore.js +118 -0
- package/lib/stores/postStore.d.ts +2 -1
- package/lib/stores/postStore.d.ts.map +1 -0
- package/lib/stores/postStore.js +53 -2
- package/lib/stores/reactionStore.d.ts +1 -0
- package/lib/stores/reactionStore.d.ts.map +1 -0
- package/lib/stores/reactionStore.js +28 -2
- package/lib/stores/subscriptionStore.d.ts +41 -0
- package/lib/stores/subscriptionStore.d.ts.map +1 -0
- package/lib/stores/subscriptionStore.js +85 -0
- package/lib/stores/tagStore.d.ts +8 -5
- package/lib/stores/tagStore.d.ts.map +1 -0
- package/lib/stores/tagStore.js +87 -2
- package/lib/stores/translationStore.d.ts +42 -0
- package/lib/stores/translationStore.d.ts.map +1 -0
- package/lib/stores/translationStore.js +122 -0
- package/lib/stores/userStore.d.ts +5 -4
- package/lib/stores/userStore.d.ts.map +1 -0
- package/lib/stores/userStore.js +319 -2
- package/lib/stores/videoStore.d.ts +39 -0
- package/lib/stores/videoStore.d.ts.map +1 -0
- package/lib/stores/videoStore.js +132 -0
- package/lib/stores/websocketStore.d.ts +1 -0
- package/lib/stores/websocketStore.d.ts.map +1 -0
- package/lib/stores/websocketStore.js +51 -2
- package/lib/types/apps.types.d.ts +17 -0
- package/lib/types/apps.types.d.ts.map +1 -0
- package/lib/types/apps.types.js +6 -0
- package/lib/types/common.types.d.ts +31 -0
- package/lib/types/common.types.d.ts.map +1 -0
- package/lib/types/common.types.js +6 -0
- package/lib/types/conversations.types.d.ts +17 -0
- package/lib/types/conversations.types.d.ts.map +1 -0
- package/lib/types/conversations.types.js +6 -0
- package/lib/types/edges.types.d.ts +38 -0
- package/lib/types/edges.types.d.ts.map +1 -0
- package/lib/types/edges.types.js +6 -0
- package/lib/types/groups.types.d.ts +19 -0
- package/lib/types/groups.types.d.ts.map +1 -0
- package/lib/types/groups.types.js +6 -0
- package/lib/types/index.d.ts +12 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/index.js +12 -0
- package/lib/types/subscriptions.types.d.ts +32 -0
- package/lib/types/subscriptions.types.d.ts.map +1 -0
- package/lib/types/subscriptions.types.js +6 -0
- package/lib/types/videos.types.d.ts +61 -0
- package/lib/types/videos.types.d.ts.map +1 -0
- package/lib/types/videos.types.js +6 -0
- package/lib/utils/MetropolisProvider.d.ts +39 -15
- package/lib/utils/MetropolisProvider.d.ts.map +1 -0
- package/lib/utils/MetropolisProvider.js +31 -2
- package/lib/utils/actionFactory.d.ts +21 -19
- package/lib/utils/actionFactory.d.ts.map +1 -0
- package/lib/utils/actionFactory.js +95 -2
- package/lib/utils/api.d.ts +5 -4
- package/lib/utils/api.d.ts.map +1 -0
- package/lib/utils/api.js +252 -6
- package/lib/utils/app.d.ts +1 -0
- package/lib/utils/app.d.ts.map +1 -0
- package/lib/utils/app.js +15 -2
- package/lib/utils/baseActionFactory.d.ts +5 -23
- package/lib/utils/baseActionFactory.d.ts.map +1 -0
- package/lib/utils/baseActionFactory.js +72 -2
- package/lib/utils/configUtils.d.ts +11 -0
- package/lib/utils/configUtils.d.ts.map +1 -0
- package/lib/utils/configUtils.js +20 -0
- package/lib/utils/dateUtils.d.ts +1 -0
- package/lib/utils/dateUtils.d.ts.map +1 -0
- package/lib/utils/dateUtils.js +11 -2
- package/lib/utils/file.d.ts +3 -1
- package/lib/utils/file.d.ts.map +1 -0
- package/lib/utils/file.js +156 -2
- package/lib/utils/i18n.d.ts +7 -0
- package/lib/utils/i18n.d.ts.map +1 -0
- package/lib/utils/i18n.js +96 -0
- package/lib/utils/index.d.ts +20 -0
- package/lib/utils/index.d.ts.map +1 -0
- package/lib/utils/index.js +26 -0
- package/lib/utils/location.d.ts +4 -3
- package/lib/utils/location.d.ts.map +1 -0
- package/lib/utils/location.js +82 -2
- package/lib/utils/permissionUtils.d.ts +22 -0
- package/lib/utils/permissionUtils.d.ts.map +1 -0
- package/lib/utils/permissionUtils.js +72 -0
- package/lib/utils/requestCache.d.ts +8 -0
- package/lib/utils/requestCache.d.ts.map +1 -0
- package/lib/utils/requestCache.js +53 -0
- package/lib/utils/session.d.ts +14 -0
- package/lib/utils/session.d.ts.map +1 -0
- package/lib/utils/session.js +107 -0
- package/lib/utils/useConversationTyping.d.ts +26 -0
- package/lib/utils/useConversationTyping.d.ts.map +1 -0
- package/lib/utils/useConversationTyping.js +117 -0
- package/lib/utils/useMetropolis.d.ts +67 -12
- package/lib/utils/useMetropolis.d.ts.map +1 -0
- package/lib/utils/useMetropolis.js +311 -2
- package/lib/utils/useTranslations.d.ts +16 -0
- package/lib/utils/useTranslations.d.ts.map +1 -0
- package/lib/utils/useTranslations.js +105 -0
- package/lib/utils/validatorFactory.d.ts +3 -2
- package/lib/utils/validatorFactory.d.ts.map +1 -0
- package/lib/utils/validatorFactory.js +95 -2
- package/package.json +58 -17
- package/temp_signin.ts +73 -0
- package/lib/actions/profileActions/profileActions.d.ts +0 -50
- package/lib/actions/profileActions/profileActions.js +0 -2
- package/lib/adapters/profileAdapter/profileAdapter.d.ts +0 -32
- package/lib/adapters/profileAdapter/profileAdapter.js +0 -2
- package/lib/stores/profileStore.d.ts +0 -24
- package/lib/stores/profileStore.js +0 -2
- /package/{FACTORY_PATTERN_GUIDE.md → factoryPatternGuide.md} +0 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# SignIn GraphQL Error Analysis and Fix
|
|
2
|
+
|
|
3
|
+
## Problem
|
|
4
|
+
The client is throwing a GraphQL validation error:
|
|
5
|
+
```
|
|
6
|
+
Cannot query field "users" on type "Mutation"
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
With the mutation payload:
|
|
10
|
+
```
|
|
11
|
+
mutation UsersSignIn($expires: Int, $password: String!, $username: String!) {
|
|
12
|
+
users {
|
|
13
|
+
signIn(expires: $expires, password: $password, username: $username) {
|
|
14
|
+
expires
|
|
15
|
+
issued
|
|
16
|
+
token
|
|
17
|
+
userId
|
|
18
|
+
username
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Root Cause
|
|
25
|
+
The client code is correctly generating the mutation with a `users` wrapper as the parent collection type. However, the **server GraphQL schema** does not define a `users` field on the `Mutation` type.
|
|
26
|
+
|
|
27
|
+
## Client Code Status ✅
|
|
28
|
+
All client code is **correct and working as designed**:
|
|
29
|
+
- [src/utils/api.ts](src/utils/api.ts) - GraphQL query/mutation builder generates proper mutation structure
|
|
30
|
+
- [src/actions/userActions/userActions.ts](src/actions/userActions/userActions.ts) - SignIn action correctly handles nested response
|
|
31
|
+
- All response handlers expect `data.users.{method}` structure
|
|
32
|
+
|
|
33
|
+
The client follows a consistent collection-type wrapper pattern:
|
|
34
|
+
- User mutations: `users { signIn | signUp | update | ... }`
|
|
35
|
+
- Post mutations: `posts { add | delete | update | ... }`
|
|
36
|
+
- Content mutations: `contents { add | delete | update | ... }`
|
|
37
|
+
- Reaction mutations: `reactions { addReaction | deleteReaction | ... }`
|
|
38
|
+
|
|
39
|
+
## Unit Tests ✅
|
|
40
|
+
Comprehensive unit tests have been created in [src/utils/api.signin.test.ts](src/utils/api.signin.test.ts) to validate:
|
|
41
|
+
|
|
42
|
+
1. **Mutation Generation Tests** (4 tests)
|
|
43
|
+
- ✅ Correct mutation shape with users wrapper
|
|
44
|
+
- ✅ Proper GraphQL syntax structure
|
|
45
|
+
- ✅ Handling required vs optional parameters
|
|
46
|
+
- ✅ Complete signin payload generation
|
|
47
|
+
|
|
48
|
+
2. **RefreshSession & SignUp Tests** (2 tests)
|
|
49
|
+
- ✅ RefreshSession mutation structure
|
|
50
|
+
- ✅ SignUp mutation structure
|
|
51
|
+
|
|
52
|
+
3. **Response Handler Tests** (3 tests)
|
|
53
|
+
- ✅ Extract signIn session from users wrapper
|
|
54
|
+
- ✅ Handle missing users wrapper gracefully
|
|
55
|
+
- ✅ Handle nested data extraction for other mutations
|
|
56
|
+
|
|
57
|
+
4. **Schema Documentation** (1 test)
|
|
58
|
+
- ✅ Documents expected Mutation type structure
|
|
59
|
+
|
|
60
|
+
**Test Results:** All 10 tests pass ✓
|
|
61
|
+
|
|
62
|
+
## Server Schema Fix Required 🔧
|
|
63
|
+
|
|
64
|
+
The server GraphQL schema at `/Users/nitrog7/Development/vault` must be updated to include:
|
|
65
|
+
|
|
66
|
+
```graphql
|
|
67
|
+
type Mutation {
|
|
68
|
+
users: UsersMutation!
|
|
69
|
+
posts: PostsMutation!
|
|
70
|
+
contents: ContentsMutation!
|
|
71
|
+
reactions: ReactionsMutation!
|
|
72
|
+
# ... other collection types
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
type UsersMutation {
|
|
76
|
+
signIn(username: String!, password: String!, expires: Int): Session
|
|
77
|
+
signUp(user: UserInput!): User
|
|
78
|
+
update(user: UserUpdateInput!): User
|
|
79
|
+
updateProfile(profile: ProfileUpdateInput!): Profile
|
|
80
|
+
refreshSession(token: String!, expires: Int): Session
|
|
81
|
+
confirmCode(code: Int!, type: String!, value: String!): Boolean
|
|
82
|
+
remove(userId: String!): User
|
|
83
|
+
session(user: UserInput!): User
|
|
84
|
+
itemById(userId: String!): User
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
type Session {
|
|
88
|
+
token: String!
|
|
89
|
+
expires: Int
|
|
90
|
+
issued: Int
|
|
91
|
+
userId: String
|
|
92
|
+
username: String
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
# Similar structures for PostsMutation, ContentsMutation, ReactionsMutation, etc.
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Expected Client Response Structure
|
|
99
|
+
After the server schema is updated, the GraphQL response will have the structure:
|
|
100
|
+
|
|
101
|
+
```json
|
|
102
|
+
{
|
|
103
|
+
"data": {
|
|
104
|
+
"users": {
|
|
105
|
+
"signIn": {
|
|
106
|
+
"token": "auth-token-xxx",
|
|
107
|
+
"expires": 1609459200,
|
|
108
|
+
"issued": 1609372800,
|
|
109
|
+
"userId": "user-123",
|
|
110
|
+
"username": "testuser"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Verification Steps
|
|
118
|
+
1. ✅ Client code verified to generate correct mutation structure
|
|
119
|
+
2. ✅ Unit tests pass, validating GraphQL payload generation
|
|
120
|
+
3. 🔄 **PENDING:** Update server schema at `/Users/nitrog7/Development/vault` to support `users` field on `Mutation` type
|
|
121
|
+
4. 🔄 **PENDING:** Test signin endpoint after server schema update
|
|
122
|
+
|
|
123
|
+
## Files Modified
|
|
124
|
+
- **Created:** [src/utils/api.signin.test.ts](src/utils/api.signin.test.ts) - Comprehensive mutation generation tests
|
|
125
|
+
- **Not Modified:** Client mutation generation code is correct as-is
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
# Vault GraphQL API - Schema and Mutations Analysis
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
This document contains the actual GraphQL schema definitions from the Vault server located at `/Users/nitrog7/Development/vault/api/src/graphql/`.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 1. MUTATION TYPE DEFINITIONS
|
|
9
|
+
|
|
10
|
+
The actual mutations available in the Vault GraphQL API are defined across two key places:
|
|
11
|
+
|
|
12
|
+
### Root Mutations (rootSchema.ts)
|
|
13
|
+
```graphql
|
|
14
|
+
type Mutation {
|
|
15
|
+
# Projects
|
|
16
|
+
createProject(input: ProjectInput!): Project!
|
|
17
|
+
updateProjectConfig(id: ID!, config: ProjectConfigInput!): Project!
|
|
18
|
+
|
|
19
|
+
# Chapters
|
|
20
|
+
createChapter(projectId: ID!, input: ChapterInput!): Chapter!
|
|
21
|
+
|
|
22
|
+
# Files & Git
|
|
23
|
+
writeFile(projectId: ID!, input: FileWriteInput!): Boolean!
|
|
24
|
+
|
|
25
|
+
# Proposals & AI
|
|
26
|
+
proposeEdit(projectId: ID!, input: EditProposalInput!): Proposal!
|
|
27
|
+
acceptProposal(projectId: ID!, proposalId: ID!): Boolean!
|
|
28
|
+
rejectProposal(projectId: ID!, proposalId: ID!): Boolean!
|
|
29
|
+
|
|
30
|
+
# Context
|
|
31
|
+
createContextProfile(projectId: ID!, input: ContextProfileInput!): ContextProfile!
|
|
32
|
+
updateContextProfile(projectId: ID!, profileId: ID!, input: ContextProfileInput!): ContextProfile!
|
|
33
|
+
deleteContextProfile(projectId: ID!, profileId: ID!): Boolean!
|
|
34
|
+
buildContext(projectId: ID!, input: ContextBuildInput!): ContextBuildResult!
|
|
35
|
+
|
|
36
|
+
# Midjourney
|
|
37
|
+
compilePrompts(projectId: ID!, input: MidjourneyCompileInput!): MidjourneyCompileResult!
|
|
38
|
+
|
|
39
|
+
# Auth (User Operations)
|
|
40
|
+
signUp(input: SignUpInput!): AuthResponse!
|
|
41
|
+
signIn(user: User!, password: String!, expires: Int): AuthToken!
|
|
42
|
+
signOut: Boolean!
|
|
43
|
+
forgotPassword(username: String!): AuthResponse!
|
|
44
|
+
resetPassword(input: ResetPasswordInput!): AuthResponse!
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## 2. USER INPUT TYPES
|
|
51
|
+
|
|
52
|
+
### **UserInput Type** (DEFINED)
|
|
53
|
+
**Location:** `schema.ts` (old schema, not currently used)
|
|
54
|
+
|
|
55
|
+
```graphql
|
|
56
|
+
input UserInput {
|
|
57
|
+
username: String!
|
|
58
|
+
email: String!
|
|
59
|
+
name: String!
|
|
60
|
+
password: String!
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**Status:** This type is defined but **NOT used** in any current mutations. It appears to be a legacy definition.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
### **SignUpInput Type** (ACTUAL - authSchema.ts)
|
|
69
|
+
```graphql
|
|
70
|
+
input SignUpInput {
|
|
71
|
+
email: String!
|
|
72
|
+
password: String!
|
|
73
|
+
name: String
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**Used in mutation:**
|
|
78
|
+
```graphql
|
|
79
|
+
signUp(input: SignUpInput!): AuthResponse!
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
**Implementation Details (authResolvers.ts):**
|
|
83
|
+
- Email is required
|
|
84
|
+
- Password is required
|
|
85
|
+
- Name is optional
|
|
86
|
+
- Username is automatically set to email
|
|
87
|
+
- Calls `addUser()` from `@nlabs/reaktor`
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
### **SignInInput Type** (ACTUAL - authSchema.ts)
|
|
92
|
+
```graphql
|
|
93
|
+
input SignInInput {
|
|
94
|
+
email: String!
|
|
95
|
+
password: String!
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**Current Mutation Signature (Different):**
|
|
100
|
+
```graphql
|
|
101
|
+
signIn(user: User!, password: String!, expires: Int): AuthToken!
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
⚠️ **NOTE:** The mutation signature doesn't match the `SignInInput` type. It directly takes:
|
|
105
|
+
- `user: User!` (not `email`, but a full User object)
|
|
106
|
+
- `password: String!`
|
|
107
|
+
- `expires: Int` (optional, in seconds)
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
### **ResetPasswordInput Type** (ACTUAL - authSchema.ts)
|
|
112
|
+
```graphql
|
|
113
|
+
input ResetPasswordInput {
|
|
114
|
+
username: String!
|
|
115
|
+
code: Int!
|
|
116
|
+
password: String!
|
|
117
|
+
type: String!
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
**Used in mutation:**
|
|
122
|
+
```graphql
|
|
123
|
+
resetPassword(input: ResetPasswordInput!): AuthResponse!
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## 3. USER MUTATIONS SUMMARY
|
|
129
|
+
|
|
130
|
+
### Available User Mutations:
|
|
131
|
+
|
|
132
|
+
| Mutation | Input Type | Purpose |
|
|
133
|
+
|----------|-----------|---------|
|
|
134
|
+
| `signUp` | `SignUpInput` | Register a new user account |
|
|
135
|
+
| `signIn` | Direct params (not input type) | Authenticate user and get session token |
|
|
136
|
+
| `signOut` | None | Logout/terminate session |
|
|
137
|
+
| `forgotPassword` | Direct param: `username: String!` | Request password reset code |
|
|
138
|
+
| `resetPassword` | `ResetPasswordInput` | Reset password with verification code |
|
|
139
|
+
|
|
140
|
+
### User Query:
|
|
141
|
+
```graphql
|
|
142
|
+
type Query {
|
|
143
|
+
me: User # Get current authenticated user
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## 4. USER TYPE DEFINITION
|
|
150
|
+
|
|
151
|
+
The User type is defined in the auth schema:
|
|
152
|
+
|
|
153
|
+
```graphql
|
|
154
|
+
type User {
|
|
155
|
+
_key: ID!
|
|
156
|
+
email: String!
|
|
157
|
+
username: String
|
|
158
|
+
name: String
|
|
159
|
+
createdAt: String!
|
|
160
|
+
updatedAt: String!
|
|
161
|
+
}
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
**Note:** Password is never returned in responses.
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## 5. AUTHENTICATION RESPONSE TYPES
|
|
169
|
+
|
|
170
|
+
### AuthResponse (for signUp, forgotPassword, resetPassword)
|
|
171
|
+
```graphql
|
|
172
|
+
type AuthResponse {
|
|
173
|
+
success: Boolean!
|
|
174
|
+
message: String
|
|
175
|
+
token: String
|
|
176
|
+
expires: Float
|
|
177
|
+
userId: String
|
|
178
|
+
username: String
|
|
179
|
+
}
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### AuthToken (for signIn)
|
|
183
|
+
```graphql
|
|
184
|
+
type AuthToken {
|
|
185
|
+
token: String!
|
|
186
|
+
expires: Float!
|
|
187
|
+
userId: String!
|
|
188
|
+
username: String!
|
|
189
|
+
}
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## 6. ALL INPUT TYPES IN THE VAULT API
|
|
195
|
+
|
|
196
|
+
### Project-related:
|
|
197
|
+
- `ProjectInput` - Create/update project
|
|
198
|
+
- `ProjectConfigInput` - Project configuration
|
|
199
|
+
|
|
200
|
+
### Chapter-related:
|
|
201
|
+
- `ChapterInput` - Create chapter
|
|
202
|
+
|
|
203
|
+
### File-related:
|
|
204
|
+
- `FileWriteInput` - Write/create file
|
|
205
|
+
|
|
206
|
+
### Context-related:
|
|
207
|
+
- `ContextProfileInput` - Create/update context profile
|
|
208
|
+
- `ContextBuildInput` - Build context
|
|
209
|
+
|
|
210
|
+
### Proposal-related:
|
|
211
|
+
- `EditProposalInput` - Propose edit
|
|
212
|
+
|
|
213
|
+
### Midjourney-related:
|
|
214
|
+
- `MidjourneyCompileInput` - Compile prompts
|
|
215
|
+
|
|
216
|
+
### Auth-related:
|
|
217
|
+
- **`SignUpInput`** - User registration
|
|
218
|
+
- **`SignInInput`** - (defined but not used in mutation)
|
|
219
|
+
- **`ResetPasswordInput`** - Password reset
|
|
220
|
+
|
|
221
|
+
### Legacy (not used):
|
|
222
|
+
- `UserInput` - Old definition, not used in any current mutations
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
## 7. IMPLEMENTATION NOTES
|
|
227
|
+
|
|
228
|
+
### Sign Up Flow (authResolvers.ts):
|
|
229
|
+
```typescript
|
|
230
|
+
signUp: async (_: any, { input }: any) => {
|
|
231
|
+
// Input: { email, password, name }
|
|
232
|
+
// Sets username = email
|
|
233
|
+
// Calls @nlabs/reaktor addUser()
|
|
234
|
+
// Returns AuthResponse (without token initially)
|
|
235
|
+
}
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
### Sign In Flow (authResolvers.ts):
|
|
239
|
+
```typescript
|
|
240
|
+
signIn: async (_: any, { email, password, expires }: any) => {
|
|
241
|
+
// Calls @nlabs/reaktor signIn()
|
|
242
|
+
// Returns AuthToken with token, userId, username, expires
|
|
243
|
+
// Default expires: 15 minutes (in seconds)
|
|
244
|
+
}
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
### Sign Out Flow:
|
|
248
|
+
```typescript
|
|
249
|
+
signOut: async (_: any, __: any, context: any) => {
|
|
250
|
+
// Requires authenticated context
|
|
251
|
+
// Calls @nlabs/reaktor signOut()
|
|
252
|
+
// Returns Boolean
|
|
253
|
+
}
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### Password Reset Flow:
|
|
257
|
+
```typescript
|
|
258
|
+
forgotPassword: async (_: any, { username }: any) => {
|
|
259
|
+
// Sends reset code via email using @nlabs/reaktor
|
|
260
|
+
// Returns success message (doesn't reveal if user exists)
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
resetPassword: async (_: any, { input }: any) => {
|
|
264
|
+
// Validates code
|
|
265
|
+
// Updates password
|
|
266
|
+
// Returns success response
|
|
267
|
+
}
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
## 8. KEY FINDINGS
|
|
273
|
+
|
|
274
|
+
✅ **YES - UserInput Type IS Defined**
|
|
275
|
+
- Location: `schema.ts` (line ~200)
|
|
276
|
+
- Fields: `username`, `email`, `name`, `password`
|
|
277
|
+
- Status: **Not used in any current mutations**
|
|
278
|
+
|
|
279
|
+
✅ **Actual User Mutation Input Types:**
|
|
280
|
+
- `SignUpInput` - email, password, name
|
|
281
|
+
- `SignInInput` - email, password (defined but not used in mutation)
|
|
282
|
+
- `ResetPasswordInput` - username, code, password, type
|
|
283
|
+
|
|
284
|
+
✅ **User Mutations Available:**
|
|
285
|
+
1. `signUp(input: SignUpInput!): AuthResponse!`
|
|
286
|
+
2. `signIn(user: User!, password: String!, expires: Int): AuthToken!`
|
|
287
|
+
3. `signOut: Boolean!`
|
|
288
|
+
4. `forgotPassword(username: String!): AuthResponse!`
|
|
289
|
+
5. `resetPassword(input: ResetPasswordInput!): AuthResponse!`
|
|
290
|
+
|
|
291
|
+
⚠️ **Discrepancy:**
|
|
292
|
+
- `SignInInput` type is defined but the actual `signIn` mutation doesn't use it
|
|
293
|
+
- The mutation takes `user: User!` object directly instead of email/password inputs
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
## 9. SCHEMA FILE LOCATIONS
|
|
298
|
+
|
|
299
|
+
All schema definitions are in: `/Users/nitrog7/Development/vault/api/src/graphql/schema/`
|
|
300
|
+
|
|
301
|
+
- `index.ts` - Main composite schema
|
|
302
|
+
- `rootSchema.ts` - Root Query and Mutation definitions
|
|
303
|
+
- `authSchema.ts` - Auth types and inputs
|
|
304
|
+
- `projectSchema.ts` - Project types and inputs
|
|
305
|
+
- `chapterSchema.ts` - Chapter types and inputs
|
|
306
|
+
- `fileSchema.ts` - File types and inputs
|
|
307
|
+
- `contextSchema.ts` - Context types and inputs
|
|
308
|
+
- `diffSchema.ts` - Diff/Proposal types and inputs
|
|
309
|
+
- `midjourneySchema.ts` - Midjourney types and inputs
|
|
310
|
+
|
|
311
|
+
Resolvers are in: `/Users/nitrog7/Development/vault/api/src/graphql/resolvers/authResolvers.ts`
|
|
312
|
+
|
package/docs/ACTIONS.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# MetropolisJS Actions Reference
|
|
2
|
+
|
|
3
|
+
This reference documents every action family exposed by MetropolisJS, how to access it, and where to find the full TypeScript interface.
|
|
4
|
+
|
|
5
|
+
## Access Patterns
|
|
6
|
+
|
|
7
|
+
Use specialized hooks in React components:
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
import {useUserActions, usePostActions, useMessageActions} from '@nlabs/metropolisjs';
|
|
11
|
+
|
|
12
|
+
const userActions = useUserActions();
|
|
13
|
+
const postActions = usePostActions();
|
|
14
|
+
const messageActions = useMessageActions();
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Or create actions directly with a Flux instance:
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import {createUserActions, createPostActions} from '@nlabs/metropolisjs';
|
|
21
|
+
|
|
22
|
+
const userActions = createUserActions(flux);
|
|
23
|
+
const postActions = createPostActions(flux);
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Action Families
|
|
27
|
+
|
|
28
|
+
Each row links to:
|
|
29
|
+
- source implementation (`src/actions/...`)
|
|
30
|
+
- hook exposure (`src/utils/useMetropolis.ts`)
|
|
31
|
+
- common method names (full signatures live in the interface in each source file)
|
|
32
|
+
|
|
33
|
+
| Family | Hook | Creator | Typical Methods | Source |
|
|
34
|
+
| --- | --- | --- | --- | --- |
|
|
35
|
+
| App | `useMetropolis(['app'])` | `createAppActions` | `add`, `itemById`, `list`, `update`, `delete` | [appActions.ts](../src/actions/appActions/appActions.ts) |
|
|
36
|
+
| Connection | `useMetropolis(['connection'])` | `createConnectionActions` | `addConnection`, `getConnections`, `removeConnection` | [connectionActions.ts](../src/actions/connectionActions/connectionActions.ts) |
|
|
37
|
+
| Content | `useContentActions` | `createContentActions` | `add`, `itemById`, `itemByKey`, `listByCategory`, `list`, `update`, `delete` | [contentActions.ts](../src/actions/contentActions/contentActions.ts) |
|
|
38
|
+
| Conversation | `useMetropolis(['conversation'])` | `createConversationActions` | `add`, `itemById`, `list`, `update`, `delete` | [conversationActions.ts](../src/actions/conversationActions/conversationActions.ts) |
|
|
39
|
+
| Event | `useEventActions` | `createEventActions` | `addEvent`, `getEvent`, `getEventsByTags`, `getEventsByReactions`, `updateEvent`, `deleteEvent` | [eventActions.ts](../src/actions/eventActions/eventActions.ts) |
|
|
40
|
+
| Group | `useGroupActions` | `createGroupActions` | `add`, `itemById`, `listByLatest`, `update`, `delete` | [groupActions.ts](../src/actions/groupActions/groupActions.ts) |
|
|
41
|
+
| Image | `useImageActions` | `createImageActions` | `add`, `update`, `delete`, `upload`, `countByItem`, `listByItem`, `listByReactions` | [imageActions.ts](../src/actions/imageActions/imageActions.ts) |
|
|
42
|
+
| Location | `useLocationActions` | `createLocationActions` | `autocompleteLocation`, `add`, `getLocation`, `getCurrentLocation`, `listByItem`, `update`, `delete` | [locationActions.ts](../src/actions/locationActions/locationActions.ts) |
|
|
43
|
+
| Message | `useMessageActions` | `createMessageActions` | `sendMessage`, `getMessages`, `getConversations`, `getDirectConversation` | [messageActions.ts](../src/actions/messageActions/messageActions.ts) |
|
|
44
|
+
| Permission | `usePermissionActions` | `createPermissionActions` | `add`, `check`, `itemById`, `list`, `listByUser`, `update`, `remove` | [permissionActions.ts](../src/actions/permissionActions/permissionActions.ts) |
|
|
45
|
+
| Post | `usePostActions` | `createPostActions` | `add`, `itemById`, `listByLatest`, `listByLocation`, `listByReactions`, `listByTags`, `update`, `delete` | [postActions.ts](../src/actions/postActions/postActions.ts) |
|
|
46
|
+
| Persona | `usePersonaActions` | `createPersonaActions` | `addPersona`, `getPersona`, `getPersonas`, `updatePersona`, `deletePersona` | [personaActions.ts](../src/actions/personaActions/personaActions.ts) |
|
|
47
|
+
| Reaction | `useReactionActions` | `createReactionActions` | `addReaction`, `deleteReaction`, `getReactionCount`, `hasReaction`, `abbreviateCount` | [reactionActions.ts](../src/actions/reactionActions/reactionActions.ts) |
|
|
48
|
+
| SSE | `useMetropolis(['sse'])` | `createSSEActions` | `connect`, `disconnect`, `reconnect`, `isConnected`, `sendMessage`, `addEventListener`, `removeEventListener` | [sseActions.ts](../src/actions/sseActions/sseActions.ts) |
|
|
49
|
+
| Tag | `useTagActions` | `createTagActions` | `addTag`, `addTagToItem`, `getTags`, `updateTag`, `deleteTag`, `deleteTagFromItem` | [tagActions.ts](../src/actions/tagActions/tagActions.ts) |
|
|
50
|
+
| Translation | `useTranslationActions` | `createTranslationActions` | `addTranslations`, `getTranslation`, `getTranslations`, `hasTranslation`, `queueTranslationKey`, `processPendingTranslations` | [translationActions.ts](../src/actions/translationActions/translationActions.ts) |
|
|
51
|
+
| User | `useUserActions` | `createUserActions` | `signIn`, `signUp`, `session`, `refreshSession`, `itemById`, `listByLatest`, `updateUser` | [userActions.ts](../src/actions/userActions/userActions.ts) |
|
|
52
|
+
| Video | `useMetropolis(['video'])` | `createVideoActions` | `add`, `itemById`, `list`, `update`, `delete` | [videoActions.ts](../src/actions/videoActions/videoActions.ts) |
|
|
53
|
+
| Websocket | `useWebsocketActions` | `createWebsocketActions` | `wsInit`, `wsSend`, `onOpen`, `onReceive`, `onClose`, `onError` | [websocketActions.ts](../src/actions/websocketActions/websocketActions.ts) |
|
|
54
|
+
|
|
55
|
+
## Full Exports
|
|
56
|
+
|
|
57
|
+
All action creators are re-exported from:
|
|
58
|
+
|
|
59
|
+
- [src/actions/index.ts](../src/actions/index.ts)
|
|
60
|
+
|
|
61
|
+
All specialized hooks are exposed from:
|
|
62
|
+
|
|
63
|
+
- [src/utils/useMetropolis.ts](../src/utils/useMetropolis.ts)
|