@valiantys/atlassian-app-frontend 3.0.0-alpha-1 → 3.0.0-alpha-2
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/forge/shared/util-product-fetch/src/lib/product-fetch/index.cjs.js +2 -2
- package/atlassian/forge/shared/util-product-fetch/src/lib/product-fetch/index.es.js +17 -16
- 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 +26 -8
- 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 +14 -15
- package/atlassian/shared/frontend-ui-iframe/src/lib/iframe-wrapper.module.scss/index.cjs.js +1 -1
- package/atlassian/shared/frontend-ui-iframe/src/lib/iframe-wrapper.module.scss/index.es.js +1 -1
- package/atlassian/shared/frontend-ui-remote-adapter/src/lib/oauth-fetch-invoke-remote/index.cjs.js +1 -1
- package/atlassian/shared/frontend-ui-remote-adapter/src/lib/oauth-fetch-invoke-remote/index.es.js +5 -5
- package/atlassian-app-frontend.css +1 -1
- package/data-access-issue/atlassian-app-frontend-data-access-issue.api.json +133 -0
- package/data-access-issue/atlassian-app-frontend.api.md +9 -0
- package/data-access-issue/index.d.ts +90 -31
- 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 +36 -30
- package/util-atlassian-product-fetch/atlassian-app-frontend-util-atlassian-product-fetch.api.json +113 -7
- package/util-atlassian-product-fetch/atlassian-app-frontend.api.md +10 -3
- package/util-atlassian-product-fetch/index.d.ts +8 -3
- package/util-jira-v3-api/atlassian-app-frontend-util-jira-v3-api.api.json +1020 -127
- package/util-jira-v3-api/atlassian-app-frontend.api.md +122 -31
- package/util-jira-v3-api/index.d.ts +88 -31
|
@@ -1,57 +1,63 @@
|
|
|
1
|
-
class f {
|
|
2
|
-
constructor(t) {
|
|
3
|
-
this.
|
|
1
|
+
class f extends Error {
|
|
2
|
+
constructor(t, s, o = t) {
|
|
3
|
+
super(o), this.statusText = t, this.statusCode = s, this.statusCode = s, this.statusText = t;
|
|
4
|
+
}
|
|
5
|
+
toJSON() {
|
|
6
|
+
return {
|
|
7
|
+
statusCode: this.statusCode,
|
|
8
|
+
statusText: this.statusText
|
|
9
|
+
};
|
|
4
10
|
}
|
|
5
11
|
}
|
|
6
|
-
function
|
|
7
|
-
const
|
|
12
|
+
function u(e, t) {
|
|
13
|
+
const s = {
|
|
8
14
|
Authorization: e.startsWith("Bearer ") ? e : `Bearer ${e}`
|
|
9
15
|
};
|
|
10
|
-
return t ? { ...t, ...
|
|
16
|
+
return t ? { ...t, ...s } : s;
|
|
11
17
|
}
|
|
12
|
-
async function
|
|
13
|
-
const
|
|
18
|
+
async function l(e, t, s) {
|
|
19
|
+
const o = u(
|
|
14
20
|
e,
|
|
15
|
-
|
|
21
|
+
s.headers || {}
|
|
16
22
|
);
|
|
17
|
-
return fetch(t, { ...
|
|
23
|
+
return fetch(t, { ...s, headers: o });
|
|
18
24
|
}
|
|
19
|
-
async function
|
|
20
|
-
return
|
|
25
|
+
async function j(e, t, s, o, n = "json", a = {}) {
|
|
26
|
+
return d(
|
|
21
27
|
t,
|
|
22
|
-
r,
|
|
23
|
-
h(e, a),
|
|
24
28
|
s,
|
|
25
|
-
|
|
29
|
+
u(e, a),
|
|
30
|
+
o,
|
|
31
|
+
n
|
|
26
32
|
);
|
|
27
33
|
}
|
|
28
|
-
async function
|
|
34
|
+
async function d(e, t, s, o, n = "json") {
|
|
29
35
|
const a = {
|
|
30
|
-
...
|
|
31
|
-
Accept:
|
|
32
|
-
"Content-Type":
|
|
33
|
-
},
|
|
36
|
+
...s || {},
|
|
37
|
+
Accept: n === "json" ? "application/json" : "text/html",
|
|
38
|
+
"Content-Type": n === "json" ? "application/json" : "text/html"
|
|
39
|
+
}, h = o ? JSON.stringify(o) : void 0, r = await fetch(e, {
|
|
34
40
|
method: t,
|
|
35
41
|
headers: a,
|
|
36
|
-
body:
|
|
42
|
+
body: h
|
|
37
43
|
});
|
|
38
|
-
if (
|
|
39
|
-
return t === "DELETE" ||
|
|
44
|
+
if (r.ok)
|
|
45
|
+
return t === "DELETE" || r.status === 204 ? void 0 : n === "text" ? await r.text() : await r.json();
|
|
40
46
|
{
|
|
41
47
|
let c = "";
|
|
42
48
|
try {
|
|
43
|
-
c = await
|
|
49
|
+
c = await r.text();
|
|
44
50
|
} catch {
|
|
45
51
|
}
|
|
46
|
-
const i = `${
|
|
52
|
+
const i = `${r.status} ${r.statusText} - ${t} ${e}
|
|
47
53
|
${c}`;
|
|
48
|
-
throw console.error(i), new f(i);
|
|
54
|
+
throw console.error(i), new f(r.statusText, r.status, i);
|
|
49
55
|
}
|
|
50
56
|
}
|
|
51
57
|
export {
|
|
52
58
|
f as FetchError,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
59
|
+
u as addAuthHeader,
|
|
60
|
+
j as bearerAuthFetch,
|
|
61
|
+
l as bearerAuthFetchRaw,
|
|
62
|
+
d as jsonFetch
|
|
57
63
|
};
|
package/util-atlassian-product-fetch/atlassian-app-frontend-util-atlassian-product-fetch.api.json
CHANGED
|
@@ -736,7 +736,16 @@
|
|
|
736
736
|
"excerptTokens": [
|
|
737
737
|
{
|
|
738
738
|
"kind": "Content",
|
|
739
|
-
"text": "export declare class FetchError "
|
|
739
|
+
"text": "export declare class FetchError extends "
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
"kind": "Reference",
|
|
743
|
+
"text": "Error",
|
|
744
|
+
"canonicalReference": "!Error:interface"
|
|
745
|
+
},
|
|
746
|
+
{
|
|
747
|
+
"kind": "Content",
|
|
748
|
+
"text": " "
|
|
740
749
|
}
|
|
741
750
|
],
|
|
742
751
|
"fileUrlPath": "../../../shared/util-fetch/src/lib/shared-util-fetch.d.ts",
|
|
@@ -752,7 +761,23 @@
|
|
|
752
761
|
"excerptTokens": [
|
|
753
762
|
{
|
|
754
763
|
"kind": "Content",
|
|
755
|
-
"text": "constructor(
|
|
764
|
+
"text": "constructor(statusText: "
|
|
765
|
+
},
|
|
766
|
+
{
|
|
767
|
+
"kind": "Content",
|
|
768
|
+
"text": "string"
|
|
769
|
+
},
|
|
770
|
+
{
|
|
771
|
+
"kind": "Content",
|
|
772
|
+
"text": ", statusCode?: "
|
|
773
|
+
},
|
|
774
|
+
{
|
|
775
|
+
"kind": "Content",
|
|
776
|
+
"text": "number | undefined"
|
|
777
|
+
},
|
|
778
|
+
{
|
|
779
|
+
"kind": "Content",
|
|
780
|
+
"text": ", message?: "
|
|
756
781
|
},
|
|
757
782
|
{
|
|
758
783
|
"kind": "Content",
|
|
@@ -768,23 +793,69 @@
|
|
|
768
793
|
"overloadIndex": 1,
|
|
769
794
|
"parameters": [
|
|
770
795
|
{
|
|
771
|
-
"parameterName": "
|
|
796
|
+
"parameterName": "statusText",
|
|
772
797
|
"parameterTypeTokenRange": {
|
|
773
798
|
"startIndex": 1,
|
|
774
799
|
"endIndex": 2
|
|
775
800
|
},
|
|
776
801
|
"isOptional": false
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
"parameterName": "statusCode",
|
|
805
|
+
"parameterTypeTokenRange": {
|
|
806
|
+
"startIndex": 3,
|
|
807
|
+
"endIndex": 4
|
|
808
|
+
},
|
|
809
|
+
"isOptional": true
|
|
810
|
+
},
|
|
811
|
+
{
|
|
812
|
+
"parameterName": "message",
|
|
813
|
+
"parameterTypeTokenRange": {
|
|
814
|
+
"startIndex": 5,
|
|
815
|
+
"endIndex": 6
|
|
816
|
+
},
|
|
817
|
+
"isOptional": true
|
|
777
818
|
}
|
|
778
819
|
]
|
|
779
820
|
},
|
|
780
821
|
{
|
|
781
822
|
"kind": "Property",
|
|
782
|
-
"canonicalReference": "@valiantys/atlassian-app-frontend!FetchError#
|
|
823
|
+
"canonicalReference": "@valiantys/atlassian-app-frontend!FetchError#statusCode:member",
|
|
783
824
|
"docComment": "",
|
|
784
825
|
"excerptTokens": [
|
|
785
826
|
{
|
|
786
827
|
"kind": "Content",
|
|
787
|
-
"text": "
|
|
828
|
+
"text": "readonly statusCode?: "
|
|
829
|
+
},
|
|
830
|
+
{
|
|
831
|
+
"kind": "Content",
|
|
832
|
+
"text": "number | undefined"
|
|
833
|
+
},
|
|
834
|
+
{
|
|
835
|
+
"kind": "Content",
|
|
836
|
+
"text": ";"
|
|
837
|
+
}
|
|
838
|
+
],
|
|
839
|
+
"isReadonly": true,
|
|
840
|
+
"isOptional": true,
|
|
841
|
+
"releaseTag": "Public",
|
|
842
|
+
"name": "statusCode",
|
|
843
|
+
"propertyTypeTokenRange": {
|
|
844
|
+
"startIndex": 1,
|
|
845
|
+
"endIndex": 2
|
|
846
|
+
},
|
|
847
|
+
"isStatic": false,
|
|
848
|
+
"isProtected": false,
|
|
849
|
+
"isAbstract": false
|
|
850
|
+
},
|
|
851
|
+
{
|
|
852
|
+
"kind": "Property",
|
|
853
|
+
"canonicalReference": "@valiantys/atlassian-app-frontend!FetchError#statusText:member",
|
|
854
|
+
"docComment": "",
|
|
855
|
+
"excerptTokens": [
|
|
856
|
+
{
|
|
857
|
+
"kind": "Content",
|
|
858
|
+
"text": "readonly statusText: "
|
|
788
859
|
},
|
|
789
860
|
{
|
|
790
861
|
"kind": "Content",
|
|
@@ -795,10 +866,10 @@
|
|
|
795
866
|
"text": ";"
|
|
796
867
|
}
|
|
797
868
|
],
|
|
798
|
-
"isReadonly":
|
|
869
|
+
"isReadonly": true,
|
|
799
870
|
"isOptional": false,
|
|
800
871
|
"releaseTag": "Public",
|
|
801
|
-
"name": "
|
|
872
|
+
"name": "statusText",
|
|
802
873
|
"propertyTypeTokenRange": {
|
|
803
874
|
"startIndex": 1,
|
|
804
875
|
"endIndex": 2
|
|
@@ -806,8 +877,43 @@
|
|
|
806
877
|
"isStatic": false,
|
|
807
878
|
"isProtected": false,
|
|
808
879
|
"isAbstract": false
|
|
880
|
+
},
|
|
881
|
+
{
|
|
882
|
+
"kind": "Method",
|
|
883
|
+
"canonicalReference": "@valiantys/atlassian-app-frontend!FetchError#toJSON:member(1)",
|
|
884
|
+
"docComment": "",
|
|
885
|
+
"excerptTokens": [
|
|
886
|
+
{
|
|
887
|
+
"kind": "Content",
|
|
888
|
+
"text": "toJSON(): "
|
|
889
|
+
},
|
|
890
|
+
{
|
|
891
|
+
"kind": "Content",
|
|
892
|
+
"text": "{\n statusCode: number | undefined;\n statusText: string;\n }"
|
|
893
|
+
},
|
|
894
|
+
{
|
|
895
|
+
"kind": "Content",
|
|
896
|
+
"text": ";"
|
|
897
|
+
}
|
|
898
|
+
],
|
|
899
|
+
"isStatic": false,
|
|
900
|
+
"returnTypeTokenRange": {
|
|
901
|
+
"startIndex": 1,
|
|
902
|
+
"endIndex": 2
|
|
903
|
+
},
|
|
904
|
+
"releaseTag": "Public",
|
|
905
|
+
"isProtected": false,
|
|
906
|
+
"overloadIndex": 1,
|
|
907
|
+
"parameters": [],
|
|
908
|
+
"isOptional": false,
|
|
909
|
+
"isAbstract": false,
|
|
910
|
+
"name": "toJSON"
|
|
809
911
|
}
|
|
810
912
|
],
|
|
913
|
+
"extendsTokenRange": {
|
|
914
|
+
"startIndex": 1,
|
|
915
|
+
"endIndex": 2
|
|
916
|
+
},
|
|
811
917
|
"implementsTokenRanges": []
|
|
812
918
|
},
|
|
813
919
|
{
|
|
@@ -33,10 +33,17 @@ export function bearerAuthFetch<T>(authToken: string, url: string, method: Fetch
|
|
|
33
33
|
export function bearerAuthFetchRaw(authToken: string, url: string, init: RequestInit): Promise<Response>;
|
|
34
34
|
|
|
35
35
|
// @public (undocumented)
|
|
36
|
-
export class FetchError {
|
|
37
|
-
constructor(
|
|
36
|
+
export class FetchError extends Error {
|
|
37
|
+
constructor(statusText: string, statusCode?: number | undefined, message?: string);
|
|
38
38
|
// (undocumented)
|
|
39
|
-
|
|
39
|
+
readonly statusCode?: number | undefined;
|
|
40
|
+
// (undocumented)
|
|
41
|
+
readonly statusText: string;
|
|
42
|
+
// (undocumented)
|
|
43
|
+
toJSON(): {
|
|
44
|
+
statusCode: number | undefined;
|
|
45
|
+
statusText: string;
|
|
46
|
+
};
|
|
40
47
|
}
|
|
41
48
|
|
|
42
49
|
// @public (undocumented)
|
|
@@ -16,9 +16,14 @@ export declare function bearerAuthFetch<T>(authToken: string, url: string, metho
|
|
|
16
16
|
|
|
17
17
|
export declare function bearerAuthFetchRaw(authToken: string, url: string, init: RequestInit): Promise<Response>;
|
|
18
18
|
|
|
19
|
-
export declare class FetchError {
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
export declare class FetchError extends Error {
|
|
20
|
+
readonly statusText: string;
|
|
21
|
+
readonly statusCode?: number | undefined;
|
|
22
|
+
constructor(statusText: string, statusCode?: number | undefined, message?: string);
|
|
23
|
+
toJSON(): {
|
|
24
|
+
statusCode: number | undefined;
|
|
25
|
+
statusText: string;
|
|
26
|
+
};
|
|
22
27
|
}
|
|
23
28
|
|
|
24
29
|
export declare type FetchMethod = 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH';
|