@jsb188/graphql 1.1.4 → 1.1.6

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.
Files changed (49) hide show
  1. package/cache/config.ts +13 -7
  2. package/cache/index.ts +355 -144
  3. package/gql/fragments/accountAuthFragments.ts +3 -9
  4. package/gql/fragments/accountFragments.ts +11 -0
  5. package/gql/fragments/actionFragments.ts +16 -0
  6. package/gql/fragments/logFragments.ts +75 -6
  7. package/gql/fragments/organizationFragments.ts +70 -4
  8. package/gql/fragments/otherFragments.ts +10 -8
  9. package/gql/fragments/productFragments.ts +63 -0
  10. package/gql/fragments/reportFragments.ts +47 -0
  11. package/gql/mutations/accountMutations.ts +31 -0
  12. package/gql/mutations/aiChatMutations.ts +1 -0
  13. package/gql/mutations/authMutations.ts +80 -22
  14. package/gql/mutations/index.ts +8 -0
  15. package/gql/mutations/logMutations.ts +56 -1
  16. package/gql/mutations/organizationMutations.ts +42 -0
  17. package/gql/mutations/otherMutations.ts +0 -17
  18. package/gql/mutations/userAuthMutations.ts +0 -116
  19. package/gql/queries/aiChatQueries.ts +4 -0
  20. package/gql/queries/appQueries.ts +2 -1
  21. package/gql/queries/index.ts +6 -0
  22. package/gql/queries/logQueries.ts +60 -11
  23. package/gql/queries/organizationQueries.ts +62 -1
  24. package/gql/queries/productQueries.ts +70 -0
  25. package/gql/queries/reportQueries.ts +60 -0
  26. package/hooks/index.ts +259 -113
  27. package/hooks/use-account-mtn.ts +68 -0
  28. package/hooks/use-aiChat-mtn.ts +112 -0
  29. package/hooks/use-aiChat-qry.ts +81 -10
  30. package/hooks/use-auth-mtn.ts +114 -63
  31. package/hooks/use-log-mtn.ts +85 -0
  32. package/hooks/use-log-qry.ts +71 -18
  33. package/hooks/use-organization-mtn.ts +105 -0
  34. package/hooks/use-organization-qry.ts +119 -15
  35. package/hooks/use-product-qry.ts +109 -0
  36. package/hooks/use-report-qry.ts +69 -0
  37. package/package.json +15 -25
  38. package/sse.ts +11 -0
  39. package/types.d.ts +1 -0
  40. package/gql/fragments/cardFragments.ts +0 -15
  41. package/gql/fragments/chatFragments.ts +0 -98
  42. package/gql/fragments/userAuthFragments.ts +0 -8
  43. package/gql/fragments/userFragments.ts +0 -69
  44. package/gql/mutations/chatMutations.ts +0 -116
  45. package/gql/mutations/userMutations.ts +0 -89
  46. package/gql/queries/cardQueries.ts +0 -24
  47. package/gql/queries/chatQueries.ts +0 -86
  48. package/gql/queries/otherQueries.ts +0 -12
  49. package/gql/queries/userQueries.ts +0 -104
package/cache/config.ts CHANGED
@@ -19,18 +19,26 @@ export const RULES = {
19
19
  // List of queries that should be cached
20
20
  // NOTE: Fragments are always cached
21
21
  aiChat: true,
22
+ aiChats: true,
22
23
  aiChatMessages: true,
23
24
  alerts: true,
24
- cardsForUser: true,
25
25
  chat: true,
26
26
  chatsList: true,
27
- editChat: true,
28
- friend: true,
29
- friendsList: true,
30
- friendRequests: true,
27
+ childOrganizations: true,
28
+ eventsList: true,
29
+ eventAttendanceList: true,
30
+ parentOrganization: true,
31
31
  logEntries: true,
32
+ logEvidences: true,
32
33
  myChats: true,
34
+ myOrganizations: true,
35
+ organizationRelationship: true,
36
+ organizationWorkflows: true,
33
37
  platformProducts: true,
38
+ productAttendanceList: true,
39
+ productsList: true,
40
+ reports: true,
41
+ availableReports: true,
34
42
  searchUsers: true,
35
43
  updateNote: true,
36
44
  userIdToChatId: true,
@@ -38,7 +46,6 @@ export const RULES = {
38
46
  // All fragments are cached,
39
47
  // but if you want to skip some, add it here
40
48
  accountAuthFragment: false,
41
- userAuthFragment: false,
42
49
  } as {
43
50
  __limit: number;
44
51
  [key: string]: boolean | number;
@@ -48,5 +55,4 @@ export const PARTIALS_MAP = {
48
55
  // Partial fragments are supported if you map them to its original fragment name
49
56
  chatPartial: 'chatFragment',
50
57
  chatStatusPartial: 'chatFragment',
51
- userPartial: 'userFragment',
52
58
  } as Record<string, string>;