@bubblelab/bubble-core 0.1.28 → 0.1.31
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 +161 -92
- package/dist/bubble-factory.d.ts.map +1 -1
- package/dist/bubble-factory.js +4 -0
- package/dist/bubble-factory.js.map +1 -1
- package/dist/bubbles/service-bubble/agi-inc.d.ts +4 -4
- package/dist/bubbles/service-bubble/airtable.d.ts +94 -94
- package/dist/bubbles/service-bubble/apify/actors/google-maps-scraper.d.ts +2 -2
- package/dist/bubbles/service-bubble/apify/actors/instagram-hashtag-scraper.d.ts +20 -20
- package/dist/bubbles/service-bubble/apify/actors/instagram-scraper.d.ts +30 -30
- package/dist/bubbles/service-bubble/apify/actors/linkedin-posts-search.d.ts +26 -26
- package/dist/bubbles/service-bubble/apify/actors/linkedin-profile-posts.d.ts +56 -56
- package/dist/bubbles/service-bubble/apify/actors/tiktok-scraper.d.ts +16 -16
- package/dist/bubbles/service-bubble/apify/actors/twitter-scraper.d.ts +31 -31
- package/dist/bubbles/service-bubble/apify/actors/youtube-scraper.d.ts +8 -8
- package/dist/bubbles/service-bubble/apify/apify-scraper.schema.d.ts +153 -153
- package/dist/bubbles/service-bubble/apify/apify.d.ts +4 -4
- package/dist/bubbles/service-bubble/browserbase/browserbase.d.ts +1 -1
- 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/eleven-labs.d.ts +4 -4
- package/dist/bubbles/service-bubble/firecrawl.d.ts +132 -132
- package/dist/bubbles/service-bubble/followupboss.d.ts +34 -34
- package/dist/bubbles/service-bubble/github.d.ts +122 -122
- package/dist/bubbles/service-bubble/gmail.d.ts +391 -391
- package/dist/bubbles/service-bubble/google-calendar.d.ts +96 -96
- package/dist/bubbles/service-bubble/google-drive.d.ts +46 -46
- package/dist/bubbles/service-bubble/google-sheets/google-sheets.d.ts +41 -41
- package/dist/bubbles/service-bubble/google-sheets/google-sheets.integration.flow.d.ts +31 -0
- package/dist/bubbles/service-bubble/google-sheets/google-sheets.integration.flow.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/google-sheets/google-sheets.integration.flow.js +184 -0
- package/dist/bubbles/service-bubble/google-sheets/google-sheets.integration.flow.js.map +1 -0
- package/dist/bubbles/service-bubble/google-sheets/google-sheets.schema.d.ts +79 -79
- package/dist/bubbles/service-bubble/google-sheets.d.ts +1811 -0
- package/dist/bubbles/service-bubble/google-sheets.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/google-sheets.js +904 -0
- package/dist/bubbles/service-bubble/google-sheets.js.map +1 -0
- package/dist/bubbles/service-bubble/http.d.ts +12 -12
- package/dist/bubbles/service-bubble/insforge-db.d.ts +8 -8
- package/dist/bubbles/service-bubble/jira/index.d.ts +5 -0
- package/dist/bubbles/service-bubble/jira/index.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/jira/index.js +5 -0
- package/dist/bubbles/service-bubble/jira/index.js.map +1 -0
- package/dist/bubbles/service-bubble/jira/jira.d.ts +2695 -0
- package/dist/bubbles/service-bubble/jira/jira.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/jira/jira.integration.flow.d.ts +38 -0
- package/dist/bubbles/service-bubble/jira/jira.integration.flow.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/jira/jira.integration.flow.js +358 -0
- package/dist/bubbles/service-bubble/jira/jira.integration.flow.js.map +1 -0
- package/dist/bubbles/service-bubble/jira/jira.js +573 -0
- package/dist/bubbles/service-bubble/jira/jira.js.map +1 -0
- package/dist/bubbles/service-bubble/jira/jira.schema.d.ts +3660 -0
- package/dist/bubbles/service-bubble/jira/jira.schema.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/jira/jira.schema.js +499 -0
- package/dist/bubbles/service-bubble/jira/jira.schema.js.map +1 -0
- package/dist/bubbles/service-bubble/jira/jira.utils.d.ts +141 -0
- package/dist/bubbles/service-bubble/jira/jira.utils.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/jira/jira.utils.js +428 -0
- package/dist/bubbles/service-bubble/jira/jira.utils.js.map +1 -0
- package/dist/bubbles/service-bubble/notion/notion.d.ts +4 -4
- package/dist/bubbles/service-bubble/notion/property-schemas.d.ts +36 -36
- package/dist/bubbles/service-bubble/postgresql.d.ts +8 -8
- package/dist/bubbles/service-bubble/resend.d.ts +2 -2
- package/dist/bubbles/service-bubble/slack/slack.d.ts +114 -114
- package/dist/bubbles/service-bubble/slack.d.ts +5869 -0
- package/dist/bubbles/service-bubble/slack.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/slack.js +1536 -0
- package/dist/bubbles/service-bubble/slack.js.map +1 -0
- package/dist/bubbles/service-bubble/storage.d.ts +2 -2
- package/dist/bubbles/service-bubble/telegram.d.ts +6 -6
- package/dist/bubbles/tool-bubble/company-enrichment-tool.d.ts +4 -4
- package/dist/bubbles/tool-bubble/google-maps-tool.d.ts +4 -4
- package/dist/bubbles/tool-bubble/instagram-tool.d.ts +4 -4
- package/dist/bubbles/tool-bubble/linkedin-tool.d.ts +172 -172
- package/dist/bubbles/tool-bubble/people-search-tool.d.ts +4 -4
- package/dist/bubbles/tool-bubble/reddit-scrape-tool.d.ts +2 -2
- package/dist/bubbles/tool-bubble/research-agent-tool.d.ts +4 -4
- package/dist/bubbles/tool-bubble/sql-query-tool.d.ts +8 -8
- package/dist/bubbles/tool-bubble/tiktok-tool.d.ts +44 -44
- package/dist/bubbles/tool-bubble/twitter-tool.d.ts +60 -60
- package/dist/bubbles/tool-bubble/web-search-tool.d.ts +4 -4
- package/dist/bubbles/tool-bubble/youtube-tool.d.ts +10 -10
- package/dist/bubbles/workflow-bubble/pdf-form-operations.workflow.d.ts +18 -18
- package/dist/bubbles/workflow-bubble/slack-formatter-agent.d.ts +48 -48
- package/dist/bubbles.json +1795 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Jira Bubble Utilities
|
|
3
|
+
*
|
|
4
|
+
* Helper functions for the Jira service integration.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Atlassian Document Format (ADF) types
|
|
8
|
+
*/
|
|
9
|
+
interface ADFMark {
|
|
10
|
+
type: 'strong' | 'em' | 'code' | 'link' | 'strike';
|
|
11
|
+
attrs?: {
|
|
12
|
+
href?: string;
|
|
13
|
+
title?: string;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
interface ADFTextNode {
|
|
17
|
+
type: 'text';
|
|
18
|
+
text: string;
|
|
19
|
+
marks?: ADFMark[];
|
|
20
|
+
}
|
|
21
|
+
interface ADFInlineNode {
|
|
22
|
+
type: 'hardBreak';
|
|
23
|
+
}
|
|
24
|
+
type ADFInlineContent = ADFTextNode | ADFInlineNode;
|
|
25
|
+
interface ADFParagraphNode {
|
|
26
|
+
type: 'paragraph';
|
|
27
|
+
content?: ADFInlineContent[];
|
|
28
|
+
}
|
|
29
|
+
interface ADFHeadingNode {
|
|
30
|
+
type: 'heading';
|
|
31
|
+
attrs: {
|
|
32
|
+
level: 1 | 2 | 3 | 4 | 5 | 6;
|
|
33
|
+
};
|
|
34
|
+
content?: ADFInlineContent[];
|
|
35
|
+
}
|
|
36
|
+
interface ADFCodeBlockNode {
|
|
37
|
+
type: 'codeBlock';
|
|
38
|
+
attrs?: {
|
|
39
|
+
language?: string;
|
|
40
|
+
};
|
|
41
|
+
content?: ADFTextNode[];
|
|
42
|
+
}
|
|
43
|
+
interface ADFListItemNode {
|
|
44
|
+
type: 'listItem';
|
|
45
|
+
content: (ADFParagraphNode | ADFBulletListNode | ADFOrderedListNode)[];
|
|
46
|
+
}
|
|
47
|
+
interface ADFBulletListNode {
|
|
48
|
+
type: 'bulletList';
|
|
49
|
+
content: ADFListItemNode[];
|
|
50
|
+
}
|
|
51
|
+
interface ADFOrderedListNode {
|
|
52
|
+
type: 'orderedList';
|
|
53
|
+
content: ADFListItemNode[];
|
|
54
|
+
}
|
|
55
|
+
interface ADFBlockquoteNode {
|
|
56
|
+
type: 'blockquote';
|
|
57
|
+
content: ADFParagraphNode[];
|
|
58
|
+
}
|
|
59
|
+
interface ADFRuleNode {
|
|
60
|
+
type: 'rule';
|
|
61
|
+
}
|
|
62
|
+
type ADFBlockNode = ADFParagraphNode | ADFHeadingNode | ADFCodeBlockNode | ADFBulletListNode | ADFOrderedListNode | ADFBlockquoteNode | ADFRuleNode;
|
|
63
|
+
interface ADFDocument {
|
|
64
|
+
type: 'doc';
|
|
65
|
+
version: 1;
|
|
66
|
+
content: ADFBlockNode[];
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Converts markdown or plain text to Atlassian Document Format (ADF).
|
|
70
|
+
*
|
|
71
|
+
* Jira's API requires descriptions and comments in ADF format.
|
|
72
|
+
* This function converts markdown/plain text into proper ADF structure.
|
|
73
|
+
*
|
|
74
|
+
* Supported markdown:
|
|
75
|
+
* - **bold** or __bold__
|
|
76
|
+
* - *italic* or _italic_
|
|
77
|
+
* - `inline code`
|
|
78
|
+
* - [links](url)
|
|
79
|
+
* - # Headings (h1-h6)
|
|
80
|
+
* - - Bullet lists
|
|
81
|
+
* - 1. Numbered lists
|
|
82
|
+
* - > Blockquotes
|
|
83
|
+
* - ``` Code blocks ```
|
|
84
|
+
* - --- Horizontal rules
|
|
85
|
+
* - ~~strikethrough~~
|
|
86
|
+
*
|
|
87
|
+
* @param text - Markdown or plain text to convert
|
|
88
|
+
* @returns ADF document object
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* const adf = textToADF('**Bold** and *italic*');
|
|
92
|
+
* const adf = textToADF('# Heading\n\nParagraph text');
|
|
93
|
+
*/
|
|
94
|
+
export declare function textToADF(text: string): ADFDocument;
|
|
95
|
+
/**
|
|
96
|
+
* Converts ADF document back to plain text.
|
|
97
|
+
*
|
|
98
|
+
* Useful for displaying Jira content in a human-readable format.
|
|
99
|
+
*
|
|
100
|
+
* @param adf - ADF document to convert
|
|
101
|
+
* @returns Plain text representation
|
|
102
|
+
*/
|
|
103
|
+
export declare function adfToText(adf: unknown): string;
|
|
104
|
+
/**
|
|
105
|
+
* Enhances Jira API error messages with helpful hints.
|
|
106
|
+
*
|
|
107
|
+
* @param errorText - Raw error text from API
|
|
108
|
+
* @param statusCode - HTTP status code
|
|
109
|
+
* @param statusText - HTTP status text
|
|
110
|
+
* @returns Enhanced error message
|
|
111
|
+
*/
|
|
112
|
+
export declare function enhanceErrorMessage(errorText: string, statusCode: number, statusText: string): string;
|
|
113
|
+
/**
|
|
114
|
+
* Validates and normalizes a date string to YYYY-MM-DD format.
|
|
115
|
+
*
|
|
116
|
+
* @param date - Date string to validate
|
|
117
|
+
* @returns Normalized date string or null if invalid
|
|
118
|
+
*/
|
|
119
|
+
export declare function normalizeDate(date: string | null | undefined): string | null;
|
|
120
|
+
/**
|
|
121
|
+
* Finds a transition by target status name (case-insensitive).
|
|
122
|
+
*
|
|
123
|
+
* @param transitions - Available transitions
|
|
124
|
+
* @param targetStatus - Target status name
|
|
125
|
+
* @returns Matching transition or undefined
|
|
126
|
+
*/
|
|
127
|
+
export declare function findTransitionByStatus(transitions: Array<{
|
|
128
|
+
id: string;
|
|
129
|
+
name: string;
|
|
130
|
+
to?: {
|
|
131
|
+
name: string;
|
|
132
|
+
};
|
|
133
|
+
}>, targetStatus: string): {
|
|
134
|
+
id: string;
|
|
135
|
+
name: string;
|
|
136
|
+
to?: {
|
|
137
|
+
name: string;
|
|
138
|
+
};
|
|
139
|
+
} | undefined;
|
|
140
|
+
export {};
|
|
141
|
+
//# sourceMappingURL=jira.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jira.utils.d.ts","sourceRoot":"","sources":["../../../../src/bubbles/service-bubble/jira/jira.utils.ts"],"names":[],"mappings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AE,GAAG,SAAS,CAcjE"}
|
|
@@ -0,0 +1,428 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Jira Bubble Utilities
|
|
3
|
+
*
|
|
4
|
+
* Helper functions for the Jira service integration.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Converts markdown or plain text to Atlassian Document Format (ADF).
|
|
8
|
+
*
|
|
9
|
+
* Jira's API requires descriptions and comments in ADF format.
|
|
10
|
+
* This function converts markdown/plain text into proper ADF structure.
|
|
11
|
+
*
|
|
12
|
+
* Supported markdown:
|
|
13
|
+
* - **bold** or __bold__
|
|
14
|
+
* - *italic* or _italic_
|
|
15
|
+
* - `inline code`
|
|
16
|
+
* - [links](url)
|
|
17
|
+
* - # Headings (h1-h6)
|
|
18
|
+
* - - Bullet lists
|
|
19
|
+
* - 1. Numbered lists
|
|
20
|
+
* - > Blockquotes
|
|
21
|
+
* - ``` Code blocks ```
|
|
22
|
+
* - --- Horizontal rules
|
|
23
|
+
* - ~~strikethrough~~
|
|
24
|
+
*
|
|
25
|
+
* @param text - Markdown or plain text to convert
|
|
26
|
+
* @returns ADF document object
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* const adf = textToADF('**Bold** and *italic*');
|
|
30
|
+
* const adf = textToADF('# Heading\n\nParagraph text');
|
|
31
|
+
*/
|
|
32
|
+
export function textToADF(text) {
|
|
33
|
+
const lines = text.split(/\r?\n/);
|
|
34
|
+
const content = [];
|
|
35
|
+
let i = 0;
|
|
36
|
+
while (i < lines.length) {
|
|
37
|
+
const line = lines[i];
|
|
38
|
+
// Code block (```)
|
|
39
|
+
if (line.startsWith('```')) {
|
|
40
|
+
const language = line.slice(3).trim() || undefined;
|
|
41
|
+
const codeLines = [];
|
|
42
|
+
i++;
|
|
43
|
+
while (i < lines.length && !lines[i].startsWith('```')) {
|
|
44
|
+
codeLines.push(lines[i]);
|
|
45
|
+
i++;
|
|
46
|
+
}
|
|
47
|
+
content.push({
|
|
48
|
+
type: 'codeBlock',
|
|
49
|
+
attrs: language ? { language } : undefined,
|
|
50
|
+
content: codeLines.length > 0
|
|
51
|
+
? [{ type: 'text', text: codeLines.join('\n') }]
|
|
52
|
+
: undefined,
|
|
53
|
+
});
|
|
54
|
+
i++; // Skip closing ```
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
// Horizontal rule (---, ***, ___)
|
|
58
|
+
if (/^(-{3,}|\*{3,}|_{3,})$/.test(line.trim())) {
|
|
59
|
+
content.push({ type: 'rule' });
|
|
60
|
+
i++;
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
// Headings (# to ######)
|
|
64
|
+
const headingMatch = line.match(/^(#{1,6})\s+(.+)$/);
|
|
65
|
+
if (headingMatch) {
|
|
66
|
+
const level = headingMatch[1].length;
|
|
67
|
+
const headingText = headingMatch[2];
|
|
68
|
+
content.push({
|
|
69
|
+
type: 'heading',
|
|
70
|
+
attrs: { level },
|
|
71
|
+
content: parseInlineMarkdown(headingText),
|
|
72
|
+
});
|
|
73
|
+
i++;
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
// Blockquote (>)
|
|
77
|
+
if (line.startsWith('>')) {
|
|
78
|
+
const quoteLines = [];
|
|
79
|
+
while (i < lines.length && lines[i].startsWith('>')) {
|
|
80
|
+
quoteLines.push(lines[i].replace(/^>\s?/, ''));
|
|
81
|
+
i++;
|
|
82
|
+
}
|
|
83
|
+
content.push({
|
|
84
|
+
type: 'blockquote',
|
|
85
|
+
content: quoteLines.map((ql) => ({
|
|
86
|
+
type: 'paragraph',
|
|
87
|
+
content: parseInlineMarkdown(ql),
|
|
88
|
+
})),
|
|
89
|
+
});
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
// Bullet list (- or *)
|
|
93
|
+
if (/^[-*]\s+/.test(line)) {
|
|
94
|
+
const listItems = [];
|
|
95
|
+
while (i < lines.length && /^[-*]\s+/.test(lines[i])) {
|
|
96
|
+
const itemText = lines[i].replace(/^[-*]\s+/, '');
|
|
97
|
+
listItems.push({
|
|
98
|
+
type: 'listItem',
|
|
99
|
+
content: [
|
|
100
|
+
{ type: 'paragraph', content: parseInlineMarkdown(itemText) },
|
|
101
|
+
],
|
|
102
|
+
});
|
|
103
|
+
i++;
|
|
104
|
+
}
|
|
105
|
+
content.push({ type: 'bulletList', content: listItems });
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
108
|
+
// Ordered list (1. 2. etc)
|
|
109
|
+
if (/^\d+\.\s+/.test(line)) {
|
|
110
|
+
const listItems = [];
|
|
111
|
+
while (i < lines.length && /^\d+\.\s+/.test(lines[i])) {
|
|
112
|
+
const itemText = lines[i].replace(/^\d+\.\s+/, '');
|
|
113
|
+
listItems.push({
|
|
114
|
+
type: 'listItem',
|
|
115
|
+
content: [
|
|
116
|
+
{ type: 'paragraph', content: parseInlineMarkdown(itemText) },
|
|
117
|
+
],
|
|
118
|
+
});
|
|
119
|
+
i++;
|
|
120
|
+
}
|
|
121
|
+
content.push({ type: 'orderedList', content: listItems });
|
|
122
|
+
continue;
|
|
123
|
+
}
|
|
124
|
+
// Empty line - skip but don't create empty paragraph
|
|
125
|
+
if (line.trim() === '') {
|
|
126
|
+
i++;
|
|
127
|
+
continue;
|
|
128
|
+
}
|
|
129
|
+
// Regular paragraph
|
|
130
|
+
content.push({
|
|
131
|
+
type: 'paragraph',
|
|
132
|
+
content: parseInlineMarkdown(line),
|
|
133
|
+
});
|
|
134
|
+
i++;
|
|
135
|
+
}
|
|
136
|
+
// Ensure at least one node
|
|
137
|
+
if (content.length === 0) {
|
|
138
|
+
content.push({ type: 'paragraph', content: [] });
|
|
139
|
+
}
|
|
140
|
+
return {
|
|
141
|
+
type: 'doc',
|
|
142
|
+
version: 1,
|
|
143
|
+
content,
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Parses inline markdown formatting and returns ADF inline content.
|
|
148
|
+
*/
|
|
149
|
+
function parseInlineMarkdown(text) {
|
|
150
|
+
if (!text)
|
|
151
|
+
return [];
|
|
152
|
+
const result = [];
|
|
153
|
+
// Regex patterns for inline formatting
|
|
154
|
+
// Order matters: more specific patterns first
|
|
155
|
+
const patterns = [
|
|
156
|
+
// Code (must be first to avoid conflicts with other patterns inside code)
|
|
157
|
+
{ regex: /`([^`]+)`/g, mark: 'code' },
|
|
158
|
+
// Links [text](url)
|
|
159
|
+
{ regex: /\[([^\]]+)\]\(([^)]+)\)/g, mark: 'link' },
|
|
160
|
+
// Bold **text** or __text__
|
|
161
|
+
{ regex: /\*\*([^*]+)\*\*|__([^_]+)__/g, mark: 'strong' },
|
|
162
|
+
// Strikethrough ~~text~~
|
|
163
|
+
{ regex: /~~([^~]+)~~/g, mark: 'strike' },
|
|
164
|
+
// Italic *text* or _text_ (but not inside words for _)
|
|
165
|
+
{
|
|
166
|
+
regex: /\*([^*]+)\*|(?<![a-zA-Z])_([^_]+)_(?![a-zA-Z])/g,
|
|
167
|
+
mark: 'em',
|
|
168
|
+
},
|
|
169
|
+
];
|
|
170
|
+
// Simple approach: process text sequentially
|
|
171
|
+
let lastIndex = 0;
|
|
172
|
+
const matches = [];
|
|
173
|
+
for (const { regex, mark } of patterns) {
|
|
174
|
+
regex.lastIndex = 0;
|
|
175
|
+
let match;
|
|
176
|
+
while ((match = regex.exec(text)) !== null) {
|
|
177
|
+
const matchedText = match[1] || match[2] || '';
|
|
178
|
+
const matchObj = {
|
|
179
|
+
start: match.index,
|
|
180
|
+
end: match.index + match[0].length,
|
|
181
|
+
text: matchedText,
|
|
182
|
+
mark,
|
|
183
|
+
};
|
|
184
|
+
if (mark === 'link') {
|
|
185
|
+
matchObj.text = match[1];
|
|
186
|
+
matchObj.href = match[2];
|
|
187
|
+
}
|
|
188
|
+
// Check for overlaps with existing matches
|
|
189
|
+
const overlaps = matches.some((m) => (matchObj.start >= m.start && matchObj.start < m.end) ||
|
|
190
|
+
(matchObj.end > m.start && matchObj.end <= m.end));
|
|
191
|
+
if (!overlaps) {
|
|
192
|
+
matches.push(matchObj);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
// Sort matches by start position
|
|
197
|
+
matches.sort((a, b) => a.start - b.start);
|
|
198
|
+
// Build result
|
|
199
|
+
for (const match of matches) {
|
|
200
|
+
// Add plain text before this match
|
|
201
|
+
if (match.start > lastIndex) {
|
|
202
|
+
const plainText = text.slice(lastIndex, match.start);
|
|
203
|
+
if (plainText) {
|
|
204
|
+
result.push({ type: 'text', text: plainText });
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
// Add the marked text
|
|
208
|
+
const marks = [{ type: match.mark }];
|
|
209
|
+
if (match.mark === 'link' && match.href) {
|
|
210
|
+
marks[0] = { type: 'link', attrs: { href: match.href } };
|
|
211
|
+
}
|
|
212
|
+
result.push({
|
|
213
|
+
type: 'text',
|
|
214
|
+
text: match.text,
|
|
215
|
+
marks,
|
|
216
|
+
});
|
|
217
|
+
lastIndex = match.end;
|
|
218
|
+
}
|
|
219
|
+
// Add remaining plain text
|
|
220
|
+
if (lastIndex < text.length) {
|
|
221
|
+
const plainText = text.slice(lastIndex);
|
|
222
|
+
if (plainText) {
|
|
223
|
+
result.push({ type: 'text', text: plainText });
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
// If no matches, return plain text
|
|
227
|
+
if (result.length === 0 && text) {
|
|
228
|
+
result.push({ type: 'text', text });
|
|
229
|
+
}
|
|
230
|
+
return result;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Converts ADF document back to plain text.
|
|
234
|
+
*
|
|
235
|
+
* Useful for displaying Jira content in a human-readable format.
|
|
236
|
+
*
|
|
237
|
+
* @param adf - ADF document to convert
|
|
238
|
+
* @returns Plain text representation
|
|
239
|
+
*/
|
|
240
|
+
export function adfToText(adf) {
|
|
241
|
+
if (!adf || typeof adf !== 'object') {
|
|
242
|
+
return '';
|
|
243
|
+
}
|
|
244
|
+
const doc = adf;
|
|
245
|
+
if (doc.type !== 'doc' || !Array.isArray(doc.content)) {
|
|
246
|
+
// If it's a string, return it directly
|
|
247
|
+
if (typeof adf === 'string') {
|
|
248
|
+
return adf;
|
|
249
|
+
}
|
|
250
|
+
return '';
|
|
251
|
+
}
|
|
252
|
+
const lines = [];
|
|
253
|
+
for (const node of doc.content) {
|
|
254
|
+
const block = node;
|
|
255
|
+
const text = extractBlockText(block);
|
|
256
|
+
if (text !== null) {
|
|
257
|
+
lines.push(text);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
return lines.join('\n');
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Extracts text from an ADF block node.
|
|
264
|
+
*/
|
|
265
|
+
function extractBlockText(block) {
|
|
266
|
+
switch (block.type) {
|
|
267
|
+
case 'paragraph':
|
|
268
|
+
case 'heading':
|
|
269
|
+
return extractTextFromContent(block.content);
|
|
270
|
+
case 'codeBlock':
|
|
271
|
+
return extractTextFromContent(block.content);
|
|
272
|
+
case 'bulletList':
|
|
273
|
+
case 'orderedList':
|
|
274
|
+
return extractListText(block.content);
|
|
275
|
+
case 'blockquote':
|
|
276
|
+
return extractTextFromContent(block.content);
|
|
277
|
+
case 'rule':
|
|
278
|
+
return '---';
|
|
279
|
+
default:
|
|
280
|
+
return extractTextFromContent(block.content);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Extracts text from list items.
|
|
285
|
+
*/
|
|
286
|
+
function extractListText(content) {
|
|
287
|
+
if (!Array.isArray(content))
|
|
288
|
+
return '';
|
|
289
|
+
return content
|
|
290
|
+
.map((item) => {
|
|
291
|
+
const listItem = item;
|
|
292
|
+
if (listItem.type === 'listItem' && Array.isArray(listItem.content)) {
|
|
293
|
+
return listItem.content
|
|
294
|
+
.map((c) => extractBlockText(c))
|
|
295
|
+
.join('');
|
|
296
|
+
}
|
|
297
|
+
return '';
|
|
298
|
+
})
|
|
299
|
+
.filter(Boolean)
|
|
300
|
+
.join('\n');
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Extracts text from ADF content array.
|
|
304
|
+
*/
|
|
305
|
+
function extractTextFromContent(content) {
|
|
306
|
+
if (!Array.isArray(content)) {
|
|
307
|
+
return '';
|
|
308
|
+
}
|
|
309
|
+
return content
|
|
310
|
+
.map((item) => {
|
|
311
|
+
const node = item;
|
|
312
|
+
if (node.type === 'text' && typeof node.text === 'string') {
|
|
313
|
+
return node.text;
|
|
314
|
+
}
|
|
315
|
+
if (node.type === 'hardBreak') {
|
|
316
|
+
return '\n';
|
|
317
|
+
}
|
|
318
|
+
// Handle nested block nodes (like in blockquote)
|
|
319
|
+
if (node.type === 'paragraph' || node.type === 'heading') {
|
|
320
|
+
return extractTextFromContent(node.content);
|
|
321
|
+
}
|
|
322
|
+
// Recursively extract from nested content
|
|
323
|
+
if (Array.isArray(node.content)) {
|
|
324
|
+
return extractTextFromContent(node.content);
|
|
325
|
+
}
|
|
326
|
+
return '';
|
|
327
|
+
})
|
|
328
|
+
.join('');
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* Enhances Jira API error messages with helpful hints.
|
|
332
|
+
*
|
|
333
|
+
* @param errorText - Raw error text from API
|
|
334
|
+
* @param statusCode - HTTP status code
|
|
335
|
+
* @param statusText - HTTP status text
|
|
336
|
+
* @returns Enhanced error message
|
|
337
|
+
*/
|
|
338
|
+
export function enhanceErrorMessage(errorText, statusCode, statusText) {
|
|
339
|
+
let message = `Jira API Error (${statusCode} ${statusText})`;
|
|
340
|
+
// Try to parse JSON error
|
|
341
|
+
try {
|
|
342
|
+
const errorJson = JSON.parse(errorText);
|
|
343
|
+
if (errorJson.errorMessages && Array.isArray(errorJson.errorMessages)) {
|
|
344
|
+
message += `: ${errorJson.errorMessages.join(', ')}`;
|
|
345
|
+
}
|
|
346
|
+
else if (errorJson.errors && typeof errorJson.errors === 'object') {
|
|
347
|
+
const errorDetails = Object.entries(errorJson.errors)
|
|
348
|
+
.map(([field, msg]) => `${field}: ${msg}`)
|
|
349
|
+
.join(', ');
|
|
350
|
+
message += `: ${errorDetails}`;
|
|
351
|
+
}
|
|
352
|
+
else if (errorJson.message) {
|
|
353
|
+
message += `: ${errorJson.message}`;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
catch {
|
|
357
|
+
// If not JSON, use raw text
|
|
358
|
+
if (errorText && errorText.length < 500) {
|
|
359
|
+
message += `: ${errorText}`;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
// Add helpful hints based on status code
|
|
363
|
+
switch (statusCode) {
|
|
364
|
+
case 400:
|
|
365
|
+
message +=
|
|
366
|
+
'\nHint: Check your request parameters. Common issues: invalid JQL syntax, missing required fields, or invalid field values.';
|
|
367
|
+
break;
|
|
368
|
+
case 401:
|
|
369
|
+
message +=
|
|
370
|
+
'\nHint: Authentication failed. Check your API token and ensure it has the correct permissions.';
|
|
371
|
+
break;
|
|
372
|
+
case 403:
|
|
373
|
+
message +=
|
|
374
|
+
'\nHint: Permission denied. Ensure your account has access to this project/issue.';
|
|
375
|
+
break;
|
|
376
|
+
case 404:
|
|
377
|
+
message +=
|
|
378
|
+
'\nHint: Resource not found. Verify the issue key, project key, or transition ID exists.';
|
|
379
|
+
break;
|
|
380
|
+
case 429:
|
|
381
|
+
message += '\nHint: Rate limited. Wait a moment before retrying.';
|
|
382
|
+
break;
|
|
383
|
+
}
|
|
384
|
+
return message;
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* Validates and normalizes a date string to YYYY-MM-DD format.
|
|
388
|
+
*
|
|
389
|
+
* @param date - Date string to validate
|
|
390
|
+
* @returns Normalized date string or null if invalid
|
|
391
|
+
*/
|
|
392
|
+
export function normalizeDate(date) {
|
|
393
|
+
if (!date) {
|
|
394
|
+
return null;
|
|
395
|
+
}
|
|
396
|
+
// Already in correct format
|
|
397
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(date)) {
|
|
398
|
+
return date;
|
|
399
|
+
}
|
|
400
|
+
// Try to parse and format
|
|
401
|
+
const parsed = new Date(date);
|
|
402
|
+
if (isNaN(parsed.getTime())) {
|
|
403
|
+
return null;
|
|
404
|
+
}
|
|
405
|
+
return parsed.toISOString().split('T')[0];
|
|
406
|
+
}
|
|
407
|
+
/**
|
|
408
|
+
* Finds a transition by target status name (case-insensitive).
|
|
409
|
+
*
|
|
410
|
+
* @param transitions - Available transitions
|
|
411
|
+
* @param targetStatus - Target status name
|
|
412
|
+
* @returns Matching transition or undefined
|
|
413
|
+
*/
|
|
414
|
+
export function findTransitionByStatus(transitions, targetStatus) {
|
|
415
|
+
const normalizedTarget = targetStatus.toLowerCase().trim();
|
|
416
|
+
return transitions.find((t) => {
|
|
417
|
+
// Match by transition name
|
|
418
|
+
if (t.name.toLowerCase().trim() === normalizedTarget) {
|
|
419
|
+
return true;
|
|
420
|
+
}
|
|
421
|
+
// Match by target status name
|
|
422
|
+
if (t.to?.name.toLowerCase().trim() === normalizedTarget) {
|
|
423
|
+
return true;
|
|
424
|
+
}
|
|
425
|
+
return false;
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
//# sourceMappingURL=jira.utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jira.utils.js","sourceRoot":"","sources":["../../../../src/bubbles/service-bubble/jira/jira.utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAiFH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,UAAU,SAAS,CAAC,IAAY;IACpC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAClC,MAAM,OAAO,GAAmB,EAAE,CAAC;IACnC,IAAI,CAAC,GAAG,CAAC,CAAC;IAEV,OAAO,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;QACxB,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QAEtB,mBAAmB;QACnB,IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,EAA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AC,CAAC,EAAE,EAAE;QAC5B,2BAA2B;QAC3B,IAAI,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,KAAK,gBAAgB,EAAE,CAAC;YACrD,OAAO,IAAI,CAAC;QACd,CAAC;QACD,8BAA8B;QAC9B,IAAI,CAAC,CAAC,EAAE,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,KAAK,gBAAgB,EAAE,CAAC;YACzD,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -769,8 +769,8 @@ declare const NotionParamsSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodObj
|
|
|
769
769
|
}>]>>;
|
|
770
770
|
credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
|
|
771
771
|
}, "strip", z.ZodTypeAny, {
|
|
772
|
-
properties: Record<string, unknown>;
|
|
773
772
|
operation: "create_data_source";
|
|
773
|
+
properties: Record<string, unknown>;
|
|
774
774
|
parent: {
|
|
775
775
|
type: "database_id";
|
|
776
776
|
database_id: string;
|
|
@@ -816,8 +816,8 @@ declare const NotionParamsSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodObj
|
|
|
816
816
|
emoji: string;
|
|
817
817
|
} | undefined;
|
|
818
818
|
}, {
|
|
819
|
-
properties: Record<string, unknown>;
|
|
820
819
|
operation: "create_data_source";
|
|
820
|
+
properties: Record<string, unknown>;
|
|
821
821
|
parent: {
|
|
822
822
|
type: "database_id";
|
|
823
823
|
database_id: string;
|
|
@@ -18460,8 +18460,8 @@ export declare class NotionBubble<T extends NotionParams = NotionParams> extends
|
|
|
18460
18460
|
}>]>>;
|
|
18461
18461
|
credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
|
|
18462
18462
|
}, "strip", z.ZodTypeAny, {
|
|
18463
|
-
properties: Record<string, unknown>;
|
|
18464
18463
|
operation: "create_data_source";
|
|
18464
|
+
properties: Record<string, unknown>;
|
|
18465
18465
|
parent: {
|
|
18466
18466
|
type: "database_id";
|
|
18467
18467
|
database_id: string;
|
|
@@ -18507,8 +18507,8 @@ export declare class NotionBubble<T extends NotionParams = NotionParams> extends
|
|
|
18507
18507
|
emoji: string;
|
|
18508
18508
|
} | undefined;
|
|
18509
18509
|
}, {
|
|
18510
|
-
properties: Record<string, unknown>;
|
|
18511
18510
|
operation: "create_data_source";
|
|
18511
|
+
properties: Record<string, unknown>;
|
|
18512
18512
|
parent: {
|
|
18513
18513
|
type: "database_id";
|
|
18514
18514
|
database_id: string;
|