@kinotic-ai/os-api 1.2.0 → 1.3.0

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/dist/index.cjs CHANGED
@@ -57,6 +57,8 @@ __export(exports_src, {
57
57
  QueryDecorator: () => QueryDecorator,
58
58
  ProjectType: () => ProjectType,
59
59
  ProjectService: () => ProjectService,
60
+ ProjectGitHubRepoService: () => ProjectGitHubRepoService,
61
+ ProjectGitHubRepoLink: () => ProjectGitHubRepoLink,
60
62
  Project: () => Project,
61
63
  ProgressType: () => ProgressType,
62
64
  PageableC3Type: () => PageableC3Type,
@@ -78,6 +80,9 @@ __export(exports_src, {
78
80
  IamUserService: () => IamUserService,
79
81
  IamUser: () => IamUser,
80
82
  GroupLoggerLevelsDescriptor: () => GroupLoggerLevelsDescriptor,
83
+ GitHubInstallationToken: () => GitHubInstallationToken,
84
+ GitHubAppInstallationService: () => GitHubAppInstallationService,
85
+ GitHubAppInstallation: () => GitHubAppInstallation,
81
86
  FlattenedDecorator: () => FlattenedDecorator,
82
87
  EsIndexConfigurationDecorator: () => EsIndexConfigurationDecorator,
83
88
  EntityDefinitionService: () => EntityDefinitionService,
@@ -85,6 +90,7 @@ __export(exports_src, {
85
90
  EntityDecorator: () => EntityDecorator,
86
91
  DiscriminatorDecorator: () => DiscriminatorDecorator,
87
92
  DataInsightsService: () => DataInsightsService,
93
+ AvailableRepo: () => AvailableRepo,
88
94
  AutoGeneratedIdDecorator: () => AutoGeneratedIdDecorator,
89
95
  AuthType: () => AuthType,
90
96
  ApplicationService: () => ApplicationService,
@@ -445,6 +451,42 @@ class IamUser {
445
451
  created = null;
446
452
  updated = null;
447
453
  }
454
+ // packages/os-api/src/api/model/github/AvailableRepo.ts
455
+ class AvailableRepo {
456
+ repoId = "";
457
+ fullName = "";
458
+ defaultBranch = "";
459
+ privateRepo = false;
460
+ }
461
+ // packages/os-api/src/api/model/github/GitHubAppInstallation.ts
462
+ class GitHubAppInstallation {
463
+ id = null;
464
+ organizationId = "";
465
+ githubInstallationId = "";
466
+ accountLogin = "";
467
+ accountType = "";
468
+ suspendedAt = null;
469
+ created = null;
470
+ updated = null;
471
+ }
472
+ // packages/os-api/src/api/model/github/GitHubInstallationToken.ts
473
+ class GitHubInstallationToken {
474
+ token = "";
475
+ expiresAt = 0;
476
+ cloneUrl = "";
477
+ defaultBranch = "";
478
+ }
479
+ // packages/os-api/src/api/model/github/ProjectGitHubRepoLink.ts
480
+ class ProjectGitHubRepoLink {
481
+ id = null;
482
+ projectId = "";
483
+ organizationId = "";
484
+ installationId = "";
485
+ repoFullName = "";
486
+ repoId = "";
487
+ defaultBranch = "";
488
+ updated = null;
489
+ }
448
490
  // packages/os-api/src/api/model/KinoticProjectConfig.ts
449
491
  class KinoticProjectConfig {
450
492
  name;
@@ -672,7 +714,7 @@ class WorkloadServiceProxy extends import_core7.CrudServiceProxy {
672
714
  return this.serviceProxy.invoke("syncIndex", []);
673
715
  }
674
716
  }
675
- // packages/os-api/src/api/services/iam/IIamUserService.ts
717
+ // packages/os-api/src/api/services/IIamUserService.ts
676
718
  var import_core8 = require("@kinotic-ai/core");
677
719
 
678
720
  class IamUserService extends import_core8.CrudServiceProxy {
@@ -698,6 +740,40 @@ class IamUserService extends import_core8.CrudServiceProxy {
698
740
  return this.serviceProxy.invoke("findFirstByEmailInScopeType", [email, authScopeType]);
699
741
  }
700
742
  }
743
+ // packages/os-api/src/api/services/IGitHubAppInstallationService.ts
744
+ var import_core9 = require("@kinotic-ai/core");
745
+
746
+ class GitHubAppInstallationService extends import_core9.CrudServiceProxy {
747
+ constructor(kinotic) {
748
+ super(kinotic.serviceProxy("org.kinotic.github.api.services.GitHubAppInstallationService"));
749
+ }
750
+ startInstall() {
751
+ return this.serviceProxy.invoke("startInstall", []);
752
+ }
753
+ findForCurrentOrg() {
754
+ return this.serviceProxy.invoke("findForCurrentOrg", []);
755
+ }
756
+ }
757
+ // packages/os-api/src/api/services/IProjectGitHubRepoService.ts
758
+ var import_core10 = require("@kinotic-ai/core");
759
+
760
+ class ProjectGitHubRepoService extends import_core10.CrudServiceProxy {
761
+ constructor(kinotic) {
762
+ super(kinotic.serviceProxy("org.kinotic.github.api.services.ProjectGitHubRepoService"));
763
+ }
764
+ listAvailableRepos() {
765
+ return this.serviceProxy.invoke("listAvailableRepos", []);
766
+ }
767
+ linkProject(projectId, repoFullName) {
768
+ return this.serviceProxy.invoke("linkProject", [projectId, repoFullName]);
769
+ }
770
+ unlinkProject(projectId) {
771
+ return this.serviceProxy.invoke("unlinkProject", [projectId]);
772
+ }
773
+ findByProject(projectId) {
774
+ return this.serviceProxy.invoke("findByProject", [projectId]);
775
+ }
776
+ }
701
777
  // packages/os-api/src/api/OsApiPlugin.ts
702
778
  var OsApiPlugin = {
703
779
  install(kinotic) {
@@ -712,7 +788,9 @@ var OsApiPlugin = {
712
788
  dataInsights: new DataInsightsService(kinotic),
713
789
  vmNodes: new VmNodeServiceProxy(kinotic),
714
790
  workloads: new WorkloadServiceProxy(kinotic),
715
- iamUsers: new IamUserService(kinotic)
791
+ iamUsers: new IamUserService(kinotic),
792
+ githubAppInstallations: new GitHubAppInstallationService(kinotic),
793
+ githubRepoLinks: new ProjectGitHubRepoService(kinotic)
716
794
  };
717
795
  }
718
796
  };
package/dist/index.d.cts CHANGED
@@ -563,6 +563,68 @@ interface SignUpCompleteRequest {
563
563
  password: string;
564
564
  }
565
565
  /**
566
+ * One row in the repo dropdown shown when linking a project. Carries just enough
567
+ * info for the UI; a successful link round-trips through
568
+ * {@link IProjectGitHubRepoService} which re-validates against GitHub before
569
+ * persisting.
570
+ */
571
+ declare class AvailableRepo {
572
+ repoId: string;
573
+ fullName: string;
574
+ defaultBranch: string;
575
+ privateRepo: boolean;
576
+ }
577
+ import { Identifiable as Identifiable9 } from "@kinotic-ai/core";
578
+ /**
579
+ * Persisted record of one GitHub App installation that a Kinotic Org has authorised.
580
+ * The durable binding that says "Org X has access to GitHub install Y" — without it,
581
+ * no installation token can be minted on behalf of the org and webhook deliveries
582
+ * can't be matched to a project.
583
+ */
584
+ declare class GitHubAppInstallation implements Identifiable9<string> {
585
+ id: string | null;
586
+ organizationId: string;
587
+ githubInstallationId: string;
588
+ accountLogin: string;
589
+ accountType: string;
590
+ suspendedAt: number | null;
591
+ created: number | null;
592
+ updated: number | null;
593
+ }
594
+ /**
595
+ * What worker nodes receive when they ask for clone credentials. The token is a
596
+ * short-lived GitHub installation access token scoped to a single repository with
597
+ * {@code contents:read} permission; {@code expiresAt} is the absolute UTC instant
598
+ * (epoch milliseconds).
599
+ */
600
+ declare class GitHubInstallationToken {
601
+ /** Bearer token to send as {@code Authorization: Bearer <token>} on git over HTTPS. */
602
+ token: string;
603
+ /** Absolute expiry (epoch milliseconds). Workers should not use the token beyond this point. */
604
+ expiresAt: number;
605
+ /** {@code https://github.com/<owner>/<repo>.git} for the linked repo. */
606
+ cloneUrl: string;
607
+ /** Default branch on the linked repo (e.g. {@code main}). */
608
+ defaultBranch: string;
609
+ }
610
+ import { Identifiable as Identifiable10 } from "@kinotic-ai/core";
611
+ /**
612
+ * Persisted link between a Kinotic Project and a single GitHub repository reachable
613
+ * through an existing {@link GitHubAppInstallation}. Drives webhook dispatch
614
+ * (delivery → project) and ref-creation auth (project → which repo, via which
615
+ * installation).
616
+ */
617
+ declare class ProjectGitHubRepoLink implements Identifiable10<string> {
618
+ id: string | null;
619
+ projectId: string;
620
+ organizationId: string;
621
+ installationId: string;
622
+ repoFullName: string;
623
+ repoId: string;
624
+ defaultBranch: string;
625
+ updated: number | null;
626
+ }
627
+ /**
566
628
  * Configuration for a single entities path and its corresponding repository output.
567
629
  */
568
630
  type EntitiesPathConfig = {
@@ -630,7 +692,8 @@ import { IKinotic } from "@kinotic-ai/core";
630
692
  import { CrudServiceProxy, ICrudServiceProxy } from "@kinotic-ai/core";
631
693
  interface IApplicationService extends ICrudServiceProxy<Application> {
632
694
  /**
633
- * Creates a new application if it does not already exist.
695
+ * Creates a new application if it does not already exist. The organization id is derived
696
+ * from the authenticated participant on the server.
634
697
  * @param id the id of the application to create
635
698
  * @param description the description of the application to create
636
699
  * @return {@link Promise} emitting the created application
@@ -1004,6 +1067,55 @@ declare class IamUserService extends CrudServiceProxy8<IamUser> implements IIamU
1004
1067
  resetPassword(userId: string, newPassword: string): Promise<void>;
1005
1068
  findFirstByEmailInScopeType(email: string, authScopeType: string): Promise<IamUser | null>;
1006
1069
  }
1070
+ import { CrudServiceProxy as CrudServiceProxy9, IKinotic as IKinotic12, ICrudServiceProxy as ICrudServiceProxy9 } from "@kinotic-ai/core";
1071
+ interface IGitHubAppInstallationService extends ICrudServiceProxy9<GitHubAppInstallation> {
1072
+ /**
1073
+ * Stages a single-use {@code state} token bound to the caller's organization in
1074
+ * a cluster-wide store, then returns the GitHub install URL with that state
1075
+ * embedded. The SPA performs {@code window.location = url}.
1076
+ * <p>
1077
+ * Caller must be authenticated under {@code ORGANIZATION} scope; the org is read
1078
+ * from the participant. The state expires after 10 minutes if unused.
1079
+ */
1080
+ startInstall(): Promise<string>;
1081
+ /**
1082
+ * Returns the (at-most-one) installation bound to the caller's organization, or
1083
+ * {@code null} if GitHub is not yet linked. Drives the "linked / not linked"
1084
+ * indicator in the org-settings UI.
1085
+ */
1086
+ findForCurrentOrg(): Promise<GitHubAppInstallation | null>;
1087
+ }
1088
+ declare class GitHubAppInstallationService extends CrudServiceProxy9<GitHubAppInstallation> implements IGitHubAppInstallationService {
1089
+ constructor(kinotic: IKinotic12);
1090
+ startInstall(): Promise<string>;
1091
+ findForCurrentOrg(): Promise<GitHubAppInstallation | null>;
1092
+ }
1093
+ import { CrudServiceProxy as CrudServiceProxy10, IKinotic as IKinotic13, ICrudServiceProxy as ICrudServiceProxy10 } from "@kinotic-ai/core";
1094
+ interface IProjectGitHubRepoService extends ICrudServiceProxy10<ProjectGitHubRepoLink> {
1095
+ /**
1096
+ * Lists the repositories visible under the caller's organization's installation.
1097
+ * Calls GitHub on every invocation; not cached because the org admin may have
1098
+ * just toggled repo access.
1099
+ */
1100
+ listAvailableRepos(): Promise<AvailableRepo[]>;
1101
+ /**
1102
+ * Creates or replaces the link for the given project. Validates that the chosen
1103
+ * {@code repoFullName} is reachable through the org's installation before
1104
+ * persisting.
1105
+ */
1106
+ linkProject(projectId: string, repoFullName: string): Promise<ProjectGitHubRepoLink>;
1107
+ /** Removes the link for the given project, if any. */
1108
+ unlinkProject(projectId: string): Promise<void>;
1109
+ /** Returns the link for the given project, or {@code null} when none exists. */
1110
+ findByProject(projectId: string): Promise<ProjectGitHubRepoLink | null>;
1111
+ }
1112
+ declare class ProjectGitHubRepoService extends CrudServiceProxy10<ProjectGitHubRepoLink> implements IProjectGitHubRepoService {
1113
+ constructor(kinotic: IKinotic13);
1114
+ listAvailableRepos(): Promise<AvailableRepo[]>;
1115
+ linkProject(projectId: string, repoFullName: string): Promise<ProjectGitHubRepoLink>;
1116
+ unlinkProject(projectId: string): Promise<void>;
1117
+ findByProject(projectId: string): Promise<ProjectGitHubRepoLink | null>;
1118
+ }
1007
1119
  import { KinoticPlugin } from "@kinotic-ai/core";
1008
1120
  interface IOsApiExtension {
1009
1121
  applications: IApplicationService;
@@ -1017,9 +1129,11 @@ interface IOsApiExtension {
1017
1129
  vmNodes: IVmNodeService;
1018
1130
  workloads: IWorkloadService;
1019
1131
  iamUsers: IIamUserService;
1132
+ githubAppInstallations: IGitHubAppInstallationService;
1133
+ githubRepoLinks: IProjectGitHubRepoService;
1020
1134
  }
1021
1135
  declare const OsApiPlugin: KinoticPlugin<IOsApiExtension>;
1022
1136
  declare module "@kinotic-ai/core" {
1023
1137
  interface KinoticSingleton extends IOsApiExtension {}
1024
1138
  }
1025
- export { WorkloadStatus, WorkloadServiceProxy, Workload, VmProviderType, VmNodeStatus, VmNodeServiceProxy, VmNode, VersionDecorator, TimeReferenceDecorator, TextDecorator, TenantSelectionC3Type, TenantIdDecorator, SingleLoggerLevelsDescriptor, SignUpRequest, SignUpCompleteRequest, QueryOptionsC3Type, QueryDecorator, ProjectType, ProjectService, Project, ProgressType, PageableC3Type, PageC3Type, OsApiPlugin, OrganizationService, Organization, NotIndexedDecorator, NestedDecorator, NamedQueriesDefinitionService, NamedQueriesDefinition, MigrationService, MigrationResult, MigrationRequest, MigrationDefinition, LoggersDescriptor, LoggerLevelsDescriptor, LogManager, LogLevel, KinoticProjectConfig, InsightRequest, InsightProgress, IdDecorator, IamUserService, IamUser, IWorkloadService, IVmNodeService, IProjectService, IOsApiExtension, IOrganizationService, INamedQueriesDefinitionService, IMigrationService, ILogManager, IIamUserService, IEntityDefinitionService, IDataInsightsService, IApplicationService, GroupLoggerLevelsDescriptor, FlattenedDecorator, EsIndexConfigurationDecorator, EntityDefinitionService, EntityDefinition, EntityDecorator, EntitiesPathConfig, DiscriminatorDecorator, DataInsightsService, DataInsightsComponent, AutoGeneratedIdDecorator, AuthType, ApplicationService, Application };
1139
+ export { WorkloadStatus, WorkloadServiceProxy, Workload, VmProviderType, VmNodeStatus, VmNodeServiceProxy, VmNode, VersionDecorator, TimeReferenceDecorator, TextDecorator, TenantSelectionC3Type, TenantIdDecorator, SingleLoggerLevelsDescriptor, SignUpRequest, SignUpCompleteRequest, QueryOptionsC3Type, QueryDecorator, ProjectType, ProjectService, ProjectGitHubRepoService, ProjectGitHubRepoLink, Project, ProgressType, PageableC3Type, PageC3Type, OsApiPlugin, OrganizationService, Organization, NotIndexedDecorator, NestedDecorator, NamedQueriesDefinitionService, NamedQueriesDefinition, MigrationService, MigrationResult, MigrationRequest, MigrationDefinition, LoggersDescriptor, LoggerLevelsDescriptor, LogManager, LogLevel, KinoticProjectConfig, InsightRequest, InsightProgress, IdDecorator, IamUserService, IamUser, IWorkloadService, IVmNodeService, IProjectService, IProjectGitHubRepoService, IOsApiExtension, IOrganizationService, INamedQueriesDefinitionService, IMigrationService, ILogManager, IIamUserService, IGitHubAppInstallationService, IEntityDefinitionService, IDataInsightsService, IApplicationService, GroupLoggerLevelsDescriptor, GitHubInstallationToken, GitHubAppInstallationService, GitHubAppInstallation, FlattenedDecorator, EsIndexConfigurationDecorator, EntityDefinitionService, EntityDefinition, EntityDecorator, EntitiesPathConfig, DiscriminatorDecorator, DataInsightsService, DataInsightsComponent, AvailableRepo, AutoGeneratedIdDecorator, AuthType, ApplicationService, Application };
package/dist/index.d.ts CHANGED
@@ -563,6 +563,68 @@ interface SignUpCompleteRequest {
563
563
  password: string;
564
564
  }
565
565
  /**
566
+ * One row in the repo dropdown shown when linking a project. Carries just enough
567
+ * info for the UI; a successful link round-trips through
568
+ * {@link IProjectGitHubRepoService} which re-validates against GitHub before
569
+ * persisting.
570
+ */
571
+ declare class AvailableRepo {
572
+ repoId: string;
573
+ fullName: string;
574
+ defaultBranch: string;
575
+ privateRepo: boolean;
576
+ }
577
+ import { Identifiable as Identifiable9 } from "@kinotic-ai/core";
578
+ /**
579
+ * Persisted record of one GitHub App installation that a Kinotic Org has authorised.
580
+ * The durable binding that says "Org X has access to GitHub install Y" — without it,
581
+ * no installation token can be minted on behalf of the org and webhook deliveries
582
+ * can't be matched to a project.
583
+ */
584
+ declare class GitHubAppInstallation implements Identifiable9<string> {
585
+ id: string | null;
586
+ organizationId: string;
587
+ githubInstallationId: string;
588
+ accountLogin: string;
589
+ accountType: string;
590
+ suspendedAt: number | null;
591
+ created: number | null;
592
+ updated: number | null;
593
+ }
594
+ /**
595
+ * What worker nodes receive when they ask for clone credentials. The token is a
596
+ * short-lived GitHub installation access token scoped to a single repository with
597
+ * {@code contents:read} permission; {@code expiresAt} is the absolute UTC instant
598
+ * (epoch milliseconds).
599
+ */
600
+ declare class GitHubInstallationToken {
601
+ /** Bearer token to send as {@code Authorization: Bearer <token>} on git over HTTPS. */
602
+ token: string;
603
+ /** Absolute expiry (epoch milliseconds). Workers should not use the token beyond this point. */
604
+ expiresAt: number;
605
+ /** {@code https://github.com/<owner>/<repo>.git} for the linked repo. */
606
+ cloneUrl: string;
607
+ /** Default branch on the linked repo (e.g. {@code main}). */
608
+ defaultBranch: string;
609
+ }
610
+ import { Identifiable as Identifiable10 } from "@kinotic-ai/core";
611
+ /**
612
+ * Persisted link between a Kinotic Project and a single GitHub repository reachable
613
+ * through an existing {@link GitHubAppInstallation}. Drives webhook dispatch
614
+ * (delivery → project) and ref-creation auth (project → which repo, via which
615
+ * installation).
616
+ */
617
+ declare class ProjectGitHubRepoLink implements Identifiable10<string> {
618
+ id: string | null;
619
+ projectId: string;
620
+ organizationId: string;
621
+ installationId: string;
622
+ repoFullName: string;
623
+ repoId: string;
624
+ defaultBranch: string;
625
+ updated: number | null;
626
+ }
627
+ /**
566
628
  * Configuration for a single entities path and its corresponding repository output.
567
629
  */
568
630
  type EntitiesPathConfig = {
@@ -630,7 +692,8 @@ import { IKinotic } from "@kinotic-ai/core";
630
692
  import { CrudServiceProxy, ICrudServiceProxy } from "@kinotic-ai/core";
631
693
  interface IApplicationService extends ICrudServiceProxy<Application> {
632
694
  /**
633
- * Creates a new application if it does not already exist.
695
+ * Creates a new application if it does not already exist. The organization id is derived
696
+ * from the authenticated participant on the server.
634
697
  * @param id the id of the application to create
635
698
  * @param description the description of the application to create
636
699
  * @return {@link Promise} emitting the created application
@@ -1004,6 +1067,55 @@ declare class IamUserService extends CrudServiceProxy8<IamUser> implements IIamU
1004
1067
  resetPassword(userId: string, newPassword: string): Promise<void>;
1005
1068
  findFirstByEmailInScopeType(email: string, authScopeType: string): Promise<IamUser | null>;
1006
1069
  }
1070
+ import { CrudServiceProxy as CrudServiceProxy9, IKinotic as IKinotic12, ICrudServiceProxy as ICrudServiceProxy9 } from "@kinotic-ai/core";
1071
+ interface IGitHubAppInstallationService extends ICrudServiceProxy9<GitHubAppInstallation> {
1072
+ /**
1073
+ * Stages a single-use {@code state} token bound to the caller's organization in
1074
+ * a cluster-wide store, then returns the GitHub install URL with that state
1075
+ * embedded. The SPA performs {@code window.location = url}.
1076
+ * <p>
1077
+ * Caller must be authenticated under {@code ORGANIZATION} scope; the org is read
1078
+ * from the participant. The state expires after 10 minutes if unused.
1079
+ */
1080
+ startInstall(): Promise<string>;
1081
+ /**
1082
+ * Returns the (at-most-one) installation bound to the caller's organization, or
1083
+ * {@code null} if GitHub is not yet linked. Drives the "linked / not linked"
1084
+ * indicator in the org-settings UI.
1085
+ */
1086
+ findForCurrentOrg(): Promise<GitHubAppInstallation | null>;
1087
+ }
1088
+ declare class GitHubAppInstallationService extends CrudServiceProxy9<GitHubAppInstallation> implements IGitHubAppInstallationService {
1089
+ constructor(kinotic: IKinotic12);
1090
+ startInstall(): Promise<string>;
1091
+ findForCurrentOrg(): Promise<GitHubAppInstallation | null>;
1092
+ }
1093
+ import { CrudServiceProxy as CrudServiceProxy10, IKinotic as IKinotic13, ICrudServiceProxy as ICrudServiceProxy10 } from "@kinotic-ai/core";
1094
+ interface IProjectGitHubRepoService extends ICrudServiceProxy10<ProjectGitHubRepoLink> {
1095
+ /**
1096
+ * Lists the repositories visible under the caller's organization's installation.
1097
+ * Calls GitHub on every invocation; not cached because the org admin may have
1098
+ * just toggled repo access.
1099
+ */
1100
+ listAvailableRepos(): Promise<AvailableRepo[]>;
1101
+ /**
1102
+ * Creates or replaces the link for the given project. Validates that the chosen
1103
+ * {@code repoFullName} is reachable through the org's installation before
1104
+ * persisting.
1105
+ */
1106
+ linkProject(projectId: string, repoFullName: string): Promise<ProjectGitHubRepoLink>;
1107
+ /** Removes the link for the given project, if any. */
1108
+ unlinkProject(projectId: string): Promise<void>;
1109
+ /** Returns the link for the given project, or {@code null} when none exists. */
1110
+ findByProject(projectId: string): Promise<ProjectGitHubRepoLink | null>;
1111
+ }
1112
+ declare class ProjectGitHubRepoService extends CrudServiceProxy10<ProjectGitHubRepoLink> implements IProjectGitHubRepoService {
1113
+ constructor(kinotic: IKinotic13);
1114
+ listAvailableRepos(): Promise<AvailableRepo[]>;
1115
+ linkProject(projectId: string, repoFullName: string): Promise<ProjectGitHubRepoLink>;
1116
+ unlinkProject(projectId: string): Promise<void>;
1117
+ findByProject(projectId: string): Promise<ProjectGitHubRepoLink | null>;
1118
+ }
1007
1119
  import { KinoticPlugin } from "@kinotic-ai/core";
1008
1120
  interface IOsApiExtension {
1009
1121
  applications: IApplicationService;
@@ -1017,9 +1129,11 @@ interface IOsApiExtension {
1017
1129
  vmNodes: IVmNodeService;
1018
1130
  workloads: IWorkloadService;
1019
1131
  iamUsers: IIamUserService;
1132
+ githubAppInstallations: IGitHubAppInstallationService;
1133
+ githubRepoLinks: IProjectGitHubRepoService;
1020
1134
  }
1021
1135
  declare const OsApiPlugin: KinoticPlugin<IOsApiExtension>;
1022
1136
  declare module "@kinotic-ai/core" {
1023
1137
  interface KinoticSingleton extends IOsApiExtension {}
1024
1138
  }
1025
- export { WorkloadStatus, WorkloadServiceProxy, Workload, VmProviderType, VmNodeStatus, VmNodeServiceProxy, VmNode, VersionDecorator, TimeReferenceDecorator, TextDecorator, TenantSelectionC3Type, TenantIdDecorator, SingleLoggerLevelsDescriptor, SignUpRequest, SignUpCompleteRequest, QueryOptionsC3Type, QueryDecorator, ProjectType, ProjectService, Project, ProgressType, PageableC3Type, PageC3Type, OsApiPlugin, OrganizationService, Organization, NotIndexedDecorator, NestedDecorator, NamedQueriesDefinitionService, NamedQueriesDefinition, MigrationService, MigrationResult, MigrationRequest, MigrationDefinition, LoggersDescriptor, LoggerLevelsDescriptor, LogManager, LogLevel, KinoticProjectConfig, InsightRequest, InsightProgress, IdDecorator, IamUserService, IamUser, IWorkloadService, IVmNodeService, IProjectService, IOsApiExtension, IOrganizationService, INamedQueriesDefinitionService, IMigrationService, ILogManager, IIamUserService, IEntityDefinitionService, IDataInsightsService, IApplicationService, GroupLoggerLevelsDescriptor, FlattenedDecorator, EsIndexConfigurationDecorator, EntityDefinitionService, EntityDefinition, EntityDecorator, EntitiesPathConfig, DiscriminatorDecorator, DataInsightsService, DataInsightsComponent, AutoGeneratedIdDecorator, AuthType, ApplicationService, Application };
1139
+ export { WorkloadStatus, WorkloadServiceProxy, Workload, VmProviderType, VmNodeStatus, VmNodeServiceProxy, VmNode, VersionDecorator, TimeReferenceDecorator, TextDecorator, TenantSelectionC3Type, TenantIdDecorator, SingleLoggerLevelsDescriptor, SignUpRequest, SignUpCompleteRequest, QueryOptionsC3Type, QueryDecorator, ProjectType, ProjectService, ProjectGitHubRepoService, ProjectGitHubRepoLink, Project, ProgressType, PageableC3Type, PageC3Type, OsApiPlugin, OrganizationService, Organization, NotIndexedDecorator, NestedDecorator, NamedQueriesDefinitionService, NamedQueriesDefinition, MigrationService, MigrationResult, MigrationRequest, MigrationDefinition, LoggersDescriptor, LoggerLevelsDescriptor, LogManager, LogLevel, KinoticProjectConfig, InsightRequest, InsightProgress, IdDecorator, IamUserService, IamUser, IWorkloadService, IVmNodeService, IProjectService, IProjectGitHubRepoService, IOsApiExtension, IOrganizationService, INamedQueriesDefinitionService, IMigrationService, ILogManager, IIamUserService, IGitHubAppInstallationService, IEntityDefinitionService, IDataInsightsService, IApplicationService, GroupLoggerLevelsDescriptor, GitHubInstallationToken, GitHubAppInstallationService, GitHubAppInstallation, FlattenedDecorator, EsIndexConfigurationDecorator, EntityDefinitionService, EntityDefinition, EntityDecorator, EntitiesPathConfig, DiscriminatorDecorator, DataInsightsService, DataInsightsComponent, AvailableRepo, AutoGeneratedIdDecorator, AuthType, ApplicationService, Application };
package/dist/index.js CHANGED
@@ -351,6 +351,42 @@ class IamUser {
351
351
  created = null;
352
352
  updated = null;
353
353
  }
354
+ // packages/os-api/src/api/model/github/AvailableRepo.ts
355
+ class AvailableRepo {
356
+ repoId = "";
357
+ fullName = "";
358
+ defaultBranch = "";
359
+ privateRepo = false;
360
+ }
361
+ // packages/os-api/src/api/model/github/GitHubAppInstallation.ts
362
+ class GitHubAppInstallation {
363
+ id = null;
364
+ organizationId = "";
365
+ githubInstallationId = "";
366
+ accountLogin = "";
367
+ accountType = "";
368
+ suspendedAt = null;
369
+ created = null;
370
+ updated = null;
371
+ }
372
+ // packages/os-api/src/api/model/github/GitHubInstallationToken.ts
373
+ class GitHubInstallationToken {
374
+ token = "";
375
+ expiresAt = 0;
376
+ cloneUrl = "";
377
+ defaultBranch = "";
378
+ }
379
+ // packages/os-api/src/api/model/github/ProjectGitHubRepoLink.ts
380
+ class ProjectGitHubRepoLink {
381
+ id = null;
382
+ projectId = "";
383
+ organizationId = "";
384
+ installationId = "";
385
+ repoFullName = "";
386
+ repoId = "";
387
+ defaultBranch = "";
388
+ updated = null;
389
+ }
354
390
  // packages/os-api/src/api/model/KinoticProjectConfig.ts
355
391
  class KinoticProjectConfig {
356
392
  name;
@@ -578,7 +614,7 @@ class WorkloadServiceProxy extends CrudServiceProxy7 {
578
614
  return this.serviceProxy.invoke("syncIndex", []);
579
615
  }
580
616
  }
581
- // packages/os-api/src/api/services/iam/IIamUserService.ts
617
+ // packages/os-api/src/api/services/IIamUserService.ts
582
618
  import { CrudServiceProxy as CrudServiceProxy8 } from "@kinotic-ai/core";
583
619
 
584
620
  class IamUserService extends CrudServiceProxy8 {
@@ -604,6 +640,40 @@ class IamUserService extends CrudServiceProxy8 {
604
640
  return this.serviceProxy.invoke("findFirstByEmailInScopeType", [email, authScopeType]);
605
641
  }
606
642
  }
643
+ // packages/os-api/src/api/services/IGitHubAppInstallationService.ts
644
+ import { CrudServiceProxy as CrudServiceProxy9 } from "@kinotic-ai/core";
645
+
646
+ class GitHubAppInstallationService extends CrudServiceProxy9 {
647
+ constructor(kinotic) {
648
+ super(kinotic.serviceProxy("org.kinotic.github.api.services.GitHubAppInstallationService"));
649
+ }
650
+ startInstall() {
651
+ return this.serviceProxy.invoke("startInstall", []);
652
+ }
653
+ findForCurrentOrg() {
654
+ return this.serviceProxy.invoke("findForCurrentOrg", []);
655
+ }
656
+ }
657
+ // packages/os-api/src/api/services/IProjectGitHubRepoService.ts
658
+ import { CrudServiceProxy as CrudServiceProxy10 } from "@kinotic-ai/core";
659
+
660
+ class ProjectGitHubRepoService extends CrudServiceProxy10 {
661
+ constructor(kinotic) {
662
+ super(kinotic.serviceProxy("org.kinotic.github.api.services.ProjectGitHubRepoService"));
663
+ }
664
+ listAvailableRepos() {
665
+ return this.serviceProxy.invoke("listAvailableRepos", []);
666
+ }
667
+ linkProject(projectId, repoFullName) {
668
+ return this.serviceProxy.invoke("linkProject", [projectId, repoFullName]);
669
+ }
670
+ unlinkProject(projectId) {
671
+ return this.serviceProxy.invoke("unlinkProject", [projectId]);
672
+ }
673
+ findByProject(projectId) {
674
+ return this.serviceProxy.invoke("findByProject", [projectId]);
675
+ }
676
+ }
607
677
  // packages/os-api/src/api/OsApiPlugin.ts
608
678
  var OsApiPlugin = {
609
679
  install(kinotic) {
@@ -618,7 +688,9 @@ var OsApiPlugin = {
618
688
  dataInsights: new DataInsightsService(kinotic),
619
689
  vmNodes: new VmNodeServiceProxy(kinotic),
620
690
  workloads: new WorkloadServiceProxy(kinotic),
621
- iamUsers: new IamUserService(kinotic)
691
+ iamUsers: new IamUserService(kinotic),
692
+ githubAppInstallations: new GitHubAppInstallationService(kinotic),
693
+ githubRepoLinks: new ProjectGitHubRepoService(kinotic)
622
694
  };
623
695
  }
624
696
  };
@@ -640,6 +712,8 @@ export {
640
712
  QueryDecorator,
641
713
  ProjectType,
642
714
  ProjectService,
715
+ ProjectGitHubRepoService,
716
+ ProjectGitHubRepoLink,
643
717
  Project,
644
718
  ProgressType,
645
719
  PageableC3Type,
@@ -661,6 +735,9 @@ export {
661
735
  IamUserService,
662
736
  IamUser,
663
737
  GroupLoggerLevelsDescriptor,
738
+ GitHubInstallationToken,
739
+ GitHubAppInstallationService,
740
+ GitHubAppInstallation,
664
741
  FlattenedDecorator,
665
742
  EsIndexConfigurationDecorator,
666
743
  EntityDefinitionService,
@@ -668,6 +745,7 @@ export {
668
745
  EntityDecorator,
669
746
  DiscriminatorDecorator,
670
747
  DataInsightsService,
748
+ AvailableRepo,
671
749
  AutoGeneratedIdDecorator,
672
750
  AuthType,
673
751
  ApplicationService,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kinotic-ai/os-api",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"