@valiantys/atlassian-app 3.2.0-alpha-8 → 3.2.0-alpha-10
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/atlassian/jira/shared/util-jira-v3-api/src/lib/issue/index.cjs.js +1 -1
- package/atlassian/jira/shared/util-jira-v3-api/src/lib/issue/index.es.js +2 -10
- package/atlassian/shared/util-adf/src/lib/adf/index.cjs.js +1 -0
- package/atlassian/shared/util-adf/src/lib/adf/index.es.js +139 -0
- package/backend-trigger/index.d.ts +34 -10
- package/data-access-issue/atlassian-app-data-access-issue.api.json +6 -6
- package/data-access-issue/atlassian-app.api.md +4 -4
- package/data-access-issue/index.d.ts +43 -19
- package/package.json +6 -1
- package/util-adf/atlassian-app-util-adf.api.json +1048 -0
- package/util-adf/atlassian-app.api.md +76 -0
- package/util-adf/index.cjs.js +1 -0
- package/util-adf/index.d.ts +59 -0
- package/util-adf/index.es.js +8 -0
- package/util-adf/tsdoc-metadata.json +11 -0
- package/util-jira-v3-api/atlassian-app-util-jira-v3-api.api.json +14 -565
- package/util-jira-v3-api/atlassian-app.api.md +9 -56
- package/util-jira-v3-api/index.cjs.js +1 -1
- package/util-jira-v3-api/index.d.ts +37 -27
- package/util-jira-v3-api/index.es.js +2 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="fixVersions";exports.FIX_VERSIONS_FIELD=e;
|
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
const
|
|
2
|
-
function e(t) {
|
|
3
|
-
return t.type === "paragraph";
|
|
4
|
-
}
|
|
5
|
-
function n(t) {
|
|
6
|
-
return t.type === "text";
|
|
7
|
-
}
|
|
1
|
+
const o = "fixVersions";
|
|
8
2
|
export {
|
|
9
|
-
|
|
10
|
-
e as isAtlassianDocumentFormatParagraphNode,
|
|
11
|
-
n as isAtlassianDocumentFormatTextNode
|
|
3
|
+
o as FIX_VERSIONS_FIELD
|
|
12
4
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function o(t,n){var e,r;for(const a of t)if(a.text!==void 0&&a.text.includes(n)||(r=(e=a.attrs)==null?void 0:e.text)!=null&&r.includes(n)||a.content&&o(a.content,n))return!0;return!1}function p(t,n){return o(t.content,n)}function i(t,n,e){return t.map(r=>{var a;return r.text!==void 0?{...r,text:r.text.replaceAll(n,e)}:((a=r.attrs)==null?void 0:a.text)!==void 0?{...r,attrs:{...r.attrs,text:r.attrs.text.replaceAll(n,e)}}:r.content?{...r,content:i(r.content,n,e)}:r})}function f(t,n,e){return{...t,content:i(t.content,n,e)}}function $(t,n){const e={type:"text",text:n};return{...t,content:[...t.content,{type:"paragraph",content:[e]}]}}function s(t){return t.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""")}function g(t,n){return n?n.reduce((e,r)=>{var a,c,l;switch(r.type){case"strong":return`<strong>${e}</strong>`;case"em":return`<em>${e}</em>`;case"code":return`<code>${e}</code>`;case"strike":return`<s>${e}</s>`;case"underline":return`<u>${e}</u>`;case"link":return`<a href="${s(String(((a=r.attrs)==null?void 0:a.href)??""))}">${e}</a>`;case"textColor":return`<span style="color:${s(String(((c=r.attrs)==null?void 0:c.color)??""))}">${e}</span>`;case"subsup":return((l=r.attrs)==null?void 0:l.type)==="sub"?`<sub>${e}</sub>`:`<sup>${e}</sup>`;default:return e}},t):t}function u(t){return(t==null?void 0:t.map(b).join(""))??""}function b(t){var n,e,r,a;switch(t.type){case"text":return g(s(t.text??""),t.marks);case"hardBreak":return"<br>";case"rule":return"<hr>";case"paragraph":return`<p>${u(t.content)}</p>`;case"heading":{const c=Number(((n=t.attrs)==null?void 0:n.level)??1);return`<h${c}>${u(t.content)}</h${c}>`}case"blockquote":return`<blockquote>${u(t.content)}</blockquote>`;case"bulletList":return`<ul>${u(t.content)}</ul>`;case"orderedList":return`<ol>${u(t.content)}</ol>`;case"listItem":return`<li>${u(t.content)}</li>`;case"codeBlock":return`<pre${(e=t.attrs)!=null&&e.language?` data-language="${s(String(t.attrs.language))}"`:""}><code>${u(t.content)}</code></pre>`;case"emoji":case"mention":case"status":return s(String(((r=t.attrs)==null?void 0:r.text)??""));case"inlineCard":{const c=s(String(((a=t.attrs)==null?void 0:a.url)??""));return`<a href="${c}">${c}</a>`}case"table":return`<table>${u(t.content)}</table>`;case"tableRow":return`<tr>${u(t.content)}</tr>`;case"tableHeader":return`<th>${u(t.content)}</th>`;case"tableCell":return`<td>${u(t.content)}</td>`;default:return u(t.content)}}function h(t){return u(t.content)}function x(t){return{type:"doc",version:1,content:[{type:"paragraph",content:[{type:"text",text:t}]}]}}exports.adfToHtml=h;exports.appendParagraph=$;exports.replaceInAdf=f;exports.searchAdf=p;exports.toAdfDoc=x;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
function o(t, n) {
|
|
2
|
+
var e, r;
|
|
3
|
+
for (const u of t)
|
|
4
|
+
if (u.text !== void 0 && u.text.includes(n) || (r = (e = u.attrs) == null ? void 0 : e.text) != null && r.includes(n) || u.content && o(u.content, n))
|
|
5
|
+
return !0;
|
|
6
|
+
return !1;
|
|
7
|
+
}
|
|
8
|
+
function $(t, n) {
|
|
9
|
+
return o(t.content, n);
|
|
10
|
+
}
|
|
11
|
+
function i(t, n, e) {
|
|
12
|
+
return t.map((r) => {
|
|
13
|
+
var u;
|
|
14
|
+
return r.text !== void 0 ? { ...r, text: r.text.replaceAll(n, e) } : ((u = r.attrs) == null ? void 0 : u.text) !== void 0 ? {
|
|
15
|
+
...r,
|
|
16
|
+
attrs: {
|
|
17
|
+
...r.attrs,
|
|
18
|
+
text: r.attrs.text.replaceAll(n, e)
|
|
19
|
+
}
|
|
20
|
+
} : r.content ? {
|
|
21
|
+
...r,
|
|
22
|
+
content: i(r.content, n, e)
|
|
23
|
+
} : r;
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function g(t, n, e) {
|
|
27
|
+
return {
|
|
28
|
+
...t,
|
|
29
|
+
content: i(t.content, n, e)
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function b(t, n) {
|
|
33
|
+
const e = { type: "text", text: n };
|
|
34
|
+
return {
|
|
35
|
+
...t,
|
|
36
|
+
content: [...t.content, { type: "paragraph", content: [e] }]
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function s(t) {
|
|
40
|
+
return t.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """);
|
|
41
|
+
}
|
|
42
|
+
function p(t, n) {
|
|
43
|
+
return n ? n.reduce((e, r) => {
|
|
44
|
+
var u, c, l;
|
|
45
|
+
switch (r.type) {
|
|
46
|
+
case "strong":
|
|
47
|
+
return `<strong>${e}</strong>`;
|
|
48
|
+
case "em":
|
|
49
|
+
return `<em>${e}</em>`;
|
|
50
|
+
case "code":
|
|
51
|
+
return `<code>${e}</code>`;
|
|
52
|
+
case "strike":
|
|
53
|
+
return `<s>${e}</s>`;
|
|
54
|
+
case "underline":
|
|
55
|
+
return `<u>${e}</u>`;
|
|
56
|
+
case "link":
|
|
57
|
+
return `<a href="${s(String(((u = r.attrs) == null ? void 0 : u.href) ?? ""))}">${e}</a>`;
|
|
58
|
+
case "textColor":
|
|
59
|
+
return `<span style="color:${s(String(((c = r.attrs) == null ? void 0 : c.color) ?? ""))}">${e}</span>`;
|
|
60
|
+
case "subsup":
|
|
61
|
+
return ((l = r.attrs) == null ? void 0 : l.type) === "sub" ? `<sub>${e}</sub>` : `<sup>${e}</sup>`;
|
|
62
|
+
default:
|
|
63
|
+
return e;
|
|
64
|
+
}
|
|
65
|
+
}, t) : t;
|
|
66
|
+
}
|
|
67
|
+
function a(t) {
|
|
68
|
+
return (t == null ? void 0 : t.map(f).join("")) ?? "";
|
|
69
|
+
}
|
|
70
|
+
function f(t) {
|
|
71
|
+
var n, e, r, u;
|
|
72
|
+
switch (t.type) {
|
|
73
|
+
case "text":
|
|
74
|
+
return p(s(t.text ?? ""), t.marks);
|
|
75
|
+
case "hardBreak":
|
|
76
|
+
return "<br>";
|
|
77
|
+
case "rule":
|
|
78
|
+
return "<hr>";
|
|
79
|
+
case "paragraph":
|
|
80
|
+
return `<p>${a(t.content)}</p>`;
|
|
81
|
+
case "heading": {
|
|
82
|
+
const c = Number(((n = t.attrs) == null ? void 0 : n.level) ?? 1);
|
|
83
|
+
return `<h${c}>${a(t.content)}</h${c}>`;
|
|
84
|
+
}
|
|
85
|
+
case "blockquote":
|
|
86
|
+
return `<blockquote>${a(t.content)}</blockquote>`;
|
|
87
|
+
case "bulletList":
|
|
88
|
+
return `<ul>${a(t.content)}</ul>`;
|
|
89
|
+
case "orderedList":
|
|
90
|
+
return `<ol>${a(t.content)}</ol>`;
|
|
91
|
+
case "listItem":
|
|
92
|
+
return `<li>${a(t.content)}</li>`;
|
|
93
|
+
case "codeBlock":
|
|
94
|
+
return `<pre${(e = t.attrs) != null && e.language ? ` data-language="${s(String(t.attrs.language))}"` : ""}><code>${a(t.content)}</code></pre>`;
|
|
95
|
+
case "emoji":
|
|
96
|
+
case "mention":
|
|
97
|
+
case "status":
|
|
98
|
+
return s(String(((r = t.attrs) == null ? void 0 : r.text) ?? ""));
|
|
99
|
+
case "inlineCard": {
|
|
100
|
+
const c = s(String(((u = t.attrs) == null ? void 0 : u.url) ?? ""));
|
|
101
|
+
return `<a href="${c}">${c}</a>`;
|
|
102
|
+
}
|
|
103
|
+
case "table":
|
|
104
|
+
return `<table>${a(t.content)}</table>`;
|
|
105
|
+
case "tableRow":
|
|
106
|
+
return `<tr>${a(t.content)}</tr>`;
|
|
107
|
+
case "tableHeader":
|
|
108
|
+
return `<th>${a(t.content)}</th>`;
|
|
109
|
+
case "tableCell":
|
|
110
|
+
return `<td>${a(t.content)}</td>`;
|
|
111
|
+
default:
|
|
112
|
+
return a(t.content);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
function x(t) {
|
|
116
|
+
return a(t.content);
|
|
117
|
+
}
|
|
118
|
+
function h(t) {
|
|
119
|
+
return {
|
|
120
|
+
type: "doc",
|
|
121
|
+
version: 1,
|
|
122
|
+
content: [
|
|
123
|
+
{
|
|
124
|
+
type: "paragraph",
|
|
125
|
+
content: [{
|
|
126
|
+
type: "text",
|
|
127
|
+
text: t
|
|
128
|
+
}]
|
|
129
|
+
}
|
|
130
|
+
]
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
export {
|
|
134
|
+
x as adfToHtml,
|
|
135
|
+
b as appendParagraph,
|
|
136
|
+
g as replaceInAdf,
|
|
137
|
+
$ as searchAdf,
|
|
138
|
+
h as toAdfDoc
|
|
139
|
+
};
|
|
@@ -1,22 +1,46 @@
|
|
|
1
1
|
import { WebTriggerRequest } from '@forge/api/out/webTrigger';
|
|
2
2
|
import { WebTriggerResponse } from '@forge/api/out/webTrigger';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
/** Root document node */
|
|
5
|
+
declare interface AdfDoc {
|
|
5
6
|
type: 'doc';
|
|
6
|
-
version:
|
|
7
|
-
content:
|
|
7
|
+
version: 1;
|
|
8
|
+
content: AdfNode[];
|
|
8
9
|
}
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
/**
|
|
12
|
+
* TypeScript types for Atlassian Document Format (ADF)
|
|
13
|
+
* Conforms to https://unpkg.com/@atlaskit/adf-schema@52.4.0/dist/json-schema/v1/full.json
|
|
14
|
+
*/
|
|
15
|
+
declare interface AdfMark {
|
|
11
16
|
type: string;
|
|
12
|
-
|
|
17
|
+
attrs?: Record<string, unknown>;
|
|
13
18
|
}
|
|
14
19
|
|
|
15
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Base for all ADF nodes. `content` is optional because many block nodes
|
|
22
|
+
* (paragraph, heading, codeBlock, etc.) define it as optional in the schema.
|
|
23
|
+
* `text` is only populated on text nodes. `attrs` is present on most non-text
|
|
24
|
+
* nodes. `marks` is present on nodes that support formatting.
|
|
25
|
+
*/
|
|
26
|
+
declare interface AdfNode {
|
|
16
27
|
type: string;
|
|
28
|
+
text?: string;
|
|
29
|
+
attrs?: AdfNodeAttrs;
|
|
30
|
+
content?: AdfNode[];
|
|
31
|
+
marks?: AdfMark[];
|
|
17
32
|
}
|
|
18
33
|
|
|
19
|
-
|
|
34
|
+
/**
|
|
35
|
+
* Attrs common across node types. Many inline node types (emoji, mention,
|
|
36
|
+
* status, placeholder, hardBreak, inlineExtension, extension, bodiedExtension)
|
|
37
|
+
* store their display text in `attrs.text`.
|
|
38
|
+
*/
|
|
39
|
+
declare interface AdfNodeAttrs {
|
|
40
|
+
text?: string;
|
|
41
|
+
localId?: string;
|
|
42
|
+
[key: string]: unknown;
|
|
43
|
+
}
|
|
20
44
|
|
|
21
45
|
declare interface AvatarUrls {
|
|
22
46
|
'48x48': string;
|
|
@@ -43,7 +67,7 @@ declare interface FixVersion {
|
|
|
43
67
|
|
|
44
68
|
declare type FixVersions = FixVersion[];
|
|
45
69
|
|
|
46
|
-
declare interface Issue<T =
|
|
70
|
+
declare interface Issue<T = AdfDoc> {
|
|
47
71
|
id: string;
|
|
48
72
|
expand?: string;
|
|
49
73
|
key: string;
|
|
@@ -52,7 +76,7 @@ declare interface Issue<T = AtlassianDocumentFormat> {
|
|
|
52
76
|
renderedFields?: IssueFields<string>;
|
|
53
77
|
}
|
|
54
78
|
|
|
55
|
-
declare type IssueFields<T =
|
|
79
|
+
declare type IssueFields<T = AdfDoc> = CustomFields & StaticIssueFields<T>;
|
|
56
80
|
|
|
57
81
|
declare interface IssueLink {
|
|
58
82
|
id: string;
|
|
@@ -138,7 +162,7 @@ declare interface Project {
|
|
|
138
162
|
lead?: User;
|
|
139
163
|
}
|
|
140
164
|
|
|
141
|
-
declare interface StaticIssueFields<T =
|
|
165
|
+
declare interface StaticIssueFields<T = AdfDoc> {
|
|
142
166
|
statuscategorychangedate?: string;
|
|
143
167
|
fixVersions?: FixVersions;
|
|
144
168
|
resolution?: unknown;
|
|
@@ -244,8 +244,8 @@
|
|
|
244
244
|
},
|
|
245
245
|
{
|
|
246
246
|
"kind": "Reference",
|
|
247
|
-
"text": "
|
|
248
|
-
"canonicalReference": "@valiantys/atlassian-app!~
|
|
247
|
+
"text": "AdfDoc",
|
|
248
|
+
"canonicalReference": "@valiantys/atlassian-app!~AdfDoc:interface"
|
|
249
249
|
},
|
|
250
250
|
{
|
|
251
251
|
"kind": "Content",
|
|
@@ -1228,8 +1228,8 @@
|
|
|
1228
1228
|
},
|
|
1229
1229
|
{
|
|
1230
1230
|
"kind": "Reference",
|
|
1231
|
-
"text": "
|
|
1232
|
-
"canonicalReference": "@valiantys/atlassian-app!~
|
|
1231
|
+
"text": "AdfDoc",
|
|
1232
|
+
"canonicalReference": "@valiantys/atlassian-app!~AdfDoc:interface"
|
|
1233
1233
|
},
|
|
1234
1234
|
{
|
|
1235
1235
|
"kind": "Content",
|
|
@@ -1459,8 +1459,8 @@
|
|
|
1459
1459
|
},
|
|
1460
1460
|
{
|
|
1461
1461
|
"kind": "Reference",
|
|
1462
|
-
"text": "
|
|
1463
|
-
"canonicalReference": "@valiantys/atlassian-app!~
|
|
1462
|
+
"text": "AdfDoc",
|
|
1463
|
+
"canonicalReference": "@valiantys/atlassian-app!~AdfDoc:interface"
|
|
1464
1464
|
},
|
|
1465
1465
|
{
|
|
1466
1466
|
"kind": "Content",
|
|
@@ -9,7 +9,7 @@ export class JiraIssueService {
|
|
|
9
9
|
// Warning: (ae-forgotten-export) The symbol "AtlassianProductFetchService" needs to be exported by the entry point data-access-issue.d.ts
|
|
10
10
|
constructor(fetchSvc: AtlassianProductFetchService<'jira'>);
|
|
11
11
|
// (undocumented)
|
|
12
|
-
addIssueComment(issueIdOrKey: string, body:
|
|
12
|
+
addIssueComment(issueIdOrKey: string, body: AdfDoc): Promise<IssueComment>;
|
|
13
13
|
// Warning: (ae-forgotten-export) The symbol "WorklogCreateRequest" needs to be exported by the entry point data-access-issue.d.ts
|
|
14
14
|
// Warning: (ae-forgotten-export) The symbol "Worklog" needs to be exported by the entry point data-access-issue.d.ts
|
|
15
15
|
//
|
|
@@ -68,10 +68,10 @@ export class JiraIssueService {
|
|
|
68
68
|
startAt?: number;
|
|
69
69
|
projectId?: string[];
|
|
70
70
|
}): Promise<PagedResponseWithNextLink<IssueTypeSchemeForProjects>>;
|
|
71
|
-
// Warning: (ae-forgotten-export) The symbol "
|
|
71
|
+
// Warning: (ae-forgotten-export) The symbol "AdfDoc" needs to be exported by the entry point data-access-issue.d.ts
|
|
72
72
|
//
|
|
73
73
|
// (undocumented)
|
|
74
|
-
issueSearch(jql: string, fields: string[], maxResults?: number): Promise<Issue<
|
|
74
|
+
issueSearch(jql: string, fields: string[], maxResults?: number): Promise<Issue<AdfDoc>[]>;
|
|
75
75
|
// (undocumented)
|
|
76
76
|
issueSearchByPage(jql: string, fields: string[], nextPageToken?: string, maxResults?: number): Promise<{
|
|
77
77
|
issues: Issue[];
|
|
@@ -80,7 +80,7 @@ export class JiraIssueService {
|
|
|
80
80
|
// (undocumented)
|
|
81
81
|
static readonly issueUrl = "/rest/api/3/issue";
|
|
82
82
|
// (undocumented)
|
|
83
|
-
queryForIssuesInProjects(projectIdsOrKeys: string[]): Promise<Issue<
|
|
83
|
+
queryForIssuesInProjects(projectIdsOrKeys: string[]): Promise<Issue<AdfDoc>[]>;
|
|
84
84
|
// Warning: (ae-forgotten-export) The symbol "TransitionIssueRequest" needs to be exported by the entry point data-access-issue.d.ts
|
|
85
85
|
//
|
|
86
86
|
// (undocumented)
|
|
@@ -1,21 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
declare interface AtlassianDocumentFormat {
|
|
1
|
+
/** Root document node */
|
|
2
|
+
declare interface AdfDoc {
|
|
4
3
|
type: 'doc';
|
|
5
|
-
version:
|
|
6
|
-
content:
|
|
4
|
+
version: 1;
|
|
5
|
+
content: AdfNode[];
|
|
7
6
|
}
|
|
8
7
|
|
|
9
|
-
|
|
8
|
+
/**
|
|
9
|
+
* TypeScript types for Atlassian Document Format (ADF)
|
|
10
|
+
* Conforms to https://unpkg.com/@atlaskit/adf-schema@52.4.0/dist/json-schema/v1/full.json
|
|
11
|
+
*/
|
|
12
|
+
declare interface AdfMark {
|
|
10
13
|
type: string;
|
|
11
|
-
|
|
14
|
+
attrs?: Record<string, unknown>;
|
|
12
15
|
}
|
|
13
16
|
|
|
14
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Base for all ADF nodes. `content` is optional because many block nodes
|
|
19
|
+
* (paragraph, heading, codeBlock, etc.) define it as optional in the schema.
|
|
20
|
+
* `text` is only populated on text nodes. `attrs` is present on most non-text
|
|
21
|
+
* nodes. `marks` is present on nodes that support formatting.
|
|
22
|
+
*/
|
|
23
|
+
declare interface AdfNode {
|
|
15
24
|
type: string;
|
|
25
|
+
text?: string;
|
|
26
|
+
attrs?: AdfNodeAttrs;
|
|
27
|
+
content?: AdfNode[];
|
|
28
|
+
marks?: AdfMark[];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Attrs common across node types. Many inline node types (emoji, mention,
|
|
33
|
+
* status, placeholder, hardBreak, inlineExtension, extension, bodiedExtension)
|
|
34
|
+
* store their display text in `attrs.text`.
|
|
35
|
+
*/
|
|
36
|
+
declare interface AdfNodeAttrs {
|
|
37
|
+
text?: string;
|
|
38
|
+
localId?: string;
|
|
39
|
+
[key: string]: unknown;
|
|
16
40
|
}
|
|
17
41
|
|
|
18
|
-
declare type
|
|
42
|
+
declare type APIResponse = Pick<Response, 'json' | 'text' | 'ok' | 'status' | 'statusText' | 'headers'>;
|
|
19
43
|
|
|
20
44
|
declare interface AtlassianProductFetchService<P extends Product> {
|
|
21
45
|
productType: P;
|
|
@@ -49,7 +73,7 @@ declare interface CreatedIssue {
|
|
|
49
73
|
}
|
|
50
74
|
|
|
51
75
|
declare interface CreateIssue {
|
|
52
|
-
fields: IssueFields<
|
|
76
|
+
fields: IssueFields<AdfDoc | string>;
|
|
53
77
|
properties?: {
|
|
54
78
|
key: string;
|
|
55
79
|
value: unknown;
|
|
@@ -115,7 +139,7 @@ declare interface HistoryMetadataParticipant {
|
|
|
115
139
|
url: string;
|
|
116
140
|
}
|
|
117
141
|
|
|
118
|
-
declare interface Issue<T =
|
|
142
|
+
declare interface Issue<T = AdfDoc> {
|
|
119
143
|
id: string;
|
|
120
144
|
expand?: string;
|
|
121
145
|
key: string;
|
|
@@ -126,7 +150,7 @@ declare interface Issue<T = AtlassianDocumentFormat> {
|
|
|
126
150
|
|
|
127
151
|
declare type IssueComment = {
|
|
128
152
|
author: User;
|
|
129
|
-
body:
|
|
153
|
+
body: AdfDoc;
|
|
130
154
|
created: string;
|
|
131
155
|
id: string;
|
|
132
156
|
self: string;
|
|
@@ -135,7 +159,7 @@ declare type IssueComment = {
|
|
|
135
159
|
visibility: Visibility;
|
|
136
160
|
};
|
|
137
161
|
|
|
138
|
-
declare type IssueFields<T =
|
|
162
|
+
declare type IssueFields<T = AdfDoc> = CustomFields & StaticIssueFields<T>;
|
|
139
163
|
|
|
140
164
|
declare interface IssueLink {
|
|
141
165
|
id: string;
|
|
@@ -161,7 +185,7 @@ declare interface IssueLinkRequest {
|
|
|
161
185
|
key?: string;
|
|
162
186
|
};
|
|
163
187
|
comment?: {
|
|
164
|
-
body:
|
|
188
|
+
body: AdfDoc;
|
|
165
189
|
};
|
|
166
190
|
type: {
|
|
167
191
|
id?: string;
|
|
@@ -237,18 +261,18 @@ export declare class JiraIssueService {
|
|
|
237
261
|
getIssueFields(issueIdOrKey: string, fields: string[]): Promise<IssueFields | undefined>;
|
|
238
262
|
getIssue(issueIdOrKey: string, fields?: string[], rendered?: boolean): Promise<Issue | undefined>;
|
|
239
263
|
getBulkIssues(issueIdsOrKeys: string[], fields?: string[]): Promise<Issue[]>;
|
|
240
|
-
issueSearch(jql: string, fields: string[], maxResults?: number): Promise<Issue<
|
|
264
|
+
issueSearch(jql: string, fields: string[], maxResults?: number): Promise<Issue<AdfDoc>[]>;
|
|
241
265
|
issueSearchByPage(jql: string, fields: string[], nextPageToken?: string, maxResults?: number): Promise<{
|
|
242
266
|
issues: Issue[];
|
|
243
267
|
nextPageToken?: string;
|
|
244
268
|
}>;
|
|
245
269
|
addWorklog(issueIdOrKey: string, worklog: WorklogCreateRequest): Promise<Worklog>;
|
|
246
|
-
queryForIssuesInProjects(projectIdsOrKeys: string[]): Promise<Issue<
|
|
270
|
+
queryForIssuesInProjects(projectIdsOrKeys: string[]): Promise<Issue<AdfDoc>[]>;
|
|
247
271
|
createIssue(body: CreateIssue): Promise<CreatedIssue>;
|
|
248
272
|
updateIssue(issueIdOrKey: string, body: UpdateIssue): Promise<void>;
|
|
249
273
|
getIssueComments(issueIdOrKey: string, startAt?: number): Promise<JiraCommentResponse>;
|
|
250
274
|
getIssueCommentById(issueIdOrKey: string, commentId: string): Promise<IssueComment>;
|
|
251
|
-
addIssueComment(issueIdOrKey: string, body:
|
|
275
|
+
addIssueComment(issueIdOrKey: string, body: AdfDoc): Promise<IssueComment>;
|
|
252
276
|
transitionIssue(issueIdOrKey: string, body: TransitionIssueRequest): Promise<void>;
|
|
253
277
|
createIssueLink(issueLinkRequest: IssueLinkRequest): Promise<void>;
|
|
254
278
|
getIssueTypes(): Promise<IssueTypeDetails[]>;
|
|
@@ -330,7 +354,7 @@ declare interface RemoteIssueLink {
|
|
|
330
354
|
|
|
331
355
|
declare type RequestProductMethod = (url: FetchRoute, init: RequestInit) => Promise<APIResponse>;
|
|
332
356
|
|
|
333
|
-
declare interface StaticIssueFields<T =
|
|
357
|
+
declare interface StaticIssueFields<T = AdfDoc> {
|
|
334
358
|
statuscategorychangedate?: string;
|
|
335
359
|
fixVersions?: FixVersions;
|
|
336
360
|
resolution?: unknown;
|
|
@@ -399,7 +423,7 @@ declare interface TransitionIssueRequest {
|
|
|
399
423
|
}
|
|
400
424
|
|
|
401
425
|
declare interface UpdateIssue {
|
|
402
|
-
fields?: IssueFields<
|
|
426
|
+
fields?: IssueFields<AdfDoc | string>;
|
|
403
427
|
properties?: {
|
|
404
428
|
key: string;
|
|
405
429
|
value: unknown;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@valiantys/atlassian-app",
|
|
3
|
-
"version": "3.2.0-alpha-
|
|
3
|
+
"version": "3.2.0-alpha-10",
|
|
4
4
|
"description": "This library provides Atlassian Forge components, wrappers, and utilities to support writing Forge apps that can run deployed or in standalone mode",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./frontend-app": {
|
|
@@ -198,6 +198,11 @@
|
|
|
198
198
|
"require": "./util-jira-v3-api/index.cjs.js",
|
|
199
199
|
"types": "./util-jira-v3-api/index.d.ts"
|
|
200
200
|
},
|
|
201
|
+
"./util-adf": {
|
|
202
|
+
"import": "./util-adf/index.es.js",
|
|
203
|
+
"require": "./util-adf/index.cjs.js",
|
|
204
|
+
"types": "./util-adf/index.d.ts"
|
|
205
|
+
},
|
|
201
206
|
"./backend-async-queue": {
|
|
202
207
|
"import": "./backend-async-queue/index.es.js",
|
|
203
208
|
"require": "./backend-async-queue/index.cjs.js",
|