faros-airbyte-common 0.18.15 → 0.18.17

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.
@@ -3,7 +3,7 @@ import { IBuildApi } from 'azure-devops-node-api/BuildApi';
3
3
  import { ICoreApi } from 'azure-devops-node-api/CoreApi';
4
4
  import { IGitApi } from 'azure-devops-node-api/GitApi';
5
5
  import { BuildArtifact, BuildRepository, TimelineRecord as BaseTimelineRecord } from 'azure-devops-node-api/interfaces/BuildInterfaces';
6
- import { IdentityRef } from 'azure-devops-node-api/interfaces/common/VSSInterfaces';
6
+ import { IdentityRef, ResourceRef } from 'azure-devops-node-api/interfaces/common/VSSInterfaces';
7
7
  import * as GitInterfaces from 'azure-devops-node-api/interfaces/GitInterfaces';
8
8
  import { GraphUser } from 'azure-devops-node-api/interfaces/GraphInterfaces';
9
9
  import { Pipeline as BasePipeline, Run as BaseRun } from 'azure-devops-node-api/interfaces/PipelinesInterfaces';
@@ -14,6 +14,7 @@ import { IPipelinesApi } from 'azure-devops-node-api/PipelinesApi';
14
14
  import { IReleaseApi } from 'azure-devops-node-api/ReleaseApi';
15
15
  import { ITestApi } from 'azure-devops-node-api/TestApi';
16
16
  import { IWorkItemTrackingApi } from 'azure-devops-node-api/WorkItemTrackingApi';
17
+ import { RoundRobinConfig } from '../common/bucketing';
17
18
  export type DevOpsCloud = {
18
19
  type: 'cloud';
19
20
  };
@@ -22,7 +23,7 @@ export type DevOpsServer = {
22
23
  api_url: string;
23
24
  };
24
25
  export type AzureDevOpsInstance = DevOpsCloud | DevOpsServer;
25
- export interface AzureDevOpsConfig {
26
+ export interface AzureDevOpsConfig extends RoundRobinConfig {
26
27
  readonly instance?: AzureDevOpsInstance;
27
28
  readonly access_token: string;
28
29
  readonly organization: string;
@@ -84,6 +85,7 @@ export interface PullRequest extends Omit<GitInterfaces.GitPullRequest, 'status'
84
85
  status: string;
85
86
  mergeStatus: string;
86
87
  threads: GitInterfaces.GitPullRequestCommentThread[];
88
+ workItems?: ResourceRef[];
87
89
  }
88
90
  export interface Commit extends GitInterfaces.GitCommitRef {
89
91
  repository?: Repository;
@@ -7363,6 +7363,38 @@ export type CommitsQuery = {
7363
7363
  } | null;
7364
7364
  } | null;
7365
7365
  };
7366
+ export type DeploymentsQueryVariables = Exact<{
7367
+ owner: Scalars['String']['input'];
7368
+ repo: Scalars['String']['input'];
7369
+ page_size?: InputMaybe<Scalars['Int']['input']>;
7370
+ cursor?: InputMaybe<Scalars['String']['input']>;
7371
+ }>;
7372
+ export type DeploymentsQuery = {
7373
+ repository?: {
7374
+ deployments: {
7375
+ pageInfo: {
7376
+ endCursor?: string | null;
7377
+ hasNextPage: boolean;
7378
+ };
7379
+ nodes?: Array<{
7380
+ databaseId?: number | null;
7381
+ description?: string | null;
7382
+ environment?: string | null;
7383
+ createdAt: string;
7384
+ updatedAt: string;
7385
+ state?: DeploymentState | null;
7386
+ task?: string | null;
7387
+ commitOid: string;
7388
+ ref?: {
7389
+ name: string;
7390
+ } | null;
7391
+ latestStatus?: {
7392
+ state: DeploymentStatusState;
7393
+ } | null;
7394
+ } | null> | null;
7395
+ };
7396
+ } | null;
7397
+ };
7366
7398
  export type EnterpriseQueryVariables = Exact<{
7367
7399
  slug: Scalars['String']['input'];
7368
7400
  }>;
@@ -13,4 +13,5 @@ export declare const COMMITS_QUERY: string;
13
13
  export declare const REPOSITORY_TAGS_QUERY: string;
14
14
  export declare const PROJECTS_QUERY: string;
15
15
  export declare const ISSUES_QUERY: string;
16
+ export declare const DEPLOYMENTS_QUERY: string;
16
17
  export declare const ENTERPRISE_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.ENTERPRISE_QUERY = exports.ISSUES_QUERY = exports.PROJECTS_QUERY = exports.REPOSITORY_TAGS_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_CURSOR_QUERY = exports.PULL_REQUESTS_QUERY = exports.REVIEW_REQUESTS_FRAGMENT = exports.REVIEWS_FRAGMENT = exports.FILES_FRAGMENT = exports.LABELS_FRAGMENT = void 0;
6
+ exports.ENTERPRISE_QUERY = exports.DEPLOYMENTS_QUERY = exports.ISSUES_QUERY = exports.PROJECTS_QUERY = exports.REPOSITORY_TAGS_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_CURSOR_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');
@@ -34,6 +34,8 @@ exports.REPOSITORY_TAGS_QUERY = loadQuery('repository-tags-query.gql');
34
34
  exports.PROJECTS_QUERY = loadQuery('projects-query.gql');
35
35
  // Graphql query used to get repo issues
36
36
  exports.ISSUES_QUERY = ASSIGNEE_FIELDS_FRAGMENT + loadQuery('issues-query.gql');
37
+ // GraphQL query used to get repo deployments
38
+ exports.DEPLOYMENTS_QUERY = loadQuery('deployments-query.gql');
37
39
  // Graphql query used to get an enterprise
38
40
  exports.ENTERPRISE_QUERY = loadQuery('enterprise-query.gql');
39
41
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"queries.js","sourceRoot":"","sources":["../../src/github/queries.ts"],"names":[],"mappings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AAS,CAAC,gCAAgC,CAAC,CAAC;AAE1D,QAAA,kCAAkC,GAC7C,8BAA8B;IAC9B,SAAS,CAAC,wCAAwC,CAAC,CAAC;AAEtD,mCAAmC;AACtB,QAAA,YAAY,GAAG,SAAS,CAAC,kBAAkB,CAAC,CAAC;AAE1D,iDAAiD;AACpC,QAAA,iBAAiB,GAAG,SAAS,CAAC,wBAAwB,CAAC,CAAC;AAErE,0FAA0F;AAC7E,QAAA,yBAAyB,GAAG,SAAS,CAChD,+BAA+B,CAChC,CAAC;AAEF,oDAAoD;AACvC,QAAA,aAAa,GACxB,sBAAsB,GAAG,SAAS,CAAC,mBAAmB,CAAC,CAAC;AAE1D,+CAA+C;AAClC,QAAA,qBAAqB,GAAG,SAAS,CAAC,2BAA2B,CAAC,CAAC;AAE5E,kDAAkD;AACrC,QAAA,cAAc,GAAG,SAAS,CAAC,oBAAoB,CAAC,CAAC;AAE9D,wCAAwC;AAC3B,QAAA,YAAY,GACvB,wBAAwB,GAAG,SAAS,CAAC,kBAAkB,CAAC,CAAC;AAE3D,6CAA6C;AAChC,QAAA,iBAAiB,GAAG,SAAS,CAAC,uBAAuB,CAAC,CAAC;AAEpE,0CAA0C;AAC7B,QAAA,gBAAgB,GAAG,SAAS,CAAC,sBAAsB,CAAC,CAAC;AAElE;;;;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, EnterpriseQuery, IssuesQuery, LabelsQuery, ListMembersQuery, ListSamlSsoUsersQuery, ProjectsQuery, PullRequestsQuery, RepoTagsQuery } from './generated';
3
+ import { CommitsQuery, DeploymentsQuery, EnterpriseQuery, IssuesQuery, LabelsQuery, ListMembersQuery, ListSamlSsoUsersQuery, ProjectsQuery, 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'>;
@@ -185,6 +185,11 @@ export type SecretScanningAlert = {
185
185
  resolved_by: string | null;
186
186
  push_protection_bypassed_by: string | null;
187
187
  };
188
+ type DeploymentNode = DeploymentsQuery['repository']['deployments']['nodes'][0];
189
+ export type Deployment = {
190
+ org: string;
191
+ repo: string;
192
+ } & DeploymentNode;
188
193
  export type Workflow = {
189
194
  org: string;
190
195
  repo: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/github/types.ts"],"names":[],"mappings":";;AAAA,wCAAsC;AAetC,MAAM,OAAO,GAAY,IAAI,cAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/github/types.ts"],"names":[],"mappings":";;AAAA,wCAAsC;AAgBtC,MAAM,OAAO,GAAY,IAAI,cAAO,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { Camelize, CommitSchema, DeploymentSchema, EventSchema, GroupSchema, IssueSchema, MergeRequestSchema, NoteSchema, ProjectSchema, ReleaseSchema, TagSchema, UserSchema } from '@gitbeaker/rest';
1
+ import { Camelize, CommitSchema, DeploymentSchema, EventSchema, GroupSchema, IssueSchema, MergeRequestSchema, NoteSchema, PipelineSchema, ProjectSchema, ReleaseSchema, TagSchema, UserSchema } from '@gitbeaker/rest';
2
2
  export type FarosProjectOutput = {
3
3
  readonly __brand: 'FarosProject';
4
4
  id: string;
@@ -71,3 +71,9 @@ export type FarosDeploymentOutput = {
71
71
  group_id: string;
72
72
  project_path: string;
73
73
  } & Pick<DeploymentSchema, 'id' | 'iid' | 'ref' | 'sha' | 'user' | 'created_at' | 'updated_at' | 'status' | 'deployable' | 'environment'>;
74
+ export type FarosPipelineOutput = {
75
+ readonly __brand: 'FarosPipeline';
76
+ group_id: string;
77
+ project_path: string;
78
+ project_id: string;
79
+ } & Pick<PipelineSchema, 'id' | 'iid' | 'sha' | 'ref' | 'status' | 'source' | 'created_at' | 'updated_at' | 'started_at' | 'finished_at' | 'duration' | 'web_url' | 'user' | 'tag'>;