@forge/teamwork-graph 2.0.0-next.7 → 2.1.0-next.0
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/README.md +289 -174
- package/out/__test__/entity-operations.test.js +468 -420
- package/out/__test__/error-handling.test.js +9 -9
- package/out/__test__/validators.test.js +43 -43
- package/out/graph.d.ts +5 -5
- package/out/graph.d.ts.map +1 -1
- package/out/graph.js +19 -19
- package/out/types/graph.d.ts +5 -5
- package/out/types/graph.d.ts.map +1 -1
- package/out/types/index.d.ts +2 -2
- package/out/types/index.d.ts.map +1 -1
- package/out/types/index.js +2 -2
- package/out/types/objects/branch.d.ts +14 -0
- package/out/types/objects/branch.d.ts.map +1 -0
- package/out/types/{entities → objects}/build.d.ts +3 -3
- package/out/types/objects/build.d.ts.map +1 -0
- package/out/types/{entities → objects}/calendar-event.d.ts +3 -3
- package/out/types/objects/calendar-event.d.ts.map +1 -0
- package/out/types/{entities → objects}/comment.d.ts +4 -4
- package/out/types/objects/comment.d.ts.map +1 -0
- package/out/types/{entities → objects}/commit.d.ts +3 -3
- package/out/types/objects/commit.d.ts.map +1 -0
- package/out/types/{common.d.ts → objects/common.d.ts} +7 -10
- package/out/types/objects/common.d.ts.map +1 -0
- package/out/types/{entities → objects}/conversation.d.ts +3 -3
- package/out/types/objects/conversation.d.ts.map +1 -0
- package/out/types/{entities → objects}/customer-org.d.ts +3 -3
- package/out/types/objects/customer-org.d.ts.map +1 -0
- package/out/types/{entities → objects}/deal.d.ts +3 -3
- package/out/types/objects/deal.d.ts.map +1 -0
- package/out/types/{entities → objects}/deployment.d.ts +3 -3
- package/out/types/objects/deployment.d.ts.map +1 -0
- package/out/types/{entities → objects}/design.d.ts +3 -3
- package/out/types/objects/design.d.ts.map +1 -0
- package/out/types/{entities → objects}/document.d.ts +3 -3
- package/out/types/objects/document.d.ts.map +1 -0
- package/out/types/objects/index.d.ts +26 -0
- package/out/types/objects/index.d.ts.map +1 -0
- package/out/types/{entities → objects}/message.d.ts +3 -3
- package/out/types/objects/message.d.ts.map +1 -0
- package/out/types/objects/organisation.d.ts +9 -0
- package/out/types/objects/organisation.d.ts.map +1 -0
- package/out/types/{entities → objects}/position.d.ts +3 -3
- package/out/types/objects/position.d.ts.map +1 -0
- package/out/types/{entities → objects}/project.d.ts +4 -4
- package/out/types/objects/project.d.ts.map +1 -0
- package/out/types/{entities → objects}/pull-request.d.ts +3 -3
- package/out/types/objects/pull-request.d.ts.map +1 -0
- package/out/types/{entities → objects}/remote-link.d.ts +3 -3
- package/out/types/objects/remote-link.d.ts.map +1 -0
- package/out/types/{entities → objects}/repository.d.ts +3 -3
- package/out/types/objects/repository.d.ts.map +1 -0
- package/out/types/{entities → objects}/software-service.d.ts +3 -3
- package/out/types/objects/software-service.d.ts.map +1 -0
- package/out/types/{entities → objects}/space.d.ts +3 -3
- package/out/types/objects/space.d.ts.map +1 -0
- package/out/types/{entities → objects}/video.d.ts +3 -3
- package/out/types/objects/video.d.ts.map +1 -0
- package/out/types/{entities → objects}/work-item.d.ts +3 -3
- package/out/types/objects/work-item.d.ts.map +1 -0
- package/out/types/{entities → objects}/worker.d.ts +3 -3
- package/out/types/objects/worker.d.ts.map +1 -0
- package/out/types/requests.d.ts +15 -15
- package/out/types/requests.d.ts.map +1 -1
- package/out/utils/validators.d.ts +6 -6
- package/out/utils/validators.d.ts.map +1 -1
- package/out/utils/validators.js +16 -16
- package/package.json +2 -2
- package/out/types/common.d.ts.map +0 -1
- package/out/types/entities/branch.d.ts +0 -14
- package/out/types/entities/branch.d.ts.map +0 -1
- package/out/types/entities/build.d.ts.map +0 -1
- package/out/types/entities/calendar-event.d.ts.map +0 -1
- package/out/types/entities/comment.d.ts.map +0 -1
- package/out/types/entities/commit.d.ts.map +0 -1
- package/out/types/entities/conversation.d.ts.map +0 -1
- package/out/types/entities/customer-org.d.ts.map +0 -1
- package/out/types/entities/deal.d.ts.map +0 -1
- package/out/types/entities/deployment.d.ts.map +0 -1
- package/out/types/entities/design.d.ts.map +0 -1
- package/out/types/entities/document.d.ts.map +0 -1
- package/out/types/entities/index.d.ts +0 -26
- package/out/types/entities/index.d.ts.map +0 -1
- package/out/types/entities/message.d.ts.map +0 -1
- package/out/types/entities/organisation.d.ts +0 -9
- package/out/types/entities/organisation.d.ts.map +0 -1
- package/out/types/entities/position.d.ts.map +0 -1
- package/out/types/entities/project.d.ts.map +0 -1
- package/out/types/entities/pull-request.d.ts.map +0 -1
- package/out/types/entities/remote-link.d.ts.map +0 -1
- package/out/types/entities/repository.d.ts.map +0 -1
- package/out/types/entities/software-service.d.ts.map +0 -1
- package/out/types/entities/space.d.ts.map +0 -1
- package/out/types/entities/video.d.ts.map +0 -1
- package/out/types/entities/work-item.d.ts.map +0 -1
- package/out/types/entities/worker.d.ts.map +0 -1
- /package/out/types/{entities → objects}/branch.js +0 -0
- /package/out/types/{entities → objects}/build.js +0 -0
- /package/out/types/{entities → objects}/calendar-event.js +0 -0
- /package/out/types/{entities → objects}/comment.js +0 -0
- /package/out/types/{entities → objects}/commit.js +0 -0
- /package/out/types/{common.js → objects/common.js} +0 -0
- /package/out/types/{entities → objects}/conversation.js +0 -0
- /package/out/types/{entities → objects}/customer-org.js +0 -0
- /package/out/types/{entities → objects}/deal.js +0 -0
- /package/out/types/{entities → objects}/deployment.js +0 -0
- /package/out/types/{entities → objects}/design.js +0 -0
- /package/out/types/{entities → objects}/document.js +0 -0
- /package/out/types/{entities → objects}/index.js +0 -0
- /package/out/types/{entities → objects}/message.js +0 -0
- /package/out/types/{entities → objects}/organisation.js +0 -0
- /package/out/types/{entities → objects}/position.js +0 -0
- /package/out/types/{entities → objects}/project.js +0 -0
- /package/out/types/{entities → objects}/pull-request.js +0 -0
- /package/out/types/{entities → objects}/remote-link.js +0 -0
- /package/out/types/{entities → objects}/repository.js +0 -0
- /package/out/types/{entities → objects}/software-service.js +0 -0
- /package/out/types/{entities → objects}/space.js +0 -0
- /package/out/types/{entities → objects}/video.js +0 -0
- /package/out/types/{entities → objects}/work-item.js +0 -0
- /package/out/types/{entities → objects}/worker.js +0 -0
|
@@ -5,18 +5,18 @@ const errors_1 = require("../utils/errors");
|
|
|
5
5
|
describe('TeamWorkGraphClient - Error Handling Functions', () => {
|
|
6
6
|
describe('handleError', () => {
|
|
7
7
|
test('should handle validation errors correctly', () => {
|
|
8
|
-
const validationError = new errors_1.ForgeTeamWorkGraphValidationError('Invalid
|
|
9
|
-
const result = (0, error_handling_1.handleError)(validationError, 'set
|
|
8
|
+
const validationError = new errors_1.ForgeTeamWorkGraphValidationError('Invalid object data', 'objects');
|
|
9
|
+
const result = (0, error_handling_1.handleError)(validationError, 'set objects');
|
|
10
10
|
expect(result.success).toBe(false);
|
|
11
|
-
expect(result.error).toBe('Invalid
|
|
11
|
+
expect(result.error).toBe('Invalid object data');
|
|
12
12
|
expect(result.originalError).toBe(validationError);
|
|
13
13
|
expect(result.results).toBeUndefined();
|
|
14
14
|
});
|
|
15
15
|
test('should handle generic errors correctly', () => {
|
|
16
16
|
const genericError = new Error('Network timeout');
|
|
17
|
-
const result = (0, error_handling_1.handleError)(genericError, 'delete
|
|
17
|
+
const result = (0, error_handling_1.handleError)(genericError, 'delete objects');
|
|
18
18
|
expect(result.success).toBe(false);
|
|
19
|
-
expect(result.error).toBe('Failed to delete
|
|
19
|
+
expect(result.error).toBe('Failed to delete objects: Network timeout');
|
|
20
20
|
expect(result.originalError).toBe(genericError);
|
|
21
21
|
expect(result.results).toBeUndefined();
|
|
22
22
|
});
|
|
@@ -30,14 +30,14 @@ describe('TeamWorkGraphClient - Error Handling Functions', () => {
|
|
|
30
30
|
});
|
|
31
31
|
test('should work with different response types', () => {
|
|
32
32
|
const error = new Error('API rate limit exceeded');
|
|
33
|
-
const bulkResult = (0, error_handling_1.handleError)(error, 'set
|
|
34
|
-
const deleteResult = (0, error_handling_1.handleError)(error, 'delete
|
|
33
|
+
const bulkResult = (0, error_handling_1.handleError)(error, 'set objects');
|
|
34
|
+
const deleteResult = (0, error_handling_1.handleError)(error, 'delete objects');
|
|
35
35
|
const fetchResult = (0, error_handling_1.handleError)(error, 'fetch data');
|
|
36
36
|
expect(bulkResult.success).toBe(false);
|
|
37
37
|
expect(deleteResult.success).toBe(false);
|
|
38
38
|
expect(fetchResult.success).toBe(false);
|
|
39
|
-
expect(bulkResult.error).toBe('Failed to set
|
|
40
|
-
expect(deleteResult.error).toBe('Failed to delete
|
|
39
|
+
expect(bulkResult.error).toBe('Failed to set objects: API rate limit exceeded');
|
|
40
|
+
expect(deleteResult.error).toBe('Failed to delete objects: API rate limit exceeded');
|
|
41
41
|
expect(fetchResult.error).toBe('Failed to fetch data: API rate limit exceeded');
|
|
42
42
|
expect(bulkResult.originalError).toBe(error);
|
|
43
43
|
expect(deleteResult.originalError).toBe(error);
|
|
@@ -3,22 +3,22 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const validators_1 = require("../utils/validators");
|
|
4
4
|
const errors_1 = require("../utils/errors");
|
|
5
5
|
describe('TeamWorkGraphClient - Validators', () => {
|
|
6
|
-
describe('
|
|
7
|
-
it('should pass with valid
|
|
8
|
-
const
|
|
9
|
-
expect(() => (0, validators_1.
|
|
6
|
+
describe('validateSetObjectsRequest', () => {
|
|
7
|
+
it('should pass with valid objects array', () => {
|
|
8
|
+
const objects = [{ id: '1', name: 'Object 1' }];
|
|
9
|
+
expect(() => (0, validators_1.validateSetObjectsRequest)(objects)).not.toThrow();
|
|
10
10
|
});
|
|
11
11
|
it('should throw validation error for non-array input', () => {
|
|
12
|
-
expect(() => (0, validators_1.
|
|
13
|
-
expect(() => (0, validators_1.
|
|
14
|
-
expect(() => (0, validators_1.
|
|
12
|
+
expect(() => (0, validators_1.validateSetObjectsRequest)('invalid')).toThrow(errors_1.ForgeTeamWorkGraphValidationError);
|
|
13
|
+
expect(() => (0, validators_1.validateSetObjectsRequest)(null)).toThrow(errors_1.ForgeTeamWorkGraphValidationError);
|
|
14
|
+
expect(() => (0, validators_1.validateSetObjectsRequest)(undefined)).toThrow(errors_1.ForgeTeamWorkGraphValidationError);
|
|
15
15
|
});
|
|
16
16
|
it('should throw validation error for empty array', () => {
|
|
17
|
-
expect(() => (0, validators_1.
|
|
17
|
+
expect(() => (0, validators_1.validateSetObjectsRequest)([])).toThrow(errors_1.ForgeTeamWorkGraphValidationError);
|
|
18
18
|
});
|
|
19
19
|
it('should throw validation error for array exceeding max length', () => {
|
|
20
|
-
const
|
|
21
|
-
expect(() => (0, validators_1.
|
|
20
|
+
const objects = Array(validators_1.MAX_BULK_OBJECTS + 1).fill({ id: '1', name: 'Object' });
|
|
21
|
+
expect(() => (0, validators_1.validateSetObjectsRequest)(objects)).toThrow(errors_1.ForgeTeamWorkGraphValidationError);
|
|
22
22
|
});
|
|
23
23
|
});
|
|
24
24
|
describe('validateSetUsersRequest', () => {
|
|
@@ -57,24 +57,24 @@ describe('TeamWorkGraphClient - Validators', () => {
|
|
|
57
57
|
expect(() => (0, validators_1.validateSetGroupsRequest)(groups)).toThrow(errors_1.ForgeTeamWorkGraphValidationError);
|
|
58
58
|
});
|
|
59
59
|
});
|
|
60
|
-
describe('
|
|
60
|
+
describe('validateDeleteObjectsByExternalIdRequest', () => {
|
|
61
61
|
it('should pass with valid parameters', () => {
|
|
62
|
-
expect(() => (0, validators_1.
|
|
62
|
+
expect(() => (0, validators_1.validateDeleteObjectsByExternalIdRequest)('issue', ['1', '2'])).not.toThrow();
|
|
63
63
|
});
|
|
64
|
-
it('should throw validation error for empty
|
|
65
|
-
expect(() => (0, validators_1.
|
|
66
|
-
expect(() => (0, validators_1.
|
|
64
|
+
it('should throw validation error for empty objectType', () => {
|
|
65
|
+
expect(() => (0, validators_1.validateDeleteObjectsByExternalIdRequest)('', ['1'])).toThrow(errors_1.ForgeTeamWorkGraphValidationError);
|
|
66
|
+
expect(() => (0, validators_1.validateDeleteObjectsByExternalIdRequest)(' ', ['1'])).toThrow(errors_1.ForgeTeamWorkGraphValidationError);
|
|
67
67
|
});
|
|
68
68
|
it('should throw validation error for non-array externalIds', () => {
|
|
69
|
-
expect(() => (0, validators_1.
|
|
70
|
-
expect(() => (0, validators_1.
|
|
69
|
+
expect(() => (0, validators_1.validateDeleteObjectsByExternalIdRequest)('issue', 'invalid')).toThrow(errors_1.ForgeTeamWorkGraphValidationError);
|
|
70
|
+
expect(() => (0, validators_1.validateDeleteObjectsByExternalIdRequest)('issue', null)).toThrow(errors_1.ForgeTeamWorkGraphValidationError);
|
|
71
71
|
});
|
|
72
72
|
it('should throw validation error for empty externalIds array', () => {
|
|
73
|
-
expect(() => (0, validators_1.
|
|
73
|
+
expect(() => (0, validators_1.validateDeleteObjectsByExternalIdRequest)('issue', [])).toThrow(errors_1.ForgeTeamWorkGraphValidationError);
|
|
74
74
|
});
|
|
75
75
|
it('should throw validation error for array exceeding max length', () => {
|
|
76
|
-
const externalIds = Array(validators_1.
|
|
77
|
-
expect(() => (0, validators_1.
|
|
76
|
+
const externalIds = Array(validators_1.MAX_BULK_OBJECTS_DELETE + 1).fill('id');
|
|
77
|
+
expect(() => (0, validators_1.validateDeleteObjectsByExternalIdRequest)('issue', externalIds)).toThrow(errors_1.ForgeTeamWorkGraphValidationError);
|
|
78
78
|
});
|
|
79
79
|
});
|
|
80
80
|
describe('validateDeleteUsersByExternalIdRequest', () => {
|
|
@@ -103,17 +103,17 @@ describe('TeamWorkGraphClient - Validators', () => {
|
|
|
103
103
|
expect(() => (0, validators_1.validateDeleteGroupsByExternalIdRequest)([])).toThrow(errors_1.ForgeTeamWorkGraphValidationError);
|
|
104
104
|
});
|
|
105
105
|
});
|
|
106
|
-
describe('
|
|
106
|
+
describe('validateGetObjectByExternalIdRequest', () => {
|
|
107
107
|
it('should pass with valid parameters', () => {
|
|
108
|
-
expect(() => (0, validators_1.
|
|
108
|
+
expect(() => (0, validators_1.validateGetObjectByExternalIdRequest)('issue', '123')).not.toThrow();
|
|
109
109
|
});
|
|
110
|
-
it('should throw validation error for empty
|
|
111
|
-
expect(() => (0, validators_1.
|
|
112
|
-
expect(() => (0, validators_1.
|
|
110
|
+
it('should throw validation error for empty objectType', () => {
|
|
111
|
+
expect(() => (0, validators_1.validateGetObjectByExternalIdRequest)('', '123')).toThrow(errors_1.ForgeTeamWorkGraphValidationError);
|
|
112
|
+
expect(() => (0, validators_1.validateGetObjectByExternalIdRequest)(' ', '123')).toThrow(errors_1.ForgeTeamWorkGraphValidationError);
|
|
113
113
|
});
|
|
114
114
|
it('should throw validation error for empty externalId', () => {
|
|
115
|
-
expect(() => (0, validators_1.
|
|
116
|
-
expect(() => (0, validators_1.
|
|
115
|
+
expect(() => (0, validators_1.validateGetObjectByExternalIdRequest)('issue', '')).toThrow(errors_1.ForgeTeamWorkGraphValidationError);
|
|
116
|
+
expect(() => (0, validators_1.validateGetObjectByExternalIdRequest)('issue', ' ')).toThrow(errors_1.ForgeTeamWorkGraphValidationError);
|
|
117
117
|
});
|
|
118
118
|
});
|
|
119
119
|
describe('validateGetUserByExternalIdRequest', () => {
|
|
@@ -163,18 +163,18 @@ describe('TeamWorkGraphClient - Validators', () => {
|
|
|
163
163
|
expect(() => (0, validators_1.validateMapUsersRequest)(mappings)).toThrow(errors_1.ForgeTeamWorkGraphValidationError);
|
|
164
164
|
});
|
|
165
165
|
});
|
|
166
|
-
describe('
|
|
166
|
+
describe('validateDeleteObjectsByPropertiesRequest', () => {
|
|
167
167
|
it('should pass with valid properties object', () => {
|
|
168
168
|
const properties = { type: 'issue', status: 'open' };
|
|
169
|
-
expect(() => (0, validators_1.
|
|
169
|
+
expect(() => (0, validators_1.validateDeleteObjectsByPropertiesRequest)(properties)).not.toThrow();
|
|
170
170
|
});
|
|
171
171
|
it('should throw validation error for non-object input', () => {
|
|
172
|
-
expect(() => (0, validators_1.
|
|
173
|
-
expect(() => (0, validators_1.
|
|
174
|
-
expect(() => (0, validators_1.
|
|
172
|
+
expect(() => (0, validators_1.validateDeleteObjectsByPropertiesRequest)('invalid')).toThrow(errors_1.ForgeTeamWorkGraphValidationError);
|
|
173
|
+
expect(() => (0, validators_1.validateDeleteObjectsByPropertiesRequest)(null)).toThrow(errors_1.ForgeTeamWorkGraphValidationError);
|
|
174
|
+
expect(() => (0, validators_1.validateDeleteObjectsByPropertiesRequest)(undefined)).toThrow(errors_1.ForgeTeamWorkGraphValidationError);
|
|
175
175
|
});
|
|
176
176
|
it('should throw validation error for empty object', () => {
|
|
177
|
-
expect(() => (0, validators_1.
|
|
177
|
+
expect(() => (0, validators_1.validateDeleteObjectsByPropertiesRequest)({})).toThrow(errors_1.ForgeTeamWorkGraphValidationError);
|
|
178
178
|
});
|
|
179
179
|
});
|
|
180
180
|
describe('validateFetchDataRequest', () => {
|
|
@@ -296,24 +296,24 @@ describe('TeamWorkGraphClient - Validators', () => {
|
|
|
296
296
|
});
|
|
297
297
|
describe('Error Handling Integration', () => {
|
|
298
298
|
it('should handle validation errors with proper error types', () => {
|
|
299
|
-
expect(() => (0, validators_1.
|
|
299
|
+
expect(() => (0, validators_1.validateSetObjectsRequest)('invalid')).toThrow(errors_1.ForgeTeamWorkGraphValidationError);
|
|
300
300
|
try {
|
|
301
|
-
(0, validators_1.
|
|
301
|
+
(0, validators_1.validateSetObjectsRequest)([]);
|
|
302
302
|
}
|
|
303
303
|
catch (error) {
|
|
304
304
|
expect(error).toBeInstanceOf(errors_1.ForgeTeamWorkGraphValidationError);
|
|
305
|
-
expect(error.message).toContain('
|
|
305
|
+
expect(error.message).toContain('objects array cannot be empty');
|
|
306
306
|
}
|
|
307
307
|
});
|
|
308
308
|
it('should handle array max length validation with proper error details', () => {
|
|
309
|
-
const
|
|
309
|
+
const objects = Array(validators_1.MAX_BULK_OBJECTS + 1).fill({ id: '1' });
|
|
310
310
|
try {
|
|
311
|
-
(0, validators_1.
|
|
311
|
+
(0, validators_1.validateSetObjectsRequest)(objects);
|
|
312
312
|
}
|
|
313
313
|
catch (error) {
|
|
314
314
|
expect(error).toBeInstanceOf(errors_1.ForgeTeamWorkGraphValidationError);
|
|
315
|
-
expect(error.message).toContain(`supports maximum ${validators_1.
|
|
316
|
-
expect(error.message).toContain(`Received ${validators_1.
|
|
315
|
+
expect(error.message).toContain(`supports maximum ${validators_1.MAX_BULK_OBJECTS} objects`);
|
|
316
|
+
expect(error.message).toContain(`Received ${validators_1.MAX_BULK_OBJECTS + 1}`);
|
|
317
317
|
}
|
|
318
318
|
});
|
|
319
319
|
it('should handle user mapping validation with proper error details', () => {
|
|
@@ -328,16 +328,16 @@ describe('TeamWorkGraphClient - Validators', () => {
|
|
|
328
328
|
});
|
|
329
329
|
it('should handle required string validation with proper error details', () => {
|
|
330
330
|
try {
|
|
331
|
-
(0, validators_1.
|
|
331
|
+
(0, validators_1.validateGetObjectByExternalIdRequest)('', '123');
|
|
332
332
|
}
|
|
333
333
|
catch (error) {
|
|
334
334
|
expect(error).toBeInstanceOf(errors_1.ForgeTeamWorkGraphValidationError);
|
|
335
|
-
expect(error.message).toContain('
|
|
335
|
+
expect(error.message).toContain('objectType is required');
|
|
336
336
|
}
|
|
337
337
|
});
|
|
338
338
|
it('should handle object validation with proper error details', () => {
|
|
339
339
|
try {
|
|
340
|
-
(0, validators_1.
|
|
340
|
+
(0, validators_1.validateDeleteObjectsByPropertiesRequest)({});
|
|
341
341
|
}
|
|
342
342
|
catch (error) {
|
|
343
343
|
expect(error).toBeInstanceOf(errors_1.ForgeTeamWorkGraphValidationError);
|
package/out/graph.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { TeamWorkGraph,
|
|
1
|
+
import { TeamWorkGraph, SetObjectsRequest, BulkObjectResponse, BulkUsersRequest, BulkUsersResponse, DeleteUsersByExternalIdRequest, DeleteUsersByExternalIdResponse, GetUserByExternalIdRequest, GetUserByExternalIdResponse, MapUsersRequest, MapUsersResponse, BulkGroupsRequest, BulkGroupsResponse, DeleteGroupsByExternalIdRequest, DeleteGroupsByExternalIdResponse, GetGroupByExternalIdRequest, GetGroupByExternalIdResponse, GetObjectByExternalIdRequest, GetObjectByExternalIdResponse, DeleteObjectsByExternalIdRequest, DeleteObjectsByExternalIdResponse, DeleteObjectsByPropertiesRequest, DeleteObjectsByPropertiesResponse, FetchDataRequest, FetchDataResponse, TransformDataRequest, TransformDataResponse } from './types';
|
|
2
2
|
export declare class TeamWorkGraphClient implements TeamWorkGraph {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
setObjects: (request: SetObjectsRequest) => Promise<BulkObjectResponse>;
|
|
4
|
+
getObjectByExternalId: (request: GetObjectByExternalIdRequest) => Promise<GetObjectByExternalIdResponse>;
|
|
5
|
+
deleteObjectsByExternalId: (request: DeleteObjectsByExternalIdRequest) => Promise<DeleteObjectsByExternalIdResponse>;
|
|
6
|
+
deleteObjectsByProperties: (request: DeleteObjectsByPropertiesRequest) => Promise<DeleteObjectsByPropertiesResponse>;
|
|
7
7
|
setGroups: (request: BulkGroupsRequest) => Promise<BulkGroupsResponse>;
|
|
8
8
|
deleteGroupsByExternalId: (request: DeleteGroupsByExternalIdRequest) => Promise<DeleteGroupsByExternalIdResponse>;
|
|
9
9
|
getGroupByExternalId: (request: GetGroupByExternalIdRequest) => Promise<GetGroupByExternalIdResponse>;
|
package/out/graph.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../src/graph.ts"],"names":[],"mappings":"AAuBA,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,8BAA8B,EAC9B,+BAA+B,EAC/B,0BAA0B,EAC1B,2BAA2B,EAC3B,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,+BAA+B,EAC/B,gCAAgC,EAChC,2BAA2B,EAC3B,4BAA4B,EAC5B,4BAA4B,EAC5B,6BAA6B,EAC7B,iCAAiC,EACjC,
|
|
1
|
+
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../src/graph.ts"],"names":[],"m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F,aAAa,YAAmB,oBAAoB,KAAG,QAAQ,qBAAqB,CAAC,CAoBnF;YAEY,WAAW;CA2B1B;AAED,eAAO,MAAM,aAAa,qBAA4B,CAAC"}
|
package/out/graph.js
CHANGED
|
@@ -7,26 +7,26 @@ const validators_1 = require("./utils/validators");
|
|
|
7
7
|
const errors_1 = require("./utils/errors");
|
|
8
8
|
const STARGATE_BASE = '/graph/connector';
|
|
9
9
|
class TeamWorkGraphClient {
|
|
10
|
-
|
|
11
|
-
const {
|
|
12
|
-
(0, validators_1.
|
|
10
|
+
setObjects = async (request) => {
|
|
11
|
+
const { objects } = request;
|
|
12
|
+
(0, validators_1.validateSetObjectsRequest)(objects);
|
|
13
13
|
try {
|
|
14
14
|
const response = await this.sendRequest('/api/v1/entities/bulk', {
|
|
15
15
|
method: 'POST',
|
|
16
|
-
body: JSON.stringify({ entities })
|
|
16
|
+
body: JSON.stringify({ entities: objects })
|
|
17
17
|
});
|
|
18
18
|
return response;
|
|
19
19
|
}
|
|
20
20
|
catch (error) {
|
|
21
|
-
return (0, error_handling_1.handleError)(error, 'set
|
|
21
|
+
return (0, error_handling_1.handleError)(error, 'set objects');
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
|
-
|
|
25
|
-
const {
|
|
26
|
-
(0, validators_1.
|
|
24
|
+
getObjectByExternalId = async (request) => {
|
|
25
|
+
const { objectType, externalId } = request;
|
|
26
|
+
(0, validators_1.validateGetObjectByExternalIdRequest)(objectType, externalId);
|
|
27
27
|
try {
|
|
28
28
|
const url = new URL('/api/v1/entities', 'https://teamwork-graph.atlassian.net/api');
|
|
29
|
-
url.searchParams.set('entityType',
|
|
29
|
+
url.searchParams.set('entityType', objectType);
|
|
30
30
|
url.searchParams.set('externalId', externalId);
|
|
31
31
|
const path = url.pathname + url.search;
|
|
32
32
|
const response = await this.sendRequest(path, {
|
|
@@ -34,29 +34,29 @@ class TeamWorkGraphClient {
|
|
|
34
34
|
});
|
|
35
35
|
return {
|
|
36
36
|
success: true,
|
|
37
|
-
|
|
37
|
+
object: response
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
catch (error) {
|
|
41
|
-
return (0, error_handling_1.handleError)(error, 'get
|
|
41
|
+
return (0, error_handling_1.handleError)(error, 'get object by external ID');
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
|
-
|
|
45
|
-
const {
|
|
46
|
-
(0, validators_1.
|
|
44
|
+
deleteObjectsByExternalId = async (request) => {
|
|
45
|
+
const { objectType, externalIds } = request;
|
|
46
|
+
(0, validators_1.validateDeleteObjectsByExternalIdRequest)(objectType, externalIds);
|
|
47
47
|
try {
|
|
48
48
|
const response = await this.sendRequest('/api/v1/entities/bulk/delete', {
|
|
49
49
|
method: 'DELETE',
|
|
50
|
-
body: JSON.stringify({ entityType, externalIds })
|
|
50
|
+
body: JSON.stringify({ entityType: objectType, externalIds })
|
|
51
51
|
});
|
|
52
52
|
return response;
|
|
53
53
|
}
|
|
54
54
|
catch (error) {
|
|
55
|
-
return (0, error_handling_1.handleError)(error, 'delete
|
|
55
|
+
return (0, error_handling_1.handleError)(error, 'delete objects by external ID');
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
|
-
|
|
59
|
-
(0, validators_1.
|
|
58
|
+
deleteObjectsByProperties = async (request) => {
|
|
59
|
+
(0, validators_1.validateDeleteObjectsByPropertiesRequest)(request);
|
|
60
60
|
try {
|
|
61
61
|
const response = await this.sendRequest('/api/v1/entities/bulk/delete-by-properties', {
|
|
62
62
|
method: 'DELETE',
|
|
@@ -65,7 +65,7 @@ class TeamWorkGraphClient {
|
|
|
65
65
|
return response;
|
|
66
66
|
}
|
|
67
67
|
catch (error) {
|
|
68
|
-
return (0, error_handling_1.handleError)(error, 'delete
|
|
68
|
+
return (0, error_handling_1.handleError)(error, 'delete objects by properties');
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
71
|
setGroups = async (request) => {
|
package/out/types/graph.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SetObjectsRequest, BulkObjectResponse, BulkUsersRequest, BulkUsersResponse, DeleteUsersByExternalIdRequest, DeleteUsersByExternalIdResponse, GetUserByExternalIdRequest, GetUserByExternalIdResponse, MapUsersRequest, MapUsersResponse, BulkGroupsRequest, BulkGroupsResponse, DeleteGroupsByExternalIdRequest, DeleteGroupsByExternalIdResponse, GetGroupByExternalIdRequest, GetGroupByExternalIdResponse, GetObjectByExternalIdRequest, GetObjectByExternalIdResponse, DeleteObjectsByExternalIdRequest, DeleteObjectsByExternalIdResponse, DeleteObjectsByPropertiesRequest, DeleteObjectsByPropertiesResponse, FetchDataRequest, FetchDataResponse, TransformDataRequest, TransformDataResponse } from './';
|
|
2
2
|
export interface TeamWorkGraph {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
setObjects(request: SetObjectsRequest): Promise<BulkObjectResponse>;
|
|
4
|
+
getObjectByExternalId(request: GetObjectByExternalIdRequest): Promise<GetObjectByExternalIdResponse>;
|
|
5
|
+
deleteObjectsByExternalId(request: DeleteObjectsByExternalIdRequest): Promise<DeleteObjectsByExternalIdResponse>;
|
|
6
|
+
deleteObjectsByProperties(request: DeleteObjectsByPropertiesRequest): Promise<DeleteObjectsByPropertiesResponse>;
|
|
7
7
|
fetchData(request: FetchDataRequest): Promise<FetchDataResponse>;
|
|
8
8
|
transformData(request: TransformDataRequest): Promise<TransformDataResponse>;
|
|
9
9
|
setUsers(request: BulkUsersRequest): Promise<BulkUsersResponse>;
|
package/out/types/graph.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../src/types/graph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,8BAA8B,EAC9B,+BAA+B,EAC/B,0BAA0B,EAC1B,2BAA2B,EAC3B,eAAe,EACf,gBAAgB,EA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,OAAO,EAAE,8BAA8B,GAAG,OAAO,CAAC,+BAA+B,CAAC,CAAC;IAC3G,mBAAmB,CAAC,OAAO,EAAE,0BAA0B,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;IAC/F,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAG9D,SAAS,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACnE,wBAAwB,CAAC,OAAO,EAAE,+BAA+B,GAAG,OAAO,CAAC,gCAAgC,CAAC,CAAC;IAC9G,oBAAoB,CAAC,OAAO,EAAE,2BAA2B,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC;CACnG"}
|
package/out/types/index.d.ts
CHANGED
package/out/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AACA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AACA,cAAc,kBAAkB,CAAC;AAGjC,cAAc,WAAW,CAAC;AAG1B,cAAc,YAAY,CAAC;AAG3B,cAAc,SAAS,CAAC;AAGxB,cAAc,UAAU,CAAC;AAEzB,cAAc,SAAS,CAAC"}
|
package/out/types/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./common"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./
|
|
4
|
+
tslib_1.__exportStar(require("./objects/common"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./objects"), exports);
|
|
6
6
|
tslib_1.__exportStar(require("./requests"), exports);
|
|
7
7
|
tslib_1.__exportStar(require("./users"), exports);
|
|
8
8
|
tslib_1.__exportStar(require("./groups"), exports);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseObjectProperties } from './common';
|
|
2
|
+
import { CommitObject } from './commit';
|
|
3
|
+
export declare type BranchAttributes = {
|
|
4
|
+
name?: string;
|
|
5
|
+
lastCommit?: CommitObject;
|
|
6
|
+
createPullRequestUrl?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare type BranchObject = BaseObjectProperties & {
|
|
9
|
+
displayName: string;
|
|
10
|
+
lastUpdatedAt: string;
|
|
11
|
+
permissions: NonNullable<BaseObjectProperties['permissions']>;
|
|
12
|
+
'atlassian:branch': BranchAttributes;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=branch.d.ts.map
|
|
@@ -0,0 +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;AAChD,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,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 {
|
|
1
|
+
import { BaseObjectProperties } from './common';
|
|
2
2
|
export declare type TestInfo = {
|
|
3
3
|
totalNumber: number;
|
|
4
4
|
numberPassed: number;
|
|
@@ -24,10 +24,10 @@ export declare type BuildAttributes = {
|
|
|
24
24
|
testInfo?: TestInfo;
|
|
25
25
|
references?: BuildReferences[];
|
|
26
26
|
};
|
|
27
|
-
export declare type
|
|
27
|
+
export declare type BuildObject = BaseObjectProperties & {
|
|
28
28
|
displayName: string;
|
|
29
29
|
lastUpdatedAt: string;
|
|
30
|
-
permissions: NonNullable<
|
|
30
|
+
permissions: NonNullable<BaseObjectProperties['permissions']>;
|
|
31
31
|
'atlassian:build': BuildAttributes;
|
|
32
32
|
};
|
|
33
33
|
//# sourceMappingURL=build.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/types/objects/build.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEhD,oBAAY,QAAQ,GAAG;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,MAAM,CAAC,EAAE;QACP,EAAE,EAAE,MAAM,CAAC;QACX,aAAa,EAAE,MAAM,CAAC;KACvB,CAAC;IACF,GAAG,CAAC,EAAE;QACJ,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;CACH,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,UAAU,CAAC,EAAE,eAAe,EAAE,CAAC;CAChC,CAAC;AAEF,oBAAY,WAAW,GAAG,oBAAoB,GAAG;IAC/C,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,WAAW,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAC,CAAC;IAC9D,iBAAiB,EAAE,eAAe,CAAC;CACpC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseObjectProperties } from './common';
|
|
2
2
|
import { User } from '../users';
|
|
3
3
|
export declare type Attachment = {
|
|
4
4
|
url?: string;
|
|
@@ -34,12 +34,12 @@ export declare type CalendarEventAttributes = {
|
|
|
34
34
|
eventType: string;
|
|
35
35
|
attachments?: Attachment[];
|
|
36
36
|
};
|
|
37
|
-
export declare type
|
|
37
|
+
export declare type CalendarEventObject = BaseObjectProperties & {
|
|
38
38
|
displayName: string;
|
|
39
39
|
description: string;
|
|
40
40
|
createdBy: Partial<User>;
|
|
41
41
|
lastUpdatedAt: string;
|
|
42
|
-
permissions: NonNullable<
|
|
42
|
+
permissions: NonNullable<BaseObjectProperties['permissions']>;
|
|
43
43
|
'atlassian:calendar-event': CalendarEventAttributes;
|
|
44
44
|
};
|
|
45
45
|
//# sourceMappingURL=calendar-event.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar-event.d.ts","sourceRoot":"","sources":["../../../src/types/objects/calendar-event.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,oBAAY,UAAU,GAAG;IACvB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,oBAAY,QAAQ,GAAG;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UA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|
+
import { User } from '..';
|
|
3
3
|
export declare type Reaction = {
|
|
4
4
|
reactionType: string;
|
|
5
5
|
total: number;
|
|
@@ -8,11 +8,11 @@ export declare type CommentAttributes = {
|
|
|
8
8
|
text?: string;
|
|
9
9
|
reactionsV2?: Reaction[];
|
|
10
10
|
};
|
|
11
|
-
export declare type
|
|
11
|
+
export declare type CommentObject = Omit<BaseObjectProperties, 'description' | 'createdBy'> & {
|
|
12
12
|
displayName: string;
|
|
13
13
|
lastUpdatedAt: string;
|
|
14
14
|
createdBy: Partial<User>;
|
|
15
|
-
permissions: NonNullable<
|
|
15
|
+
permissions: NonNullable<BaseObjectProperties['permissions']>;
|
|
16
16
|
'atlassian:comment': CommentAttributes;
|
|
17
17
|
};
|
|
18
18
|
//# sourceMappingURL=comment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comment.d.ts","sourceRoot":"","sources":["../../../src/types/objects/comment.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAE1B,oBAAY,QAAQ,GAAG;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,oBAAY,iBAAiB,GAAG;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,QAAQ,EAAE,CAAC;CAC1B,CAAC;AAEF,oBAAY,aAAa,GAAG,IAAI,CAAC,oBAAoB,EAAE,aAAa,GAAG,WAAW,CAAC,GAAG;IACpF,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IACzB,WAAW,EAAE,WAAW,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAC,CAAC;IAC9D,mBAAmB,EAAE,iBAAiB,CAAC;CACxC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseObjectProperties } from './common';
|
|
2
2
|
import { User } from '../users';
|
|
3
3
|
export declare type FileInfo = {
|
|
4
4
|
path: string;
|
|
@@ -17,10 +17,10 @@ export declare type CommitAttributes = {
|
|
|
17
17
|
files: FileInfo[];
|
|
18
18
|
authorTimestamp?: string;
|
|
19
19
|
};
|
|
20
|
-
export declare type
|
|
20
|
+
export declare type CommitObject = BaseObjectProperties & {
|
|
21
21
|
displayName: string;
|
|
22
22
|
lastUpdatedAt: string;
|
|
23
|
-
permissions: NonNullable<
|
|
23
|
+
permissions: NonNullable<BaseObjectProperties['permissions']>;
|
|
24
24
|
'atlassian:commit': CommitAttributes;
|
|
25
25
|
};
|
|
26
26
|
//# sourceMappingURL=commit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commit.d.ts","sourceRoot":"","sources":["../../../src/types/objects/commit.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,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,IAAI,CAAC;IACd,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,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,WAAW,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAC,CAAC;IAC9D,kBAAkB,EAAE,gBAAgB,CAAC;CACtC,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { User } from '
|
|
1
|
+
import { User } from '..';
|
|
2
2
|
export declare type Thumbnail = {
|
|
3
3
|
externalUrl: string;
|
|
4
4
|
};
|
|
5
|
+
export declare type Action = 'READ' | 'SEARCH';
|
|
5
6
|
export declare type Principal = {
|
|
6
7
|
type: 'USER' | 'GROUP' | 'EVERYONE' | 'ATLASSIAN_WORKSPACE' | 'CONTAINER';
|
|
7
8
|
id?: string | null;
|
|
@@ -9,26 +10,22 @@ export declare type Principal = {
|
|
|
9
10
|
export declare type AccessControl = {
|
|
10
11
|
principals: Principal[];
|
|
11
12
|
};
|
|
12
|
-
export declare type SmartLinkViewedByUser = {
|
|
13
|
-
principalUser: Principal;
|
|
14
|
-
};
|
|
15
13
|
export declare type Permissions = {
|
|
16
|
-
accessControls
|
|
17
|
-
smartLinkViewedBy?: SmartLinkViewedByUser[];
|
|
14
|
+
accessControls: AccessControl[];
|
|
18
15
|
};
|
|
19
16
|
export declare type ContainerKeyObject = {
|
|
20
17
|
type: string;
|
|
21
18
|
value: {
|
|
22
|
-
|
|
19
|
+
objectId: string;
|
|
23
20
|
};
|
|
24
21
|
};
|
|
25
22
|
export declare type ParentKeyObject = {
|
|
26
23
|
type: string;
|
|
27
24
|
value: {
|
|
28
|
-
|
|
25
|
+
objectId: string;
|
|
29
26
|
};
|
|
30
27
|
};
|
|
31
|
-
export declare type
|
|
28
|
+
export declare type BaseObjectProperties = {
|
|
32
29
|
schemaVersion: string;
|
|
33
30
|
id: string;
|
|
34
31
|
updateSequenceNumber: number;
|
|
@@ -43,7 +40,7 @@ export declare type BaseEntityProperties = {
|
|
|
43
40
|
thumbnail?: Thumbnail;
|
|
44
41
|
parentKey?: ParentKeyObject | string;
|
|
45
42
|
containerKey?: ContainerKeyObject | string;
|
|
46
|
-
permissions
|
|
43
|
+
permissions: Permissions[];
|
|
47
44
|
associations?: Associations;
|
|
48
45
|
properties?: Record<string, any>;
|
|
49
46
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/types/objects/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAE1B,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;QACL,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;CACH,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE;QACL,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;CACH,CAAC;AAGF,oBAAY,oBAAoB,GAAG;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,oBAAoB,EAAE,MAAM,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,MAAM,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;IACzB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,CAAC,EAAE,eAAe,GAAG,MAAM,CAAC;IACrC,YAAY,CAAC,EAAE,kBAAkB,GAAG,MAAM,CAAC;IAC3C,WAAW,EAAE,WAAW,EAAE,CAAC;IAC3B,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,GAAG,EAAE,iBAAiB,EAAE,CAAC;CAC1B,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseObjectProperties } from './common';
|
|
2
2
|
export declare type User = {
|
|
3
3
|
accountId?: string;
|
|
4
4
|
email?: string;
|
|
@@ -19,10 +19,10 @@ export declare type ConversationAttributes = {
|
|
|
19
19
|
lastActive?: string;
|
|
20
20
|
memberCount?: number;
|
|
21
21
|
};
|
|
22
|
-
export declare type
|
|
22
|
+
export declare type ConversationObject = BaseObjectProperties & {
|
|
23
23
|
displayName: string;
|
|
24
24
|
lastUpdatedAt: string;
|
|
25
|
-
permissions: NonNullable<
|
|
25
|
+
permissions: NonNullable<BaseObjectProperties['permissions']>;
|
|
26
26
|
'atlassian:conversation': ConversationAttributes;
|
|
27
27
|
};
|
|
28
28
|
//# sourceMappingURL=conversation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../../src/types/objects/conversation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEhD,oBAAY,IAAI,GAAG;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,oBAAY,sBAAsB,GAAG;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,IAAI,EAAE,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,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,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseObjectProperties } from './common';
|
|
2
2
|
export declare type User = {
|
|
3
3
|
accountId?: string;
|
|
4
4
|
email?: string;
|
|
@@ -27,10 +27,10 @@ export declare type CustomerOrgAttributes = {
|
|
|
27
27
|
country?: string;
|
|
28
28
|
accountType?: string;
|
|
29
29
|
};
|
|
30
|
-
export declare type
|
|
30
|
+
export declare type CustomerOrgObject = BaseObjectProperties & {
|
|
31
31
|
displayName: string;
|
|
32
32
|
lastUpdatedAt: string;
|
|
33
|
-
permissions: NonNullable<
|
|
33
|
+
permissions: NonNullable<BaseObjectProperties['permissions']>;
|
|
34
34
|
'atlassian:customer-org': CustomerOrgAttributes;
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=customer-org.d.ts.map
|