@bubblelab/shared-schemas 0.1.0

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 (75) hide show
  1. package/LICENSE.txt +202 -0
  2. package/README.md +138 -0
  3. package/dist/api-schema.d.ts +38 -0
  4. package/dist/api-schema.d.ts.map +1 -0
  5. package/dist/api-schema.js +26 -0
  6. package/dist/api-schema.js.map +1 -0
  7. package/dist/bubble-definition-schema.d.ts +242 -0
  8. package/dist/bubble-definition-schema.d.ts.map +1 -0
  9. package/dist/bubble-definition-schema.js +95 -0
  10. package/dist/bubble-definition-schema.js.map +1 -0
  11. package/dist/bubbleflow-execution-schema.d.ts +580 -0
  12. package/dist/bubbleflow-execution-schema.d.ts.map +1 -0
  13. package/dist/bubbleflow-execution-schema.js +230 -0
  14. package/dist/bubbleflow-execution-schema.js.map +1 -0
  15. package/dist/bubbleflow-schema.d.ts +785 -0
  16. package/dist/bubbleflow-schema.d.ts.map +1 -0
  17. package/dist/bubbleflow-schema.js +206 -0
  18. package/dist/bubbleflow-schema.js.map +1 -0
  19. package/dist/credential-schema.d.ts +405 -0
  20. package/dist/credential-schema.d.ts.map +1 -0
  21. package/dist/credential-schema.js +327 -0
  22. package/dist/credential-schema.js.map +1 -0
  23. package/dist/database-definition-schema.d.ts +97 -0
  24. package/dist/database-definition-schema.d.ts.map +1 -0
  25. package/dist/database-definition-schema.js +36 -0
  26. package/dist/database-definition-schema.js.map +1 -0
  27. package/dist/generate-bubbleflow-schema.d.ts +481 -0
  28. package/dist/generate-bubbleflow-schema.d.ts.map +1 -0
  29. package/dist/generate-bubbleflow-schema.js +247 -0
  30. package/dist/generate-bubbleflow-schema.js.map +1 -0
  31. package/dist/index.d.ts +16 -0
  32. package/dist/index.d.ts.map +1 -0
  33. package/dist/index.js +18 -0
  34. package/dist/index.js.map +1 -0
  35. package/dist/mock-data-generator.d.ts +51 -0
  36. package/dist/mock-data-generator.d.ts.map +1 -0
  37. package/dist/mock-data-generator.js +325 -0
  38. package/dist/mock-data-generator.js.map +1 -0
  39. package/dist/mock-data-generator.test.d.ts +2 -0
  40. package/dist/mock-data-generator.test.d.ts.map +1 -0
  41. package/dist/mock-data-generator.test.js +176 -0
  42. package/dist/mock-data-generator.test.js.map +1 -0
  43. package/dist/oauth-schema.d.ts +61 -0
  44. package/dist/oauth-schema.d.ts.map +1 -0
  45. package/dist/oauth-schema.js +75 -0
  46. package/dist/oauth-schema.js.map +1 -0
  47. package/dist/prompts.d.ts +12 -0
  48. package/dist/prompts.d.ts.map +1 -0
  49. package/dist/prompts.js +40 -0
  50. package/dist/prompts.js.map +1 -0
  51. package/dist/routes.d.ts +2207 -0
  52. package/dist/routes.d.ts.map +1 -0
  53. package/dist/routes.js +978 -0
  54. package/dist/routes.js.map +1 -0
  55. package/dist/streaming-events.d.ts +35 -0
  56. package/dist/streaming-events.d.ts.map +1 -0
  57. package/dist/streaming-events.js +5 -0
  58. package/dist/streaming-events.js.map +1 -0
  59. package/dist/subscription-status-schema.d.ts +90 -0
  60. package/dist/subscription-status-schema.d.ts.map +1 -0
  61. package/dist/subscription-status-schema.js +66 -0
  62. package/dist/subscription-status-schema.js.map +1 -0
  63. package/dist/types.d.ts +19 -0
  64. package/dist/types.d.ts.map +1 -0
  65. package/dist/types.js +27 -0
  66. package/dist/types.js.map +1 -0
  67. package/dist/waitlist-schema.d.ts +30 -0
  68. package/dist/waitlist-schema.d.ts.map +1 -0
  69. package/dist/waitlist-schema.js +39 -0
  70. package/dist/waitlist-schema.js.map +1 -0
  71. package/dist/webhook-schema.d.ts +95 -0
  72. package/dist/webhook-schema.d.ts.map +1 -0
  73. package/dist/webhook-schema.js +50 -0
  74. package/dist/webhook-schema.js.map +1 -0
  75. package/package.json +45 -0
@@ -0,0 +1,75 @@
1
+ // ========================= OAuth Schemas =========================
2
+ import { z } from '@hono/zod-openapi';
3
+ import { CredentialType } from './types';
4
+ // OAuth initiation request schema
5
+ export const oauthInitiateRequestSchema = z
6
+ .object({
7
+ credentialType: z.nativeEnum(CredentialType).openapi({
8
+ description: 'The type of credential to create',
9
+ example: CredentialType.GOOGLE_DRIVE_CRED,
10
+ }),
11
+ name: z.string().optional().openapi({
12
+ description: 'Optional name for the credential',
13
+ example: 'My Google Drive',
14
+ }),
15
+ scopes: z
16
+ .array(z.string())
17
+ .optional()
18
+ .openapi({
19
+ description: 'Optional OAuth scopes to request (defaults based on credential type)',
20
+ example: ['https://www.googleapis.com/auth/drive.readonly'],
21
+ }),
22
+ })
23
+ .openapi('OAuthInitiateRequest');
24
+ // OAuth initiation response schema
25
+ export const oauthInitiateResponseSchema = z
26
+ .object({
27
+ authUrl: z.string().url().openapi({
28
+ description: 'OAuth authorization URL to redirect user to',
29
+ example: 'https://accounts.google.com/oauth2/auth?client_id=...',
30
+ }),
31
+ state: z.string().openapi({
32
+ description: 'CSRF protection state parameter',
33
+ example: 'abc123-def456-ghi789',
34
+ }),
35
+ })
36
+ .openapi('OAuthInitiateResponse');
37
+ // OAuth callback request schema (for POST callback with credential details)
38
+ export const oauthCallbackRequestSchema = z
39
+ .object({
40
+ code: z.string().openapi({
41
+ description: 'OAuth authorization code from provider',
42
+ example: 'abc123def456',
43
+ }),
44
+ state: z.string().openapi({
45
+ description: 'CSRF protection state parameter',
46
+ example: 'abc123-def456-ghi789',
47
+ }),
48
+ name: z.string().openapi({
49
+ description: 'Name for the credential',
50
+ example: 'My Google Drive',
51
+ }),
52
+ description: z.string().optional().openapi({
53
+ description: 'Optional description for the credential',
54
+ }),
55
+ })
56
+ .openapi('OAuthCallbackRequest');
57
+ // OAuth token refresh response schema
58
+ export const oauthTokenRefreshResponseSchema = z
59
+ .object({
60
+ message: z.string().openapi({
61
+ description: 'Success message',
62
+ example: 'Token refreshed successfully',
63
+ }),
64
+ })
65
+ .openapi('OAuthTokenRefreshResponse');
66
+ // OAuth revoke response schema
67
+ export const oauthRevokeResponseSchema = z
68
+ .object({
69
+ message: z.string().openapi({
70
+ description: 'Success message',
71
+ example: 'Credential revoked successfully',
72
+ }),
73
+ })
74
+ .openapi('OAuthRevokeResponse');
75
+ //# sourceMappingURL=oauth-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oauth-schema.js","sourceRoot":"","sources":["../src/oauth-schema.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,kCAAkC;AAClC,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC;KACxC,MAAM,CAAC;IACN,cAAc,EAAE,CAAC,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC;QACnD,WAAW,EAAE,kCAAkC;QAC/C,OAAO,EAAE,cAAc,CAAC,iBAAiB;KAC1C,CAAC;IACF,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC;QAClC,WAAW,EAAE,kCAAkC;QAC/C,OAAO,EAAE,iBAAiB;KAC3B,CAAC;IACF,MAAM,EAAE,CAAC;SACN,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;SACjB,QAAQ,EAAE;SACV,OAAO,CAAC;QACP,WAAW,EACT,sEAAsE;QACxE,OAAO,EAAE,CAAC,gDAAgD,CAAC;KAC5D,CAAC;CACL,CAAC;KACD,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAEnC,mCAAmC;AACnC,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC;KACzC,MAAM,CAAC;IACN,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC;QAChC,WAAW,EAAE,6CAA6C;QAC1D,OAAO,EAAE,uDAAuD;KACjE,CAAC;IACF,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC;QACxB,WAAW,EAAE,iCAAiC;QAC9C,OAAO,EAAE,sBAAsB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 REDDIT_LEAD_GENERATION = "REDDIT_LEAD_GENERATION",
3
+ YC_DIRECTORY_LEADS = "YC_DIRECTORY_LEADS",
4
+ SLACK_DAILY_SUMMARY = "SLACK_DAILY_SUMMARY",
5
+ NANO_BANANA = "NANO_BANANA"
6
+ }
7
+ export declare const PRESET_PROMPTS: {
8
+ type: PresetPromptType;
9
+ name: string;
10
+ prompt: string;
11
+ }[];
12
+ //# sourceMappingURL=prompts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AAAA,oBAAY,gBAAgB;IAC1B,sBAAsB,2BAA2B;IACjD,kBAAkB,uBAAuB;IACzC,mBAAmB,wBAAwB;IAC3C,WAAW,gBAAgB;CAC5B;AAED,eAAO,MAAM,cAAc;;;;GAkC1B,CAAC"}
@@ -0,0 +1,40 @@
1
+ export var PresetPromptType;
2
+ (function (PresetPromptType) {
3
+ PresetPromptType["REDDIT_LEAD_GENERATION"] = "REDDIT_LEAD_GENERATION";
4
+ PresetPromptType["YC_DIRECTORY_LEADS"] = "YC_DIRECTORY_LEADS";
5
+ PresetPromptType["SLACK_DAILY_SUMMARY"] = "SLACK_DAILY_SUMMARY";
6
+ PresetPromptType["NANO_BANANA"] = "NANO_BANANA";
7
+ })(PresetPromptType || (PresetPromptType = {}));
8
+ export const PRESET_PROMPTS = [
9
+ {
10
+ type: PresetPromptType.REDDIT_LEAD_GENERATION,
11
+ name: 'Reddit Scraping & Lead Generation (Firecrawl, Google Sheets)',
12
+ prompt: `Help me scrape the subreddit n8n and find people frustrated with n8n, and find exactly 10 NEW contacts that I can reach out to who could be interested in my product (https://bubblelab.ai).
13
+
14
+ First check the Google spreadsheet for existing contacts to avoid duplicates, then find me some new contacts. Put these results in the google spreadsheet (I'll input spreadsheet ID), and give me the following info:
15
+
16
+ - Name: Name of redditor
17
+ - Link to Original Post: Url to their post
18
+ - Message: empathetic and personalized outreach, don't be salesy
19
+ - Date: when they posted
20
+ - Status: default this to "Need to Reach Out"
21
+
22
+ If the headers are empty/missing, add those as well.`,
23
+ },
24
+ {
25
+ type: PresetPromptType.YC_DIRECTORY_LEADS,
26
+ name: 'YC Directory Leads Generation (Firecrawl, Google Drive, Email)',
27
+ prompt: 'Help me scrape the YC directory 2025 Spring Batch and give me the names and contact info for founders who would be interested in my product (I will provide Google document that outlines our product positioning). For each potential fit, make sure to navigate inside it to find the teams contact information and more details. Send me a list of top 10 contacts as well as WHY you think they are a good fit for Bubble Lab. Send it to selinali@bubblelab.ai. ',
28
+ },
29
+ {
30
+ type: PresetPromptType.SLACK_DAILY_SUMMARY,
31
+ name: 'Slack Daily Summary & Todo (Slack, Gmail)',
32
+ prompt: 'Send me a summary of all the slack messages that happened in the past 24 hours in my public channels into my staging-bot channel, and then based off of that, send me a todo list for today to my gmail, along with a motivational quote to selinali@bubblelab.ai and zachzhong@bubblelab.ai from welcome@hello.bubblelab.ai.',
33
+ },
34
+ {
35
+ type: PresetPromptType.NANO_BANANA,
36
+ name: 'Nano banana (OpenRouter, Google Drive, Google Sheets)',
37
+ prompt: 'Given a google spreadsheet with the columns Input, Input2, Prompt, and Output, can you take the inputs (which will be links to an image I uploaded onto drive), download it, and put it into nanobanana (ie gemini flash image) with the prompt, and then reupload onto drive (into a specific folder) and put the link in the output column. Sometimes there will be one input, sometimes there will be 2 inputs. Also possible there will be 0 inputs [both input columns are empty] in which case just generate an image from the prompt directly.',
38
+ },
39
+ ];
40
+ //# sourceMappingURL=prompts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompts.js","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC1B,qEAAiD,CAAA;IACjD,6DAAyC,CAAA;IACzC,+DAA2C,CAAA;IAC3C,+CAA2B,CAAA;AAC7B,CAAC,EALW,gBAAgB,KAAhB,gBAAgB,QAK3B;AAED,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B;QACE,IAAI,EAAE,gBAAgB,CAAC,sBAAsB;QAC7C,IAAI,EAAE,8DAA8D;QACpE,MAAM,EAAE;;;;;;;;;;uDAU2C;KACpD;IACD;QACE,IAAI,EAAE,gBAAgB,CAAC,kBAAkB;QACzC,IAAI,EAAE,gEAAgE;QACtE,MAAM,EACJ,ucAAuc;KAC1c;IACD;QACE,IAAI,EAAE,gBAAgB,CAAC,mBAAmB;QAC1C,IAAI,EAAE,2CAA2C;QACjD,MAAM,EACJ,+TAA+T;KAClU;IACD;QACE,IAAI,EAAE,gBAAgB,CAAC,WAAW;QAClC,IAAI,EAAE,uDAAuD;QAC7D,MAAM,EACJ,uhBAAuhB;KAC1hB;CACF,CAAC"}