@bubblelab/shared-schemas 0.1.254 → 0.1.261

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
@@ -120,6 +120,24 @@ var zendeskOAuthMetadataSchema = z2.object({
120
120
  /** Human-readable display name for the credential */
121
121
  displayName: z2.string().optional()
122
122
  });
123
+ var salesforceOAuthMetadataSchema = z2.object({
124
+ instanceUrl: z2.string(),
125
+ organizationId: z2.string().optional(),
126
+ /** Human-readable display name for the credential */
127
+ displayName: z2.string().optional()
128
+ });
129
+ var asanaOAuthMetadataSchema = z2.object({
130
+ workspaceId: z2.string(),
131
+ workspaceName: z2.string().optional(),
132
+ /** Human-readable display name for the credential */
133
+ displayName: z2.string().optional()
134
+ });
135
+ var discordOAuthMetadataSchema = z2.object({
136
+ guildId: z2.string(),
137
+ guildName: z2.string().optional(),
138
+ /** Human-readable display name for the credential */
139
+ displayName: z2.string().optional()
140
+ });
123
141
  var credentialPreferencesSchema = z2.object({
124
142
  /** Whether this credential is the user's default for its credential type */
125
143
  isDefault: z2.boolean().optional(),
@@ -154,6 +172,7 @@ var CredentialType = /* @__PURE__ */ ((CredentialType2) => {
154
172
  CredentialType2["SLACK_CRED"] = "SLACK_CRED";
155
173
  CredentialType2["SLACK_API"] = "SLACK_API";
156
174
  CredentialType2["TELEGRAM_BOT_TOKEN"] = "TELEGRAM_BOT_TOKEN";
175
+ CredentialType2["DISCORD_CRED"] = "DISCORD_CRED";
157
176
  CredentialType2["RESEND_CRED"] = "RESEND_CRED";
158
177
  CredentialType2["CLOUDFLARE_R2_ACCESS_KEY"] = "CLOUDFLARE_R2_ACCESS_KEY";
159
178
  CredentialType2["CLOUDFLARE_R2_SECRET_KEY"] = "CLOUDFLARE_R2_SECRET_KEY";
@@ -196,6 +215,8 @@ var CredentialType = /* @__PURE__ */ ((CredentialType2) => {
196
215
  CredentialType2["ZENDESK_CRED"] = "ZENDESK_CRED";
197
216
  CredentialType2["SLAB_CRED"] = "SLAB_CRED";
198
217
  CredentialType2["SNOWFLAKE_CRED"] = "SNOWFLAKE_CRED";
218
+ CredentialType2["SALESFORCE_CRED"] = "SALESFORCE_CRED";
219
+ CredentialType2["ASANA_CRED"] = "ASANA_CRED";
199
220
  return CredentialType2;
200
221
  })(CredentialType || {});
201
222
 
@@ -656,6 +677,30 @@ var CREDENTIAL_TYPE_CONFIG = {
656
677
  namePlaceholder: "My Zendesk Connection",
657
678
  credentialConfigurations: {}
658
679
  },
680
+ ["SALESFORCE_CRED" /* SALESFORCE_CRED */]: {
681
+ label: "Salesforce",
682
+ description: "OAuth connection to Salesforce for managing accounts, contacts, opportunities, and records",
683
+ placeholder: "",
684
+ // Not used for OAuth
685
+ namePlaceholder: "My Salesforce Connection",
686
+ credentialConfigurations: {}
687
+ },
688
+ ["ASANA_CRED" /* ASANA_CRED */]: {
689
+ label: "Asana",
690
+ description: "OAuth connection to Asana for project and task management",
691
+ placeholder: "",
692
+ // Not used for OAuth
693
+ namePlaceholder: "My Asana Connection",
694
+ credentialConfigurations: {}
695
+ },
696
+ ["DISCORD_CRED" /* DISCORD_CRED */]: {
697
+ label: "Discord",
698
+ description: "OAuth connection to Discord for server messaging and bot management",
699
+ placeholder: "",
700
+ // Not used for OAuth
701
+ namePlaceholder: "My Discord Connection",
702
+ credentialConfigurations: {}
703
+ },
659
704
  ["SLAB_CRED" /* SLAB_CRED */]: {
660
705
  label: "Slab",
661
706
  description: "API token for Slab knowledge management (search, read, and update posts)",
@@ -808,6 +853,12 @@ var CREDENTIAL_ENV_MAP = {
808
853
  ["SLAB_CRED" /* SLAB_CRED */]: "SLAB_API_TOKEN",
809
854
  ["SNOWFLAKE_CRED" /* SNOWFLAKE_CRED */]: "",
810
855
  // Multi-field credential (account + username + privateKey + optional fields), no single env var
856
+ ["SALESFORCE_CRED" /* SALESFORCE_CRED */]: "",
857
+ // OAuth credential, no env var
858
+ ["ASANA_CRED" /* ASANA_CRED */]: "",
859
+ // OAuth credential, no env var
860
+ ["DISCORD_CRED" /* DISCORD_CRED */]: "",
861
+ // OAuth credential, no env var
811
862
  ["*" /* CREDENTIAL_WILDCARD */]: ""
812
863
  // Wildcard marker, not a real credential
813
864
  };
@@ -1749,22 +1800,22 @@ var OAUTH_PROVIDERS = {
1749
1800
  {
1750
1801
  scope: "settings.users.read",
1751
1802
  description: "View user account settings",
1752
- defaultEnabled: true
1803
+ defaultEnabled: false
1753
1804
  },
1754
1805
  {
1755
1806
  scope: "settings.users.write",
1756
1807
  description: "Modify user account settings",
1757
- defaultEnabled: true
1808
+ defaultEnabled: false
1758
1809
  },
1759
1810
  {
1760
1811
  scope: "settings.users.teams.read",
1761
1812
  description: "View team assignments and structure",
1762
- defaultEnabled: true
1813
+ defaultEnabled: false
1763
1814
  },
1764
1815
  {
1765
1816
  scope: "settings.users.teams.write",
1766
1817
  description: "Modify team assignments",
1767
- defaultEnabled: true
1818
+ defaultEnabled: false
1768
1819
  },
1769
1820
  {
1770
1821
  scope: "crm.objects.line_items.read",
@@ -1998,6 +2049,289 @@ var OAUTH_PROVIDERS = {
1998
2049
  ]
1999
2050
  }
2000
2051
  }
2052
+ },
2053
+ salesforce: {
2054
+ name: "salesforce",
2055
+ displayName: "Salesforce",
2056
+ credentialTypes: {
2057
+ ["SALESFORCE_CRED" /* SALESFORCE_CRED */]: {
2058
+ displayName: "Salesforce",
2059
+ defaultScopes: ["api", "refresh_token", "openid"],
2060
+ description: "Access Salesforce for managing accounts, contacts, opportunities, and records via REST API",
2061
+ scopeDescriptions: [
2062
+ {
2063
+ scope: "api",
2064
+ description: "Access Salesforce REST API for reading and writing data (accounts, contacts, opportunities, etc.)",
2065
+ defaultEnabled: true
2066
+ },
2067
+ {
2068
+ scope: "refresh_token",
2069
+ description: "Obtain a refresh token for maintaining access without re-authorization",
2070
+ defaultEnabled: true
2071
+ },
2072
+ {
2073
+ scope: "openid",
2074
+ description: "Access unique user identifiers and profile information",
2075
+ defaultEnabled: true
2076
+ },
2077
+ {
2078
+ scope: "full",
2079
+ description: "Full access to all permitted Salesforce resources and features",
2080
+ defaultEnabled: false
2081
+ },
2082
+ {
2083
+ scope: "chatter_api",
2084
+ description: "Access Chatter feeds and social features",
2085
+ defaultEnabled: false
2086
+ }
2087
+ ]
2088
+ }
2089
+ },
2090
+ authorizationParams: {
2091
+ prompt: "login"
2092
+ // Force login screen so user can choose which Salesforce org to connect
2093
+ }
2094
+ },
2095
+ asana: {
2096
+ name: "asana",
2097
+ displayName: "Asana",
2098
+ credentialTypes: {
2099
+ ["ASANA_CRED" /* ASANA_CRED */]: {
2100
+ displayName: "Asana",
2101
+ defaultScopes: [
2102
+ // OpenID scopes
2103
+ "openid",
2104
+ "email",
2105
+ "profile",
2106
+ // Base scopes — must be requested explicitly
2107
+ "tasks:read",
2108
+ "tasks:write",
2109
+ "tasks:delete",
2110
+ "projects:read",
2111
+ "projects:write",
2112
+ "projects:delete",
2113
+ "workspaces:read",
2114
+ "users:read",
2115
+ "teams:read",
2116
+ "team_memberships:read",
2117
+ "tags:read",
2118
+ "tags:write",
2119
+ "stories:read",
2120
+ "stories:write",
2121
+ "attachments:read",
2122
+ "attachments:write",
2123
+ "attachments:delete",
2124
+ "custom_fields:read",
2125
+ "custom_fields:write",
2126
+ "portfolios:read",
2127
+ "portfolios:write",
2128
+ "goals:read",
2129
+ "jobs:read",
2130
+ "webhooks:read",
2131
+ "webhooks:write",
2132
+ "webhooks:delete"
2133
+ ],
2134
+ description: "Access Asana for managing projects, tasks, and workspaces",
2135
+ scopeDescriptions: [
2136
+ // Base scopes
2137
+ {
2138
+ scope: "tasks:read",
2139
+ description: "Read tasks including title, description, and assignee",
2140
+ defaultEnabled: true
2141
+ },
2142
+ {
2143
+ scope: "tasks:write",
2144
+ description: "Create and update tasks",
2145
+ defaultEnabled: true
2146
+ },
2147
+ {
2148
+ scope: "tasks:delete",
2149
+ description: "Delete tasks permanently",
2150
+ defaultEnabled: true
2151
+ },
2152
+ {
2153
+ scope: "projects:read",
2154
+ description: "Read project information and status updates",
2155
+ defaultEnabled: true
2156
+ },
2157
+ {
2158
+ scope: "projects:write",
2159
+ description: "Create and update projects",
2160
+ defaultEnabled: true
2161
+ },
2162
+ {
2163
+ scope: "projects:delete",
2164
+ description: "Delete projects permanently",
2165
+ defaultEnabled: true
2166
+ },
2167
+ {
2168
+ scope: "workspaces:read",
2169
+ description: "Read workspace information",
2170
+ defaultEnabled: true
2171
+ },
2172
+ // Users & Teams
2173
+ {
2174
+ scope: "users:read",
2175
+ description: "Read user profiles, names, and emails",
2176
+ defaultEnabled: true
2177
+ },
2178
+ {
2179
+ scope: "teams:read",
2180
+ description: "Read team information and members",
2181
+ defaultEnabled: true
2182
+ },
2183
+ {
2184
+ scope: "team_memberships:read",
2185
+ description: "Read team membership details",
2186
+ defaultEnabled: true
2187
+ },
2188
+ // Tags
2189
+ {
2190
+ scope: "tags:read",
2191
+ description: "Read tags in workspaces",
2192
+ defaultEnabled: true
2193
+ },
2194
+ {
2195
+ scope: "tags:write",
2196
+ description: "Create tags and tag/untag tasks",
2197
+ defaultEnabled: true
2198
+ },
2199
+ // Stories (comments)
2200
+ {
2201
+ scope: "stories:read",
2202
+ description: "Read task comments and activity",
2203
+ defaultEnabled: true
2204
+ },
2205
+ {
2206
+ scope: "stories:write",
2207
+ description: "Post comments on tasks",
2208
+ defaultEnabled: true
2209
+ },
2210
+ // Attachments
2211
+ {
2212
+ scope: "attachments:read",
2213
+ description: "Read task attachments",
2214
+ defaultEnabled: true
2215
+ },
2216
+ {
2217
+ scope: "attachments:write",
2218
+ description: "Upload attachments to tasks",
2219
+ defaultEnabled: true
2220
+ },
2221
+ {
2222
+ scope: "attachments:delete",
2223
+ description: "Delete task attachments",
2224
+ defaultEnabled: true
2225
+ },
2226
+ // Custom fields
2227
+ {
2228
+ scope: "custom_fields:read",
2229
+ description: "Read custom field definitions and values",
2230
+ defaultEnabled: true
2231
+ },
2232
+ {
2233
+ scope: "custom_fields:write",
2234
+ description: "Create and update custom fields",
2235
+ defaultEnabled: true
2236
+ },
2237
+ // Portfolios & Goals
2238
+ {
2239
+ scope: "portfolios:read",
2240
+ description: "Read portfolio information",
2241
+ defaultEnabled: true
2242
+ },
2243
+ {
2244
+ scope: "portfolios:write",
2245
+ description: "Create and update portfolios",
2246
+ defaultEnabled: true
2247
+ },
2248
+ {
2249
+ scope: "goals:read",
2250
+ description: "Read goal information and metrics",
2251
+ defaultEnabled: true
2252
+ },
2253
+ // Jobs & Webhooks
2254
+ {
2255
+ scope: "jobs:read",
2256
+ description: "Read async job status",
2257
+ defaultEnabled: true
2258
+ },
2259
+ {
2260
+ scope: "webhooks:read",
2261
+ description: "Read webhook configurations",
2262
+ defaultEnabled: true
2263
+ },
2264
+ {
2265
+ scope: "webhooks:write",
2266
+ description: "Create and update webhooks",
2267
+ defaultEnabled: true
2268
+ },
2269
+ {
2270
+ scope: "webhooks:delete",
2271
+ description: "Delete webhooks",
2272
+ defaultEnabled: true
2273
+ }
2274
+ ]
2275
+ }
2276
+ }
2277
+ },
2278
+ discord: {
2279
+ name: "discord",
2280
+ displayName: "Discord",
2281
+ credentialTypes: {
2282
+ ["DISCORD_CRED" /* DISCORD_CRED */]: {
2283
+ displayName: "Discord",
2284
+ defaultScopes: [
2285
+ "identify",
2286
+ "email",
2287
+ "guilds",
2288
+ "guilds.members.read",
2289
+ "bot",
2290
+ "messages.read"
2291
+ ],
2292
+ description: "Connect to Discord for server messaging, channel management, and bot interactions",
2293
+ scopeDescriptions: [
2294
+ {
2295
+ scope: "identify",
2296
+ description: "Read your user profile information",
2297
+ defaultEnabled: true
2298
+ },
2299
+ {
2300
+ scope: "email",
2301
+ description: "Read your email address",
2302
+ defaultEnabled: true
2303
+ },
2304
+ {
2305
+ scope: "guilds",
2306
+ description: "List the servers you are a member of",
2307
+ defaultEnabled: true
2308
+ },
2309
+ {
2310
+ scope: "guilds.members.read",
2311
+ description: "Read member information in your servers",
2312
+ defaultEnabled: true
2313
+ },
2314
+ {
2315
+ scope: "bot",
2316
+ description: "Add the bot to your server with configured permissions",
2317
+ defaultEnabled: true
2318
+ },
2319
+ {
2320
+ scope: "messages.read",
2321
+ description: "Read messages in channels the bot has access to",
2322
+ defaultEnabled: true
2323
+ }
2324
+ ]
2325
+ }
2326
+ },
2327
+ authorizationParams: {
2328
+ // Bot permissions integer: Manage Channels, View Channels, Send Messages,
2329
+ // Create Public/Private Threads, Send Messages in Threads, Manage Messages,
2330
+ // Embed Links, Attach Files, Read Message History, Mention Everyone,
2331
+ // Use External Emojis/Stickers, Add Reactions, Manage Webhooks,
2332
+ // Manage Threads, Create Polls
2333
+ permissions: "563483066756176"
2334
+ }
2001
2335
  }
2002
2336
  };
2003
2337
  function getOAuthProvider(credentialType) {
@@ -2252,7 +2586,10 @@ var BUBBLE_CREDENTIAL_OPTIONS = {
2252
2586
  ramp: ["RAMP_CRED" /* RAMP_CRED */],
2253
2587
  zendesk: ["ZENDESK_CRED" /* ZENDESK_CRED */],
2254
2588
  slab: ["SLAB_CRED" /* SLAB_CRED */],
2255
- snowflake: ["SNOWFLAKE_CRED" /* SNOWFLAKE_CRED */]
2589
+ snowflake: ["SNOWFLAKE_CRED" /* SNOWFLAKE_CRED */],
2590
+ salesforce: ["SALESFORCE_CRED" /* SALESFORCE_CRED */],
2591
+ asana: ["ASANA_CRED" /* ASANA_CRED */],
2592
+ discord: ["DISCORD_CRED" /* DISCORD_CRED */]
2256
2593
  };
2257
2594
  var CREDENTIAL_TYPE_SIBLINGS = (() => {
2258
2595
  const oauthProviderNames = new Set(Object.keys(OAUTH_PROVIDERS));
@@ -2368,6 +2705,7 @@ var credentialResponseSchema = z3.object({
2368
2705
  confluenceOAuthMetadataSchema,
2369
2706
  stripeOAuthMetadataSchema,
2370
2707
  linearOAuthMetadataSchema,
2708
+ asanaOAuthMetadataSchema,
2371
2709
  browserSessionMetadataSchema,
2372
2710
  credentialPreferencesSchema
2373
2711
  ]).optional().openapi({
@@ -2475,7 +2813,7 @@ var browserbaseSessionReopenResponseSchema = z3.object({
2475
2813
  }).openapi("BrowserbaseSessionReopenResponse");
2476
2814
 
2477
2815
  // src/bubble-definition-schema.ts
2478
- import { z as z4 } from "zod";
2816
+ import { z as z4 } from "@hono/zod-openapi";
2479
2817
  var BubbleParameterType = /* @__PURE__ */ ((BubbleParameterType2) => {
2480
2818
  BubbleParameterType2["STRING"] = "string";
2481
2819
  BubbleParameterType2["NUMBER"] = "number";
@@ -2550,6 +2888,9 @@ var CREDENTIAL_CONFIGURATION_MAP = {
2550
2888
  ["ZENDESK_CRED" /* ZENDESK_CRED */]: {},
2551
2889
  ["SLAB_CRED" /* SLAB_CRED */]: {},
2552
2890
  ["SNOWFLAKE_CRED" /* SNOWFLAKE_CRED */]: {},
2891
+ ["SALESFORCE_CRED" /* SALESFORCE_CRED */]: {},
2892
+ ["ASANA_CRED" /* ASANA_CRED */]: {},
2893
+ ["DISCORD_CRED" /* DISCORD_CRED */]: {},
2553
2894
  ["*" /* CREDENTIAL_WILDCARD */]: {}
2554
2895
  // Wildcard marker, not a real credential
2555
2896
  };
@@ -4882,6 +5223,7 @@ var RECOMMENDED_MODELS = {
4882
5223
  // Special-purpose
4883
5224
  IMAGE: "google/gemini-3-pro-image-preview",
4884
5225
  // Legacy aliases (unchanged behavior)
5226
+ FLAGSHIP: "google/gemini-3-flash-preview",
4885
5227
  BEST: "google/gemini-3-pro-preview",
4886
5228
  BEST_ALT: "openai/gpt-5.2",
4887
5229
  PRO: "google/gemini-3-flash-preview",
@@ -6612,6 +6954,7 @@ export {
6612
6954
  addMemberResponseSchema,
6613
6955
  addMemberSchema,
6614
6956
  airtableOAuthMetadataSchema,
6957
+ asanaOAuthMetadataSchema,
6615
6958
  billingOrganizationSchema,
6616
6959
  browserSessionMetadataSchema,
6617
6960
  browserSessionProxyConfigSchema,
@@ -6645,6 +6988,7 @@ export {
6645
6988
  databaseMetadataSchema,
6646
6989
  decodeCredentialPayload,
6647
6990
  describeCronExpression,
6991
+ discordOAuthMetadataSchema,
6648
6992
  encodeCredentialPayload,
6649
6993
  enhanceErrorMessage,
6650
6994
  errorResponseSchema,
@@ -6707,6 +7051,7 @@ export {
6707
7051
  redeemCouponRequestSchema,
6708
7052
  redeemCouponResponseSchema,
6709
7053
  restoreFlowResponseSchema,
7054
+ salesforceOAuthMetadataSchema,
6710
7055
  sanitizeParams,
6711
7056
  slackOAuthMetadataSchema,
6712
7057
  slackUrlVerificationResponseSchema,