-
Notifications
You must be signed in to change notification settings - Fork 738
Expand file tree
/
Copy pathtimelineEventsBuilder.ts
More file actions
26 lines (21 loc) · 1.06 KB
/
timelineEventsBuilder.ts
File metadata and controls
26 lines (21 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { createBuilderClass, createLink } from '../base';
import { TimelineEventsResponse } from '../../../github/graphql';
import { RateLimitBuilder } from './rateLimitBuilder';
type Repository = NonNullable<TimelineEventsResponse['repository']>;
type PullRequest = Repository['pullRequest'];
type TimelineConn = PullRequest['timelineItems'];
export const TimelineEventsBuilder = createBuilderClass<TimelineEventsResponse>()({
repository: createLink<Repository>()({
pullRequest: createLink<PullRequest>()({
timelineItems: createLink<TimelineConn>()({
nodes: { default: [] },
}),
}),
}),
rateLimit: { linked: RateLimitBuilder },
});
export type TimelineEventsBuilder = InstanceType<typeof TimelineEventsBuilder>;