@forge/teamwork-graph 1.1.0-next.2 → 1.1.0-next.3-experimental-effab31
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__/user-operations.test.js +114 -0
- package/out/graph.d.ts +2 -1
- package/out/graph.d.ts.map +1 -1
- package/out/graph.js +44 -15
- package/out/types/graph.d.ts +2 -1
- package/out/types/graph.d.ts.map +1 -1
- package/out/types/requests.d.ts +19 -0
- package/out/types/requests.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -174,4 +174,118 @@ describe('TeamWorkGraphClient - User Operations', () => {
|
|
|
174
174
|
})).rejects.toThrow('externalId is required');
|
|
175
175
|
});
|
|
176
176
|
});
|
|
177
|
+
describe('mapUsers', () => {
|
|
178
|
+
const mappingWithAccountId = {
|
|
179
|
+
externalId: 'user-123',
|
|
180
|
+
accountId: '5dd4fb8db3a9c80fc0a3283b',
|
|
181
|
+
updateSequenceNumber: 1,
|
|
182
|
+
updatedAt: Date.now()
|
|
183
|
+
};
|
|
184
|
+
const mappingWithEmail = {
|
|
185
|
+
externalId: 'user-456',
|
|
186
|
+
externalEmailAddress: 'tagapitos@my-company.com',
|
|
187
|
+
updateSequenceNumber: 2,
|
|
188
|
+
updatedAt: Date.now()
|
|
189
|
+
};
|
|
190
|
+
it('should successfully map users with accountId', async () => {
|
|
191
|
+
const expectedResponse = {
|
|
192
|
+
success: true,
|
|
193
|
+
results: [{ externalId: 'user-123', accountId: '5dd4fb8db3a9c80fc0a3283b', success: true }]
|
|
194
|
+
};
|
|
195
|
+
mockFetch.mockResolvedValueOnce({
|
|
196
|
+
ok: true,
|
|
197
|
+
json: () => Promise.resolve(expectedResponse)
|
|
198
|
+
});
|
|
199
|
+
const result = await graphClient.mapUsers({
|
|
200
|
+
directMappings: [mappingWithAccountId]
|
|
201
|
+
});
|
|
202
|
+
expect(mockFetch).toHaveBeenCalledWith('/graph/connector/api/v1/users/mappings', {
|
|
203
|
+
method: 'POST',
|
|
204
|
+
body: JSON.stringify({ directMappings: [mappingWithAccountId] }),
|
|
205
|
+
redirect: 'follow',
|
|
206
|
+
headers: { 'Content-Type': 'application/json' }
|
|
207
|
+
});
|
|
208
|
+
expect(result).toEqual(expectedResponse);
|
|
209
|
+
});
|
|
210
|
+
it('should successfully map users with email address', async () => {
|
|
211
|
+
const expectedResponse = {
|
|
212
|
+
success: true,
|
|
213
|
+
results: [{ externalId: 'user-456', accountId: '6ee5gc9ec4b0d91gd1b4394c', success: true }]
|
|
214
|
+
};
|
|
215
|
+
mockFetch.mockResolvedValueOnce({
|
|
216
|
+
ok: true,
|
|
217
|
+
json: () => Promise.resolve(expectedResponse)
|
|
218
|
+
});
|
|
219
|
+
const result = await graphClient.mapUsers({
|
|
220
|
+
directMappings: [mappingWithEmail]
|
|
221
|
+
});
|
|
222
|
+
expect(mockFetch).toHaveBeenCalledWith('/graph/connector/api/v1/users/mappings', {
|
|
223
|
+
method: 'POST',
|
|
224
|
+
body: JSON.stringify({ directMappings: [mappingWithEmail] }),
|
|
225
|
+
redirect: 'follow',
|
|
226
|
+
headers: { 'Content-Type': 'application/json' }
|
|
227
|
+
});
|
|
228
|
+
expect(result).toEqual(expectedResponse);
|
|
229
|
+
});
|
|
230
|
+
it('should successfully map multiple users with mixed accountId and email', async () => {
|
|
231
|
+
const expectedResponse = {
|
|
232
|
+
success: true,
|
|
233
|
+
results: [
|
|
234
|
+
{ externalId: 'user-123', accountId: '5dd4fb8db3a9c80fc0a3283b', success: true },
|
|
235
|
+
{ externalId: 'user-456', accountId: '6ee5gc9ec4b0d91gd1b4394c', success: true }
|
|
236
|
+
]
|
|
237
|
+
};
|
|
238
|
+
mockFetch.mockResolvedValueOnce({
|
|
239
|
+
ok: true,
|
|
240
|
+
json: () => Promise.resolve(expectedResponse)
|
|
241
|
+
});
|
|
242
|
+
const result = await graphClient.mapUsers({
|
|
243
|
+
directMappings: [mappingWithAccountId, mappingWithEmail]
|
|
244
|
+
});
|
|
245
|
+
expect(mockFetch).toHaveBeenCalledWith('/graph/connector/api/v1/users/mappings', {
|
|
246
|
+
method: 'POST',
|
|
247
|
+
body: JSON.stringify({ directMappings: [mappingWithAccountId, mappingWithEmail] }),
|
|
248
|
+
redirect: 'follow',
|
|
249
|
+
headers: { 'Content-Type': 'application/json' }
|
|
250
|
+
});
|
|
251
|
+
expect(result).toEqual(expectedResponse);
|
|
252
|
+
});
|
|
253
|
+
it('should throw error when directMappings array is empty', async () => {
|
|
254
|
+
await expect(graphClient.mapUsers({
|
|
255
|
+
directMappings: []
|
|
256
|
+
})).rejects.toThrow('directMappings array cannot be empty');
|
|
257
|
+
});
|
|
258
|
+
it('should throw error when directMappings array exceeds limit', async () => {
|
|
259
|
+
const manyMappings = Array(101).fill(mappingWithAccountId);
|
|
260
|
+
await expect(graphClient.mapUsers({
|
|
261
|
+
directMappings: manyMappings
|
|
262
|
+
})).rejects.toThrow('Bulk user mapping supports maximum 100 mappings');
|
|
263
|
+
});
|
|
264
|
+
it('should throw error when directMappings is not an array', async () => {
|
|
265
|
+
await expect(graphClient.mapUsers({
|
|
266
|
+
directMappings: null
|
|
267
|
+
})).rejects.toThrow('directMappings must be an array');
|
|
268
|
+
});
|
|
269
|
+
it('should throw error when mapping has neither accountId nor externalEmailAddress', async () => {
|
|
270
|
+
const invalidMapping = {
|
|
271
|
+
externalId: 'user-123',
|
|
272
|
+
updateSequenceNumber: 1,
|
|
273
|
+
updatedAt: Date.now()
|
|
274
|
+
};
|
|
275
|
+
await expect(graphClient.mapUsers({
|
|
276
|
+
directMappings: [invalidMapping]
|
|
277
|
+
})).rejects.toThrow('Each mapping must have either accountId or externalEmailAddress');
|
|
278
|
+
});
|
|
279
|
+
it('should throw error when mapping is missing externalId', async () => {
|
|
280
|
+
const invalidMapping = {
|
|
281
|
+
externalId: '',
|
|
282
|
+
accountId: '5dd4fb8db3a9c80fc0a3283b',
|
|
283
|
+
updateSequenceNumber: 1,
|
|
284
|
+
updatedAt: Date.now()
|
|
285
|
+
};
|
|
286
|
+
await expect(graphClient.mapUsers({
|
|
287
|
+
directMappings: [invalidMapping]
|
|
288
|
+
})).rejects.toThrow('Each mapping must have an externalId');
|
|
289
|
+
});
|
|
290
|
+
});
|
|
177
291
|
});
|
package/out/graph.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Result } from '@forge/api';
|
|
2
|
-
import { TeamWorkGraph, ForgeExtendedContext, GroupObject, RequestConfig, BulkEntityRequest, BulkEntityResponse, BulkUsersRequest, BulkUsersResponse, DeleteUsersByExternalIdRequest, DeleteUsersByExternalIdResponse, GetUserByExternalIdRequest, GetUserByExternalIdResponse } from './types';
|
|
2
|
+
import { TeamWorkGraph, ForgeExtendedContext, GroupObject, RequestConfig, BulkEntityRequest, BulkEntityResponse, BulkUsersRequest, BulkUsersResponse, DeleteUsersByExternalIdRequest, DeleteUsersByExternalIdResponse, GetUserByExternalIdRequest, GetUserByExternalIdResponse, MapUsersRequest, MapUsersResponse } from './types';
|
|
3
3
|
export declare class TeamWorkGraphClient implements TeamWorkGraph {
|
|
4
4
|
setEntities: (request: BulkEntityRequest) => Promise<BulkEntityResponse>;
|
|
5
5
|
deleteEntity: (context: ForgeExtendedContext, entityId: string) => Promise<Result>;
|
|
@@ -8,6 +8,7 @@ export declare class TeamWorkGraphClient implements TeamWorkGraph {
|
|
|
8
8
|
setUsers: (request: BulkUsersRequest) => Promise<BulkUsersResponse>;
|
|
9
9
|
deleteUsersByExternalId: (request: DeleteUsersByExternalIdRequest) => Promise<DeleteUsersByExternalIdResponse>;
|
|
10
10
|
getUserByExternalId: (request: GetUserByExternalIdRequest) => Promise<GetUserByExternalIdResponse>;
|
|
11
|
+
mapUsers: (request: MapUsersRequest) => Promise<MapUsersResponse>;
|
|
11
12
|
fetchData: (context: ForgeExtendedContext, requestConfig: RequestConfig, onResult: (data: any) => any) => Promise<any>;
|
|
12
13
|
transformData: (context: ForgeExtendedContext, data: any, transformMethod: (data: any) => any) => Promise<any>;
|
|
13
14
|
private saveToStage;
|
package/out/graph.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../src/graph.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,MAAM,EAAsB,MAAM,YAAY,CAAC;AAErF,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,8BAA8B,EAC9B,+BAA+B,EAC/B,0BAA0B,EAC1B,2BAA2B,
|
|
1
|
+
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../src/graph.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,MAAM,EAAsB,MAAM,YAAY,CAAC;AAErF,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,8BAA8B,EAC9B,+BAA+B,EAC/B,0BAA0B,EAC1B,2BAA2B,EAC3B,eAAe,EACf,gBAAgB,EACjB,MAAM,SAAS,CAAC;AAOjB,qBAAa,mBAAoB,YAAW,aAAa;IACvD,WAAW,YAAmB,iBAAiB,KAAG,QAAQ,kBAAkB,CAAC,CAe3E;IAEF,YAAY,YAAmB,oBAAoB,YAAY,MAAM,KAAG,QAAQ,MAAM,CAAC,CAIrF;IAEF,QAAQ,YAAmB,oBAAoB,SAAS,WAAW,KAAG,QAAQ,MAAM,CAAC,CAGnF;IAEF,WAAW,YAAmB,oBAAoB,WAAW,MAAM,KAAG,QAAQ,MAAM,CAAC,CAInF;IAEF,QAAQ,YAAmB,gBAAgB,KAAG,QAAQ,iBAAiB,CAAC,CAetE;IAEF,uBAAuB,YACZ,8BAA8B,KACtC,QAAQ,+BAA+B,CAAC,CAczC;IAEF,mBAAmB,YAAmB,0BAA0B,KAAG,QAAQ,2BAA2B,CAAC,CAsBrG;IAEF,QAAQ,YAAmB,eAAe,KAAG,QAAQ,gBAAgB,CAAC,CA+BpE;IAEF,SAAS,YAAmB,oBAAoB,iBAAiB,aAAa,mBAAmB,GAAG,KAAK,GAAG,kBAuB1G;IAEF,aAAa,YAAmB,oBAAoB,QAAQ,GAAG,0BAA0B,GAAG,KAAK,GAAG,kBAIlG;YAEY,WAAW;YAIX,YAAY;IAI1B,OAAO,CAAC,eAAe;YAQT,eAAe;YAaf,iBAAiB;YAajB,cAAc;YAYd,WAAW;CAY1B;AAED,eAAO,MAAM,aAAa,qBAA4B,CAAC"}
|
package/out/graph.js
CHANGED
|
@@ -6,18 +6,20 @@ const error_handling_1 = require("./error-handling");
|
|
|
6
6
|
const STARGATE_BASE = '/graph/connector';
|
|
7
7
|
const MAX_BULK_ENTITIES = 100;
|
|
8
8
|
const MAX_BULK_USERS = 100;
|
|
9
|
+
const MAX_USER_MAPPINGS = 100;
|
|
9
10
|
class TeamWorkGraphClient {
|
|
10
11
|
setEntities = async (request) => {
|
|
11
|
-
|
|
12
|
+
const { entities } = request;
|
|
13
|
+
if (!Array.isArray(entities)) {
|
|
12
14
|
throw new Error('entities must be an array');
|
|
13
15
|
}
|
|
14
|
-
if (
|
|
16
|
+
if (entities.length === 0) {
|
|
15
17
|
throw new Error('entities array cannot be empty');
|
|
16
18
|
}
|
|
17
|
-
if (
|
|
18
|
-
throw new Error(`Bulk ingestion supports maximum ${MAX_BULK_ENTITIES} entities. Received ${
|
|
19
|
+
if (entities.length > MAX_BULK_ENTITIES) {
|
|
20
|
+
throw new Error(`Bulk ingestion supports maximum ${MAX_BULK_ENTITIES} entities. Received ${entities.length}`);
|
|
19
21
|
}
|
|
20
|
-
const response = await this.sendPostRequest('/api/v1/entities/bulk', { entities
|
|
22
|
+
const response = await this.sendPostRequest('/api/v1/entities/bulk', { entities });
|
|
21
23
|
return response;
|
|
22
24
|
};
|
|
23
25
|
deleteEntity = async (context, entityId) => {
|
|
@@ -35,37 +37,40 @@ class TeamWorkGraphClient {
|
|
|
35
37
|
return this.sendDeleteRequest(path);
|
|
36
38
|
};
|
|
37
39
|
setUsers = async (request) => {
|
|
38
|
-
|
|
40
|
+
const { users } = request;
|
|
41
|
+
if (!Array.isArray(users)) {
|
|
39
42
|
throw new Error('users must be an array');
|
|
40
43
|
}
|
|
41
|
-
if (
|
|
44
|
+
if (users.length === 0) {
|
|
42
45
|
throw new Error('users array cannot be empty');
|
|
43
46
|
}
|
|
44
|
-
if (
|
|
45
|
-
throw new Error(`Bulk user ingestion supports maximum ${MAX_BULK_USERS} users. Received ${
|
|
47
|
+
if (users.length > MAX_BULK_USERS) {
|
|
48
|
+
throw new Error(`Bulk user ingestion supports maximum ${MAX_BULK_USERS} users. Received ${users.length}`);
|
|
46
49
|
}
|
|
47
|
-
const response = await this.sendPostRequest('/api/v1/users/bulk', { users
|
|
50
|
+
const response = await this.sendPostRequest('/api/v1/users/bulk', { users });
|
|
48
51
|
return response;
|
|
49
52
|
};
|
|
50
53
|
deleteUsersByExternalId = async (request) => {
|
|
51
|
-
|
|
54
|
+
const { externalIds } = request;
|
|
55
|
+
if (!Array.isArray(externalIds)) {
|
|
52
56
|
throw new Error('externalIds must be an array');
|
|
53
57
|
}
|
|
54
|
-
if (
|
|
58
|
+
if (externalIds.length === 0) {
|
|
55
59
|
throw new Error('externalIds array cannot be empty');
|
|
56
60
|
}
|
|
57
61
|
const response = await this.sendPostRequest('/api/v1/users/bulk/delete', {
|
|
58
|
-
externalIds
|
|
62
|
+
externalIds
|
|
59
63
|
});
|
|
60
64
|
return response;
|
|
61
65
|
};
|
|
62
66
|
getUserByExternalId = async (request) => {
|
|
63
|
-
|
|
67
|
+
const { externalId } = request;
|
|
68
|
+
if (!externalId || externalId.trim() === '') {
|
|
64
69
|
throw new Error('externalId is required');
|
|
65
70
|
}
|
|
66
71
|
try {
|
|
67
72
|
const url = new URL('/api/v1/users', 'https://example.com');
|
|
68
|
-
url.searchParams.set('externalId',
|
|
73
|
+
url.searchParams.set('externalId', externalId);
|
|
69
74
|
const path = url.pathname + url.search;
|
|
70
75
|
const response = await this.sendGetRequest(path);
|
|
71
76
|
return {
|
|
@@ -80,6 +85,30 @@ class TeamWorkGraphClient {
|
|
|
80
85
|
};
|
|
81
86
|
}
|
|
82
87
|
};
|
|
88
|
+
mapUsers = async (request) => {
|
|
89
|
+
const { directMappings } = request;
|
|
90
|
+
if (!Array.isArray(directMappings)) {
|
|
91
|
+
throw new Error('directMappings must be an array');
|
|
92
|
+
}
|
|
93
|
+
if (directMappings.length === 0) {
|
|
94
|
+
throw new Error('directMappings array cannot be empty');
|
|
95
|
+
}
|
|
96
|
+
if (directMappings.length > MAX_USER_MAPPINGS) {
|
|
97
|
+
throw new Error(`Bulk user mapping supports maximum ${MAX_USER_MAPPINGS} mappings. Received ${directMappings.length}`);
|
|
98
|
+
}
|
|
99
|
+
const invalidMapping = directMappings.find((mapping) => !mapping.accountId && !mapping.externalEmailAddress);
|
|
100
|
+
if (invalidMapping) {
|
|
101
|
+
throw new Error('Each mapping must have either accountId or externalEmailAddress');
|
|
102
|
+
}
|
|
103
|
+
const mappingWithoutExternalId = directMappings.find((mapping) => !mapping.externalId);
|
|
104
|
+
if (mappingWithoutExternalId) {
|
|
105
|
+
throw new Error('Each mapping must have an externalId');
|
|
106
|
+
}
|
|
107
|
+
const response = await this.sendPostRequest('/api/v1/users/mappings', {
|
|
108
|
+
directMappings
|
|
109
|
+
});
|
|
110
|
+
return response;
|
|
111
|
+
};
|
|
83
112
|
fetchData = async (context, requestConfig, onResult) => {
|
|
84
113
|
this.validateContext(context);
|
|
85
114
|
const { url, method, headers } = requestConfig;
|
package/out/types/graph.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Result } from '@forge/api';
|
|
2
|
-
import { ForgeExtendedContext, GroupObject, RequestConfig, BulkEntityRequest, BulkEntityResponse, BulkUsersRequest, BulkUsersResponse, DeleteUsersByExternalIdRequest, DeleteUsersByExternalIdResponse, GetUserByExternalIdRequest, GetUserByExternalIdResponse } from './';
|
|
2
|
+
import { ForgeExtendedContext, GroupObject, RequestConfig, BulkEntityRequest, BulkEntityResponse, BulkUsersRequest, BulkUsersResponse, DeleteUsersByExternalIdRequest, DeleteUsersByExternalIdResponse, GetUserByExternalIdRequest, GetUserByExternalIdResponse, MapUsersRequest, MapUsersResponse } from './';
|
|
3
3
|
export interface TeamWorkGraph {
|
|
4
4
|
setEntities(request: BulkEntityRequest): Promise<BulkEntityResponse>;
|
|
5
5
|
deleteEntity(context: ForgeExtendedContext, entityId: string): Promise<Result>;
|
|
@@ -10,5 +10,6 @@ export interface TeamWorkGraph {
|
|
|
10
10
|
setUsers(request: BulkUsersRequest): Promise<BulkUsersResponse>;
|
|
11
11
|
deleteUsersByExternalId(request: DeleteUsersByExternalIdRequest): Promise<DeleteUsersByExternalIdResponse>;
|
|
12
12
|
getUserByExternalId(request: GetUserByExternalIdRequest): Promise<GetUserByExternalIdResponse>;
|
|
13
|
+
mapUsers(request: MapUsersRequest): Promise<MapUsersResponse>;
|
|
13
14
|
}
|
|
14
15
|
//# sourceMappingURL=graph.d.ts.map
|
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,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EACL,oBAAoB,EACpB,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,8BAA8B,EAC9B,+BAA+B,EAC/B,0BAA0B,EAC1B,2BAA2B,
|
|
1
|
+
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../src/types/graph.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EACL,oBAAoB,EACpB,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,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41
|
error?: string;
|
|
42
42
|
};
|
|
43
|
+
export declare type UserMapping = {
|
|
44
|
+
externalId: string;
|
|
45
|
+
updateSequenceNumber: number;
|
|
46
|
+
updatedAt: number;
|
|
47
|
+
accountId?: string;
|
|
48
|
+
externalEmailAddress?: string;
|
|
49
|
+
};
|
|
50
|
+
export declare type MapUsersRequest = {
|
|
51
|
+
directMappings: UserMapping[];
|
|
52
|
+
};
|
|
53
|
+
export declare type MapUsersResponse = {
|
|
54
|
+
success: boolean;
|
|
55
|
+
results: Array<{
|
|
56
|
+
externalId: string;
|
|
57
|
+
accountId?: string;
|
|
58
|
+
success: boolean;
|
|
59
|
+
error?: string;
|
|
60
|
+
}>;
|
|
61
|
+
};
|
|
43
62
|
//# sourceMappingURL=requests.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requests.d.ts","sourceRoot":"","sources":["../../src/types/requests.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAG/C,oBAAY,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACzB,CAAC;AAEF,oBAAY,kBAAkB,GAAG;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,OAAO,CAAC;QACjB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC,CAAC;CACJ,CAAC;AAGF,oBAAY,gBAAgB,GAAG;IAC7B,KAAK,EAAE,WAAW,EAAE,CAAC;CACtB,CAAC;AAEF,oBAAY,iBAAiB,GAAG;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC;QACb,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,EAAE,OAAO,CAAC;QACjB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC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",
|
|
4
4
|
"description": "Forge TeamworkGraph SDK",
|
|
5
5
|
"author": "Atlassian",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"jest-when": "^3.6.0"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@forge/api": "^6.0.1-next.0"
|
|
25
|
+
"@forge/api": "^6.0.1-next.0-experimental-effab31"
|
|
26
26
|
},
|
|
27
27
|
"publishConfig": {
|
|
28
28
|
"registry": "https://packages.atlassian.com/api/npm/npm-public/"
|