@messenger-box/platform-server 10.0.3-alpha.6 → 10.0.3-alpha.62

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