@messenger-box/platform-server 10.0.3-alpha.7 → 10.0.3-alpha.72

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 (149) hide show
  1. package/lib/containers/containers.js +4 -1
  2. package/lib/containers/containers.js.map +1 -1
  3. package/lib/containers/context-services-from-container.d.ts +1 -1
  4. package/lib/containers/context-services-from-container.js +1 -1
  5. package/lib/containers/context-services-from-container.js.map +1 -1
  6. package/lib/graphql/resolvers/channel-member.d.ts +3 -2
  7. package/lib/graphql/resolvers/channel-member.js +30 -5
  8. package/lib/graphql/resolvers/channel-member.js.map +1 -1
  9. package/lib/graphql/resolvers/channel.d.ts +3 -2
  10. package/lib/graphql/resolvers/channel.js +279 -53
  11. package/lib/graphql/resolvers/channel.js.map +1 -1
  12. package/lib/graphql/resolvers/extended-token-account.d.ts +3 -2
  13. package/lib/graphql/resolvers/extended-token-account.js +90 -23
  14. package/lib/graphql/resolvers/extended-token-account.js.map +1 -1
  15. package/lib/graphql/resolvers/index.d.ts +1 -1
  16. package/lib/graphql/resolvers/post-thread.d.ts +1 -1
  17. package/lib/graphql/resolvers/post-thread.js +294 -132
  18. package/lib/graphql/resolvers/post-thread.js.map +1 -1
  19. package/lib/graphql/resolvers/post.d.ts +2 -3
  20. package/lib/graphql/resolvers/post.js +696 -234
  21. package/lib/graphql/resolvers/post.js.map +1 -1
  22. package/lib/graphql/resolvers/reaction.d.ts +3 -2
  23. package/lib/graphql/resolvers/reaction.js +96 -14
  24. package/lib/graphql/resolvers/reaction.js.map +1 -1
  25. package/lib/graphql/schema/channel-member.graphql +110 -21
  26. package/lib/graphql/schema/channel-member.graphql.js +1 -1
  27. package/lib/graphql/schema/channel.graphql +337 -38
  28. package/lib/graphql/schema/channel.graphql.js +1 -1
  29. package/lib/graphql/schema/post-thread.graphql +167 -21
  30. package/lib/graphql/schema/post-thread.graphql.js +1 -1
  31. package/lib/graphql/schema/post.graphql +284 -40
  32. package/lib/graphql/schema/post.graphql.js +1 -1
  33. package/lib/graphql/schema/reaction.graphql +71 -13
  34. package/lib/graphql/schema/reaction.graphql.js +1 -1
  35. package/lib/graphql/schema/services.graphql +2 -0
  36. package/lib/graphql/schema/users.graphql +76 -13
  37. package/lib/graphql/schema/users.graphql.js +1 -1
  38. package/lib/index.js +1 -1
  39. package/lib/index.js.map +1 -1
  40. package/lib/interfaces/index.d.ts +0 -1
  41. package/lib/interfaces/services.d.ts +1 -1
  42. package/lib/migrations/dbMigrations/AddPostsConfigurationsMigration.d.ts +17 -0
  43. package/lib/migrations/dbMigrations/AddPostsConfigurationsMigration.js +44 -0
  44. package/lib/migrations/dbMigrations/AddPostsConfigurationsMigration.js.map +1 -0
  45. package/lib/migrations/dbMigrations/index.d.ts +1 -0
  46. package/lib/migrations/index.d.ts +1 -0
  47. package/lib/migrations/mail-template-migration.js +1 -1
  48. package/lib/migrations/message-notification-template-migration.d.ts +1 -1
  49. package/lib/migrations/message-notification-template-migration.js +1 -1
  50. package/lib/plugins/channel-moleculer-service.d.ts +21 -1
  51. package/lib/plugins/channel-moleculer-service.js +417 -115
  52. package/lib/plugins/channel-moleculer-service.js.map +1 -1
  53. package/lib/plugins/extended-token-account-moleculer-service.d.ts +25 -1
  54. package/lib/plugins/extended-token-account-moleculer-service.js +348 -22
  55. package/lib/plugins/extended-token-account-moleculer-service.js.map +1 -1
  56. package/lib/plugins/messenger-notification-moleculer-service.d.ts +27 -3
  57. package/lib/plugins/messenger-notification-moleculer-service.js +404 -58
  58. package/lib/plugins/messenger-notification-moleculer-service.js.map +1 -1
  59. package/lib/plugins/post-moleculer-service.d.ts +85 -21
  60. package/lib/plugins/post-moleculer-service.js +986 -256
  61. package/lib/plugins/post-moleculer-service.js.map +1 -1
  62. package/lib/plugins/post-thread-moleculer-service.d.ts +33 -1
  63. package/lib/plugins/post-thread-moleculer-service.js +326 -8
  64. package/lib/plugins/post-thread-moleculer-service.js.map +1 -1
  65. package/lib/plugins/reaction-moleculer-service.js +1 -1
  66. package/lib/plugins/reaction-moleculer-service.js.map +1 -1
  67. package/lib/preferences/settings/post-settings.d.ts +2 -0
  68. package/lib/preferences/settings/post-settings.js +47 -9
  69. package/lib/preferences/settings/post-settings.js.map +1 -1
  70. package/lib/services/channel-service.d.ts +179 -33
  71. package/lib/services/channel-service.js +821 -274
  72. package/lib/services/channel-service.js.map +1 -1
  73. package/lib/services/extended-token-account-service.d.ts +130 -14
  74. package/lib/services/extended-token-account-service.js +462 -52
  75. package/lib/services/extended-token-account-service.js.map +1 -1
  76. package/lib/services/index.d.ts +1 -0
  77. package/lib/services/messenger-notification-service.d.ts +106 -13
  78. package/lib/services/messenger-notification-service.js +824 -442
  79. package/lib/services/messenger-notification-service.js.map +1 -1
  80. package/lib/services/post-service.d.ts +182 -16
  81. package/lib/services/post-service.js +731 -115
  82. package/lib/services/post-service.js.map +1 -1
  83. package/lib/services/post-thread-service.d.ts +114 -5
  84. package/lib/services/post-thread-service.js +400 -13
  85. package/lib/services/post-thread-service.js.map +1 -1
  86. package/lib/services/proxy-services/channel-microservice.d.ts +5 -3
  87. package/lib/services/proxy-services/channel-microservice.js +19 -10
  88. package/lib/services/proxy-services/channel-microservice.js.map +1 -1
  89. package/lib/services/proxy-services/messenger-notification-microservice.d.ts +128 -8
  90. package/lib/services/proxy-services/messenger-notification-microservice.js +324 -29
  91. package/lib/services/proxy-services/messenger-notification-microservice.js.map +1 -1
  92. package/lib/services/proxy-services/post-microservice.d.ts +186 -12
  93. package/lib/services/proxy-services/post-microservice.js +543 -54
  94. package/lib/services/proxy-services/post-microservice.js.map +1 -1
  95. package/lib/services/proxy-services/post-thread-microservice.d.ts +134 -3
  96. package/lib/services/proxy-services/post-thread-microservice.js +388 -6
  97. package/lib/services/proxy-services/post-thread-microservice.js.map +1 -1
  98. package/lib/services/proxy-services/reaction-microservice.d.ts +161 -3
  99. package/lib/services/proxy-services/reaction-microservice.js +474 -2
  100. package/lib/services/proxy-services/reaction-microservice.js.map +1 -1
  101. package/lib/services/reaction-service.d.ts +124 -4
  102. package/lib/services/reaction-service.js +415 -3
  103. package/lib/services/reaction-service.js.map +1 -1
  104. package/lib/services/redis-cache-manager.d.ts +18 -0
  105. package/lib/services/redis-cache-manager.js +83 -0
  106. package/lib/services/redis-cache-manager.js.map +1 -0
  107. package/lib/store/models/account-token-store.d.ts +1 -1
  108. package/lib/store/models/account-token-store.js.map +1 -1
  109. package/lib/store/models/channel.d.ts +2 -3
  110. package/lib/store/models/channel.js +181 -72
  111. package/lib/store/models/channel.js.map +1 -1
  112. package/lib/store/models/post-thread.d.ts +3 -3
  113. package/lib/store/models/post-thread.js +96 -14
  114. package/lib/store/models/post-thread.js.map +1 -1
  115. package/lib/store/models/post.d.ts +2 -3
  116. package/lib/store/models/post.js +143 -23
  117. package/lib/store/models/post.js.map +1 -1
  118. package/lib/store/models/reaction.d.ts +2 -3
  119. package/lib/store/models/reaction.js +67 -8
  120. package/lib/store/models/reaction.js.map +1 -1
  121. package/lib/store/repositories/__tests__/__fixtures__/team-repository.d.ts +3 -3
  122. package/lib/store/repositories/channel-repository.d.ts +6 -6
  123. package/lib/store/repositories/channel-repository.js +5 -2
  124. package/lib/store/repositories/channel-repository.js.map +1 -1
  125. package/lib/store/repositories/post-repository.d.ts +6 -6
  126. package/lib/store/repositories/post-repository.js +5 -2
  127. package/lib/store/repositories/post-repository.js.map +1 -1
  128. package/lib/store/repositories/post-thread-repository.d.ts +6 -6
  129. package/lib/store/repositories/post-thread-repository.js +5 -2
  130. package/lib/store/repositories/post-thread-repository.js.map +1 -1
  131. package/lib/store/repositories/reaction-repository.d.ts +6 -6
  132. package/lib/store/repositories/reaction-repository.js +5 -2
  133. package/lib/store/repositories/reaction-repository.js.map +1 -1
  134. package/lib/templates/constants/SERVER_TYPES.ts.template +0 -3
  135. package/lib/templates/repositories/ChannelRepository.ts.template +3 -3
  136. package/lib/templates/repositories/PostRepository.ts.template +3 -3
  137. package/lib/templates/repositories/PostThreadRepository.ts.template +3 -3
  138. package/lib/templates/repositories/ReactionRepository.ts.template +3 -4
  139. package/lib/templates/services/ChannelService.ts.template +280 -39
  140. package/lib/templates/services/ExtendedTokenAccountService.ts.template +104 -9
  141. package/lib/templates/services/MessengerNotificationService.ts.template +94 -19
  142. package/lib/templates/services/PostService.ts.template +184 -20
  143. package/lib/templates/services/PostThreadService.ts.template +151 -6
  144. package/lib/templates/services/ReactionService.ts.template +129 -3
  145. package/lib/templates/services/RedisCacheManager.ts.template +22 -0
  146. package/package.json +6 -5
  147. package/lib/interfaces/context.d.ts +0 -14
  148. package/lib/store/models/common-options.js +0 -20
  149. package/lib/store/models/common-options.js.map +0 -1
@@ -1,49 +1,186 @@
1
- type PostThreadParticipants {
2
- id: ID!
3
- user: UserAccount!
4
- roles: String
5
- orgName: String
6
- updatedAt: DateTime
7
- CreatedAt: DateTime
1
+ """
2
+ Post thread participants information
3
+ """
4
+ type PostThreadParticipants @entity {
5
+ """
6
+ Unique identifier for the participant
7
+ """
8
+ id: ID! @id
9
+
10
+ """
11
+ Participant user account
12
+ """
13
+ user: UserAccount! @column(overrideType: "ObjectId")
14
+
15
+ """
16
+ Participant roles
17
+ """
18
+ roles: String @column
19
+
20
+ """
21
+ Organization name
22
+ """
23
+ organization: Organization! @column(overrideType: "ObjectId")
24
+ orgName: String @column
25
+
26
+ """
27
+ Last update timestamp
28
+ """
29
+ updatedAt: DateTime @column(overrideType: "Date")
30
+
31
+ """
32
+ Creation timestamp
33
+ """
34
+ createdAt: DateTime @column(overrideType: "Date")
35
+
36
+ """
37
+ Deletion timestamp
38
+ """
39
+ deletedAt: DateTime @column(overrideType: "Date")
8
40
  }
9
41
 
10
- type PostThread implements IBaseRepo {
11
- id: ID!
12
- post: Post
13
- channel: Channel
14
- replyCount: Int
15
- lastReplyAt: DateTime
16
- participants: [PostThreadParticipants]
17
- # orgName: String
18
- createdAt: DateTime
19
- updatedAt: DateTime
20
- deletedAt: DateTime
42
+ """
43
+ Post thread: A threaded conversation within a post
44
+ """
45
+ type PostThread implements IBaseRepo @entity {
46
+ """
47
+ Unique identifier for the thread
48
+ """
49
+ id: ID! @id
50
+
51
+ """
52
+ Parent post of the thread
53
+ """
54
+ post: Post @column(overrideType: "ObjectId")
55
+
56
+ """
57
+ Channel containing the thread
58
+ """
59
+ channel: Channel @column(overrideType: "ObjectId")
60
+
61
+ """
62
+ Number of replies in thread
63
+ """
64
+ replyCount: Int @column
65
+
66
+ """
67
+ Last reply timestamp
68
+ """
69
+ lastReplyAt: DateTime @column(overrideType: "Date")
70
+
71
+ """
72
+ Thread participants
73
+ """
74
+ participants: [PostThreadParticipants] @column(overrideType: "ObjectId")
75
+
76
+ """
77
+ Creation timestamp
78
+ """
79
+ createdAt: DateTime @column(overrideType: "Date")
80
+
81
+ """
82
+ Last update timestamp
83
+ """
84
+ updatedAt: DateTime @column(overrideType: "Date")
85
+
86
+ """
87
+ Deletion timestamp
88
+ """
89
+ deletedAt: DateTime @column(overrideType: "Date")
90
+
91
+ """
92
+ Thread replies with pagination
93
+ """
21
94
  replies(criteria: AnyObject, limit: Int, skip: Int, sort: Sort): [Post]
22
95
  }
23
96
 
97
+ """
98
+ Thread messages response with pagination
99
+ """
24
100
  type ThreadMessages {
101
+ """
102
+ Total count of thread messages
103
+ """
25
104
  totalCount: Int
105
+
106
+ """
107
+ Thread message data
108
+ """
26
109
  data: [PostThread]
27
110
  }
28
111
 
112
+ """
113
+ Thread message sent response
114
+ """
29
115
  type ThreadMessageSent {
116
+ """
117
+ Last message in thread
118
+ """
30
119
  lastMessage: Post
120
+
121
+ """
122
+ Thread data
123
+ """
31
124
  data: PostThread
32
125
  }
33
126
 
127
+ """
128
+ Thread message input for creating thread messages
129
+ """
34
130
  input ThreadMessageInput {
131
+ """
132
+ Message content
133
+ """
35
134
  content: String!
36
- userRef: [String] #userId
37
- channelRef: [String] #channelId
135
+
136
+ """
137
+ Referenced user IDs
138
+ """
139
+ userRef: [String] # userId
140
+
141
+ """
142
+ Referenced channel IDs
143
+ """
144
+ channelRef: [String] # channelId
145
+
146
+ """
147
+ Attached file IDs
148
+ """
38
149
  files: [ID!]
150
+
151
+ """
152
+ User role in thread
153
+ """
39
154
  role: String
40
- notificationParams:ExpoNotificationData
155
+
156
+ """
157
+ Notification parameters
158
+ """
159
+ notificationParams: ExpoNotificationData
41
160
  }
42
161
 
162
+ """
163
+ Thread creation/update response
164
+ """
43
165
  type ThreadCreatedUpdated {
166
+ """
167
+ Whether thread was created
168
+ """
44
169
  isCreated: Boolean
170
+
171
+ """
172
+ Whether thread was updated
173
+ """
45
174
  isUpdated: Boolean
175
+
176
+ """
177
+ Last message in thread
178
+ """
46
179
  lastMessage: Post
180
+
181
+ """
182
+ Thread data
183
+ """
47
184
  data: PostThread
48
185
  }
49
186
 
@@ -68,6 +205,15 @@ extend type Query {
68
205
  selectedFields:String
69
206
  isServiceThreads:Boolean
70
207
  ): PostThread @isAuthenticated @addAccountContext
208
+
209
+ threadMessagesCount(
210
+ channelId: ID
211
+ postParentId: ID
212
+ role: String
213
+ participantsIds: [String]
214
+ selectedFields:String
215
+ isServiceThreads:Boolean
216
+ ): Int @isAuthenticated @addAccountContext
71
217
  }
72
218
 
73
219
  extend type Mutation {
@@ -1 +1 @@
1
- var postThread = "type PostThreadParticipants {\n id: ID!\n user: UserAccount!\n roles: String\n orgName: String\n updatedAt: DateTime\n CreatedAt: DateTime\n}\n\ntype PostThread implements IBaseRepo {\n id: ID!\n post: Post\n channel: Channel\n replyCount: Int\n lastReplyAt: DateTime\n participants: [PostThreadParticipants]\n # orgName: String\n createdAt: DateTime\n updatedAt: DateTime\n deletedAt: DateTime\n replies(criteria: AnyObject, limit: Int, skip: Int, sort: Sort): [Post]\n}\n\ntype ThreadMessages {\n totalCount: Int\n data: [PostThread]\n}\n\ntype ThreadMessageSent {\n lastMessage: Post\n data: PostThread\n}\n\ninput ThreadMessageInput {\n content: String!\n userRef: [String] #userId\n channelRef: [String] #channelId\n files: [ID!]\n role: String\n notificationParams:ExpoNotificationData\n}\n\ntype ThreadCreatedUpdated {\n isCreated: Boolean\n isUpdated: Boolean\n lastMessage: Post\n data: PostThread\n}\n\nextend type Query {\n threadMessages(\n channelId: ID\n postParentId: ID\n role: String\n participantsIds: [String]\n selectedFields:String\n isServiceThreads:Boolean\n limit: Int\n skip: Int\n ): ThreadMessages! @isAuthenticated @addAccountContext\n\n getPostThread(\n postThreadId: ID\n channelId: ID\n postParentId: ID\n role: String\n participantsIds: [String]\n selectedFields:String\n isServiceThreads:Boolean\n ): PostThread @isAuthenticated @addAccountContext\n}\n\nextend type Mutation {\n sendThreadMessage(\n channelId: ID!\n postParentId: String\n responderId: String\n postId: ID\n threadMessageInput: ThreadMessageInput!\n postThreadId: ID\n ): ThreadMessageSent @isAuthenticated @addAccountContext\n\n createPostThread(\n channelId: ID!\n postParentId: String\n responderId: String\n postId: ID\n threadMessageInput: ThreadMessageInput!\n postThreadId: ID\n ): ThreadMessageSent @isAuthenticated @addAccountContext\n}\n\nextend type Subscription {\n # chatMessageAdded(channelId: String, directTo: String): Post @isAuthenticated @addAccountContext\n threadChatMessageAdded(channelId: String, postParentId: String): Post @addAccountContext\n threadCreatedUpdated(channelId: String, postParentId: String): ThreadCreatedUpdated @addAccountContext\n}\n";export{postThread as default};//# sourceMappingURL=post-thread.graphql.js.map
1
+ var postThread = "\"\"\"\nPost thread participants information\n\"\"\"\ntype PostThreadParticipants @entity {\n \"\"\"\n Unique identifier for the participant\n \"\"\"\n id: ID! @id\n \n \"\"\"\n Participant user account\n \"\"\"\n user: UserAccount! @column(overrideType: \"ObjectId\")\n \n \"\"\"\n Participant roles\n \"\"\"\n roles: String @column\n \n \"\"\"\n Organization name\n \"\"\"\n organization: Organization! @column(overrideType: \"ObjectId\")\n orgName: String @column\n \n \"\"\"\n Last update timestamp\n \"\"\"\n updatedAt: DateTime @column(overrideType: \"Date\")\n \n \"\"\"\n Creation timestamp\n \"\"\"\n createdAt: DateTime @column(overrideType: \"Date\")\n \n \"\"\"\n Deletion timestamp\n \"\"\"\n deletedAt: DateTime @column(overrideType: \"Date\")\n}\n\n\"\"\"\nPost thread: A threaded conversation within a post\n\"\"\"\ntype PostThread implements IBaseRepo @entity {\n \"\"\"\n Unique identifier for the thread\n \"\"\"\n id: ID! @id\n \n \"\"\"\n Parent post of the thread\n \"\"\"\n post: Post @column(overrideType: \"ObjectId\")\n \n \"\"\"\n Channel containing the thread\n \"\"\"\n channel: Channel @column(overrideType: \"ObjectId\")\n \n \"\"\"\n Number of replies in thread\n \"\"\"\n replyCount: Int @column\n \n \"\"\"\n Last reply timestamp\n \"\"\"\n lastReplyAt: DateTime @column(overrideType: \"Date\")\n \n \"\"\"\n Thread participants\n \"\"\"\n participants: [PostThreadParticipants] @column(overrideType: \"ObjectId\")\n \n \"\"\"\n Creation timestamp\n \"\"\"\n createdAt: DateTime @column(overrideType: \"Date\")\n \n \"\"\"\n Last update timestamp\n \"\"\"\n updatedAt: DateTime @column(overrideType: \"Date\")\n \n \"\"\"\n Deletion timestamp\n \"\"\"\n deletedAt: DateTime @column(overrideType: \"Date\")\n \n \"\"\"\n Thread replies with pagination\n \"\"\"\n replies(criteria: AnyObject, limit: Int, skip: Int, sort: Sort): [Post]\n}\n\n\"\"\"\nThread messages response with pagination\n\"\"\"\ntype ThreadMessages {\n \"\"\"\n Total count of thread messages\n \"\"\"\n totalCount: Int\n \n \"\"\"\n Thread message data\n \"\"\"\n data: [PostThread]\n}\n\n\"\"\"\nThread message sent response\n\"\"\"\ntype ThreadMessageSent {\n \"\"\"\n Last message in thread\n \"\"\"\n lastMessage: Post\n \n \"\"\"\n Thread data\n \"\"\"\n data: PostThread\n}\n\n\"\"\"\nThread message input for creating thread messages\n\"\"\"\ninput ThreadMessageInput {\n \"\"\"\n Message content\n \"\"\"\n content: String!\n \n \"\"\"\n Referenced user IDs\n \"\"\"\n userRef: [String] # userId\n \n \"\"\"\n Referenced channel IDs\n \"\"\"\n channelRef: [String] # channelId\n \n \"\"\"\n Attached file IDs\n \"\"\"\n files: [ID!]\n \n \"\"\"\n User role in thread\n \"\"\"\n role: String\n \n \"\"\"\n Notification parameters\n \"\"\"\n notificationParams: ExpoNotificationData\n}\n\n\"\"\"\nThread creation/update response\n\"\"\"\ntype ThreadCreatedUpdated {\n \"\"\"\n Whether thread was created\n \"\"\"\n isCreated: Boolean\n \n \"\"\"\n Whether thread was updated\n \"\"\"\n isUpdated: Boolean\n \n \"\"\"\n Last message in thread\n \"\"\"\n lastMessage: Post\n \n \"\"\"\n Thread data\n \"\"\"\n data: PostThread\n}\n\nextend type Query {\n threadMessages(\n channelId: ID\n postParentId: ID\n role: String\n participantsIds: [String]\n selectedFields:String\n isServiceThreads:Boolean\n limit: Int\n skip: Int\n ): ThreadMessages! @isAuthenticated @addAccountContext\n\n getPostThread(\n postThreadId: ID\n channelId: ID\n postParentId: ID\n role: String\n participantsIds: [String]\n selectedFields:String\n isServiceThreads:Boolean\n ): PostThread @isAuthenticated @addAccountContext\n\n threadMessagesCount(\n channelId: ID\n postParentId: ID\n role: String\n participantsIds: [String]\n selectedFields:String\n isServiceThreads:Boolean\n ): Int @isAuthenticated @addAccountContext\n}\n\nextend type Mutation {\n sendThreadMessage(\n channelId: ID!\n postParentId: String\n responderId: String\n postId: ID\n threadMessageInput: ThreadMessageInput!\n postThreadId: ID\n ): ThreadMessageSent @isAuthenticated @addAccountContext\n\n createPostThread(\n channelId: ID!\n postParentId: String\n responderId: String\n postId: ID\n threadMessageInput: ThreadMessageInput!\n postThreadId: ID\n ): ThreadMessageSent @isAuthenticated @addAccountContext\n}\n\nextend type Subscription {\n # chatMessageAdded(channelId: String, directTo: String): Post @isAuthenticated @addAccountContext\n threadChatMessageAdded(channelId: String, postParentId: String): Post @addAccountContext\n threadCreatedUpdated(channelId: String, postParentId: String): ThreadCreatedUpdated @addAccountContext\n}\n";export{postThread as default};//# sourceMappingURL=post-thread.graphql.js.map
@@ -1,82 +1,326 @@
1
- enum PostTypeEnum{
1
+ extend enum ConfigCollectionName {
2
+ POST
3
+ }
4
+
5
+ """
6
+ Post type enumeration
7
+ """
8
+ enum PostTypeEnum {
9
+ """
10
+ Simple post type
11
+ """
2
12
  Simple
13
+
14
+ """
15
+ Public post type
16
+ """
3
17
  Public
18
+
19
+ """
20
+ Private post type
21
+ """
22
+ Private
23
+
24
+ """
25
+ Service post type
26
+ """
27
+ Service
28
+
29
+ """
30
+ Message post type
31
+ """
32
+ Message
4
33
  }
5
34
 
6
- type Post implements IBaseRepo & IFileRef {
7
- id: ID!
8
- author: UserAccount
9
- channel: Channel
35
+ """
36
+ Post: A message or content posted in a channel
37
+ """
38
+ type Post implements IBaseRepo & IFileRef @entity {
39
+ """
40
+ Unique identifier for the post
41
+ """
42
+ id: ID! @id
43
+
44
+ """
45
+ Post author/creator
46
+ """
47
+ author: UserAccount @column(overrideType: "ObjectId")
48
+
49
+ """
50
+ Creator of the post
51
+ """
52
+ creator: UserAccount @column(overrideType: "ObjectId")
53
+
54
+ """
55
+ Channel where post was made
56
+ """
57
+ channel: Channel @column(overrideType: "ObjectId")
10
58
 
11
- rootId: String
12
- parentId: String
13
- originalId: String
59
+ """
60
+ Root post ID for threaded conversations
61
+ """
62
+ rootId: String @column
63
+
64
+ """
65
+ Parent post ID for replies
66
+ """
67
+ parentId: String @column
68
+
69
+ """
70
+ Original post ID for forwarded messages
71
+ """
72
+ originalId: String @column
14
73
 
15
- """ Post sent by server e.g. User joined channel """
16
- fromServer: Boolean
74
+ """
75
+ Post sent by server e.g. User joined channel
76
+ """
77
+ fromServer: Boolean @column
17
78
 
18
- message: String
19
- type: PostTypeEnum
20
- props: AnyObject
21
- hashTags: String
79
+ """
80
+ Post message content
81
+ """
82
+ message: String @column
83
+
84
+ """
85
+ Post type classification
86
+ """
87
+ type: PostTypeEnum @column
88
+
89
+ """
90
+ Additional post properties
91
+ """
92
+ props: AnyObject @column
93
+
94
+ """
95
+ Post hashtags
96
+ """
97
+ hashTags: String @column
22
98
 
23
- filenames: [String]
24
- fields: [String]
25
- reactions: [Reaction]
99
+ """
100
+ Attached filenames
101
+ """
102
+ filenames: [String] @column
103
+
104
+ """
105
+ Custom fields
106
+ """
107
+ fields: [String] @column
108
+
109
+ """
110
+ Post reactions
111
+ """
112
+ reactions: [Reaction] @column(overrideType: "ObjectId[]")
113
+
114
+ """
115
+ Attached files with pagination
116
+ """
26
117
  files(criteria:AnyObject, limit:Int, skip:Int, sort:Sort):FilesInfo!
27
- editedBy: UserAccount
28
- deletedBy: UserAccount
29
- createdAt: DateTime
30
- updatedAt: DateTime
31
- deletedAt: DateTime
118
+
119
+ """
120
+ User who edited the post
121
+ """
122
+ editedBy: UserAccount @column(overrideType: "ObjectId")
123
+
124
+ """
125
+ User who deleted the post
126
+ """
127
+ deletedBy: UserAccount @column(overrideType: "ObjectId")
128
+
129
+ """
130
+ Edit timestamp
131
+ """
132
+ editedAt: DateTime @column(overrideType: "Date")
133
+
134
+ """
135
+ Creation timestamp
136
+ """
137
+ createdAt: DateTime @column(overrideType: "Date")
138
+
139
+ """
140
+ Last update timestamp
141
+ """
142
+ updatedAt: DateTime @column(overrideType: "Date")
143
+
144
+ """
145
+ Deletion timestamp
146
+ """
147
+ deletedAt: DateTime @column(overrideType: "Date")
32
148
 
33
- propsConfiguration: MachineConfiguration
149
+ """
150
+ Props configuration for machine states
151
+ References the configuration model for storing machine-specific settings and state information.
152
+ """
153
+ propsConfiguration: MachineConfiguration @column(overrideType: "ObjectId")
34
154
 
35
- isRead: Boolean
36
- isPinned: Boolean
37
- isDelivered: Boolean
155
+ """
156
+ Whether post has been read
157
+ """
158
+ isRead: Boolean @column
159
+
160
+ """
161
+ Whether post is pinned
162
+ """
163
+ isPinned: Boolean @column
164
+
165
+ """
166
+ Whether post has been delivered
167
+ """
168
+ isDelivered: Boolean @column
169
+
170
+ """
171
+ Whether post has reactions
172
+ """
173
+ hasReactions: Boolean @column
174
+
175
+ """
176
+ Post replies with pagination
177
+ """
38
178
  replies(criteria:AnyObject, limit:Int, skip:Int, sort:Sort): Messages
39
179
  }
40
180
 
181
+ """
182
+ Expo notification thread input
183
+ """
41
184
  input ExpoNotificationThread {
42
- id:String!
43
- extraParams:AnyObject
185
+ """
186
+ Thread identifier
187
+ """
188
+ id: String!
189
+
190
+ """
191
+ Additional thread parameters
192
+ """
193
+ extraParams: AnyObject
44
194
  }
45
195
 
196
+ """
197
+ Expo notification data input
198
+ """
46
199
  input ExpoNotificationData {
200
+ """
201
+ Notification URL
202
+ """
47
203
  url: String!
204
+
205
+ """
206
+ URL parameters
207
+ """
48
208
  params: AnyObject!
49
- title:String
50
- body:String
51
- screen:String
52
- senderId:String
53
- thread:ExpoNotificationThread
209
+
210
+ """
211
+ Notification title
212
+ """
213
+ title: String
214
+
215
+ """
216
+ Notification body
217
+ """
218
+ body: String
219
+
220
+ """
221
+ Target screen
222
+ """
223
+ screen: String
224
+
225
+ """
226
+ Sender identifier
227
+ """
228
+ senderId: String
229
+
230
+ """
231
+ Thread information
232
+ """
233
+ thread: ExpoNotificationThread
234
+
235
+ """
236
+ Additional notification data
237
+ """
54
238
  other: AnyObject
55
239
  }
56
240
 
241
+ """
242
+ Message input for creating posts
243
+ """
57
244
  input MessageInput {
245
+ """
246
+ Message content
247
+ """
58
248
  content: String!
59
- userRef: [String] #userId
60
- channelRef: [String] #channelId
249
+
250
+ """
251
+ Referenced user IDs
252
+ """
253
+ userRef: [String] # userId
254
+
255
+ """
256
+ Referenced channel IDs
257
+ """
258
+ channelRef: [String] # channelId
259
+
260
+ """
261
+ Attached file IDs
262
+ """
61
263
  files: [ID!]
62
- createdBy:ID #Posted by
63
- notificationParams:ExpoNotificationData
264
+
265
+ """
266
+ Creator user ID
267
+ """
268
+ createdBy: ID # Posted by
269
+
270
+ """
271
+ Notification parameters
272
+ """
273
+ notificationParams: ExpoNotificationData
64
274
  }
65
275
 
276
+ """
277
+ Message identifier input
278
+ """
66
279
  input MessageIdentifier {
280
+ """
281
+ Channel identifier
282
+ """
67
283
  channelId: String!
284
+
285
+ """
286
+ Message identifier
287
+ """
68
288
  messageId: String!
69
289
  }
70
290
 
291
+ """
292
+ Posts with cursor for pagination
293
+ """
71
294
  type PostsWithCursor {
295
+ """
296
+ Pagination cursor
297
+ """
72
298
  cursor: String
299
+
300
+ """
301
+ Associated channel
302
+ """
73
303
  channel: Channel
304
+
305
+ """
306
+ List of posts
307
+ """
74
308
  posts: [Post]
75
309
  }
76
310
 
77
- type Messages{
78
- totalCount: Int,
79
- data:[Post]
311
+ """
312
+ Messages response with pagination
313
+ """
314
+ type Messages {
315
+ """
316
+ Total count of messages
317
+ """
318
+ totalCount: Int
319
+
320
+ """
321
+ Message data
322
+ """
323
+ data: [Post]
80
324
  }
81
325
 
82
326
 
@@ -1 +1 @@
1
- var postSchema = "enum PostTypeEnum{\n Simple\n Public\n}\n\ntype Post implements IBaseRepo & IFileRef {\n id: ID!\n author: UserAccount\n channel: Channel\n\n rootId: String\n parentId: String\n originalId: String\n\n \"\"\" Post sent by server e.g. User joined channel \"\"\"\n fromServer: Boolean\n\n message: String\n type: PostTypeEnum\n props: AnyObject\n hashTags: String\n\n filenames: [String]\n fields: [String]\n reactions: [Reaction]\n files(criteria:AnyObject, limit:Int, skip:Int, sort:Sort):FilesInfo!\n editedBy: UserAccount\n deletedBy: UserAccount\n createdAt: DateTime\n updatedAt: DateTime\n deletedAt: DateTime\n\n propsConfiguration: MachineConfiguration\n\n isRead: Boolean\n isPinned: Boolean\n isDelivered: Boolean\n replies(criteria:AnyObject, limit:Int, skip:Int, sort:Sort): Messages\n}\n\ninput ExpoNotificationThread {\n id:String!\n extraParams:AnyObject\n}\n\ninput ExpoNotificationData {\n url: String!\n params: AnyObject!\n title:String\n body:String\n screen:String\n senderId:String\n thread:ExpoNotificationThread\n other: AnyObject\n}\n\ninput MessageInput {\n content: String!\n userRef: [String] #userId\n channelRef: [String] #channelId\n files: [ID!]\n createdBy:ID #Posted by\n notificationParams:ExpoNotificationData\n}\n\ninput MessageIdentifier {\n channelId: String!\n messageId: String!\n}\n\ntype PostsWithCursor {\n cursor: String\n channel: Channel\n posts: [Post]\n}\n\ntype Messages{\n totalCount: Int,\n data:[Post]\n}\n\n\nextend type Query {\n messages(\n channelId: ID,\n # channelName: String,\n # directTo: ID,\n parentId: String,\n limit: Int,\n skip: Int,\n sort:Sort,\n # searchRegex: String,\n # excludeServer: Boolean\n ): Messages! @isAuthenticated @addAccountContext\n\n publicMessages(\n channelId: ID!\n ): Messages! @addAccountContext\n}\n\nextend type Mutation {\n deleteMessage(messageId: MessageIdentifier!): Boolean @isAuthenticated @addAccountContext\n editMessage(messageId: MessageIdentifier!, messageInput: MessageInput!): Post @isAuthenticated @addAccountContext\n sendMessage(channelId: String!, messageInput: MessageInput!,postId: ID): Post @isAuthenticated @addAccountContext\n \"\"\"\n Attach Post File\n \"\"\"\n createMessageFileUploadLink(postId:ID!, filename:String!): String! @isAuthenticated @addAccountContext\n attachUploadedFileToMessage(postId:ID!, file: UploadedFileInput!): FileInfo! @isAuthenticated @addAccountContext\n\n createMessageFilesUploadLink(postId:ID!, filenames:[String!]!): [String!]! @isAuthenticated @addAccountContext\n attachUploadedFilesToMessage(postId:ID!, files: [UploadedFileInput!]!): [FileInfo!]! @isAuthenticated @addAccountContext\n \"\"\"\n Detach Post File\n \"\"\"\n deleteMessageFile(url: String!): Boolean! @isAuthenticated @addAccountContext\n\n readMessage(messageId: MessageIdentifier!): Boolean! @isAuthenticated @addAccountContext\n\n deliverMessage(messageId: MessageIdentifier!): Boolean! @isAuthenticated @addAccountContext\n\n sendPublicMessage(channelId: String!, messageInput: MessageInput!,postId: ID): Post @addAccountContext\n sendExpoNotificationOnPost(postId: ID!, notificationData: ExpoNotificationData!): Boolean!\n TestchatMessage(channelId: String!): AnyObject \n}\n\nextend type Subscription {\n # chatMessageAdded(channelId: String, directTo: String): Post @isAuthenticated @addAccountContext\n chatMessageAdded(channelId: String, directTo: String): Post @addAccountContext\n publicPostAdded(channelId: String!): Post @addAccountContext\n chatMessageTest(channelId: String, directTo: String): AnyObject\n}\n";export{postSchema as default};//# sourceMappingURL=post.graphql.js.map
1
+ var postSchema = "extend enum ConfigCollectionName {\n POST\n}\n\n\"\"\"\nPost type enumeration\n\"\"\"\nenum PostTypeEnum {\n \"\"\"\n Simple post type\n \"\"\"\n Simple\n \n \"\"\"\n Public post type\n \"\"\"\n Public\n\n \"\"\"\n Private post type\n \"\"\"\n Private\n\n \"\"\"\n Service post type\n \"\"\"\n Service\n\n \"\"\"\n Message post type\n \"\"\"\n Message\n}\n\n\"\"\"\nPost: A message or content posted in a channel\n\"\"\"\ntype Post implements IBaseRepo & IFileRef @entity {\n \"\"\"\n Unique identifier for the post\n \"\"\"\n id: ID! @id\n \n \"\"\"\n Post author/creator\n \"\"\"\n author: UserAccount @column(overrideType: \"ObjectId\")\n \n \"\"\"\n Creator of the post\n \"\"\"\n creator: UserAccount @column(overrideType: \"ObjectId\")\n \n \"\"\"\n Channel where post was made\n \"\"\"\n channel: Channel @column(overrideType: \"ObjectId\")\n\n \"\"\"\n Root post ID for threaded conversations\n \"\"\"\n rootId: String @column\n \n \"\"\"\n Parent post ID for replies\n \"\"\"\n parentId: String @column\n \n \"\"\"\n Original post ID for forwarded messages\n \"\"\"\n originalId: String @column\n\n \"\"\"\n Post sent by server e.g. User joined channel\n \"\"\"\n fromServer: Boolean @column\n\n \"\"\"\n Post message content\n \"\"\"\n message: String @column\n \n \"\"\"\n Post type classification\n \"\"\"\n type: PostTypeEnum @column\n \n \"\"\"\n Additional post properties\n \"\"\"\n props: AnyObject @column\n \n \"\"\"\n Post hashtags\n \"\"\"\n hashTags: String @column\n\n \"\"\"\n Attached filenames\n \"\"\"\n filenames: [String] @column\n \n \"\"\"\n Custom fields\n \"\"\"\n fields: [String] @column\n \n \"\"\"\n Post reactions\n \"\"\"\n reactions: [Reaction] @column(overrideType: \"ObjectId[]\")\n \n \"\"\"\n Attached files with pagination\n \"\"\"\n files(criteria:AnyObject, limit:Int, skip:Int, sort:Sort):FilesInfo!\n \n \"\"\"\n User who edited the post\n \"\"\"\n editedBy: UserAccount @column(overrideType: \"ObjectId\")\n \n \"\"\"\n User who deleted the post\n \"\"\"\n deletedBy: UserAccount @column(overrideType: \"ObjectId\")\n \n \"\"\"\n Edit timestamp\n \"\"\"\n editedAt: DateTime @column(overrideType: \"Date\")\n \n \"\"\"\n Creation timestamp\n \"\"\"\n createdAt: DateTime @column(overrideType: \"Date\")\n \n \"\"\"\n Last update timestamp\n \"\"\"\n updatedAt: DateTime @column(overrideType: \"Date\")\n \n \"\"\"\n Deletion timestamp\n \"\"\"\n deletedAt: DateTime @column(overrideType: \"Date\")\n\n \"\"\"\n Props configuration for machine states\n References the configuration model for storing machine-specific settings and state information.\n \"\"\"\n propsConfiguration: MachineConfiguration @column(overrideType: \"ObjectId\")\n\n \"\"\"\n Whether post has been read\n \"\"\"\n isRead: Boolean @column\n \n \"\"\"\n Whether post is pinned\n \"\"\"\n isPinned: Boolean @column\n \n \"\"\"\n Whether post has been delivered\n \"\"\"\n isDelivered: Boolean @column\n \n \"\"\"\n Whether post has reactions\n \"\"\"\n hasReactions: Boolean @column\n \n \"\"\"\n Post replies with pagination\n \"\"\"\n replies(criteria:AnyObject, limit:Int, skip:Int, sort:Sort): Messages\n}\n\n\"\"\"\nExpo notification thread input\n\"\"\"\ninput ExpoNotificationThread {\n \"\"\"\n Thread identifier\n \"\"\"\n id: String!\n \n \"\"\"\n Additional thread parameters\n \"\"\"\n extraParams: AnyObject\n}\n\n\"\"\"\nExpo notification data input\n\"\"\"\ninput ExpoNotificationData {\n \"\"\"\n Notification URL\n \"\"\"\n url: String!\n \n \"\"\"\n URL parameters\n \"\"\"\n params: AnyObject!\n \n \"\"\"\n Notification title\n \"\"\"\n title: String\n \n \"\"\"\n Notification body\n \"\"\"\n body: String\n \n \"\"\"\n Target screen\n \"\"\"\n screen: String\n \n \"\"\"\n Sender identifier\n \"\"\"\n senderId: String\n \n \"\"\"\n Thread information\n \"\"\"\n thread: ExpoNotificationThread\n \n \"\"\"\n Additional notification data\n \"\"\"\n other: AnyObject\n}\n\n\"\"\"\nMessage input for creating posts\n\"\"\"\ninput MessageInput {\n \"\"\"\n Message content\n \"\"\"\n content: String!\n \n \"\"\"\n Referenced user IDs\n \"\"\"\n userRef: [String] # userId\n \n \"\"\"\n Referenced channel IDs\n \"\"\"\n channelRef: [String] # channelId\n \n \"\"\"\n Attached file IDs\n \"\"\"\n files: [ID!]\n \n \"\"\"\n Creator user ID\n \"\"\"\n createdBy: ID # Posted by\n \n \"\"\"\n Notification parameters\n \"\"\"\n notificationParams: ExpoNotificationData\n}\n\n\"\"\"\nMessage identifier input\n\"\"\"\ninput MessageIdentifier {\n \"\"\"\n Channel identifier\n \"\"\"\n channelId: String!\n \n \"\"\"\n Message identifier\n \"\"\"\n messageId: String!\n}\n\n\"\"\"\nPosts with cursor for pagination\n\"\"\"\ntype PostsWithCursor {\n \"\"\"\n Pagination cursor\n \"\"\"\n cursor: String\n \n \"\"\"\n Associated channel\n \"\"\"\n channel: Channel\n \n \"\"\"\n List of posts\n \"\"\"\n posts: [Post]\n}\n\n\"\"\"\nMessages response with pagination\n\"\"\"\ntype Messages {\n \"\"\"\n Total count of messages\n \"\"\"\n totalCount: Int\n \n \"\"\"\n Message data\n \"\"\"\n data: [Post]\n}\n\n\nextend type Query {\n messages(\n channelId: ID,\n # channelName: String,\n # directTo: ID,\n parentId: String,\n limit: Int,\n skip: Int,\n sort:Sort,\n # searchRegex: String,\n # excludeServer: Boolean\n ): Messages! @isAuthenticated @addAccountContext\n\n publicMessages(\n channelId: ID!\n ): Messages! @addAccountContext\n}\n\nextend type Mutation {\n deleteMessage(messageId: MessageIdentifier!): Boolean @isAuthenticated @addAccountContext\n editMessage(messageId: MessageIdentifier!, messageInput: MessageInput!): Post @isAuthenticated @addAccountContext\n sendMessage(channelId: String!, messageInput: MessageInput!,postId: ID): Post @isAuthenticated @addAccountContext\n \"\"\"\n Attach Post File\n \"\"\"\n createMessageFileUploadLink(postId:ID!, filename:String!): String! @isAuthenticated @addAccountContext\n attachUploadedFileToMessage(postId:ID!, file: UploadedFileInput!): FileInfo! @isAuthenticated @addAccountContext\n\n createMessageFilesUploadLink(postId:ID!, filenames:[String!]!): [String!]! @isAuthenticated @addAccountContext\n attachUploadedFilesToMessage(postId:ID!, files: [UploadedFileInput!]!): [FileInfo!]! @isAuthenticated @addAccountContext\n \"\"\"\n Detach Post File\n \"\"\"\n deleteMessageFile(url: String!): Boolean! @isAuthenticated @addAccountContext\n\n readMessage(messageId: MessageIdentifier!): Boolean! @isAuthenticated @addAccountContext\n\n deliverMessage(messageId: MessageIdentifier!): Boolean! @isAuthenticated @addAccountContext\n\n sendPublicMessage(channelId: String!, messageInput: MessageInput!,postId: ID): Post @addAccountContext\n sendExpoNotificationOnPost(postId: ID!, notificationData: ExpoNotificationData!): Boolean!\n TestchatMessage(channelId: String!): AnyObject \n}\n\nextend type Subscription {\n # chatMessageAdded(channelId: String, directTo: String): Post @isAuthenticated @addAccountContext\n chatMessageAdded(channelId: String, directTo: String): Post @addAccountContext\n publicPostAdded(channelId: String!): Post @addAccountContext\n chatMessageTest(channelId: String, directTo: String): AnyObject\n}\n";export{postSchema as default};//# sourceMappingURL=post.graphql.js.map