@bubblelab/bubble-core 0.1.201 → 0.1.202

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 (170) hide show
  1. package/dist/bubble-bundle.d.ts +203 -182
  2. package/dist/bubble-factory.d.ts.map +1 -1
  3. package/dist/bubble-factory.js +4 -0
  4. package/dist/bubble-factory.js.map +1 -1
  5. package/dist/bubbles/service-bubble/agi-inc.d.ts +134 -134
  6. package/dist/bubbles/service-bubble/agi-inc.d.ts.map +1 -1
  7. package/dist/bubbles/service-bubble/agi-inc.js +4 -6
  8. package/dist/bubbles/service-bubble/agi-inc.js.map +1 -1
  9. package/dist/bubbles/service-bubble/ai-agent.d.ts +74 -74
  10. package/dist/bubbles/service-bubble/airtable.d.ts +154 -154
  11. package/dist/bubbles/service-bubble/airtable.d.ts.map +1 -1
  12. package/dist/bubbles/service-bubble/airtable.js +8 -13
  13. package/dist/bubbles/service-bubble/airtable.js.map +1 -1
  14. package/dist/bubbles/service-bubble/apify/actors/google-maps-scraper.d.ts +10 -10
  15. package/dist/bubbles/service-bubble/apify/actors/instagram-hashtag-scraper.d.ts +8 -8
  16. package/dist/bubbles/service-bubble/apify/actors/instagram-scraper.d.ts +24 -24
  17. package/dist/bubbles/service-bubble/apify/actors/linkedin-posts-search.d.ts +26 -26
  18. package/dist/bubbles/service-bubble/apify/actors/linkedin-profile-detail.d.ts +56 -56
  19. package/dist/bubbles/service-bubble/apify/actors/linkedin-profile-posts.d.ts +76 -76
  20. package/dist/bubbles/service-bubble/apify/actors/tiktok-scraper.d.ts +20 -20
  21. package/dist/bubbles/service-bubble/apify/actors/twitter-scraper.d.ts +26 -26
  22. package/dist/bubbles/service-bubble/apify/actors/youtube-scraper.d.ts +8 -8
  23. package/dist/bubbles/service-bubble/apify/apify-scraper.schema.d.ts +208 -208
  24. package/dist/bubbles/service-bubble/apify/apify.d.ts +34 -34
  25. package/dist/bubbles/service-bubble/ashby/ashby.d.ts +120 -120
  26. package/dist/bubbles/service-bubble/ashby/ashby.d.ts.map +1 -1
  27. package/dist/bubbles/service-bubble/ashby/ashby.js +8 -10
  28. package/dist/bubbles/service-bubble/ashby/ashby.js.map +1 -1
  29. package/dist/bubbles/service-bubble/ashby/ashby.schema.d.ts +86 -86
  30. package/dist/bubbles/service-bubble/attio/attio.d.ts +76 -76
  31. package/dist/bubbles/service-bubble/attio/attio.schema.d.ts +54 -54
  32. package/dist/bubbles/service-bubble/browserbase/browserbase.d.ts +64 -64
  33. package/dist/bubbles/service-bubble/browserbase/browserbase.schema.d.ts +38 -38
  34. package/dist/bubbles/service-bubble/confluence/confluence.d.ts +54 -54
  35. package/dist/bubbles/service-bubble/confluence/confluence.schema.d.ts +26 -26
  36. package/dist/bubbles/service-bubble/crustdata/crustdata.d.ts +118 -118
  37. package/dist/bubbles/service-bubble/crustdata/crustdata.d.ts.map +1 -1
  38. package/dist/bubbles/service-bubble/crustdata/crustdata.js +16 -17
  39. package/dist/bubbles/service-bubble/crustdata/crustdata.js.map +1 -1
  40. package/dist/bubbles/service-bubble/crustdata/crustdata.schema.d.ts +102 -102
  41. package/dist/bubbles/service-bubble/eleven-labs.d.ts +56 -56
  42. package/dist/bubbles/service-bubble/eleven-labs.d.ts.map +1 -1
  43. package/dist/bubbles/service-bubble/eleven-labs.js +12 -14
  44. package/dist/bubbles/service-bubble/eleven-labs.js.map +1 -1
  45. package/dist/bubbles/service-bubble/firecrawl.d.ts +468 -468
  46. package/dist/bubbles/service-bubble/firecrawl.d.ts.map +1 -1
  47. package/dist/bubbles/service-bubble/firecrawl.js +3 -12
  48. package/dist/bubbles/service-bubble/firecrawl.js.map +1 -1
  49. package/dist/bubbles/service-bubble/followupboss.d.ts +534 -534
  50. package/dist/bubbles/service-bubble/followupboss.d.ts.map +1 -1
  51. package/dist/bubbles/service-bubble/followupboss.js +12 -13
  52. package/dist/bubbles/service-bubble/followupboss.js.map +1 -1
  53. package/dist/bubbles/service-bubble/fullenrich/fullenrich.d.ts +295 -295
  54. package/dist/bubbles/service-bubble/fullenrich/fullenrich.d.ts.map +1 -1
  55. package/dist/bubbles/service-bubble/fullenrich/fullenrich.js +11 -12
  56. package/dist/bubbles/service-bubble/fullenrich/fullenrich.js.map +1 -1
  57. package/dist/bubbles/service-bubble/fullenrich/fullenrich.schema.d.ts +160 -160
  58. package/dist/bubbles/service-bubble/github.d.ts +144 -144
  59. package/dist/bubbles/service-bubble/gmail.d.ts +248 -248
  60. package/dist/bubbles/service-bubble/google-calendar.d.ts +64 -64
  61. package/dist/bubbles/service-bubble/google-calendar.d.ts.map +1 -1
  62. package/dist/bubbles/service-bubble/google-calendar.js +10 -11
  63. package/dist/bubbles/service-bubble/google-calendar.js.map +1 -1
  64. package/dist/bubbles/service-bubble/google-drive.d.ts +154 -148
  65. package/dist/bubbles/service-bubble/google-drive.d.ts.map +1 -1
  66. package/dist/bubbles/service-bubble/google-drive.js +8 -1
  67. package/dist/bubbles/service-bubble/google-drive.js.map +1 -1
  68. package/dist/bubbles/service-bubble/google-sheets/google-sheets.d.ts +52 -52
  69. package/dist/bubbles/service-bubble/google-sheets/google-sheets.schema.d.ts +30 -30
  70. package/dist/bubbles/service-bubble/hello-world.d.ts +4 -4
  71. package/dist/bubbles/service-bubble/http.d.ts +14 -14
  72. package/dist/bubbles/service-bubble/hubspot/hubspot.d.ts +47 -47
  73. package/dist/bubbles/service-bubble/hubspot/hubspot.schema.d.ts +12 -12
  74. package/dist/bubbles/service-bubble/insforge-db.d.ts +16 -16
  75. package/dist/bubbles/service-bubble/insforge-db.d.ts.map +1 -1
  76. package/dist/bubbles/service-bubble/insforge-db.js +24 -26
  77. package/dist/bubbles/service-bubble/insforge-db.js.map +1 -1
  78. package/dist/bubbles/service-bubble/jira/jira.d.ts +91 -91
  79. package/dist/bubbles/service-bubble/jira/jira.schema.d.ts +69 -69
  80. package/dist/bubbles/service-bubble/linear/linear.d.ts +49 -49
  81. package/dist/bubbles/service-bubble/linear/linear.schema.d.ts +33 -33
  82. package/dist/bubbles/service-bubble/notion/notion.d.ts +444 -444
  83. package/dist/bubbles/service-bubble/notion/property-schemas.d.ts +8 -8
  84. package/dist/bubbles/service-bubble/postgresql.d.ts +16 -16
  85. package/dist/bubbles/service-bubble/posthog/posthog.d.ts +43 -43
  86. package/dist/bubbles/service-bubble/posthog/posthog.schema.d.ts +51 -51
  87. package/dist/bubbles/service-bubble/resend.d.ts +20 -20
  88. package/dist/bubbles/service-bubble/resend.d.ts.map +1 -1
  89. package/dist/bubbles/service-bubble/resend.js +8 -13
  90. package/dist/bubbles/service-bubble/resend.js.map +1 -1
  91. package/dist/bubbles/service-bubble/s3/index.d.ts +4 -0
  92. package/dist/bubbles/service-bubble/s3/index.d.ts.map +1 -0
  93. package/dist/bubbles/service-bubble/s3/index.js +4 -0
  94. package/dist/bubbles/service-bubble/s3/index.js.map +1 -0
  95. package/dist/bubbles/service-bubble/s3/s3.d.ts +301 -0
  96. package/dist/bubbles/service-bubble/s3/s3.d.ts.map +1 -0
  97. package/dist/bubbles/service-bubble/s3/s3.js +320 -0
  98. package/dist/bubbles/service-bubble/s3/s3.js.map +1 -0
  99. package/dist/bubbles/service-bubble/s3/s3.schema.d.ts +262 -0
  100. package/dist/bubbles/service-bubble/s3/s3.schema.d.ts.map +1 -0
  101. package/dist/bubbles/service-bubble/s3/s3.schema.js +212 -0
  102. package/dist/bubbles/service-bubble/s3/s3.schema.js.map +1 -0
  103. package/dist/bubbles/service-bubble/s3/s3.utils.d.ts +17 -0
  104. package/dist/bubbles/service-bubble/s3/s3.utils.d.ts.map +1 -0
  105. package/dist/bubbles/service-bubble/s3/s3.utils.js +46 -0
  106. package/dist/bubbles/service-bubble/s3/s3.utils.js.map +1 -0
  107. package/dist/bubbles/service-bubble/sendsafely/sendsafely.d.ts +22 -22
  108. package/dist/bubbles/service-bubble/sendsafely/sendsafely.schema.d.ts +14 -14
  109. package/dist/bubbles/service-bubble/slack/slack.d.ts +554 -554
  110. package/dist/bubbles/service-bubble/storage.d.ts +60 -60
  111. package/dist/bubbles/service-bubble/stripe/stripe.d.ts +224 -224
  112. package/dist/bubbles/service-bubble/stripe/stripe.d.ts.map +1 -1
  113. package/dist/bubbles/service-bubble/stripe/stripe.js +5 -7
  114. package/dist/bubbles/service-bubble/stripe/stripe.js.map +1 -1
  115. package/dist/bubbles/service-bubble/stripe/stripe.schema.d.ts +131 -131
  116. package/dist/bubbles/service-bubble/telegram.d.ts +414 -414
  117. package/dist/bubbles/service-bubble/telegram.d.ts.map +1 -1
  118. package/dist/bubbles/service-bubble/telegram.js +3 -3
  119. package/dist/bubbles/service-bubble/telegram.js.map +1 -1
  120. package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.d.ts +40 -40
  121. package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.schema.d.ts +34 -34
  122. package/dist/bubbles/tool-bubble/browser-tools/_shared/schema.d.ts +2 -2
  123. package/dist/bubbles/tool-bubble/browser-tools/linkedin-accept-invitations/schema.d.ts +3 -3
  124. package/dist/bubbles/tool-bubble/browser-tools/linkedin-accept-invitations/tool.d.ts +4 -4
  125. package/dist/bubbles/tool-bubble/browser-tools/linkedin-connection/schema.d.ts +2 -2
  126. package/dist/bubbles/tool-bubble/browser-tools/linkedin-connection/tool.d.ts +8 -8
  127. package/dist/bubbles/tool-bubble/browser-tools/linkedin-received-invitations/schema.d.ts +2 -2
  128. package/dist/bubbles/tool-bubble/browser-tools/linkedin-received-invitations/tool.d.ts +4 -4
  129. package/dist/bubbles/tool-bubble/browser-tools/linkedin-sent-invitations/schema.d.ts +2 -2
  130. package/dist/bubbles/tool-bubble/browser-tools/linkedin-sent-invitations/tool.d.ts +4 -4
  131. package/dist/bubbles/tool-bubble/bubbleflow-validation-tool.d.ts +4 -4
  132. package/dist/bubbles/tool-bubble/chart-js-tool.d.ts +4 -4
  133. package/dist/bubbles/tool-bubble/code-edit-tool.d.ts +4 -4
  134. package/dist/bubbles/tool-bubble/company-enrichment-tool.d.ts +104 -104
  135. package/dist/bubbles/tool-bubble/get-bubble-details-tool.d.ts +4 -4
  136. package/dist/bubbles/tool-bubble/get-trigger-detail-tool.d.ts +4 -4
  137. package/dist/bubbles/tool-bubble/google-maps-tool.d.ts +20 -20
  138. package/dist/bubbles/tool-bubble/instagram-tool.d.ts +16 -16
  139. package/dist/bubbles/tool-bubble/linkedin-tool.d.ts +919 -919
  140. package/dist/bubbles/tool-bubble/list-airtable-bases-tool.d.ts +4 -4
  141. package/dist/bubbles/tool-bubble/list-airtable-tables-tool.d.ts +4 -4
  142. package/dist/bubbles/tool-bubble/list-bubbles-tool.d.ts +4 -4
  143. package/dist/bubbles/tool-bubble/list-capabilities-tool.d.ts +12 -12
  144. package/dist/bubbles/tool-bubble/people-search-tool.d.ts +84 -84
  145. package/dist/bubbles/tool-bubble/reddit-scrape-tool.d.ts +30 -30
  146. package/dist/bubbles/tool-bubble/research-agent-tool.d.ts +4 -4
  147. package/dist/bubbles/tool-bubble/sql-query-tool.d.ts +12 -12
  148. package/dist/bubbles/tool-bubble/tiktok-tool.d.ts +76 -76
  149. package/dist/bubbles/tool-bubble/tool-template.d.ts +4 -4
  150. package/dist/bubbles/tool-bubble/twitter-tool.d.ts +170 -170
  151. package/dist/bubbles/tool-bubble/web-crawl-tool.d.ts +8 -8
  152. package/dist/bubbles/tool-bubble/web-extract-tool.d.ts +8 -8
  153. package/dist/bubbles/tool-bubble/web-scrape-tool.d.ts +8 -8
  154. package/dist/bubbles/tool-bubble/web-search-tool.d.ts +12 -12
  155. package/dist/bubbles/tool-bubble/yc-scraper-tool.d.ts +42 -42
  156. package/dist/bubbles/tool-bubble/youtube-tool.d.ts +28 -28
  157. package/dist/bubbles/workflow-bubble/database-analyzer.workflow.d.ts +4 -4
  158. package/dist/bubbles/workflow-bubble/generate-document.workflow.d.ts +16 -16
  159. package/dist/bubbles/workflow-bubble/parse-document.workflow.d.ts +4 -4
  160. package/dist/bubbles/workflow-bubble/pdf-form-operations.workflow.d.ts +66 -66
  161. package/dist/bubbles/workflow-bubble/pdf-ocr.workflow.d.ts +24 -24
  162. package/dist/bubbles/workflow-bubble/slack-data-assistant.workflow.d.ts +4 -4
  163. package/dist/bubbles/workflow-bubble/slack-formatter-agent.d.ts +76 -76
  164. package/dist/bubbles/workflow-bubble/slack-notifier.workflow.d.ts +4 -4
  165. package/dist/bubbles.json +489 -3
  166. package/dist/index.d.ts +1 -0
  167. package/dist/index.d.ts.map +1 -1
  168. package/dist/index.js +1 -0
  169. package/dist/index.js.map +1 -1
  170. package/package.json +2 -2
@@ -0,0 +1,262 @@
1
+ import { z } from 'zod';
2
+ import { CredentialType } from '@bubblelab/shared-schemas';
3
+ export declare const S3ParamsSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodObject<{
4
+ operation: z.ZodLiteral<"getUploadUrl">;
5
+ bucketName: z.ZodString;
6
+ fileName: z.ZodString;
7
+ region: z.ZodOptional<z.ZodString>;
8
+ expirationMinutes: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
9
+ contentType: z.ZodOptional<z.ZodString>;
10
+ userId: z.ZodOptional<z.ZodString>;
11
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
12
+ }, "strip", z.ZodTypeAny, {
13
+ operation: "getUploadUrl";
14
+ bucketName: string;
15
+ fileName: string;
16
+ expirationMinutes: number;
17
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
18
+ contentType?: string | undefined;
19
+ region?: string | undefined;
20
+ userId?: string | undefined;
21
+ }, {
22
+ operation: "getUploadUrl";
23
+ bucketName: string;
24
+ fileName: string;
25
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
26
+ contentType?: string | undefined;
27
+ region?: string | undefined;
28
+ expirationMinutes?: number | undefined;
29
+ userId?: string | undefined;
30
+ }>, z.ZodObject<{
31
+ operation: z.ZodLiteral<"getFile">;
32
+ bucketName: z.ZodString;
33
+ fileName: z.ZodString;
34
+ region: z.ZodOptional<z.ZodString>;
35
+ expirationMinutes: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
36
+ userId: z.ZodOptional<z.ZodString>;
37
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
38
+ }, "strip", z.ZodTypeAny, {
39
+ operation: "getFile";
40
+ bucketName: string;
41
+ fileName: string;
42
+ expirationMinutes: number;
43
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
44
+ region?: string | undefined;
45
+ userId?: string | undefined;
46
+ }, {
47
+ operation: "getFile";
48
+ bucketName: string;
49
+ fileName: string;
50
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
51
+ region?: string | undefined;
52
+ expirationMinutes?: number | undefined;
53
+ userId?: string | undefined;
54
+ }>, z.ZodObject<{
55
+ operation: z.ZodLiteral<"deleteFile">;
56
+ bucketName: z.ZodString;
57
+ fileName: z.ZodString;
58
+ region: z.ZodOptional<z.ZodString>;
59
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
60
+ }, "strip", z.ZodTypeAny, {
61
+ operation: "deleteFile";
62
+ bucketName: string;
63
+ fileName: string;
64
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
65
+ region?: string | undefined;
66
+ }, {
67
+ operation: "deleteFile";
68
+ bucketName: string;
69
+ fileName: string;
70
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
71
+ region?: string | undefined;
72
+ }>, z.ZodObject<{
73
+ operation: z.ZodLiteral<"updateFile">;
74
+ bucketName: z.ZodDefault<z.ZodString>;
75
+ fileName: z.ZodString;
76
+ region: z.ZodOptional<z.ZodString>;
77
+ contentType: z.ZodOptional<z.ZodString>;
78
+ fileContent: z.ZodString;
79
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
80
+ }, "strip", z.ZodTypeAny, {
81
+ operation: "updateFile";
82
+ bucketName: string;
83
+ fileName: string;
84
+ fileContent: string;
85
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
86
+ contentType?: string | undefined;
87
+ region?: string | undefined;
88
+ }, {
89
+ operation: "updateFile";
90
+ fileName: string;
91
+ fileContent: string;
92
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
93
+ contentType?: string | undefined;
94
+ bucketName?: string | undefined;
95
+ region?: string | undefined;
96
+ }>, z.ZodObject<{
97
+ operation: z.ZodLiteral<"getMultipleUploadUrls">;
98
+ bucketName: z.ZodString;
99
+ pdfFileName: z.ZodString;
100
+ pageCount: z.ZodNumber;
101
+ region: z.ZodOptional<z.ZodString>;
102
+ expirationMinutes: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
103
+ userId: z.ZodOptional<z.ZodString>;
104
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
105
+ }, "strip", z.ZodTypeAny, {
106
+ operation: "getMultipleUploadUrls";
107
+ bucketName: string;
108
+ expirationMinutes: number;
109
+ pdfFileName: string;
110
+ pageCount: number;
111
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
112
+ region?: string | undefined;
113
+ userId?: string | undefined;
114
+ }, {
115
+ operation: "getMultipleUploadUrls";
116
+ bucketName: string;
117
+ pdfFileName: string;
118
+ pageCount: number;
119
+ credentials?: Partial<Record<CredentialType, string>> | undefined;
120
+ region?: string | undefined;
121
+ expirationMinutes?: number | undefined;
122
+ userId?: string | undefined;
123
+ }>]>;
124
+ export declare const S3ResultSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodObject<{
125
+ operation: z.ZodLiteral<"getUploadUrl">;
126
+ success: z.ZodBoolean;
127
+ uploadUrl: z.ZodOptional<z.ZodString>;
128
+ fileName: z.ZodOptional<z.ZodString>;
129
+ contentType: z.ZodOptional<z.ZodString>;
130
+ error: z.ZodString;
131
+ }, "strip", z.ZodTypeAny, {
132
+ operation: "getUploadUrl";
133
+ error: string;
134
+ success: boolean;
135
+ contentType?: string | undefined;
136
+ fileName?: string | undefined;
137
+ uploadUrl?: string | undefined;
138
+ }, {
139
+ operation: "getUploadUrl";
140
+ error: string;
141
+ success: boolean;
142
+ contentType?: string | undefined;
143
+ fileName?: string | undefined;
144
+ uploadUrl?: string | undefined;
145
+ }>, z.ZodObject<{
146
+ operation: z.ZodLiteral<"getFile">;
147
+ success: z.ZodBoolean;
148
+ downloadUrl: z.ZodOptional<z.ZodString>;
149
+ fileUrl: z.ZodOptional<z.ZodString>;
150
+ fileName: z.ZodOptional<z.ZodString>;
151
+ fileSize: z.ZodOptional<z.ZodNumber>;
152
+ contentType: z.ZodOptional<z.ZodString>;
153
+ lastModified: z.ZodOptional<z.ZodString>;
154
+ error: z.ZodString;
155
+ }, "strip", z.ZodTypeAny, {
156
+ operation: "getFile";
157
+ error: string;
158
+ success: boolean;
159
+ contentType?: string | undefined;
160
+ fileName?: string | undefined;
161
+ downloadUrl?: string | undefined;
162
+ fileUrl?: string | undefined;
163
+ fileSize?: number | undefined;
164
+ lastModified?: string | undefined;
165
+ }, {
166
+ operation: "getFile";
167
+ error: string;
168
+ success: boolean;
169
+ contentType?: string | undefined;
170
+ fileName?: string | undefined;
171
+ downloadUrl?: string | undefined;
172
+ fileUrl?: string | undefined;
173
+ fileSize?: number | undefined;
174
+ lastModified?: string | undefined;
175
+ }>, z.ZodObject<{
176
+ operation: z.ZodLiteral<"deleteFile">;
177
+ success: z.ZodBoolean;
178
+ fileName: z.ZodOptional<z.ZodString>;
179
+ deleted: z.ZodOptional<z.ZodBoolean>;
180
+ error: z.ZodString;
181
+ }, "strip", z.ZodTypeAny, {
182
+ operation: "deleteFile";
183
+ error: string;
184
+ success: boolean;
185
+ deleted?: boolean | undefined;
186
+ fileName?: string | undefined;
187
+ }, {
188
+ operation: "deleteFile";
189
+ error: string;
190
+ success: boolean;
191
+ deleted?: boolean | undefined;
192
+ fileName?: string | undefined;
193
+ }>, z.ZodObject<{
194
+ operation: z.ZodLiteral<"updateFile">;
195
+ success: z.ZodBoolean;
196
+ fileName: z.ZodOptional<z.ZodString>;
197
+ updated: z.ZodOptional<z.ZodBoolean>;
198
+ contentType: z.ZodOptional<z.ZodString>;
199
+ error: z.ZodString;
200
+ }, "strip", z.ZodTypeAny, {
201
+ operation: "updateFile";
202
+ error: string;
203
+ success: boolean;
204
+ contentType?: string | undefined;
205
+ updated?: boolean | undefined;
206
+ fileName?: string | undefined;
207
+ }, {
208
+ operation: "updateFile";
209
+ error: string;
210
+ success: boolean;
211
+ contentType?: string | undefined;
212
+ updated?: boolean | undefined;
213
+ fileName?: string | undefined;
214
+ }>, z.ZodObject<{
215
+ operation: z.ZodLiteral<"getMultipleUploadUrls">;
216
+ success: z.ZodBoolean;
217
+ pdfUploadUrl: z.ZodOptional<z.ZodString>;
218
+ pdfFileName: z.ZodOptional<z.ZodString>;
219
+ pageUploadUrls: z.ZodOptional<z.ZodArray<z.ZodObject<{
220
+ pageNumber: z.ZodNumber;
221
+ uploadUrl: z.ZodString;
222
+ fileName: z.ZodString;
223
+ }, "strip", z.ZodTypeAny, {
224
+ fileName: string;
225
+ uploadUrl: string;
226
+ pageNumber: number;
227
+ }, {
228
+ fileName: string;
229
+ uploadUrl: string;
230
+ pageNumber: number;
231
+ }>, "many">>;
232
+ error: z.ZodString;
233
+ }, "strip", z.ZodTypeAny, {
234
+ operation: "getMultipleUploadUrls";
235
+ error: string;
236
+ success: boolean;
237
+ pdfFileName?: string | undefined;
238
+ pdfUploadUrl?: string | undefined;
239
+ pageUploadUrls?: {
240
+ fileName: string;
241
+ uploadUrl: string;
242
+ pageNumber: number;
243
+ }[] | undefined;
244
+ }, {
245
+ operation: "getMultipleUploadUrls";
246
+ error: string;
247
+ success: boolean;
248
+ pdfFileName?: string | undefined;
249
+ pdfUploadUrl?: string | undefined;
250
+ pageUploadUrls?: {
251
+ fileName: string;
252
+ uploadUrl: string;
253
+ pageNumber: number;
254
+ }[] | undefined;
255
+ }>]>;
256
+ export type S3Result = z.output<typeof S3ResultSchema>;
257
+ export type S3Params = z.output<typeof S3ParamsSchema>;
258
+ export type S3ParamsInput = z.input<typeof S3ParamsSchema>;
259
+ export type S3OperationResult<T extends S3Params['operation']> = Extract<S3Result, {
260
+ operation: T;
261
+ }>;
262
+ //# sourceMappingURL=s3.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"s3.schema.d.ts","sourceRoot":"","sources":["../../../../src/bubbles/service-bubble/s3/s3.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAS3D,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA4HzB,CAAC;AAGH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA8FzB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,cAAc,CAAC,CAAC;AACvD,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,cAAc,CAAC,CAAC;AACvD,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAG3D,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,QAAQ,CAAC,WAAW,CAAC,IAAI,OAAO,CACtE,QAAQ,EACR;IAAE,SAAS,EAAE,CAAC,CAAA;CAAE,CACjB,CAAC"}
@@ -0,0 +1,212 @@
1
+ import { z } from 'zod';
2
+ import { CredentialType } from '@bubblelab/shared-schemas';
3
+ // Base credentials schema that all operations share
4
+ const BaseCredentialsSchema = z
5
+ .record(z.nativeEnum(CredentialType), z.string())
6
+ .optional()
7
+ .describe('Object mapping credential types to values (injected at runtime)');
8
+ // Define the parameters schema for S3 operations using discriminated union
9
+ export const S3ParamsSchema = z.discriminatedUnion('operation', [
10
+ // Get upload URL operation
11
+ z.object({
12
+ operation: z
13
+ .literal('getUploadUrl')
14
+ .describe('Generate presigned upload URL'),
15
+ bucketName: z
16
+ .string()
17
+ .min(1, 'Bucket name is required')
18
+ .describe('Name of the S3 bucket'),
19
+ fileName: z
20
+ .string()
21
+ .min(1, 'File name is required')
22
+ .describe('Original filename for the upload'),
23
+ region: z
24
+ .string()
25
+ .optional()
26
+ .describe('AWS region override (defaults from credential or us-east-1)'),
27
+ expirationMinutes: z
28
+ .number()
29
+ .optional()
30
+ .default(60)
31
+ .describe('URL expiration time in minutes'),
32
+ contentType: z.string().optional().describe('Content type for uploads'),
33
+ userId: z.string().optional().describe('User ID for secure file isolation'),
34
+ credentials: BaseCredentialsSchema,
35
+ }),
36
+ // Get file operation
37
+ z.object({
38
+ operation: z.literal('getFile').describe('Generate presigned download URL'),
39
+ bucketName: z
40
+ .string()
41
+ .min(1, 'Bucket name is required')
42
+ .describe('Name of the S3 bucket'),
43
+ fileName: z
44
+ .string()
45
+ .min(1, 'File name is required')
46
+ .describe('Name of the file to retrieve'),
47
+ region: z
48
+ .string()
49
+ .optional()
50
+ .describe('AWS region override (defaults from credential or us-east-1)'),
51
+ expirationMinutes: z
52
+ .number()
53
+ .optional()
54
+ .default(60)
55
+ .describe('URL expiration time in minutes'),
56
+ userId: z.string().optional().describe('User ID for secure file isolation'),
57
+ credentials: BaseCredentialsSchema,
58
+ }),
59
+ // Delete file operation
60
+ z.object({
61
+ operation: z.literal('deleteFile').describe('Delete file from bucket'),
62
+ bucketName: z
63
+ .string()
64
+ .min(1, 'Bucket name is required')
65
+ .describe('Name of the S3 bucket'),
66
+ fileName: z
67
+ .string()
68
+ .min(1, 'File name is required')
69
+ .describe('Name of the file to delete'),
70
+ region: z
71
+ .string()
72
+ .optional()
73
+ .describe('AWS region override (defaults from credential or us-east-1)'),
74
+ credentials: BaseCredentialsSchema,
75
+ }),
76
+ // Update file operation
77
+ z.object({
78
+ operation: z.literal('updateFile').describe('Update/replace file content'),
79
+ bucketName: z
80
+ .string()
81
+ .min(1, 'Bucket name is required')
82
+ .default('bubble-lab-bucket'),
83
+ fileName: z
84
+ .string()
85
+ .min(1, 'File name is required')
86
+ .describe('Name of the file to update'),
87
+ region: z
88
+ .string()
89
+ .optional()
90
+ .describe('AWS region override (defaults from credential or us-east-1)'),
91
+ contentType: z.string().optional().describe('Content type for uploads'),
92
+ fileContent: z
93
+ .string()
94
+ .min(1, 'File content is required for updates')
95
+ .describe('Base64 encoded file content or raw text content'),
96
+ credentials: BaseCredentialsSchema,
97
+ }),
98
+ // Get multiple upload URLs operation
99
+ z.object({
100
+ operation: z
101
+ .literal('getMultipleUploadUrls')
102
+ .describe('Generate multiple presigned upload URLs for PDF + page images'),
103
+ bucketName: z
104
+ .string()
105
+ .min(1, 'Bucket name is required')
106
+ .describe('Name of the S3 bucket'),
107
+ pdfFileName: z
108
+ .string()
109
+ .min(1, 'PDF file name is required')
110
+ .describe('Original filename for the PDF'),
111
+ pageCount: z
112
+ .number()
113
+ .min(1, 'Page count must be at least 1')
114
+ .describe('Number of pages to generate upload URLs for'),
115
+ region: z
116
+ .string()
117
+ .optional()
118
+ .describe('AWS region override (defaults from credential or us-east-1)'),
119
+ expirationMinutes: z
120
+ .number()
121
+ .optional()
122
+ .default(60)
123
+ .describe('URL expiration time in minutes'),
124
+ userId: z.string().optional().describe('User ID for secure file isolation'),
125
+ credentials: BaseCredentialsSchema,
126
+ }),
127
+ ]);
128
+ // Define result schemas for different operations using discriminated union
129
+ export const S3ResultSchema = z.discriminatedUnion('operation', [
130
+ // Get upload URL result
131
+ z.object({
132
+ operation: z
133
+ .literal('getUploadUrl')
134
+ .describe('Generate presigned upload URL'),
135
+ success: z.boolean().describe('Whether the operation was successful'),
136
+ uploadUrl: z.string().optional().describe('Presigned upload URL'),
137
+ fileName: z
138
+ .string()
139
+ .optional()
140
+ .describe('Secure filename generated for the upload'),
141
+ contentType: z.string().optional().describe('Content type of the file'),
142
+ error: z.string().describe('Error message if operation failed'),
143
+ }),
144
+ // Get file result
145
+ z.object({
146
+ operation: z.literal('getFile').describe('Generate presigned download URL'),
147
+ success: z.boolean().describe('Whether the operation was successful'),
148
+ downloadUrl: z.string().optional().describe('Presigned download URL'),
149
+ fileUrl: z.string().optional().describe('Direct file access URL'),
150
+ fileName: z.string().optional().describe('Name of the file'),
151
+ fileSize: z.number().optional().describe('File size in bytes'),
152
+ contentType: z.string().optional().describe('Content type of the file'),
153
+ lastModified: z
154
+ .string()
155
+ .optional()
156
+ .describe('Last modified timestamp in ISO format'),
157
+ error: z.string().describe('Error message if operation failed'),
158
+ }),
159
+ // Delete file result
160
+ z.object({
161
+ operation: z.literal('deleteFile').describe('Delete file from bucket'),
162
+ success: z.boolean().describe('Whether the operation was successful'),
163
+ fileName: z.string().optional().describe('Name of the deleted file'),
164
+ deleted: z
165
+ .boolean()
166
+ .optional()
167
+ .describe('Whether the file was successfully deleted'),
168
+ error: z.string().describe('Error message if operation failed'),
169
+ }),
170
+ // Update file result
171
+ z.object({
172
+ operation: z
173
+ .literal('updateFile')
174
+ .describe('Update/replace file content and generate a new secure filename for the file'),
175
+ success: z.boolean().describe('Whether the operation was successful'),
176
+ fileName: z
177
+ .string()
178
+ .optional()
179
+ .describe('Secure filename for the updated file (different from the original filename)'),
180
+ updated: z
181
+ .boolean()
182
+ .optional()
183
+ .describe('Whether the file was successfully updated'),
184
+ contentType: z
185
+ .string()
186
+ .optional()
187
+ .describe('Content type of the updated file'),
188
+ error: z.string().describe('Error message if operation failed'),
189
+ }),
190
+ // Get multiple upload URLs result
191
+ z.object({
192
+ operation: z
193
+ .literal('getMultipleUploadUrls')
194
+ .describe('Generate multiple presigned upload URLs for PDF + page images'),
195
+ success: z.boolean().describe('Whether the operation was successful'),
196
+ pdfUploadUrl: z
197
+ .string()
198
+ .optional()
199
+ .describe('Presigned upload URL for PDF'),
200
+ pdfFileName: z.string().optional().describe('Secure filename for PDF'),
201
+ pageUploadUrls: z
202
+ .array(z.object({
203
+ pageNumber: z.number().describe('Page number (1-indexed)'),
204
+ uploadUrl: z.string().describe('Presigned upload URL for this page'),
205
+ fileName: z.string().describe('Secure filename for this page image'),
206
+ }))
207
+ .optional()
208
+ .describe('Array of upload URLs for page images'),
209
+ error: z.string().describe('Error message if operation failed'),
210
+ }),
211
+ ]);
212
+ //# sourceMappingURL=s3.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"s3.schema.js","sourceRoot":"","sources":["../../../../src/bubbles/service-bubble/s3/s3.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,oDAAoD;AACpD,MAAM,qBAAqB,GAAG,CAAC;KAC5B,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;KAChD,QAAQ,EAAE;KACV,QAAQ,CAAC,iEAAiE,CAAC,CAAC;AAE/E,2EAA2E;AAC3E,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,kBAAkB,CAAC,WAAW,EAAE;IAC9D,2BAA2B;IAC3B,CAAC,CAAC,MAAM,CAAC;QACP,SAAS,EAAE,CAAC;aACT,OAAO,CAAC,cAAc,CAAC;aACvB,QAAQ,CAAC,+BAA+B,CAAC;QAC5C,UAAU,EAAE,CAAC;aACV,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,EAAE,yBAAyB,CAAC;aACjC,QAAQ,CAAC,uBAAuB,CAAC;QACpC,QAAQ,EAAE,CAAC;aACR,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,EAAE,uBAAuB,CAAC;aAC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AC;QAC3C,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yBAAyB,CAAC;QACtE,cAAc,EAAE,CAAC;aACd,KAAK,CACJ,CAAC,CAAC,MAAM,CAAC;YACP,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,yBAAyB,CAAC;YAC1D,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;YACpE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qCAAqC,CAAC;SACrE,CAAC,CACH;aACA,QAAQ,EAAE;aACV,QAAQ,CAAC,sCAAsC,CAAC;QACnD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;KAChE,CAAC;CACH,CAAC,CAAC"}
@@ -0,0 +1,17 @@
1
+ export interface S3Credentials {
2
+ accessKeyId: string;
3
+ secretAccessKey: string;
4
+ endpoint?: string;
5
+ region?: string;
6
+ }
7
+ /**
8
+ * Parse a multi-field credential value into typed S3 fields.
9
+ * Uses the shared decodeCredentialPayload() which handles both
10
+ * base64 (injection path) and raw JSON (validator path).
11
+ */
12
+ export declare function parseS3Credential(value: string): S3Credentials;
13
+ /**
14
+ * Helper method to detect if a string is base64 encoded
15
+ */
16
+ export declare function isBase64(str: string): boolean;
17
+ //# sourceMappingURL=s3.utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"s3.utils.d.ts","sourceRoot":"","sources":["../../../../src/bubbles/service-bubble/s3/s3.utils.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,CAa9D;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAuB7C"}
@@ -0,0 +1,46 @@
1
+ import { decodeCredentialPayload } from '@bubblelab/shared-schemas';
2
+ /**
3
+ * Parse a multi-field credential value into typed S3 fields.
4
+ * Uses the shared decodeCredentialPayload() which handles both
5
+ * base64 (injection path) and raw JSON (validator path).
6
+ */
7
+ export function parseS3Credential(value) {
8
+ const parsed = decodeCredentialPayload(value);
9
+ if (!parsed.accessKeyId || !parsed.secretAccessKey) {
10
+ throw new Error('S3 credential is missing required fields: accessKeyId, secretAccessKey');
11
+ }
12
+ return {
13
+ accessKeyId: parsed.accessKeyId,
14
+ secretAccessKey: parsed.secretAccessKey,
15
+ endpoint: parsed.endpoint || undefined,
16
+ region: parsed.region || undefined,
17
+ };
18
+ }
19
+ /**
20
+ * Helper method to detect if a string is base64 encoded
21
+ */
22
+ export function isBase64(str) {
23
+ try {
24
+ // Check if it's a data URL (e.g., "data:image/png;base64,...")
25
+ if (str.startsWith('data:') && str.includes('base64,')) {
26
+ return true;
27
+ }
28
+ // Check if it's pure base64 (valid base64 characters, proper length)
29
+ const base64Regex = /^[A-Za-z0-9+/]*={0,2}$/;
30
+ if (base64Regex.test(str) && str.length > 0) {
31
+ // Try to decode and re-encode to verify it's valid base64
32
+ try {
33
+ const decoded = Buffer.from(str, 'base64').toString('base64');
34
+ return decoded === str;
35
+ }
36
+ catch {
37
+ return false;
38
+ }
39
+ }
40
+ return false;
41
+ }
42
+ catch {
43
+ return false;
44
+ }
45
+ }
46
+ //# sourceMappingURL=s3.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"s3.utils.js","sourceRoot":"","sources":["../../../../src/bubbles/service-bubble/s3/s3.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AASpE;;;;GAIG;AACH,MAAM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