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

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 (98) hide show
  1. package/lib/config/env-config.d.ts +7 -0
  2. package/lib/config/env-config.js +20 -0
  3. package/lib/config/env-config.js.map +1 -1
  4. package/lib/containers/containers.js +6 -1
  5. package/lib/containers/containers.js.map +1 -1
  6. package/lib/containers/context-services-from-container.js +4 -2
  7. package/lib/containers/context-services-from-container.js.map +1 -1
  8. package/lib/graphql/resolvers/ai-fragment.d.ts +3 -0
  9. package/lib/graphql/resolvers/ai-fragment.js +276 -0
  10. package/lib/graphql/resolvers/ai-fragment.js.map +1 -0
  11. package/lib/graphql/resolvers/channel.js +29 -0
  12. package/lib/graphql/resolvers/channel.js.map +1 -1
  13. package/lib/graphql/resolvers/index.js +1 -1
  14. package/lib/graphql/resolvers/index.js.map +1 -1
  15. package/lib/graphql/resolvers/post.js +187 -14
  16. package/lib/graphql/resolvers/post.js.map +1 -1
  17. package/lib/graphql/schema/ai-fragment.graphql +311 -0
  18. package/lib/graphql/schema/ai-fragment.graphql.js +1 -0
  19. package/lib/graphql/schema/ai-fragment.graphql.js.map +1 -0
  20. package/lib/graphql/schema/channel.graphql +19 -0
  21. package/lib/graphql/schema/channel.graphql.js +1 -1
  22. package/lib/graphql/schema/index.js +2 -2
  23. package/lib/graphql/schema/index.js.map +1 -1
  24. package/lib/graphql/schema/post.graphql +76 -0
  25. package/lib/graphql/schema/post.graphql.js +1 -1
  26. package/lib/graphql/schema/services.graphql +19 -0
  27. package/lib/index.js.map +1 -1
  28. package/lib/inngest/factory.d.ts +20 -0
  29. package/lib/inngest/factory.js +4 -0
  30. package/lib/inngest/factory.js.map +1 -0
  31. package/lib/inngest/functions.d.ts +235 -0
  32. package/lib/inngest/functions.js +1385 -0
  33. package/lib/inngest/functions.js.map +1 -0
  34. package/lib/inngest/index.d.ts +3 -0
  35. package/lib/inngest/prompt.d.ts +6 -0
  36. package/lib/inngest/prompt.js +871 -0
  37. package/lib/inngest/prompt.js.map +1 -0
  38. package/lib/inngest/utils.d.ts +5 -0
  39. package/lib/inngest/utils.js +32 -0
  40. package/lib/inngest/utils.js.map +1 -0
  41. package/lib/module.js +10 -3
  42. package/lib/module.js.map +1 -1
  43. package/lib/plugins/ai-fragment-moleculer-service.d.ts +29 -0
  44. package/lib/plugins/ai-fragment-moleculer-service.js +516 -0
  45. package/lib/plugins/ai-fragment-moleculer-service.js.map +1 -0
  46. package/lib/plugins/channel-moleculer-service.js +9 -0
  47. package/lib/plugins/channel-moleculer-service.js.map +1 -1
  48. package/lib/plugins/index.d.ts +1 -0
  49. package/lib/plugins/post-moleculer-service.js +116 -0
  50. package/lib/plugins/post-moleculer-service.js.map +1 -1
  51. package/lib/services/ai-fragment-service.d.ts +195 -0
  52. package/lib/services/ai-fragment-service.js +631 -0
  53. package/lib/services/ai-fragment-service.js.map +1 -0
  54. package/lib/services/channel-service.d.ts +5 -2
  55. package/lib/services/channel-service.js +24 -2
  56. package/lib/services/channel-service.js.map +1 -1
  57. package/lib/services/index.d.ts +2 -0
  58. package/lib/services/post-service.d.ts +9 -2
  59. package/lib/services/post-service.js +225 -5
  60. package/lib/services/post-service.js.map +1 -1
  61. package/lib/services/proxy-services/ai-fragment-microservice.d.ts +23 -0
  62. package/lib/services/proxy-services/ai-fragment-microservice.js +78 -0
  63. package/lib/services/proxy-services/ai-fragment-microservice.js.map +1 -0
  64. package/lib/services/proxy-services/channel-microservice.d.ts +2 -1
  65. package/lib/services/proxy-services/channel-microservice.js +6 -0
  66. package/lib/services/proxy-services/channel-microservice.js.map +1 -1
  67. package/lib/services/proxy-services/index.d.ts +1 -0
  68. package/lib/services/proxy-services/post-microservice.d.ts +22 -1
  69. package/lib/services/proxy-services/post-microservice.js +80 -0
  70. package/lib/services/proxy-services/post-microservice.js.map +1 -1
  71. package/lib/services/sandbox-error-service.d.ts +23 -0
  72. package/lib/services/sandbox-error-service.js +422 -0
  73. package/lib/services/sandbox-error-service.js.map +1 -0
  74. package/lib/store/models/ai-fragment.d.ts +4 -0
  75. package/lib/store/models/ai-fragment.js +125 -0
  76. package/lib/store/models/ai-fragment.js.map +1 -0
  77. package/lib/store/models/channel.js +5 -0
  78. package/lib/store/models/channel.js.map +1 -1
  79. package/lib/store/models/index.d.ts +1 -0
  80. package/lib/store/repositories/ai-fragment-repository.d.ts +15 -0
  81. package/lib/store/repositories/ai-fragment-repository.js +69 -0
  82. package/lib/store/repositories/ai-fragment-repository.js.map +1 -0
  83. package/lib/store/repositories/channel-repository.js +1 -1
  84. package/lib/store/repositories/channel-repository.js.map +1 -1
  85. package/lib/store/repositories/index.d.ts +1 -0
  86. package/lib/store/repositories/post-repository.js +1 -1
  87. package/lib/store/repositories/post-repository.js.map +1 -1
  88. package/lib/store/repositories/post-thread-repository.js +1 -1
  89. package/lib/store/repositories/post-thread-repository.js.map +1 -1
  90. package/lib/store/repositories/reaction-repository.js +1 -1
  91. package/lib/store/repositories/reaction-repository.js.map +1 -1
  92. package/lib/templates/constants/SERVER_TYPES.ts.template +4 -1
  93. package/lib/templates/repositories/AiFragmentRepository.ts.template +4 -0
  94. package/lib/templates/services/AiFragmentService.ts.template +123 -0
  95. package/lib/templates/services/ChannelService.ts.template +11 -1
  96. package/lib/templates/services/PostService.ts.template +82 -1
  97. package/lib/templates/services/SandboxErrorService.ts.template +125 -0
  98. package/package.json +12 -6
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-fragment.graphql.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -77,6 +77,11 @@ type Channel implements IBaseRepo @entity {
77
77
  Last message in the channel
78
78
  """
79
79
  lastMessage: Post @column(overrideType: "ObjectId")
80
+
81
+ """
82
+ Project ID
83
+ """
84
+ projectId: String @column(overrideType: "ObjectId")
80
85
 
81
86
  """
82
87
  Creation timestamp
@@ -324,6 +329,15 @@ enum RoomType {
324
329
  VISITOR
325
330
  }
326
331
 
332
+ input ChannelInput {
333
+ content: String!
334
+ files: [ID!]
335
+ createdBy: ID
336
+ notificationParams: ExpoNotificationData
337
+ modelConfig: AnyObject
338
+ }
339
+
340
+
327
341
  extend type Query {
328
342
  """
329
343
  Get channel by name
@@ -435,4 +449,9 @@ extend type Mutation {
435
449
  unit: String!
436
450
  value: Int!
437
451
  ): Boolean @addAccountContext @isAuthenticated
452
+
453
+ """
454
+ Create channel with project ID
455
+ """
456
+ createChannelWithProjectId(projectId: String!,channelInput: ChannelInput!): Boolean! @isAuthenticated @addAccountContext
438
457
  }
@@ -1 +1 @@
1
- var channelSchema = "\"\"\"\nChannel: A communication channel within an organization or team.\n\"\"\"\ntype Channel implements IBaseRepo @entity {\n \"\"\"\n Unique identifier for the channel\n \"\"\"\n id: String! @id\n \n \"\"\"\n Channel title/name\n \"\"\"\n title: String @column\n \n \"\"\"\n Channel topic\n \"\"\"\n topic: String @column\n \n \"\"\"\n Organization name\n \"\"\"\n organization: Organization! @column(overrideType: \"ObjectId\")\n orgName: String @column\n \n \"\"\"\n Channel purpose\n \"\"\"\n purpose: String @column\n \n \"\"\"\n Channel description\n \"\"\"\n description: String @column\n \n \"\"\"\n Display name\n \"\"\"\n displayName: String @column\n \n \"\"\"\n Associated team\n \"\"\"\n team: AccountTeam @column(overrideType: \"ObjectId\")\n \n \"\"\"\n Last post timestamp\n \"\"\"\n lastPostAt: DateTime @column(overrideType: \"Date\")\n \n \"\"\"\n Total message count\n \"\"\"\n totalMsgCount: Int @column\n \n \"\"\"\n Total root message count\n \"\"\"\n totalMsgCountRoot: Int @column\n \n \"\"\"\n Channel creator\n \"\"\"\n creator: UserAccount @column(overrideType: \"ObjectId\")\n \n \"\"\"\n Channel members\n \"\"\"\n members: [ChannelMember] @column(overrideType: \"ObjectId[]\")\n \n \"\"\"\n Channel type\n \"\"\"\n type: String @column\n \n \"\"\"\n Last message in the channel\n \"\"\"\n lastMessage: Post @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\"\"\"\nChannel unread message information\n\"\"\"\ntype ChannelUnread {\n \"\"\"\n Team identifier\n \"\"\"\n teamId: String\n \n \"\"\"\n Channel identifier\n \"\"\"\n channelId: String\n \n \"\"\"\n Unread message count\n \"\"\"\n msgCount: Int\n \n \"\"\"\n Mention count\n \"\"\"\n mentionCount: Int\n \n \"\"\"\n Root mention count\n \"\"\"\n mentionCountRoot: Int\n \n \"\"\"\n Root message count\n \"\"\"\n msgCountRoot: Int\n \n \"\"\"\n Notification properties\n \"\"\"\n notifyProps: AnyObject\n}\n\n\"\"\"\nChannel filter input for queries\n\"\"\"\ninput ChannelFilterInput {\n \"\"\"\n Filter by name\n \"\"\"\n nameFilter: String\n \n \"\"\"\n Filter by privacy level\n \"\"\"\n privacy: ChannelPrivacy\n \n \"\"\"\n Filter joined channels only\n \"\"\"\n joinedChannels: Boolean\n \n \"\"\"\n Sort order\n \"\"\"\n storyBy: ChannelSort\n}\n\n\"\"\"\nChannel name and direct message input\n\"\"\"\ninput ChannelNameAndDirect {\n \"\"\"\n Channel name\n \"\"\"\n name: String!\n \n \"\"\"\n Is direct message\n \"\"\"\n direct: Boolean!\n}\n\n\"\"\"\nChannel create request input\n\"\"\"\ninput ChannelCreateRequest {\n \"\"\"\n Channel name\n \"\"\"\n name: String!\n \n \"\"\"\n Channel description\n \"\"\"\n description: String!\n \n \"\"\"\n Channel type\n \"\"\"\n type: RoomType\n \n \"\"\"\n Associated team\n \"\"\"\n team: String\n}\n\n\"\"\"\nChannel update request input\n\"\"\"\ninput ChannelUpdateRequest {\n \"\"\"\n Channel ID\n \"\"\"\n id: ID!\n \n \"\"\"\n Channel title\n \"\"\"\n title: String\n \n \"\"\"\n Channel description\n \"\"\"\n description: String\n \n \"\"\"\n Channel type\n \"\"\"\n type: RoomType\n}\n\n\"\"\"\nDirect channel create request input\n\"\"\"\ninput DirectChannelCreateRequest {\n \"\"\"\n Receiver user IDs\n \"\"\"\n receiver: [ID]!\n \n \"\"\"\n Display name\n \"\"\"\n displayName: String!\n \n \"\"\"\n Channel options\n \"\"\"\n channelOptions: AnyObject\n}\n\n\"\"\"\nChannel sorting options\n\"\"\"\nenum ChannelSort {\n \"\"\"\n Sort by name\n \"\"\"\n NAME\n \n \"\"\"\n Sort by number of messages\n \"\"\"\n NUMBER_OF_MESSAGES\n}\n\n\"\"\"\nChannel privacy levels\n\"\"\"\nenum ChannelPrivacy {\n \"\"\"\n Private channels\n \"\"\"\n PRIVATE\n \n \"\"\"\n Public channels\n \"\"\"\n PUBLIC\n \n \"\"\"\n All channels\n \"\"\"\n ALL\n}\n\n\"\"\"\nRoom/Channel types\n\"\"\"\nenum RoomType {\n \"\"\"\n SERVICE Channel with number of users - Only members from same organization\n \"\"\"\n SERVICE\n\n \"\"\"\n AI Assistant channels\n \"\"\"\n AIASSISTANT\n \n \"\"\"\n Normal Channel with number of users - Only members from same organization\n \"\"\"\n CHANNEL\n \n \"\"\"\n Direct User to User conversations, with two or more participants - Only members from same organization\n \"\"\"\n DIRECT\n \n \"\"\"\n Channels with Private Visibility - Only members from same organization\n \"\"\"\n PRIVATE\n \n \"\"\"\n Channels with Public Visibility - Members from other organizations can join\n \"\"\"\n PUBLIC\n\n \"\"\"\n Group channels\n \"\"\"\n GROUP\n \n \"\"\"\n Visitor channels\n \"\"\"\n VISITOR\n}\n\nextend type Query {\n \"\"\"\n Get channel by name\n \"\"\"\n channelByName(name: String!): Channel @addAccountContext @isAuthenticated\n \n \"\"\"\n Get channels with filtering\n \"\"\"\n channels(filter: ChannelFilterInput = {\n privacy: ALL,\n joinedChannels: false,\n sortyBy: NAME\n }): [Channel] @addAccountContext @isAuthenticated\n \n \"\"\"\n Get channels by user with criteria\n \"\"\"\n channelsByUser(\n role: String\n criteria: AnyObject,\n limit: Int,\n skip: Int,\n sort: Sort\n ): [Channel] @addAccountContext @isAuthenticated\n \n \"\"\"\n Get support service channels\n \"\"\"\n supportServiceChannels(\n role: String\n criteria: AnyObject,\n limit: Int,\n skip: Int,\n sort: Sort\n ): [Channel] @addAccountContext @isAuthenticated\n \n \"\"\"\n Get direct channel by ID\n \"\"\"\n directChannel(id: ID!): Channel @addAccountContext @isAuthenticated\n \n \"\"\"\n View channel detail\n \"\"\"\n viewChannelDetail(id: String): Channel @addAccountContext @isAuthenticated\n}\n\nextend type Mutation {\n \"\"\"\n Create a new channel\n \"\"\"\n createChannel(\n name: String!,\n description: String!\n type: RoomType\n team: String\n ): Channel @addAccountContext @isAuthenticated\n\n \"\"\"\n Add member to channel\n \"\"\"\n addMemberToChannel(\n channelId: String!,\n memberId: String!\n ): Channel @addAccountContext @isAuthenticated\n\n \"\"\"\n Save multiple members to channel\n \"\"\"\n saveMembersToChannel(\n membersIds: [String]!\n channelId: String!,\n ): Channel @addAccountContext @isAuthenticated\n\n \"\"\"\n Create direct message channel\n \"\"\"\n createDirectChannel(\n receiver: [ID]!\n displayName: String!\n channelOptions: AnyObject\n ): Channel @addAccountContext @isAuthenticated\n\n \"\"\"\n Hide channel from user view\n \"\"\"\n hideChannel(id: ID!): Boolean @isAuthenticated\n\n \"\"\"\n Leave channel\n \"\"\"\n leaveChannel(id: ID!): Boolean @isAuthenticated\n\n \"\"\"\n View/mark channel as read\n \"\"\"\n viewChannel(id: ID!): Boolean! @isAuthenticated @addAccountContext\n\n \"\"\"\n Delete channel\n \"\"\"\n deleteChannel(id: ID!): Boolean @isAuthenticated\n \n \"\"\"\n Send notification of unread messages\n \"\"\"\n sendNotificationOfUnreadMessages(\n unit: String!\n value: Int!\n ): Boolean @addAccountContext @isAuthenticated\n}\n";export{channelSchema as default};//# sourceMappingURL=channel.graphql.js.map
1
+ var channelSchema = "\"\"\"\nChannel: A communication channel within an organization or team.\n\"\"\"\ntype Channel implements IBaseRepo @entity {\n \"\"\"\n Unique identifier for the channel\n \"\"\"\n id: String! @id\n \n \"\"\"\n Channel title/name\n \"\"\"\n title: String @column\n \n \"\"\"\n Channel topic\n \"\"\"\n topic: String @column\n \n \"\"\"\n Organization name\n \"\"\"\n organization: Organization! @column(overrideType: \"ObjectId\")\n orgName: String @column\n \n \"\"\"\n Channel purpose\n \"\"\"\n purpose: String @column\n \n \"\"\"\n Channel description\n \"\"\"\n description: String @column\n \n \"\"\"\n Display name\n \"\"\"\n displayName: String @column\n \n \"\"\"\n Associated team\n \"\"\"\n team: AccountTeam @column(overrideType: \"ObjectId\")\n \n \"\"\"\n Last post timestamp\n \"\"\"\n lastPostAt: DateTime @column(overrideType: \"Date\")\n \n \"\"\"\n Total message count\n \"\"\"\n totalMsgCount: Int @column\n \n \"\"\"\n Total root message count\n \"\"\"\n totalMsgCountRoot: Int @column\n \n \"\"\"\n Channel creator\n \"\"\"\n creator: UserAccount @column(overrideType: \"ObjectId\")\n \n \"\"\"\n Channel members\n \"\"\"\n members: [ChannelMember] @column(overrideType: \"ObjectId[]\")\n \n \"\"\"\n Channel type\n \"\"\"\n type: String @column\n \n \"\"\"\n Last message in the channel\n \"\"\"\n lastMessage: Post @column(overrideType: \"ObjectId\")\n\n \"\"\"\n Project ID\n \"\"\"\n projectId: String @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\"\"\"\nChannel unread message information\n\"\"\"\ntype ChannelUnread {\n \"\"\"\n Team identifier\n \"\"\"\n teamId: String\n \n \"\"\"\n Channel identifier\n \"\"\"\n channelId: String\n \n \"\"\"\n Unread message count\n \"\"\"\n msgCount: Int\n \n \"\"\"\n Mention count\n \"\"\"\n mentionCount: Int\n \n \"\"\"\n Root mention count\n \"\"\"\n mentionCountRoot: Int\n \n \"\"\"\n Root message count\n \"\"\"\n msgCountRoot: Int\n \n \"\"\"\n Notification properties\n \"\"\"\n notifyProps: AnyObject\n}\n\n\"\"\"\nChannel filter input for queries\n\"\"\"\ninput ChannelFilterInput {\n \"\"\"\n Filter by name\n \"\"\"\n nameFilter: String\n \n \"\"\"\n Filter by privacy level\n \"\"\"\n privacy: ChannelPrivacy\n \n \"\"\"\n Filter joined channels only\n \"\"\"\n joinedChannels: Boolean\n \n \"\"\"\n Sort order\n \"\"\"\n storyBy: ChannelSort\n}\n\n\"\"\"\nChannel name and direct message input\n\"\"\"\ninput ChannelNameAndDirect {\n \"\"\"\n Channel name\n \"\"\"\n name: String!\n \n \"\"\"\n Is direct message\n \"\"\"\n direct: Boolean!\n}\n\n\"\"\"\nChannel create request input\n\"\"\"\ninput ChannelCreateRequest {\n \"\"\"\n Channel name\n \"\"\"\n name: String!\n \n \"\"\"\n Channel description\n \"\"\"\n description: String!\n \n \"\"\"\n Channel type\n \"\"\"\n type: RoomType\n \n \"\"\"\n Associated team\n \"\"\"\n team: String\n}\n\n\"\"\"\nChannel update request input\n\"\"\"\ninput ChannelUpdateRequest {\n \"\"\"\n Channel ID\n \"\"\"\n id: ID!\n \n \"\"\"\n Channel title\n \"\"\"\n title: String\n \n \"\"\"\n Channel description\n \"\"\"\n description: String\n \n \"\"\"\n Channel type\n \"\"\"\n type: RoomType\n}\n\n\"\"\"\nDirect channel create request input\n\"\"\"\ninput DirectChannelCreateRequest {\n \"\"\"\n Receiver user IDs\n \"\"\"\n receiver: [ID]!\n \n \"\"\"\n Display name\n \"\"\"\n displayName: String!\n \n \"\"\"\n Channel options\n \"\"\"\n channelOptions: AnyObject\n}\n\n\"\"\"\nChannel sorting options\n\"\"\"\nenum ChannelSort {\n \"\"\"\n Sort by name\n \"\"\"\n NAME\n \n \"\"\"\n Sort by number of messages\n \"\"\"\n NUMBER_OF_MESSAGES\n}\n\n\"\"\"\nChannel privacy levels\n\"\"\"\nenum ChannelPrivacy {\n \"\"\"\n Private channels\n \"\"\"\n PRIVATE\n \n \"\"\"\n Public channels\n \"\"\"\n PUBLIC\n \n \"\"\"\n All channels\n \"\"\"\n ALL\n}\n\n\"\"\"\nRoom/Channel types\n\"\"\"\nenum RoomType {\n \"\"\"\n SERVICE Channel with number of users - Only members from same organization\n \"\"\"\n SERVICE\n\n \"\"\"\n AI Assistant channels\n \"\"\"\n AIASSISTANT\n \n \"\"\"\n Normal Channel with number of users - Only members from same organization\n \"\"\"\n CHANNEL\n \n \"\"\"\n Direct User to User conversations, with two or more participants - Only members from same organization\n \"\"\"\n DIRECT\n \n \"\"\"\n Channels with Private Visibility - Only members from same organization\n \"\"\"\n PRIVATE\n \n \"\"\"\n Channels with Public Visibility - Members from other organizations can join\n \"\"\"\n PUBLIC\n\n \"\"\"\n Group channels\n \"\"\"\n GROUP\n \n \"\"\"\n Visitor channels\n \"\"\"\n VISITOR\n}\n\ninput ChannelInput {\n content: String!\n files: [ID!]\n createdBy: ID\n notificationParams: ExpoNotificationData\n modelConfig: AnyObject\n}\n\n\nextend type Query {\n \"\"\"\n Get channel by name\n \"\"\"\n channelByName(name: String!): Channel @addAccountContext @isAuthenticated\n \n \"\"\"\n Get channels with filtering\n \"\"\"\n channels(filter: ChannelFilterInput = {\n privacy: ALL,\n joinedChannels: false,\n sortyBy: NAME\n }): [Channel] @addAccountContext @isAuthenticated\n \n \"\"\"\n Get channels by user with criteria\n \"\"\"\n channelsByUser(\n role: String\n criteria: AnyObject,\n limit: Int,\n skip: Int,\n sort: Sort\n ): [Channel] @addAccountContext @isAuthenticated\n \n \"\"\"\n Get support service channels\n \"\"\"\n supportServiceChannels(\n role: String\n criteria: AnyObject,\n limit: Int,\n skip: Int,\n sort: Sort\n ): [Channel] @addAccountContext @isAuthenticated\n \n \"\"\"\n Get direct channel by ID\n \"\"\"\n directChannel(id: ID!): Channel @addAccountContext @isAuthenticated\n \n \"\"\"\n View channel detail\n \"\"\"\n viewChannelDetail(id: String): Channel @addAccountContext @isAuthenticated\n}\n\nextend type Mutation {\n \"\"\"\n Create a new channel\n \"\"\"\n createChannel(\n name: String!,\n description: String!\n type: RoomType\n team: String\n ): Channel @addAccountContext @isAuthenticated\n\n \"\"\"\n Add member to channel\n \"\"\"\n addMemberToChannel(\n channelId: String!,\n memberId: String!\n ): Channel @addAccountContext @isAuthenticated\n\n \"\"\"\n Save multiple members to channel\n \"\"\"\n saveMembersToChannel(\n membersIds: [String]!\n channelId: String!,\n ): Channel @addAccountContext @isAuthenticated\n\n \"\"\"\n Create direct message channel\n \"\"\"\n createDirectChannel(\n receiver: [ID]!\n displayName: String!\n channelOptions: AnyObject\n ): Channel @addAccountContext @isAuthenticated\n\n \"\"\"\n Hide channel from user view\n \"\"\"\n hideChannel(id: ID!): Boolean @isAuthenticated\n\n \"\"\"\n Leave channel\n \"\"\"\n leaveChannel(id: ID!): Boolean @isAuthenticated\n\n \"\"\"\n View/mark channel as read\n \"\"\"\n viewChannel(id: ID!): Boolean! @isAuthenticated @addAccountContext\n\n \"\"\"\n Delete channel\n \"\"\"\n deleteChannel(id: ID!): Boolean @isAuthenticated\n \n \"\"\"\n Send notification of unread messages\n \"\"\"\n sendNotificationOfUnreadMessages(\n unit: String!\n value: Int!\n ): Boolean @addAccountContext @isAuthenticated\n\n \"\"\"\n Create channel with project ID\n \"\"\"\n createChannelWithProjectId(projectId: String!,channelInput: ChannelInput!): Boolean! @isAuthenticated @addAccountContext\n}\n";export{channelSchema as default};//# sourceMappingURL=channel.graphql.js.map
@@ -1,3 +1,3 @@
1
- import extended from'./extended.graphql.js';import baseSchema from'./base.graphql.js';import channelSchema from'./channel.graphql.js';import channelMember from'./channel-member.graphql.js';import postSchema from'./post.graphql.js';import postThread from'./post-thread.graphql.js';import preferencesSchema from'./preferences.graphql.js';import usersSchema from'./users.graphql.js';import reactionSchema from'./reaction.graphql.js';import mailTemplate from'./mail-templates.graphql.js';import messengerPreferences from'./messenger-preferences.graphql.js';import messengerNotificationService from'./messenger-notification-service.graphql.js';import extendedTokenAccountSchema from'./extended-token-account-schema.graphql.js';import accountExt from'./account-ext.graphql.js';// eslint-disable-next-line @typescript-eslint/ban-ts-comment
1
+ import extended from'./extended.graphql.js';import baseSchema from'./base.graphql.js';import channelSchema from'./channel.graphql.js';import channelMember from'./channel-member.graphql.js';import postSchema from'./post.graphql.js';import postThread from'./post-thread.graphql.js';import preferencesSchema from'./preferences.graphql.js';import usersSchema from'./users.graphql.js';import reactionSchema from'./reaction.graphql.js';import mailTemplate from'./mail-templates.graphql.js';import messengerPreferences from'./messenger-preferences.graphql.js';import messengerNotificationService from'./messenger-notification-service.graphql.js';import extendedTokenAccountSchema from'./extended-token-account-schema.graphql.js';import accountExt from'./account-ext.graphql.js';import aiFragmentSchema from'./ai-fragment.graphql.js';// eslint-disable-next-line @typescript-eslint/ban-ts-comment
2
2
  // @ts-nocheck
3
- const schema = [accountExt, extendedTokenAccountSchema, extended, baseSchema, channelSchema, channelMember, postSchema, postThread, preferencesSchema, usersSchema, reactionSchema, mailTemplate, messengerPreferences, messengerNotificationService].join('\n');export{schema};//# sourceMappingURL=index.js.map
3
+ const schema = [accountExt, extendedTokenAccountSchema, extended, baseSchema, channelSchema, channelMember, postSchema, postThread, preferencesSchema, usersSchema, reactionSchema, mailTemplate, messengerPreferences, messengerNotificationService, aiFragmentSchema].join('\n');export{schema};//# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/graphql/schema/index.ts"],"sourcesContent":[null],"names":[],"mappings":"mwBAAA;AACA;AAgBA,MAAM,MAAM,GAAG,CAAA,UAAA,EAAA,0BAAA,EAAA,QAAA,EAAA,UAAA,EAAA,aAAA,EAAA,aAAA,EAAA,UAAA,EAAA,UAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,cAAA,EAAA,YAAA,EAAA,oBAAA,EAAA,4BAAA,CAAA,CAAA,IAAA,CAAA,IAAA"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/graphql/schema/index.ts"],"sourcesContent":[null],"names":[],"mappings":"0zBAAA;AACA;AAiBA,MAAM,MAAM,GAAG,CAAA,UAAA,EAAA,0BAAA,EAAA,QAAA,EAAA,UAAA,EAAA,aAAA,EAAA,aAAA,EAAA,UAAA,EAAA,UAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,cAAA,EAAA,YAAA,EAAA,oBAAA,EAAA,4BAAA,EAAA,gBAAA,CAAA,CAAA,IAAA,CAAA,IAAA"}
@@ -271,6 +271,11 @@ input MessageInput {
271
271
  Notification parameters
272
272
  """
273
273
  notificationParams: ExpoNotificationData
274
+
275
+ """
276
+ Extra properties
277
+ """
278
+ extraProps: AnyObject
274
279
  }
275
280
 
276
281
  """
@@ -323,6 +328,67 @@ type Messages {
323
328
  data: [Post]
324
329
  }
325
330
 
331
+ # type AIResponseGenerated {
332
+ # projectId: String
333
+ # sandboxId: String
334
+ # sandboxUrl: String
335
+ # aiResponse: AnyObject
336
+ # taskSummary: AnyObject
337
+ # canvasLayers: AnyObject
338
+ # error: AnyObject
339
+ # modelConfig: AnyObject
340
+ # timestamp: String
341
+ # }
342
+
343
+ input ModelConfigurationInput {
344
+ provider: String!
345
+ model: String!
346
+ apiKey: String!
347
+ template: String!
348
+ }
349
+
350
+ type AiEventResponse {
351
+ success: Boolean!
352
+ message: String!
353
+ eventId: String
354
+ }
355
+
356
+ type SandboxError {
357
+ id: String!
358
+ projectId: String!
359
+ sandboxId: String!
360
+ errorType: String!
361
+ message: String!
362
+ stack: String
363
+ timestamp: String!
364
+ url: String
365
+ fixable: Boolean!
366
+ }
367
+
368
+
369
+ type SandboxErrorPayload {
370
+ projectId: String!
371
+ sandboxId: String!
372
+ error: SandboxError!
373
+ }
374
+
375
+ type FileUpdatePayload {
376
+ projectId: String!
377
+ messageId: String!
378
+ filePath: String!
379
+ content: String!
380
+ operation: String!
381
+ timestamp: String!
382
+ syncStatus: String!
383
+ }
384
+
385
+ type FileUpdateResponse {
386
+ success: Boolean!
387
+ message: String!
388
+ filePath: String!
389
+ timestamp: String!
390
+ syncStatus: String!
391
+ }
326
392
 
327
393
  extend type Query {
328
394
  messages(
@@ -335,6 +401,7 @@ extend type Query {
335
401
  sort:Sort,
336
402
  # searchRegex: String,
337
403
  # excludeServer: Boolean
404
+ props:AnyObject,
338
405
  ): Messages! @isAuthenticated @addAccountContext
339
406
 
340
407
  publicMessages(
@@ -366,11 +433,20 @@ extend type Mutation {
366
433
  sendPublicMessage(channelId: String!, messageInput: MessageInput!,postId: ID): Post @addAccountContext
367
434
  sendExpoNotificationOnPost(postId: ID!, notificationData: ExpoNotificationData!): Boolean!
368
435
  TestchatMessage(channelId: String!): AnyObject
436
+ generateAiCode(messageId: String!, modelConfig: ModelConfigurationInput): AiEventResponse! @addAccountContext
437
+ recreateSandbox(messageId: String!,projectId: String!): AiEventResponse! @addAccountContext
438
+ # File synchronization mutations
439
+ updateSandboxFile(projectId: String!, messageId: String!, filePath: String!, content: String!): FileUpdateResponse! @addAccountContext
440
+ regenerateAiCode(messageId: String!, modelConfig: ModelConfigurationInput): AiEventResponse! @addAccountContext
441
+ #startVSCodeSync(projectId: String!, messageId: String!): FileUpdateResponse! @addAccountContext
369
442
  }
370
443
 
371
444
  extend type Subscription {
372
445
  # chatMessageAdded(channelId: String, directTo: String): Post @isAuthenticated @addAccountContext
373
446
  chatMessageAdded(channelId: String, directTo: String): Post @addAccountContext
447
+ # aiResponseGenerated(channelId: String): AIResponseGenerated @addAccountContext
374
448
  publicPostAdded(channelId: String!): Post @addAccountContext
375
449
  chatMessageTest(channelId: String, directTo: String): AnyObject
450
+ sandboxError(projectId: String!): SandboxErrorPayload!
451
+ fileUpdated(projectId: String!): FileUpdatePayload!
376
452
  }
@@ -1 +1 @@
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
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 Extra properties\n \"\"\"\n extraProps: AnyObject\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# type AIResponseGenerated {\n# projectId: String\n# sandboxId: String\n# sandboxUrl: String\n# aiResponse: AnyObject\n# taskSummary: AnyObject\n# canvasLayers: AnyObject\n# error: AnyObject\n# modelConfig: AnyObject\n# timestamp: String\n# }\n\ninput ModelConfigurationInput {\n provider: String!\n model: String!\n apiKey: String!\n template: String!\n}\n\ntype AiEventResponse {\n success: Boolean!\n message: String!\n eventId: String\n}\n\ntype SandboxError {\n id: String!\n projectId: String!\n sandboxId: String!\n errorType: String!\n message: String!\n stack: String\n timestamp: String!\n url: String\n fixable: Boolean!\n}\n\n\ntype SandboxErrorPayload {\n projectId: String!\n sandboxId: String!\n error: SandboxError!\n}\n\ntype FileUpdatePayload {\n projectId: String!\n messageId: String!\n filePath: String!\n content: String!\n operation: String!\n timestamp: String!\n syncStatus: String!\n}\n\ntype FileUpdateResponse {\n success: Boolean!\n message: String!\n filePath: String!\n timestamp: String!\n syncStatus: String!\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 props:AnyObject,\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 generateAiCode(messageId: String!, modelConfig: ModelConfigurationInput): AiEventResponse! @addAccountContext\n recreateSandbox(messageId: String!,projectId: String!): AiEventResponse! @addAccountContext\n # File synchronization mutations\n updateSandboxFile(projectId: String!, messageId: String!, filePath: String!, content: String!): FileUpdateResponse! @addAccountContext\n regenerateAiCode(messageId: String!, modelConfig: ModelConfigurationInput): AiEventResponse! @addAccountContext\n #startVSCodeSync(projectId: String!, messageId: String!): FileUpdateResponse! @addAccountContext\n}\n\nextend type Subscription {\n # chatMessageAdded(channelId: String, directTo: String): Post @isAuthenticated @addAccountContext\n chatMessageAdded(channelId: String, directTo: String): Post @addAccountContext\n # aiResponseGenerated(channelId: String): AIResponseGenerated @addAccountContext\n publicPostAdded(channelId: String!): Post @addAccountContext\n chatMessageTest(channelId: String, directTo: String): AnyObject\n sandboxError(projectId: String!): SandboxErrorPayload!\n fileUpdated(projectId: String!): FileUpdatePayload!\n}\n";export{postSchema as default};//# sourceMappingURL=post.graphql.js.map
@@ -6,6 +6,7 @@ extend enum MoleculerTopics {
6
6
  ReactionService
7
7
  MessengerNotificationService
8
8
  ExtendedTokenAccountService
9
+ AiFragmentService
9
10
  }
10
11
 
11
12
  enum ChannelServiceCommands {
@@ -41,6 +42,7 @@ enum ChannelServiceCommands {
41
42
  deleteChannel
42
43
  isMember
43
44
  viewChannel
45
+ createChannelWithProjectId
44
46
  }
45
47
 
46
48
  enum PostServiceCommands {
@@ -54,9 +56,26 @@ enum PostServiceCommands {
54
56
  createWithoutSubscription
55
57
  createPostWithPostThread
56
58
  getLastMessage
59
+ getPreviousMessagesByProjectId
60
+ saveCodeAgentResult
61
+ updateSandboxFile
62
+ recreateSandbox
57
63
  }
58
64
 
59
65
  enum PostThreadServiceCommands {
60
66
  getPostThread
61
67
  getPostThreadCount
62
68
  }
69
+
70
+ enum AiFragmentServiceCommands {
71
+ createFragment
72
+ getFragmentByMessageId
73
+ getFragmentsByUser
74
+ updateFragmentFiles
75
+ deleteFragment
76
+ deleteFragmentByMessageId
77
+ getFragmentById
78
+ updateSandboxUrl
79
+ updateFileSync
80
+ updateFilesAndSync
81
+ }
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":[null],"names":[],"mappings":"soBAAA;AAKA,YAAe,IAAI,OAAO,CAAC,eAAe,CAAC"}
1
+ {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":[null],"names":[],"mappings":"soBAAA;AAIA,YAAe,IAAI,OAAO,CAAC,eAAe,CAAC"}
@@ -0,0 +1,20 @@
1
+ import type { Container } from 'inversify';
2
+ import type { Inngest } from 'inngest';
3
+ export declare const inngestFunctionsFactory: ({ inngest, container }: {
4
+ container: Container;
5
+ inngest: Inngest;
6
+ }) => import("inngest").InngestFunction<Omit<import("inngest").InngestFunction.Options<Inngest<import("inngest").ClientOptions>, import("inngest").InngestMiddleware.Stack, [{
7
+ event: string;
8
+ }], import("inngest").Handler<Inngest<import("inngest").ClientOptions>, string, {
9
+ event: import("inngest").FailureEventPayload<import("inngest").EventPayload<any>>;
10
+ logger: import("inngest/middleware/logger").Logger;
11
+ error: Error;
12
+ }>>, "triggers">, ({ event, step }: import("inngest").Context<Inngest<import("inngest").ClientOptions>, string, {
13
+ logger: import("inngest/middleware/logger").Logger;
14
+ }>) => Promise<any>, import("inngest").Handler<Inngest<import("inngest").ClientOptions>, string, {
15
+ event: import("inngest").FailureEventPayload<import("inngest").EventPayload<any>>;
16
+ logger: import("inngest/middleware/logger").Logger;
17
+ error: Error;
18
+ }>, Inngest<import("inngest").ClientOptions>, import("inngest").InngestMiddleware.Stack, [{
19
+ event: string;
20
+ }]>[];
@@ -0,0 +1,4 @@
1
+ import {createChannelWithProjectId,sendMessageHandler,generateAIResponseWithSandbox,codeAgentFunction,generateAiCodeFunction,recreateSandboxUrlFunction,regenerateAiCodeFunction}from'./functions.js';const inngestFunctionsFactory = ({
2
+ inngest,
3
+ container
4
+ }) => [createChannelWithProjectId(inngest, container), sendMessageHandler(inngest, container), generateAIResponseWithSandbox(inngest, container), codeAgentFunction(inngest, container), generateAiCodeFunction(inngest, container), recreateSandboxUrlFunction(inngest, container), regenerateAiCodeFunction(inngest, container)];export{inngestFunctionsFactory};//# sourceMappingURL=factory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"factory.js","sources":["../../src/inngest/factory.ts"],"sourcesContent":[null],"names":[],"mappings":"sMAaO,MAAM,uBAAuB,GAAG,CAAC;AACpC,EAAA,OAAA;AACA,EAAA;AACA,CAAA,KAAA,CAAA,0BAA6B,CAAC,OAAO,EAAE,SAAS,CAAC,EAAA,kBAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,6BAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,iBAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,sBAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,0BAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,wBAAA,CAAA,OAAA,EAAA,SAAA,CAAA"}
@@ -0,0 +1,235 @@
1
+ import type { Inngest } from 'inngest';
2
+ import { Container } from 'inversify';
3
+ export declare const createChannelWithProjectId: (inngest: Inngest, container: Container) => import("inngest").InngestFunction<Omit<import("inngest").InngestFunction.Options<Inngest<import("inngest").ClientOptions>, import("inngest").InngestMiddleware.Stack, [{
4
+ event: string;
5
+ }], import("inngest").Handler<Inngest<import("inngest").ClientOptions>, string, {
6
+ event: import("inngest").FailureEventPayload<import("inngest").EventPayload<any>>;
7
+ logger: import("inngest/middleware/logger").Logger;
8
+ error: Error;
9
+ }>>, "triggers">, ({ event, step }: import("inngest").Context<Inngest<import("inngest").ClientOptions>, string, {
10
+ logger: import("inngest/middleware/logger").Logger;
11
+ }>) => Promise<any>, import("inngest").Handler<Inngest<import("inngest").ClientOptions>, string, {
12
+ event: import("inngest").FailureEventPayload<import("inngest").EventPayload<any>>;
13
+ logger: import("inngest/middleware/logger").Logger;
14
+ error: Error;
15
+ }>, Inngest<import("inngest").ClientOptions>, import("inngest").InngestMiddleware.Stack, [{
16
+ event: string;
17
+ }]>;
18
+ export declare const sendMessageHandler: (inngest: Inngest, container: Container) => import("inngest").InngestFunction<Omit<import("inngest").InngestFunction.Options<Inngest<import("inngest").ClientOptions>, import("inngest").InngestMiddleware.Stack, [{
19
+ event: string;
20
+ }], import("inngest").Handler<Inngest<import("inngest").ClientOptions>, string, {
21
+ event: import("inngest").FailureEventPayload<import("inngest").EventPayload<any>>;
22
+ logger: import("inngest/middleware/logger").Logger;
23
+ error: Error;
24
+ }>>, "triggers">, ({ event, step }: import("inngest").Context<Inngest<import("inngest").ClientOptions>, string, {
25
+ logger: import("inngest/middleware/logger").Logger;
26
+ }>) => Promise<{
27
+ id?: string;
28
+ type?: import("common").Maybe<string>;
29
+ creator?: string;
30
+ createdAt?: string;
31
+ deletedAt?: string;
32
+ updatedAt?: string;
33
+ parentId?: import("common").Maybe<string>;
34
+ props?: import("common").Maybe<any>;
35
+ filenames?: string[];
36
+ message?: import("common").Maybe<string>;
37
+ _id?: string;
38
+ channel?: string;
39
+ author?: string;
40
+ deletedBy?: string;
41
+ editedAt?: string;
42
+ editedBy?: string;
43
+ fields?: string[];
44
+ fromServer?: import("common").Maybe<boolean>;
45
+ hasReactions?: import("common").Maybe<boolean>;
46
+ hashTags?: import("common").Maybe<string>;
47
+ isDelivered?: import("common").Maybe<boolean>;
48
+ isPinned?: import("common").Maybe<boolean>;
49
+ isRead?: import("common").Maybe<boolean>;
50
+ originalId?: import("common").Maybe<string>;
51
+ propsConfiguration?: string;
52
+ reactions?: string[];
53
+ rootId?: import("common").Maybe<string>;
54
+ }>, import("inngest").Handler<Inngest<import("inngest").ClientOptions>, string, {
55
+ event: import("inngest").FailureEventPayload<import("inngest").EventPayload<any>>;
56
+ logger: import("inngest/middleware/logger").Logger;
57
+ error: Error;
58
+ }>, Inngest<import("inngest").ClientOptions>, import("inngest").InngestMiddleware.Stack, [{
59
+ event: string;
60
+ }]>;
61
+ export declare const codeAgentFunction: (inngest: Inngest, container: Container) => import("inngest").InngestFunction<Omit<import("inngest").InngestFunction.Options<Inngest<import("inngest").ClientOptions>, import("inngest").InngestMiddleware.Stack, [{
62
+ event: string;
63
+ }], import("inngest").Handler<Inngest<import("inngest").ClientOptions>, string, {
64
+ event: import("inngest").FailureEventPayload<import("inngest").EventPayload<any>>;
65
+ logger: import("inngest/middleware/logger").Logger;
66
+ error: Error;
67
+ }>>, "triggers">, ({ event, step }: import("inngest").Context<Inngest<import("inngest").ClientOptions>, string, {
68
+ logger: import("inngest/middleware/logger").Logger;
69
+ }>) => Promise<{
70
+ projectId: any;
71
+ sandboxId: string;
72
+ sandboxUrl: string;
73
+ url: string;
74
+ title: string;
75
+ files: any;
76
+ summary: any;
77
+ isError: boolean;
78
+ canvasLayers: any;
79
+ template: string;
80
+ timestamp: string;
81
+ }>, import("inngest").Handler<Inngest<import("inngest").ClientOptions>, string, {
82
+ event: import("inngest").FailureEventPayload<import("inngest").EventPayload<any>>;
83
+ logger: import("inngest/middleware/logger").Logger;
84
+ error: Error;
85
+ }>, Inngest<import("inngest").ClientOptions>, import("inngest").InngestMiddleware.Stack, [{
86
+ event: string;
87
+ }]>;
88
+ export declare const generateAIResponseWithSandbox: (inngest: Inngest, container: Container) => import("inngest").InngestFunction<Omit<import("inngest").InngestFunction.Options<Inngest<import("inngest").ClientOptions>, import("inngest").InngestMiddleware.Stack, [{
89
+ event: string;
90
+ }], import("inngest").Handler<Inngest<import("inngest").ClientOptions>, string, {
91
+ event: import("inngest").FailureEventPayload<import("inngest").EventPayload<any>>;
92
+ logger: import("inngest/middleware/logger").Logger;
93
+ error: Error;
94
+ }>>, "triggers">, ({ event, step }: import("inngest").Context<Inngest<import("inngest").ClientOptions>, string, {
95
+ logger: import("inngest/middleware/logger").Logger;
96
+ }>) => Promise<{
97
+ projectId: any;
98
+ sandboxId: string;
99
+ sandboxUrl: string;
100
+ url: string;
101
+ aiResponse: any;
102
+ taskSummary: any;
103
+ canvasLayers: any;
104
+ error: any;
105
+ template: string;
106
+ timestamp: string;
107
+ }>, import("inngest").Handler<Inngest<import("inngest").ClientOptions>, string, {
108
+ event: import("inngest").FailureEventPayload<import("inngest").EventPayload<any>>;
109
+ logger: import("inngest/middleware/logger").Logger;
110
+ error: Error;
111
+ }>, Inngest<import("inngest").ClientOptions>, import("inngest").InngestMiddleware.Stack, [{
112
+ event: string;
113
+ }]>;
114
+ export declare const generateAiCodeFunction: (inngest: Inngest, container: Container) => import("inngest").InngestFunction<Omit<import("inngest").InngestFunction.Options<Inngest<import("inngest").ClientOptions>, import("inngest").InngestMiddleware.Stack, [{
115
+ event: string;
116
+ }], import("inngest").Handler<Inngest<import("inngest").ClientOptions>, string, {
117
+ event: import("inngest").FailureEventPayload<import("inngest").EventPayload<any>>;
118
+ logger: import("inngest/middleware/logger").Logger;
119
+ error: Error;
120
+ }>>, "triggers">, ({ event, step }: import("inngest").Context<Inngest<import("inngest").ClientOptions>, string, {
121
+ logger: import("inngest/middleware/logger").Logger;
122
+ }>) => Promise<{
123
+ id?: string;
124
+ type?: import("common").Maybe<string>;
125
+ creator?: string;
126
+ createdAt?: string;
127
+ deletedAt?: string;
128
+ updatedAt?: string;
129
+ parentId?: import("common").Maybe<string>;
130
+ props?: import("common").Maybe<any>;
131
+ filenames?: string[];
132
+ message?: import("common").Maybe<string>;
133
+ _id?: string;
134
+ channel?: string;
135
+ author?: string;
136
+ deletedBy?: string;
137
+ editedAt?: string;
138
+ editedBy?: string;
139
+ fields?: string[];
140
+ fromServer?: import("common").Maybe<boolean>;
141
+ hasReactions?: import("common").Maybe<boolean>;
142
+ hashTags?: import("common").Maybe<string>;
143
+ isDelivered?: import("common").Maybe<boolean>;
144
+ isPinned?: import("common").Maybe<boolean>;
145
+ isRead?: import("common").Maybe<boolean>;
146
+ originalId?: import("common").Maybe<string>;
147
+ propsConfiguration?: string;
148
+ reactions?: string[];
149
+ rootId?: import("common").Maybe<string>;
150
+ }>, import("inngest").Handler<Inngest<import("inngest").ClientOptions>, string, {
151
+ event: import("inngest").FailureEventPayload<import("inngest").EventPayload<any>>;
152
+ logger: import("inngest/middleware/logger").Logger;
153
+ error: Error;
154
+ }>, Inngest<import("inngest").ClientOptions>, import("inngest").InngestMiddleware.Stack, [{
155
+ event: string;
156
+ }]>;
157
+ export declare const recreateSandboxUrlFunction: (inngest: Inngest, container: Container) => import("inngest").InngestFunction<Omit<import("inngest").InngestFunction.Options<Inngest<import("inngest").ClientOptions>, import("inngest").InngestMiddleware.Stack, [{
158
+ event: string;
159
+ }], import("inngest").Handler<Inngest<import("inngest").ClientOptions>, string, {
160
+ event: import("inngest").FailureEventPayload<import("inngest").EventPayload<any>>;
161
+ logger: import("inngest/middleware/logger").Logger;
162
+ error: Error;
163
+ }>>, "triggers">, ({ event, step }: import("inngest").Context<Inngest<import("inngest").ClientOptions>, string, {
164
+ logger: import("inngest/middleware/logger").Logger;
165
+ }>) => Promise<{
166
+ success: boolean;
167
+ projectId: any;
168
+ messageId: any;
169
+ newSandboxUrl: string;
170
+ newSandboxId: string;
171
+ }>, import("inngest").Handler<Inngest<import("inngest").ClientOptions>, string, {
172
+ event: import("inngest").FailureEventPayload<import("inngest").EventPayload<any>>;
173
+ logger: import("inngest/middleware/logger").Logger;
174
+ error: Error;
175
+ }>, Inngest<import("inngest").ClientOptions>, import("inngest").InngestMiddleware.Stack, [{
176
+ event: string;
177
+ }]>;
178
+ export declare const regenerateAiCodeFunction: (inngest: Inngest, container: Container) => import("inngest").InngestFunction<Omit<import("inngest").InngestFunction.Options<Inngest<import("inngest").ClientOptions>, import("inngest").InngestMiddleware.Stack, [{
179
+ event: string;
180
+ }], import("inngest").Handler<Inngest<import("inngest").ClientOptions>, string, {
181
+ event: import("inngest").FailureEventPayload<import("inngest").EventPayload<any>>;
182
+ logger: import("inngest/middleware/logger").Logger;
183
+ error: Error;
184
+ }>>, "triggers">, ({ event, step }: import("inngest").Context<Inngest<import("inngest").ClientOptions>, string, {
185
+ logger: import("inngest/middleware/logger").Logger;
186
+ }>) => Promise<{
187
+ id?: string;
188
+ type?: import("common").Maybe<string>;
189
+ creator?: string;
190
+ createdAt?: string;
191
+ deletedAt?: string;
192
+ updatedAt?: string;
193
+ parentId?: import("common").Maybe<string>;
194
+ props?: import("common").Maybe<any>;
195
+ filenames?: string[];
196
+ message?: import("common").Maybe<string>;
197
+ _id?: string;
198
+ channel?: string;
199
+ author?: string;
200
+ deletedBy?: string;
201
+ editedAt?: string;
202
+ editedBy?: string;
203
+ fields?: string[];
204
+ fromServer?: import("common").Maybe<boolean>;
205
+ hasReactions?: import("common").Maybe<boolean>;
206
+ hashTags?: import("common").Maybe<string>;
207
+ isDelivered?: import("common").Maybe<boolean>;
208
+ isPinned?: import("common").Maybe<boolean>;
209
+ isRead?: import("common").Maybe<boolean>;
210
+ originalId?: import("common").Maybe<string>;
211
+ propsConfiguration?: string;
212
+ reactions?: string[];
213
+ rootId?: import("common").Maybe<string>;
214
+ }>, import("inngest").Handler<Inngest<import("inngest").ClientOptions>, string, {
215
+ event: import("inngest").FailureEventPayload<import("inngest").EventPayload<any>>;
216
+ logger: import("inngest/middleware/logger").Logger;
217
+ error: Error;
218
+ }>, Inngest<import("inngest").ClientOptions>, import("inngest").InngestMiddleware.Stack, [{
219
+ event: string;
220
+ }]>;
221
+ export declare const inngestFunctions: ((inngest: Inngest, container: Container) => import("inngest").InngestFunction<Omit<import("inngest").InngestFunction.Options<Inngest<import("inngest").ClientOptions>, import("inngest").InngestMiddleware.Stack, [{
222
+ event: string;
223
+ }], import("inngest").Handler<Inngest<import("inngest").ClientOptions>, string, {
224
+ event: import("inngest").FailureEventPayload<import("inngest").EventPayload<any>>;
225
+ logger: import("inngest/middleware/logger").Logger;
226
+ error: Error;
227
+ }>>, "triggers">, ({ event, step }: import("inngest").Context<Inngest<import("inngest").ClientOptions>, string, {
228
+ logger: import("inngest/middleware/logger").Logger;
229
+ }>) => Promise<any>, import("inngest").Handler<Inngest<import("inngest").ClientOptions>, string, {
230
+ event: import("inngest").FailureEventPayload<import("inngest").EventPayload<any>>;
231
+ logger: import("inngest/middleware/logger").Logger;
232
+ error: Error;
233
+ }>, Inngest<import("inngest").ClientOptions>, import("inngest").InngestMiddleware.Stack, [{
234
+ event: string;
235
+ }]>)[];