@bubblelab/bubble-core 0.1.98 → 0.1.99
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/bubble-bundle.d.ts +72 -72
- package/dist/bubbles/service-bubble/ai-agent.d.ts +84 -84
- package/dist/bubbles/service-bubble/airtable.d.ts +100 -100
- package/dist/bubbles/service-bubble/apify/apify.d.ts +14 -14
- package/dist/bubbles/service-bubble/ashby/ashby.d.ts +74 -74
- package/dist/bubbles/service-bubble/ashby/ashby.schema.d.ts +102 -102
- package/dist/bubbles/service-bubble/browserbase/browserbase.d.ts +4 -4
- package/dist/bubbles/service-bubble/browserbase/browserbase.schema.d.ts +4 -4
- package/dist/bubbles/service-bubble/crustdata/crustdata.d.ts +4 -4
- package/dist/bubbles/service-bubble/crustdata/crustdata.schema.d.ts +8 -8
- package/dist/bubbles/service-bubble/firecrawl.d.ts +272 -272
- package/dist/bubbles/service-bubble/followupboss.d.ts +4 -4
- package/dist/bubbles/service-bubble/github.d.ts +40 -40
- package/dist/bubbles/service-bubble/gmail.d.ts +104 -104
- package/dist/bubbles/service-bubble/google-calendar.d.ts +80 -80
- package/dist/bubbles/service-bubble/google-drive.d.ts +40 -40
- package/dist/bubbles/service-bubble/http.d.ts +4 -4
- package/dist/bubbles/service-bubble/insforge-db.d.ts +8 -8
- package/dist/bubbles/service-bubble/jira/jira.d.ts +12 -12
- package/dist/bubbles/service-bubble/jira/jira.schema.d.ts +14 -14
- package/dist/bubbles/service-bubble/notion/notion.d.ts +68 -68
- package/dist/bubbles/service-bubble/postgresql.d.ts +8 -8
- package/dist/bubbles/service-bubble/resend.d.ts +24 -24
- package/dist/bubbles/service-bubble/resend.d.ts.map +1 -1
- package/dist/bubbles/service-bubble/resend.js +9 -7
- package/dist/bubbles/service-bubble/resend.js.map +1 -1
- package/dist/bubbles/service-bubble/slack/slack.d.ts +68 -68
- package/dist/bubbles/service-bubble/storage.d.ts +20 -20
- package/dist/bubbles/service-bubble/stripe/stripe.d.ts +211 -4
- package/dist/bubbles/service-bubble/stripe/stripe.d.ts.map +1 -1
- package/dist/bubbles/service-bubble/stripe/stripe.js +87 -2
- package/dist/bubbles/service-bubble/stripe/stripe.js.map +1 -1
- package/dist/bubbles/service-bubble/stripe/stripe.schema.d.ts +243 -4
- package/dist/bubbles/service-bubble/stripe/stripe.schema.d.ts.map +1 -1
- package/dist/bubbles/service-bubble/stripe/stripe.schema.js +118 -0
- package/dist/bubbles/service-bubble/stripe/stripe.schema.js.map +1 -1
- package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.d.ts +2 -2
- package/dist/bubbles/tool-bubble/amazon-shopping-tool/amazon-shopping-tool.schema.d.ts +2 -2
- package/dist/bubbles/tool-bubble/linkedin-tool.d.ts +52 -52
- package/dist/bubbles/tool-bubble/research-agent-tool.d.ts +4 -4
- package/dist/bubbles/tool-bubble/sql-query-tool.d.ts +4 -4
- package/dist/bubbles/tool-bubble/tiktok-tool.d.ts +16 -16
- package/dist/bubbles/tool-bubble/twitter-tool.d.ts +46 -46
- package/dist/bubbles/tool-bubble/web-crawl-tool.d.ts +4 -4
- package/dist/bubbles/tool-bubble/web-extract-tool.d.ts +4 -4
- package/dist/bubbles/tool-bubble/web-scrape-tool.d.ts +8 -8
- package/dist/bubbles/tool-bubble/youtube-tool.d.ts +10 -10
- package/dist/bubbles/workflow-bubble/pdf-form-operations.workflow.d.ts +44 -44
- package/dist/bubbles/workflow-bubble/pdf-ocr.workflow.d.ts +16 -16
- package/dist/bubbles/workflow-bubble/slack-data-assistant.workflow.d.ts +2 -2
- package/dist/bubbles/workflow-bubble/slack-formatter-agent.d.ts +26 -26
- package/dist/bubbles.json +306 -14
- package/package.json +4 -4
|
@@ -19,18 +19,18 @@ declare const StorageParamsSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodOb
|
|
|
19
19
|
region: string;
|
|
20
20
|
expirationMinutes: number;
|
|
21
21
|
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
22
|
-
accountId?: string | undefined;
|
|
23
22
|
contentType?: string | undefined;
|
|
23
|
+
accountId?: string | undefined;
|
|
24
24
|
userId?: string | undefined;
|
|
25
25
|
}, {
|
|
26
26
|
operation: "getUploadUrl";
|
|
27
27
|
bucketName: string;
|
|
28
28
|
fileName: string;
|
|
29
29
|
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
30
|
+
contentType?: string | undefined;
|
|
30
31
|
accountId?: string | undefined;
|
|
31
32
|
region?: string | undefined;
|
|
32
33
|
expirationMinutes?: number | undefined;
|
|
33
|
-
contentType?: string | undefined;
|
|
34
34
|
userId?: string | undefined;
|
|
35
35
|
}>, z.ZodObject<{
|
|
36
36
|
operation: z.ZodLiteral<"getFile">;
|
|
@@ -96,17 +96,17 @@ declare const StorageParamsSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodOb
|
|
|
96
96
|
region: string;
|
|
97
97
|
fileContent: string;
|
|
98
98
|
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
99
|
-
accountId?: string | undefined;
|
|
100
99
|
contentType?: string | undefined;
|
|
100
|
+
accountId?: string | undefined;
|
|
101
101
|
}, {
|
|
102
102
|
operation: "updateFile";
|
|
103
103
|
fileName: string;
|
|
104
104
|
fileContent: string;
|
|
105
105
|
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
106
|
+
contentType?: string | undefined;
|
|
106
107
|
bucketName?: string | undefined;
|
|
107
108
|
accountId?: string | undefined;
|
|
108
109
|
region?: string | undefined;
|
|
109
|
-
contentType?: string | undefined;
|
|
110
110
|
}>, z.ZodObject<{
|
|
111
111
|
operation: z.ZodLiteral<"getMultipleUploadUrls">;
|
|
112
112
|
bucketName: z.ZodString;
|
|
@@ -149,15 +149,15 @@ declare const StorageResultSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodOb
|
|
|
149
149
|
error: string;
|
|
150
150
|
success: boolean;
|
|
151
151
|
operation: "getUploadUrl";
|
|
152
|
-
fileName?: string | undefined;
|
|
153
152
|
contentType?: string | undefined;
|
|
153
|
+
fileName?: string | undefined;
|
|
154
154
|
uploadUrl?: string | undefined;
|
|
155
155
|
}, {
|
|
156
156
|
error: string;
|
|
157
157
|
success: boolean;
|
|
158
158
|
operation: "getUploadUrl";
|
|
159
|
-
fileName?: string | undefined;
|
|
160
159
|
contentType?: string | undefined;
|
|
160
|
+
fileName?: string | undefined;
|
|
161
161
|
uploadUrl?: string | undefined;
|
|
162
162
|
}>, z.ZodObject<{
|
|
163
163
|
operation: z.ZodLiteral<"getFile">;
|
|
@@ -173,8 +173,8 @@ declare const StorageResultSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodOb
|
|
|
173
173
|
error: string;
|
|
174
174
|
success: boolean;
|
|
175
175
|
operation: "getFile";
|
|
176
|
-
fileName?: string | undefined;
|
|
177
176
|
contentType?: string | undefined;
|
|
177
|
+
fileName?: string | undefined;
|
|
178
178
|
downloadUrl?: string | undefined;
|
|
179
179
|
fileUrl?: string | undefined;
|
|
180
180
|
fileSize?: number | undefined;
|
|
@@ -183,8 +183,8 @@ declare const StorageResultSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodOb
|
|
|
183
183
|
error: string;
|
|
184
184
|
success: boolean;
|
|
185
185
|
operation: "getFile";
|
|
186
|
-
fileName?: string | undefined;
|
|
187
186
|
contentType?: string | undefined;
|
|
187
|
+
fileName?: string | undefined;
|
|
188
188
|
downloadUrl?: string | undefined;
|
|
189
189
|
fileUrl?: string | undefined;
|
|
190
190
|
fileSize?: number | undefined;
|
|
@@ -219,15 +219,15 @@ declare const StorageResultSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodOb
|
|
|
219
219
|
success: boolean;
|
|
220
220
|
operation: "updateFile";
|
|
221
221
|
updated?: boolean | undefined;
|
|
222
|
-
fileName?: string | undefined;
|
|
223
222
|
contentType?: string | undefined;
|
|
223
|
+
fileName?: string | undefined;
|
|
224
224
|
}, {
|
|
225
225
|
error: string;
|
|
226
226
|
success: boolean;
|
|
227
227
|
operation: "updateFile";
|
|
228
228
|
updated?: boolean | undefined;
|
|
229
|
-
fileName?: string | undefined;
|
|
230
229
|
contentType?: string | undefined;
|
|
230
|
+
fileName?: string | undefined;
|
|
231
231
|
}>, z.ZodObject<{
|
|
232
232
|
operation: z.ZodLiteral<"getMultipleUploadUrls">;
|
|
233
233
|
success: z.ZodBoolean;
|
|
@@ -299,18 +299,18 @@ export declare class StorageBubble<T extends StorageParams = StorageParams> exte
|
|
|
299
299
|
region: string;
|
|
300
300
|
expirationMinutes: number;
|
|
301
301
|
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
302
|
-
accountId?: string | undefined;
|
|
303
302
|
contentType?: string | undefined;
|
|
303
|
+
accountId?: string | undefined;
|
|
304
304
|
userId?: string | undefined;
|
|
305
305
|
}, {
|
|
306
306
|
operation: "getUploadUrl";
|
|
307
307
|
bucketName: string;
|
|
308
308
|
fileName: string;
|
|
309
309
|
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
310
|
+
contentType?: string | undefined;
|
|
310
311
|
accountId?: string | undefined;
|
|
311
312
|
region?: string | undefined;
|
|
312
313
|
expirationMinutes?: number | undefined;
|
|
313
|
-
contentType?: string | undefined;
|
|
314
314
|
userId?: string | undefined;
|
|
315
315
|
}>, z.ZodObject<{
|
|
316
316
|
operation: z.ZodLiteral<"getFile">;
|
|
@@ -376,17 +376,17 @@ export declare class StorageBubble<T extends StorageParams = StorageParams> exte
|
|
|
376
376
|
region: string;
|
|
377
377
|
fileContent: string;
|
|
378
378
|
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
379
|
-
accountId?: string | undefined;
|
|
380
379
|
contentType?: string | undefined;
|
|
380
|
+
accountId?: string | undefined;
|
|
381
381
|
}, {
|
|
382
382
|
operation: "updateFile";
|
|
383
383
|
fileName: string;
|
|
384
384
|
fileContent: string;
|
|
385
385
|
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
386
|
+
contentType?: string | undefined;
|
|
386
387
|
bucketName?: string | undefined;
|
|
387
388
|
accountId?: string | undefined;
|
|
388
389
|
region?: string | undefined;
|
|
389
|
-
contentType?: string | undefined;
|
|
390
390
|
}>, z.ZodObject<{
|
|
391
391
|
operation: z.ZodLiteral<"getMultipleUploadUrls">;
|
|
392
392
|
bucketName: z.ZodString;
|
|
@@ -429,15 +429,15 @@ export declare class StorageBubble<T extends StorageParams = StorageParams> exte
|
|
|
429
429
|
error: string;
|
|
430
430
|
success: boolean;
|
|
431
431
|
operation: "getUploadUrl";
|
|
432
|
-
fileName?: string | undefined;
|
|
433
432
|
contentType?: string | undefined;
|
|
433
|
+
fileName?: string | undefined;
|
|
434
434
|
uploadUrl?: string | undefined;
|
|
435
435
|
}, {
|
|
436
436
|
error: string;
|
|
437
437
|
success: boolean;
|
|
438
438
|
operation: "getUploadUrl";
|
|
439
|
-
fileName?: string | undefined;
|
|
440
439
|
contentType?: string | undefined;
|
|
440
|
+
fileName?: string | undefined;
|
|
441
441
|
uploadUrl?: string | undefined;
|
|
442
442
|
}>, z.ZodObject<{
|
|
443
443
|
operation: z.ZodLiteral<"getFile">;
|
|
@@ -453,8 +453,8 @@ export declare class StorageBubble<T extends StorageParams = StorageParams> exte
|
|
|
453
453
|
error: string;
|
|
454
454
|
success: boolean;
|
|
455
455
|
operation: "getFile";
|
|
456
|
-
fileName?: string | undefined;
|
|
457
456
|
contentType?: string | undefined;
|
|
457
|
+
fileName?: string | undefined;
|
|
458
458
|
downloadUrl?: string | undefined;
|
|
459
459
|
fileUrl?: string | undefined;
|
|
460
460
|
fileSize?: number | undefined;
|
|
@@ -463,8 +463,8 @@ export declare class StorageBubble<T extends StorageParams = StorageParams> exte
|
|
|
463
463
|
error: string;
|
|
464
464
|
success: boolean;
|
|
465
465
|
operation: "getFile";
|
|
466
|
-
fileName?: string | undefined;
|
|
467
466
|
contentType?: string | undefined;
|
|
467
|
+
fileName?: string | undefined;
|
|
468
468
|
downloadUrl?: string | undefined;
|
|
469
469
|
fileUrl?: string | undefined;
|
|
470
470
|
fileSize?: number | undefined;
|
|
@@ -499,15 +499,15 @@ export declare class StorageBubble<T extends StorageParams = StorageParams> exte
|
|
|
499
499
|
success: boolean;
|
|
500
500
|
operation: "updateFile";
|
|
501
501
|
updated?: boolean | undefined;
|
|
502
|
-
fileName?: string | undefined;
|
|
503
502
|
contentType?: string | undefined;
|
|
503
|
+
fileName?: string | undefined;
|
|
504
504
|
}, {
|
|
505
505
|
error: string;
|
|
506
506
|
success: boolean;
|
|
507
507
|
operation: "updateFile";
|
|
508
508
|
updated?: boolean | undefined;
|
|
509
|
-
fileName?: string | undefined;
|
|
510
509
|
contentType?: string | undefined;
|
|
510
|
+
fileName?: string | undefined;
|
|
511
511
|
}>, z.ZodObject<{
|
|
512
512
|
operation: z.ZodLiteral<"getMultipleUploadUrls">;
|
|
513
513
|
success: z.ZodBoolean;
|
|
@@ -46,14 +46,14 @@ export declare class StripeBubble<T extends StripeParamsInput = StripeParamsInpu
|
|
|
46
46
|
}, "strip", import("zod").ZodTypeAny, {
|
|
47
47
|
name: string;
|
|
48
48
|
operation: "create_customer";
|
|
49
|
-
email?: string | undefined;
|
|
50
49
|
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
50
|
+
email?: string | undefined;
|
|
51
51
|
metadata?: Record<string, string> | undefined;
|
|
52
52
|
}, {
|
|
53
53
|
name: string;
|
|
54
54
|
operation: "create_customer";
|
|
55
|
-
email?: string | undefined;
|
|
56
55
|
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
56
|
+
email?: string | undefined;
|
|
57
57
|
metadata?: Record<string, string> | undefined;
|
|
58
58
|
}>, import("zod").ZodObject<{
|
|
59
59
|
operation: import("zod").ZodLiteral<"list_customers">;
|
|
@@ -63,12 +63,12 @@ export declare class StripeBubble<T extends StripeParamsInput = StripeParamsInpu
|
|
|
63
63
|
}, "strip", import("zod").ZodTypeAny, {
|
|
64
64
|
operation: "list_customers";
|
|
65
65
|
limit: number;
|
|
66
|
-
email?: string | undefined;
|
|
67
66
|
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
67
|
+
email?: string | undefined;
|
|
68
68
|
}, {
|
|
69
69
|
operation: "list_customers";
|
|
70
|
-
email?: string | undefined;
|
|
71
70
|
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
71
|
+
email?: string | undefined;
|
|
72
72
|
limit?: number | undefined;
|
|
73
73
|
}>, import("zod").ZodObject<{
|
|
74
74
|
operation: import("zod").ZodLiteral<"create_product">;
|
|
@@ -187,6 +187,19 @@ export declare class StripeBubble<T extends StripeParamsInput = StripeParamsInpu
|
|
|
187
187
|
auto_advance: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodBoolean>>;
|
|
188
188
|
collection_method: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodEnum<["charge_automatically", "send_invoice"]>>>;
|
|
189
189
|
days_until_due: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
190
|
+
items: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
191
|
+
unit_amount: import("zod").ZodNumber;
|
|
192
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
193
|
+
quantity: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
194
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
195
|
+
unit_amount: number;
|
|
196
|
+
quantity: number;
|
|
197
|
+
description?: string | undefined;
|
|
198
|
+
}, {
|
|
199
|
+
unit_amount: number;
|
|
200
|
+
description?: string | undefined;
|
|
201
|
+
quantity?: number | undefined;
|
|
202
|
+
}>, "many">>;
|
|
190
203
|
metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
|
|
191
204
|
credentials: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodNativeEnum<typeof CredentialType>, import("zod").ZodString>>;
|
|
192
205
|
}, "strip", import("zod").ZodTypeAny, {
|
|
@@ -194,12 +207,22 @@ export declare class StripeBubble<T extends StripeParamsInput = StripeParamsInpu
|
|
|
194
207
|
customer: string;
|
|
195
208
|
auto_advance: boolean;
|
|
196
209
|
collection_method: "charge_automatically" | "send_invoice";
|
|
210
|
+
items?: {
|
|
211
|
+
unit_amount: number;
|
|
212
|
+
quantity: number;
|
|
213
|
+
description?: string | undefined;
|
|
214
|
+
}[] | undefined;
|
|
197
215
|
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
198
216
|
metadata?: Record<string, string> | undefined;
|
|
199
217
|
days_until_due?: number | undefined;
|
|
200
218
|
}, {
|
|
201
219
|
operation: "create_invoice";
|
|
202
220
|
customer: string;
|
|
221
|
+
items?: {
|
|
222
|
+
unit_amount: number;
|
|
223
|
+
description?: string | undefined;
|
|
224
|
+
quantity?: number | undefined;
|
|
225
|
+
}[] | undefined;
|
|
203
226
|
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
204
227
|
metadata?: Record<string, string> | undefined;
|
|
205
228
|
auto_advance?: boolean | undefined;
|
|
@@ -250,6 +273,48 @@ export declare class StripeBubble<T extends StripeParamsInput = StripeParamsInpu
|
|
|
250
273
|
invoice_id: string;
|
|
251
274
|
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
252
275
|
auto_advance?: boolean | undefined;
|
|
276
|
+
}>, import("zod").ZodObject<{
|
|
277
|
+
operation: import("zod").ZodLiteral<"create_invoice_item">;
|
|
278
|
+
customer: import("zod").ZodString;
|
|
279
|
+
invoice: import("zod").ZodOptional<import("zod").ZodString>;
|
|
280
|
+
unit_amount: import("zod").ZodNumber;
|
|
281
|
+
currency: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
282
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
283
|
+
quantity: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
284
|
+
metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
|
|
285
|
+
credentials: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodNativeEnum<typeof CredentialType>, import("zod").ZodString>>;
|
|
286
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
287
|
+
operation: "create_invoice_item";
|
|
288
|
+
currency: string;
|
|
289
|
+
unit_amount: number;
|
|
290
|
+
customer: string;
|
|
291
|
+
quantity: number;
|
|
292
|
+
description?: string | undefined;
|
|
293
|
+
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
294
|
+
metadata?: Record<string, string> | undefined;
|
|
295
|
+
invoice?: string | undefined;
|
|
296
|
+
}, {
|
|
297
|
+
operation: "create_invoice_item";
|
|
298
|
+
unit_amount: number;
|
|
299
|
+
customer: string;
|
|
300
|
+
description?: string | undefined;
|
|
301
|
+
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
302
|
+
metadata?: Record<string, string> | undefined;
|
|
303
|
+
currency?: string | undefined;
|
|
304
|
+
invoice?: string | undefined;
|
|
305
|
+
quantity?: number | undefined;
|
|
306
|
+
}>, import("zod").ZodObject<{
|
|
307
|
+
operation: import("zod").ZodLiteral<"send_invoice">;
|
|
308
|
+
invoice_id: import("zod").ZodString;
|
|
309
|
+
credentials: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodNativeEnum<typeof CredentialType>, import("zod").ZodString>>;
|
|
310
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
311
|
+
operation: "send_invoice";
|
|
312
|
+
invoice_id: string;
|
|
313
|
+
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
314
|
+
}, {
|
|
315
|
+
operation: "send_invoice";
|
|
316
|
+
invoice_id: string;
|
|
317
|
+
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
253
318
|
}>, import("zod").ZodObject<{
|
|
254
319
|
operation: import("zod").ZodLiteral<"get_balance">;
|
|
255
320
|
credentials: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodNativeEnum<typeof CredentialType>, import("zod").ZodString>>;
|
|
@@ -982,6 +1047,146 @@ export declare class StripeBubble<T extends StripeParamsInput = StripeParamsInpu
|
|
|
982
1047
|
hosted_invoice_url?: string | null | undefined;
|
|
983
1048
|
invoice_pdf?: string | null | undefined;
|
|
984
1049
|
} | undefined;
|
|
1050
|
+
}>, import("zod").ZodObject<{
|
|
1051
|
+
operation: import("zod").ZodLiteral<"create_invoice_item">;
|
|
1052
|
+
success: import("zod").ZodBoolean;
|
|
1053
|
+
invoice_item: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1054
|
+
id: import("zod").ZodString;
|
|
1055
|
+
invoice: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
1056
|
+
customer: import("zod").ZodString;
|
|
1057
|
+
amount: import("zod").ZodNumber;
|
|
1058
|
+
unit_amount: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
|
|
1059
|
+
currency: import("zod").ZodString;
|
|
1060
|
+
description: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
1061
|
+
quantity: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1062
|
+
date: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1063
|
+
metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
|
|
1064
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
1065
|
+
id: string;
|
|
1066
|
+
currency: string;
|
|
1067
|
+
customer: string;
|
|
1068
|
+
amount: number;
|
|
1069
|
+
description?: string | null | undefined;
|
|
1070
|
+
date?: number | undefined;
|
|
1071
|
+
metadata?: Record<string, string> | undefined;
|
|
1072
|
+
unit_amount?: number | null | undefined;
|
|
1073
|
+
invoice?: string | null | undefined;
|
|
1074
|
+
quantity?: number | undefined;
|
|
1075
|
+
}, {
|
|
1076
|
+
id: string;
|
|
1077
|
+
currency: string;
|
|
1078
|
+
customer: string;
|
|
1079
|
+
amount: number;
|
|
1080
|
+
description?: string | null | undefined;
|
|
1081
|
+
date?: number | undefined;
|
|
1082
|
+
metadata?: Record<string, string> | undefined;
|
|
1083
|
+
unit_amount?: number | null | undefined;
|
|
1084
|
+
invoice?: string | null | undefined;
|
|
1085
|
+
quantity?: number | undefined;
|
|
1086
|
+
}>>;
|
|
1087
|
+
error: import("zod").ZodString;
|
|
1088
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
1089
|
+
error: string;
|
|
1090
|
+
success: boolean;
|
|
1091
|
+
operation: "create_invoice_item";
|
|
1092
|
+
invoice_item?: {
|
|
1093
|
+
id: string;
|
|
1094
|
+
currency: string;
|
|
1095
|
+
customer: string;
|
|
1096
|
+
amount: number;
|
|
1097
|
+
description?: string | null | undefined;
|
|
1098
|
+
date?: number | undefined;
|
|
1099
|
+
metadata?: Record<string, string> | undefined;
|
|
1100
|
+
unit_amount?: number | null | undefined;
|
|
1101
|
+
invoice?: string | null | undefined;
|
|
1102
|
+
quantity?: number | undefined;
|
|
1103
|
+
} | undefined;
|
|
1104
|
+
}, {
|
|
1105
|
+
error: string;
|
|
1106
|
+
success: boolean;
|
|
1107
|
+
operation: "create_invoice_item";
|
|
1108
|
+
invoice_item?: {
|
|
1109
|
+
id: string;
|
|
1110
|
+
currency: string;
|
|
1111
|
+
customer: string;
|
|
1112
|
+
amount: number;
|
|
1113
|
+
description?: string | null | undefined;
|
|
1114
|
+
date?: number | undefined;
|
|
1115
|
+
metadata?: Record<string, string> | undefined;
|
|
1116
|
+
unit_amount?: number | null | undefined;
|
|
1117
|
+
invoice?: string | null | undefined;
|
|
1118
|
+
quantity?: number | undefined;
|
|
1119
|
+
} | undefined;
|
|
1120
|
+
}>, import("zod").ZodObject<{
|
|
1121
|
+
operation: import("zod").ZodLiteral<"send_invoice">;
|
|
1122
|
+
success: import("zod").ZodBoolean;
|
|
1123
|
+
invoice: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1124
|
+
id: import("zod").ZodString;
|
|
1125
|
+
customer: import("zod").ZodNullable<import("zod").ZodString>;
|
|
1126
|
+
status: import("zod").ZodNullable<import("zod").ZodEnum<["draft", "open", "paid", "uncollectible", "void"]>>;
|
|
1127
|
+
total: import("zod").ZodNumber;
|
|
1128
|
+
currency: import("zod").ZodString;
|
|
1129
|
+
created: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1130
|
+
due_date: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
1131
|
+
hosted_invoice_url: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
1132
|
+
invoice_pdf: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
1133
|
+
metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
|
|
1134
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
1135
|
+
status: "void" | "draft" | "open" | "paid" | "uncollectible" | null;
|
|
1136
|
+
id: string;
|
|
1137
|
+
total: number;
|
|
1138
|
+
currency: string;
|
|
1139
|
+
customer: string | null;
|
|
1140
|
+
metadata?: Record<string, string> | undefined;
|
|
1141
|
+
created?: number | undefined;
|
|
1142
|
+
due_date?: string | null | undefined;
|
|
1143
|
+
hosted_invoice_url?: string | null | undefined;
|
|
1144
|
+
invoice_pdf?: string | null | undefined;
|
|
1145
|
+
}, {
|
|
1146
|
+
status: "void" | "draft" | "open" | "paid" | "uncollectible" | null;
|
|
1147
|
+
id: string;
|
|
1148
|
+
total: number;
|
|
1149
|
+
currency: string;
|
|
1150
|
+
customer: string | null;
|
|
1151
|
+
metadata?: Record<string, string> | undefined;
|
|
1152
|
+
created?: number | undefined;
|
|
1153
|
+
due_date?: string | null | undefined;
|
|
1154
|
+
hosted_invoice_url?: string | null | undefined;
|
|
1155
|
+
invoice_pdf?: string | null | undefined;
|
|
1156
|
+
}>>;
|
|
1157
|
+
error: import("zod").ZodString;
|
|
1158
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
1159
|
+
error: string;
|
|
1160
|
+
success: boolean;
|
|
1161
|
+
operation: "send_invoice";
|
|
1162
|
+
invoice?: {
|
|
1163
|
+
status: "void" | "draft" | "open" | "paid" | "uncollectible" | null;
|
|
1164
|
+
id: string;
|
|
1165
|
+
total: number;
|
|
1166
|
+
currency: string;
|
|
1167
|
+
customer: string | null;
|
|
1168
|
+
metadata?: Record<string, string> | undefined;
|
|
1169
|
+
created?: number | undefined;
|
|
1170
|
+
due_date?: string | null | undefined;
|
|
1171
|
+
hosted_invoice_url?: string | null | undefined;
|
|
1172
|
+
invoice_pdf?: string | null | undefined;
|
|
1173
|
+
} | undefined;
|
|
1174
|
+
}, {
|
|
1175
|
+
error: string;
|
|
1176
|
+
success: boolean;
|
|
1177
|
+
operation: "send_invoice";
|
|
1178
|
+
invoice?: {
|
|
1179
|
+
status: "void" | "draft" | "open" | "paid" | "uncollectible" | null;
|
|
1180
|
+
id: string;
|
|
1181
|
+
total: number;
|
|
1182
|
+
currency: string;
|
|
1183
|
+
customer: string | null;
|
|
1184
|
+
metadata?: Record<string, string> | undefined;
|
|
1185
|
+
created?: number | undefined;
|
|
1186
|
+
due_date?: string | null | undefined;
|
|
1187
|
+
hosted_invoice_url?: string | null | undefined;
|
|
1188
|
+
invoice_pdf?: string | null | undefined;
|
|
1189
|
+
} | undefined;
|
|
985
1190
|
}>, import("zod").ZodObject<{
|
|
986
1191
|
operation: import("zod").ZodLiteral<"get_balance">;
|
|
987
1192
|
success: import("zod").ZodBoolean;
|
|
@@ -1356,6 +1561,8 @@ export declare class StripeBubble<T extends StripeParamsInput = StripeParamsInpu
|
|
|
1356
1561
|
private listInvoices;
|
|
1357
1562
|
private retrieveInvoice;
|
|
1358
1563
|
private finalizeInvoice;
|
|
1564
|
+
private createInvoiceItem;
|
|
1565
|
+
private sendInvoice;
|
|
1359
1566
|
private getBalance;
|
|
1360
1567
|
private listPaymentIntents;
|
|
1361
1568
|
private listSubscriptions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripe.d.ts","sourceRoot":"","sources":["../../../../src/bubbles/service-bubble/stripe/stripe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAIL,KAAK,iBAAiB,EACtB,KAAK,YAAY,EAClB,MAAM,oBAAoB,CAAC;AAE5B;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,qBAAa,YAAY,CACvB,CAAC,SAAS,iBAAiB,GAAG,iBAAiB,CAC/C,SAAQ,aAAa,CACrB,CAAC,EACD,OAAO,CAAC,YAAY,EAAE;IAAE,SAAS,EAAE,CAAC,CAAC,WAAW,CAAC,CAAA;CAAE,CAAC,CACrD;IACC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAG,SAAS,CAAU;IAC1C,MAAM,CAAC,QAAQ,CAAC,OAAO,YAAY;IACnC,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAG,QAAQ,CAAU;IAC7C,MAAM,CAAC,QAAQ,CAAC,UAAU,YAAY;IACtC,MAAM,CAAC,QAAQ,CAAC,MAAM
|
|
1
|
+
{"version":3,"file":"stripe.d.ts","sourceRoot":"","sources":["../../../../src/bubbles/service-bubble/stripe/stripe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAIL,KAAK,iBAAiB,EACtB,KAAK,YAAY,EAClB,MAAM,oBAAoB,CAAC;AAE5B;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,qBAAa,YAAY,CACvB,CAAC,SAAS,iBAAiB,GAAG,iBAAiB,CAC/C,SAAQ,aAAa,CACrB,CAAC,EACD,OAAO,C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Aa,CAC3B,OAAO,CAAC,EAAE,aAAa,GACtB,OAAO,CAAC,OAAO,CAAC,YAAY,EAAE;QAAE,SAAS,EAAE,CAAC,CAAC,WAAW,CAAC,CAAA;KAAE,CAAC,CAAC;YA6JlD,cAAc;YAoCd,aAAa;YAuCb,aAAa;YAkCb,YAAY;YAyCZ,WAAW;YA0CX,UAAU;YA8CV,iBAAiB;YAgDjB,aAAa;YA+Eb,YAAY;YA8CZ,eAAe;YA2Cf,eAAe;YAiDf,iBAAiB;YA+DjB,WAAW;YAgDX,UAAU;YA8BV,kBAAkB;YAkDlB,iBAAiB;YAkDjB,kBAAkB;YA6DlB,gBAAgB;YAuChB,kBAAkB;IA2DhC,SAAS,CAAC,gBAAgB,IAAI,MAAM,GAAG,SAAS;CAYjD"}
|
|
@@ -165,6 +165,10 @@ export class StripeBubble extends ServiceBubble {
|
|
|
165
165
|
return await this.retrieveInvoice(parsedParams);
|
|
166
166
|
case 'finalize_invoice':
|
|
167
167
|
return await this.finalizeInvoice(parsedParams);
|
|
168
|
+
case 'create_invoice_item':
|
|
169
|
+
return await this.createInvoiceItem(parsedParams);
|
|
170
|
+
case 'send_invoice':
|
|
171
|
+
return await this.sendInvoice(parsedParams);
|
|
168
172
|
case 'get_balance':
|
|
169
173
|
return await this.getBalance();
|
|
170
174
|
case 'list_payment_intents':
|
|
@@ -384,7 +388,7 @@ export class StripeBubble extends ServiceBubble {
|
|
|
384
388
|
// INVOICE OPERATIONS
|
|
385
389
|
// ============================================================================
|
|
386
390
|
async createInvoice(params) {
|
|
387
|
-
const { customer, auto_advance, collection_method, days_until_due, metadata, } = params;
|
|
391
|
+
const { customer, auto_advance, collection_method, days_until_due, items, metadata, } = params;
|
|
388
392
|
const body = {
|
|
389
393
|
customer,
|
|
390
394
|
auto_advance,
|
|
@@ -395,7 +399,27 @@ export class StripeBubble extends ServiceBubble {
|
|
|
395
399
|
if (metadata)
|
|
396
400
|
body.metadata = metadata;
|
|
397
401
|
const response = await this.makeStripeRequest('/v1/invoices', 'POST', body);
|
|
398
|
-
|
|
402
|
+
let invoice = response;
|
|
403
|
+
// If items are provided, create invoice items for each
|
|
404
|
+
if (items && items.length > 0) {
|
|
405
|
+
for (const item of items) {
|
|
406
|
+
const quantity = item.quantity ?? 1;
|
|
407
|
+
// Calculate total amount (unit_amount * quantity) since Stripe's `amount` is the total
|
|
408
|
+
const totalAmount = item.unit_amount * quantity;
|
|
409
|
+
const itemBody = {
|
|
410
|
+
customer,
|
|
411
|
+
invoice: invoice.id,
|
|
412
|
+
amount: totalAmount,
|
|
413
|
+
currency: invoice.currency,
|
|
414
|
+
};
|
|
415
|
+
if (item.description)
|
|
416
|
+
itemBody.description = item.description;
|
|
417
|
+
await this.makeStripeRequest('/v1/invoiceitems', 'POST', itemBody);
|
|
418
|
+
}
|
|
419
|
+
// Retrieve the updated invoice to get the correct total
|
|
420
|
+
const updatedResponse = await this.makeStripeRequest(`/v1/invoices/${invoice.id}`, 'GET');
|
|
421
|
+
invoice = updatedResponse;
|
|
422
|
+
}
|
|
399
423
|
return {
|
|
400
424
|
operation: 'create_invoice',
|
|
401
425
|
success: true,
|
|
@@ -497,6 +521,67 @@ export class StripeBubble extends ServiceBubble {
|
|
|
497
521
|
error: '',
|
|
498
522
|
};
|
|
499
523
|
}
|
|
524
|
+
async createInvoiceItem(params) {
|
|
525
|
+
const { customer, invoice, unit_amount, currency, description, quantity, metadata, } = params;
|
|
526
|
+
const qty = quantity ?? 1;
|
|
527
|
+
// Calculate total amount (unit_amount * quantity) since Stripe's `amount` is the total
|
|
528
|
+
const totalAmount = unit_amount * qty;
|
|
529
|
+
const body = {
|
|
530
|
+
customer,
|
|
531
|
+
amount: totalAmount,
|
|
532
|
+
currency,
|
|
533
|
+
};
|
|
534
|
+
if (invoice)
|
|
535
|
+
body.invoice = invoice;
|
|
536
|
+
if (description)
|
|
537
|
+
body.description = description;
|
|
538
|
+
if (metadata)
|
|
539
|
+
body.metadata = metadata;
|
|
540
|
+
const response = await this.makeStripeRequest('/v1/invoiceitems', 'POST', body);
|
|
541
|
+
const invoiceItem = response;
|
|
542
|
+
return {
|
|
543
|
+
operation: 'create_invoice_item',
|
|
544
|
+
success: true,
|
|
545
|
+
invoice_item: {
|
|
546
|
+
id: invoiceItem.id,
|
|
547
|
+
invoice: invoiceItem.invoice,
|
|
548
|
+
customer: invoiceItem.customer,
|
|
549
|
+
amount: invoiceItem.amount,
|
|
550
|
+
unit_amount: invoiceItem.unit_amount,
|
|
551
|
+
currency: invoiceItem.currency,
|
|
552
|
+
description: invoiceItem.description,
|
|
553
|
+
quantity: invoiceItem.quantity,
|
|
554
|
+
date: invoiceItem.date,
|
|
555
|
+
metadata: invoiceItem.metadata,
|
|
556
|
+
},
|
|
557
|
+
error: '',
|
|
558
|
+
};
|
|
559
|
+
}
|
|
560
|
+
async sendInvoice(params) {
|
|
561
|
+
const { invoice_id } = params;
|
|
562
|
+
// Use Stripe's send endpoint to send the invoice via Stripe's email service
|
|
563
|
+
const response = await this.makeStripeRequest(`/v1/invoices/${invoice_id}/send`, 'POST');
|
|
564
|
+
const invoice = response;
|
|
565
|
+
return {
|
|
566
|
+
operation: 'send_invoice',
|
|
567
|
+
success: true,
|
|
568
|
+
invoice: {
|
|
569
|
+
id: invoice.id,
|
|
570
|
+
customer: invoice.customer,
|
|
571
|
+
status: invoice.status,
|
|
572
|
+
total: invoice.total,
|
|
573
|
+
currency: invoice.currency,
|
|
574
|
+
created: invoice.created,
|
|
575
|
+
due_date: invoice.due_date
|
|
576
|
+
? new Date(invoice.due_date * 1000).toISOString()
|
|
577
|
+
: null,
|
|
578
|
+
hosted_invoice_url: invoice.hosted_invoice_url,
|
|
579
|
+
invoice_pdf: invoice.invoice_pdf,
|
|
580
|
+
metadata: invoice.metadata,
|
|
581
|
+
},
|
|
582
|
+
error: '',
|
|
583
|
+
};
|
|
584
|
+
}
|
|
500
585
|
// ============================================================================
|
|
501
586
|
// BALANCE OPERATIONS
|
|
502
587
|
// ============================================================================
|