@bubblelab/shared-schemas 0.1.152 → 0.1.154

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4433,6 +4433,7 @@ function getCronScheduleInfo(cronString) {
4433
4433
  var BUBBLE_TRIGGER_EVENTS = {
4434
4434
  "slack/bot_mentioned": true,
4435
4435
  "slack/message_received": true,
4436
+ "slack/reaction_added": true,
4436
4437
  "airtable/record_created": true,
4437
4438
  "airtable/record_updated": true,
4438
4439
  "airtable/record_deleted": true,
@@ -4854,6 +4855,162 @@ Copy the **Bot User OAuth Token** (starts with \`xoxb-\`) from the OAuth & Permi
4854
4855
  required: ["text", "channel", "user", "thread_histories", "slack_event"]
4855
4856
  }
4856
4857
  },
4858
+ "slack/reaction_added": {
4859
+ serviceName: "Slack",
4860
+ friendlyName: "When emoji reaction is added",
4861
+ description: "Triggered when a user adds an emoji reaction to a message in a Slack channel",
4862
+ requiredCredentialType: "SLACK_CRED",
4863
+ requiredConfigFields: ["slack_active_channels"],
4864
+ setupGuide: `## Slack Reaction Event Setup Guide
4865
+
4866
+ ### 1. Create a Slack App
4867
+ 1. Go to [Slack API Apps](https://api.slack.com/apps)
4868
+ 2. Click "Create New App" \u2192 "From scratch"
4869
+ 3. Name your app and select your workspace
4870
+
4871
+ ### 2. Configure OAuth Scopes
4872
+ Navigate to **OAuth & Permissions** and add these Bot Token Scopes:
4873
+ - \`reactions:read\` - To receive reaction events
4874
+ - \`channels:history\` - To fetch the reacted message text
4875
+ - \`groups:history\` - To fetch messages in private channels
4876
+ - \`chat:write\` - To send messages
4877
+ - \`users:read\` - To look up user names
4878
+
4879
+ ### 3. Enable Event Subscriptions
4880
+ 1. Go to **Event Subscriptions**
4881
+ 2. Toggle "Enable Events" to ON
4882
+ 3. Toggle the webhook active button above and copy the webhook URL
4883
+ 4. Add your webhook URL to the Request URL field
4884
+ 5. Subscribe to bot events: \`reaction_added\`
4885
+
4886
+ ### 4. Install to Workspace
4887
+ 1. Go to **Install App**
4888
+ 2. Click "Install to Workspace"
4889
+ 3. Authorize the requested permissions
4890
+
4891
+ ### 5. Get Your Bot Token
4892
+ Copy the **Bot User OAuth Token** (starts with \`xoxb-\`) from the OAuth & Permissions page.`,
4893
+ payloadSchema: {
4894
+ type: "object",
4895
+ properties: {
4896
+ reaction: {
4897
+ type: "string",
4898
+ description: 'Emoji reaction name (e.g. "thumbsup", "heart")'
4899
+ },
4900
+ user: {
4901
+ type: "string",
4902
+ description: "User ID who added the reaction"
4903
+ },
4904
+ channel: {
4905
+ type: "string",
4906
+ description: "Channel ID where the reacted message lives"
4907
+ },
4908
+ item_ts: {
4909
+ type: "string",
4910
+ description: "Timestamp of the message that was reacted to"
4911
+ },
4912
+ item_user: {
4913
+ type: "string",
4914
+ description: "User ID who authored the original message"
4915
+ },
4916
+ item: {
4917
+ type: "object",
4918
+ description: "Full item reference from the reaction event",
4919
+ properties: {
4920
+ type: {
4921
+ type: "string",
4922
+ enum: ["message", "file", "file_comment"],
4923
+ description: "Type of item that was reacted to"
4924
+ },
4925
+ channel: { type: "string", description: "Channel ID" },
4926
+ ts: { type: "string", description: "Message timestamp" },
4927
+ file: { type: "string", description: "File ID (if file reaction)" },
4928
+ file_comment: {
4929
+ type: "string",
4930
+ description: "File comment ID (if file comment reaction)"
4931
+ }
4932
+ }
4933
+ },
4934
+ message_text: {
4935
+ type: "string",
4936
+ description: "Text of the original message that was reacted to (fetched via API, best-effort)"
4937
+ },
4938
+ event_ts: {
4939
+ type: "string",
4940
+ description: "Event timestamp"
4941
+ },
4942
+ slack_event: {
4943
+ type: "object",
4944
+ description: "Full Slack event wrapper",
4945
+ properties: {
4946
+ token: { type: "string", description: "Verification token" },
4947
+ team_id: { type: "string", description: "Workspace ID" },
4948
+ api_app_id: { type: "string", description: "Slack App ID" },
4949
+ type: {
4950
+ type: "string",
4951
+ enum: ["event_callback"],
4952
+ description: "Event type"
4953
+ },
4954
+ event_id: { type: "string", description: "Unique event ID" },
4955
+ event_time: { type: "number", description: "Event timestamp" },
4956
+ event_context: { type: "string", description: "Event context" },
4957
+ authorizations: {
4958
+ type: "array",
4959
+ description: "Bot authorizations",
4960
+ items: {
4961
+ type: "object",
4962
+ properties: {
4963
+ enterprise_id: { type: "string" },
4964
+ team_id: { type: "string" },
4965
+ user_id: { type: "string" },
4966
+ is_bot: { type: "boolean" }
4967
+ }
4968
+ }
4969
+ },
4970
+ event: {
4971
+ type: "object",
4972
+ description: "Inner reaction_added event data",
4973
+ properties: {
4974
+ type: {
4975
+ type: "string",
4976
+ enum: ["reaction_added"],
4977
+ description: "Event type"
4978
+ },
4979
+ user: {
4980
+ type: "string",
4981
+ description: "User ID who added the reaction"
4982
+ },
4983
+ reaction: {
4984
+ type: "string",
4985
+ description: "Emoji reaction name"
4986
+ },
4987
+ item_user: {
4988
+ type: "string",
4989
+ description: "User who authored the reacted item"
4990
+ },
4991
+ item: {
4992
+ type: "object",
4993
+ description: "The item that was reacted to"
4994
+ },
4995
+ event_ts: { type: "string", description: "Event timestamp" }
4996
+ },
4997
+ required: ["type", "user", "reaction", "item", "event_ts"]
4998
+ }
4999
+ },
5000
+ required: [
5001
+ "token",
5002
+ "team_id",
5003
+ "api_app_id",
5004
+ "type",
5005
+ "event_id",
5006
+ "event_time",
5007
+ "event"
5008
+ ]
5009
+ }
5010
+ },
5011
+ required: ["reaction", "user", "item", "slack_event"]
5012
+ }
5013
+ },
4857
5014
  "airtable/record_created": {
4858
5015
  serviceName: "Airtable",
4859
5016
  friendlyName: "When Airtable record is created",
@@ -5068,6 +5225,7 @@ function isServiceTrigger(eventType) {
5068
5225
  var TRIGGER_EVENT_INTERFACE_MAP = {
5069
5226
  SlackMentionEvent: "slack/bot_mentioned",
5070
5227
  SlackMessageReceivedEvent: "slack/message_received",
5228
+ SlackReactionAddedEvent: "slack/reaction_added",
5071
5229
  AirtableRecordCreatedEvent: "airtable/record_created",
5072
5230
  AirtableRecordUpdatedEvent: "airtable/record_updated",
5073
5231
  AirtableRecordDeletedEvent: "airtable/record_deleted",