@valiantys/atlassian-app-frontend 3.0.0-alpha-11 → 3.0.0-alpha-18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/atlassian/jira/shared/data-access-issue/src/lib/jira-issue-service/index.cjs.js +1 -1
  2. package/atlassian/jira/shared/data-access-issue/src/lib/jira-issue-service/index.es.js +22 -11
  3. package/atlassian/jira/shared/data-access-project/src/lib/jira-project-service/index.cjs.js +1 -0
  4. package/atlassian/jira/shared/data-access-project/src/lib/jira-project-service/index.es.js +72 -0
  5. package/atlassian/shared/data-access-atlassian-product-fetch-oauth/src/lib/atlassian-oauth-fetch/index.cjs.js +1 -1
  6. package/atlassian/shared/data-access-atlassian-product-fetch-oauth/src/lib/atlassian-oauth-fetch/index.es.js +50 -26
  7. package/atlassian-app-test/index.d.ts +1 -1
  8. package/data-access-assets/index.d.ts +1 -1
  9. package/data-access-atlassian-product-fetch-oauth/atlassian-app-frontend-data-access-atlassian-product-fetch-oauth.api.json +113 -0
  10. package/data-access-atlassian-product-fetch-oauth/atlassian-app-frontend.api.md +3 -0
  11. package/data-access-atlassian-product-fetch-oauth/index.cjs.js +1 -1
  12. package/data-access-atlassian-product-fetch-oauth/index.d.ts +3 -1
  13. package/data-access-atlassian-product-fetch-oauth/index.es.js +4 -3
  14. package/data-access-issue/atlassian-app-frontend-data-access-issue.api.json +110 -0
  15. package/data-access-issue/atlassian-app-frontend.api.md +5 -0
  16. package/data-access-issue/index.d.ts +13 -6
  17. package/data-access-jql/index.d.ts +1 -1
  18. package/data-access-project/atlassian-app-frontend-data-access-project.api.json +794 -0
  19. package/data-access-project/atlassian-app-frontend.api.md +39 -0
  20. package/data-access-project/index.cjs.js +1 -0
  21. package/data-access-project/index.d.ts +110 -0
  22. package/data-access-project/index.es.js +4 -0
  23. package/data-access-project/tsdoc-metadata.json +11 -0
  24. package/data-access-workspaces/index.d.ts +1 -1
  25. package/package.json +6 -1
  26. package/ui-atlassian-product-fetch/index.d.ts +1 -1
  27. package/util-atlassian-product-fetch/atlassian-app-frontend-util-atlassian-product-fetch.api.json +9 -18
  28. package/util-atlassian-product-fetch/atlassian-app-frontend.api.md +4 -4
  29. package/util-atlassian-product-fetch/index.d.ts +4 -4
  30. package/util-jira-v3-api/atlassian-app-frontend-util-jira-v3-api.api.json +300 -2
  31. package/util-jira-v3-api/atlassian-app-frontend.api.md +24 -5
  32. package/util-jira-v3-api/index.d.ts +13 -5
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=class r{constructor(e){this.fetchSvc=e}async updateProperty(e,t,s){return this.fetchSvc.fetch({method:"PUT",url:this.fetchSvc.route`/rest/api/3/issue/${e}/properties/${t}`},s)}async updateField(e,t,s){await this.updateFields(e,{[t]:s})}async updateFields(e,t){await this.updateIssue(e,{fields:t})}async getIssueField(e,t){var s;return(s=await this.getIssueFields(e,[t]))==null?void 0:s[t]}async getIssueFields(e,t){return(await this.fetchSvc.fetch({method:"GET",url:this.fetchSvc.route`/rest/api/3/issue/${e}?fields=${t.join(",")}`})).fields}async getIssue(e,t=["*all"],s=!1){return this.fetchSvc.fetch({method:"GET",url:this.fetchSvc.route`/rest/api/3/issue/${e}?fields=${t.join(",")}&expand=${s?"renderedFields":""}`})}async issueSearch(e,t,s=50){let c;const h=[];do{const u=await this.fetchSvc.fetch({method:"GET",url:this.fetchSvc.route`/rest/api/3/search/jql?jql=${e}&fields=${t.join(",")}&maxResults=${s}&${c?"nextPageToken="+c:""}`});h.push(...u.issues),c=u.nextPageToken}while(c!==void 0);return h}async addWorklog(e,t){return this.fetchSvc.fetch({method:"POST",url:this.fetchSvc.route`/rest/api/3/issue/${e}/worklog`},t)}async queryForIssuesInProjects(e){const t=`project IN (${e.join(",")})`;return this.issueSearch(t,["key"],5e3)}async createIssue(e){return this.fetchSvc.fetch({method:"POST",url:this.fetchSvc.route`/rest/api/3/issue`},e)}async updateIssue(e,t){return this.fetchSvc.fetch({method:"PUT",url:this.fetchSvc.route`/rest/api/3/issue/${e}`},t)}async getIssueComments(e,t=0){const s=t?`?startAt=${t}`:"";return this.fetchSvc.fetch({method:"GET",url:this.fetchSvc.route`/rest/api/3/issue/${e}/comment${s}`})}async getIssueCommentById(e,t){return this.fetchSvc.fetch({method:"GET",url:this.fetchSvc.route`/rest/api/3/issue/${e}/comment/${t}`})}async addIssueComment(e,t){return this.fetchSvc.fetch({method:"POST",url:this.fetchSvc.route`/rest/api/3/issue/${e}/comment`},{body:t})}async transitionIssue(e,t){return this.fetchSvc.fetch({method:"POST",url:this.fetchSvc.route`/rest/api/3/issue/${e}/transitions`},t)}async createIssueLink(e){return this.fetchSvc.fetch({method:"POST",url:this.fetchSvc.route`/rest/api/3/issueLink`},e)}};r.issueUrl="/rest/api/3/issue";let i=r;exports.JiraIssueService=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=class i{constructor(e){this.fetchSvc=e}async updateProperty(e,t,s){return this.fetchSvc.fetch({method:"PUT",url:this.fetchSvc.route`/rest/api/3/issue/${e}/properties/${t}`},s)}async updateField(e,t,s){await this.updateFields(e,{[t]:s})}async updateFields(e,t){await this.updateIssue(e,{fields:t})}async getIssueField(e,t){var s;return(s=await this.getIssueFields(e,[t]))==null?void 0:s[t]}async getIssueFields(e,t){return(await this.fetchSvc.fetch({method:"GET",url:this.fetchSvc.route`/rest/api/3/issue/${e}?fields=${t.join(",")}`})).fields}async getIssue(e,t=["*all"],s=!1){return this.fetchSvc.fetch({method:"GET",url:this.fetchSvc.route`/rest/api/3/issue/${e}?fields=${t.join(",")}&expand=${s?"renderedFields":""}`})}async issueSearch(e,t,s=50){let c;const h=[];do{const u=await this.issueSearchByPage(e,t,c,s);h.push(...u.issues),c=u.nextPageToken}while(c!==void 0);return h}async issueSearchByPage(e,t,s,c=50){return this.fetchSvc.fetch({method:"POST",url:this.fetchSvc.route`/rest/api/3/search/jql`},{fields:t,jql:e,maxResults:c,nextPageToken:s})}async addWorklog(e,t){return this.fetchSvc.fetch({method:"POST",url:this.fetchSvc.route`/rest/api/3/issue/${e}/worklog`},t)}async queryForIssuesInProjects(e){const t=`project IN (${e.join(",")})`;return this.issueSearch(t,["key","project"],5e3)}async createIssue(e){return this.fetchSvc.fetch({method:"POST",url:this.fetchSvc.route`/rest/api/3/issue`},e)}async updateIssue(e,t){return this.fetchSvc.fetch({method:"PUT",url:this.fetchSvc.route`/rest/api/3/issue/${e}`},t)}async getIssueComments(e,t=0){const s=t?`?startAt=${t}`:"";return this.fetchSvc.fetch({method:"GET",url:this.fetchSvc.route`/rest/api/3/issue/${e}/comment${s}`})}async getIssueCommentById(e,t){return this.fetchSvc.fetch({method:"GET",url:this.fetchSvc.route`/rest/api/3/issue/${e}/comment/${t}`})}async addIssueComment(e,t){return this.fetchSvc.fetch({method:"POST",url:this.fetchSvc.route`/rest/api/3/issue/${e}/comment`},{body:t})}async transitionIssue(e,t){return this.fetchSvc.fetch({method:"POST",url:this.fetchSvc.route`/rest/api/3/issue/${e}/transitions`},t)}async createIssueLink(e){return this.fetchSvc.fetch({method:"POST",url:this.fetchSvc.route`/rest/api/3/issueLink`},e)}};i.issueUrl="/rest/api/3/issue";let r=i;exports.JiraIssueService=r;
@@ -1,4 +1,4 @@
1
- const i = class i {
1
+ const r = class r {
2
2
  constructor(e) {
3
3
  this.fetchSvc = e;
4
4
  }
@@ -35,15 +35,26 @@ const i = class i {
35
35
  }
36
36
  async issueSearch(e, t, s = 50) {
37
37
  let c;
38
- const r = [];
38
+ const h = [];
39
39
  do {
40
- const h = await this.fetchSvc.fetch({
41
- method: "GET",
42
- url: this.fetchSvc.route`/rest/api/3/search/jql?jql=${e}&fields=${t.join(",")}&maxResults=${s}&${c ? "nextPageToken=" + c : ""}`
43
- });
44
- r.push(...h.issues), c = h.nextPageToken;
40
+ const i = await this.issueSearchByPage(e, t, c, s);
41
+ h.push(...i.issues), c = i.nextPageToken;
45
42
  } while (c !== void 0);
46
- return r;
43
+ return h;
44
+ }
45
+ async issueSearchByPage(e, t, s, c = 50) {
46
+ return this.fetchSvc.fetch(
47
+ {
48
+ method: "POST",
49
+ url: this.fetchSvc.route`/rest/api/3/search/jql`
50
+ },
51
+ {
52
+ fields: t,
53
+ jql: e,
54
+ maxResults: c,
55
+ nextPageToken: s
56
+ }
57
+ );
47
58
  }
48
59
  async addWorklog(e, t) {
49
60
  return this.fetchSvc.fetch(
@@ -56,7 +67,7 @@ const i = class i {
56
67
  }
57
68
  async queryForIssuesInProjects(e) {
58
69
  const t = `project IN (${e.join(",")})`;
59
- return this.issueSearch(t, ["key"], 5e3);
70
+ return this.issueSearch(t, ["key", "project"], 5e3);
60
71
  }
61
72
  async createIssue(e) {
62
73
  return this.fetchSvc.fetch(
@@ -118,8 +129,8 @@ const i = class i {
118
129
  );
119
130
  }
120
131
  };
121
- i.issueUrl = "/rest/api/3/issue";
122
- let u = i;
132
+ r.issueUrl = "/rest/api/3/issue";
133
+ let u = r;
123
134
  export {
124
135
  u as JiraIssueService
125
136
  };
@@ -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
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../../../../../../shared/util-fetch/src/lib/shared-util-fetch/index.cjs.js"),c=require("../route/index.cjs.js");function u(t,e){if(e){const n=t.startsWith("/")?t.slice(1):t;return`${e}/${n}`}else return t}function i(t,e,n){return{productType:n,fetch:({url:a,method:r,responseType:h="json",allowExperimental:o=!1},l)=>s.bearerAuthFetch(t,u(a.value,e),r,l,h,{"X-ExperimentalApi":o?"opt-in":""}),route:c.route,rawFetch:(a,r)=>s.bearerAuthFetchRaw(t,u(a.value,e),r),fullUrl:a=>u(a,e)}}function f(t,e){return i(t,`https://api.atlassian.com/ex/jira/${e}`,"jira")}function p(t){return{productType:"jira",fetch:(e,n)=>{const a={request:e,body:n};return s.jsonFetch(t,"POST",void 0,a,"json","include")},route:c.routeNoEscaping,rawFetch:(e,n)=>{throw new Error("Not implemented")},fullUrl:e=>t}}function A(t,e){return i(t,`https://api.atlassian.com/ex/confluence/${e}`,"confluence")}function F(t){return i(t,"https://api.bitbucket.org","bitbucket")}async function O(t){return s.bearerAuthFetch(t,"https://api.atlassian.com/me","GET")}async function b(t,e,n,a,r){return s.jsonFetch("https://auth.atlassian.com/oauth/token","POST",void 0,{grant_type:t,client_id:e,client_secret:n,code:a,redirect_uri:r})}exports.atlassianOAuthBitbucketFetch=F;exports.atlassianOAuthConfluenceFetch=A;exports.atlassianOAuthJiraFetch=f;exports.atlassianOAuthJiraFetchViaProxy=p;exports.atlassianOAuthRawFetch=i;exports.getAtlassianOAuthToken=b;exports.getAtlassianUserDetails=O;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../../../../../../shared/util-fetch/src/lib/shared-util-fetch/index.cjs.js"),F=require("../../../../util-error/src/index/index.cjs.js"),u=require("../route/index.cjs.js");function c(t,e){if(e){const a=t.startsWith("/")?t.slice(1):t;return`${e}/${a}`}else return t}function i(t,e,a){return{productType:a,fetch:({url:n,method:r,responseType:f="json",allowExperimental:A=!1},p)=>s.bearerAuthFetch(t,c(n.value,e),r,p,f,{"X-ExperimentalApi":A?"opt-in":""}),route:u.route,rawFetch:(n,r)=>s.bearerAuthFetchRaw(t,c(n.value,e),r),fullUrl:n=>c(n,e)}}function h(t,e){return i(t,`https://api.atlassian.com/ex/jira/${e}`,"jira")}function O(t){return{productType:"jira",fetch:(e,a)=>{const n={request:e,body:a};return s.jsonFetch(t,"POST",void 0,n,"json","include")},route:u.routeNoEscaping,rawFetch:(e,a)=>{throw new Error("Not implemented")},fullUrl:e=>t}}function o(t,e){return i(t,`https://api.atlassian.com/ex/confluence/${e}`,"confluence")}function l(t){return i(t,"https://api.bitbucket.org","bitbucket")}async function b(t){return s.bearerAuthFetch(t,"https://api.atlassian.com/me","GET")}async function g(t,e,a,n,r){return s.jsonFetch("https://auth.atlassian.com/oauth/token","POST",void 0,{grant_type:t,client_id:e,client_secret:a,code:n,redirect_uri:r})}async function d(t,e,a){if(a)switch(t){case"confluence":return o(e,a);case"bitbucket":return l(e);case"jira":default:return h(e,a)}else throw new F.AtlassianBadRequest("resource-id header is missing")}exports.atlassianOAuthBitbucketFetch=l;exports.atlassianOAuthConfluenceFetch=o;exports.atlassianOAuthJiraFetch=h;exports.atlassianOAuthJiraFetchViaProxy=O;exports.atlassianOAuthRawFetch=i;exports.getAtlassianOAuthToken=g;exports.getAtlassianUserDetails=b;exports.getFetch=d;
@@ -1,5 +1,6 @@
1
- import { bearerAuthFetchRaw as p, bearerAuthFetch as u, jsonFetch as c } from "../../../../../../shared/util-fetch/src/lib/shared-util-fetch/index.es.js";
2
- import { route as f, routeNoEscaping as A } from "../route/index.es.js";
1
+ import { bearerAuthFetchRaw as f, bearerAuthFetch as c, jsonFetch as u } from "../../../../../../shared/util-fetch/src/lib/shared-util-fetch/index.es.js";
2
+ import { AtlassianBadRequest as p } from "../../../../util-error/src/index/index.es.js";
3
+ import { route as m, routeNoEscaping as A } from "../route/index.es.js";
3
4
  function i(t, e) {
4
5
  if (e) {
5
6
  const n = t.startsWith("/") ? t.slice(1) : t;
@@ -10,36 +11,36 @@ function i(t, e) {
10
11
  function s(t, e, n) {
11
12
  return {
12
13
  productType: n,
13
- fetch: ({ url: a, method: r, responseType: o = "json", allowExperimental: h = !1 }, l) => u(
14
+ fetch: ({ url: r, method: a, responseType: o = "json", allowExperimental: h = !1 }, l) => c(
14
15
  t,
15
- i(a.value, e),
16
- r,
16
+ i(r.value, e),
17
+ a,
17
18
  l,
18
19
  o,
19
20
  {
20
21
  "X-ExperimentalApi": h ? "opt-in" : ""
21
22
  }
22
23
  ),
23
- route: f,
24
- rawFetch: (a, r) => p(
24
+ route: m,
25
+ rawFetch: (r, a) => f(
25
26
  t,
26
- i(a.value, e),
27
- r
27
+ i(r.value, e),
28
+ a
28
29
  ),
29
- fullUrl: (a) => i(a, e)
30
+ fullUrl: (r) => i(r, e)
30
31
  };
31
32
  }
32
- function O(t, e) {
33
+ function F(t, e) {
33
34
  return s(
34
35
  t,
35
36
  `https://api.atlassian.com/ex/jira/${e}`,
36
37
  "jira"
37
38
  );
38
39
  }
39
- function b(t) {
40
+ function j(t) {
40
41
  return {
41
42
  productType: "jira",
42
- fetch: (e, n) => c(
43
+ fetch: (e, n) => u(
43
44
  t,
44
45
  "POST",
45
46
  void 0,
@@ -57,29 +58,29 @@ function b(t) {
57
58
  fullUrl: (e) => t
58
59
  };
59
60
  }
60
- function y(t, e) {
61
+ function b(t, e) {
61
62
  return s(
62
63
  t,
63
64
  `https://api.atlassian.com/ex/confluence/${e}`,
64
65
  "confluence"
65
66
  );
66
67
  }
67
- function j(t) {
68
+ function w(t) {
68
69
  return s(
69
70
  t,
70
71
  "https://api.bitbucket.org",
71
72
  "bitbucket"
72
73
  );
73
74
  }
74
- async function w(t) {
75
- return u(
75
+ async function g(t) {
76
+ return c(
76
77
  t,
77
78
  "https://api.atlassian.com/me",
78
79
  "GET"
79
80
  );
80
81
  }
81
- async function x(t, e, n, a, r) {
82
- return c(
82
+ async function x(t, e, n, r, a) {
83
+ return u(
83
84
  "https://auth.atlassian.com/oauth/token",
84
85
  "POST",
85
86
  void 0,
@@ -87,17 +88,40 @@ async function x(t, e, n, a, r) {
87
88
  grant_type: t,
88
89
  client_id: e,
89
90
  client_secret: n,
90
- code: a,
91
- redirect_uri: r
91
+ code: r,
92
+ redirect_uri: a
92
93
  }
93
94
  );
94
95
  }
96
+ async function v(t, e, n) {
97
+ if (n)
98
+ switch (t) {
99
+ case "confluence":
100
+ return b(
101
+ e,
102
+ n
103
+ );
104
+ case "bitbucket":
105
+ return w(
106
+ e
107
+ );
108
+ case "jira":
109
+ default:
110
+ return F(
111
+ e,
112
+ n
113
+ );
114
+ }
115
+ else
116
+ throw new p("resource-id header is missing");
117
+ }
95
118
  export {
96
- j as atlassianOAuthBitbucketFetch,
97
- y as atlassianOAuthConfluenceFetch,
98
- O as atlassianOAuthJiraFetch,
99
- b as atlassianOAuthJiraFetchViaProxy,
119
+ w as atlassianOAuthBitbucketFetch,
120
+ b as atlassianOAuthConfluenceFetch,
121
+ F as atlassianOAuthJiraFetch,
122
+ j as atlassianOAuthJiraFetchViaProxy,
100
123
  s as atlassianOAuthRawFetch,
101
124
  x as getAtlassianOAuthToken,
102
- w as getAtlassianUserDetails
125
+ g as getAtlassianUserDetails,
126
+ v as getFetch
103
127
  };
@@ -39,7 +39,7 @@ declare type FetchRoute = {
39
39
  readonly value: string;
40
40
  };
41
41
 
42
- declare type FetchSignature = <T>(request: FetchRequest, body?: Record<string, any>) => Promise<T>;
42
+ declare type FetchSignature = <T>(request: FetchRequest, body?: any) => Promise<T>;
43
43
 
44
44
  declare interface HostRouter {
45
45
  navigate(url: string): Promise<void>;
@@ -225,7 +225,7 @@ declare type FetchRoute = {
225
225
  readonly value: string;
226
226
  };
227
227
 
228
- declare type FetchSignature = <T>(request: FetchRequest, body?: Record<string, any>) => Promise<T>;
228
+ declare type FetchSignature = <T>(request: FetchRequest, body?: any) => Promise<T>;
229
229
 
230
230
  export declare function getAssetLinkedIssues(fetch: AtlassianProductFetchService<'jira'>, workspaceId: string, objectId: string): Promise<ObjectConnectedTickets>;
231
231
 
@@ -789,6 +789,119 @@
789
789
  ],
790
790
  "name": "getAtlassianUserDetails"
791
791
  },
792
+ {
793
+ "kind": "Function",
794
+ "canonicalReference": "@valiantys/atlassian-app-frontend!getFetch:function(1)",
795
+ "docComment": "",
796
+ "excerptTokens": [
797
+ {
798
+ "kind": "Content",
799
+ "text": "export declare function getFetch<P extends "
800
+ },
801
+ {
802
+ "kind": "Reference",
803
+ "text": "Product",
804
+ "canonicalReference": "@valiantys/atlassian-app-frontend!~Product:type"
805
+ },
806
+ {
807
+ "kind": "Content",
808
+ "text": ">(product: "
809
+ },
810
+ {
811
+ "kind": "Content",
812
+ "text": "P"
813
+ },
814
+ {
815
+ "kind": "Content",
816
+ "text": ", authToken: "
817
+ },
818
+ {
819
+ "kind": "Content",
820
+ "text": "string"
821
+ },
822
+ {
823
+ "kind": "Content",
824
+ "text": ", resourceId?: "
825
+ },
826
+ {
827
+ "kind": "Content",
828
+ "text": "string"
829
+ },
830
+ {
831
+ "kind": "Content",
832
+ "text": "): "
833
+ },
834
+ {
835
+ "kind": "Reference",
836
+ "text": "Promise",
837
+ "canonicalReference": "!Promise:interface"
838
+ },
839
+ {
840
+ "kind": "Content",
841
+ "text": "<"
842
+ },
843
+ {
844
+ "kind": "Reference",
845
+ "text": "AtlassianProductFetchService",
846
+ "canonicalReference": "@valiantys/atlassian-app-frontend!~AtlassianProductFetchService:interface"
847
+ },
848
+ {
849
+ "kind": "Content",
850
+ "text": "<P>>"
851
+ },
852
+ {
853
+ "kind": "Content",
854
+ "text": ";"
855
+ }
856
+ ],
857
+ "fileUrlPath": "../../shared/data-access-atlassian-product-fetch-oauth/src/lib/atlassian-oauth-fetch.d.ts",
858
+ "returnTypeTokenRange": {
859
+ "startIndex": 9,
860
+ "endIndex": 13
861
+ },
862
+ "releaseTag": "Public",
863
+ "overloadIndex": 1,
864
+ "parameters": [
865
+ {
866
+ "parameterName": "product",
867
+ "parameterTypeTokenRange": {
868
+ "startIndex": 3,
869
+ "endIndex": 4
870
+ },
871
+ "isOptional": false
872
+ },
873
+ {
874
+ "parameterName": "authToken",
875
+ "parameterTypeTokenRange": {
876
+ "startIndex": 5,
877
+ "endIndex": 6
878
+ },
879
+ "isOptional": false
880
+ },
881
+ {
882
+ "parameterName": "resourceId",
883
+ "parameterTypeTokenRange": {
884
+ "startIndex": 7,
885
+ "endIndex": 8
886
+ },
887
+ "isOptional": true
888
+ }
889
+ ],
890
+ "typeParameters": [
891
+ {
892
+ "typeParameterName": "P",
893
+ "constraintTokenRange": {
894
+ "startIndex": 1,
895
+ "endIndex": 2
896
+ },
897
+ "defaultTypeTokenRange": {
898
+ "startIndex": 0,
899
+ "endIndex": 0
900
+ }
901
+ }
902
+ ],
903
+ "name": "getFetch"
904
+ },
792
905
  {
793
906
  "kind": "Interface",
794
907
  "canonicalReference": "@valiantys/atlassian-app-frontend!OAuthUser:interface",
@@ -39,6 +39,9 @@ export function getAtlassianOAuthToken(grant_type: string, client_id: string, cl
39
39
  // @public (undocumented)
40
40
  export function getAtlassianUserDetails(authToken: string): Promise<OAuthUser>;
41
41
 
42
+ // @public (undocumented)
43
+ export function getFetch<P extends Product>(product: P, authToken: string, resourceId?: string): Promise<AtlassianProductFetchService<P>>;
44
+
42
45
  // @public (undocumented)
43
46
  export interface OAuthUser {
44
47
  // (undocumented)
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../atlassian/shared/data-access-atlassian-product-fetch-oauth/src/lib/atlassian-oauth-fetch/index.cjs.js"),a=require("../atlassian/shared/data-access-atlassian-product-fetch-oauth/src/lib/route/index.cjs.js");exports.atlassianOAuthBitbucketFetch=t.atlassianOAuthBitbucketFetch;exports.atlassianOAuthConfluenceFetch=t.atlassianOAuthConfluenceFetch;exports.atlassianOAuthJiraFetch=t.atlassianOAuthJiraFetch;exports.atlassianOAuthJiraFetchViaProxy=t.atlassianOAuthJiraFetchViaProxy;exports.atlassianOAuthRawFetch=t.atlassianOAuthRawFetch;exports.getAtlassianOAuthToken=t.getAtlassianOAuthToken;exports.getAtlassianUserDetails=t.getAtlassianUserDetails;exports.route=a.route;exports.routeNoEscaping=a.routeNoEscaping;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../atlassian/shared/data-access-atlassian-product-fetch-oauth/src/lib/atlassian-oauth-fetch/index.cjs.js"),a=require("../atlassian/shared/data-access-atlassian-product-fetch-oauth/src/lib/route/index.cjs.js");exports.atlassianOAuthBitbucketFetch=t.atlassianOAuthBitbucketFetch;exports.atlassianOAuthConfluenceFetch=t.atlassianOAuthConfluenceFetch;exports.atlassianOAuthJiraFetch=t.atlassianOAuthJiraFetch;exports.atlassianOAuthJiraFetchViaProxy=t.atlassianOAuthJiraFetchViaProxy;exports.atlassianOAuthRawFetch=t.atlassianOAuthRawFetch;exports.getAtlassianOAuthToken=t.getAtlassianOAuthToken;exports.getAtlassianUserDetails=t.getAtlassianUserDetails;exports.getFetch=t.getFetch;exports.route=a.route;exports.routeNoEscaping=a.routeNoEscaping;
@@ -37,12 +37,14 @@ declare type FetchRoute = {
37
37
  readonly value: string;
38
38
  };
39
39
 
40
- declare type FetchSignature = <T>(request: FetchRequest, body?: Record<string, any>) => Promise<T>;
40
+ declare type FetchSignature = <T>(request: FetchRequest, body?: any) => Promise<T>;
41
41
 
42
42
  export declare function getAtlassianOAuthToken(grant_type: string, client_id: string, client_secret: string, code: string, redirect_uri: string): Promise<AtlassianOauthTokenResponse>;
43
43
 
44
44
  export declare function getAtlassianUserDetails(authToken: string): Promise<OAuthUser>;
45
45
 
46
+ export declare function getFetch<P extends Product>(product: P, authToken: string, resourceId?: string): Promise<AtlassianProductFetchService<P>>;
47
+
46
48
  export declare interface OAuthUser {
47
49
  account_id: string;
48
50
  account_status: string;
@@ -1,5 +1,5 @@
1
- import { atlassianOAuthBitbucketFetch as e, atlassianOAuthConfluenceFetch as s, atlassianOAuthJiraFetch as i, atlassianOAuthJiraFetchViaProxy as h, atlassianOAuthRawFetch as n, getAtlassianOAuthToken as o, getAtlassianUserDetails as r } from "../atlassian/shared/data-access-atlassian-product-fetch-oauth/src/lib/atlassian-oauth-fetch/index.es.js";
2
- import { route as l, routeNoEscaping as c } from "../atlassian/shared/data-access-atlassian-product-fetch-oauth/src/lib/route/index.es.js";
1
+ import { atlassianOAuthBitbucketFetch as e, atlassianOAuthConfluenceFetch as s, atlassianOAuthJiraFetch as i, atlassianOAuthJiraFetchViaProxy as h, atlassianOAuthRawFetch as n, getAtlassianOAuthToken as o, getAtlassianUserDetails as r, getFetch as u } from "../atlassian/shared/data-access-atlassian-product-fetch-oauth/src/lib/atlassian-oauth-fetch/index.es.js";
2
+ import { route as l, routeNoEscaping as A } from "../atlassian/shared/data-access-atlassian-product-fetch-oauth/src/lib/route/index.es.js";
3
3
  export {
4
4
  e as atlassianOAuthBitbucketFetch,
5
5
  s as atlassianOAuthConfluenceFetch,
@@ -8,6 +8,7 @@ export {
8
8
  n as atlassianOAuthRawFetch,
9
9
  o as getAtlassianOAuthToken,
10
10
  r as getAtlassianUserDetails,
11
+ u as getFetch,
11
12
  l as route,
12
- c as routeNoEscaping
13
+ A as routeNoEscaping
13
14
  };
@@ -1013,6 +1013,116 @@
1013
1013
  "isAbstract": false,
1014
1014
  "name": "issueSearch"
1015
1015
  },
1016
+ {
1017
+ "kind": "Method",
1018
+ "canonicalReference": "@valiantys/atlassian-app-frontend!JiraIssueService#issueSearchByPage:member(1)",
1019
+ "docComment": "",
1020
+ "excerptTokens": [
1021
+ {
1022
+ "kind": "Content",
1023
+ "text": "issueSearchByPage(jql: "
1024
+ },
1025
+ {
1026
+ "kind": "Content",
1027
+ "text": "string"
1028
+ },
1029
+ {
1030
+ "kind": "Content",
1031
+ "text": ", fields: "
1032
+ },
1033
+ {
1034
+ "kind": "Content",
1035
+ "text": "string[]"
1036
+ },
1037
+ {
1038
+ "kind": "Content",
1039
+ "text": ", nextPageToken?: "
1040
+ },
1041
+ {
1042
+ "kind": "Content",
1043
+ "text": "string"
1044
+ },
1045
+ {
1046
+ "kind": "Content",
1047
+ "text": ", maxResults?: "
1048
+ },
1049
+ {
1050
+ "kind": "Content",
1051
+ "text": "number"
1052
+ },
1053
+ {
1054
+ "kind": "Content",
1055
+ "text": "): "
1056
+ },
1057
+ {
1058
+ "kind": "Reference",
1059
+ "text": "Promise",
1060
+ "canonicalReference": "!Promise:interface"
1061
+ },
1062
+ {
1063
+ "kind": "Content",
1064
+ "text": "<{\n issues: "
1065
+ },
1066
+ {
1067
+ "kind": "Reference",
1068
+ "text": "Issue",
1069
+ "canonicalReference": "@valiantys/atlassian-app-frontend!~Issue:interface"
1070
+ },
1071
+ {
1072
+ "kind": "Content",
1073
+ "text": "[];\n nextPageToken?: string;\n }>"
1074
+ },
1075
+ {
1076
+ "kind": "Content",
1077
+ "text": ";"
1078
+ }
1079
+ ],
1080
+ "isStatic": false,
1081
+ "returnTypeTokenRange": {
1082
+ "startIndex": 9,
1083
+ "endIndex": 13
1084
+ },
1085
+ "releaseTag": "Public",
1086
+ "isProtected": false,
1087
+ "overloadIndex": 1,
1088
+ "parameters": [
1089
+ {
1090
+ "parameterName": "jql",
1091
+ "parameterTypeTokenRange": {
1092
+ "startIndex": 1,
1093
+ "endIndex": 2
1094
+ },
1095
+ "isOptional": false
1096
+ },
1097
+ {
1098
+ "parameterName": "fields",
1099
+ "parameterTypeTokenRange": {
1100
+ "startIndex": 3,
1101
+ "endIndex": 4
1102
+ },
1103
+ "isOptional": false
1104
+ },
1105
+ {
1106
+ "parameterName": "nextPageToken",
1107
+ "parameterTypeTokenRange": {
1108
+ "startIndex": 5,
1109
+ "endIndex": 6
1110
+ },
1111
+ "isOptional": true
1112
+ },
1113
+ {
1114
+ "parameterName": "maxResults",
1115
+ "parameterTypeTokenRange": {
1116
+ "startIndex": 7,
1117
+ "endIndex": 8
1118
+ },
1119
+ "isOptional": true
1120
+ }
1121
+ ],
1122
+ "isOptional": false,
1123
+ "isAbstract": false,
1124
+ "name": "issueSearchByPage"
1125
+ },
1016
1126
  {
1017
1127
  "kind": "Property",
1018
1128
  "canonicalReference": "@valiantys/atlassian-app-frontend!JiraIssueService.issueUrl:member",
@@ -47,6 +47,11 @@ export class JiraIssueService {
47
47
  // (undocumented)
48
48
  issueSearch(jql: string, fields: string[], maxResults?: number): Promise<Issue<AtlassianDocumentFormat>[]>;
49
49
  // (undocumented)
50
+ issueSearchByPage(jql: string, fields: string[], nextPageToken?: string, maxResults?: number): Promise<{
51
+ issues: Issue[];
52
+ nextPageToken?: string;
53
+ }>;
54
+ // (undocumented)
50
55
  static readonly issueUrl = "/rest/api/3/issue";
51
56
  // (undocumented)
52
57
  queryForIssuesInProjects(projectIdsOrKeys: string[]): Promise<Issue<AtlassianDocumentFormat>[]>;