@forge/teamwork-graph 4.2.6-next.0-experimental-2e302e1 → 4.2.7-experimental-04cc2b9
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 +1 -1
- package/out/graph.d.ts.map +1 -1
- package/out/types/groups.d.ts +3 -3
- package/out/types/groups.d.ts.map +1 -1
- package/out/types/objects/branch.d.ts +2 -2
- package/out/types/objects/branch.d.ts.map +1 -1
- package/out/types/objects/build.d.ts +5 -5
- package/out/types/objects/build.d.ts.map +1 -1
- package/out/types/objects/calendar-event.d.ts +4 -4
- package/out/types/objects/calendar-event.d.ts.map +1 -1
- package/out/types/objects/comment.d.ts +3 -3
- package/out/types/objects/comment.d.ts.map +1 -1
- package/out/types/objects/commit.d.ts +3 -3
- package/out/types/objects/commit.d.ts.map +1 -1
- package/out/types/objects/common.d.ts +15 -15
- package/out/types/objects/common.d.ts.map +1 -1
- package/out/types/objects/conversation.d.ts +2 -2
- package/out/types/objects/conversation.d.ts.map +1 -1
- package/out/types/objects/customer-org-category.d.ts +2 -2
- package/out/types/objects/customer-org-category.d.ts.map +1 -1
- package/out/types/objects/customer-org.d.ts +5 -5
- package/out/types/objects/customer-org.d.ts.map +1 -1
- package/out/types/objects/dashboard.d.ts +2 -2
- package/out/types/objects/dashboard.d.ts.map +1 -1
- package/out/types/objects/deal.d.ts +4 -4
- package/out/types/objects/deal.d.ts.map +1 -1
- package/out/types/objects/deployment.d.ts +1 -1
- package/out/types/objects/deployment.d.ts.map +1 -1
- package/out/types/objects/design.d.ts +4 -4
- package/out/types/objects/design.d.ts.map +1 -1
- package/out/types/objects/document.d.ts +7 -7
- package/out/types/objects/document.d.ts.map +1 -1
- package/out/types/objects/feature-flag.d.ts +8 -8
- package/out/types/objects/feature-flag.d.ts.map +1 -1
- package/out/types/objects/index.d.ts +1 -1
- package/out/types/objects/index.d.ts.map +1 -1
- package/out/types/objects/message.d.ts +3 -3
- package/out/types/objects/message.d.ts.map +1 -1
- package/out/types/objects/project.d.ts +2 -2
- package/out/types/objects/project.d.ts.map +1 -1
- package/out/types/objects/pull-request.d.ts +3 -3
- package/out/types/objects/pull-request.d.ts.map +1 -1
- package/out/types/objects/remote-link.d.ts +4 -4
- package/out/types/objects/remote-link.d.ts.map +1 -1
- package/out/types/objects/repository.d.ts +2 -2
- package/out/types/objects/repository.d.ts.map +1 -1
- package/out/types/objects/software-service.d.ts +2 -2
- package/out/types/objects/software-service.d.ts.map +1 -1
- package/out/types/objects/space.d.ts +3 -3
- package/out/types/objects/space.d.ts.map +1 -1
- package/out/types/objects/test-execution.d.ts +2 -2
- package/out/types/objects/test-execution.d.ts.map +1 -1
- package/out/types/objects/test-plan.d.ts +2 -2
- package/out/types/objects/test-plan.d.ts.map +1 -1
- package/out/types/objects/test-run.d.ts +2 -2
- package/out/types/objects/test-run.d.ts.map +1 -1
- package/out/types/objects/test-status.d.ts +3 -3
- package/out/types/objects/test-status.d.ts.map +1 -1
- package/out/types/objects/test.d.ts +2 -2
- package/out/types/objects/test.d.ts.map +1 -1
- package/out/types/objects/video.d.ts +2 -2
- package/out/types/objects/video.d.ts.map +1 -1
- package/out/types/objects/work-item.d.ts +3 -3
- package/out/types/objects/work-item.d.ts.map +1 -1
- package/out/types/orchestration.d.ts +5 -5
- package/out/types/orchestration.d.ts.map +1 -1
- package/out/types/relationships.d.ts +2 -2
- package/out/types/relationships.d.ts.map +1 -1
- package/out/types/requests.d.ts +44 -44
- package/out/types/requests.d.ts.map +1 -1
- package/out/types/requests.js +1 -1
- package/out/types/users.d.ts +7 -7
- package/out/types/users.d.ts.map +1 -1
- package/out/utils/endpoints.d.ts.map +1 -1
- package/out/utils/error-handling.js +2 -3
- package/out/utils/validators.js +29 -29
- package/package.json +12 -3
package/out/types/requests.d.ts
CHANGED
|
@@ -3,34 +3,34 @@ export declare enum OperationType {
|
|
|
3
3
|
BACKFILL = "BACKFILL",
|
|
4
4
|
NORMAL = "NORMAL"
|
|
5
5
|
}
|
|
6
|
-
export
|
|
6
|
+
export type SetObjectsRequest = {
|
|
7
7
|
objects: Array<Object>;
|
|
8
8
|
properties?: Record<string, string>;
|
|
9
9
|
operationType?: OperationType;
|
|
10
10
|
connectionId: string;
|
|
11
11
|
};
|
|
12
|
-
export
|
|
13
|
-
export
|
|
12
|
+
export type ObjectId = Record<string, string>;
|
|
13
|
+
export type ValidObject = {
|
|
14
14
|
entityType: string;
|
|
15
15
|
entityId: ObjectId;
|
|
16
16
|
};
|
|
17
|
-
export
|
|
17
|
+
export type AcceptedObject = {
|
|
18
18
|
entityType: string;
|
|
19
19
|
entityId: ObjectId;
|
|
20
20
|
};
|
|
21
|
-
export
|
|
21
|
+
export type RejectedObjectKey = {
|
|
22
22
|
entityType: string;
|
|
23
23
|
entityId: ObjectId;
|
|
24
24
|
};
|
|
25
|
-
export
|
|
25
|
+
export type ValidationError = {
|
|
26
26
|
message: string;
|
|
27
27
|
key: string;
|
|
28
28
|
};
|
|
29
|
-
export
|
|
29
|
+
export type RejectedObject = {
|
|
30
30
|
key: RejectedObjectKey;
|
|
31
31
|
errors: ValidationError[];
|
|
32
32
|
};
|
|
33
|
-
export
|
|
33
|
+
export type BulkObjectResponse = {
|
|
34
34
|
success: boolean;
|
|
35
35
|
results?: {
|
|
36
36
|
accepted?: AcceptedObject[];
|
|
@@ -40,42 +40,42 @@ export declare type BulkObjectResponse = {
|
|
|
40
40
|
error?: string;
|
|
41
41
|
originalError?: unknown;
|
|
42
42
|
};
|
|
43
|
-
export
|
|
43
|
+
export type GetObjectByExternalIdRequest = {
|
|
44
44
|
objectType: string;
|
|
45
45
|
externalId: string;
|
|
46
46
|
connectionId: string;
|
|
47
47
|
};
|
|
48
|
-
export
|
|
48
|
+
export type GetObjectByExternalIdResponse = {
|
|
49
49
|
success: boolean;
|
|
50
50
|
object?: Object;
|
|
51
51
|
error?: string;
|
|
52
52
|
originalError?: unknown;
|
|
53
53
|
};
|
|
54
|
-
export
|
|
54
|
+
export type DeleteObjectsByExternalIdRequest = {
|
|
55
55
|
objectType: string;
|
|
56
56
|
externalIds: string[];
|
|
57
57
|
connectionId: string;
|
|
58
58
|
};
|
|
59
|
-
export
|
|
59
|
+
export type DeleteObjectsByExternalIdResponse = {
|
|
60
60
|
success: boolean;
|
|
61
61
|
error?: string;
|
|
62
62
|
originalError?: unknown;
|
|
63
63
|
};
|
|
64
|
-
export
|
|
64
|
+
export type DeleteObjectsByPropertiesRequest = {
|
|
65
65
|
properties: Record<string, string>;
|
|
66
66
|
objectType: string;
|
|
67
67
|
connectionId: string;
|
|
68
68
|
};
|
|
69
|
-
export
|
|
69
|
+
export type DeleteObjectsByPropertiesResponse = {
|
|
70
70
|
success: boolean;
|
|
71
71
|
error?: string;
|
|
72
72
|
originalError?: unknown;
|
|
73
73
|
};
|
|
74
|
-
export
|
|
74
|
+
export type BulkUsersRequest = {
|
|
75
75
|
users: UserPayload[];
|
|
76
76
|
connectionId: string;
|
|
77
77
|
};
|
|
78
|
-
export
|
|
78
|
+
export type BulkUsersResponse = {
|
|
79
79
|
success: boolean;
|
|
80
80
|
results?: {
|
|
81
81
|
success: Array<{
|
|
@@ -93,11 +93,11 @@ export declare type BulkUsersResponse = {
|
|
|
93
93
|
error?: string;
|
|
94
94
|
originalError?: unknown;
|
|
95
95
|
};
|
|
96
|
-
export
|
|
96
|
+
export type DeleteUsersByExternalIdRequest = {
|
|
97
97
|
externalIds: string[];
|
|
98
98
|
connectionId: string;
|
|
99
99
|
};
|
|
100
|
-
export
|
|
100
|
+
export type DeleteUsersByExternalIdResponse = {
|
|
101
101
|
success: boolean;
|
|
102
102
|
results?: Array<{
|
|
103
103
|
externalId: string;
|
|
@@ -108,28 +108,28 @@ export declare type DeleteUsersByExternalIdResponse = {
|
|
|
108
108
|
error?: string;
|
|
109
109
|
originalError?: unknown;
|
|
110
110
|
};
|
|
111
|
-
export
|
|
111
|
+
export type GetUserByExternalIdRequest = {
|
|
112
112
|
externalId: string;
|
|
113
113
|
connectionId: string;
|
|
114
114
|
};
|
|
115
|
-
export
|
|
115
|
+
export type GetUserByExternalIdResponse = {
|
|
116
116
|
success: boolean;
|
|
117
117
|
user?: User;
|
|
118
118
|
error?: string;
|
|
119
119
|
originalError?: unknown;
|
|
120
120
|
};
|
|
121
|
-
export
|
|
121
|
+
export type UserMapping = {
|
|
122
122
|
externalId: string;
|
|
123
123
|
updateSequenceNumber: number;
|
|
124
124
|
updatedAt: number;
|
|
125
125
|
accountId?: string;
|
|
126
126
|
email?: string;
|
|
127
127
|
};
|
|
128
|
-
export
|
|
128
|
+
export type MapUsersRequest = {
|
|
129
129
|
directMappings: UserMapping[];
|
|
130
130
|
connectionId: string;
|
|
131
131
|
};
|
|
132
|
-
export
|
|
132
|
+
export type MapUsersResponse = {
|
|
133
133
|
success: boolean;
|
|
134
134
|
results?: {
|
|
135
135
|
success: {
|
|
@@ -151,21 +151,21 @@ export declare type MapUsersResponse = {
|
|
|
151
151
|
error?: string;
|
|
152
152
|
originalError?: unknown;
|
|
153
153
|
};
|
|
154
|
-
export
|
|
154
|
+
export type BulkGroupsRequest = {
|
|
155
155
|
groups: GroupPayload[];
|
|
156
156
|
connectionId: string;
|
|
157
157
|
};
|
|
158
|
-
export
|
|
158
|
+
export type GroupSuccessResult = {
|
|
159
159
|
externalId: string;
|
|
160
160
|
statusCode: number;
|
|
161
161
|
message: string;
|
|
162
162
|
};
|
|
163
|
-
export
|
|
163
|
+
export type GroupFailureResult = {
|
|
164
164
|
externalId: string;
|
|
165
165
|
statusCode: number;
|
|
166
166
|
errorMessage: string;
|
|
167
167
|
};
|
|
168
|
-
export
|
|
168
|
+
export type BulkGroupsResponse = {
|
|
169
169
|
success: boolean;
|
|
170
170
|
results?: {
|
|
171
171
|
success: Array<{
|
|
@@ -183,32 +183,32 @@ export declare type BulkGroupsResponse = {
|
|
|
183
183
|
error?: string;
|
|
184
184
|
originalError?: unknown;
|
|
185
185
|
};
|
|
186
|
-
export
|
|
186
|
+
export type DeleteGroupsByExternalIdRequest = {
|
|
187
187
|
externalIds: string[];
|
|
188
188
|
connectionId: string;
|
|
189
189
|
};
|
|
190
|
-
export
|
|
190
|
+
export type GroupDeleteResult = {
|
|
191
191
|
externalId: string;
|
|
192
192
|
statusCode?: number;
|
|
193
193
|
message?: string;
|
|
194
194
|
};
|
|
195
|
-
export
|
|
195
|
+
export type DeleteGroupsByExternalIdResponse = {
|
|
196
196
|
success: boolean;
|
|
197
197
|
results?: GroupDeleteResult[];
|
|
198
198
|
error?: string;
|
|
199
199
|
originalError?: unknown;
|
|
200
200
|
};
|
|
201
|
-
export
|
|
201
|
+
export type GetGroupByExternalIdRequest = {
|
|
202
202
|
externalId: string;
|
|
203
203
|
connectionId: string;
|
|
204
204
|
};
|
|
205
|
-
export
|
|
205
|
+
export type GetGroupByExternalIdResponse = {
|
|
206
206
|
success: boolean;
|
|
207
207
|
group?: Group;
|
|
208
208
|
error?: string;
|
|
209
209
|
originalError?: unknown;
|
|
210
210
|
};
|
|
211
|
-
export
|
|
211
|
+
export type RelationshipPayload = {
|
|
212
212
|
from: RelationshipEntity;
|
|
213
213
|
to: RelationshipEntity;
|
|
214
214
|
type: string;
|
|
@@ -216,60 +216,60 @@ export declare type RelationshipPayload = {
|
|
|
216
216
|
updatedAt?: string;
|
|
217
217
|
createdAt?: string;
|
|
218
218
|
};
|
|
219
|
-
export
|
|
219
|
+
export type BulkRelationshipsRequest = {
|
|
220
220
|
relationships: RelationshipPayload[];
|
|
221
221
|
connectionId: string;
|
|
222
222
|
};
|
|
223
|
-
export
|
|
223
|
+
export type RelationshipResponse = {
|
|
224
224
|
from: RelationshipEntity;
|
|
225
225
|
to: RelationshipEntity;
|
|
226
226
|
updateSequenceNumber?: number;
|
|
227
227
|
updatedAt?: string;
|
|
228
228
|
createdAt?: string;
|
|
229
229
|
};
|
|
230
|
-
export
|
|
230
|
+
export type BulkRelationshipsResponse = {
|
|
231
231
|
success: boolean;
|
|
232
232
|
results?: Record<string, RelationshipResponse[]>;
|
|
233
233
|
error?: string;
|
|
234
234
|
originalError?: unknown;
|
|
235
235
|
};
|
|
236
|
-
export
|
|
236
|
+
export type DeleteRelationshipRequest = {
|
|
237
237
|
from: RelationshipEntity;
|
|
238
238
|
to: RelationshipEntity;
|
|
239
239
|
type: string;
|
|
240
240
|
updateSequenceNumber: number;
|
|
241
241
|
connectionId: string;
|
|
242
242
|
};
|
|
243
|
-
export
|
|
243
|
+
export type DeleteRelationshipResponse = {
|
|
244
244
|
success: boolean;
|
|
245
245
|
error?: string;
|
|
246
246
|
originalError?: unknown;
|
|
247
247
|
};
|
|
248
|
-
export
|
|
248
|
+
export type TaskScheduleRequest = {
|
|
249
249
|
connectionId: string;
|
|
250
250
|
scheduleInterval: ScheduleInterval;
|
|
251
251
|
task: Task;
|
|
252
252
|
};
|
|
253
|
-
export
|
|
253
|
+
export type TaskScheduleResponse = {
|
|
254
254
|
status: string;
|
|
255
255
|
message: string;
|
|
256
256
|
taskId: string;
|
|
257
257
|
error?: string;
|
|
258
258
|
originalError?: unknown;
|
|
259
259
|
};
|
|
260
|
-
export
|
|
260
|
+
export type ChildTaskScheduleRequest = {
|
|
261
261
|
scanId: string;
|
|
262
262
|
taskExecutionId: string;
|
|
263
263
|
task: ChildTask;
|
|
264
264
|
connectionId: string;
|
|
265
265
|
};
|
|
266
|
-
export
|
|
266
|
+
export type ChildTaskScheduleResponse = {
|
|
267
267
|
status: string;
|
|
268
268
|
message: string;
|
|
269
269
|
error?: string;
|
|
270
270
|
originalError?: unknown;
|
|
271
271
|
};
|
|
272
|
-
export
|
|
272
|
+
export type TaskStatusUpdateRequest = {
|
|
273
273
|
scanId: string;
|
|
274
274
|
taskExecutionId: string;
|
|
275
275
|
status: 'success' | 'failure';
|
|
@@ -277,7 +277,7 @@ export declare type TaskStatusUpdateRequest = {
|
|
|
277
277
|
failureReason?: 'ENTITY_NOT_FOUND' | 'RETRY_LIMIT_EXCEEDED' | 'NON_RETRYABLE_ERROR' | 'UNAUTHORIZED' | 'AUTH_TOKEN_REVOKED' | 'AUTH_TOKEN_EXPIRED' | 'RATE_LIMITED' | 'RETRYABLE_ERROR';
|
|
278
278
|
connectionId: string;
|
|
279
279
|
};
|
|
280
|
-
export
|
|
280
|
+
export type TaskStatusUpdateResponse = {
|
|
281
281
|
status: string;
|
|
282
282
|
message: string;
|
|
283
283
|
error?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requests.d.ts","sourceRoot":"","sources":["../../src/types/requests.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,WAAW,EACX,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,kBAAkB,EAClB,IAAI,EACJ,gBAAgB,EAChB,SAAS,EACT,oBAAoB,EACrB,MAAM,IAAI,CAAC;AAGZ,oBAAY,aAAa;IACvB,QAAQ,aAAa;IACrB,MAAM,WAAW;CAClB;AACD,
|
|
1
|
+
{"version":3,"file":"requests.d.ts","sourceRoot":"","sources":["../../src/types/requests.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,WAAW,EACX,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,kBAAkB,EAClB,IAAI,EACJ,gBAAgB,EAChB,SAAS,EACT,oBAAoB,EACrB,MAAM,IAAI,CAAC;AAGZ,oBAAY,aAAa;IACvB,QAAQ,aAAa;IACrB,MAAM,WAAW;CAClB;AACD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE9C,MAAM,MAAM,WAAW,GAAG;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,QA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MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,SAAS,GAAG,SAAS,CAAC;IAC9B,IAAI,EAAE,oBAAoB,CAAC;IAC3B,aAAa,CAAC,EACV,kBAAkB,GAClB,sBAAsB,GACtB,qBAAqB,GACrB,cAAc,GACd,oBAAoB,GACpB,oBAAoB,GACpB,cAAc,GACd,iBAAiB,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC"}
|
package/out/types/requests.js
CHANGED
|
@@ -5,4 +5,4 @@ var OperationType;
|
|
|
5
5
|
(function (OperationType) {
|
|
6
6
|
OperationType["BACKFILL"] = "BACKFILL";
|
|
7
7
|
OperationType["NORMAL"] = "NORMAL";
|
|
8
|
-
})(OperationType
|
|
8
|
+
})(OperationType || (exports.OperationType = OperationType = {}));
|
package/out/types/users.d.ts
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type UserName = {
|
|
2
2
|
formatted?: string;
|
|
3
3
|
familyName?: string;
|
|
4
4
|
givenName?: string;
|
|
5
5
|
};
|
|
6
|
-
export
|
|
6
|
+
export type UserPhoto = {
|
|
7
7
|
value: string;
|
|
8
8
|
type: string;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type UserEmail = {
|
|
11
11
|
value: string;
|
|
12
12
|
primary: boolean;
|
|
13
13
|
};
|
|
14
|
-
export
|
|
14
|
+
export type UserPhoneNumber = {
|
|
15
15
|
type?: string;
|
|
16
16
|
value: string;
|
|
17
17
|
};
|
|
18
|
-
export
|
|
18
|
+
export type UserExtendedProfile = {
|
|
19
19
|
jobTitle?: string;
|
|
20
20
|
department?: string;
|
|
21
21
|
organization?: string;
|
|
22
22
|
location?: string;
|
|
23
23
|
phoneNumbers?: UserPhoneNumber[];
|
|
24
24
|
};
|
|
25
|
-
export
|
|
25
|
+
export type UserPayload = {
|
|
26
26
|
externalId: string;
|
|
27
27
|
nickname?: string;
|
|
28
28
|
displayName?: string;
|
|
@@ -31,7 +31,7 @@ export declare type UserPayload = {
|
|
|
31
31
|
extendedProfile?: UserExtendedProfile;
|
|
32
32
|
updateSequenceNumber?: number;
|
|
33
33
|
};
|
|
34
|
-
export
|
|
34
|
+
export type User = {
|
|
35
35
|
id?: string;
|
|
36
36
|
externalId: string;
|
|
37
37
|
userName?: string;
|
package/out/types/users.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../src/types/users.ts"],"names":[],"mappings":"AAGA,
|
|
1
|
+
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../src/types/users.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,QAAQ,GAAG;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,eAAe,EAAE,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC;IACrB,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,eAAe,CAAC,EAAE,mBAAmB,CAAC;IACtC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AAGF,MAAM,MAAM,IAAI,GAAG;IACjB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC;IACrB,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC;IACrB,eAAe,CAAC,EAAE,mBAAmB,CAAC;CACvC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"endpoints.d.ts","sourceRoot":"","sources":["../../src/utils/endpoints.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCZ,CAAC;AAKX,eAAO,MAAM,aAAa,kCAAkC,CAAC;AAM7D,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"endpoints.d.ts","sourceRoot":"","sources":["../../src/utils/endpoints.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCZ,CAAC;AAKX,eAAO,MAAM,aAAa,kCAAkC,CAAC;AAM7D,eAAO,MAAM,WAAW,GAAI,UAAU,MAAM,EAAE,eAAc,MAAsB,KAAG,MAEpF,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.handleResponseError = handleResponseError;
|
|
4
|
+
exports.handleError = handleError;
|
|
4
5
|
const errors_1 = require("./errors");
|
|
5
6
|
async function handleResponseError(response, context) {
|
|
6
7
|
let errorDetails;
|
|
@@ -54,7 +55,6 @@ async function handleResponseError(response, context) {
|
|
|
54
55
|
}
|
|
55
56
|
throw new errors_1.ForgeTeamWorkGraphAPIError(errorMessage, response.status, errorDetails.details, traceId);
|
|
56
57
|
}
|
|
57
|
-
exports.handleResponseError = handleResponseError;
|
|
58
58
|
function createErrorMessage(error, operation) {
|
|
59
59
|
if (error instanceof errors_1.ForgeTeamWorkGraphValidationError) {
|
|
60
60
|
return error.message;
|
|
@@ -75,4 +75,3 @@ function handleError(error, operation) {
|
|
|
75
75
|
originalError: error
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
|
-
exports.handleError = handleError;
|
package/out/utils/validators.js
CHANGED
|
@@ -1,6 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.MAX_PROPERTIES_DELETE = exports.MAX_BULK_GROUPS_DELETE = exports.MAX_BULK_USERS_DELETE = exports.MAX_PROPERTIES = exports.MAX_USER_MAPPINGS = exports.MAX_BULK_OBJECTS_DELETE = exports.MAX_BULK_RELATIONSHIPS = exports.MAX_BULK_GROUPS = exports.MAX_BULK_USERS = exports.MAX_BULK_OBJECTS = void 0;
|
|
4
|
+
exports.validateArray = validateArray;
|
|
5
|
+
exports.validateArrayMaxLength = validateArrayMaxLength;
|
|
6
|
+
exports.validateRequiredString = validateRequiredString;
|
|
7
|
+
exports.validateObject = validateObject;
|
|
8
|
+
exports.validatePropertyCount = validatePropertyCount;
|
|
9
|
+
exports.validateSetObjectsRequest = validateSetObjectsRequest;
|
|
10
|
+
exports.validateSetUsersRequest = validateSetUsersRequest;
|
|
11
|
+
exports.validateSetGroupsRequest = validateSetGroupsRequest;
|
|
12
|
+
exports.validateSetRelationshipsRequest = validateSetRelationshipsRequest;
|
|
13
|
+
exports.validateDeleteRelationshipRequest = validateDeleteRelationshipRequest;
|
|
14
|
+
exports.validateDeleteObjectsByExternalIdRequest = validateDeleteObjectsByExternalIdRequest;
|
|
15
|
+
exports.validateDeleteUsersByExternalIdRequest = validateDeleteUsersByExternalIdRequest;
|
|
16
|
+
exports.validateDeleteGroupsByExternalIdRequest = validateDeleteGroupsByExternalIdRequest;
|
|
17
|
+
exports.validateGetObjectByExternalIdRequest = validateGetObjectByExternalIdRequest;
|
|
18
|
+
exports.validateGetUserByExternalIdRequest = validateGetUserByExternalIdRequest;
|
|
19
|
+
exports.validateGetGroupByExternalIdRequest = validateGetGroupByExternalIdRequest;
|
|
20
|
+
exports.validateMapUsersRequest = validateMapUsersRequest;
|
|
21
|
+
exports.validateDeleteObjectsByPropertiesRequest = validateDeleteObjectsByPropertiesRequest;
|
|
22
|
+
exports.validateStringMaxLength = validateStringMaxLength;
|
|
23
|
+
exports.validateNumberRange = validateNumberRange;
|
|
24
|
+
exports.validateUUID = validateUUID;
|
|
25
|
+
exports.validateTimeUnit = validateTimeUnit;
|
|
26
|
+
exports.validateEnumValue = validateEnumValue;
|
|
27
|
+
exports.validateUpdateSequenceNumber = validateUpdateSequenceNumber;
|
|
28
|
+
exports.validateForgeTaskType = validateForgeTaskType;
|
|
29
|
+
exports.validateTaskScheduleRequest = validateTaskScheduleRequest;
|
|
30
|
+
exports.validateChildTaskScheduleRequest = validateChildTaskScheduleRequest;
|
|
31
|
+
exports.validateTaskStatusUpdateRequest = validateTaskStatusUpdateRequest;
|
|
4
32
|
const errors_1 = require("./errors");
|
|
5
33
|
const orchestration_1 = require("../types/orchestration");
|
|
6
34
|
exports.MAX_BULK_OBJECTS = 100;
|
|
@@ -21,19 +49,16 @@ function validateArray(value, fieldName) {
|
|
|
21
49
|
throw new errors_1.ForgeTeamWorkGraphValidationError(`${fieldName} array cannot be empty`, fieldName);
|
|
22
50
|
}
|
|
23
51
|
}
|
|
24
|
-
exports.validateArray = validateArray;
|
|
25
52
|
function validateArrayMaxLength(value, operationDescription, maxLength, fieldName = 'items') {
|
|
26
53
|
if (value.length > maxLength) {
|
|
27
54
|
throw new errors_1.ForgeTeamWorkGraphValidationError(`${operationDescription} supports maximum ${maxLength} ${fieldName}. Received ${value.length}`, operationDescription, { maxLength, actualLength: value.length, fieldName });
|
|
28
55
|
}
|
|
29
56
|
}
|
|
30
|
-
exports.validateArrayMaxLength = validateArrayMaxLength;
|
|
31
57
|
function validateRequiredString(value, fieldName) {
|
|
32
58
|
if (!value || value.trim() === '') {
|
|
33
59
|
throw new errors_1.ForgeTeamWorkGraphValidationError(`${fieldName} is required`, fieldName);
|
|
34
60
|
}
|
|
35
61
|
}
|
|
36
|
-
exports.validateRequiredString = validateRequiredString;
|
|
37
62
|
function validateObject(value, fieldName) {
|
|
38
63
|
if (!value || typeof value !== 'object') {
|
|
39
64
|
throw new errors_1.ForgeTeamWorkGraphValidationError(`${fieldName} must be an object`, fieldName);
|
|
@@ -42,14 +67,12 @@ function validateObject(value, fieldName) {
|
|
|
42
67
|
throw new errors_1.ForgeTeamWorkGraphValidationError(`${fieldName} object cannot be empty`, fieldName);
|
|
43
68
|
}
|
|
44
69
|
}
|
|
45
|
-
exports.validateObject = validateObject;
|
|
46
70
|
function validatePropertyCount(value, fieldName, expectedCount) {
|
|
47
71
|
const propertyCount = Object.keys(value).length;
|
|
48
72
|
if (propertyCount !== expectedCount) {
|
|
49
73
|
throw new errors_1.ForgeTeamWorkGraphValidationError(`${fieldName} object must contain exactly ${expectedCount} propert${expectedCount === 1 ? 'y' : 'ies'}. Received ${propertyCount}`, fieldName, { propertyCount, expectedCount });
|
|
50
74
|
}
|
|
51
75
|
}
|
|
52
|
-
exports.validatePropertyCount = validatePropertyCount;
|
|
53
76
|
function validateSetObjectsRequest(objects, properties, operationType) {
|
|
54
77
|
validateArray(objects, 'objects');
|
|
55
78
|
validateArrayMaxLength(objects, 'Bulk ingestion', exports.MAX_BULK_OBJECTS, 'objects');
|
|
@@ -63,7 +86,6 @@ function validateSetObjectsRequest(objects, properties, operationType) {
|
|
|
63
86
|
throw new errors_1.ForgeTeamWorkGraphValidationError(`operationType must be either 'BACKFILL' or 'NORMAL'. Received: ${operationType}`, 'operationType');
|
|
64
87
|
}
|
|
65
88
|
}
|
|
66
|
-
exports.validateSetObjectsRequest = validateSetObjectsRequest;
|
|
67
89
|
function validateSetUsersRequest(users) {
|
|
68
90
|
validateArray(users, 'users');
|
|
69
91
|
validateArrayMaxLength(users, 'Bulk user ingestion', exports.MAX_BULK_USERS, 'users');
|
|
@@ -74,17 +96,14 @@ function validateSetUsersRequest(users) {
|
|
|
74
96
|
});
|
|
75
97
|
}
|
|
76
98
|
}
|
|
77
|
-
exports.validateSetUsersRequest = validateSetUsersRequest;
|
|
78
99
|
function validateSetGroupsRequest(groups) {
|
|
79
100
|
validateArray(groups, 'groups');
|
|
80
101
|
validateArrayMaxLength(groups, 'Bulk group ingestion', exports.MAX_BULK_GROUPS, 'groups');
|
|
81
102
|
}
|
|
82
|
-
exports.validateSetGroupsRequest = validateSetGroupsRequest;
|
|
83
103
|
function validateSetRelationshipsRequest(relationships) {
|
|
84
104
|
validateArray(relationships, 'relationships');
|
|
85
105
|
validateArrayMaxLength(relationships, 'Bulk relationship ingestion', exports.MAX_BULK_RELATIONSHIPS, 'relationships');
|
|
86
106
|
}
|
|
87
|
-
exports.validateSetRelationshipsRequest = validateSetRelationshipsRequest;
|
|
88
107
|
function validateDeleteRelationshipRequest(from, to, type, updateSequenceNumber) {
|
|
89
108
|
validateObject(from, 'from');
|
|
90
109
|
validateRequiredString(from.type, 'from.type');
|
|
@@ -95,36 +114,29 @@ function validateDeleteRelationshipRequest(from, to, type, updateSequenceNumber)
|
|
|
95
114
|
validateRequiredString(type, 'type');
|
|
96
115
|
validateUpdateSequenceNumber(updateSequenceNumber);
|
|
97
116
|
}
|
|
98
|
-
exports.validateDeleteRelationshipRequest = validateDeleteRelationshipRequest;
|
|
99
117
|
function validateDeleteObjectsByExternalIdRequest(objectType, externalIds) {
|
|
100
118
|
validateRequiredString(objectType, 'objectType');
|
|
101
119
|
validateArray(externalIds, 'externalIds');
|
|
102
120
|
validateArrayMaxLength(externalIds, 'Bulk object deletion', exports.MAX_BULK_OBJECTS_DELETE, 'objects');
|
|
103
121
|
}
|
|
104
|
-
exports.validateDeleteObjectsByExternalIdRequest = validateDeleteObjectsByExternalIdRequest;
|
|
105
122
|
function validateDeleteUsersByExternalIdRequest(externalIds) {
|
|
106
123
|
validateArray(externalIds, 'externalIds');
|
|
107
124
|
validateArrayMaxLength(externalIds, 'Bulk user deletion', exports.MAX_BULK_USERS_DELETE, 'users');
|
|
108
125
|
}
|
|
109
|
-
exports.validateDeleteUsersByExternalIdRequest = validateDeleteUsersByExternalIdRequest;
|
|
110
126
|
function validateDeleteGroupsByExternalIdRequest(externalIds) {
|
|
111
127
|
validateArray(externalIds, 'externalIds');
|
|
112
128
|
validateArrayMaxLength(externalIds, 'Bulk group deletion', exports.MAX_BULK_GROUPS_DELETE, 'groups');
|
|
113
129
|
}
|
|
114
|
-
exports.validateDeleteGroupsByExternalIdRequest = validateDeleteGroupsByExternalIdRequest;
|
|
115
130
|
function validateGetObjectByExternalIdRequest(objectType, externalId) {
|
|
116
131
|
validateRequiredString(objectType, 'objectType');
|
|
117
132
|
validateRequiredString(externalId, 'externalId');
|
|
118
133
|
}
|
|
119
|
-
exports.validateGetObjectByExternalIdRequest = validateGetObjectByExternalIdRequest;
|
|
120
134
|
function validateGetUserByExternalIdRequest(externalId) {
|
|
121
135
|
validateRequiredString(externalId, 'externalId');
|
|
122
136
|
}
|
|
123
|
-
exports.validateGetUserByExternalIdRequest = validateGetUserByExternalIdRequest;
|
|
124
137
|
function validateGetGroupByExternalIdRequest(externalId) {
|
|
125
138
|
validateRequiredString(externalId, 'externalId');
|
|
126
139
|
}
|
|
127
|
-
exports.validateGetGroupByExternalIdRequest = validateGetGroupByExternalIdRequest;
|
|
128
140
|
function validateMapUsersRequest(directMappings) {
|
|
129
141
|
validateArray(directMappings, 'directMappings');
|
|
130
142
|
validateArrayMaxLength(directMappings, 'Bulk user mapping', exports.MAX_USER_MAPPINGS, 'mappings');
|
|
@@ -141,45 +153,38 @@ function validateMapUsersRequest(directMappings) {
|
|
|
141
153
|
});
|
|
142
154
|
}
|
|
143
155
|
}
|
|
144
|
-
exports.validateMapUsersRequest = validateMapUsersRequest;
|
|
145
156
|
function validateDeleteObjectsByPropertiesRequest(properties, objectType) {
|
|
146
157
|
validateObject(properties, 'properties');
|
|
147
158
|
validatePropertyCount(properties, 'properties', exports.MAX_PROPERTIES_DELETE);
|
|
148
159
|
validateRequiredString(objectType, 'objectType');
|
|
149
160
|
}
|
|
150
|
-
exports.validateDeleteObjectsByPropertiesRequest = validateDeleteObjectsByPropertiesRequest;
|
|
151
161
|
function validateStringMaxLength(value, fieldName, maxLength) {
|
|
152
162
|
if (value.length > maxLength) {
|
|
153
163
|
throw new errors_1.ForgeTeamWorkGraphValidationError(`${fieldName} must not exceed ${maxLength} characters. Received ${value.length}`, fieldName, { maxLength, actualLength: value.length });
|
|
154
164
|
}
|
|
155
165
|
}
|
|
156
|
-
exports.validateStringMaxLength = validateStringMaxLength;
|
|
157
166
|
function validateNumberRange(value, fieldName, min, max) {
|
|
158
167
|
if (value < min || value > max) {
|
|
159
168
|
throw new errors_1.ForgeTeamWorkGraphValidationError(`${fieldName} must be between ${min} and ${max}. Received ${value}`, fieldName, { min, max, actual: value });
|
|
160
169
|
}
|
|
161
170
|
}
|
|
162
|
-
exports.validateNumberRange = validateNumberRange;
|
|
163
171
|
const UUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
164
172
|
function validateUUID(value, fieldName) {
|
|
165
173
|
if (!UUID_REGEX.test(value)) {
|
|
166
174
|
throw new errors_1.ForgeTeamWorkGraphValidationError(`${fieldName} must be a valid UUID format. Received: ${value}`, fieldName, { value });
|
|
167
175
|
}
|
|
168
176
|
}
|
|
169
|
-
exports.validateUUID = validateUUID;
|
|
170
177
|
function validateTimeUnit(value, fieldName) {
|
|
171
178
|
const validTimeUnits = ['minutes', 'hours', 'days'];
|
|
172
179
|
if (!validTimeUnits.includes(value)) {
|
|
173
180
|
throw new errors_1.ForgeTeamWorkGraphValidationError(`${fieldName} must be one of: ${validTimeUnits.join(', ')}. Received: ${value}`, fieldName, { value, validTimeUnits });
|
|
174
181
|
}
|
|
175
182
|
}
|
|
176
|
-
exports.validateTimeUnit = validateTimeUnit;
|
|
177
183
|
function validateEnumValue(value, fieldName, allowedValues) {
|
|
178
184
|
if (!allowedValues.includes(value)) {
|
|
179
185
|
throw new errors_1.ForgeTeamWorkGraphValidationError(`${fieldName} must be one of: ${allowedValues.join(', ')}. Received: ${value}`, fieldName, { allowedValues, received: value });
|
|
180
186
|
}
|
|
181
187
|
}
|
|
182
|
-
exports.validateEnumValue = validateEnumValue;
|
|
183
188
|
function validateUpdateSequenceNumber(updateSequenceNumber, fieldName = 'updateSequenceNumber') {
|
|
184
189
|
if (typeof updateSequenceNumber !== 'number' || updateSequenceNumber < 0) {
|
|
185
190
|
throw new errors_1.ForgeTeamWorkGraphValidationError(`${fieldName} must be a non-negative number`, fieldName, {
|
|
@@ -187,11 +192,9 @@ function validateUpdateSequenceNumber(updateSequenceNumber, fieldName = 'updateS
|
|
|
187
192
|
});
|
|
188
193
|
}
|
|
189
194
|
}
|
|
190
|
-
exports.validateUpdateSequenceNumber = validateUpdateSequenceNumber;
|
|
191
195
|
function validateForgeTaskType(value, fieldName) {
|
|
192
196
|
validateEnumValue(value, fieldName, orchestration_1.FORGE_TASK_TYPE_VALUES);
|
|
193
197
|
}
|
|
194
|
-
exports.validateForgeTaskType = validateForgeTaskType;
|
|
195
198
|
function validateTaskScheduleRequest(connectionId, scheduleInterval, task) {
|
|
196
199
|
validateRequiredString(connectionId, 'connectionId');
|
|
197
200
|
validateObject(scheduleInterval, 'scheduleInterval');
|
|
@@ -206,7 +209,6 @@ function validateTaskScheduleRequest(connectionId, scheduleInterval, task) {
|
|
|
206
209
|
validateRequiredString(task.taskId, 'task.taskId');
|
|
207
210
|
validateUUID(task.taskId, 'task.taskId');
|
|
208
211
|
}
|
|
209
|
-
exports.validateTaskScheduleRequest = validateTaskScheduleRequest;
|
|
210
212
|
function validateChildTaskScheduleRequest(connectionId, task) {
|
|
211
213
|
validateRequiredString(connectionId, 'connectionId');
|
|
212
214
|
validateObject(task, 'task');
|
|
@@ -217,7 +219,6 @@ function validateChildTaskScheduleRequest(connectionId, task) {
|
|
|
217
219
|
validateRequiredString(task.taskId, 'task.taskId');
|
|
218
220
|
validateUUID(task.taskId, 'task.taskId');
|
|
219
221
|
}
|
|
220
|
-
exports.validateChildTaskScheduleRequest = validateChildTaskScheduleRequest;
|
|
221
222
|
function validateTaskStatusUpdateRequest(connectionId, status, task, failureReason) {
|
|
222
223
|
validateRequiredString(connectionId, 'connectionId');
|
|
223
224
|
validateEnumValue(status, 'status', ['success', 'failure']);
|
|
@@ -238,4 +239,3 @@ function validateTaskStatusUpdateRequest(connectionId, status, task, failureReas
|
|
|
238
239
|
validateEnumValue(failureReason, 'failureReason', validFailureReasons);
|
|
239
240
|
}
|
|
240
241
|
}
|
|
241
|
-
exports.validateTaskStatusUpdateRequest = validateTaskStatusUpdateRequest;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/teamwork-graph",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.7-experimental-04cc2b9",
|
|
4
4
|
"description": "Forge TeamworkGraph SDK",
|
|
5
5
|
"author": "Atlassian",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -18,13 +18,22 @@
|
|
|
18
18
|
"@types/node": "20.19.1",
|
|
19
19
|
"@types/node-fetch": "^2.6.12",
|
|
20
20
|
"expect-type": "^0.17.3",
|
|
21
|
+
"jest-when": "^3.6.0",
|
|
21
22
|
"node-fetch": "2.7.0",
|
|
22
|
-
"
|
|
23
|
+
"typescript": "5.9.2"
|
|
23
24
|
},
|
|
24
25
|
"dependencies": {
|
|
25
|
-
"@forge/api": "^7.2.
|
|
26
|
+
"@forge/api": "^7.2.2-experimental-04cc2b9"
|
|
26
27
|
},
|
|
27
28
|
"publishConfig": {
|
|
28
29
|
"registry": "https://packages.atlassian.com/api/npm/npm-public/"
|
|
30
|
+
},
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"typescript": ">=5.0.0"
|
|
33
|
+
},
|
|
34
|
+
"peerDependenciesMeta": {
|
|
35
|
+
"typescript": {
|
|
36
|
+
"optional": true
|
|
37
|
+
}
|
|
29
38
|
}
|
|
30
39
|
}
|