faros-airbyte-common 0.10.2 → 0.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7448,6 +7448,17 @@ export type FilesFragment = {
7448
7448
  } | null> | null;
7449
7449
  } | null;
7450
7450
  };
7451
+ export type LabelsFragment = {
7452
+ labels?: {
7453
+ pageInfo: {
7454
+ hasNextPage: boolean;
7455
+ endCursor?: string | null;
7456
+ };
7457
+ nodes?: Array<{
7458
+ name: string;
7459
+ } | null> | null;
7460
+ } | null;
7461
+ };
7451
7462
  export type LabelsQueryVariables = Exact<{
7452
7463
  owner: Scalars['String']['input'];
7453
7464
  repo: Scalars['String']['input'];
@@ -7489,6 +7500,58 @@ export type ListMembersQuery = {
7489
7500
  };
7490
7501
  } | null;
7491
7502
  };
7503
+ export type PullRequestReviewsQueryVariables = Exact<{
7504
+ org: Scalars['String']['input'];
7505
+ repo: Scalars['String']['input'];
7506
+ number: Scalars['Int']['input'];
7507
+ nested_page_size: Scalars['Int']['input'];
7508
+ cursor?: InputMaybe<Scalars['String']['input']>;
7509
+ }>;
7510
+ export type PullRequestReviewsQuery = {
7511
+ repository?: {
7512
+ pullRequest?: {
7513
+ reviews?: {
7514
+ pageInfo: {
7515
+ hasNextPage: boolean;
7516
+ endCursor?: string | null;
7517
+ };
7518
+ nodes?: Array<{
7519
+ state: PullRequestReviewState;
7520
+ submittedAt?: string | null;
7521
+ databaseId?: number | null;
7522
+ url: string;
7523
+ author?: {
7524
+ login: string;
7525
+ html_url: string;
7526
+ type: 'Bot';
7527
+ } | {
7528
+ name?: string | null;
7529
+ login: string;
7530
+ html_url: string;
7531
+ type: 'EnterpriseUserAccount';
7532
+ } | {
7533
+ login: string;
7534
+ html_url: string;
7535
+ type: 'Mannequin';
7536
+ } | {
7537
+ name?: string | null;
7538
+ login: string;
7539
+ html_url: string;
7540
+ type: 'Organization';
7541
+ } | {
7542
+ name?: string | null;
7543
+ login: string;
7544
+ html_url: string;
7545
+ type: 'User';
7546
+ } | null;
7547
+ comments: {
7548
+ totalCount: number;
7549
+ };
7550
+ } | null> | null;
7551
+ } | null;
7552
+ } | null;
7553
+ } | null;
7554
+ };
7492
7555
  export type PullRequestsQueryVariables = Exact<{
7493
7556
  owner: Scalars['String']['input'];
7494
7557
  repo: Scalars['String']['input'];
@@ -7548,15 +7611,6 @@ export type PullRequestsQuery = {
7548
7611
  comments: {
7549
7612
  totalCount: number;
7550
7613
  };
7551
- labels?: {
7552
- pageInfo: {
7553
- hasNextPage: boolean;
7554
- endCursor?: string | null;
7555
- };
7556
- nodes?: Array<{
7557
- name: string;
7558
- } | null> | null;
7559
- } | null;
7560
7614
  mergeCommit?: {
7561
7615
  oid: string;
7562
7616
  } | null;
@@ -7697,6 +7751,15 @@ export type PullRequestsQuery = {
7697
7751
  login: string;
7698
7752
  };
7699
7753
  } | null;
7754
+ labels?: {
7755
+ pageInfo: {
7756
+ hasNextPage: boolean;
7757
+ endCursor?: string | null;
7758
+ };
7759
+ nodes?: Array<{
7760
+ name: string;
7761
+ } | null> | null;
7762
+ } | null;
7700
7763
  files?: {
7701
7764
  pageInfo: {
7702
7765
  hasNextPage: boolean;
@@ -7708,7 +7771,120 @@ export type PullRequestsQuery = {
7708
7771
  deletions: number;
7709
7772
  } | null> | null;
7710
7773
  } | null;
7774
+ reviews?: {
7775
+ pageInfo: {
7776
+ hasNextPage: boolean;
7777
+ endCursor?: string | null;
7778
+ };
7779
+ nodes?: Array<{
7780
+ state: PullRequestReviewState;
7781
+ submittedAt?: string | null;
7782
+ databaseId?: number | null;
7783
+ url: string;
7784
+ author?: {
7785
+ login: string;
7786
+ html_url: string;
7787
+ type: 'Bot';
7788
+ } | {
7789
+ name?: string | null;
7790
+ login: string;
7791
+ html_url: string;
7792
+ type: 'EnterpriseUserAccount';
7793
+ } | {
7794
+ login: string;
7795
+ html_url: string;
7796
+ type: 'Mannequin';
7797
+ } | {
7798
+ name?: string | null;
7799
+ login: string;
7800
+ html_url: string;
7801
+ type: 'Organization';
7802
+ } | {
7803
+ name?: string | null;
7804
+ login: string;
7805
+ html_url: string;
7806
+ type: 'User';
7807
+ } | null;
7808
+ comments: {
7809
+ totalCount: number;
7810
+ };
7811
+ } | null> | null;
7812
+ } | null;
7711
7813
  } | null> | null;
7712
7814
  };
7713
7815
  } | null;
7714
7816
  };
7817
+ export type ReviewFieldsFragment = {
7818
+ state: PullRequestReviewState;
7819
+ submittedAt?: string | null;
7820
+ databaseId?: number | null;
7821
+ url: string;
7822
+ author?: {
7823
+ login: string;
7824
+ html_url: string;
7825
+ type: 'Bot';
7826
+ } | {
7827
+ name?: string | null;
7828
+ login: string;
7829
+ html_url: string;
7830
+ type: 'EnterpriseUserAccount';
7831
+ } | {
7832
+ login: string;
7833
+ html_url: string;
7834
+ type: 'Mannequin';
7835
+ } | {
7836
+ name?: string | null;
7837
+ login: string;
7838
+ html_url: string;
7839
+ type: 'Organization';
7840
+ } | {
7841
+ name?: string | null;
7842
+ login: string;
7843
+ html_url: string;
7844
+ type: 'User';
7845
+ } | null;
7846
+ comments: {
7847
+ totalCount: number;
7848
+ };
7849
+ };
7850
+ export type ReviewsFragment = {
7851
+ reviews?: {
7852
+ pageInfo: {
7853
+ hasNextPage: boolean;
7854
+ endCursor?: string | null;
7855
+ };
7856
+ nodes?: Array<{
7857
+ state: PullRequestReviewState;
7858
+ submittedAt?: string | null;
7859
+ databaseId?: number | null;
7860
+ url: string;
7861
+ author?: {
7862
+ login: string;
7863
+ html_url: string;
7864
+ type: 'Bot';
7865
+ } | {
7866
+ name?: string | null;
7867
+ login: string;
7868
+ html_url: string;
7869
+ type: 'EnterpriseUserAccount';
7870
+ } | {
7871
+ login: string;
7872
+ html_url: string;
7873
+ type: 'Mannequin';
7874
+ } | {
7875
+ name?: string | null;
7876
+ login: string;
7877
+ html_url: string;
7878
+ type: 'Organization';
7879
+ } | {
7880
+ name?: string | null;
7881
+ login: string;
7882
+ html_url: string;
7883
+ type: 'User';
7884
+ } | null;
7885
+ comments: {
7886
+ totalCount: number;
7887
+ };
7888
+ } | null> | null;
7889
+ } | null;
7890
+ };
@@ -1,5 +1,8 @@
1
+ export declare const LABELS_FRAGMENT: string;
1
2
  export declare const FILES_FRAGMENT: string;
3
+ export declare const REVIEWS_FRAGMENT: string;
2
4
  export declare const PULL_REQUESTS_QUERY: string;
5
+ export declare const PULL_REQUEST_REVIEWS_QUERY: string;
3
6
  export declare const LABELS_QUERY: string;
4
7
  export declare const ORG_MEMBERS_QUERY: string;
5
8
  export declare const COMMITS_QUERY: string;
@@ -3,13 +3,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.COMMITS_CHANGED_FILES_QUERY = exports.COMMITS_CHANGED_FILES_IF_AVAILABLE_QUERY = exports.COMMITS_QUERY = exports.ORG_MEMBERS_QUERY = exports.LABELS_QUERY = exports.PULL_REQUESTS_QUERY = exports.FILES_FRAGMENT = void 0;
6
+ exports.COMMITS_CHANGED_FILES_QUERY = exports.COMMITS_CHANGED_FILES_IF_AVAILABLE_QUERY = exports.COMMITS_QUERY = exports.ORG_MEMBERS_QUERY = exports.LABELS_QUERY = exports.PULL_REQUEST_REVIEWS_QUERY = exports.PULL_REQUESTS_QUERY = exports.REVIEWS_FRAGMENT = exports.FILES_FRAGMENT = exports.LABELS_FRAGMENT = void 0;
7
7
  const fs_extra_1 = __importDefault(require("fs-extra"));
8
8
  const path_1 = __importDefault(require("path"));
9
+ exports.LABELS_FRAGMENT = loadQuery('labels-fragment.gql');
9
10
  exports.FILES_FRAGMENT = loadQuery('files-fragment.gql');
11
+ const REVIEW_FIELDS_FRAGMENT = loadQuery('review-fields-fragment.gql');
12
+ exports.REVIEWS_FRAGMENT = REVIEW_FIELDS_FRAGMENT + loadQuery('reviews-fragment.gql');
10
13
  const COMMIT_FIELDS_FRAGMENT = loadQuery('commit-fields-fragment.gql');
11
14
  // GraphQL query used to get pull requests
12
15
  exports.PULL_REQUESTS_QUERY = loadQuery('pull-requests-query.gql');
16
+ exports.PULL_REQUEST_REVIEWS_QUERY = REVIEW_FIELDS_FRAGMENT + loadQuery('pull-request-reviews-query.gql');
13
17
  // GraphQL query used to get labels
14
18
  exports.LABELS_QUERY = loadQuery('labels-query.gql');
15
19
  // GraphQL query used to get organization members
@@ -1 +1 @@
1
- {"version":3,"file":"queries.js","sourceRoot":"","sources":["../../src/github/queries.ts"],"names":[],"mappings":";;;;;;AAAA,wDAA0B;AAC1B,gDAAwB;AAEX,QAAA,cAAc,GAAG,SAAS,CAAC,oBAAoB,CAAC,CAAC;AAE9D,MAAM,sBAAsB,GAAG,SAAS,CAAC,4BAA4B,CAAC,CAAC;AAEvE,0CAA0C;AAC7B,QAAA,mBAAmB,GAAG,SAAS,CAAC,yBAAyB,CAAC,CAAC;AAExE,mCAAmC;AACtB,QAAA,YAAY,GAAG,SAAS,CAAC,kBAAkB,CAAC,CAAC;AAE1D,iDAAiD;AACpC,QAAA,iBAAiB,GAAG,SAAS,CAAC,wBAAwB,CAAC,CAAC;AAErE,oDAAoD;AACvC,QAAA,aAAa,GACxB,sBAAsB,GAAG,SAAS,CAAC,mBAAmB,CAAC,CAAC;AAE1D,iFAAiF;AACpE,QAAA,wCAAwC,GACnD,sBAAsB;IACtB,SAAS,CAAC,8CAA8C,CAAC,CAAC;AAE5D,sEAAsE;AACzD,QAAA,2BAA2B,GACtC,sBAAsB,GAAG,SAAS,CAAC,iCAAiC,CAAC,CAAC;AAExE;;;;GAIG;AACH,SAAS,SAAS,CAAC,KAAa;IAC9B,OAAO,kBAAE,CAAC,YAAY,CACpB,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,CAAC,EACzE,MAAM,CACP,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"queries.js","sourceRoot":"","sources":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export type PullRequest = {
12
12
  org: string;
13
13
  repo: string;
14
- } & Omit<PullRequestNode, 'labels' | 'files'> & {
14
+ } & Omit<PullRequestNode, 'labels' | 'files' | 'reviews'> & {
15
15
  labels: PullRequestNode['labels']['nodes'];
16
16
  files: PullRequestNode['files']['nodes'];
17
+ reviews: PullRequestNode['reviews']['nodes'];
17
18
  };
19
+ export type PullRequestLabel = PullRequestNode['labels']['nodes'][0];
18
20
  export type PullRequestFile = PullRequestNode['files']['nodes'][0];
21
+ export type PullRequestComment = {
22
+ repository: string;
23
+ user: {
24
+ login: string;
25
+ };
26
+ } & Pick<GetResponseDataTypeFromEndpointMethod<typeof octokit.pulls.listReviewCommentsForRepo>[0], 'id' | 'body' | 'created_at' | 'updated_at' | 'pull_request_url'>;
27
+ export type PullRequestReview = PullRequestNode['reviews']['nodes'][0];
19
28
  export type Label = {
20
29
  org: string;
21
30
  repo: string;
@@ -40,17 +49,32 @@ export type Team = {
40
49
  export type TeamMembership = {
41
50
  org: string;
42
51
  team: string;
43
- user: string;
52
+ user: Pick<GetResponseDataTypeFromEndpointMethod<typeof octokit.teams.listMembersInOrg>[0], 'login' | 'name' | 'email' | 'html_url' | 'type'>;
44
53
  };
45
- export type CopilotSeatsStreamRecord = CopilotSeat | CopilotSeatsEmpty;
54
+ export type OutsideCollaborator = {
55
+ org: string;
56
+ } & Pick<GetResponseDataTypeFromEndpointMethod<typeof octokit.orgs.listOutsideCollaborators>[0], 'name' | 'login' | 'email' | 'type' | 'html_url'>;
57
+ export type CopilotSeatsStreamRecord = CopilotSeat | CopilotSeatEnded | CopilotSeatsEmpty;
46
58
  export type CopilotSeat = {
47
59
  empty?: never;
48
60
  org: string;
49
61
  user: string;
50
62
  team?: string;
51
63
  teamJoinedAt?: string;
64
+ teamLeftAt?: never;
52
65
  startedAt?: string;
66
+ endedAt?: never;
53
67
  } & Pick<GetResponseDataTypeFromEndpointMethod<typeof octokit.copilot.listCopilotSeats>['seats'][0], 'pending_cancellation_date' | 'last_activity_at'>;
68
+ export type CopilotSeatEnded = {
69
+ empty?: never;
70
+ org: string;
71
+ user: string;
72
+ team?: string;
73
+ teamJoinedAt?: never;
74
+ teamLeftAt?: string;
75
+ startedAt?: never;
76
+ endedAt?: string;
77
+ };
54
78
  export type CopilotSeatsEmpty = {
55
79
  empty: true;
56
80
  org: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/github/types.ts"],"names":[],"mappings":";;;AAAA,wCAAsC;AAUtC,MAAM,OAAO,GAAY,IAAI,cAAO,EAAE,CAAC;AAiGvC,IAAY,UAEX;AAFD,WAAY,UAAU;IACpB,uCAAyB,CAAA;AAC3B,CAAC,EAFW,UAAU,0BAAV,UAAU,QAErB"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/github/types.ts"],"names":[],"mappings":";;;AAAA,wCAAsC;AAUtC,MAAM,OAAO,GAAY,IAAI,cAAO,EAAE,CAAC;AA8IvC,IAAY,UAEX;AAFD,WAAY,UAAU;IACpB,uCAAyB,CAAA;AAC3B,CAAC,EAFW,UAAU,0BAAV,UAAU,QAErB"}