faros-airbyte-common 0.10.10 → 0.10.11

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.
@@ -7500,6 +7500,55 @@ export type ListMembersQuery = {
7500
7500
  };
7501
7501
  } | null;
7502
7502
  };
7503
+ export type ListSamlSsoUsersQueryVariables = Exact<{
7504
+ login: Scalars['String']['input'];
7505
+ cursor?: InputMaybe<Scalars['String']['input']>;
7506
+ page_size?: InputMaybe<Scalars['Int']['input']>;
7507
+ }>;
7508
+ export type ListSamlSsoUsersQuery = {
7509
+ organization?: {
7510
+ samlIdentityProvider?: {
7511
+ externalIdentities: {
7512
+ nodes?: Array<{
7513
+ samlIdentity?: {
7514
+ nameId?: string | null;
7515
+ } | null;
7516
+ user?: {
7517
+ login: string;
7518
+ html_url: string;
7519
+ type: 'User';
7520
+ } | null;
7521
+ } | null> | null;
7522
+ pageInfo: {
7523
+ endCursor?: string | null;
7524
+ hasNextPage: boolean;
7525
+ };
7526
+ };
7527
+ } | null;
7528
+ } | null;
7529
+ };
7530
+ export type ProjectsQueryVariables = Exact<{
7531
+ login: Scalars['String']['input'];
7532
+ cursor?: InputMaybe<Scalars['String']['input']>;
7533
+ page_size?: InputMaybe<Scalars['Int']['input']>;
7534
+ }>;
7535
+ export type ProjectsQuery = {
7536
+ organization?: {
7537
+ projectsV2: {
7538
+ nodes?: Array<{
7539
+ id: string;
7540
+ name: string;
7541
+ body?: string | null;
7542
+ created_at: string;
7543
+ updated_at: string;
7544
+ } | null> | null;
7545
+ pageInfo: {
7546
+ hasNextPage: boolean;
7547
+ endCursor?: string | null;
7548
+ };
7549
+ };
7550
+ } | null;
7551
+ };
7503
7552
  export type PullRequestReviewRequestsQueryVariables = Exact<{
7504
7553
  org: Scalars['String']['input'];
7505
7554
  repo: Scalars['String']['input'];
@@ -7,7 +7,9 @@ export declare const PULL_REQUEST_REVIEWS_QUERY: string;
7
7
  export declare const PULL_REQUEST_REVIEW_REQUESTS_QUERY: string;
8
8
  export declare const LABELS_QUERY: string;
9
9
  export declare const ORG_MEMBERS_QUERY: string;
10
+ export declare const LIST_SAML_SSO_USERS_QUERY: string;
10
11
  export declare const COMMITS_QUERY: string;
11
12
  export declare const COMMITS_CHANGED_FILES_IF_AVAILABLE_QUERY: string;
12
13
  export declare const COMMITS_CHANGED_FILES_QUERY: string;
13
14
  export declare const REPOSITORY_TAGS_QUERY: string;
15
+ export declare const PROJECTS_QUERY: string;
@@ -3,7 +3,7 @@ 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.REPOSITORY_TAGS_QUERY = 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_REVIEW_REQUESTS_QUERY = exports.PULL_REQUEST_REVIEWS_QUERY = exports.PULL_REQUESTS_QUERY = exports.REVIEW_REQUESTS_FRAGMENT = exports.REVIEWS_FRAGMENT = exports.FILES_FRAGMENT = exports.LABELS_FRAGMENT = void 0;
6
+ exports.PROJECTS_QUERY = exports.REPOSITORY_TAGS_QUERY = exports.COMMITS_CHANGED_FILES_QUERY = exports.COMMITS_CHANGED_FILES_IF_AVAILABLE_QUERY = exports.COMMITS_QUERY = exports.LIST_SAML_SSO_USERS_QUERY = exports.ORG_MEMBERS_QUERY = exports.LABELS_QUERY = exports.PULL_REQUEST_REVIEW_REQUESTS_QUERY = exports.PULL_REQUEST_REVIEWS_QUERY = exports.PULL_REQUESTS_QUERY = exports.REVIEW_REQUESTS_FRAGMENT = 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
9
  exports.LABELS_FRAGMENT = loadQuery('labels-fragment.gql');
@@ -22,6 +22,8 @@ exports.PULL_REQUEST_REVIEW_REQUESTS_QUERY = REVIEW_REQUEST_FIELDS_FRAGMENT +
22
22
  exports.LABELS_QUERY = loadQuery('labels-query.gql');
23
23
  // GraphQL query used to get organization members
24
24
  exports.ORG_MEMBERS_QUERY = loadQuery('list-members-query.gql');
25
+ // GraphQL query used to get SAML SSO users when SAML SSO is enabled on organization level
26
+ exports.LIST_SAML_SSO_USERS_QUERY = loadQuery('list-saml-sso-users-query.gql');
25
27
  // GraphQL query used to get commits from repository
26
28
  exports.COMMITS_QUERY = COMMIT_FIELDS_FRAGMENT + loadQuery('commits-query.gql');
27
29
  // GraphQL query used to get commits from repository with changedFilesIfAvailable
@@ -31,6 +33,8 @@ exports.COMMITS_CHANGED_FILES_IF_AVAILABLE_QUERY = COMMIT_FIELDS_FRAGMENT +
31
33
  exports.COMMITS_CHANGED_FILES_QUERY = COMMIT_FIELDS_FRAGMENT + loadQuery('commits-changed-files-query.gql');
32
34
  // Graphql query used to get tags by repository
33
35
  exports.REPOSITORY_TAGS_QUERY = loadQuery('repository-tags-query.gql');
36
+ // Graphql query used to get organization projects
37
+ exports.PROJECTS_QUERY = loadQuery('projects-query.gql');
34
38
  /**
35
39
  * Load query file from resources
36
40
  * @param query query file name
@@ -1 +1 @@
1
- {"version":3,"file":"queries.js","sourceRoot":"","sources":["../../src/github/queries.ts"],"names":[],"mappings":";;;;;;AAAA,wDAA0B;AAC1B,gDAAwB;AAEX,QAAA,eAAe,GAAG,SAAS,CAAC,qBAAqB,CAAC,CAAC;AAEnD,QAAA,cAAc,GAAG,SAAS,CAAC,oBAAoB,CAAC,CAAC;AAE9D,MAAM,sBAAsB,GAAG,SAAS,CAAC,4BAA4B,CAAC,CAAC;AAE1D,QAAA,gBAAgB,GAC3B,sBAAsB,GAAG,SAAS,CAAC,sBAAsB,CAAC,CAAC;AAE7D,MAAM,8BAA8B,GAAG,SAAS,CAC9C,oCAAoC,CAC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,CAAC,oBAAoB,CAAC,CAAC;AAE9D;;;;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,6 +1,6 @@
1
1
  import { Octokit } from '@octokit/rest';
2
2
  import { GetResponseDataTypeFromEndpointMethod } from '@octokit/types';
3
- import { CommitsQuery, LabelsQuery, ListMembersQuery, PullRequestsQuery, RepoTagsQuery } from './generated';
3
+ import { CommitsQuery, LabelsQuery, ListMembersQuery, ListSamlSsoUsersQuery, PullRequestsQuery, RepoTagsQuery } from './generated';
4
4
  declare const octokit: Octokit;
5
5
  export type AppInstallation = GetResponseDataTypeFromEndpointMethod<typeof octokit.apps.listInstallations>[0];
6
6
  export type Organization = Pick<GetResponseDataTypeFromEndpointMethod<typeof octokit.orgs.get>, 'login' | 'name' | 'type' | 'html_url' | 'created_at' | 'updated_at'>;
@@ -55,6 +55,9 @@ export type TeamMembership = {
55
55
  export type OutsideCollaborator = {
56
56
  org: string;
57
57
  } & Pick<GetResponseDataTypeFromEndpointMethod<typeof octokit.orgs.listOutsideCollaborators>[0], 'name' | 'login' | 'email' | 'type' | 'html_url'>;
58
+ export type SamlSsoUser = {
59
+ org: string;
60
+ } & ListSamlSsoUsersQuery['organization']['samlIdentityProvider']['externalIdentities']['nodes'][0];
58
61
  export type Tag = {
59
62
  repository: string;
60
63
  name: string;
@@ -69,6 +72,10 @@ export type Release = {
69
72
  html_url: string;
70
73
  author: Pick<ReleaseNode['author'], 'login' | 'name' | 'email' | 'html_url' | 'type'>;
71
74
  } & Pick<ReleaseNode, 'id' | 'name' | 'body' | 'draft' | 'created_at' | 'published_at' | 'tag_name'>;
75
+ export type Project = {
76
+ org: string;
77
+ id: string;
78
+ } & Pick<GetResponseDataTypeFromEndpointMethod<typeof octokit.projects.listForOrg>[0], 'name' | 'body' | 'created_at' | 'updated_at'>;
72
79
  export type CopilotSeatsStreamRecord = CopilotSeat | CopilotSeatEnded | CopilotSeatsEmpty;
73
80
  export type CopilotSeat = {
74
81
  empty?: never;
@@ -101,4 +108,16 @@ export type CopilotUsageSummary = {
101
108
  org: string;
102
109
  } & GetResponseDataTypeFromEndpointMethod<typeof octokit.copilot.usageMetricsForOrg>[0];
103
110
  export type LanguageEditorBreakdown = CopilotUsageSummary['breakdown'][0];
111
+ export type ContributorStats = {
112
+ org: string;
113
+ repo: string;
114
+ user: string;
115
+ total: number;
116
+ weeks: {
117
+ w?: number;
118
+ a?: number;
119
+ d?: number;
120
+ c?: number;
121
+ }[];
122
+ };
104
123
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/github/types.ts"],"names":[],"mappings":";;;AAAA,wCAAsC;AAWtC,MAAM,OAAO,GAAY,IAAI,cAAO,EAAE,CAAC;AAkLvC,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;AAYtC,MAAM,OAAO,GAAY,IAAI,cAAO,EAAE,CAAC;AA8LvC,IAAY,UAEX;AAFD,WAAY,UAAU;IACpB,uCAAyB,CAAA;AAC3B,CAAC,EAFW,UAAU,0BAAV,UAAU,QAErB"}