@valiantys/atlassian-app-frontend 3.0.0-alpha-10 → 3.0.0-alpha-11
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-issue/src/lib/jira-issue-service/index.cjs.js +1 -1
- package/atlassian/jira/shared/data-access-issue/src/lib/jira-issue-service/index.es.js +21 -18
- package/atlassian/shared/data-access-atlassian-product-fetch-oauth/src/lib/atlassian-oauth-fetch/index.cjs.js +1 -1
- package/atlassian/shared/data-access-atlassian-product-fetch-oauth/src/lib/atlassian-oauth-fetch/index.es.js +51 -29
- package/atlassian/shared/data-access-atlassian-product-fetch-oauth/src/lib/route/index.cjs.js +1 -1
- package/atlassian/shared/data-access-atlassian-product-fetch-oauth/src/lib/route/index.es.js +28 -17
- package/atlassian/shared/frontend-feature-atlassian-app/src/lib/standalone/atlassian-app-standalone/index.cjs.js +1 -1
- package/atlassian/shared/frontend-feature-atlassian-app/src/lib/standalone/atlassian-app-standalone/index.es.js +93 -84
- package/atlassian/shared/frontend-feature-oauth-login/src/lib/feature-oauth/index.cjs.js +1 -1
- package/atlassian/shared/frontend-feature-oauth-login/src/lib/feature-oauth/index.es.js +58 -66
- package/atlassian/shared/frontend-feature-oauth-login/src/lib/oauth-routes/index.cjs.js +1 -0
- package/atlassian/shared/frontend-feature-oauth-login/src/lib/oauth-routes/index.es.js +51 -0
- package/atlassian/shared/frontend-ui-page-loading-view/src/lib/page-loading-view/index.cjs.js +1 -1
- package/atlassian/shared/frontend-ui-page-loading-view/src/lib/page-loading-view/index.es.js +1 -1
- package/atlassian-app/index.d.ts +1 -0
- package/atlassian-app-standalone/atlassian-app-frontend-atlassian-app-standalone.api.json +29 -2
- package/atlassian-app-standalone/atlassian-app-frontend.api.md +3 -1
- package/atlassian-app-standalone/index.d.ts +3 -1
- package/data-access-atlassian-product-fetch-oauth/atlassian-app-frontend-data-access-atlassian-product-fetch-oauth.api.json +241 -2
- package/data-access-atlassian-product-fetch-oauth/atlassian-app-frontend.api.md +17 -1
- package/data-access-atlassian-product-fetch-oauth/index.cjs.js +1 -1
- package/data-access-atlassian-product-fetch-oauth/index.d.ts +11 -1
- package/data-access-atlassian-product-fetch-oauth/index.es.js +9 -7
- package/data-access-issue/atlassian-app-frontend-data-access-issue.api.json +128 -9
- package/data-access-issue/atlassian-app-frontend.api.md +7 -5
- package/data-access-issue/index.d.ts +27 -11
- package/package.json +1 -1
- package/shared/util-fetch/src/lib/shared-util-fetch/index.cjs.js +2 -2
- package/shared/util-fetch/src/lib/shared-util-fetch/index.es.js +25 -24
- package/ui-oauth-login/atlassian-app-frontend-ui-oauth-login.api.json +340 -0
- package/ui-oauth-login/atlassian-app-frontend.api.md +29 -0
- package/ui-oauth-login/index.cjs.js +1 -1
- package/ui-oauth-login/index.d.ts +23 -0
- package/ui-oauth-login/index.es.js +7 -3
- package/ui-page-loading-view/atlassian-app-frontend-ui-page-loading-view.api.json +10 -5
- package/ui-page-loading-view/atlassian-app-frontend.api.md +2 -2
- package/ui-page-loading-view/index.d.ts +2 -2
- package/util-atlassian-product-fetch/atlassian-app-frontend-util-atlassian-product-fetch.api.json +97 -2
- package/util-atlassian-product-fetch/atlassian-app-frontend.api.md +9 -1
- package/util-atlassian-product-fetch/index.d.ts +6 -1
- package/util-jira-v3-api/atlassian-app-frontend-util-jira-v3-api.api.json +395 -78
- package/util-jira-v3-api/atlassian-app-frontend.api.md +47 -19
- package/util-jira-v3-api/index.d.ts +33 -14
|
@@ -1,73 +1,65 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const C = S({
|
|
9
|
-
paddingBlockStart: "space.1000"
|
|
10
|
-
}), m = I(null), L = () => {
|
|
11
|
-
const o = N(m);
|
|
12
|
-
return o || (console.warn("No OAuth provider"), { getAuthToken: () => "" });
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as o, useCallback as w, createContext as x, useContext as A } from "react";
|
|
3
|
+
import { OAuthRoutes as k } from "../oauth-routes/index.es.js";
|
|
4
|
+
import { redirectLogin as S } from "../util/index.es.js";
|
|
5
|
+
const u = x(null), v = () => {
|
|
6
|
+
const t = A(u);
|
|
7
|
+
return t || (console.warn("No OAuth provider"), { getAuthToken: () => "" });
|
|
13
8
|
};
|
|
14
|
-
function
|
|
15
|
-
children:
|
|
9
|
+
function b({
|
|
10
|
+
children: t,
|
|
16
11
|
...e
|
|
17
12
|
}) {
|
|
18
|
-
const
|
|
19
|
-
localStorage.getItem(`${e.appName}-auth-token`)
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
{
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
),
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
),
|
|
63
|
-
/* @__PURE__ */ t(l, { path: "/*", element: /* @__PURE__ */ t(v, { to: "/", replace: !0 }) })
|
|
64
|
-
] }) }) }) : /* @__PURE__ */ t(m.Provider, { value: { getAuthToken: x }, children: o });
|
|
13
|
+
const n = o(
|
|
14
|
+
() => localStorage.getItem(`${e.appName}-auth-token`),
|
|
15
|
+
[e.appName]
|
|
16
|
+
), a = o(() => {
|
|
17
|
+
const r = localStorage.getItem(
|
|
18
|
+
`${e.appName}-auth-expires-at`
|
|
19
|
+
);
|
|
20
|
+
return r ? Number(r) : null;
|
|
21
|
+
}, [e.appName]), s = o(
|
|
22
|
+
() => window.location.protocol + "//" + window.location.hostname + (window.location.port ? `:${window.location.port}` : "") + (e.appBaseContext ?? ""),
|
|
23
|
+
[e.appBaseContext]
|
|
24
|
+
), l = o(
|
|
25
|
+
() => s + "/callback?location=" + window.location.href,
|
|
26
|
+
[s]
|
|
27
|
+
), m = o(
|
|
28
|
+
() => (e.appBaseContext ?? "") + "/callback",
|
|
29
|
+
[e.appBaseContext]
|
|
30
|
+
), i = w(
|
|
31
|
+
(r) => {
|
|
32
|
+
localStorage.setItem(`${e.appName}-auth-token`, r.token), localStorage.setItem(
|
|
33
|
+
`${e.appName}-auth-expires-at`,
|
|
34
|
+
r.expiresAt.toString()
|
|
35
|
+
), localStorage.removeItem(`${e.appName}-user-resource-id`), localStorage.removeItem(`${e.appName}-user-workspace-id`);
|
|
36
|
+
const d = new URLSearchParams(window.location.search);
|
|
37
|
+
window.location.href = d.get("location") ?? s;
|
|
38
|
+
},
|
|
39
|
+
[e.appName, s]
|
|
40
|
+
), h = o(
|
|
41
|
+
() => ({
|
|
42
|
+
getAuthToken: () => a && n && !c(a) ? n : (S(e.clientId, l, e.oAuthScopes), "")
|
|
43
|
+
}),
|
|
44
|
+
[e.clientId, e.oAuthScopes, a, l, n]
|
|
45
|
+
);
|
|
46
|
+
return !n || !a || c(a) ? /* @__PURE__ */ p(
|
|
47
|
+
k,
|
|
48
|
+
{
|
|
49
|
+
setAuth: i,
|
|
50
|
+
redirectUri: l,
|
|
51
|
+
oAuthScopes: e.oAuthScopes,
|
|
52
|
+
codeTokenExchangeUrl: e.codeTokenExchangeUrl,
|
|
53
|
+
callbackPath: m,
|
|
54
|
+
clientId: e.clientId
|
|
55
|
+
}
|
|
56
|
+
) : /* @__PURE__ */ p(u.Provider, { value: h, children: t });
|
|
65
57
|
}
|
|
66
|
-
function
|
|
67
|
-
return
|
|
58
|
+
function c(t) {
|
|
59
|
+
return t < Date.now();
|
|
68
60
|
}
|
|
69
61
|
export {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
62
|
+
b as OAuthProvider,
|
|
63
|
+
b as default,
|
|
64
|
+
v as useOAuth
|
|
73
65
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("@atlaskit/primitives"),t=require("react-router-dom"),a=require("../ui-oauth-callback/index.cjs.js"),l=require("../ui-oauth-redirect-login/index.cjs.js"),x=r.xcss({paddingBlockStart:"space.1000"});function h({codeTokenExchangeUrl:u,clientId:o,oAuthScopes:n,redirectUri:s,callbackPath:i,setAuth:c}){return e.jsx(r.Flex,{justifyContent:"center",xcss:x,children:e.jsx(t.BrowserRouter,{children:e.jsxs(t.Routes,{children:[e.jsx(t.Route,{path:"/",element:e.jsx(l.OAuthRedirectLogin,{clientId:o,redirectUri:s,oAuthScopes:n})}),e.jsx(t.Route,{path:i,element:e.jsx(a.OAuthCallback,{setAuth:c,redirectUri:s,codeTokenExchangeUrl:u})}),e.jsx(t.Route,{path:"/*",element:e.jsx(t.Navigate,{to:"/",replace:!0})})]})})})}exports.OAuthRoutes=h;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsx as t, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { Flex as a, xcss as l } from "@atlaskit/primitives";
|
|
3
|
+
import { BrowserRouter as p, Routes as u, Route as e, Navigate as h } from "react-router-dom";
|
|
4
|
+
import { OAuthCallback as f } from "../ui-oauth-callback/index.es.js";
|
|
5
|
+
import { OAuthRedirectLogin as x } from "../ui-oauth-redirect-login/index.es.js";
|
|
6
|
+
const d = l({
|
|
7
|
+
paddingBlockStart: "space.1000"
|
|
8
|
+
});
|
|
9
|
+
function k({
|
|
10
|
+
codeTokenExchangeUrl: r,
|
|
11
|
+
clientId: n,
|
|
12
|
+
oAuthScopes: s,
|
|
13
|
+
redirectUri: o,
|
|
14
|
+
callbackPath: c,
|
|
15
|
+
setAuth: i
|
|
16
|
+
}) {
|
|
17
|
+
return /* @__PURE__ */ t(a, { justifyContent: "center", xcss: d, children: /* @__PURE__ */ t(p, { children: /* @__PURE__ */ m(u, { children: [
|
|
18
|
+
/* @__PURE__ */ t(
|
|
19
|
+
e,
|
|
20
|
+
{
|
|
21
|
+
path: "/",
|
|
22
|
+
element: /* @__PURE__ */ t(
|
|
23
|
+
x,
|
|
24
|
+
{
|
|
25
|
+
clientId: n,
|
|
26
|
+
redirectUri: o,
|
|
27
|
+
oAuthScopes: s
|
|
28
|
+
}
|
|
29
|
+
)
|
|
30
|
+
}
|
|
31
|
+
),
|
|
32
|
+
/* @__PURE__ */ t(
|
|
33
|
+
e,
|
|
34
|
+
{
|
|
35
|
+
path: c,
|
|
36
|
+
element: /* @__PURE__ */ t(
|
|
37
|
+
f,
|
|
38
|
+
{
|
|
39
|
+
setAuth: i,
|
|
40
|
+
redirectUri: o,
|
|
41
|
+
codeTokenExchangeUrl: r
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
),
|
|
46
|
+
/* @__PURE__ */ t(e, { path: "/*", element: /* @__PURE__ */ t(h, { to: "/", replace: !0 }) })
|
|
47
|
+
] }) }) });
|
|
48
|
+
}
|
|
49
|
+
export {
|
|
50
|
+
k as OAuthRoutes
|
|
51
|
+
};
|
package/atlassian/shared/frontend-ui-page-loading-view/src/lib/page-loading-view/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),s=require("@atlaskit/heading"),o=require("@atlaskit/primitives"),a=require("@atlaskit/section-message"),c=require("@atlaskit/spinner");function r({label:n,loadingError:i,labelSize:t}){return e.jsxs(o.Flex,{direction:"column",children:[e.jsx(s,{size:t
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),s=require("@atlaskit/heading"),o=require("@atlaskit/primitives"),a=require("@atlaskit/section-message"),c=require("@atlaskit/spinner");function r({label:n,loadingError:i,labelSize:t}){return e.jsxs(o.Flex,{direction:"column",children:[e.jsx(s,{size:t??"large",children:n}),i?e.jsx(a,{appearance:"error",children:i}):e.jsx(c,{interactionName:"load"})]})}exports.PageLoadingView=r;exports.default=r;
|
package/atlassian/shared/frontend-ui-page-loading-view/src/lib/page-loading-view/index.es.js
CHANGED
|
@@ -9,7 +9,7 @@ function g({
|
|
|
9
9
|
labelSize: o
|
|
10
10
|
}) {
|
|
11
11
|
return /* @__PURE__ */ n(a, { direction: "column", children: [
|
|
12
|
-
/* @__PURE__ */ e(t, { size: o
|
|
12
|
+
/* @__PURE__ */ e(t, { size: o ?? "large", children: i }),
|
|
13
13
|
r ? /* @__PURE__ */ e(m, { appearance: "error", children: r }) : /* @__PURE__ */ e(c, { interactionName: "load" })
|
|
14
14
|
] });
|
|
15
15
|
}
|
package/atlassian-app/index.d.ts
CHANGED
|
@@ -179,7 +179,7 @@
|
|
|
179
179
|
"excerptTokens": [
|
|
180
180
|
{
|
|
181
181
|
"kind": "Content",
|
|
182
|
-
"text": "export declare function AtlassianAppStandalone({ initialMockViewContext, backendUrl, remoteUrl, doCheckWorkspace, appName, doCheckResource, modalOpenerConfig, modalContextConfig, oauthConfig, children, }: "
|
|
182
|
+
"text": "export declare function AtlassianAppStandalone({ initialMockViewContext, backendUrl, remoteUrl, doCheckWorkspace, appName, doCheckResource, modalOpenerConfig, modalContextConfig, oauthConfig, atlassianResourceId, children, }: "
|
|
183
183
|
},
|
|
184
184
|
{
|
|
185
185
|
"kind": "Reference",
|
|
@@ -226,7 +226,7 @@
|
|
|
226
226
|
"overloadIndex": 1,
|
|
227
227
|
"parameters": [
|
|
228
228
|
{
|
|
229
|
-
"parameterName": "{ initialMockViewContext, backendUrl, remoteUrl, doCheckWorkspace, appName, doCheckResource, modalOpenerConfig, modalContextConfig, oauthConfig, children, }",
|
|
229
|
+
"parameterName": "{ initialMockViewContext, backendUrl, remoteUrl, doCheckWorkspace, appName, doCheckResource, modalOpenerConfig, modalContextConfig, oauthConfig, atlassianResourceId, children, }",
|
|
230
230
|
"parameterTypeTokenRange": {
|
|
231
231
|
"startIndex": 1,
|
|
232
232
|
"endIndex": 5
|
|
@@ -278,6 +278,33 @@
|
|
|
278
278
|
"endIndex": 2
|
|
279
279
|
}
|
|
280
280
|
},
|
|
281
|
+
{
|
|
282
|
+
"kind": "PropertySignature",
|
|
283
|
+
"canonicalReference": "@valiantys/atlassian-app-frontend!JiraStandaloneAppWrapperProps#atlassianResourceId:member",
|
|
284
|
+
"docComment": "",
|
|
285
|
+
"excerptTokens": [
|
|
286
|
+
{
|
|
287
|
+
"kind": "Content",
|
|
288
|
+
"text": "atlassianResourceId?: "
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"kind": "Content",
|
|
292
|
+
"text": "string"
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"kind": "Content",
|
|
296
|
+
"text": ";"
|
|
297
|
+
}
|
|
298
|
+
],
|
|
299
|
+
"isReadonly": false,
|
|
300
|
+
"isOptional": true,
|
|
301
|
+
"releaseTag": "Public",
|
|
302
|
+
"name": "atlassianResourceId",
|
|
303
|
+
"propertyTypeTokenRange": {
|
|
304
|
+
"startIndex": 1,
|
|
305
|
+
"endIndex": 2
|
|
306
|
+
}
|
|
307
|
+
},
|
|
281
308
|
{
|
|
282
309
|
"kind": "PropertySignature",
|
|
283
310
|
"canonicalReference": "@valiantys/atlassian-app-frontend!JiraStandaloneAppWrapperProps#backendUrl:member",
|
|
@@ -9,13 +9,15 @@ import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
|
9
9
|
import { PropsWithChildren } from 'react';
|
|
10
10
|
|
|
11
11
|
// @public (undocumented)
|
|
12
|
-
export function AtlassianAppStandalone({ initialMockViewContext, backendUrl, remoteUrl, doCheckWorkspace, appName, doCheckResource, modalOpenerConfig, modalContextConfig, oauthConfig, children, }: PropsWithChildren<JiraStandaloneAppWrapperProps>): JSX_2.Element;
|
|
12
|
+
export function AtlassianAppStandalone({ initialMockViewContext, backendUrl, remoteUrl, doCheckWorkspace, appName, doCheckResource, modalOpenerConfig, modalContextConfig, oauthConfig, atlassianResourceId, children, }: PropsWithChildren<JiraStandaloneAppWrapperProps>): JSX_2.Element;
|
|
13
13
|
|
|
14
14
|
// @public (undocumented)
|
|
15
15
|
export interface JiraStandaloneAppWrapperProps {
|
|
16
16
|
// (undocumented)
|
|
17
17
|
appName: string;
|
|
18
18
|
// (undocumented)
|
|
19
|
+
atlassianResourceId?: string;
|
|
20
|
+
// (undocumented)
|
|
19
21
|
backendUrl?: string;
|
|
20
22
|
// (undocumented)
|
|
21
23
|
doCheckResource?: boolean;
|
|
@@ -2,7 +2,7 @@ import { FullContext } from '@forge/bridge/out/types';
|
|
|
2
2
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
3
3
|
import { PropsWithChildren } from 'react';
|
|
4
4
|
|
|
5
|
-
export declare function AtlassianAppStandalone({ initialMockViewContext, backendUrl, remoteUrl, doCheckWorkspace, appName, doCheckResource, modalOpenerConfig, modalContextConfig, oauthConfig, children, }: PropsWithChildren<JiraStandaloneAppWrapperProps>): JSX_2.Element;
|
|
5
|
+
export declare function AtlassianAppStandalone({ initialMockViewContext, backendUrl, remoteUrl, doCheckWorkspace, appName, doCheckResource, modalOpenerConfig, modalContextConfig, oauthConfig, atlassianResourceId, children, }: PropsWithChildren<JiraStandaloneAppWrapperProps>): JSX_2.Element;
|
|
6
6
|
|
|
7
7
|
declare type AtlassianAppStandaloneOauthConfig = OAuthProviderProps & {
|
|
8
8
|
doCheckResource?: boolean;
|
|
@@ -28,11 +28,13 @@ export declare interface JiraStandaloneAppWrapperProps {
|
|
|
28
28
|
};
|
|
29
29
|
appName: string;
|
|
30
30
|
oauthConfig?: AtlassianAppStandaloneOauthConfig;
|
|
31
|
+
atlassianResourceId?: string;
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
declare interface OAuthProviderProps {
|
|
34
35
|
clientId: string;
|
|
35
36
|
codeTokenExchangeUrl: string;
|
|
37
|
+
appBaseContext?: string;
|
|
36
38
|
/**
|
|
37
39
|
* OAuth App Name
|
|
38
40
|
*/
|
|
@@ -354,6 +354,56 @@
|
|
|
354
354
|
],
|
|
355
355
|
"name": "atlassianOAuthJiraFetch"
|
|
356
356
|
},
|
|
357
|
+
{
|
|
358
|
+
"kind": "Function",
|
|
359
|
+
"canonicalReference": "@valiantys/atlassian-app-frontend!atlassianOAuthJiraFetchViaProxy:function(1)",
|
|
360
|
+
"docComment": "",
|
|
361
|
+
"excerptTokens": [
|
|
362
|
+
{
|
|
363
|
+
"kind": "Content",
|
|
364
|
+
"text": "export declare function atlassianOAuthJiraFetchViaProxy(proxyUrl: "
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
"kind": "Content",
|
|
368
|
+
"text": "string"
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"kind": "Content",
|
|
372
|
+
"text": "): "
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
"kind": "Reference",
|
|
376
|
+
"text": "AtlassianProductFetchService",
|
|
377
|
+
"canonicalReference": "@valiantys/atlassian-app-frontend!~AtlassianProductFetchService:interface"
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
"kind": "Content",
|
|
381
|
+
"text": "<'jira'>"
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
"kind": "Content",
|
|
385
|
+
"text": ";"
|
|
386
|
+
}
|
|
387
|
+
],
|
|
388
|
+
"fileUrlPath": "../../shared/data-access-atlassian-product-fetch-oauth/src/lib/atlassian-oauth-fetch.d.ts",
|
|
389
|
+
"returnTypeTokenRange": {
|
|
390
|
+
"startIndex": 3,
|
|
391
|
+
"endIndex": 5
|
|
392
|
+
},
|
|
393
|
+
"releaseTag": "Public",
|
|
394
|
+
"overloadIndex": 1,
|
|
395
|
+
"parameters": [
|
|
396
|
+
{
|
|
397
|
+
"parameterName": "proxyUrl",
|
|
398
|
+
"parameterTypeTokenRange": {
|
|
399
|
+
"startIndex": 1,
|
|
400
|
+
"endIndex": 2
|
|
401
|
+
},
|
|
402
|
+
"isOptional": false
|
|
403
|
+
}
|
|
404
|
+
],
|
|
405
|
+
"name": "atlassianOAuthJiraFetchViaProxy"
|
|
406
|
+
},
|
|
357
407
|
{
|
|
358
408
|
"kind": "Function",
|
|
359
409
|
"canonicalReference": "@valiantys/atlassian-app-frontend!atlassianOAuthRawFetch:function(1)",
|
|
@@ -458,6 +508,105 @@
|
|
|
458
508
|
],
|
|
459
509
|
"name": "atlassianOAuthRawFetch"
|
|
460
510
|
},
|
|
511
|
+
{
|
|
512
|
+
"kind": "Interface",
|
|
513
|
+
"canonicalReference": "@valiantys/atlassian-app-frontend!AtlassianOauthTokenResponse:interface",
|
|
514
|
+
"docComment": "",
|
|
515
|
+
"excerptTokens": [
|
|
516
|
+
{
|
|
517
|
+
"kind": "Content",
|
|
518
|
+
"text": "export interface AtlassianOauthTokenResponse "
|
|
519
|
+
}
|
|
520
|
+
],
|
|
521
|
+
"fileUrlPath": "../../shared/data-access-atlassian-product-fetch-oauth/src/lib/atlassian-oauth-token-response.d.ts",
|
|
522
|
+
"releaseTag": "Public",
|
|
523
|
+
"name": "AtlassianOauthTokenResponse",
|
|
524
|
+
"preserveMemberOrder": false,
|
|
525
|
+
"members": [
|
|
526
|
+
{
|
|
527
|
+
"kind": "PropertySignature",
|
|
528
|
+
"canonicalReference": "@valiantys/atlassian-app-frontend!AtlassianOauthTokenResponse#access_token:member",
|
|
529
|
+
"docComment": "",
|
|
530
|
+
"excerptTokens": [
|
|
531
|
+
{
|
|
532
|
+
"kind": "Content",
|
|
533
|
+
"text": "access_token: "
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
"kind": "Content",
|
|
537
|
+
"text": "string"
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
"kind": "Content",
|
|
541
|
+
"text": ";"
|
|
542
|
+
}
|
|
543
|
+
],
|
|
544
|
+
"isReadonly": false,
|
|
545
|
+
"isOptional": false,
|
|
546
|
+
"releaseTag": "Public",
|
|
547
|
+
"name": "access_token",
|
|
548
|
+
"propertyTypeTokenRange": {
|
|
549
|
+
"startIndex": 1,
|
|
550
|
+
"endIndex": 2
|
|
551
|
+
}
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
"kind": "PropertySignature",
|
|
555
|
+
"canonicalReference": "@valiantys/atlassian-app-frontend!AtlassianOauthTokenResponse#expires_in:member",
|
|
556
|
+
"docComment": "",
|
|
557
|
+
"excerptTokens": [
|
|
558
|
+
{
|
|
559
|
+
"kind": "Content",
|
|
560
|
+
"text": "expires_in: "
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
"kind": "Content",
|
|
564
|
+
"text": "number"
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
"kind": "Content",
|
|
568
|
+
"text": ";"
|
|
569
|
+
}
|
|
570
|
+
],
|
|
571
|
+
"isReadonly": false,
|
|
572
|
+
"isOptional": false,
|
|
573
|
+
"releaseTag": "Public",
|
|
574
|
+
"name": "expires_in",
|
|
575
|
+
"propertyTypeTokenRange": {
|
|
576
|
+
"startIndex": 1,
|
|
577
|
+
"endIndex": 2
|
|
578
|
+
}
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
"kind": "PropertySignature",
|
|
582
|
+
"canonicalReference": "@valiantys/atlassian-app-frontend!AtlassianOauthTokenResponse#scope:member",
|
|
583
|
+
"docComment": "",
|
|
584
|
+
"excerptTokens": [
|
|
585
|
+
{
|
|
586
|
+
"kind": "Content",
|
|
587
|
+
"text": "scope: "
|
|
588
|
+
},
|
|
589
|
+
{
|
|
590
|
+
"kind": "Content",
|
|
591
|
+
"text": "string"
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
"kind": "Content",
|
|
595
|
+
"text": ";"
|
|
596
|
+
}
|
|
597
|
+
],
|
|
598
|
+
"isReadonly": false,
|
|
599
|
+
"isOptional": false,
|
|
600
|
+
"releaseTag": "Public",
|
|
601
|
+
"name": "scope",
|
|
602
|
+
"propertyTypeTokenRange": {
|
|
603
|
+
"startIndex": 1,
|
|
604
|
+
"endIndex": 2
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
],
|
|
608
|
+
"extendsTokenRanges": []
|
|
609
|
+
},
|
|
461
610
|
{
|
|
462
611
|
"kind": "Function",
|
|
463
612
|
"canonicalReference": "@valiantys/atlassian-app-frontend!getAtlassianOAuthToken:function(1)",
|
|
@@ -514,7 +663,16 @@
|
|
|
514
663
|
},
|
|
515
664
|
{
|
|
516
665
|
"kind": "Content",
|
|
517
|
-
"text": "<
|
|
666
|
+
"text": "<"
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
"kind": "Reference",
|
|
670
|
+
"text": "AtlassianOauthTokenResponse",
|
|
671
|
+
"canonicalReference": "@valiantys/atlassian-app-frontend!AtlassianOauthTokenResponse:interface"
|
|
672
|
+
},
|
|
673
|
+
{
|
|
674
|
+
"kind": "Content",
|
|
675
|
+
"text": ">"
|
|
518
676
|
},
|
|
519
677
|
{
|
|
520
678
|
"kind": "Content",
|
|
@@ -524,7 +682,7 @@
|
|
|
524
682
|
"fileUrlPath": "../../shared/data-access-atlassian-product-fetch-oauth/src/lib/atlassian-oauth-fetch.d.ts",
|
|
525
683
|
"returnTypeTokenRange": {
|
|
526
684
|
"startIndex": 11,
|
|
527
|
-
"endIndex":
|
|
685
|
+
"endIndex": 15
|
|
528
686
|
},
|
|
529
687
|
"releaseTag": "Public",
|
|
530
688
|
"overloadIndex": 1,
|
|
@@ -1080,6 +1238,87 @@
|
|
|
1080
1238
|
}
|
|
1081
1239
|
],
|
|
1082
1240
|
"name": "route"
|
|
1241
|
+
},
|
|
1242
|
+
{
|
|
1243
|
+
"kind": "Function",
|
|
1244
|
+
"canonicalReference": "@valiantys/atlassian-app-frontend!routeNoEscaping:function(1)",
|
|
1245
|
+
"docComment": "",
|
|
1246
|
+
"excerptTokens": [
|
|
1247
|
+
{
|
|
1248
|
+
"kind": "Content",
|
|
1249
|
+
"text": "export declare function routeNoEscaping(template: "
|
|
1250
|
+
},
|
|
1251
|
+
{
|
|
1252
|
+
"kind": "Reference",
|
|
1253
|
+
"text": "TemplateStringsArray",
|
|
1254
|
+
"canonicalReference": "!TemplateStringsArray:interface"
|
|
1255
|
+
},
|
|
1256
|
+
{
|
|
1257
|
+
"kind": "Content",
|
|
1258
|
+
"text": ", ...parameters: "
|
|
1259
|
+
},
|
|
1260
|
+
{
|
|
1261
|
+
"kind": "Content",
|
|
1262
|
+
"text": "(string | number | "
|
|
1263
|
+
},
|
|
1264
|
+
{
|
|
1265
|
+
"kind": "Reference",
|
|
1266
|
+
"text": "URLSearchParams",
|
|
1267
|
+
"canonicalReference": "!URLSearchParams:interface"
|
|
1268
|
+
},
|
|
1269
|
+
{
|
|
1270
|
+
"kind": "Content",
|
|
1271
|
+
"text": " | "
|
|
1272
|
+
},
|
|
1273
|
+
{
|
|
1274
|
+
"kind": "Reference",
|
|
1275
|
+
"text": "FetchRoute",
|
|
1276
|
+
"canonicalReference": "@valiantys/atlassian-app-frontend!~FetchRoute:type"
|
|
1277
|
+
},
|
|
1278
|
+
{
|
|
1279
|
+
"kind": "Content",
|
|
1280
|
+
"text": ")[]"
|
|
1281
|
+
},
|
|
1282
|
+
{
|
|
1283
|
+
"kind": "Content",
|
|
1284
|
+
"text": "): "
|
|
1285
|
+
},
|
|
1286
|
+
{
|
|
1287
|
+
"kind": "Reference",
|
|
1288
|
+
"text": "FetchRoute",
|
|
1289
|
+
"canonicalReference": "@valiantys/atlassian-app-frontend!~FetchRoute:type"
|
|
1290
|
+
},
|
|
1291
|
+
{
|
|
1292
|
+
"kind": "Content",
|
|
1293
|
+
"text": ";"
|
|
1294
|
+
}
|
|
1295
|
+
],
|
|
1296
|
+
"fileUrlPath": "../../shared/data-access-atlassian-product-fetch-oauth/src/lib/route.d.ts",
|
|
1297
|
+
"returnTypeTokenRange": {
|
|
1298
|
+
"startIndex": 9,
|
|
1299
|
+
"endIndex": 10
|
|
1300
|
+
},
|
|
1301
|
+
"releaseTag": "Public",
|
|
1302
|
+
"overloadIndex": 1,
|
|
1303
|
+
"parameters": [
|
|
1304
|
+
{
|
|
1305
|
+
"parameterName": "template",
|
|
1306
|
+
"parameterTypeTokenRange": {
|
|
1307
|
+
"startIndex": 1,
|
|
1308
|
+
"endIndex": 2
|
|
1309
|
+
},
|
|
1310
|
+
"isOptional": false
|
|
1311
|
+
},
|
|
1312
|
+
{
|
|
1313
|
+
"parameterName": "parameters",
|
|
1314
|
+
"parameterTypeTokenRange": {
|
|
1315
|
+
"startIndex": 3,
|
|
1316
|
+
"endIndex": 8
|
|
1317
|
+
},
|
|
1318
|
+
"isOptional": false
|
|
1319
|
+
}
|
|
1320
|
+
],
|
|
1321
|
+
"name": "routeNoEscaping"
|
|
1083
1322
|
}
|
|
1084
1323
|
]
|
|
1085
1324
|
}
|
|
@@ -15,13 +15,26 @@ export function atlassianOAuthConfluenceFetch(authToken: string, cloudId: string
|
|
|
15
15
|
// @public (undocumented)
|
|
16
16
|
export function atlassianOAuthJiraFetch(authToken: string, cloudId: string): AtlassianProductFetchService<'jira'>;
|
|
17
17
|
|
|
18
|
+
// @public (undocumented)
|
|
19
|
+
export function atlassianOAuthJiraFetchViaProxy(proxyUrl: string): AtlassianProductFetchService<'jira'>;
|
|
20
|
+
|
|
18
21
|
// Warning: (ae-forgotten-export) The symbol "Product" needs to be exported by the entry point data-access-atlassian-product-fetch-oauth.d.ts
|
|
19
22
|
//
|
|
20
23
|
// @public (undocumented)
|
|
21
24
|
export function atlassianOAuthRawFetch<P extends Product>(authToken: string, domain: string, productType: P): AtlassianProductFetchService<P>;
|
|
22
25
|
|
|
23
26
|
// @public (undocumented)
|
|
24
|
-
export
|
|
27
|
+
export interface AtlassianOauthTokenResponse {
|
|
28
|
+
// (undocumented)
|
|
29
|
+
access_token: string;
|
|
30
|
+
// (undocumented)
|
|
31
|
+
expires_in: number;
|
|
32
|
+
// (undocumented)
|
|
33
|
+
scope: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// @public (undocumented)
|
|
37
|
+
export function getAtlassianOAuthToken(grant_type: string, client_id: string, client_secret: string, code: string, redirect_uri: string): Promise<AtlassianOauthTokenResponse>;
|
|
25
38
|
|
|
26
39
|
// @public (undocumented)
|
|
27
40
|
export function getAtlassianUserDetails(authToken: string): Promise<OAuthUser>;
|
|
@@ -68,6 +81,9 @@ export interface OAuthUser {
|
|
|
68
81
|
// @public (undocumented)
|
|
69
82
|
export function route(template: TemplateStringsArray, ...parameters: (string | number | URLSearchParams | FetchRoute)[]): FetchRoute;
|
|
70
83
|
|
|
84
|
+
// @public (undocumented)
|
|
85
|
+
export function routeNoEscaping(template: TemplateStringsArray, ...parameters: (string | number | URLSearchParams | FetchRoute)[]): FetchRoute;
|
|
86
|
+
|
|
71
87
|
// (No @packageDocumentation comment for this package)
|
|
72
88
|
|
|
73
89
|
```
|
|
@@ -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.atlassianOAuthRawFetch=t.atlassianOAuthRawFetch;exports.getAtlassianOAuthToken=t.getAtlassianOAuthToken;exports.getAtlassianUserDetails=t.getAtlassianUserDetails;exports.route=a.route;
|
|
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;
|
|
@@ -6,8 +6,16 @@ export declare function atlassianOAuthConfluenceFetch(authToken: string, cloudId
|
|
|
6
6
|
|
|
7
7
|
export declare function atlassianOAuthJiraFetch(authToken: string, cloudId: string): AtlassianProductFetchService<'jira'>;
|
|
8
8
|
|
|
9
|
+
export declare function atlassianOAuthJiraFetchViaProxy(proxyUrl: string): AtlassianProductFetchService<'jira'>;
|
|
10
|
+
|
|
9
11
|
export declare function atlassianOAuthRawFetch<P extends Product>(authToken: string, domain: string, productType: P): AtlassianProductFetchService<P>;
|
|
10
12
|
|
|
13
|
+
export declare interface AtlassianOauthTokenResponse {
|
|
14
|
+
access_token: string;
|
|
15
|
+
expires_in: number;
|
|
16
|
+
scope: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
11
19
|
declare interface AtlassianProductFetchService<P extends Product> {
|
|
12
20
|
productType: P;
|
|
13
21
|
fetch: FetchSignature;
|
|
@@ -31,7 +39,7 @@ declare type FetchRoute = {
|
|
|
31
39
|
|
|
32
40
|
declare type FetchSignature = <T>(request: FetchRequest, body?: Record<string, any>) => Promise<T>;
|
|
33
41
|
|
|
34
|
-
export declare function getAtlassianOAuthToken(grant_type: string, client_id: string, client_secret: string, code: string, redirect_uri: string): Promise<
|
|
42
|
+
export declare function getAtlassianOAuthToken(grant_type: string, client_id: string, client_secret: string, code: string, redirect_uri: string): Promise<AtlassianOauthTokenResponse>;
|
|
35
43
|
|
|
36
44
|
export declare function getAtlassianUserDetails(authToken: string): Promise<OAuthUser>;
|
|
37
45
|
|
|
@@ -64,4 +72,6 @@ declare type RequestProductMethod = (url: FetchRoute, init: RequestInit) => Prom
|
|
|
64
72
|
|
|
65
73
|
export declare function route(template: TemplateStringsArray, ...parameters: (string | number | URLSearchParams | FetchRoute)[]): FetchRoute;
|
|
66
74
|
|
|
75
|
+
export declare function routeNoEscaping(template: TemplateStringsArray, ...parameters: (string | number | URLSearchParams | FetchRoute)[]): FetchRoute;
|
|
76
|
+
|
|
67
77
|
export { }
|