@valiantys/atlassian-app-frontend 3.0.0-alpha-17 → 3.0.0-alpha-19
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/data-access-project/src/lib/jira-project-service/index.cjs.js +1 -0
- package/atlassian/jira/shared/data-access-project/src/lib/jira-project-service/index.es.js +72 -0
- package/atlassian/shared/frontend-ui-atlaskit-forms/src/lib/option/index.cjs.js +1 -0
- package/atlassian/shared/frontend-ui-atlaskit-forms/src/lib/option/index.es.js +8 -0
- package/data-access-project/atlassian-app-frontend-data-access-project.api.json +794 -0
- package/data-access-project/atlassian-app-frontend.api.md +39 -0
- package/data-access-project/index.cjs.js +1 -0
- package/data-access-project/index.d.ts +110 -0
- package/data-access-project/index.es.js +4 -0
- package/data-access-project/tsdoc-metadata.json +11 -0
- package/package.json +11 -1
- package/ui-atlaskit-forms/atlassian-app-frontend-ui-atlaskit-forms.api.json +341 -0
- package/ui-atlaskit-forms/atlassian-app-frontend.api.md +19 -0
- package/ui-atlaskit-forms/index.cjs.js +1 -0
- package/ui-atlaskit-forms/index.d.ts +48 -0
- package/ui-atlaskit-forms/index.es.js +4 -0
- package/ui-atlaskit-forms/tsdoc-metadata.json +11 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../../../../../../shared/util-fetch/src/lib/shared-util-fetch/index.cjs.js"),s=class s{constructor(t){this.fetchSvc=t}getVersions(t){return this.fetchSvc.fetch({method:"GET",url:this.fetchSvc.route`/rest/api/3/project/${t}/versions`})}getProject(t){return this.fetchSvc.fetch({method:"GET",url:this.fetchSvc.route`/rest/api/3/project/${t}`})}async getAllProjects(){return await this.fetchSvc.fetch({method:"GET",url:this.fetchSvc.route`/rest/api/3/project`})||[]}async projectSearchByIds(t){var e;if(t.length>50)throw new Error("Too many project ids, max allowed is 50.");const r=this.fetchSvc.route`/rest/api/3/project/search?${t.map(h=>"id="+h).join("&")}`;return(e=await this.fetchSvc.fetch({method:"GET",url:r}))==null?void 0:e.values}async getProjectIssueTypes(t){return await this.fetchSvc.fetch({method:"GET",url:this.fetchSvc.route`/rest/api/3/issuetype/project?projectId=${t}`})||[]}getProjectStatuses(t){return this.fetchSvc.fetch({method:"GET",url:this.fetchSvc.route`/rest/api/3/project/${t}/statuses`})}async getProjectProperty(t,r){try{return(await this.fetchSvc.fetch({method:"GET",url:this.fetchSvc.route`/rest/api/3/project/${t}/properties/${r}`})).value}catch(e){if(e instanceof o.FetchError&&e.statusCode===404)return;throw e}}setProjectProperty(t,r,e){return this.fetchSvc.fetch({method:"PUT",url:this.fetchSvc.route`/rest/api/3/project/${t}/properties/${r}`},e)}};s.projectUrl="/rest/api/3/project";let c=s;exports.JiraProjectService=c;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { FetchError as o } from "../../../../../../../shared/util-fetch/src/lib/shared-util-fetch/index.es.js";
|
|
2
|
+
const c = class c {
|
|
3
|
+
constructor(t) {
|
|
4
|
+
this.fetchSvc = t;
|
|
5
|
+
}
|
|
6
|
+
getVersions(t) {
|
|
7
|
+
return this.fetchSvc.fetch({
|
|
8
|
+
method: "GET",
|
|
9
|
+
url: this.fetchSvc.route`/rest/api/3/project/${t}/versions`
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
getProject(t) {
|
|
13
|
+
return this.fetchSvc.fetch({
|
|
14
|
+
method: "GET",
|
|
15
|
+
url: this.fetchSvc.route`/rest/api/3/project/${t}`
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
async getAllProjects() {
|
|
19
|
+
return await this.fetchSvc.fetch({
|
|
20
|
+
method: "GET",
|
|
21
|
+
url: this.fetchSvc.route`/rest/api/3/project`
|
|
22
|
+
}) || [];
|
|
23
|
+
}
|
|
24
|
+
async projectSearchByIds(t) {
|
|
25
|
+
var e;
|
|
26
|
+
if (t.length > 50)
|
|
27
|
+
throw new Error("Too many project ids, max allowed is 50.");
|
|
28
|
+
const r = this.fetchSvc.route`/rest/api/3/project/search?${t.map((h) => "id=" + h).join("&")}`;
|
|
29
|
+
return (e = await this.fetchSvc.fetch({
|
|
30
|
+
method: "GET",
|
|
31
|
+
url: r
|
|
32
|
+
})) == null ? void 0 : e.values;
|
|
33
|
+
}
|
|
34
|
+
async getProjectIssueTypes(t) {
|
|
35
|
+
return await this.fetchSvc.fetch({
|
|
36
|
+
method: "GET",
|
|
37
|
+
url: this.fetchSvc.route`/rest/api/3/issuetype/project?projectId=${t}`
|
|
38
|
+
}) || [];
|
|
39
|
+
}
|
|
40
|
+
getProjectStatuses(t) {
|
|
41
|
+
return this.fetchSvc.fetch({
|
|
42
|
+
method: "GET",
|
|
43
|
+
url: this.fetchSvc.route`/rest/api/3/project/${t}/statuses`
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
async getProjectProperty(t, r) {
|
|
47
|
+
try {
|
|
48
|
+
return (await this.fetchSvc.fetch({
|
|
49
|
+
method: "GET",
|
|
50
|
+
url: this.fetchSvc.route`/rest/api/3/project/${t}/properties/${r}`
|
|
51
|
+
})).value;
|
|
52
|
+
} catch (e) {
|
|
53
|
+
if (e instanceof o && e.statusCode === 404)
|
|
54
|
+
return;
|
|
55
|
+
throw e;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
setProjectProperty(t, r, e) {
|
|
59
|
+
return this.fetchSvc.fetch(
|
|
60
|
+
{
|
|
61
|
+
method: "PUT",
|
|
62
|
+
url: this.fetchSvc.route`/rest/api/3/project/${t}/properties/${r}`
|
|
63
|
+
},
|
|
64
|
+
e
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
c.projectUrl = "/rest/api/3/project";
|
|
69
|
+
let s = c;
|
|
70
|
+
export {
|
|
71
|
+
s as JiraProjectService
|
|
72
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function d(l,t,i,o=(e,n)=>e===n){console.log(l,t);let e;return t?(e=l.find(n=>o(n.value,t)),e||(console.log("setting undefined"),i(void 0))):l.length===1&&(e=l[0],console.log("setting ",e.value),i(e.value)),e||null}exports.getSelectedOption=d;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
function d(l, n, o, t = (e, i) => e === i) {
|
|
2
|
+
console.log(l, n);
|
|
3
|
+
let e;
|
|
4
|
+
return n ? (e = l.find((i) => t(i.value, n)), e || (console.log("setting undefined"), o(void 0))) : l.length === 1 && (e = l[0], console.log("setting ", e.value), o(e.value)), e || null;
|
|
5
|
+
}
|
|
6
|
+
export {
|
|
7
|
+
d as getSelectedOption
|
|
8
|
+
};
|