@forge/teamwork-graph 3.0.0-next.1 → 3.0.0-next.3
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/out/__test__/entity-operations.test.js +14 -173
- package/out/__test__/error-handling.test.js +95 -0
- package/out/types/objects/branch.d.ts +4 -1
- package/out/types/objects/branch.d.ts.map +1 -1
- package/out/types/objects/commit.d.ts +4 -1
- package/out/types/objects/commit.d.ts.map +1 -1
- package/out/types/objects/common.d.ts +3 -6
- package/out/types/objects/common.d.ts.map +1 -1
- package/out/types/objects/index.d.ts +2 -5
- package/out/types/objects/index.d.ts.map +1 -1
- package/out/types/objects/test-execution.d.ts +2 -1
- package/out/types/objects/test-execution.d.ts.map +1 -1
- package/out/utils/error-handling.d.ts.map +1 -1
- package/out/utils/error-handling.js +5 -1
- package/out/utils/errors.d.ts +2 -1
- package/out/utils/errors.d.ts.map +1 -1
- package/out/utils/errors.js +4 -2
- package/package.json +1 -1
- package/out/types/objects/organisation.d.ts +0 -9
- package/out/types/objects/organisation.d.ts.map +0 -1
- package/out/types/objects/organisation.js +0 -2
- package/out/types/objects/position.d.ts +0 -24
- package/out/types/objects/position.d.ts.map +0 -1
- package/out/types/objects/position.js +0 -2
- package/out/types/objects/worker.d.ts +0 -13
- package/out/types/objects/worker.d.ts.map +0 -1
- package/out/types/objects/worker.js +0 -2
|
@@ -175,58 +175,6 @@ describe('TeamWorkGraphClient - setObjects', () => {
|
|
|
175
175
|
expect(mockFetch).toHaveBeenCalledWith((0, endpoints_1.getFullPath)(endpoints_1.ENDPOINTS.OBJECTS.BULK), expect.objectContaining({ method: 'POST' }));
|
|
176
176
|
expect(result).toEqual(expected);
|
|
177
177
|
});
|
|
178
|
-
it('posts organisation entities to /api/v1/entities/bulk and returns response', async () => {
|
|
179
|
-
const organisationObject = {
|
|
180
|
-
schemaVersion: '2.0',
|
|
181
|
-
id: 'org-1',
|
|
182
|
-
updateSequenceNumber: 2,
|
|
183
|
-
displayName: 'pos 2',
|
|
184
|
-
url: 'https://workday.atlassian.com/path-to-org',
|
|
185
|
-
createdAt: '2024-07-09T14:27:37.000Z',
|
|
186
|
-
lastUpdatedAt: '2024-07-09T14:27:37.000Z',
|
|
187
|
-
permissions: [
|
|
188
|
-
{
|
|
189
|
-
accessControls: [
|
|
190
|
-
{
|
|
191
|
-
principals: [
|
|
192
|
-
{
|
|
193
|
-
type: 'EVERYONE'
|
|
194
|
-
}
|
|
195
|
-
]
|
|
196
|
-
}
|
|
197
|
-
]
|
|
198
|
-
}
|
|
199
|
-
],
|
|
200
|
-
parentKey: {
|
|
201
|
-
type: 'atlassian:organisation',
|
|
202
|
-
value: {
|
|
203
|
-
entityId: 'id of the parent org of this org'
|
|
204
|
-
}
|
|
205
|
-
},
|
|
206
|
-
'atlassian:organisation': {}
|
|
207
|
-
};
|
|
208
|
-
const req = { objects: [organisationObject] };
|
|
209
|
-
const backendResponse = {
|
|
210
|
-
accepted: [
|
|
211
|
-
{
|
|
212
|
-
entityType: 'atlassian:organisation',
|
|
213
|
-
entityId: { id: 'org-1' },
|
|
214
|
-
thirdPartyAri: 'ari:third-party:test::organisation/org-1'
|
|
215
|
-
}
|
|
216
|
-
]
|
|
217
|
-
};
|
|
218
|
-
const expected = {
|
|
219
|
-
success: true,
|
|
220
|
-
results: { accepted: backendResponse.accepted, rejected: undefined, validEntities: undefined }
|
|
221
|
-
};
|
|
222
|
-
mockFetch.mockResolvedValueOnce({
|
|
223
|
-
ok: true,
|
|
224
|
-
json: () => Promise.resolve(backendResponse)
|
|
225
|
-
});
|
|
226
|
-
const result = await graphClient.setObjects(req);
|
|
227
|
-
expect(mockFetch).toHaveBeenCalledWith((0, endpoints_1.getFullPath)(endpoints_1.ENDPOINTS.OBJECTS.BULK), expect.objectContaining({ method: 'POST' }));
|
|
228
|
-
expect(result).toEqual(expected);
|
|
229
|
-
});
|
|
230
178
|
it('throws if objects is not an array', async () => {
|
|
231
179
|
const req = { objects: null };
|
|
232
180
|
await expect(graphClient.setObjects(req)).rejects.toThrow('objects must be an array');
|
|
@@ -653,6 +601,12 @@ describe('TeamWorkGraphClient - bulk entities', () => {
|
|
|
653
601
|
url: 'https://github.com/org/repo/tree/feature-branch',
|
|
654
602
|
createdAt: '2024-07-09T14:27:37.000Z',
|
|
655
603
|
lastUpdatedAt: '2024-07-09T14:27:37.000Z',
|
|
604
|
+
containerKey: {
|
|
605
|
+
type: 'atlassian:repository',
|
|
606
|
+
value: {
|
|
607
|
+
repositoryId: 'repo-1'
|
|
608
|
+
}
|
|
609
|
+
},
|
|
656
610
|
permissions: [
|
|
657
611
|
{
|
|
658
612
|
accessControls: [
|
|
@@ -699,6 +653,12 @@ describe('TeamWorkGraphClient - bulk entities', () => {
|
|
|
699
653
|
url: 'https://github.com/org/repo/commit/abc123',
|
|
700
654
|
createdAt: '2024-07-09T14:27:37.000Z',
|
|
701
655
|
lastUpdatedAt: '2024-07-09T14:27:37.000Z',
|
|
656
|
+
containerKey: {
|
|
657
|
+
type: 'atlassian:repository',
|
|
658
|
+
value: {
|
|
659
|
+
repositoryId: 'repo-1'
|
|
660
|
+
}
|
|
661
|
+
},
|
|
702
662
|
permissions: [
|
|
703
663
|
{
|
|
704
664
|
accessControls: [
|
|
@@ -1326,71 +1286,6 @@ describe('TeamWorkGraphClient - bulk entities', () => {
|
|
|
1326
1286
|
expect(mockFetch).toHaveBeenCalledWith((0, endpoints_1.getFullPath)(endpoints_1.ENDPOINTS.OBJECTS.BULK), expect.objectContaining({ method: 'POST' }));
|
|
1327
1287
|
expect(result).toEqual(expected);
|
|
1328
1288
|
});
|
|
1329
|
-
it('posts position entities to /api/v1/entities/bulk and returns response', async () => {
|
|
1330
|
-
const positionObject = {
|
|
1331
|
-
schemaVersion: '2.0',
|
|
1332
|
-
id: 'position-1',
|
|
1333
|
-
updateSequenceNumber: 1,
|
|
1334
|
-
displayName: 'Senior Software Engineer - Backend',
|
|
1335
|
-
url: 'https://hr.example.com/positions/senior-backend-engineer',
|
|
1336
|
-
createdAt: '2024-07-09T14:27:37.000Z',
|
|
1337
|
-
lastUpdatedAt: '2024-07-09T14:27:37.000Z',
|
|
1338
|
-
permissions: [
|
|
1339
|
-
{
|
|
1340
|
-
accessControls: [
|
|
1341
|
-
{
|
|
1342
|
-
principals: [
|
|
1343
|
-
{
|
|
1344
|
-
type: 'EVERYONE'
|
|
1345
|
-
}
|
|
1346
|
-
]
|
|
1347
|
-
}
|
|
1348
|
-
]
|
|
1349
|
-
}
|
|
1350
|
-
],
|
|
1351
|
-
parentKey: {
|
|
1352
|
-
type: 'atlassian:organisation',
|
|
1353
|
-
value: {
|
|
1354
|
-
entityId: 'org-tech-company-123'
|
|
1355
|
-
}
|
|
1356
|
-
},
|
|
1357
|
-
associations: {
|
|
1358
|
-
lastUpdatedAt: '2024-07-09T14:27:37.000Z',
|
|
1359
|
-
set: [
|
|
1360
|
-
{
|
|
1361
|
-
associationType: 'atlassian:worker',
|
|
1362
|
-
values: ['worker-alice-johnson-456']
|
|
1363
|
-
}
|
|
1364
|
-
]
|
|
1365
|
-
},
|
|
1366
|
-
'atlassian:position': {
|
|
1367
|
-
customAndSensitiveData: 'Salary range: $120,000-$150,000. Remote work eligible.',
|
|
1368
|
-
status: 'Open',
|
|
1369
|
-
jobTitle: 'Senior Software Engineer - Backend'
|
|
1370
|
-
}
|
|
1371
|
-
};
|
|
1372
|
-
const req = { objects: [positionObject] };
|
|
1373
|
-
const backendResponse = {
|
|
1374
|
-
accepted: [
|
|
1375
|
-
{
|
|
1376
|
-
entityType: 'atlassian:position',
|
|
1377
|
-
entityId: { id: 'position-1' },
|
|
1378
|
-
thirdPartyAri: 'ari:third-party:test::position/position-1'
|
|
1379
|
-
}
|
|
1380
|
-
]
|
|
1381
|
-
};
|
|
1382
|
-
const expected = {
|
|
1383
|
-
success: true,
|
|
1384
|
-
results: { accepted: backendResponse.accepted, rejected: undefined, validEntities: undefined }
|
|
1385
|
-
};
|
|
1386
|
-
mockFetch.mockResolvedValueOnce({
|
|
1387
|
-
ok: true,
|
|
1388
|
-
json: () => Promise.resolve(backendResponse)
|
|
1389
|
-
});
|
|
1390
|
-
const result = await graphClient.setObjects(req);
|
|
1391
|
-
expect(mockFetch).toHaveBeenCalledWith((0, endpoints_1.getFullPath)(endpoints_1.ENDPOINTS.OBJECTS.BULK), expect.objectContaining({ method: 'POST' }));
|
|
1392
|
-
expect(result).toEqual(expected);
|
|
1393
|
-
});
|
|
1394
1289
|
it('posts project entities to /api/v1/entities/bulk and returns response', async () => {
|
|
1395
1290
|
const projectObject = {
|
|
1396
1291
|
schemaVersion: '2.0',
|
|
@@ -1966,7 +1861,6 @@ describe('TeamWorkGraphClient - bulk entities', () => {
|
|
|
1966
1861
|
],
|
|
1967
1862
|
exceedsMaxCollaborators: false,
|
|
1968
1863
|
status: 'In Progress',
|
|
1969
|
-
subtype: 'Development Task',
|
|
1970
1864
|
attachments: [
|
|
1971
1865
|
{
|
|
1972
1866
|
url: 'https://files.example.com/auth-api-spec.pdf',
|
|
@@ -2008,60 +1902,6 @@ describe('TeamWorkGraphClient - bulk entities', () => {
|
|
|
2008
1902
|
expect(mockFetch).toHaveBeenCalledWith((0, endpoints_1.getFullPath)(endpoints_1.ENDPOINTS.OBJECTS.BULK), expect.objectContaining({ method: 'POST' }));
|
|
2009
1903
|
expect(result).toEqual(expected);
|
|
2010
1904
|
});
|
|
2011
|
-
it('posts worker entities to /api/v1/entities/bulk and returns response', async () => {
|
|
2012
|
-
const workerObject = {
|
|
2013
|
-
schemaVersion: '2.0',
|
|
2014
|
-
id: 'worker-1',
|
|
2015
|
-
updateSequenceNumber: 1,
|
|
2016
|
-
displayName: 'Sarah Johnson - Senior Software Engineer',
|
|
2017
|
-
url: 'https://hr.example.com/employees/sarah-johnson',
|
|
2018
|
-
createdAt: '2024-07-09T14:27:37.000Z',
|
|
2019
|
-
lastUpdatedAt: '2024-07-09T14:27:37.000Z',
|
|
2020
|
-
permissions: [
|
|
2021
|
-
{
|
|
2022
|
-
accessControls: [
|
|
2023
|
-
{
|
|
2024
|
-
principals: [
|
|
2025
|
-
{
|
|
2026
|
-
type: 'EVERYONE'
|
|
2027
|
-
}
|
|
2028
|
-
]
|
|
2029
|
-
}
|
|
2030
|
-
]
|
|
2031
|
-
}
|
|
2032
|
-
],
|
|
2033
|
-
'atlassian:worker': {
|
|
2034
|
-
hiredAt: '2022-03-15T09:00:00.000Z',
|
|
2035
|
-
workerUser: {
|
|
2036
|
-
accountId: 'worker-sarah-123',
|
|
2037
|
-
externalId: 'emp-sarah-456',
|
|
2038
|
-
email: 'sarah.johnson@example.com'
|
|
2039
|
-
},
|
|
2040
|
-
customAndSensitiveData: 'Employee ID: EMP001234, Department: Engineering, Salary Grade: L5, Manager: Alex Rodriguez, Office Location: San Francisco HQ'
|
|
2041
|
-
}
|
|
2042
|
-
};
|
|
2043
|
-
const req = { objects: [workerObject] };
|
|
2044
|
-
const backendResponse = {
|
|
2045
|
-
accepted: [
|
|
2046
|
-
{
|
|
2047
|
-
entityType: 'atlassian:worker',
|
|
2048
|
-
entityId: { id: 'worker-1' },
|
|
2049
|
-
thirdPartyAri: 'ari:third-party:test::worker/worker-1'
|
|
2050
|
-
}
|
|
2051
|
-
]
|
|
2052
|
-
};
|
|
2053
|
-
const expected = {
|
|
2054
|
-
success: true,
|
|
2055
|
-
results: { accepted: backendResponse.accepted, rejected: undefined, validEntities: undefined }
|
|
2056
|
-
};
|
|
2057
|
-
mockFetch.mockResolvedValueOnce({
|
|
2058
|
-
ok: true,
|
|
2059
|
-
json: () => Promise.resolve(backendResponse)
|
|
2060
|
-
});
|
|
2061
|
-
const result = await graphClient.setObjects(req);
|
|
2062
|
-
expect(mockFetch).toHaveBeenCalledWith((0, endpoints_1.getFullPath)(endpoints_1.ENDPOINTS.OBJECTS.BULK), expect.objectContaining({ method: 'POST' }));
|
|
2063
|
-
expect(result).toEqual(expected);
|
|
2064
|
-
});
|
|
2065
1905
|
it('posts dashboard entities to /api/v1/entities/bulk and returns response', async () => {
|
|
2066
1906
|
const dashboardObject = {
|
|
2067
1907
|
schemaVersion: '2.0',
|
|
@@ -2206,7 +2046,8 @@ describe('TeamWorkGraphClient - bulk entities', () => {
|
|
|
2206
2046
|
'atlassian:test-execution': {
|
|
2207
2047
|
status: 'passed',
|
|
2208
2048
|
version: '1.2.0',
|
|
2209
|
-
environment: 'staging'
|
|
2049
|
+
environment: 'staging',
|
|
2050
|
+
testType: 'unit'
|
|
2210
2051
|
}
|
|
2211
2052
|
};
|
|
2212
2053
|
const req = { objects: [testExecutionObject] };
|
|
@@ -47,4 +47,99 @@ describe('TeamWorkGraphClient - Error Handling Functions', () => {
|
|
|
47
47
|
expect(deleteResult.originalError).toBe(error);
|
|
48
48
|
});
|
|
49
49
|
});
|
|
50
|
+
describe('handleResponseError', () => {
|
|
51
|
+
test('should extract trace ID from atl-traceid header and include it in error message', async () => {
|
|
52
|
+
const mockResponse = {
|
|
53
|
+
ok: false,
|
|
54
|
+
status: 500,
|
|
55
|
+
statusText: 'Internal Server Error',
|
|
56
|
+
headers: {
|
|
57
|
+
get: jest.fn((headerName) => {
|
|
58
|
+
if (headerName === 'atl-traceid') {
|
|
59
|
+
return 'trace-12345-abcdef';
|
|
60
|
+
}
|
|
61
|
+
return null;
|
|
62
|
+
})
|
|
63
|
+
},
|
|
64
|
+
json: jest.fn().mockResolvedValue({
|
|
65
|
+
message: 'Something went wrong',
|
|
66
|
+
code: 'INTERNAL_ERROR'
|
|
67
|
+
})
|
|
68
|
+
};
|
|
69
|
+
try {
|
|
70
|
+
await (0, error_handling_1.handleResponseError)(mockResponse, 'API request failed');
|
|
71
|
+
}
|
|
72
|
+
catch (error) {
|
|
73
|
+
expect(error).toBeInstanceOf(errors_1.ForgeTeamWorkGraphAPIError);
|
|
74
|
+
expect(error.message).toContain('Internal Server Error - Something went wrong');
|
|
75
|
+
expect(error.message).toContain('(Trace ID: trace-12345-abcdef)');
|
|
76
|
+
expect(error.traceId).toBe('trace-12345-abcdef');
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
test('should handle response without trace ID', async () => {
|
|
80
|
+
const mockResponse = {
|
|
81
|
+
ok: false,
|
|
82
|
+
status: 404,
|
|
83
|
+
statusText: 'Not Found',
|
|
84
|
+
headers: {
|
|
85
|
+
get: jest.fn(() => null)
|
|
86
|
+
},
|
|
87
|
+
json: jest.fn().mockResolvedValue({
|
|
88
|
+
message: 'Resource not found'
|
|
89
|
+
})
|
|
90
|
+
};
|
|
91
|
+
try {
|
|
92
|
+
await (0, error_handling_1.handleResponseError)(mockResponse, 'API request failed');
|
|
93
|
+
}
|
|
94
|
+
catch (error) {
|
|
95
|
+
expect(error).toBeInstanceOf(errors_1.ForgeTeamWorkGraphAPIError);
|
|
96
|
+
expect(error.message).toContain('Not Found - Resource not found');
|
|
97
|
+
expect(error.message).not.toContain('Trace ID:');
|
|
98
|
+
expect(error.traceId).toBeUndefined();
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
test('should handle response with unparseable JSON and trace ID', async () => {
|
|
102
|
+
const mockResponse = {
|
|
103
|
+
ok: false,
|
|
104
|
+
status: 502,
|
|
105
|
+
statusText: 'Bad Gateway',
|
|
106
|
+
headers: {
|
|
107
|
+
get: jest.fn((headerName) => {
|
|
108
|
+
if (headerName === 'atl-traceid') {
|
|
109
|
+
return 'trace-99999-xyz';
|
|
110
|
+
}
|
|
111
|
+
return null;
|
|
112
|
+
})
|
|
113
|
+
},
|
|
114
|
+
json: jest.fn().mockRejectedValue(new Error('Invalid JSON'))
|
|
115
|
+
};
|
|
116
|
+
try {
|
|
117
|
+
await (0, error_handling_1.handleResponseError)(mockResponse, 'API request failed');
|
|
118
|
+
}
|
|
119
|
+
catch (error) {
|
|
120
|
+
expect(error).toBeInstanceOf(errors_1.ForgeTeamWorkGraphAPIError);
|
|
121
|
+
expect(error.message).toContain('Bad Gateway - API request failed: HTTP 502 - Bad Gateway');
|
|
122
|
+
expect(error.message).toContain('(Trace ID: trace-99999-xyz)');
|
|
123
|
+
expect(error.traceId).toBe('trace-99999-xyz');
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
describe('ForgeTeamWorkGraphAPIError with trace ID', () => {
|
|
128
|
+
test('should create API error with trace ID', () => {
|
|
129
|
+
const error = new errors_1.ForgeTeamWorkGraphAPIError('Test error message', 500, { details: 'Some details' }, 'trace-12345');
|
|
130
|
+
expect(error.message).toBe('Test error message');
|
|
131
|
+
expect(error.status).toBe(500);
|
|
132
|
+
expect(error.responseBody).toEqual({ details: 'Some details' });
|
|
133
|
+
expect(error.traceId).toBe('trace-12345');
|
|
134
|
+
expect(error.code).toBe('API_ERROR');
|
|
135
|
+
});
|
|
136
|
+
test('should create API error without trace ID', () => {
|
|
137
|
+
const error = new errors_1.ForgeTeamWorkGraphAPIError('Test error message', 400, { details: 'Some details' });
|
|
138
|
+
expect(error.message).toBe('Test error message');
|
|
139
|
+
expect(error.status).toBe(400);
|
|
140
|
+
expect(error.responseBody).toEqual({ details: 'Some details' });
|
|
141
|
+
expect(error.traceId).toBeUndefined();
|
|
142
|
+
expect(error.code).toBe('API_ERROR');
|
|
143
|
+
});
|
|
144
|
+
});
|
|
50
145
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseObjectProperties } from './common';
|
|
1
|
+
import { BaseObjectProperties, ContainerKeyObject } from './common';
|
|
2
2
|
import { CommitObject } from './commit';
|
|
3
3
|
export declare type BranchAttributes = {
|
|
4
4
|
name?: string;
|
|
@@ -7,6 +7,9 @@ export declare type BranchAttributes = {
|
|
|
7
7
|
};
|
|
8
8
|
export declare type BranchObject = BaseObjectProperties & {
|
|
9
9
|
displayName: string;
|
|
10
|
+
containerKey: ContainerKeyObject & {
|
|
11
|
+
type: 'atlassian:repository';
|
|
12
|
+
};
|
|
10
13
|
lastUpdatedAt: string;
|
|
11
14
|
permissions: NonNullable<BaseObjectProperties['permissions']>;
|
|
12
15
|
'atlassian:branch': BranchAttributes;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"branch.d.ts","sourceRoot":"","sources":["../../../src/types/objects/branch.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"branch.d.ts","sourceRoot":"","sources":["../../../src/types/objects/branch.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,oBAAY,gBAAgB,GAAG;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,YAAY,CAAC;IAC1B,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AAEF,oBAAY,YAAY,GAAG,oBAAoB,GAAG;IAChD,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,kBAAkB,GAAG;QAAE,IAAI,EAAE,sBAAsB,CAAA;KAAE,CAAC;IACpE,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,WAAW,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAC,CAAC;IAC9D,kBAAkB,EAAE,gBAAgB,CAAC;CACtC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseObjectProperties, UserReference } from './common';
|
|
1
|
+
import { BaseObjectProperties, ContainerKeyObject, UserReference } from './common';
|
|
2
2
|
export declare type FileInfo = {
|
|
3
3
|
path: string;
|
|
4
4
|
url: string;
|
|
@@ -18,6 +18,9 @@ export declare type CommitAttributes = {
|
|
|
18
18
|
};
|
|
19
19
|
export declare type CommitObject = BaseObjectProperties & {
|
|
20
20
|
displayName: string;
|
|
21
|
+
containerKey: ContainerKeyObject & {
|
|
22
|
+
type: 'atlassian:repository';
|
|
23
|
+
};
|
|
21
24
|
lastUpdatedAt: string;
|
|
22
25
|
permissions: NonNullable<BaseObjectProperties['permissions']>;
|
|
23
26
|
'atlassian:commit': CommitAttributes;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commit.d.ts","sourceRoot":"","sources":["../../../src/types/objects/commit.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"commit.d.ts","sourceRoot":"","sources":["../../../src/types/objects/commit.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEnF,oBAAY,QAAQ,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,oBAAY,gBAAgB,GAAG;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,oBAAY,YAAY,GAAG,oBAAoB,GAAG;IAChD,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,kBAAkB,GAAG;QAAE,IAAI,EAAE,sBAAsB,CAAA;KAAE,CAAC;IACpE,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,WAAW,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAC,CAAC;IAC9D,kBAAkB,EAAE,gBAAgB,CAAC;CACtC,CAAC"}
|
|
@@ -14,15 +14,11 @@ export declare type Permissions = {
|
|
|
14
14
|
};
|
|
15
15
|
export declare type ContainerKeyObject = {
|
|
16
16
|
type: string;
|
|
17
|
-
value:
|
|
18
|
-
entityId: string;
|
|
19
|
-
};
|
|
17
|
+
value: Record<string, string>;
|
|
20
18
|
};
|
|
21
19
|
export declare type ParentKeyObject = {
|
|
22
20
|
type: string;
|
|
23
|
-
value:
|
|
24
|
-
entityId: string;
|
|
25
|
-
};
|
|
21
|
+
value: Record<string, string>;
|
|
26
22
|
};
|
|
27
23
|
export declare type BaseObjectProperties = {
|
|
28
24
|
schemaVersion: string;
|
|
@@ -48,6 +44,7 @@ export declare type AssociationObject = {
|
|
|
48
44
|
values: string[];
|
|
49
45
|
};
|
|
50
46
|
export declare type Associations = {
|
|
47
|
+
updateSequenceNumber?: number;
|
|
51
48
|
lastUpdatedAt: string;
|
|
52
49
|
set: AssociationObject[];
|
|
53
50
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/types/objects/common.ts"],"names":[],"mappings":"AAAA,oBAAY,SAAS,GAAG;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,oBAAY,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEvC,oBAAY,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,qBAAqB,GAAG,WAAW,CAAC;IAC1E,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACpB,CAAC;AAEF,oBAAY,aAAa,GAAG;IAC1B,UAAU,EAAE,SAAS,EAAE,CAAC;CACzB,CAAC;AAEF,oBAAY,WAAW,GAAG;IACxB,cAAc,EAAE,aAAa,EAAE,CAAC;CACjC,CAAC;AAGF,oBAAY,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/types/objects/common.ts"],"names":[],"mappings":"AAAA,oBAAY,SAAS,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C,EAAE,kBAAkB,GAAG,MAAM,CAAC;IAC3C,WAAW,EAAE,WAAW,EAAE,GAAG,WAAW,CAAC;IACzC,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC,CAAC;AAEF,oBAAY,iBAAiB,GAAG;IAC9B,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAEF,oBAAY,YAAY,GAAG;IACzB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,aAAa,EAAE,MAAM,CAAC;IACtB,GAAG,EAAE,iBAAiB,EAAE,CAAC;CAC1B,CAAC;AAEF,oBAAY,aAAa,GAAG;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC"}
|
|
@@ -11,8 +11,6 @@ import { DeploymentObject } from './deployment';
|
|
|
11
11
|
import { DesignObject } from './design';
|
|
12
12
|
import { DocumentObject } from './document';
|
|
13
13
|
import { MessageObject } from './message';
|
|
14
|
-
import { OrganisationObject } from './organisation';
|
|
15
|
-
import { PositionObject } from './position';
|
|
16
14
|
import { ProjectObject } from './project';
|
|
17
15
|
import { PullRequestObject } from './pull-request';
|
|
18
16
|
import { RemoteLinkObject } from './remote-link';
|
|
@@ -25,7 +23,6 @@ import { TestPlanObject } from './test-plan';
|
|
|
25
23
|
import { TestRunObject } from './test-run';
|
|
26
24
|
import { VideoObject } from './video';
|
|
27
25
|
import { WorkItemObject } from './work-item';
|
|
28
|
-
|
|
29
|
-
export
|
|
30
|
-
export declare type Object = BranchObject | BuildObject | CalendarEventObject | CommentObject | CommitObject | ConversationObject | CustomerOrgObject | DashboardObject | DealObject | DeploymentObject | DesignObject | DocumentObject | MessageObject | OrganisationObject | PositionObject | ProjectObject | PullRequestObject | RemoteLinkObject | RepositoryObject | SoftwareServiceObject | SpaceObject | TestObject | TestExecutionObject | TestPlanObject | TestRunObject | VideoObject | WorkItemObject | WorkerObject;
|
|
26
|
+
export { BranchObject, BuildObject, CalendarEventObject, CommentObject, CommitObject, ConversationObject, CustomerOrgObject, DashboardObject, DealObject, DeploymentObject, DesignObject, DocumentObject, MessageObject, ProjectObject, PullRequestObject, RemoteLinkObject, RepositoryObject, SoftwareServiceObject, SpaceObject, TestObject, TestExecutionObject, TestPlanObject, TestRunObject, VideoObject, WorkItemObject };
|
|
27
|
+
export declare type Object = BranchObject | BuildObject | CalendarEventObject | CommentObject | CommitObject | ConversationObject | CustomerOrgObject | DashboardObject | DealObject | DeploymentObject | DesignObject | DocumentObject | MessageObject | ProjectObject | PullRequestObject | RemoteLinkObject | RepositoryObject | SoftwareServiceObject | SpaceObject | TestObject | TestExecutionObject | TestPlanObject | TestRunObject | VideoObject | WorkItemObject;
|
|
31
28
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/objects/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,YAA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C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7C,OAAO,EACL,YAAY,EACZ,WAAW,EACX,mBAAmB,EACnB,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,qBAAqB,EACrB,WAAW,EACX,UAAU,EACV,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,WAAW,EACX,cAAc,EACf,CAAC;AAGF,oBAAY,MAAM,GACd,YAAY,GACZ,WAAW,GACX,mBAAmB,GACnB,aAAa,GACb,YAAY,GACZ,kBAAkB,GAClB,iBAAiB,GACjB,eAAe,GACf,UAAU,GACV,gBAAgB,GAChB,YAAY,GACZ,cAAc,GACd,aAAa,GACb,aAAa,GACb,iBAAiB,GACjB,gBAAgB,GAChB,gBAAgB,GAChB,qBAAqB,GACrB,WAAW,GACX,UAAU,GACV,mBAAmB,GACnB,cAAc,GACd,aAAa,GACb,WAAW,GACX,cAAc,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { BaseObjectProperties } from './common';
|
|
2
2
|
export declare type TestExecutionAttributes = {
|
|
3
|
-
status
|
|
3
|
+
status: string;
|
|
4
4
|
version?: string;
|
|
5
5
|
environment?: string;
|
|
6
|
+
testType: string;
|
|
6
7
|
};
|
|
7
8
|
export declare type TestExecutionObject = BaseObjectProperties & {
|
|
8
9
|
displayName: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-execution.d.ts","sourceRoot":"","sources":["../../../src/types/objects/test-execution.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEhD,oBAAY,uBAAuB,GAAG;IACpC,MAAM,
|
|
1
|
+
{"version":3,"file":"test-execution.d.ts","sourceRoot":"","sources":["../../../src/types/objects/test-execution.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEhD,oBAAY,uBAAuB,GAAG;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,oBAAY,mBAAmB,GAAG,oBAAoB,GAAG;IACvD,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,WAAW,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAC,CAAC;IAC9D,0BAA0B,EAAE,uBAAuB,CAAC;CACrD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-handling.d.ts","sourceRoot":"","sources":["../../src/utils/error-handling.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAgBzC,wBAAsB,mBAAmB,CAAC,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"error-handling.d.ts","sourceRoot":"","sources":["../../src/utils/error-handling.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAgBzC,wBAAsB,mBAAmB,CAAC,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CA4DhG;AAwBD,wBAAgB,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,GAAG,CAAC,CAQnE"}
|
|
@@ -4,6 +4,7 @@ exports.handleError = exports.handleResponseError = void 0;
|
|
|
4
4
|
const errors_1 = require("./errors");
|
|
5
5
|
async function handleResponseError(response, context) {
|
|
6
6
|
let errorDetails;
|
|
7
|
+
const traceId = response.headers.get('atl-traceid') ?? undefined;
|
|
7
8
|
try {
|
|
8
9
|
const responseBody = await response.json();
|
|
9
10
|
errorDetails = {
|
|
@@ -48,7 +49,10 @@ async function handleResponseError(response, context) {
|
|
|
48
49
|
default:
|
|
49
50
|
errorMessage = `HTTP ${response.status} - ${errorDetails.message}`;
|
|
50
51
|
}
|
|
51
|
-
|
|
52
|
+
if (traceId) {
|
|
53
|
+
errorMessage += ` (Trace ID: ${traceId})`;
|
|
54
|
+
}
|
|
55
|
+
throw new errors_1.ForgeTeamWorkGraphAPIError(errorMessage, response.status, errorDetails.details, traceId);
|
|
52
56
|
}
|
|
53
57
|
exports.handleResponseError = handleResponseError;
|
|
54
58
|
function createErrorMessage(error, operation) {
|
package/out/utils/errors.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export declare class ForgeTeamWorkGraphNetworkError extends ForgeTeamWorkGraphEr
|
|
|
13
13
|
export declare class ForgeTeamWorkGraphAPIError extends ForgeTeamWorkGraphError {
|
|
14
14
|
readonly status: number;
|
|
15
15
|
readonly responseBody?: any;
|
|
16
|
-
|
|
16
|
+
readonly traceId?: string;
|
|
17
|
+
constructor(message: string, status: number, responseBody?: any, traceId?: string);
|
|
17
18
|
}
|
|
18
19
|
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/utils/errors.ts"],"names":[],"mappings":"AAGA,qBAAa,uBAAwB,SAAQ,KAAK;IAChD,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B,SAAgB,KAAK,CAAC,EAAE,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IACnC,SAAgB,OAAO,CAAC,EAAE,MAAM,CAAC;gBAErB,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,MAAM;CAMlF"}
|
package/out/utils/errors.js
CHANGED
|
@@ -29,10 +29,12 @@ exports.ForgeTeamWorkGraphNetworkError = ForgeTeamWorkGraphNetworkError;
|
|
|
29
29
|
class ForgeTeamWorkGraphAPIError extends ForgeTeamWorkGraphError {
|
|
30
30
|
status;
|
|
31
31
|
responseBody;
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
traceId;
|
|
33
|
+
constructor(message, status, responseBody, traceId) {
|
|
34
|
+
super(message, 'API_ERROR', undefined, { status, responseBody, traceId });
|
|
34
35
|
this.status = status;
|
|
35
36
|
this.responseBody = responseBody;
|
|
37
|
+
this.traceId = traceId;
|
|
36
38
|
}
|
|
37
39
|
}
|
|
38
40
|
exports.ForgeTeamWorkGraphAPIError = ForgeTeamWorkGraphAPIError;
|
package/package.json
CHANGED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { BaseObjectProperties } from './common';
|
|
2
|
-
export declare type OrganisationAttributes = {};
|
|
3
|
-
export declare type OrganisationObject = BaseObjectProperties & {
|
|
4
|
-
displayName: string;
|
|
5
|
-
lastUpdatedAt: string;
|
|
6
|
-
permissions: NonNullable<BaseObjectProperties['permissions']>;
|
|
7
|
-
'atlassian:organisation': OrganisationAttributes;
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=organisation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"organisation.d.ts","sourceRoot":"","sources":["../../../src/types/objects/organisation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEhD,oBAAY,sBAAsB,GAAG,EAAE,CAAC;AAExC,oBAAY,kBAAkB,GAAG,oBAAoB,GAAG;IACtD,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,WAAW,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAC,CAAC;IAC9D,wBAAwB,EAAE,sBAAsB,CAAC;CAClD,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { BaseObjectProperties, ParentKeyObject, Associations } from './common';
|
|
2
|
-
export declare type PositionAttributes = {
|
|
3
|
-
customAndSensitiveData?: string;
|
|
4
|
-
status: string;
|
|
5
|
-
jobTitle?: string;
|
|
6
|
-
};
|
|
7
|
-
export declare type PositionObject = BaseObjectProperties & {
|
|
8
|
-
displayName: string;
|
|
9
|
-
lastUpdatedAt: string;
|
|
10
|
-
permissions: NonNullable<BaseObjectProperties['permissions']>;
|
|
11
|
-
parentKey: ParentKeyObject & {
|
|
12
|
-
type: 'atlassian:organisation';
|
|
13
|
-
};
|
|
14
|
-
associations: Associations & {
|
|
15
|
-
set: [
|
|
16
|
-
{
|
|
17
|
-
associationType: 'atlassian:worker';
|
|
18
|
-
values: [string] | [];
|
|
19
|
-
}
|
|
20
|
-
];
|
|
21
|
-
};
|
|
22
|
-
'atlassian:position': PositionAttributes;
|
|
23
|
-
};
|
|
24
|
-
//# sourceMappingURL=position.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"position.d.ts","sourceRoot":"","sources":["../../../src/types/objects/position.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE/E,oBAAY,kBAAkB,GAAG;IAC/B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,oBAAY,cAAc,GAAG,oBAAoB,GAAG;IAClD,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,WAAW,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAC,CAAC;IAC9D,SAAS,EAAE,eAAe,GAAG;QAAE,IAAI,EAAE,wBAAwB,CAAA;KAAE,CAAC;IAChE,YAAY,EAAE,YAAY,GAAG;QAC3B,GAAG,EAAE;YACH;gBACE,eAAe,EAAE,kBAAkB,CAAC;gBACpC,MAAM,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;aACvB;SACF,CAAC;KACH,CAAC;IACF,oBAAoB,EAAE,kBAAkB,CAAC;CAC1C,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { BaseObjectProperties, UserReference } from './common';
|
|
2
|
-
export declare type WorkerAttributes = {
|
|
3
|
-
hiredAt: string;
|
|
4
|
-
workerUser: UserReference;
|
|
5
|
-
customAndSensitiveData?: string;
|
|
6
|
-
};
|
|
7
|
-
export declare type WorkerObject = BaseObjectProperties & {
|
|
8
|
-
displayName: string;
|
|
9
|
-
lastUpdatedAt: string;
|
|
10
|
-
permissions: NonNullable<BaseObjectProperties['permissions']>;
|
|
11
|
-
'atlassian:worker': WorkerAttributes;
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=worker.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../../../src/types/objects/worker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE/D,oBAAY,gBAAgB,GAAG;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,aAAa,CAAC;IAC1B,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC,CAAC;AAEF,oBAAY,YAAY,GAAG,oBAAoB,GAAG;IAChD,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,WAAW,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAC,CAAC;IAC9D,kBAAkB,EAAE,gBAAgB,CAAC;CACtC,CAAC"}
|