@kinotic-ai/os-api 1.1.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,11 +57,15 @@ __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,
63
65
  PageC3Type: () => PageC3Type,
64
66
  OsApiPlugin: () => OsApiPlugin,
67
+ OrganizationService: () => OrganizationService,
68
+ Organization: () => Organization,
65
69
  NotIndexedDecorator: () => NotIndexedDecorator,
66
70
  NestedDecorator: () => NestedDecorator,
67
71
  NamedQueriesDefinitionService: () => NamedQueriesDefinitionService,
@@ -76,6 +80,9 @@ __export(exports_src, {
76
80
  IamUserService: () => IamUserService,
77
81
  IamUser: () => IamUser,
78
82
  GroupLoggerLevelsDescriptor: () => GroupLoggerLevelsDescriptor,
83
+ GitHubInstallationToken: () => GitHubInstallationToken,
84
+ GitHubAppInstallationService: () => GitHubAppInstallationService,
85
+ GitHubAppInstallation: () => GitHubAppInstallation,
79
86
  FlattenedDecorator: () => FlattenedDecorator,
80
87
  EsIndexConfigurationDecorator: () => EsIndexConfigurationDecorator,
81
88
  EntityDefinitionService: () => EntityDefinitionService,
@@ -83,6 +90,7 @@ __export(exports_src, {
83
90
  EntityDecorator: () => EntityDecorator,
84
91
  DiscriminatorDecorator: () => DiscriminatorDecorator,
85
92
  DataInsightsService: () => DataInsightsService,
93
+ AvailableRepo: () => AvailableRepo,
86
94
  AutoGeneratedIdDecorator: () => AutoGeneratedIdDecorator,
87
95
  AuthType: () => AuthType,
88
96
  ApplicationService: () => ApplicationService,
@@ -268,6 +276,7 @@ class TenantSelectionC3Type extends import_idl17.ArrayC3Type {
268
276
  // packages/os-api/src/api/model/Application.ts
269
277
  class Application {
270
278
  id;
279
+ organizationId;
271
280
  description;
272
281
  updated = null;
273
282
  constructor(id, description) {
@@ -275,9 +284,20 @@ class Application {
275
284
  this.description = description;
276
285
  }
277
286
  }
287
+ // packages/os-api/src/api/model/Organization.ts
288
+ class Organization {
289
+ id = null;
290
+ name = "";
291
+ description = null;
292
+ oidcConfigurationIds = null;
293
+ createdBy = null;
294
+ created = null;
295
+ updated = null;
296
+ }
278
297
  // packages/os-api/src/api/model/Project.ts
279
298
  class Project {
280
299
  id = null;
300
+ organizationId;
281
301
  applicationId;
282
302
  name;
283
303
  description;
@@ -431,6 +451,42 @@ class IamUser {
431
451
  created = null;
432
452
  updated = null;
433
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
+ }
434
490
  // packages/os-api/src/api/model/KinoticProjectConfig.ts
435
491
  class KinoticProjectConfig {
436
492
  name;
@@ -456,6 +512,17 @@ class ApplicationService extends import_core.CrudServiceProxy {
456
512
  return this.serviceProxy.invoke("syncIndex", []);
457
513
  }
458
514
  }
515
+ // packages/os-api/src/api/services/IOrganizationService.ts
516
+ var import_core2 = require("@kinotic-ai/core");
517
+
518
+ class OrganizationService extends import_core2.CrudServiceProxy {
519
+ constructor(kinotic) {
520
+ super(kinotic.serviceProxy("org.kinotic.os.api.services.OrganizationService"));
521
+ }
522
+ getOidcConfigurations(organizationId) {
523
+ return this.serviceProxy.invoke("getOidcConfigurations", [organizationId]);
524
+ }
525
+ }
459
526
  // packages/os-api/src/api/services/ILogManager.ts
460
527
  var LogLevel;
461
528
  ((LogLevel2) => {
@@ -486,9 +553,9 @@ class LoggersDescriptor {
486
553
  groups = new Map;
487
554
  }
488
555
  // packages/os-api/src/api/services/IProjectService.ts
489
- var import_core2 = require("@kinotic-ai/core");
556
+ var import_core3 = require("@kinotic-ai/core");
490
557
 
491
- class ProjectService extends import_core2.CrudServiceProxy {
558
+ class ProjectService extends import_core3.CrudServiceProxy {
492
559
  constructor(kinotic) {
493
560
  super(kinotic.serviceProxy("org.kinotic.os.api.services.ProjectService"));
494
561
  }
@@ -500,7 +567,7 @@ class ProjectService extends import_core2.CrudServiceProxy {
500
567
  }
501
568
  async findAllForApplication(applicationId, pageable) {
502
569
  const page = await this.findAllForApplicationSinglePage(applicationId, pageable);
503
- return new import_core2.FunctionalIterablePage(pageable, page, (pageable2) => this.findAllForApplicationSinglePage(applicationId, pageable2));
570
+ return new import_core3.FunctionalIterablePage(pageable, page, (pageable2) => this.findAllForApplicationSinglePage(applicationId, pageable2));
504
571
  }
505
572
  findAllForApplicationSinglePage(applicationId, pageable) {
506
573
  return this.serviceProxy.invoke("findAllForApplication", [applicationId, pageable]);
@@ -536,9 +603,9 @@ class LogManager {
536
603
  }
537
604
  }
538
605
  // packages/os-api/src/api/services/IEntityDefinitionService.ts
539
- var import_core3 = require("@kinotic-ai/core");
606
+ var import_core4 = require("@kinotic-ai/core");
540
607
 
541
- class EntityDefinitionService extends import_core3.CrudServiceProxy {
608
+ class EntityDefinitionService extends import_core4.CrudServiceProxy {
542
609
  constructor(kinotic) {
543
610
  super(kinotic.serviceProxy("org.kinotic.persistence.api.services.EntityDefinitionService"));
544
611
  }
@@ -553,14 +620,14 @@ class EntityDefinitionService extends import_core3.CrudServiceProxy {
553
620
  }
554
621
  async findAllForApplication(applicationId, pageable) {
555
622
  const page = await this.findAllForApplicationSinglePage(applicationId, pageable);
556
- return new import_core3.FunctionalIterablePage(pageable, page, (pageable2) => this.findAllForApplicationSinglePage(applicationId, pageable2));
623
+ return new import_core4.FunctionalIterablePage(pageable, page, (pageable2) => this.findAllForApplicationSinglePage(applicationId, pageable2));
557
624
  }
558
625
  findAllPublishedForApplication(applicationId, pageable) {
559
626
  return this.serviceProxy.invoke("findAllPublishedForApplication", [applicationId, pageable]);
560
627
  }
561
628
  async findAllForProject(projectId, pageable) {
562
629
  const page = await this.findAllForProjectSinglePage(projectId, pageable);
563
- return new import_core3.FunctionalIterablePage(pageable, page, (pageable2) => this.findAllForProjectSinglePage(projectId, pageable2));
630
+ return new import_core4.FunctionalIterablePage(pageable, page, (pageable2) => this.findAllForProjectSinglePage(projectId, pageable2));
564
631
  }
565
632
  findAllForProjectSinglePage(projectId, pageable) {
566
633
  return this.serviceProxy.invoke("findAllForProject", [projectId, pageable]);
@@ -576,9 +643,9 @@ class EntityDefinitionService extends import_core3.CrudServiceProxy {
576
643
  }
577
644
  }
578
645
  // packages/os-api/src/api/services/INamedQueriesDefinitionService.ts
579
- var import_core4 = require("@kinotic-ai/core");
646
+ var import_core5 = require("@kinotic-ai/core");
580
647
 
581
- class NamedQueriesDefinitionService extends import_core4.CrudServiceProxy {
648
+ class NamedQueriesDefinitionService extends import_core5.CrudServiceProxy {
582
649
  constructor(kinotic) {
583
650
  super(kinotic.serviceProxy("org.kinotic.persistence.api.services.NamedQueriesDefinitionService"));
584
651
  }
@@ -613,9 +680,9 @@ class DataInsightsService {
613
680
  }
614
681
  }
615
682
  // packages/os-api/src/api/services/IVmNodeService.ts
616
- var import_core5 = require("@kinotic-ai/core");
683
+ var import_core6 = require("@kinotic-ai/core");
617
684
 
618
- class VmNodeServiceProxy extends import_core5.CrudServiceProxy {
685
+ class VmNodeServiceProxy extends import_core6.CrudServiceProxy {
619
686
  constructor(kinotic) {
620
687
  super(kinotic.serviceProxy("org.kinotic.os.api.services.VmNodeService"));
621
688
  }
@@ -627,15 +694,15 @@ class VmNodeServiceProxy extends import_core5.CrudServiceProxy {
627
694
  }
628
695
  }
629
696
  // packages/os-api/src/api/services/IWorkloadService.ts
630
- var import_core6 = require("@kinotic-ai/core");
697
+ var import_core7 = require("@kinotic-ai/core");
631
698
 
632
- class WorkloadServiceProxy extends import_core6.CrudServiceProxy {
699
+ class WorkloadServiceProxy extends import_core7.CrudServiceProxy {
633
700
  constructor(kinotic) {
634
701
  super(kinotic.serviceProxy("org.kinotic.os.api.services.WorkloadService"));
635
702
  }
636
703
  async findAllForNode(nodeId, pageable) {
637
704
  const page = await this.findAllForNodeSinglePage(nodeId, pageable);
638
- return new import_core6.FunctionalIterablePage(pageable, page, (pageable2) => this.findAllForNodeSinglePage(nodeId, pageable2));
705
+ return new import_core7.FunctionalIterablePage(pageable, page, (pageable2) => this.findAllForNodeSinglePage(nodeId, pageable2));
639
706
  }
640
707
  findAllForNodeSinglePage(nodeId, pageable) {
641
708
  return this.serviceProxy.invoke("findAllForNode", [nodeId, pageable]);
@@ -647,10 +714,10 @@ class WorkloadServiceProxy extends import_core6.CrudServiceProxy {
647
714
  return this.serviceProxy.invoke("syncIndex", []);
648
715
  }
649
716
  }
650
- // packages/os-api/src/api/services/iam/IIamUserService.ts
651
- var import_core7 = require("@kinotic-ai/core");
717
+ // packages/os-api/src/api/services/IIamUserService.ts
718
+ var import_core8 = require("@kinotic-ai/core");
652
719
 
653
- class IamUserService extends import_core7.CrudServiceProxy {
720
+ class IamUserService extends import_core8.CrudServiceProxy {
654
721
  constructor(kinotic) {
655
722
  super(kinotic.serviceProxy("org.kinotic.os.api.services.iam.IamUserService"));
656
723
  }
@@ -669,12 +736,50 @@ class IamUserService extends import_core7.CrudServiceProxy {
669
736
  resetPassword(userId, newPassword) {
670
737
  return this.serviceProxy.invoke("resetPassword", [userId, newPassword]);
671
738
  }
739
+ findFirstByEmailInScopeType(email, authScopeType) {
740
+ return this.serviceProxy.invoke("findFirstByEmailInScopeType", [email, authScopeType]);
741
+ }
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
+ }
672
776
  }
673
777
  // packages/os-api/src/api/OsApiPlugin.ts
674
778
  var OsApiPlugin = {
675
779
  install(kinotic) {
676
780
  return {
677
781
  applications: new ApplicationService(kinotic),
782
+ organizations: new OrganizationService(kinotic),
678
783
  projects: new ProjectService(kinotic),
679
784
  logManager: new LogManager(kinotic),
680
785
  entityDefinitions: new EntityDefinitionService(kinotic),
@@ -683,7 +788,9 @@ var OsApiPlugin = {
683
788
  dataInsights: new DataInsightsService(kinotic),
684
789
  vmNodes: new VmNodeServiceProxy(kinotic),
685
790
  workloads: new WorkloadServiceProxy(kinotic),
686
- iamUsers: new IamUserService(kinotic)
791
+ iamUsers: new IamUserService(kinotic),
792
+ githubAppInstallations: new GitHubAppInstallationService(kinotic),
793
+ githubRepoLinks: new ProjectGitHubRepoService(kinotic)
687
794
  };
688
795
  }
689
796
  };