@kinotic-ai/os-api 1.14.2 → 3.0.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 +79 -43
- package/dist/index.d.cts +120 -31
- package/dist/index.d.ts +120 -31
- package/dist/index.js +53 -17
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -43,6 +43,7 @@ __export(exports_src, {
|
|
|
43
43
|
isSystemParticipant: () => isSystemParticipant,
|
|
44
44
|
isOrganizationParticipant: () => isOrganizationParticipant,
|
|
45
45
|
isApplicationParticipant: () => isApplicationParticipant,
|
|
46
|
+
appZone: () => appZone,
|
|
46
47
|
WorkloadStatus: () => WorkloadStatus,
|
|
47
48
|
WorkloadServiceProxy: () => WorkloadServiceProxy,
|
|
48
49
|
Workload: () => Workload,
|
|
@@ -56,6 +57,7 @@ __export(exports_src, {
|
|
|
56
57
|
TenantSelectionC3Type: () => TenantSelectionC3Type,
|
|
57
58
|
TenantIdDecorator: () => TenantIdDecorator,
|
|
58
59
|
SingleLoggerLevelsDescriptor: () => SingleLoggerLevelsDescriptor,
|
|
60
|
+
SYSTEM_ZONE: () => SYSTEM_ZONE,
|
|
59
61
|
RepositoryConnectionStatus: () => RepositoryConnectionStatus,
|
|
60
62
|
QueryOptionsC3Type: () => QueryOptionsC3Type,
|
|
61
63
|
QueryDecorator: () => QueryDecorator,
|
|
@@ -71,6 +73,7 @@ __export(exports_src, {
|
|
|
71
73
|
OsApiPlugin: () => OsApiPlugin,
|
|
72
74
|
OrganizationService: () => OrganizationService,
|
|
73
75
|
Organization: () => Organization,
|
|
76
|
+
OS_API_ZONE: () => OS_API_ZONE,
|
|
74
77
|
NotIndexedDecorator: () => NotIndexedDecorator,
|
|
75
78
|
NestedDecorator: () => NestedDecorator,
|
|
76
79
|
NamedQueriesDefinitionService: () => NamedQueriesDefinitionService,
|
|
@@ -79,6 +82,7 @@ __export(exports_src, {
|
|
|
79
82
|
MemberService: () => MemberService,
|
|
80
83
|
LoggersDescriptor: () => LoggersDescriptor,
|
|
81
84
|
LoggerLevelsDescriptor: () => LoggerLevelsDescriptor,
|
|
85
|
+
LogService: () => LogService,
|
|
82
86
|
LogManager: () => LogManager,
|
|
83
87
|
LogLevel: () => LogLevel,
|
|
84
88
|
KinoticProjectConfig: () => KinoticProjectConfig,
|
|
@@ -104,7 +108,9 @@ __export(exports_src, {
|
|
|
104
108
|
AutoGeneratedIdDecorator: () => AutoGeneratedIdDecorator,
|
|
105
109
|
AuthType: () => AuthType,
|
|
106
110
|
ApplicationService: () => ApplicationService,
|
|
107
|
-
Application: () => Application
|
|
111
|
+
Application: () => Application,
|
|
112
|
+
APP_ZONE_PREFIX: () => APP_ZONE_PREFIX,
|
|
113
|
+
APP_API_ZONE: () => import_persistence2.APP_API_ZONE
|
|
108
114
|
});
|
|
109
115
|
module.exports = __toCommonJS(exports_src);
|
|
110
116
|
|
|
@@ -287,11 +293,12 @@ class TenantSelectionC3Type extends import_idl17.ArrayC3Type {
|
|
|
287
293
|
class Application {
|
|
288
294
|
id;
|
|
289
295
|
organizationId;
|
|
296
|
+
name;
|
|
290
297
|
description;
|
|
291
298
|
tenantPerUser = false;
|
|
292
299
|
updated = null;
|
|
293
|
-
constructor(
|
|
294
|
-
this.
|
|
300
|
+
constructor(name, description) {
|
|
301
|
+
this.name = name;
|
|
295
302
|
this.description = description;
|
|
296
303
|
}
|
|
297
304
|
}
|
|
@@ -412,11 +419,15 @@ class Workload {
|
|
|
412
419
|
id = null;
|
|
413
420
|
name;
|
|
414
421
|
description;
|
|
422
|
+
organizationId = null;
|
|
423
|
+
applicationId = null;
|
|
415
424
|
providerType = "BOXLITE" /* BOXLITE */;
|
|
416
425
|
image;
|
|
417
426
|
vcpus = 1;
|
|
418
427
|
memoryMb = 512;
|
|
419
428
|
diskSizeMb = 1024;
|
|
429
|
+
detached = true;
|
|
430
|
+
autoRemove = false;
|
|
420
431
|
status = "PENDING" /* PENDING */;
|
|
421
432
|
environment = {};
|
|
422
433
|
portMappings = [];
|
|
@@ -577,12 +588,24 @@ class KinoticOsCredentialsAuthProvider {
|
|
|
577
588
|
return this.authHeaders;
|
|
578
589
|
}
|
|
579
590
|
}
|
|
580
|
-
// packages/os-api/src/api/
|
|
591
|
+
// packages/os-api/src/api/PlatformZones.ts
|
|
581
592
|
var import_core = require("@kinotic-ai/core");
|
|
593
|
+
var import_persistence2 = require("@kinotic-ai/persistence");
|
|
594
|
+
var OS_API_ZONE = "os_api";
|
|
595
|
+
var SYSTEM_ZONE = "system";
|
|
596
|
+
var APP_ZONE_PREFIX = "app";
|
|
597
|
+
function appZone(organizationId, applicationId) {
|
|
598
|
+
import_core.validateLabel(organizationId);
|
|
599
|
+
import_core.validateLabel(applicationId);
|
|
600
|
+
return `${APP_ZONE_PREFIX}.${organizationId}.${applicationId}`;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
// packages/os-api/src/api/services/IApplicationService.ts
|
|
604
|
+
var import_core2 = require("@kinotic-ai/core");
|
|
582
605
|
|
|
583
|
-
class ApplicationService extends
|
|
606
|
+
class ApplicationService extends import_core2.CrudServiceProxy {
|
|
584
607
|
constructor(kinotic) {
|
|
585
|
-
super(kinotic.serviceProxy(
|
|
608
|
+
super(kinotic.serviceProxy(`${OS_API_ZONE}.org.kinotic.os.api.services.ApplicationService`));
|
|
586
609
|
}
|
|
587
610
|
createApplicationIfNotExist(id, description) {
|
|
588
611
|
return this.serviceProxy.invoke("createApplicationIfNotExist", [id, description]);
|
|
@@ -592,11 +615,11 @@ class ApplicationService extends import_core.CrudServiceProxy {
|
|
|
592
615
|
}
|
|
593
616
|
}
|
|
594
617
|
// packages/os-api/src/api/services/IOrganizationService.ts
|
|
595
|
-
var
|
|
618
|
+
var import_core3 = require("@kinotic-ai/core");
|
|
596
619
|
|
|
597
|
-
class OrganizationService extends
|
|
620
|
+
class OrganizationService extends import_core3.CrudServiceProxy {
|
|
598
621
|
constructor(kinotic) {
|
|
599
|
-
super(kinotic.serviceProxy(
|
|
622
|
+
super(kinotic.serviceProxy(`${OS_API_ZONE}.org.kinotic.os.api.services.OrganizationService`));
|
|
600
623
|
}
|
|
601
624
|
getOidcConfigurations(organizationId) {
|
|
602
625
|
return this.serviceProxy.invoke("getOidcConfigurations", [organizationId]);
|
|
@@ -632,11 +655,11 @@ class LoggersDescriptor {
|
|
|
632
655
|
groups = new Map;
|
|
633
656
|
}
|
|
634
657
|
// packages/os-api/src/api/services/IProjectService.ts
|
|
635
|
-
var
|
|
658
|
+
var import_core4 = require("@kinotic-ai/core");
|
|
636
659
|
|
|
637
|
-
class ProjectService extends
|
|
660
|
+
class ProjectService extends import_core4.CrudServiceProxy {
|
|
638
661
|
constructor(kinotic) {
|
|
639
|
-
super(kinotic.serviceProxy(
|
|
662
|
+
super(kinotic.serviceProxy(`${OS_API_ZONE}.org.kinotic.os.api.services.ProjectService`));
|
|
640
663
|
}
|
|
641
664
|
countForApplication(applicationId) {
|
|
642
665
|
return this.serviceProxy.invoke("countForApplication", [applicationId]);
|
|
@@ -646,7 +669,7 @@ class ProjectService extends import_core3.CrudServiceProxy {
|
|
|
646
669
|
}
|
|
647
670
|
async findAllForApplication(applicationId, pageable) {
|
|
648
671
|
const page = await this.findAllForApplicationSinglePage(applicationId, pageable);
|
|
649
|
-
return new
|
|
672
|
+
return new import_core4.FunctionalIterablePage(pageable, page, (pageable2) => this.findAllForApplicationSinglePage(applicationId, pageable2));
|
|
650
673
|
}
|
|
651
674
|
findAllForApplicationSinglePage(applicationId, pageable) {
|
|
652
675
|
return this.serviceProxy.invoke("findAllForApplication", [applicationId, pageable]);
|
|
@@ -662,7 +685,7 @@ class ProjectService extends import_core3.CrudServiceProxy {
|
|
|
662
685
|
class LogManager {
|
|
663
686
|
serviceProxy;
|
|
664
687
|
constructor(kinotic) {
|
|
665
|
-
this.serviceProxy = kinotic.serviceProxy(
|
|
688
|
+
this.serviceProxy = kinotic.serviceProxy(`${OS_API_ZONE}.org.kinotic.os.api.services.LogManager`);
|
|
666
689
|
}
|
|
667
690
|
loggers(nodeId) {
|
|
668
691
|
return this.serviceProxy.invoke("loggers", null, nodeId);
|
|
@@ -684,12 +707,25 @@ class LogManager {
|
|
|
684
707
|
return this.serviceProxy.invoke("configureLogLevel", [name, level], nodeId);
|
|
685
708
|
}
|
|
686
709
|
}
|
|
710
|
+
// packages/os-api/src/api/services/ILogService.ts
|
|
711
|
+
class LogService {
|
|
712
|
+
serviceProxy;
|
|
713
|
+
constructor(kinotic) {
|
|
714
|
+
this.serviceProxy = kinotic.serviceProxy(`${OS_API_ZONE}.org.kinotic.os.api.services.LogService`);
|
|
715
|
+
}
|
|
716
|
+
tail(workloadId) {
|
|
717
|
+
return this.serviceProxy.invokeStream("tail", [workloadId]);
|
|
718
|
+
}
|
|
719
|
+
history(query) {
|
|
720
|
+
return this.serviceProxy.invoke("history", [query]);
|
|
721
|
+
}
|
|
722
|
+
}
|
|
687
723
|
// packages/os-api/src/api/services/IEntityDefinitionService.ts
|
|
688
|
-
var
|
|
724
|
+
var import_core5 = require("@kinotic-ai/core");
|
|
689
725
|
|
|
690
|
-
class EntityDefinitionService extends
|
|
726
|
+
class EntityDefinitionService extends import_core5.CrudServiceProxy {
|
|
691
727
|
constructor(kinotic) {
|
|
692
|
-
super(kinotic.serviceProxy(
|
|
728
|
+
super(kinotic.serviceProxy(`${OS_API_ZONE}.org.kinotic.persistence.api.services.EntityDefinitionService`));
|
|
693
729
|
}
|
|
694
730
|
countForApplication(applicationId) {
|
|
695
731
|
return this.serviceProxy.invoke("countForApplication", [applicationId]);
|
|
@@ -702,14 +738,14 @@ class EntityDefinitionService extends import_core4.CrudServiceProxy {
|
|
|
702
738
|
}
|
|
703
739
|
async findAllForApplication(applicationId, pageable) {
|
|
704
740
|
const page = await this.findAllForApplicationSinglePage(applicationId, pageable);
|
|
705
|
-
return new
|
|
741
|
+
return new import_core5.FunctionalIterablePage(pageable, page, (pageable2) => this.findAllForApplicationSinglePage(applicationId, pageable2));
|
|
706
742
|
}
|
|
707
743
|
findAllPublishedForApplication(applicationId, pageable) {
|
|
708
744
|
return this.serviceProxy.invoke("findAllPublishedForApplication", [applicationId, pageable]);
|
|
709
745
|
}
|
|
710
746
|
async findAllForProject(projectId, pageable) {
|
|
711
747
|
const page = await this.findAllForProjectSinglePage(projectId, pageable);
|
|
712
|
-
return new
|
|
748
|
+
return new import_core5.FunctionalIterablePage(pageable, page, (pageable2) => this.findAllForProjectSinglePage(projectId, pageable2));
|
|
713
749
|
}
|
|
714
750
|
findAllForProjectSinglePage(projectId, pageable) {
|
|
715
751
|
return this.serviceProxy.invoke("findAllForProject", [projectId, pageable]);
|
|
@@ -725,11 +761,11 @@ class EntityDefinitionService extends import_core4.CrudServiceProxy {
|
|
|
725
761
|
}
|
|
726
762
|
}
|
|
727
763
|
// packages/os-api/src/api/services/INamedQueriesDefinitionService.ts
|
|
728
|
-
var
|
|
764
|
+
var import_core6 = require("@kinotic-ai/core");
|
|
729
765
|
|
|
730
|
-
class NamedQueriesDefinitionService extends
|
|
766
|
+
class NamedQueriesDefinitionService extends import_core6.CrudServiceProxy {
|
|
731
767
|
constructor(kinotic) {
|
|
732
|
-
super(kinotic.serviceProxy(
|
|
768
|
+
super(kinotic.serviceProxy(`${OS_API_ZONE}.org.kinotic.persistence.api.services.NamedQueriesDefinitionService`));
|
|
733
769
|
}
|
|
734
770
|
syncIndex() {
|
|
735
771
|
return this.serviceProxy.invoke("syncIndex", []);
|
|
@@ -739,7 +775,7 @@ class NamedQueriesDefinitionService extends import_core5.CrudServiceProxy {
|
|
|
739
775
|
class MigrationService {
|
|
740
776
|
serviceProxy;
|
|
741
777
|
constructor(kinotic) {
|
|
742
|
-
this.serviceProxy = kinotic.serviceProxy(
|
|
778
|
+
this.serviceProxy = kinotic.serviceProxy(`${OS_API_ZONE}.org.kinotic.persistence.api.services.MigrationService`);
|
|
743
779
|
}
|
|
744
780
|
executeMigrations(migrationRequest) {
|
|
745
781
|
return this.serviceProxy.invoke("executeMigrations", [migrationRequest]);
|
|
@@ -755,18 +791,18 @@ class MigrationService {
|
|
|
755
791
|
class DataInsightsService {
|
|
756
792
|
serviceProxy;
|
|
757
793
|
constructor(kinotic) {
|
|
758
|
-
this.serviceProxy = kinotic.serviceProxy(
|
|
794
|
+
this.serviceProxy = kinotic.serviceProxy(`${OS_API_ZONE}.org.kinotic.persistence.api.services.insights.DataInsightsService`);
|
|
759
795
|
}
|
|
760
796
|
processRequest(request) {
|
|
761
797
|
return this.serviceProxy.invokeStream("processRequest", [request]);
|
|
762
798
|
}
|
|
763
799
|
}
|
|
764
800
|
// packages/os-api/src/api/services/IVmNodeService.ts
|
|
765
|
-
var
|
|
801
|
+
var import_core7 = require("@kinotic-ai/core");
|
|
766
802
|
|
|
767
|
-
class VmNodeServiceProxy extends
|
|
803
|
+
class VmNodeServiceProxy extends import_core7.CrudServiceProxy {
|
|
768
804
|
constructor(kinotic) {
|
|
769
|
-
super(kinotic.serviceProxy(
|
|
805
|
+
super(kinotic.serviceProxy(`${OS_API_ZONE}.org.kinotic.os.api.services.VmNodeService`));
|
|
770
806
|
}
|
|
771
807
|
findAvailableNode(requiredCpus, requiredMemoryMb, requiredDiskMb) {
|
|
772
808
|
return this.serviceProxy.invoke("findAvailableNode", [requiredCpus, requiredMemoryMb, requiredDiskMb]);
|
|
@@ -776,15 +812,15 @@ class VmNodeServiceProxy extends import_core6.CrudServiceProxy {
|
|
|
776
812
|
}
|
|
777
813
|
}
|
|
778
814
|
// packages/os-api/src/api/services/IWorkloadService.ts
|
|
779
|
-
var
|
|
815
|
+
var import_core8 = require("@kinotic-ai/core");
|
|
780
816
|
|
|
781
|
-
class WorkloadServiceProxy extends
|
|
817
|
+
class WorkloadServiceProxy extends import_core8.CrudServiceProxy {
|
|
782
818
|
constructor(kinotic) {
|
|
783
|
-
super(kinotic.serviceProxy(
|
|
819
|
+
super(kinotic.serviceProxy(`${OS_API_ZONE}.org.kinotic.os.api.services.WorkloadService`));
|
|
784
820
|
}
|
|
785
821
|
async findAllForNode(nodeId, pageable) {
|
|
786
822
|
const page = await this.findAllForNodeSinglePage(nodeId, pageable);
|
|
787
|
-
return new
|
|
823
|
+
return new import_core8.FunctionalIterablePage(pageable, page, (pageable2) => this.findAllForNodeSinglePage(nodeId, pageable2));
|
|
788
824
|
}
|
|
789
825
|
findAllForNodeSinglePage(nodeId, pageable) {
|
|
790
826
|
return this.serviceProxy.invoke("findAllForNode", [nodeId, pageable]);
|
|
@@ -797,20 +833,20 @@ class WorkloadServiceProxy extends import_core7.CrudServiceProxy {
|
|
|
797
833
|
}
|
|
798
834
|
}
|
|
799
835
|
// packages/os-api/src/api/services/IMemberService.ts
|
|
800
|
-
var
|
|
836
|
+
var import_core9 = require("@kinotic-ai/core");
|
|
801
837
|
|
|
802
838
|
class MemberService {
|
|
803
839
|
serviceProxy;
|
|
804
840
|
constructor(kinotic) {
|
|
805
|
-
this.serviceProxy = kinotic.serviceProxy(
|
|
841
|
+
this.serviceProxy = kinotic.serviceProxy(`${OS_API_ZONE}.org.kinotic.os.api.services.iam.MemberService`);
|
|
806
842
|
}
|
|
807
843
|
async findMembers(applicationId, pageable) {
|
|
808
844
|
const page = await this.serviceProxy.invoke("findMembers", [applicationId, pageable]);
|
|
809
|
-
return new
|
|
845
|
+
return new import_core9.FunctionalIterablePage(pageable, page, (next) => this.serviceProxy.invoke("findMembers", [applicationId, next]));
|
|
810
846
|
}
|
|
811
847
|
async searchMembers(searchText, applicationId, pageable) {
|
|
812
848
|
const page = await this.serviceProxy.invoke("searchMembers", [searchText, applicationId, pageable]);
|
|
813
|
-
return new
|
|
849
|
+
return new import_core9.FunctionalIterablePage(pageable, page, (next) => this.serviceProxy.invoke("searchMembers", [searchText, applicationId, next]));
|
|
814
850
|
}
|
|
815
851
|
inviteMember(email, displayName, applicationId) {
|
|
816
852
|
return this.serviceProxy.invoke("inviteMember", [email, displayName, applicationId]);
|
|
@@ -823,7 +859,7 @@ class MemberService {
|
|
|
823
859
|
}
|
|
824
860
|
async findPendingInvites(applicationId, pageable) {
|
|
825
861
|
const page = await this.serviceProxy.invoke("findPendingInvites", [applicationId, pageable]);
|
|
826
|
-
return new
|
|
862
|
+
return new import_core9.FunctionalIterablePage(pageable, page, (next) => this.serviceProxy.invoke("findPendingInvites", [applicationId, next]));
|
|
827
863
|
}
|
|
828
864
|
cancelInvite(inviteId) {
|
|
829
865
|
return this.serviceProxy.invoke("cancelInvite", [inviteId]);
|
|
@@ -836,11 +872,11 @@ class MemberService {
|
|
|
836
872
|
}
|
|
837
873
|
}
|
|
838
874
|
// packages/os-api/src/api/services/IInviteEmailTemplateService.ts
|
|
839
|
-
var
|
|
875
|
+
var import_core10 = require("@kinotic-ai/core");
|
|
840
876
|
|
|
841
|
-
class InviteEmailTemplateService extends
|
|
877
|
+
class InviteEmailTemplateService extends import_core10.CrudServiceProxy {
|
|
842
878
|
constructor(kinotic) {
|
|
843
|
-
super(kinotic.serviceProxy(
|
|
879
|
+
super(kinotic.serviceProxy(`${OS_API_ZONE}.org.kinotic.os.api.services.InviteEmailTemplateService`));
|
|
844
880
|
}
|
|
845
881
|
findByApplication(applicationId) {
|
|
846
882
|
return this.serviceProxy.invoke("findByApplication", [applicationId]);
|
|
@@ -850,18 +886,18 @@ class InviteEmailTemplateService extends import_core9.CrudServiceProxy {
|
|
|
850
886
|
class DeviceApprovalService {
|
|
851
887
|
serviceProxy;
|
|
852
888
|
constructor(kinotic) {
|
|
853
|
-
this.serviceProxy = kinotic.serviceProxy(
|
|
889
|
+
this.serviceProxy = kinotic.serviceProxy(`${OS_API_ZONE}.org.kinotic.os.api.services.iam.DeviceApprovalService`);
|
|
854
890
|
}
|
|
855
891
|
approve(userCode) {
|
|
856
892
|
return this.serviceProxy.invoke("approve", [userCode]);
|
|
857
893
|
}
|
|
858
894
|
}
|
|
859
895
|
// packages/os-api/src/api/services/IGitHubAppInstallationService.ts
|
|
860
|
-
var
|
|
896
|
+
var import_core11 = require("@kinotic-ai/core");
|
|
861
897
|
|
|
862
|
-
class GitHubAppInstallationService extends
|
|
898
|
+
class GitHubAppInstallationService extends import_core11.CrudServiceProxy {
|
|
863
899
|
constructor(kinotic) {
|
|
864
|
-
super(kinotic.serviceProxy(
|
|
900
|
+
super(kinotic.serviceProxy(`${OS_API_ZONE}.org.kinotic.github.api.services.GitHubAppInstallationService`));
|
|
865
901
|
}
|
|
866
902
|
startInstall(returnTo) {
|
|
867
903
|
return this.serviceProxy.invoke("startInstall", [returnTo]);
|
package/dist/index.d.cts
CHANGED
|
@@ -137,6 +137,9 @@ declare class TenantSelectionC3Type extends ArrayC3Type {
|
|
|
137
137
|
}
|
|
138
138
|
import { Identifiable } from "@kinotic-ai/core";
|
|
139
139
|
declare class Application implements Identifiable<string> {
|
|
140
|
+
/**
|
|
141
|
+
* The slugified {@link name}, minted by the server at creation
|
|
142
|
+
*/
|
|
140
143
|
id: string;
|
|
141
144
|
/**
|
|
142
145
|
* The id of the organization that owns this application.
|
|
@@ -144,6 +147,7 @@ declare class Application implements Identifiable<string> {
|
|
|
144
147
|
* with a missing or mismatched organizationId.
|
|
145
148
|
*/
|
|
146
149
|
organizationId: string;
|
|
150
|
+
name: string;
|
|
147
151
|
description: string;
|
|
148
152
|
/**
|
|
149
153
|
* When true, every APPLICATION-scope user created for this application receives an
|
|
@@ -152,7 +156,7 @@ declare class Application implements Identifiable<string> {
|
|
|
152
156
|
*/
|
|
153
157
|
tenantPerUser: boolean;
|
|
154
158
|
updated: number | null;
|
|
155
|
-
constructor(
|
|
159
|
+
constructor(name: string, description: string);
|
|
156
160
|
}
|
|
157
161
|
import { Identifiable as Identifiable2 } from "@kinotic-ai/core";
|
|
158
162
|
/**
|
|
@@ -485,6 +489,16 @@ declare class Workload implements Identifiable6<string> {
|
|
|
485
489
|
*/
|
|
486
490
|
description?: string;
|
|
487
491
|
/**
|
|
492
|
+
* The Organization this workload runs on behalf of, and which may view its logs.
|
|
493
|
+
* Null for platform workloads (SYSTEM scope).
|
|
494
|
+
*/
|
|
495
|
+
organizationId: string | null;
|
|
496
|
+
/**
|
|
497
|
+
* The Application this workload runs on behalf of, or null if none.
|
|
498
|
+
* When set, organizationId must also be set.
|
|
499
|
+
*/
|
|
500
|
+
applicationId: string | null;
|
|
501
|
+
/**
|
|
488
502
|
* The VM provider to use for this workload.
|
|
489
503
|
*/
|
|
490
504
|
providerType: VmProviderType;
|
|
@@ -505,6 +519,17 @@ declare class Workload implements Identifiable6<string> {
|
|
|
505
519
|
*/
|
|
506
520
|
diskSizeMb: number;
|
|
507
521
|
/**
|
|
522
|
+
* When true the VM runs detached from the vm-manager process and survives its
|
|
523
|
+
* restarts. Non-detached workloads end when the vm-manager exits.
|
|
524
|
+
*/
|
|
525
|
+
detached: boolean;
|
|
526
|
+
/**
|
|
527
|
+
* When true the VM and its disk are discarded when the workload stops, so a
|
|
528
|
+
* stopped workload cannot be restarted. When false the disk is kept and the
|
|
529
|
+
* workload may be restarted in place.
|
|
530
|
+
*/
|
|
531
|
+
autoRemove: boolean;
|
|
532
|
+
/**
|
|
508
533
|
* Current status of the workload.
|
|
509
534
|
*/
|
|
510
535
|
status: WorkloadStatus;
|
|
@@ -525,7 +550,9 @@ declare class Workload implements Identifiable6<string> {
|
|
|
525
550
|
*/
|
|
526
551
|
entrypoint: string[];
|
|
527
552
|
/**
|
|
528
|
-
* Overrides the image command (CMD). Empty keeps the image default
|
|
553
|
+
* Overrides the image command (CMD). Empty keeps the image default, unless
|
|
554
|
+
* entrypoint is declared — then the image CMD is dropped so the entrypoint
|
|
555
|
+
* runs exactly as given.
|
|
529
556
|
*/
|
|
530
557
|
cmd: string[];
|
|
531
558
|
/**
|
|
@@ -596,6 +623,19 @@ declare class VmNode implements Identifiable7<string> {
|
|
|
596
623
|
constructor(id: string, name: string, hostname: string);
|
|
597
624
|
}
|
|
598
625
|
/**
|
|
626
|
+
* Parameters for a historical log query: one workload's logs over a time range.
|
|
627
|
+
*/
|
|
628
|
+
interface LogQuery {
|
|
629
|
+
/** Id of the workload whose logs to return. */
|
|
630
|
+
workloadId: string;
|
|
631
|
+
/** Start of the time range, epoch milliseconds (inclusive). */
|
|
632
|
+
start: number;
|
|
633
|
+
/** End of the time range, epoch milliseconds (inclusive). */
|
|
634
|
+
end: number;
|
|
635
|
+
/** Maximum number of log entries to return. */
|
|
636
|
+
limit: number;
|
|
637
|
+
}
|
|
638
|
+
/**
|
|
599
639
|
* Authentication method for an {@link IamUser}.
|
|
600
640
|
*/
|
|
601
641
|
declare enum AuthType {
|
|
@@ -898,13 +938,15 @@ import { IKinotic } from "@kinotic-ai/core";
|
|
|
898
938
|
import { CrudServiceProxy, ICrudServiceProxy } from "@kinotic-ai/core";
|
|
899
939
|
interface IApplicationService extends ICrudServiceProxy<Application> {
|
|
900
940
|
/**
|
|
901
|
-
* Creates a new application if it does not already exist
|
|
902
|
-
* from the authenticated participant on
|
|
903
|
-
*
|
|
941
|
+
* Creates a new application if it does not already exist, deriving its id from the
|
|
942
|
+
* slugified name. The organization id is derived from the authenticated participant on
|
|
943
|
+
* the server.
|
|
944
|
+
* @param name the name of the application to create
|
|
904
945
|
* @param description the description of the application to create
|
|
905
|
-
* @return {@link Promise} emitting the created application
|
|
946
|
+
* @return {@link Promise} emitting the created application, or the existing application
|
|
947
|
+
* whose id matches the slugified name
|
|
906
948
|
*/
|
|
907
|
-
createApplicationIfNotExist(
|
|
949
|
+
createApplicationIfNotExist(name: string, description: string): Promise<Application>;
|
|
908
950
|
/**
|
|
909
951
|
* This operation makes all the recent writes immediately available for search.
|
|
910
952
|
* @return a Promise that resolves when the operation is complete
|
|
@@ -1032,7 +1074,33 @@ declare class LogManager implements ILogManager {
|
|
|
1032
1074
|
loggerLevels(nodeId: string, name: string): Promise<LoggerLevelsDescriptor>;
|
|
1033
1075
|
configureLogLevel(nodeId: string, name: string, level: LogLevel): Promise<void>;
|
|
1034
1076
|
}
|
|
1035
|
-
import {
|
|
1077
|
+
import { IKinotic as IKinotic5 } from "@kinotic-ai/core";
|
|
1078
|
+
import { Observable } from "rxjs";
|
|
1079
|
+
/**
|
|
1080
|
+
* Streams and queries the logs of workloads the authenticated participant may view: an
|
|
1081
|
+
* organization participant sees its own organization's workloads, a system participant sees any.
|
|
1082
|
+
* Both methods yield the raw Loki response bytes; the caller parses Loki's wire format.
|
|
1083
|
+
*/
|
|
1084
|
+
interface ILogService {
|
|
1085
|
+
/**
|
|
1086
|
+
* Opens a live tail of the given workload's logs. Each emission is a raw Loki tail frame,
|
|
1087
|
+
* and the stream stays open until unsubscribed.
|
|
1088
|
+
* @param workloadId the id of the workload to follow
|
|
1089
|
+
*/
|
|
1090
|
+
tail(workloadId: string): Observable<Uint8Array>;
|
|
1091
|
+
/**
|
|
1092
|
+
* Returns a workload's historical logs as the raw Loki query_range response.
|
|
1093
|
+
* @param query the workload, time range, and limit
|
|
1094
|
+
*/
|
|
1095
|
+
history(query: LogQuery): Promise<Uint8Array>;
|
|
1096
|
+
}
|
|
1097
|
+
declare class LogService implements ILogService {
|
|
1098
|
+
private readonly serviceProxy;
|
|
1099
|
+
constructor(kinotic: IKinotic5);
|
|
1100
|
+
tail(workloadId: string): Observable<Uint8Array>;
|
|
1101
|
+
history(query: LogQuery): Promise<Uint8Array>;
|
|
1102
|
+
}
|
|
1103
|
+
import { CrudServiceProxy as CrudServiceProxy4, IKinotic as IKinotic6, ICrudServiceProxy as ICrudServiceProxy4, IterablePage as IterablePage2, Page, Pageable as Pageable2 } from "@kinotic-ai/core";
|
|
1036
1104
|
interface IEntityDefinitionService extends ICrudServiceProxy4<EntityDefinition> {
|
|
1037
1105
|
/**
|
|
1038
1106
|
* Counts all entity definitions for the given application.
|
|
@@ -1087,7 +1155,7 @@ interface IEntityDefinitionService extends ICrudServiceProxy4<EntityDefinition>
|
|
|
1087
1155
|
unPublish(entityDefinitionId: string): Promise<void>;
|
|
1088
1156
|
}
|
|
1089
1157
|
declare class EntityDefinitionService extends CrudServiceProxy4<EntityDefinition> implements IEntityDefinitionService {
|
|
1090
|
-
constructor(kinotic:
|
|
1158
|
+
constructor(kinotic: IKinotic6);
|
|
1091
1159
|
countForApplication(applicationId: string): Promise<number>;
|
|
1092
1160
|
countForProject(projectId: string): Promise<number>;
|
|
1093
1161
|
findAllForApplicationSinglePage(applicationId: string, pageable: Pageable2): Promise<Page<EntityDefinition>>;
|
|
@@ -1099,7 +1167,7 @@ declare class EntityDefinitionService extends CrudServiceProxy4<EntityDefinition
|
|
|
1099
1167
|
unPublish(entityDefinitionId: string): Promise<void>;
|
|
1100
1168
|
syncIndex(): Promise<void>;
|
|
1101
1169
|
}
|
|
1102
|
-
import { IKinotic as
|
|
1170
|
+
import { IKinotic as IKinotic7 } from "@kinotic-ai/core";
|
|
1103
1171
|
import { CrudServiceProxy as CrudServiceProxy5, ICrudServiceProxy as ICrudServiceProxy5 } from "@kinotic-ai/core";
|
|
1104
1172
|
interface INamedQueriesDefinitionService extends ICrudServiceProxy5<NamedQueriesDefinition> {
|
|
1105
1173
|
/**
|
|
@@ -1109,10 +1177,10 @@ interface INamedQueriesDefinitionService extends ICrudServiceProxy5<NamedQueries
|
|
|
1109
1177
|
syncIndex(): Promise<void>;
|
|
1110
1178
|
}
|
|
1111
1179
|
declare class NamedQueriesDefinitionService extends CrudServiceProxy5<NamedQueriesDefinition> implements INamedQueriesDefinitionService {
|
|
1112
|
-
constructor(kinotic:
|
|
1180
|
+
constructor(kinotic: IKinotic7);
|
|
1113
1181
|
syncIndex(): Promise<void>;
|
|
1114
1182
|
}
|
|
1115
|
-
import { IKinotic as
|
|
1183
|
+
import { IKinotic as IKinotic8 } from "@kinotic-ai/core";
|
|
1116
1184
|
/**
|
|
1117
1185
|
* Service for executing project-specific migrations through the Persistence API.
|
|
1118
1186
|
* This service allows external clients to apply their own migrations to projects.
|
|
@@ -1144,13 +1212,13 @@ interface IMigrationService {
|
|
|
1144
1212
|
}
|
|
1145
1213
|
declare class MigrationService implements IMigrationService {
|
|
1146
1214
|
private readonly serviceProxy;
|
|
1147
|
-
constructor(kinotic:
|
|
1215
|
+
constructor(kinotic: IKinotic8);
|
|
1148
1216
|
executeMigrations(migrationRequest: MigrationRequest): Promise<MigrationResult>;
|
|
1149
1217
|
getLastAppliedMigrationVersion(projectId: string): Promise<number | null>;
|
|
1150
1218
|
isMigrationApplied(projectId: string, version: string): Promise<boolean>;
|
|
1151
1219
|
}
|
|
1152
|
-
import { IKinotic as
|
|
1153
|
-
import { Observable } from "rxjs";
|
|
1220
|
+
import { IKinotic as IKinotic9 } from "@kinotic-ai/core";
|
|
1221
|
+
import { Observable as Observable2 } from "rxjs";
|
|
1154
1222
|
/**
|
|
1155
1223
|
* Provides AI-powered data analysis and visualization code generation capabilities.
|
|
1156
1224
|
* This service analyzes user queries about their structures and generates appropriate
|
|
@@ -1164,14 +1232,14 @@ interface IDataInsightsService {
|
|
|
1164
1232
|
* @param request the analysis request containing query and context
|
|
1165
1233
|
* @return Observable that emits progress updates and completes with the final response
|
|
1166
1234
|
*/
|
|
1167
|
-
processRequest(request: InsightRequest):
|
|
1235
|
+
processRequest(request: InsightRequest): Observable2<InsightProgress>;
|
|
1168
1236
|
}
|
|
1169
1237
|
declare class DataInsightsService implements IDataInsightsService {
|
|
1170
1238
|
private readonly serviceProxy;
|
|
1171
|
-
constructor(kinotic:
|
|
1172
|
-
processRequest(request: InsightRequest):
|
|
1239
|
+
constructor(kinotic: IKinotic9);
|
|
1240
|
+
processRequest(request: InsightRequest): Observable2<InsightProgress>;
|
|
1173
1241
|
}
|
|
1174
|
-
import { IKinotic as
|
|
1242
|
+
import { IKinotic as IKinotic10 } from "@kinotic-ai/core";
|
|
1175
1243
|
import { CrudServiceProxy as CrudServiceProxy6, ICrudServiceProxy as ICrudServiceProxy6 } from "@kinotic-ai/core";
|
|
1176
1244
|
interface IVmNodeService extends ICrudServiceProxy6<VmNode> {
|
|
1177
1245
|
/**
|
|
@@ -1189,11 +1257,11 @@ interface IVmNodeService extends ICrudServiceProxy6<VmNode> {
|
|
|
1189
1257
|
syncIndex(): Promise<void>;
|
|
1190
1258
|
}
|
|
1191
1259
|
declare class VmNodeServiceProxy extends CrudServiceProxy6<VmNode> implements IVmNodeService {
|
|
1192
|
-
constructor(kinotic:
|
|
1260
|
+
constructor(kinotic: IKinotic10);
|
|
1193
1261
|
findAvailableNode(requiredCpus: number, requiredMemoryMb: number, requiredDiskMb: number): Promise<VmNode | null>;
|
|
1194
1262
|
syncIndex(): Promise<void>;
|
|
1195
1263
|
}
|
|
1196
|
-
import { CrudServiceProxy as CrudServiceProxy7, IKinotic as
|
|
1264
|
+
import { CrudServiceProxy as CrudServiceProxy7, IKinotic as IKinotic11, ICrudServiceProxy as ICrudServiceProxy7, IterablePage as IterablePage3, Page as Page2, Pageable as Pageable3 } from "@kinotic-ai/core";
|
|
1197
1265
|
interface IWorkloadService extends ICrudServiceProxy7<Workload> {
|
|
1198
1266
|
/**
|
|
1199
1267
|
* Finds all workloads deployed on the given node.
|
|
@@ -1215,13 +1283,13 @@ interface IWorkloadService extends ICrudServiceProxy7<Workload> {
|
|
|
1215
1283
|
syncIndex(): Promise<void>;
|
|
1216
1284
|
}
|
|
1217
1285
|
declare class WorkloadServiceProxy extends CrudServiceProxy7<Workload> implements IWorkloadService {
|
|
1218
|
-
constructor(kinotic:
|
|
1286
|
+
constructor(kinotic: IKinotic11);
|
|
1219
1287
|
findAllForNode(nodeId: string, pageable: Pageable3): Promise<IterablePage3<Workload>>;
|
|
1220
1288
|
findAllForNodeSinglePage(nodeId: string, pageable: Pageable3): Promise<Page2<Workload>>;
|
|
1221
1289
|
countForNode(nodeId: string): Promise<number>;
|
|
1222
1290
|
syncIndex(): Promise<void>;
|
|
1223
1291
|
}
|
|
1224
|
-
import { IDataSource, IKinotic as
|
|
1292
|
+
import { IDataSource, IKinotic as IKinotic12, IterablePage as IterablePage4, Pageable as Pageable4 } from "@kinotic-ai/core";
|
|
1225
1293
|
/**
|
|
1226
1294
|
* Member management for the caller's organization and its applications. Scope is selected
|
|
1227
1295
|
* with applicationId — null addresses org members, set addresses that application's
|
|
@@ -1261,7 +1329,7 @@ interface IMemberService {
|
|
|
1261
1329
|
}
|
|
1262
1330
|
declare class MemberService implements IMemberService {
|
|
1263
1331
|
private readonly serviceProxy;
|
|
1264
|
-
constructor(kinotic:
|
|
1332
|
+
constructor(kinotic: IKinotic12);
|
|
1265
1333
|
findMembers(applicationId: string | null, pageable: Pageable4): Promise<IterablePage4<IamUser>>;
|
|
1266
1334
|
searchMembers(searchText: string, applicationId: string | null, pageable: Pageable4): Promise<IterablePage4<IamUser>>;
|
|
1267
1335
|
inviteMember(email: string, displayName: string | null, applicationId: string | null): Promise<PendingInviteSummary>;
|
|
@@ -1271,7 +1339,7 @@ declare class MemberService implements IMemberService {
|
|
|
1271
1339
|
cancelInvite(inviteId: string): Promise<void>;
|
|
1272
1340
|
memberDataSource(applicationId: string | null): IDataSource<IamUser>;
|
|
1273
1341
|
}
|
|
1274
|
-
import { IKinotic as
|
|
1342
|
+
import { IKinotic as IKinotic13 } from "@kinotic-ai/core";
|
|
1275
1343
|
import { CrudServiceProxy as CrudServiceProxy8, ICrudServiceProxy as ICrudServiceProxy8 } from "@kinotic-ai/core";
|
|
1276
1344
|
/**
|
|
1277
1345
|
* CRUD service for an application's customized invitation email — at most one
|
|
@@ -1287,10 +1355,10 @@ interface IInviteEmailTemplateService extends ICrudServiceProxy8<InviteEmailTemp
|
|
|
1287
1355
|
findByApplication(applicationId: string): Promise<InviteEmailTemplate | null>;
|
|
1288
1356
|
}
|
|
1289
1357
|
declare class InviteEmailTemplateService extends CrudServiceProxy8<InviteEmailTemplate> implements IInviteEmailTemplateService {
|
|
1290
|
-
constructor(kinotic:
|
|
1358
|
+
constructor(kinotic: IKinotic13);
|
|
1291
1359
|
findByApplication(applicationId: string): Promise<InviteEmailTemplate | null>;
|
|
1292
1360
|
}
|
|
1293
|
-
import { IKinotic as
|
|
1361
|
+
import { IKinotic as IKinotic14 } from "@kinotic-ai/core";
|
|
1294
1362
|
/**
|
|
1295
1363
|
* Browser-invoked service for the RFC 8628 device-authorization approve step. The signed-in
|
|
1296
1364
|
* browser user calls {@link approve} with the user_code shown in their CLI; the gateway
|
|
@@ -1305,10 +1373,10 @@ interface IDeviceApprovalService {
|
|
|
1305
1373
|
}
|
|
1306
1374
|
declare class DeviceApprovalService implements IDeviceApprovalService {
|
|
1307
1375
|
private readonly serviceProxy;
|
|
1308
|
-
constructor(kinotic:
|
|
1376
|
+
constructor(kinotic: IKinotic14);
|
|
1309
1377
|
approve(userCode: string): Promise<void>;
|
|
1310
1378
|
}
|
|
1311
|
-
import { CrudServiceProxy as CrudServiceProxy9, IKinotic as
|
|
1379
|
+
import { CrudServiceProxy as CrudServiceProxy9, IKinotic as IKinotic15, ICrudServiceProxy as ICrudServiceProxy9 } from "@kinotic-ai/core";
|
|
1312
1380
|
interface IGitHubAppInstallationService extends ICrudServiceProxy9<GitHubAppInstallation> {
|
|
1313
1381
|
/**
|
|
1314
1382
|
* Stages a single-use state token bound to the caller's organization plus the
|
|
@@ -1335,7 +1403,7 @@ interface IGitHubAppInstallationService extends ICrudServiceProxy9<GitHubAppInst
|
|
|
1335
1403
|
findForCurrentOrg(): Promise<GitHubAppInstallation | null>;
|
|
1336
1404
|
}
|
|
1337
1405
|
declare class GitHubAppInstallationService extends CrudServiceProxy9<GitHubAppInstallation> implements IGitHubAppInstallationService {
|
|
1338
|
-
constructor(kinotic:
|
|
1406
|
+
constructor(kinotic: IKinotic15);
|
|
1339
1407
|
startInstall(returnTo: string | null): Promise<string>;
|
|
1340
1408
|
completeInstall(installationId: number, state: string): Promise<GitHubInstallCompletion>;
|
|
1341
1409
|
findForCurrentOrg(): Promise<GitHubAppInstallation | null>;
|
|
@@ -1358,7 +1426,28 @@ interface IOsApiExtension {
|
|
|
1358
1426
|
githubAppInstallations: IGitHubAppInstallationService;
|
|
1359
1427
|
}
|
|
1360
1428
|
declare const OsApiPlugin: KinoticPlugin<IOsApiExtension>;
|
|
1429
|
+
import { APP_API_ZONE } from "@kinotic-ai/persistence";
|
|
1430
|
+
/**
|
|
1431
|
+
* The zone for platform services organizations use to manage the system, such as member,
|
|
1432
|
+
* application, and entity definition management
|
|
1433
|
+
*/
|
|
1434
|
+
declare const OS_API_ZONE = "os_api";
|
|
1435
|
+
/**
|
|
1436
|
+
* The zone for services internal to the platform, only reachable by system participants
|
|
1437
|
+
*/
|
|
1438
|
+
declare const SYSTEM_ZONE = "system";
|
|
1439
|
+
/**
|
|
1440
|
+
* The leading label of application zones, which follow the form app.<organizationId>.<applicationId>
|
|
1441
|
+
*/
|
|
1442
|
+
declare const APP_ZONE_PREFIX = "app";
|
|
1443
|
+
/**
|
|
1444
|
+
* Builds the zone that all of an application's services live in
|
|
1445
|
+
* @param organizationId the id of the organization that owns the application
|
|
1446
|
+
* @param applicationId the id of the application
|
|
1447
|
+
* @return the application zone, app.<organizationId>.<applicationId>
|
|
1448
|
+
*/
|
|
1449
|
+
declare function appZone(organizationId: string, applicationId: string): string;
|
|
1361
1450
|
declare module "@kinotic-ai/core" {
|
|
1362
1451
|
interface KinoticSingleton extends IOsApiExtension {}
|
|
1363
1452
|
}
|
|
1364
|
-
export { isSystemParticipant, isOrganizationParticipant, isApplicationParticipant, WorkloadStatus, WorkloadServiceProxy, Workload, VolumeMount, VmProviderType, VmNodeStatus, VmNodeServiceProxy, VmNode, VersionDecorator, TimeReferenceDecorator, TextDecorator, TenantSelectionC3Type, TenantIdDecorator, SingleLoggerLevelsDescriptor, SignUpRequest, SignUpCompleteRequest, RepositoryConnectionStatus, QueryOptionsC3Type, QueryDecorator, ProjectType, ProjectService, Project, ProgressType, PortProtocol, PortMapping, PendingInviteSummary, ParticipantType, PageableC3Type, PageC3Type, OsApiPlugin, OrganizationService, Organization, NotIndexedDecorator, NestedDecorator, NamedQueriesDefinitionService, NamedQueriesDefinition, MigrationService, MigrationResult, MigrationRequest, MigrationDefinition, MemberService, LoggersDescriptor, LoggerLevelsDescriptor, LogManager, LogLevel, KinoticProjectConfig, KinoticOsCredentialsAuthProvider, InviteEmailTemplateService, InviteEmailTemplate, InsightRequest, InsightProgress, IdDecorator, IamUser, IWorkloadService, IVmNodeService, ISystemParticipant, IProjectService, IOsApiExtension, IOrganizationService, IOrganizationParticipant, INamedQueriesDefinitionService, IMigrationService, IMemberService, ILogManager, IInviteEmailTemplateService, IGitHubAppInstallationService, IEntityDefinitionService, IDeviceApprovalService, IDataInsightsService, IApplicationService, IApplicationParticipant, GroupLoggerLevelsDescriptor, GitHubToken, GitHubRepoToken, GitHubInstallCompletion, GitHubAppInstallationService, GitHubAppInstallation, FlattenedDecorator, EsIndexConfigurationDecorator, EntityDefinitionService, EntityDefinition, EntityDecorator, EntitiesPathConfig, DiscriminatorDecorator, DeviceApprovalService, DataInsightsService, DataInsightsComponent, CompleteOrgRequest, AutoGeneratedIdDecorator, AuthType, ApplicationService, Application };
|
|
1453
|
+
export { isSystemParticipant, isOrganizationParticipant, isApplicationParticipant, appZone, WorkloadStatus, WorkloadServiceProxy, Workload, VolumeMount, VmProviderType, VmNodeStatus, VmNodeServiceProxy, VmNode, VersionDecorator, TimeReferenceDecorator, TextDecorator, TenantSelectionC3Type, TenantIdDecorator, SingleLoggerLevelsDescriptor, SignUpRequest, SignUpCompleteRequest, SYSTEM_ZONE, RepositoryConnectionStatus, QueryOptionsC3Type, QueryDecorator, ProjectType, ProjectService, Project, ProgressType, PortProtocol, PortMapping, PendingInviteSummary, ParticipantType, PageableC3Type, PageC3Type, OsApiPlugin, OrganizationService, Organization, OS_API_ZONE, NotIndexedDecorator, NestedDecorator, NamedQueriesDefinitionService, NamedQueriesDefinition, MigrationService, MigrationResult, MigrationRequest, MigrationDefinition, MemberService, LoggersDescriptor, LoggerLevelsDescriptor, LogService, LogQuery, LogManager, LogLevel, KinoticProjectConfig, KinoticOsCredentialsAuthProvider, InviteEmailTemplateService, InviteEmailTemplate, InsightRequest, InsightProgress, IdDecorator, IamUser, IWorkloadService, IVmNodeService, ISystemParticipant, IProjectService, IOsApiExtension, IOrganizationService, IOrganizationParticipant, INamedQueriesDefinitionService, IMigrationService, IMemberService, ILogService, ILogManager, IInviteEmailTemplateService, IGitHubAppInstallationService, IEntityDefinitionService, IDeviceApprovalService, IDataInsightsService, IApplicationService, IApplicationParticipant, GroupLoggerLevelsDescriptor, GitHubToken, GitHubRepoToken, GitHubInstallCompletion, GitHubAppInstallationService, GitHubAppInstallation, FlattenedDecorator, EsIndexConfigurationDecorator, EntityDefinitionService, EntityDefinition, EntityDecorator, EntitiesPathConfig, DiscriminatorDecorator, DeviceApprovalService, DataInsightsService, DataInsightsComponent, CompleteOrgRequest, AutoGeneratedIdDecorator, AuthType, ApplicationService, Application, APP_ZONE_PREFIX, APP_API_ZONE };
|
package/dist/index.d.ts
CHANGED
|
@@ -137,6 +137,9 @@ declare class TenantSelectionC3Type extends ArrayC3Type {
|
|
|
137
137
|
}
|
|
138
138
|
import { Identifiable } from "@kinotic-ai/core";
|
|
139
139
|
declare class Application implements Identifiable<string> {
|
|
140
|
+
/**
|
|
141
|
+
* The slugified {@link name}, minted by the server at creation
|
|
142
|
+
*/
|
|
140
143
|
id: string;
|
|
141
144
|
/**
|
|
142
145
|
* The id of the organization that owns this application.
|
|
@@ -144,6 +147,7 @@ declare class Application implements Identifiable<string> {
|
|
|
144
147
|
* with a missing or mismatched organizationId.
|
|
145
148
|
*/
|
|
146
149
|
organizationId: string;
|
|
150
|
+
name: string;
|
|
147
151
|
description: string;
|
|
148
152
|
/**
|
|
149
153
|
* When true, every APPLICATION-scope user created for this application receives an
|
|
@@ -152,7 +156,7 @@ declare class Application implements Identifiable<string> {
|
|
|
152
156
|
*/
|
|
153
157
|
tenantPerUser: boolean;
|
|
154
158
|
updated: number | null;
|
|
155
|
-
constructor(
|
|
159
|
+
constructor(name: string, description: string);
|
|
156
160
|
}
|
|
157
161
|
import { Identifiable as Identifiable2 } from "@kinotic-ai/core";
|
|
158
162
|
/**
|
|
@@ -485,6 +489,16 @@ declare class Workload implements Identifiable6<string> {
|
|
|
485
489
|
*/
|
|
486
490
|
description?: string;
|
|
487
491
|
/**
|
|
492
|
+
* The Organization this workload runs on behalf of, and which may view its logs.
|
|
493
|
+
* Null for platform workloads (SYSTEM scope).
|
|
494
|
+
*/
|
|
495
|
+
organizationId: string | null;
|
|
496
|
+
/**
|
|
497
|
+
* The Application this workload runs on behalf of, or null if none.
|
|
498
|
+
* When set, organizationId must also be set.
|
|
499
|
+
*/
|
|
500
|
+
applicationId: string | null;
|
|
501
|
+
/**
|
|
488
502
|
* The VM provider to use for this workload.
|
|
489
503
|
*/
|
|
490
504
|
providerType: VmProviderType;
|
|
@@ -505,6 +519,17 @@ declare class Workload implements Identifiable6<string> {
|
|
|
505
519
|
*/
|
|
506
520
|
diskSizeMb: number;
|
|
507
521
|
/**
|
|
522
|
+
* When true the VM runs detached from the vm-manager process and survives its
|
|
523
|
+
* restarts. Non-detached workloads end when the vm-manager exits.
|
|
524
|
+
*/
|
|
525
|
+
detached: boolean;
|
|
526
|
+
/**
|
|
527
|
+
* When true the VM and its disk are discarded when the workload stops, so a
|
|
528
|
+
* stopped workload cannot be restarted. When false the disk is kept and the
|
|
529
|
+
* workload may be restarted in place.
|
|
530
|
+
*/
|
|
531
|
+
autoRemove: boolean;
|
|
532
|
+
/**
|
|
508
533
|
* Current status of the workload.
|
|
509
534
|
*/
|
|
510
535
|
status: WorkloadStatus;
|
|
@@ -525,7 +550,9 @@ declare class Workload implements Identifiable6<string> {
|
|
|
525
550
|
*/
|
|
526
551
|
entrypoint: string[];
|
|
527
552
|
/**
|
|
528
|
-
* Overrides the image command (CMD). Empty keeps the image default
|
|
553
|
+
* Overrides the image command (CMD). Empty keeps the image default, unless
|
|
554
|
+
* entrypoint is declared — then the image CMD is dropped so the entrypoint
|
|
555
|
+
* runs exactly as given.
|
|
529
556
|
*/
|
|
530
557
|
cmd: string[];
|
|
531
558
|
/**
|
|
@@ -596,6 +623,19 @@ declare class VmNode implements Identifiable7<string> {
|
|
|
596
623
|
constructor(id: string, name: string, hostname: string);
|
|
597
624
|
}
|
|
598
625
|
/**
|
|
626
|
+
* Parameters for a historical log query: one workload's logs over a time range.
|
|
627
|
+
*/
|
|
628
|
+
interface LogQuery {
|
|
629
|
+
/** Id of the workload whose logs to return. */
|
|
630
|
+
workloadId: string;
|
|
631
|
+
/** Start of the time range, epoch milliseconds (inclusive). */
|
|
632
|
+
start: number;
|
|
633
|
+
/** End of the time range, epoch milliseconds (inclusive). */
|
|
634
|
+
end: number;
|
|
635
|
+
/** Maximum number of log entries to return. */
|
|
636
|
+
limit: number;
|
|
637
|
+
}
|
|
638
|
+
/**
|
|
599
639
|
* Authentication method for an {@link IamUser}.
|
|
600
640
|
*/
|
|
601
641
|
declare enum AuthType {
|
|
@@ -898,13 +938,15 @@ import { IKinotic } from "@kinotic-ai/core";
|
|
|
898
938
|
import { CrudServiceProxy, ICrudServiceProxy } from "@kinotic-ai/core";
|
|
899
939
|
interface IApplicationService extends ICrudServiceProxy<Application> {
|
|
900
940
|
/**
|
|
901
|
-
* Creates a new application if it does not already exist
|
|
902
|
-
* from the authenticated participant on
|
|
903
|
-
*
|
|
941
|
+
* Creates a new application if it does not already exist, deriving its id from the
|
|
942
|
+
* slugified name. The organization id is derived from the authenticated participant on
|
|
943
|
+
* the server.
|
|
944
|
+
* @param name the name of the application to create
|
|
904
945
|
* @param description the description of the application to create
|
|
905
|
-
* @return {@link Promise} emitting the created application
|
|
946
|
+
* @return {@link Promise} emitting the created application, or the existing application
|
|
947
|
+
* whose id matches the slugified name
|
|
906
948
|
*/
|
|
907
|
-
createApplicationIfNotExist(
|
|
949
|
+
createApplicationIfNotExist(name: string, description: string): Promise<Application>;
|
|
908
950
|
/**
|
|
909
951
|
* This operation makes all the recent writes immediately available for search.
|
|
910
952
|
* @return a Promise that resolves when the operation is complete
|
|
@@ -1032,7 +1074,33 @@ declare class LogManager implements ILogManager {
|
|
|
1032
1074
|
loggerLevels(nodeId: string, name: string): Promise<LoggerLevelsDescriptor>;
|
|
1033
1075
|
configureLogLevel(nodeId: string, name: string, level: LogLevel): Promise<void>;
|
|
1034
1076
|
}
|
|
1035
|
-
import {
|
|
1077
|
+
import { IKinotic as IKinotic5 } from "@kinotic-ai/core";
|
|
1078
|
+
import { Observable } from "rxjs";
|
|
1079
|
+
/**
|
|
1080
|
+
* Streams and queries the logs of workloads the authenticated participant may view: an
|
|
1081
|
+
* organization participant sees its own organization's workloads, a system participant sees any.
|
|
1082
|
+
* Both methods yield the raw Loki response bytes; the caller parses Loki's wire format.
|
|
1083
|
+
*/
|
|
1084
|
+
interface ILogService {
|
|
1085
|
+
/**
|
|
1086
|
+
* Opens a live tail of the given workload's logs. Each emission is a raw Loki tail frame,
|
|
1087
|
+
* and the stream stays open until unsubscribed.
|
|
1088
|
+
* @param workloadId the id of the workload to follow
|
|
1089
|
+
*/
|
|
1090
|
+
tail(workloadId: string): Observable<Uint8Array>;
|
|
1091
|
+
/**
|
|
1092
|
+
* Returns a workload's historical logs as the raw Loki query_range response.
|
|
1093
|
+
* @param query the workload, time range, and limit
|
|
1094
|
+
*/
|
|
1095
|
+
history(query: LogQuery): Promise<Uint8Array>;
|
|
1096
|
+
}
|
|
1097
|
+
declare class LogService implements ILogService {
|
|
1098
|
+
private readonly serviceProxy;
|
|
1099
|
+
constructor(kinotic: IKinotic5);
|
|
1100
|
+
tail(workloadId: string): Observable<Uint8Array>;
|
|
1101
|
+
history(query: LogQuery): Promise<Uint8Array>;
|
|
1102
|
+
}
|
|
1103
|
+
import { CrudServiceProxy as CrudServiceProxy4, IKinotic as IKinotic6, ICrudServiceProxy as ICrudServiceProxy4, IterablePage as IterablePage2, Page, Pageable as Pageable2 } from "@kinotic-ai/core";
|
|
1036
1104
|
interface IEntityDefinitionService extends ICrudServiceProxy4<EntityDefinition> {
|
|
1037
1105
|
/**
|
|
1038
1106
|
* Counts all entity definitions for the given application.
|
|
@@ -1087,7 +1155,7 @@ interface IEntityDefinitionService extends ICrudServiceProxy4<EntityDefinition>
|
|
|
1087
1155
|
unPublish(entityDefinitionId: string): Promise<void>;
|
|
1088
1156
|
}
|
|
1089
1157
|
declare class EntityDefinitionService extends CrudServiceProxy4<EntityDefinition> implements IEntityDefinitionService {
|
|
1090
|
-
constructor(kinotic:
|
|
1158
|
+
constructor(kinotic: IKinotic6);
|
|
1091
1159
|
countForApplication(applicationId: string): Promise<number>;
|
|
1092
1160
|
countForProject(projectId: string): Promise<number>;
|
|
1093
1161
|
findAllForApplicationSinglePage(applicationId: string, pageable: Pageable2): Promise<Page<EntityDefinition>>;
|
|
@@ -1099,7 +1167,7 @@ declare class EntityDefinitionService extends CrudServiceProxy4<EntityDefinition
|
|
|
1099
1167
|
unPublish(entityDefinitionId: string): Promise<void>;
|
|
1100
1168
|
syncIndex(): Promise<void>;
|
|
1101
1169
|
}
|
|
1102
|
-
import { IKinotic as
|
|
1170
|
+
import { IKinotic as IKinotic7 } from "@kinotic-ai/core";
|
|
1103
1171
|
import { CrudServiceProxy as CrudServiceProxy5, ICrudServiceProxy as ICrudServiceProxy5 } from "@kinotic-ai/core";
|
|
1104
1172
|
interface INamedQueriesDefinitionService extends ICrudServiceProxy5<NamedQueriesDefinition> {
|
|
1105
1173
|
/**
|
|
@@ -1109,10 +1177,10 @@ interface INamedQueriesDefinitionService extends ICrudServiceProxy5<NamedQueries
|
|
|
1109
1177
|
syncIndex(): Promise<void>;
|
|
1110
1178
|
}
|
|
1111
1179
|
declare class NamedQueriesDefinitionService extends CrudServiceProxy5<NamedQueriesDefinition> implements INamedQueriesDefinitionService {
|
|
1112
|
-
constructor(kinotic:
|
|
1180
|
+
constructor(kinotic: IKinotic7);
|
|
1113
1181
|
syncIndex(): Promise<void>;
|
|
1114
1182
|
}
|
|
1115
|
-
import { IKinotic as
|
|
1183
|
+
import { IKinotic as IKinotic8 } from "@kinotic-ai/core";
|
|
1116
1184
|
/**
|
|
1117
1185
|
* Service for executing project-specific migrations through the Persistence API.
|
|
1118
1186
|
* This service allows external clients to apply their own migrations to projects.
|
|
@@ -1144,13 +1212,13 @@ interface IMigrationService {
|
|
|
1144
1212
|
}
|
|
1145
1213
|
declare class MigrationService implements IMigrationService {
|
|
1146
1214
|
private readonly serviceProxy;
|
|
1147
|
-
constructor(kinotic:
|
|
1215
|
+
constructor(kinotic: IKinotic8);
|
|
1148
1216
|
executeMigrations(migrationRequest: MigrationRequest): Promise<MigrationResult>;
|
|
1149
1217
|
getLastAppliedMigrationVersion(projectId: string): Promise<number | null>;
|
|
1150
1218
|
isMigrationApplied(projectId: string, version: string): Promise<boolean>;
|
|
1151
1219
|
}
|
|
1152
|
-
import { IKinotic as
|
|
1153
|
-
import { Observable } from "rxjs";
|
|
1220
|
+
import { IKinotic as IKinotic9 } from "@kinotic-ai/core";
|
|
1221
|
+
import { Observable as Observable2 } from "rxjs";
|
|
1154
1222
|
/**
|
|
1155
1223
|
* Provides AI-powered data analysis and visualization code generation capabilities.
|
|
1156
1224
|
* This service analyzes user queries about their structures and generates appropriate
|
|
@@ -1164,14 +1232,14 @@ interface IDataInsightsService {
|
|
|
1164
1232
|
* @param request the analysis request containing query and context
|
|
1165
1233
|
* @return Observable that emits progress updates and completes with the final response
|
|
1166
1234
|
*/
|
|
1167
|
-
processRequest(request: InsightRequest):
|
|
1235
|
+
processRequest(request: InsightRequest): Observable2<InsightProgress>;
|
|
1168
1236
|
}
|
|
1169
1237
|
declare class DataInsightsService implements IDataInsightsService {
|
|
1170
1238
|
private readonly serviceProxy;
|
|
1171
|
-
constructor(kinotic:
|
|
1172
|
-
processRequest(request: InsightRequest):
|
|
1239
|
+
constructor(kinotic: IKinotic9);
|
|
1240
|
+
processRequest(request: InsightRequest): Observable2<InsightProgress>;
|
|
1173
1241
|
}
|
|
1174
|
-
import { IKinotic as
|
|
1242
|
+
import { IKinotic as IKinotic10 } from "@kinotic-ai/core";
|
|
1175
1243
|
import { CrudServiceProxy as CrudServiceProxy6, ICrudServiceProxy as ICrudServiceProxy6 } from "@kinotic-ai/core";
|
|
1176
1244
|
interface IVmNodeService extends ICrudServiceProxy6<VmNode> {
|
|
1177
1245
|
/**
|
|
@@ -1189,11 +1257,11 @@ interface IVmNodeService extends ICrudServiceProxy6<VmNode> {
|
|
|
1189
1257
|
syncIndex(): Promise<void>;
|
|
1190
1258
|
}
|
|
1191
1259
|
declare class VmNodeServiceProxy extends CrudServiceProxy6<VmNode> implements IVmNodeService {
|
|
1192
|
-
constructor(kinotic:
|
|
1260
|
+
constructor(kinotic: IKinotic10);
|
|
1193
1261
|
findAvailableNode(requiredCpus: number, requiredMemoryMb: number, requiredDiskMb: number): Promise<VmNode | null>;
|
|
1194
1262
|
syncIndex(): Promise<void>;
|
|
1195
1263
|
}
|
|
1196
|
-
import { CrudServiceProxy as CrudServiceProxy7, IKinotic as
|
|
1264
|
+
import { CrudServiceProxy as CrudServiceProxy7, IKinotic as IKinotic11, ICrudServiceProxy as ICrudServiceProxy7, IterablePage as IterablePage3, Page as Page2, Pageable as Pageable3 } from "@kinotic-ai/core";
|
|
1197
1265
|
interface IWorkloadService extends ICrudServiceProxy7<Workload> {
|
|
1198
1266
|
/**
|
|
1199
1267
|
* Finds all workloads deployed on the given node.
|
|
@@ -1215,13 +1283,13 @@ interface IWorkloadService extends ICrudServiceProxy7<Workload> {
|
|
|
1215
1283
|
syncIndex(): Promise<void>;
|
|
1216
1284
|
}
|
|
1217
1285
|
declare class WorkloadServiceProxy extends CrudServiceProxy7<Workload> implements IWorkloadService {
|
|
1218
|
-
constructor(kinotic:
|
|
1286
|
+
constructor(kinotic: IKinotic11);
|
|
1219
1287
|
findAllForNode(nodeId: string, pageable: Pageable3): Promise<IterablePage3<Workload>>;
|
|
1220
1288
|
findAllForNodeSinglePage(nodeId: string, pageable: Pageable3): Promise<Page2<Workload>>;
|
|
1221
1289
|
countForNode(nodeId: string): Promise<number>;
|
|
1222
1290
|
syncIndex(): Promise<void>;
|
|
1223
1291
|
}
|
|
1224
|
-
import { IDataSource, IKinotic as
|
|
1292
|
+
import { IDataSource, IKinotic as IKinotic12, IterablePage as IterablePage4, Pageable as Pageable4 } from "@kinotic-ai/core";
|
|
1225
1293
|
/**
|
|
1226
1294
|
* Member management for the caller's organization and its applications. Scope is selected
|
|
1227
1295
|
* with applicationId — null addresses org members, set addresses that application's
|
|
@@ -1261,7 +1329,7 @@ interface IMemberService {
|
|
|
1261
1329
|
}
|
|
1262
1330
|
declare class MemberService implements IMemberService {
|
|
1263
1331
|
private readonly serviceProxy;
|
|
1264
|
-
constructor(kinotic:
|
|
1332
|
+
constructor(kinotic: IKinotic12);
|
|
1265
1333
|
findMembers(applicationId: string | null, pageable: Pageable4): Promise<IterablePage4<IamUser>>;
|
|
1266
1334
|
searchMembers(searchText: string, applicationId: string | null, pageable: Pageable4): Promise<IterablePage4<IamUser>>;
|
|
1267
1335
|
inviteMember(email: string, displayName: string | null, applicationId: string | null): Promise<PendingInviteSummary>;
|
|
@@ -1271,7 +1339,7 @@ declare class MemberService implements IMemberService {
|
|
|
1271
1339
|
cancelInvite(inviteId: string): Promise<void>;
|
|
1272
1340
|
memberDataSource(applicationId: string | null): IDataSource<IamUser>;
|
|
1273
1341
|
}
|
|
1274
|
-
import { IKinotic as
|
|
1342
|
+
import { IKinotic as IKinotic13 } from "@kinotic-ai/core";
|
|
1275
1343
|
import { CrudServiceProxy as CrudServiceProxy8, ICrudServiceProxy as ICrudServiceProxy8 } from "@kinotic-ai/core";
|
|
1276
1344
|
/**
|
|
1277
1345
|
* CRUD service for an application's customized invitation email — at most one
|
|
@@ -1287,10 +1355,10 @@ interface IInviteEmailTemplateService extends ICrudServiceProxy8<InviteEmailTemp
|
|
|
1287
1355
|
findByApplication(applicationId: string): Promise<InviteEmailTemplate | null>;
|
|
1288
1356
|
}
|
|
1289
1357
|
declare class InviteEmailTemplateService extends CrudServiceProxy8<InviteEmailTemplate> implements IInviteEmailTemplateService {
|
|
1290
|
-
constructor(kinotic:
|
|
1358
|
+
constructor(kinotic: IKinotic13);
|
|
1291
1359
|
findByApplication(applicationId: string): Promise<InviteEmailTemplate | null>;
|
|
1292
1360
|
}
|
|
1293
|
-
import { IKinotic as
|
|
1361
|
+
import { IKinotic as IKinotic14 } from "@kinotic-ai/core";
|
|
1294
1362
|
/**
|
|
1295
1363
|
* Browser-invoked service for the RFC 8628 device-authorization approve step. The signed-in
|
|
1296
1364
|
* browser user calls {@link approve} with the user_code shown in their CLI; the gateway
|
|
@@ -1305,10 +1373,10 @@ interface IDeviceApprovalService {
|
|
|
1305
1373
|
}
|
|
1306
1374
|
declare class DeviceApprovalService implements IDeviceApprovalService {
|
|
1307
1375
|
private readonly serviceProxy;
|
|
1308
|
-
constructor(kinotic:
|
|
1376
|
+
constructor(kinotic: IKinotic14);
|
|
1309
1377
|
approve(userCode: string): Promise<void>;
|
|
1310
1378
|
}
|
|
1311
|
-
import { CrudServiceProxy as CrudServiceProxy9, IKinotic as
|
|
1379
|
+
import { CrudServiceProxy as CrudServiceProxy9, IKinotic as IKinotic15, ICrudServiceProxy as ICrudServiceProxy9 } from "@kinotic-ai/core";
|
|
1312
1380
|
interface IGitHubAppInstallationService extends ICrudServiceProxy9<GitHubAppInstallation> {
|
|
1313
1381
|
/**
|
|
1314
1382
|
* Stages a single-use state token bound to the caller's organization plus the
|
|
@@ -1335,7 +1403,7 @@ interface IGitHubAppInstallationService extends ICrudServiceProxy9<GitHubAppInst
|
|
|
1335
1403
|
findForCurrentOrg(): Promise<GitHubAppInstallation | null>;
|
|
1336
1404
|
}
|
|
1337
1405
|
declare class GitHubAppInstallationService extends CrudServiceProxy9<GitHubAppInstallation> implements IGitHubAppInstallationService {
|
|
1338
|
-
constructor(kinotic:
|
|
1406
|
+
constructor(kinotic: IKinotic15);
|
|
1339
1407
|
startInstall(returnTo: string | null): Promise<string>;
|
|
1340
1408
|
completeInstall(installationId: number, state: string): Promise<GitHubInstallCompletion>;
|
|
1341
1409
|
findForCurrentOrg(): Promise<GitHubAppInstallation | null>;
|
|
@@ -1358,7 +1426,28 @@ interface IOsApiExtension {
|
|
|
1358
1426
|
githubAppInstallations: IGitHubAppInstallationService;
|
|
1359
1427
|
}
|
|
1360
1428
|
declare const OsApiPlugin: KinoticPlugin<IOsApiExtension>;
|
|
1429
|
+
import { APP_API_ZONE } from "@kinotic-ai/persistence";
|
|
1430
|
+
/**
|
|
1431
|
+
* The zone for platform services organizations use to manage the system, such as member,
|
|
1432
|
+
* application, and entity definition management
|
|
1433
|
+
*/
|
|
1434
|
+
declare const OS_API_ZONE = "os_api";
|
|
1435
|
+
/**
|
|
1436
|
+
* The zone for services internal to the platform, only reachable by system participants
|
|
1437
|
+
*/
|
|
1438
|
+
declare const SYSTEM_ZONE = "system";
|
|
1439
|
+
/**
|
|
1440
|
+
* The leading label of application zones, which follow the form app.<organizationId>.<applicationId>
|
|
1441
|
+
*/
|
|
1442
|
+
declare const APP_ZONE_PREFIX = "app";
|
|
1443
|
+
/**
|
|
1444
|
+
* Builds the zone that all of an application's services live in
|
|
1445
|
+
* @param organizationId the id of the organization that owns the application
|
|
1446
|
+
* @param applicationId the id of the application
|
|
1447
|
+
* @return the application zone, app.<organizationId>.<applicationId>
|
|
1448
|
+
*/
|
|
1449
|
+
declare function appZone(organizationId: string, applicationId: string): string;
|
|
1361
1450
|
declare module "@kinotic-ai/core" {
|
|
1362
1451
|
interface KinoticSingleton extends IOsApiExtension {}
|
|
1363
1452
|
}
|
|
1364
|
-
export { isSystemParticipant, isOrganizationParticipant, isApplicationParticipant, WorkloadStatus, WorkloadServiceProxy, Workload, VolumeMount, VmProviderType, VmNodeStatus, VmNodeServiceProxy, VmNode, VersionDecorator, TimeReferenceDecorator, TextDecorator, TenantSelectionC3Type, TenantIdDecorator, SingleLoggerLevelsDescriptor, SignUpRequest, SignUpCompleteRequest, RepositoryConnectionStatus, QueryOptionsC3Type, QueryDecorator, ProjectType, ProjectService, Project, ProgressType, PortProtocol, PortMapping, PendingInviteSummary, ParticipantType, PageableC3Type, PageC3Type, OsApiPlugin, OrganizationService, Organization, NotIndexedDecorator, NestedDecorator, NamedQueriesDefinitionService, NamedQueriesDefinition, MigrationService, MigrationResult, MigrationRequest, MigrationDefinition, MemberService, LoggersDescriptor, LoggerLevelsDescriptor, LogManager, LogLevel, KinoticProjectConfig, KinoticOsCredentialsAuthProvider, InviteEmailTemplateService, InviteEmailTemplate, InsightRequest, InsightProgress, IdDecorator, IamUser, IWorkloadService, IVmNodeService, ISystemParticipant, IProjectService, IOsApiExtension, IOrganizationService, IOrganizationParticipant, INamedQueriesDefinitionService, IMigrationService, IMemberService, ILogManager, IInviteEmailTemplateService, IGitHubAppInstallationService, IEntityDefinitionService, IDeviceApprovalService, IDataInsightsService, IApplicationService, IApplicationParticipant, GroupLoggerLevelsDescriptor, GitHubToken, GitHubRepoToken, GitHubInstallCompletion, GitHubAppInstallationService, GitHubAppInstallation, FlattenedDecorator, EsIndexConfigurationDecorator, EntityDefinitionService, EntityDefinition, EntityDecorator, EntitiesPathConfig, DiscriminatorDecorator, DeviceApprovalService, DataInsightsService, DataInsightsComponent, CompleteOrgRequest, AutoGeneratedIdDecorator, AuthType, ApplicationService, Application };
|
|
1453
|
+
export { isSystemParticipant, isOrganizationParticipant, isApplicationParticipant, appZone, WorkloadStatus, WorkloadServiceProxy, Workload, VolumeMount, VmProviderType, VmNodeStatus, VmNodeServiceProxy, VmNode, VersionDecorator, TimeReferenceDecorator, TextDecorator, TenantSelectionC3Type, TenantIdDecorator, SingleLoggerLevelsDescriptor, SignUpRequest, SignUpCompleteRequest, SYSTEM_ZONE, RepositoryConnectionStatus, QueryOptionsC3Type, QueryDecorator, ProjectType, ProjectService, Project, ProgressType, PortProtocol, PortMapping, PendingInviteSummary, ParticipantType, PageableC3Type, PageC3Type, OsApiPlugin, OrganizationService, Organization, OS_API_ZONE, NotIndexedDecorator, NestedDecorator, NamedQueriesDefinitionService, NamedQueriesDefinition, MigrationService, MigrationResult, MigrationRequest, MigrationDefinition, MemberService, LoggersDescriptor, LoggerLevelsDescriptor, LogService, LogQuery, LogManager, LogLevel, KinoticProjectConfig, KinoticOsCredentialsAuthProvider, InviteEmailTemplateService, InviteEmailTemplate, InsightRequest, InsightProgress, IdDecorator, IamUser, IWorkloadService, IVmNodeService, ISystemParticipant, IProjectService, IOsApiExtension, IOrganizationService, IOrganizationParticipant, INamedQueriesDefinitionService, IMigrationService, IMemberService, ILogService, ILogManager, IInviteEmailTemplateService, IGitHubAppInstallationService, IEntityDefinitionService, IDeviceApprovalService, IDataInsightsService, IApplicationService, IApplicationParticipant, GroupLoggerLevelsDescriptor, GitHubToken, GitHubRepoToken, GitHubInstallCompletion, GitHubAppInstallationService, GitHubAppInstallation, FlattenedDecorator, EsIndexConfigurationDecorator, EntityDefinitionService, EntityDefinition, EntityDecorator, EntitiesPathConfig, DiscriminatorDecorator, DeviceApprovalService, DataInsightsService, DataInsightsComponent, CompleteOrgRequest, AutoGeneratedIdDecorator, AuthType, ApplicationService, Application, APP_ZONE_PREFIX, APP_API_ZONE };
|
package/dist/index.js
CHANGED
|
@@ -177,11 +177,12 @@ class TenantSelectionC3Type extends ArrayC3Type {
|
|
|
177
177
|
class Application {
|
|
178
178
|
id;
|
|
179
179
|
organizationId;
|
|
180
|
+
name;
|
|
180
181
|
description;
|
|
181
182
|
tenantPerUser = false;
|
|
182
183
|
updated = null;
|
|
183
|
-
constructor(
|
|
184
|
-
this.
|
|
184
|
+
constructor(name, description) {
|
|
185
|
+
this.name = name;
|
|
185
186
|
this.description = description;
|
|
186
187
|
}
|
|
187
188
|
}
|
|
@@ -302,11 +303,15 @@ class Workload {
|
|
|
302
303
|
id = null;
|
|
303
304
|
name;
|
|
304
305
|
description;
|
|
306
|
+
organizationId = null;
|
|
307
|
+
applicationId = null;
|
|
305
308
|
providerType = "BOXLITE" /* BOXLITE */;
|
|
306
309
|
image;
|
|
307
310
|
vcpus = 1;
|
|
308
311
|
memoryMb = 512;
|
|
309
312
|
diskSizeMb = 1024;
|
|
313
|
+
detached = true;
|
|
314
|
+
autoRemove = false;
|
|
310
315
|
status = "PENDING" /* PENDING */;
|
|
311
316
|
environment = {};
|
|
312
317
|
portMappings = [];
|
|
@@ -467,12 +472,24 @@ class KinoticOsCredentialsAuthProvider {
|
|
|
467
472
|
return this.authHeaders;
|
|
468
473
|
}
|
|
469
474
|
}
|
|
475
|
+
// packages/os-api/src/api/PlatformZones.ts
|
|
476
|
+
import { validateLabel } from "@kinotic-ai/core";
|
|
477
|
+
import { APP_API_ZONE } from "@kinotic-ai/persistence";
|
|
478
|
+
var OS_API_ZONE = "os_api";
|
|
479
|
+
var SYSTEM_ZONE = "system";
|
|
480
|
+
var APP_ZONE_PREFIX = "app";
|
|
481
|
+
function appZone(organizationId, applicationId) {
|
|
482
|
+
validateLabel(organizationId);
|
|
483
|
+
validateLabel(applicationId);
|
|
484
|
+
return `${APP_ZONE_PREFIX}.${organizationId}.${applicationId}`;
|
|
485
|
+
}
|
|
486
|
+
|
|
470
487
|
// packages/os-api/src/api/services/IApplicationService.ts
|
|
471
488
|
import { CrudServiceProxy } from "@kinotic-ai/core";
|
|
472
489
|
|
|
473
490
|
class ApplicationService extends CrudServiceProxy {
|
|
474
491
|
constructor(kinotic) {
|
|
475
|
-
super(kinotic.serviceProxy(
|
|
492
|
+
super(kinotic.serviceProxy(`${OS_API_ZONE}.org.kinotic.os.api.services.ApplicationService`));
|
|
476
493
|
}
|
|
477
494
|
createApplicationIfNotExist(id, description) {
|
|
478
495
|
return this.serviceProxy.invoke("createApplicationIfNotExist", [id, description]);
|
|
@@ -486,7 +503,7 @@ import { CrudServiceProxy as CrudServiceProxy2 } from "@kinotic-ai/core";
|
|
|
486
503
|
|
|
487
504
|
class OrganizationService extends CrudServiceProxy2 {
|
|
488
505
|
constructor(kinotic) {
|
|
489
|
-
super(kinotic.serviceProxy(
|
|
506
|
+
super(kinotic.serviceProxy(`${OS_API_ZONE}.org.kinotic.os.api.services.OrganizationService`));
|
|
490
507
|
}
|
|
491
508
|
getOidcConfigurations(organizationId) {
|
|
492
509
|
return this.serviceProxy.invoke("getOidcConfigurations", [organizationId]);
|
|
@@ -526,7 +543,7 @@ import { CrudServiceProxy as CrudServiceProxy3, FunctionalIterablePage } from "@
|
|
|
526
543
|
|
|
527
544
|
class ProjectService extends CrudServiceProxy3 {
|
|
528
545
|
constructor(kinotic) {
|
|
529
|
-
super(kinotic.serviceProxy(
|
|
546
|
+
super(kinotic.serviceProxy(`${OS_API_ZONE}.org.kinotic.os.api.services.ProjectService`));
|
|
530
547
|
}
|
|
531
548
|
countForApplication(applicationId) {
|
|
532
549
|
return this.serviceProxy.invoke("countForApplication", [applicationId]);
|
|
@@ -552,7 +569,7 @@ class ProjectService extends CrudServiceProxy3 {
|
|
|
552
569
|
class LogManager {
|
|
553
570
|
serviceProxy;
|
|
554
571
|
constructor(kinotic) {
|
|
555
|
-
this.serviceProxy = kinotic.serviceProxy(
|
|
572
|
+
this.serviceProxy = kinotic.serviceProxy(`${OS_API_ZONE}.org.kinotic.os.api.services.LogManager`);
|
|
556
573
|
}
|
|
557
574
|
loggers(nodeId) {
|
|
558
575
|
return this.serviceProxy.invoke("loggers", null, nodeId);
|
|
@@ -574,12 +591,25 @@ class LogManager {
|
|
|
574
591
|
return this.serviceProxy.invoke("configureLogLevel", [name, level], nodeId);
|
|
575
592
|
}
|
|
576
593
|
}
|
|
594
|
+
// packages/os-api/src/api/services/ILogService.ts
|
|
595
|
+
class LogService {
|
|
596
|
+
serviceProxy;
|
|
597
|
+
constructor(kinotic) {
|
|
598
|
+
this.serviceProxy = kinotic.serviceProxy(`${OS_API_ZONE}.org.kinotic.os.api.services.LogService`);
|
|
599
|
+
}
|
|
600
|
+
tail(workloadId) {
|
|
601
|
+
return this.serviceProxy.invokeStream("tail", [workloadId]);
|
|
602
|
+
}
|
|
603
|
+
history(query) {
|
|
604
|
+
return this.serviceProxy.invoke("history", [query]);
|
|
605
|
+
}
|
|
606
|
+
}
|
|
577
607
|
// packages/os-api/src/api/services/IEntityDefinitionService.ts
|
|
578
608
|
import { CrudServiceProxy as CrudServiceProxy4, FunctionalIterablePage as FunctionalIterablePage2 } from "@kinotic-ai/core";
|
|
579
609
|
|
|
580
610
|
class EntityDefinitionService extends CrudServiceProxy4 {
|
|
581
611
|
constructor(kinotic) {
|
|
582
|
-
super(kinotic.serviceProxy(
|
|
612
|
+
super(kinotic.serviceProxy(`${OS_API_ZONE}.org.kinotic.persistence.api.services.EntityDefinitionService`));
|
|
583
613
|
}
|
|
584
614
|
countForApplication(applicationId) {
|
|
585
615
|
return this.serviceProxy.invoke("countForApplication", [applicationId]);
|
|
@@ -619,7 +649,7 @@ import { CrudServiceProxy as CrudServiceProxy5 } from "@kinotic-ai/core";
|
|
|
619
649
|
|
|
620
650
|
class NamedQueriesDefinitionService extends CrudServiceProxy5 {
|
|
621
651
|
constructor(kinotic) {
|
|
622
|
-
super(kinotic.serviceProxy(
|
|
652
|
+
super(kinotic.serviceProxy(`${OS_API_ZONE}.org.kinotic.persistence.api.services.NamedQueriesDefinitionService`));
|
|
623
653
|
}
|
|
624
654
|
syncIndex() {
|
|
625
655
|
return this.serviceProxy.invoke("syncIndex", []);
|
|
@@ -629,7 +659,7 @@ class NamedQueriesDefinitionService extends CrudServiceProxy5 {
|
|
|
629
659
|
class MigrationService {
|
|
630
660
|
serviceProxy;
|
|
631
661
|
constructor(kinotic) {
|
|
632
|
-
this.serviceProxy = kinotic.serviceProxy(
|
|
662
|
+
this.serviceProxy = kinotic.serviceProxy(`${OS_API_ZONE}.org.kinotic.persistence.api.services.MigrationService`);
|
|
633
663
|
}
|
|
634
664
|
executeMigrations(migrationRequest) {
|
|
635
665
|
return this.serviceProxy.invoke("executeMigrations", [migrationRequest]);
|
|
@@ -645,7 +675,7 @@ class MigrationService {
|
|
|
645
675
|
class DataInsightsService {
|
|
646
676
|
serviceProxy;
|
|
647
677
|
constructor(kinotic) {
|
|
648
|
-
this.serviceProxy = kinotic.serviceProxy(
|
|
678
|
+
this.serviceProxy = kinotic.serviceProxy(`${OS_API_ZONE}.org.kinotic.persistence.api.services.insights.DataInsightsService`);
|
|
649
679
|
}
|
|
650
680
|
processRequest(request) {
|
|
651
681
|
return this.serviceProxy.invokeStream("processRequest", [request]);
|
|
@@ -656,7 +686,7 @@ import { CrudServiceProxy as CrudServiceProxy6 } from "@kinotic-ai/core";
|
|
|
656
686
|
|
|
657
687
|
class VmNodeServiceProxy extends CrudServiceProxy6 {
|
|
658
688
|
constructor(kinotic) {
|
|
659
|
-
super(kinotic.serviceProxy(
|
|
689
|
+
super(kinotic.serviceProxy(`${OS_API_ZONE}.org.kinotic.os.api.services.VmNodeService`));
|
|
660
690
|
}
|
|
661
691
|
findAvailableNode(requiredCpus, requiredMemoryMb, requiredDiskMb) {
|
|
662
692
|
return this.serviceProxy.invoke("findAvailableNode", [requiredCpus, requiredMemoryMb, requiredDiskMb]);
|
|
@@ -670,7 +700,7 @@ import { CrudServiceProxy as CrudServiceProxy7, FunctionalIterablePage as Functi
|
|
|
670
700
|
|
|
671
701
|
class WorkloadServiceProxy extends CrudServiceProxy7 {
|
|
672
702
|
constructor(kinotic) {
|
|
673
|
-
super(kinotic.serviceProxy(
|
|
703
|
+
super(kinotic.serviceProxy(`${OS_API_ZONE}.org.kinotic.os.api.services.WorkloadService`));
|
|
674
704
|
}
|
|
675
705
|
async findAllForNode(nodeId, pageable) {
|
|
676
706
|
const page = await this.findAllForNodeSinglePage(nodeId, pageable);
|
|
@@ -694,7 +724,7 @@ import {
|
|
|
694
724
|
class MemberService {
|
|
695
725
|
serviceProxy;
|
|
696
726
|
constructor(kinotic) {
|
|
697
|
-
this.serviceProxy = kinotic.serviceProxy(
|
|
727
|
+
this.serviceProxy = kinotic.serviceProxy(`${OS_API_ZONE}.org.kinotic.os.api.services.iam.MemberService`);
|
|
698
728
|
}
|
|
699
729
|
async findMembers(applicationId, pageable) {
|
|
700
730
|
const page = await this.serviceProxy.invoke("findMembers", [applicationId, pageable]);
|
|
@@ -732,7 +762,7 @@ import { CrudServiceProxy as CrudServiceProxy8 } from "@kinotic-ai/core";
|
|
|
732
762
|
|
|
733
763
|
class InviteEmailTemplateService extends CrudServiceProxy8 {
|
|
734
764
|
constructor(kinotic) {
|
|
735
|
-
super(kinotic.serviceProxy(
|
|
765
|
+
super(kinotic.serviceProxy(`${OS_API_ZONE}.org.kinotic.os.api.services.InviteEmailTemplateService`));
|
|
736
766
|
}
|
|
737
767
|
findByApplication(applicationId) {
|
|
738
768
|
return this.serviceProxy.invoke("findByApplication", [applicationId]);
|
|
@@ -742,7 +772,7 @@ class InviteEmailTemplateService extends CrudServiceProxy8 {
|
|
|
742
772
|
class DeviceApprovalService {
|
|
743
773
|
serviceProxy;
|
|
744
774
|
constructor(kinotic) {
|
|
745
|
-
this.serviceProxy = kinotic.serviceProxy(
|
|
775
|
+
this.serviceProxy = kinotic.serviceProxy(`${OS_API_ZONE}.org.kinotic.os.api.services.iam.DeviceApprovalService`);
|
|
746
776
|
}
|
|
747
777
|
approve(userCode) {
|
|
748
778
|
return this.serviceProxy.invoke("approve", [userCode]);
|
|
@@ -753,7 +783,7 @@ import { CrudServiceProxy as CrudServiceProxy9 } from "@kinotic-ai/core";
|
|
|
753
783
|
|
|
754
784
|
class GitHubAppInstallationService extends CrudServiceProxy9 {
|
|
755
785
|
constructor(kinotic) {
|
|
756
|
-
super(kinotic.serviceProxy(
|
|
786
|
+
super(kinotic.serviceProxy(`${OS_API_ZONE}.org.kinotic.github.api.services.GitHubAppInstallationService`));
|
|
757
787
|
}
|
|
758
788
|
startInstall(returnTo) {
|
|
759
789
|
return this.serviceProxy.invoke("startInstall", [returnTo]);
|
|
@@ -790,6 +820,7 @@ export {
|
|
|
790
820
|
isSystemParticipant,
|
|
791
821
|
isOrganizationParticipant,
|
|
792
822
|
isApplicationParticipant,
|
|
823
|
+
appZone,
|
|
793
824
|
WorkloadStatus,
|
|
794
825
|
WorkloadServiceProxy,
|
|
795
826
|
Workload,
|
|
@@ -803,6 +834,7 @@ export {
|
|
|
803
834
|
TenantSelectionC3Type,
|
|
804
835
|
TenantIdDecorator,
|
|
805
836
|
SingleLoggerLevelsDescriptor,
|
|
837
|
+
SYSTEM_ZONE,
|
|
806
838
|
RepositoryConnectionStatus,
|
|
807
839
|
QueryOptionsC3Type,
|
|
808
840
|
QueryDecorator,
|
|
@@ -818,6 +850,7 @@ export {
|
|
|
818
850
|
OsApiPlugin,
|
|
819
851
|
OrganizationService,
|
|
820
852
|
Organization,
|
|
853
|
+
OS_API_ZONE,
|
|
821
854
|
NotIndexedDecorator,
|
|
822
855
|
NestedDecorator,
|
|
823
856
|
NamedQueriesDefinitionService,
|
|
@@ -826,6 +859,7 @@ export {
|
|
|
826
859
|
MemberService,
|
|
827
860
|
LoggersDescriptor,
|
|
828
861
|
LoggerLevelsDescriptor,
|
|
862
|
+
LogService,
|
|
829
863
|
LogManager,
|
|
830
864
|
LogLevel,
|
|
831
865
|
KinoticProjectConfig,
|
|
@@ -851,5 +885,7 @@ export {
|
|
|
851
885
|
AutoGeneratedIdDecorator,
|
|
852
886
|
AuthType,
|
|
853
887
|
ApplicationService,
|
|
854
|
-
Application
|
|
888
|
+
Application,
|
|
889
|
+
APP_ZONE_PREFIX,
|
|
890
|
+
APP_API_ZONE
|
|
855
891
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kinotic-ai/os-api",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -32,15 +32,15 @@
|
|
|
32
32
|
"coverage": "bun test --coverage --pass-with-no-tests"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@kinotic-ai/core": ">=
|
|
35
|
+
"@kinotic-ai/core": ">=3.0.0"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@kinotic-ai/idl": "1.0.
|
|
39
|
-
"@kinotic-ai/persistence": "
|
|
38
|
+
"@kinotic-ai/idl": "1.0.10",
|
|
39
|
+
"@kinotic-ai/persistence": "3.0.0",
|
|
40
40
|
"rxjs": "^7.8.2"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@kinotic-ai/core": "
|
|
43
|
+
"@kinotic-ai/core": "3.0.0",
|
|
44
44
|
"@types/node": "^25.3.2",
|
|
45
45
|
"tslib": "^2.8.1",
|
|
46
46
|
"typescript": "^5.9.3"
|