@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,11 +1,13 @@
|
|
|
1
|
-
import { atlassianOAuthBitbucketFetch as e, atlassianOAuthConfluenceFetch as s, atlassianOAuthJiraFetch as h, atlassianOAuthRawFetch as
|
|
2
|
-
import { route as
|
|
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";
|
|
3
3
|
export {
|
|
4
4
|
e as atlassianOAuthBitbucketFetch,
|
|
5
5
|
s as atlassianOAuthConfluenceFetch,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
n as
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
i as atlassianOAuthJiraFetch,
|
|
7
|
+
h as atlassianOAuthJiraFetchViaProxy,
|
|
8
|
+
n as atlassianOAuthRawFetch,
|
|
9
|
+
o as getAtlassianOAuthToken,
|
|
10
|
+
r as getAtlassianUserDetails,
|
|
11
|
+
l as route,
|
|
12
|
+
c as routeNoEscaping
|
|
11
13
|
};
|
|
@@ -521,6 +521,14 @@
|
|
|
521
521
|
"kind": "Content",
|
|
522
522
|
"text": "string[]"
|
|
523
523
|
},
|
|
524
|
+
{
|
|
525
|
+
"kind": "Content",
|
|
526
|
+
"text": ", rendered?: "
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
"kind": "Content",
|
|
530
|
+
"text": "boolean"
|
|
531
|
+
},
|
|
524
532
|
{
|
|
525
533
|
"kind": "Content",
|
|
526
534
|
"text": "): "
|
|
@@ -550,8 +558,8 @@
|
|
|
550
558
|
],
|
|
551
559
|
"isStatic": false,
|
|
552
560
|
"returnTypeTokenRange": {
|
|
553
|
-
"startIndex":
|
|
554
|
-
"endIndex":
|
|
561
|
+
"startIndex": 7,
|
|
562
|
+
"endIndex": 11
|
|
555
563
|
},
|
|
556
564
|
"releaseTag": "Public",
|
|
557
565
|
"isProtected": false,
|
|
@@ -572,6 +580,14 @@
|
|
|
572
580
|
"endIndex": 4
|
|
573
581
|
},
|
|
574
582
|
"isOptional": true
|
|
583
|
+
},
|
|
584
|
+
{
|
|
585
|
+
"parameterName": "rendered",
|
|
586
|
+
"parameterTypeTokenRange": {
|
|
587
|
+
"startIndex": 5,
|
|
588
|
+
"endIndex": 6
|
|
589
|
+
},
|
|
590
|
+
"isOptional": true
|
|
575
591
|
}
|
|
576
592
|
],
|
|
577
593
|
"isOptional": false,
|
|
@@ -943,7 +959,16 @@
|
|
|
943
959
|
},
|
|
944
960
|
{
|
|
945
961
|
"kind": "Content",
|
|
946
|
-
"text": "
|
|
962
|
+
"text": "<"
|
|
963
|
+
},
|
|
964
|
+
{
|
|
965
|
+
"kind": "Reference",
|
|
966
|
+
"text": "AtlassianDocumentFormat",
|
|
967
|
+
"canonicalReference": "@valiantys/atlassian-app-frontend!~AtlassianDocumentFormat:interface"
|
|
968
|
+
},
|
|
969
|
+
{
|
|
970
|
+
"kind": "Content",
|
|
971
|
+
"text": ">[]>"
|
|
947
972
|
},
|
|
948
973
|
{
|
|
949
974
|
"kind": "Content",
|
|
@@ -953,7 +978,7 @@
|
|
|
953
978
|
"isStatic": false,
|
|
954
979
|
"returnTypeTokenRange": {
|
|
955
980
|
"startIndex": 7,
|
|
956
|
-
"endIndex":
|
|
981
|
+
"endIndex": 13
|
|
957
982
|
},
|
|
958
983
|
"releaseTag": "Public",
|
|
959
984
|
"isProtected": false,
|
|
@@ -1029,11 +1054,11 @@
|
|
|
1029
1054
|
"excerptTokens": [
|
|
1030
1055
|
{
|
|
1031
1056
|
"kind": "Content",
|
|
1032
|
-
"text": "queryForIssuesInProjects(
|
|
1057
|
+
"text": "queryForIssuesInProjects(projectIdsOrKeys: "
|
|
1033
1058
|
},
|
|
1034
1059
|
{
|
|
1035
1060
|
"kind": "Content",
|
|
1036
|
-
"text": "
|
|
1061
|
+
"text": "string[]"
|
|
1037
1062
|
},
|
|
1038
1063
|
{
|
|
1039
1064
|
"kind": "Content",
|
|
@@ -1055,7 +1080,16 @@
|
|
|
1055
1080
|
},
|
|
1056
1081
|
{
|
|
1057
1082
|
"kind": "Content",
|
|
1058
|
-
"text": "
|
|
1083
|
+
"text": "<"
|
|
1084
|
+
},
|
|
1085
|
+
{
|
|
1086
|
+
"kind": "Reference",
|
|
1087
|
+
"text": "AtlassianDocumentFormat",
|
|
1088
|
+
"canonicalReference": "@valiantys/atlassian-app-frontend!~AtlassianDocumentFormat:interface"
|
|
1089
|
+
},
|
|
1090
|
+
{
|
|
1091
|
+
"kind": "Content",
|
|
1092
|
+
"text": ">[]>"
|
|
1059
1093
|
},
|
|
1060
1094
|
{
|
|
1061
1095
|
"kind": "Content",
|
|
@@ -1065,14 +1099,14 @@
|
|
|
1065
1099
|
"isStatic": false,
|
|
1066
1100
|
"returnTypeTokenRange": {
|
|
1067
1101
|
"startIndex": 3,
|
|
1068
|
-
"endIndex":
|
|
1102
|
+
"endIndex": 9
|
|
1069
1103
|
},
|
|
1070
1104
|
"releaseTag": "Public",
|
|
1071
1105
|
"isProtected": false,
|
|
1072
1106
|
"overloadIndex": 1,
|
|
1073
1107
|
"parameters": [
|
|
1074
1108
|
{
|
|
1075
|
-
"parameterName": "
|
|
1109
|
+
"parameterName": "projectIdsOrKeys",
|
|
1076
1110
|
"parameterTypeTokenRange": {
|
|
1077
1111
|
"startIndex": 1,
|
|
1078
1112
|
"endIndex": 2
|
|
@@ -1382,6 +1416,91 @@
|
|
|
1382
1416
|
"isOptional": false,
|
|
1383
1417
|
"isAbstract": false,
|
|
1384
1418
|
"name": "updateIssue"
|
|
1419
|
+
},
|
|
1420
|
+
{
|
|
1421
|
+
"kind": "Method",
|
|
1422
|
+
"canonicalReference": "@valiantys/atlassian-app-frontend!JiraIssueService#updateProperty:member(1)",
|
|
1423
|
+
"docComment": "",
|
|
1424
|
+
"excerptTokens": [
|
|
1425
|
+
{
|
|
1426
|
+
"kind": "Content",
|
|
1427
|
+
"text": "updateProperty(issueIdOrKey: "
|
|
1428
|
+
},
|
|
1429
|
+
{
|
|
1430
|
+
"kind": "Content",
|
|
1431
|
+
"text": "string"
|
|
1432
|
+
},
|
|
1433
|
+
{
|
|
1434
|
+
"kind": "Content",
|
|
1435
|
+
"text": ", propertyName: "
|
|
1436
|
+
},
|
|
1437
|
+
{
|
|
1438
|
+
"kind": "Content",
|
|
1439
|
+
"text": "string"
|
|
1440
|
+
},
|
|
1441
|
+
{
|
|
1442
|
+
"kind": "Content",
|
|
1443
|
+
"text": ", value: "
|
|
1444
|
+
},
|
|
1445
|
+
{
|
|
1446
|
+
"kind": "Content",
|
|
1447
|
+
"text": "any"
|
|
1448
|
+
},
|
|
1449
|
+
{
|
|
1450
|
+
"kind": "Content",
|
|
1451
|
+
"text": "): "
|
|
1452
|
+
},
|
|
1453
|
+
{
|
|
1454
|
+
"kind": "Reference",
|
|
1455
|
+
"text": "Promise",
|
|
1456
|
+
"canonicalReference": "!Promise:interface"
|
|
1457
|
+
},
|
|
1458
|
+
{
|
|
1459
|
+
"kind": "Content",
|
|
1460
|
+
"text": "<void>"
|
|
1461
|
+
},
|
|
1462
|
+
{
|
|
1463
|
+
"kind": "Content",
|
|
1464
|
+
"text": ";"
|
|
1465
|
+
}
|
|
1466
|
+
],
|
|
1467
|
+
"isStatic": false,
|
|
1468
|
+
"returnTypeTokenRange": {
|
|
1469
|
+
"startIndex": 7,
|
|
1470
|
+
"endIndex": 9
|
|
1471
|
+
},
|
|
1472
|
+
"releaseTag": "Public",
|
|
1473
|
+
"isProtected": false,
|
|
1474
|
+
"overloadIndex": 1,
|
|
1475
|
+
"parameters": [
|
|
1476
|
+
{
|
|
1477
|
+
"parameterName": "issueIdOrKey",
|
|
1478
|
+
"parameterTypeTokenRange": {
|
|
1479
|
+
"startIndex": 1,
|
|
1480
|
+
"endIndex": 2
|
|
1481
|
+
},
|
|
1482
|
+
"isOptional": false
|
|
1483
|
+
},
|
|
1484
|
+
{
|
|
1485
|
+
"parameterName": "propertyName",
|
|
1486
|
+
"parameterTypeTokenRange": {
|
|
1487
|
+
"startIndex": 3,
|
|
1488
|
+
"endIndex": 4
|
|
1489
|
+
},
|
|
1490
|
+
"isOptional": false
|
|
1491
|
+
},
|
|
1492
|
+
{
|
|
1493
|
+
"parameterName": "value",
|
|
1494
|
+
"parameterTypeTokenRange": {
|
|
1495
|
+
"startIndex": 5,
|
|
1496
|
+
"endIndex": 6
|
|
1497
|
+
},
|
|
1498
|
+
"isOptional": false
|
|
1499
|
+
}
|
|
1500
|
+
],
|
|
1501
|
+
"isOptional": false,
|
|
1502
|
+
"isAbstract": false,
|
|
1503
|
+
"name": "updateProperty"
|
|
1385
1504
|
}
|
|
1386
1505
|
],
|
|
1387
1506
|
"implementsTokenRanges": []
|
|
@@ -8,8 +8,6 @@
|
|
|
8
8
|
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
|
-
// Warning: (ae-forgotten-export) The symbol "AtlassianDocumentFormat" needs to be exported by the entry point data-access-issue.d.ts
|
|
12
|
-
//
|
|
13
11
|
// (undocumented)
|
|
14
12
|
addIssueComment(issueIdOrKey: string, body: AtlassianDocumentFormat): Promise<IssueComment>;
|
|
15
13
|
// Warning: (ae-forgotten-export) The symbol "WorklogCreateRequest" needs to be exported by the entry point data-access-issue.d.ts
|
|
@@ -29,7 +27,7 @@ export class JiraIssueService {
|
|
|
29
27
|
// Warning: (ae-forgotten-export) The symbol "Issue" needs to be exported by the entry point data-access-issue.d.ts
|
|
30
28
|
//
|
|
31
29
|
// (undocumented)
|
|
32
|
-
getIssue(issueIdOrKey: string, fields?: string[]): Promise<Issue | undefined>;
|
|
30
|
+
getIssue(issueIdOrKey: string, fields?: string[], rendered?: boolean): Promise<Issue | undefined>;
|
|
33
31
|
// Warning: (ae-forgotten-export) The symbol "IssueComment" needs to be exported by the entry point data-access-issue.d.ts
|
|
34
32
|
//
|
|
35
33
|
// (undocumented)
|
|
@@ -44,12 +42,14 @@ export class JiraIssueService {
|
|
|
44
42
|
//
|
|
45
43
|
// (undocumented)
|
|
46
44
|
getIssueFields(issueIdOrKey: string, fields: string[]): Promise<IssueFields | undefined>;
|
|
45
|
+
// Warning: (ae-forgotten-export) The symbol "AtlassianDocumentFormat" needs to be exported by the entry point data-access-issue.d.ts
|
|
46
|
+
//
|
|
47
47
|
// (undocumented)
|
|
48
|
-
issueSearch(jql: string, fields: string[], maxResults?: number): Promise<Issue[]>;
|
|
48
|
+
issueSearch(jql: string, fields: string[], maxResults?: number): Promise<Issue<AtlassianDocumentFormat>[]>;
|
|
49
49
|
// (undocumented)
|
|
50
50
|
static readonly issueUrl = "/rest/api/3/issue";
|
|
51
51
|
// (undocumented)
|
|
52
|
-
queryForIssuesInProjects(
|
|
52
|
+
queryForIssuesInProjects(projectIdsOrKeys: string[]): Promise<Issue<AtlassianDocumentFormat>[]>;
|
|
53
53
|
// Warning: (ae-forgotten-export) The symbol "TransitionIssueRequest" needs to be exported by the entry point data-access-issue.d.ts
|
|
54
54
|
//
|
|
55
55
|
// (undocumented)
|
|
@@ -62,6 +62,8 @@ export class JiraIssueService {
|
|
|
62
62
|
//
|
|
63
63
|
// (undocumented)
|
|
64
64
|
updateIssue(issueIdOrKey: string, body: UpdateIssue): Promise<void>;
|
|
65
|
+
// (undocumented)
|
|
66
|
+
updateProperty(issueIdOrKey: string, propertyName: string, value: any): Promise<void>;
|
|
65
67
|
}
|
|
66
68
|
|
|
67
69
|
// (No @packageDocumentation comment for this package)
|
|
@@ -49,7 +49,7 @@ declare interface CreatedIssue {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
declare interface CreateIssue {
|
|
52
|
-
fields: IssueFields<string>;
|
|
52
|
+
fields: IssueFields<AtlassianDocumentFormat | string>;
|
|
53
53
|
properties?: {
|
|
54
54
|
key: string;
|
|
55
55
|
value: unknown;
|
|
@@ -113,12 +113,13 @@ declare interface HistoryMetadataParticipant {
|
|
|
113
113
|
url: string;
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
declare interface Issue {
|
|
116
|
+
declare interface Issue<T = AtlassianDocumentFormat> {
|
|
117
117
|
id: string;
|
|
118
118
|
expand?: string;
|
|
119
119
|
key: string;
|
|
120
120
|
self?: string;
|
|
121
|
-
fields: IssueFields
|
|
121
|
+
fields: IssueFields<T>;
|
|
122
|
+
renderedFields?: IssueFields<string>;
|
|
122
123
|
}
|
|
123
124
|
|
|
124
125
|
declare type IssueComment = {
|
|
@@ -186,17 +187,18 @@ declare type JiraCommentResponse = {
|
|
|
186
187
|
};
|
|
187
188
|
|
|
188
189
|
export declare class JiraIssueService {
|
|
189
|
-
private fetchSvc;
|
|
190
|
+
private readonly fetchSvc;
|
|
190
191
|
static readonly issueUrl = "/rest/api/3/issue";
|
|
191
192
|
constructor(fetchSvc: AtlassianProductFetchService<'jira'>);
|
|
193
|
+
updateProperty(issueIdOrKey: string, propertyName: string, value: any): Promise<void>;
|
|
192
194
|
updateField(issueIdOrKey: string, fieldName: string, value: unknown): Promise<void>;
|
|
193
195
|
updateFields(issueIdOrKey: string, fields: Record<string, unknown>): Promise<void>;
|
|
194
196
|
getIssueField<T>(issueIdOrKey: string, field: string): Promise<T | undefined>;
|
|
195
197
|
getIssueFields(issueIdOrKey: string, fields: string[]): Promise<IssueFields | undefined>;
|
|
196
|
-
getIssue(issueIdOrKey: string, fields?: string[]): Promise<Issue | undefined>;
|
|
197
|
-
issueSearch(jql: string, fields: string[], maxResults?: number): Promise<Issue[]>;
|
|
198
|
+
getIssue(issueIdOrKey: string, fields?: string[], rendered?: boolean): Promise<Issue | undefined>;
|
|
199
|
+
issueSearch(jql: string, fields: string[], maxResults?: number): Promise<Issue<AtlassianDocumentFormat>[]>;
|
|
198
200
|
addWorklog(issueIdOrKey: string, worklog: WorklogCreateRequest): Promise<Worklog>;
|
|
199
|
-
queryForIssuesInProjects(
|
|
201
|
+
queryForIssuesInProjects(projectIdsOrKeys: string[]): Promise<Issue<AtlassianDocumentFormat>[]>;
|
|
200
202
|
createIssue(body: CreateIssue): Promise<CreatedIssue>;
|
|
201
203
|
updateIssue(issueIdOrKey: string, body: UpdateIssue): Promise<void>;
|
|
202
204
|
getIssueComments(issueIdOrKey: string, startAt?: number): Promise<JiraCommentResponse>;
|
|
@@ -231,7 +233,7 @@ declare interface StaticIssueFields<T = AtlassianDocumentFormat> {
|
|
|
231
233
|
maxResults: number;
|
|
232
234
|
worklogs: Worklog[];
|
|
233
235
|
};
|
|
234
|
-
issuetype
|
|
236
|
+
issuetype?: {
|
|
235
237
|
self?: string;
|
|
236
238
|
id: string;
|
|
237
239
|
description?: string;
|
|
@@ -242,7 +244,7 @@ declare interface StaticIssueFields<T = AtlassianDocumentFormat> {
|
|
|
242
244
|
hierarchyLevel?: number;
|
|
243
245
|
};
|
|
244
246
|
timespent?: number;
|
|
245
|
-
project
|
|
247
|
+
project?: Project;
|
|
246
248
|
aggregatetimespent?: number;
|
|
247
249
|
resolutiondate?: string;
|
|
248
250
|
lastViewed?: string;
|
|
@@ -269,12 +271,16 @@ declare interface StaticIssueFields<T = AtlassianDocumentFormat> {
|
|
|
269
271
|
remainingEstimateSeconds: number;
|
|
270
272
|
timeSpentSeconds: number;
|
|
271
273
|
};
|
|
272
|
-
summary
|
|
274
|
+
summary?: string;
|
|
273
275
|
status?: IssueStatus;
|
|
274
276
|
creator?: User;
|
|
275
277
|
assignee?: User;
|
|
276
278
|
reporter?: User;
|
|
277
279
|
issuelinks?: IssueLink[];
|
|
280
|
+
components?: {
|
|
281
|
+
id: string;
|
|
282
|
+
name: string;
|
|
283
|
+
}[];
|
|
278
284
|
}
|
|
279
285
|
|
|
280
286
|
declare interface TransitionIssueRequest {
|
|
@@ -285,7 +291,7 @@ declare interface TransitionIssueRequest {
|
|
|
285
291
|
update?: any;
|
|
286
292
|
}
|
|
287
293
|
|
|
288
|
-
declare type UpdateIssue =
|
|
294
|
+
declare type UpdateIssue = CreateIssue;
|
|
289
295
|
|
|
290
296
|
declare interface User {
|
|
291
297
|
accountId: string;
|
|
@@ -296,6 +302,16 @@ declare interface User {
|
|
|
296
302
|
avatarUrls?: AvatarUrls;
|
|
297
303
|
accountType?: string;
|
|
298
304
|
self?: string;
|
|
305
|
+
groups?: {
|
|
306
|
+
items?: UserGroupName[];
|
|
307
|
+
size?: number;
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
declare interface UserGroupName {
|
|
312
|
+
groupId: string;
|
|
313
|
+
name: string;
|
|
314
|
+
self: string;
|
|
299
315
|
}
|
|
300
316
|
|
|
301
317
|
declare type Visibility = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@valiantys/atlassian-app-frontend",
|
|
3
|
-
"version": "3.0.0-alpha-
|
|
3
|
+
"version": "3.0.0-alpha-11",
|
|
4
4
|
"description": "This library provides an Atlassian Forge Custom UI wrapper component that handles all the setup necessary to support an app that can run deployed or in standalone mode",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./atlassian-app": {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class h extends Error{constructor(t,e,a=t){super(a),this.statusText=t,this.statusCode=e,this.statusCode=e,this.statusText=t}toJSON(){return{statusCode:this.statusCode,statusText:this.statusText}}}function c(
|
|
2
|
-
${
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class h extends Error{constructor(t,e,a=t){super(a),this.statusText=t,this.statusCode=e,this.statusCode=e,this.statusText=t}toJSON(){return{statusCode:this.statusCode,statusText:this.statusText}}}function c(r,t){const e={Authorization:r.startsWith("Bearer ")?r:`Bearer ${r}`};return t?{...t,...e}:e}async function j(r,t,e){const a=c(r,e.headers||{});return fetch(t,{...e,headers:a})}async function x(r,t,e,a,n="json",o={}){return d(t,e,c(r,o),a,n)}async function d(r,t,e,a,n="json",o){const f={...e??{},Accept:n==="json"?"application/json":"text/html","Content-Type":n==="json"?"application/json":"text/html"},l=a?JSON.stringify(a):void 0,s=await fetch(r,{method:t,headers:f,body:l,credentials:o});if(s.ok)return t==="DELETE"||s.status===204?void 0:n==="text"?await s.text():await s.json();{let u="";try{u=await s.text()}catch{}const i=`${s.status} ${s.statusText} - ${t} ${r}
|
|
2
|
+
${u}`;throw console.error(i),new h(s.statusText,s.status,i)}}exports.FetchError=h;exports.addAuthHeader=c;exports.bearerAuthFetch=x;exports.bearerAuthFetchRaw=j;exports.jsonFetch=d;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
class f extends Error {
|
|
2
|
-
constructor(t,
|
|
3
|
-
super(
|
|
2
|
+
constructor(t, e, a = t) {
|
|
3
|
+
super(a), this.statusText = t, this.statusCode = e, this.statusCode = e, this.statusText = t;
|
|
4
4
|
}
|
|
5
5
|
toJSON() {
|
|
6
6
|
return {
|
|
@@ -9,37 +9,38 @@ class f extends Error {
|
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
function u(
|
|
13
|
-
const
|
|
14
|
-
Authorization:
|
|
12
|
+
function u(s, t) {
|
|
13
|
+
const e = {
|
|
14
|
+
Authorization: s.startsWith("Bearer ") ? s : `Bearer ${s}`
|
|
15
15
|
};
|
|
16
|
-
return t ? { ...t, ...
|
|
16
|
+
return t ? { ...t, ...e } : e;
|
|
17
17
|
}
|
|
18
|
-
async function l(
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
async function l(s, t, e) {
|
|
19
|
+
const a = u(
|
|
20
|
+
s,
|
|
21
|
+
e.headers || {}
|
|
22
22
|
);
|
|
23
|
-
return fetch(t, { ...
|
|
23
|
+
return fetch(t, { ...e, headers: a });
|
|
24
24
|
}
|
|
25
|
-
async function j(
|
|
26
|
-
return
|
|
25
|
+
async function j(s, t, e, a, n = "json", o = {}) {
|
|
26
|
+
return x(
|
|
27
27
|
t,
|
|
28
|
-
|
|
29
|
-
u(
|
|
30
|
-
|
|
28
|
+
e,
|
|
29
|
+
u(s, o),
|
|
30
|
+
a,
|
|
31
31
|
n
|
|
32
32
|
);
|
|
33
33
|
}
|
|
34
|
-
async function
|
|
35
|
-
const
|
|
36
|
-
...
|
|
34
|
+
async function x(s, t, e, a, n = "json", o) {
|
|
35
|
+
const h = {
|
|
36
|
+
...e ?? {},
|
|
37
37
|
Accept: n === "json" ? "application/json" : "text/html",
|
|
38
38
|
"Content-Type": n === "json" ? "application/json" : "text/html"
|
|
39
|
-
},
|
|
39
|
+
}, d = a ? JSON.stringify(a) : void 0, r = await fetch(s, {
|
|
40
40
|
method: t,
|
|
41
|
-
headers:
|
|
42
|
-
body:
|
|
41
|
+
headers: h,
|
|
42
|
+
body: d,
|
|
43
|
+
credentials: o
|
|
43
44
|
});
|
|
44
45
|
if (r.ok)
|
|
45
46
|
return t === "DELETE" || r.status === 204 ? void 0 : n === "text" ? await r.text() : await r.json();
|
|
@@ -49,7 +50,7 @@ async function d(e, t, s, o, n = "json") {
|
|
|
49
50
|
c = await r.text();
|
|
50
51
|
} catch {
|
|
51
52
|
}
|
|
52
|
-
const i = `${r.status} ${r.statusText} - ${t} ${
|
|
53
|
+
const i = `${r.status} ${r.statusText} - ${t} ${s}
|
|
53
54
|
${c}`;
|
|
54
55
|
throw console.error(i), new f(r.statusText, r.status, i);
|
|
55
56
|
}
|
|
@@ -59,5 +60,5 @@ export {
|
|
|
59
60
|
u as addAuthHeader,
|
|
60
61
|
j as bearerAuthFetch,
|
|
61
62
|
l as bearerAuthFetchRaw,
|
|
62
|
-
|
|
63
|
+
x as jsonFetch
|
|
63
64
|
};
|