@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 +125 -18
- package/dist/index.d.cts +233 -47
- package/dist/index.d.ts +233 -47
- package/dist/index.js +121 -14
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -138,21 +138,49 @@ declare class TenantSelectionC3Type extends ArrayC3Type {
|
|
|
138
138
|
import { Identifiable } from "@kinotic-ai/core";
|
|
139
139
|
declare class Application implements Identifiable<string> {
|
|
140
140
|
id: string;
|
|
141
|
+
/**
|
|
142
|
+
* The id of the organization that owns this application.
|
|
143
|
+
* Must be set by the caller before save — backend org enforcement rejects entities
|
|
144
|
+
* with a missing or mismatched organizationId.
|
|
145
|
+
*/
|
|
146
|
+
organizationId: string;
|
|
141
147
|
description: string;
|
|
142
148
|
updated: number | null;
|
|
143
149
|
constructor(id: string, description: string);
|
|
144
150
|
}
|
|
145
151
|
import { Identifiable as Identifiable2 } from "@kinotic-ai/core";
|
|
152
|
+
/**
|
|
153
|
+
* Represents an organization developing applications on the Kinotic OS platform.
|
|
154
|
+
* Organizations provide the boundary for teams, applications, users, and shared OIDC configuration.
|
|
155
|
+
*
|
|
156
|
+
* The {@link id} is auto-generated from the {@link name} on save (slugified) and serves as the URL-safe identifier.
|
|
157
|
+
*/
|
|
158
|
+
declare class Organization implements Identifiable2<string> {
|
|
159
|
+
id: string | null;
|
|
160
|
+
name: string;
|
|
161
|
+
description: string | null;
|
|
162
|
+
oidcConfigurationIds: string[] | null;
|
|
163
|
+
createdBy: string | null;
|
|
164
|
+
created: number | null;
|
|
165
|
+
updated: number | null;
|
|
166
|
+
}
|
|
167
|
+
import { Identifiable as Identifiable3 } from "@kinotic-ai/core";
|
|
146
168
|
declare enum ProjectType {
|
|
147
169
|
TYPESCRIPT = "TYPESCRIPT"
|
|
148
170
|
}
|
|
149
|
-
declare class Project implements
|
|
171
|
+
declare class Project implements Identifiable3<string> {
|
|
150
172
|
/**
|
|
151
173
|
* The id of the project.
|
|
152
174
|
* All project ids are unique throughout the entire system.
|
|
153
175
|
*/
|
|
154
176
|
id: string | null;
|
|
155
177
|
/**
|
|
178
|
+
* The id of the organization that owns this project.
|
|
179
|
+
* Must be set by the caller before save — backend org enforcement rejects entities
|
|
180
|
+
* with a missing or mismatched organizationId.
|
|
181
|
+
*/
|
|
182
|
+
organizationId: string;
|
|
183
|
+
/**
|
|
156
184
|
* The id of the application that this project belongs to.
|
|
157
185
|
* All application ids are unique throughout the entire system.
|
|
158
186
|
*/
|
|
@@ -176,8 +204,8 @@ declare class Project implements Identifiable2<string> {
|
|
|
176
204
|
constructor(id: string | null, applicationId: string, name: string, description?: string);
|
|
177
205
|
}
|
|
178
206
|
import { ObjectC3Type as ObjectC3Type3 } from "@kinotic-ai/idl";
|
|
179
|
-
import { Identifiable as
|
|
180
|
-
declare class EntityDefinition implements
|
|
207
|
+
import { Identifiable as Identifiable4 } from "@kinotic-ai/core";
|
|
208
|
+
declare class EntityDefinition implements Identifiable4<string> {
|
|
181
209
|
id: string | null;
|
|
182
210
|
/**
|
|
183
211
|
* The id of the organization that owns this entity definition.
|
|
@@ -203,12 +231,12 @@ declare class EntityDefinition implements Identifiable3<string> {
|
|
|
203
231
|
publishedTimestamp: number;
|
|
204
232
|
constructor(organizationId: string, applicationId: string, projectId: string, name: string, schema: ObjectC3Type3, description?: string | null);
|
|
205
233
|
}
|
|
206
|
-
import { Identifiable as
|
|
234
|
+
import { Identifiable as Identifiable5 } from "@kinotic-ai/core";
|
|
207
235
|
import { FunctionDefinition } from "@kinotic-ai/idl";
|
|
208
236
|
/**
|
|
209
237
|
* Provides Metadata that represents Named Queries for an Application
|
|
210
238
|
*/
|
|
211
|
-
declare class NamedQueriesDefinition implements
|
|
239
|
+
declare class NamedQueriesDefinition implements Identifiable5<string> {
|
|
212
240
|
id: string;
|
|
213
241
|
organizationId?: string | null;
|
|
214
242
|
applicationId: string;
|
|
@@ -348,7 +376,7 @@ interface InsightRequest {
|
|
|
348
376
|
*/
|
|
349
377
|
additionalContext?: string;
|
|
350
378
|
}
|
|
351
|
-
import { Identifiable as
|
|
379
|
+
import { Identifiable as Identifiable6 } from "@kinotic-ai/core";
|
|
352
380
|
declare enum WorkloadStatus {
|
|
353
381
|
PENDING = "PENDING",
|
|
354
382
|
STARTING = "STARTING",
|
|
@@ -366,7 +394,7 @@ declare enum VmProviderType {
|
|
|
366
394
|
* Represents a workload to be managed by the VM manager.
|
|
367
395
|
* A workload defines the configuration for a micro VM instance.
|
|
368
396
|
*/
|
|
369
|
-
declare class Workload implements
|
|
397
|
+
declare class Workload implements Identifiable6<string> {
|
|
370
398
|
/**
|
|
371
399
|
* Unique identifier for this workload.
|
|
372
400
|
*/
|
|
@@ -421,7 +449,7 @@ declare class Workload implements Identifiable5<string> {
|
|
|
421
449
|
updated: number | null;
|
|
422
450
|
constructor(name: string, image: string);
|
|
423
451
|
}
|
|
424
|
-
import { Identifiable as
|
|
452
|
+
import { Identifiable as Identifiable7 } from "@kinotic-ai/core";
|
|
425
453
|
declare enum VmNodeStatus {
|
|
426
454
|
ONLINE = "ONLINE",
|
|
427
455
|
OFFLINE = "OFFLINE",
|
|
@@ -431,7 +459,7 @@ declare enum VmNodeStatus {
|
|
|
431
459
|
* Represents a node in the cluster that is running a VmManager process
|
|
432
460
|
* and is capable of hosting workloads.
|
|
433
461
|
*/
|
|
434
|
-
declare class VmNode implements
|
|
462
|
+
declare class VmNode implements Identifiable7<string> {
|
|
435
463
|
/**
|
|
436
464
|
* Unique identifier for this node.
|
|
437
465
|
*/
|
|
@@ -485,7 +513,7 @@ declare enum AuthType {
|
|
|
485
513
|
LOCAL = "LOCAL",
|
|
486
514
|
OIDC = "OIDC"
|
|
487
515
|
}
|
|
488
|
-
import { Identifiable as
|
|
516
|
+
import { Identifiable as Identifiable8 } from "@kinotic-ai/core";
|
|
489
517
|
/**
|
|
490
518
|
* Represents an authenticated identity at any scope layer in the IAM system.
|
|
491
519
|
* Each user is scoped to exactly one layer and is unique by email within that scope.
|
|
@@ -494,7 +522,7 @@ import { Identifiable as Identifiable7 } from "@kinotic-ai/core";
|
|
|
494
522
|
* - For APPLICATION scopes, {@link tenantId} is required and identifies the
|
|
495
523
|
* client tenant the user belongs to within the application's data.
|
|
496
524
|
*/
|
|
497
|
-
declare class IamUser implements
|
|
525
|
+
declare class IamUser implements Identifiable8<string> {
|
|
498
526
|
id: string | null;
|
|
499
527
|
email: string;
|
|
500
528
|
displayName: string | null;
|
|
@@ -535,6 +563,68 @@ interface SignUpCompleteRequest {
|
|
|
535
563
|
password: string;
|
|
536
564
|
}
|
|
537
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
|
+
/**
|
|
538
628
|
* Configuration for a single entities path and its corresponding repository output.
|
|
539
629
|
*/
|
|
540
630
|
type EntitiesPathConfig = {
|
|
@@ -602,7 +692,8 @@ import { IKinotic } from "@kinotic-ai/core";
|
|
|
602
692
|
import { CrudServiceProxy, ICrudServiceProxy } from "@kinotic-ai/core";
|
|
603
693
|
interface IApplicationService extends ICrudServiceProxy<Application> {
|
|
604
694
|
/**
|
|
605
|
-
* 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.
|
|
606
697
|
* @param id the id of the application to create
|
|
607
698
|
* @param description the description of the application to create
|
|
608
699
|
* @return {@link Promise} emitting the created application
|
|
@@ -619,6 +710,22 @@ declare class ApplicationService extends CrudServiceProxy<Application> implement
|
|
|
619
710
|
createApplicationIfNotExist(id: string, description: string): Promise<Application>;
|
|
620
711
|
syncIndex(): Promise<void>;
|
|
621
712
|
}
|
|
713
|
+
import { IKinotic as IKinotic2 } from "@kinotic-ai/core";
|
|
714
|
+
import { CrudServiceProxy as CrudServiceProxy2, ICrudServiceProxy as ICrudServiceProxy2 } from "@kinotic-ai/core";
|
|
715
|
+
interface IOrganizationService extends ICrudServiceProxy2<Organization> {
|
|
716
|
+
/**
|
|
717
|
+
* Returns the enabled OIDC configurations registered on the given organization.
|
|
718
|
+
*
|
|
719
|
+
* @param organizationId the id of the organization
|
|
720
|
+
* @return the enabled configurations, or an empty list if the organization is not
|
|
721
|
+
* found or has no configurations attached
|
|
722
|
+
*/
|
|
723
|
+
getOidcConfigurations(organizationId: string): Promise<any[]>;
|
|
724
|
+
}
|
|
725
|
+
declare class OrganizationService extends CrudServiceProxy2<Organization> implements IOrganizationService {
|
|
726
|
+
constructor(kinotic: IKinotic2);
|
|
727
|
+
getOidcConfigurations(organizationId: string): Promise<any[]>;
|
|
728
|
+
}
|
|
622
729
|
declare enum LogLevel {
|
|
623
730
|
TRACE = "TRACE",
|
|
624
731
|
DEBUG = "DEBUG",
|
|
@@ -668,8 +775,8 @@ interface ILogManager {
|
|
|
668
775
|
*/
|
|
669
776
|
configureLogLevel(nodeId: string, name: string, level: LogLevel): Promise<void>;
|
|
670
777
|
}
|
|
671
|
-
import { CrudServiceProxy as
|
|
672
|
-
interface IProjectService extends
|
|
778
|
+
import { CrudServiceProxy as CrudServiceProxy3, IKinotic as IKinotic3, ICrudServiceProxy as ICrudServiceProxy3, IterablePage, Pageable } from "@kinotic-ai/core";
|
|
779
|
+
interface IProjectService extends ICrudServiceProxy3<Project> {
|
|
673
780
|
/**
|
|
674
781
|
* Counts all projects for the given application.
|
|
675
782
|
* @param applicationId the application to find projects for
|
|
@@ -695,24 +802,24 @@ interface IProjectService extends ICrudServiceProxy2<Project> {
|
|
|
695
802
|
*/
|
|
696
803
|
syncIndex(): Promise<void>;
|
|
697
804
|
}
|
|
698
|
-
declare class ProjectService extends
|
|
699
|
-
constructor(kinotic:
|
|
805
|
+
declare class ProjectService extends CrudServiceProxy3<Project> implements IProjectService {
|
|
806
|
+
constructor(kinotic: IKinotic3);
|
|
700
807
|
countForApplication(applicationId: string): Promise<number>;
|
|
701
808
|
createProjectIfNotExist(project: Project): Promise<Project>;
|
|
702
809
|
findAllForApplication(applicationId: string, pageable: Pageable): Promise<IterablePage<Project>>;
|
|
703
810
|
findAllForApplicationSinglePage(applicationId: string, pageable: Pageable): Promise<IterablePage<Project>>;
|
|
704
811
|
syncIndex(): Promise<void>;
|
|
705
812
|
}
|
|
706
|
-
import { IKinotic as
|
|
813
|
+
import { IKinotic as IKinotic4 } from "@kinotic-ai/core";
|
|
707
814
|
declare class LogManager implements ILogManager {
|
|
708
815
|
private readonly serviceProxy;
|
|
709
|
-
constructor(kinotic:
|
|
816
|
+
constructor(kinotic: IKinotic4);
|
|
710
817
|
loggers(nodeId: string): Promise<LoggersDescriptor>;
|
|
711
818
|
loggerLevels(nodeId: string, name: string): Promise<LoggerLevelsDescriptor>;
|
|
712
819
|
configureLogLevel(nodeId: string, name: string, level: LogLevel): Promise<void>;
|
|
713
820
|
}
|
|
714
|
-
import { CrudServiceProxy as
|
|
715
|
-
interface IEntityDefinitionService extends
|
|
821
|
+
import { CrudServiceProxy as CrudServiceProxy4, IKinotic as IKinotic5, ICrudServiceProxy as ICrudServiceProxy4, IterablePage as IterablePage2, Page, Pageable as Pageable2 } from "@kinotic-ai/core";
|
|
822
|
+
interface IEntityDefinitionService extends ICrudServiceProxy4<EntityDefinition> {
|
|
716
823
|
/**
|
|
717
824
|
* Counts all entity definitions for the given application.
|
|
718
825
|
* @param applicationId the application to find entity definitions for
|
|
@@ -765,8 +872,8 @@ interface IEntityDefinitionService extends ICrudServiceProxy3<EntityDefinition>
|
|
|
765
872
|
*/
|
|
766
873
|
unPublish(entityDefinitionId: string): Promise<void>;
|
|
767
874
|
}
|
|
768
|
-
declare class EntityDefinitionService extends
|
|
769
|
-
constructor(kinotic:
|
|
875
|
+
declare class EntityDefinitionService extends CrudServiceProxy4<EntityDefinition> implements IEntityDefinitionService {
|
|
876
|
+
constructor(kinotic: IKinotic5);
|
|
770
877
|
countForApplication(applicationId: string): Promise<number>;
|
|
771
878
|
countForProject(projectId: string): Promise<number>;
|
|
772
879
|
findAllForApplicationSinglePage(applicationId: string, pageable: Pageable2): Promise<Page<EntityDefinition>>;
|
|
@@ -778,20 +885,20 @@ declare class EntityDefinitionService extends CrudServiceProxy3<EntityDefinition
|
|
|
778
885
|
unPublish(entityDefinitionId: string): Promise<void>;
|
|
779
886
|
syncIndex(): Promise<void>;
|
|
780
887
|
}
|
|
781
|
-
import { IKinotic as
|
|
782
|
-
import { CrudServiceProxy as
|
|
783
|
-
interface INamedQueriesDefinitionService extends
|
|
888
|
+
import { IKinotic as IKinotic6 } from "@kinotic-ai/core";
|
|
889
|
+
import { CrudServiceProxy as CrudServiceProxy5, ICrudServiceProxy as ICrudServiceProxy5 } from "@kinotic-ai/core";
|
|
890
|
+
interface INamedQueriesDefinitionService extends ICrudServiceProxy5<NamedQueriesDefinition> {
|
|
784
891
|
/**
|
|
785
892
|
* This operation makes all the recent writes immediately available for search.
|
|
786
893
|
* @return a Promise that resolves when the operation is complete
|
|
787
894
|
*/
|
|
788
895
|
syncIndex(): Promise<void>;
|
|
789
896
|
}
|
|
790
|
-
declare class NamedQueriesDefinitionService extends
|
|
791
|
-
constructor(kinotic:
|
|
897
|
+
declare class NamedQueriesDefinitionService extends CrudServiceProxy5<NamedQueriesDefinition> implements INamedQueriesDefinitionService {
|
|
898
|
+
constructor(kinotic: IKinotic6);
|
|
792
899
|
syncIndex(): Promise<void>;
|
|
793
900
|
}
|
|
794
|
-
import { IKinotic as
|
|
901
|
+
import { IKinotic as IKinotic7 } from "@kinotic-ai/core";
|
|
795
902
|
/**
|
|
796
903
|
* Service for executing project-specific migrations through the Persistence API.
|
|
797
904
|
* This service allows external clients to apply their own migrations to projects.
|
|
@@ -823,12 +930,12 @@ interface IMigrationService {
|
|
|
823
930
|
}
|
|
824
931
|
declare class MigrationService implements IMigrationService {
|
|
825
932
|
private readonly serviceProxy;
|
|
826
|
-
constructor(kinotic:
|
|
933
|
+
constructor(kinotic: IKinotic7);
|
|
827
934
|
executeMigrations(migrationRequest: MigrationRequest): Promise<MigrationResult>;
|
|
828
935
|
getLastAppliedMigrationVersion(projectId: string): Promise<number | null>;
|
|
829
936
|
isMigrationApplied(projectId: string, version: string): Promise<boolean>;
|
|
830
937
|
}
|
|
831
|
-
import { IKinotic as
|
|
938
|
+
import { IKinotic as IKinotic8 } from "@kinotic-ai/core";
|
|
832
939
|
import { Observable } from "rxjs";
|
|
833
940
|
/**
|
|
834
941
|
* Provides AI-powered data analysis and visualization code generation capabilities.
|
|
@@ -847,12 +954,12 @@ interface IDataInsightsService {
|
|
|
847
954
|
}
|
|
848
955
|
declare class DataInsightsService implements IDataInsightsService {
|
|
849
956
|
private readonly serviceProxy;
|
|
850
|
-
constructor(kinotic:
|
|
957
|
+
constructor(kinotic: IKinotic8);
|
|
851
958
|
processRequest(request: InsightRequest): Observable<InsightProgress>;
|
|
852
959
|
}
|
|
853
|
-
import { IKinotic as
|
|
854
|
-
import { CrudServiceProxy as
|
|
855
|
-
interface IVmNodeService extends
|
|
960
|
+
import { IKinotic as IKinotic9 } from "@kinotic-ai/core";
|
|
961
|
+
import { CrudServiceProxy as CrudServiceProxy6, ICrudServiceProxy as ICrudServiceProxy6 } from "@kinotic-ai/core";
|
|
962
|
+
interface IVmNodeService extends ICrudServiceProxy6<VmNode> {
|
|
856
963
|
/**
|
|
857
964
|
* Finds a node with sufficient resources to host a workload with the given requirements.
|
|
858
965
|
* @param requiredCpus the number of vCPUs required
|
|
@@ -867,13 +974,13 @@ interface IVmNodeService extends ICrudServiceProxy5<VmNode> {
|
|
|
867
974
|
*/
|
|
868
975
|
syncIndex(): Promise<void>;
|
|
869
976
|
}
|
|
870
|
-
declare class VmNodeServiceProxy extends
|
|
871
|
-
constructor(kinotic:
|
|
977
|
+
declare class VmNodeServiceProxy extends CrudServiceProxy6<VmNode> implements IVmNodeService {
|
|
978
|
+
constructor(kinotic: IKinotic9);
|
|
872
979
|
findAvailableNode(requiredCpus: number, requiredMemoryMb: number, requiredDiskMb: number): Promise<VmNode | null>;
|
|
873
980
|
syncIndex(): Promise<void>;
|
|
874
981
|
}
|
|
875
|
-
import { CrudServiceProxy as
|
|
876
|
-
interface IWorkloadService extends
|
|
982
|
+
import { CrudServiceProxy as CrudServiceProxy7, IKinotic as IKinotic10, ICrudServiceProxy as ICrudServiceProxy7, IterablePage as IterablePage3, Page as Page2, Pageable as Pageable3 } from "@kinotic-ai/core";
|
|
983
|
+
interface IWorkloadService extends ICrudServiceProxy7<Workload> {
|
|
877
984
|
/**
|
|
878
985
|
* Finds all workloads deployed on the given node.
|
|
879
986
|
* @param nodeId the id of the node to find workloads for
|
|
@@ -893,49 +1000,126 @@ interface IWorkloadService extends ICrudServiceProxy6<Workload> {
|
|
|
893
1000
|
*/
|
|
894
1001
|
syncIndex(): Promise<void>;
|
|
895
1002
|
}
|
|
896
|
-
declare class WorkloadServiceProxy extends
|
|
897
|
-
constructor(kinotic:
|
|
1003
|
+
declare class WorkloadServiceProxy extends CrudServiceProxy7<Workload> implements IWorkloadService {
|
|
1004
|
+
constructor(kinotic: IKinotic10);
|
|
898
1005
|
findAllForNode(nodeId: string, pageable: Pageable3): Promise<IterablePage3<Workload>>;
|
|
899
1006
|
findAllForNodeSinglePage(nodeId: string, pageable: Pageable3): Promise<Page2<Workload>>;
|
|
900
1007
|
countForNode(nodeId: string): Promise<number>;
|
|
901
1008
|
syncIndex(): Promise<void>;
|
|
902
1009
|
}
|
|
903
|
-
import { CrudServiceProxy as
|
|
904
|
-
interface IIamUserService extends
|
|
1010
|
+
import { CrudServiceProxy as CrudServiceProxy8, IKinotic as IKinotic11, ICrudServiceProxy as ICrudServiceProxy8, Page as Page3, Pageable as Pageable4 } from "@kinotic-ai/core";
|
|
1011
|
+
interface IIamUserService extends ICrudServiceProxy8<IamUser> {
|
|
905
1012
|
/**
|
|
906
1013
|
* Finds the user with the given email within the given auth scope.
|
|
907
|
-
* @
|
|
1014
|
+
* @param email the email address to look up
|
|
1015
|
+
* @param authScopeType the scope type the user is registered against (e.g. {@code SYSTEM}, {@code ORGANIZATION}, {@code APPLICATION})
|
|
1016
|
+
* @param authScopeId the id of the scope the user is registered against
|
|
1017
|
+
* @return {@link Promise} emitting the matching user, or {@code null} if no user matches
|
|
908
1018
|
*/
|
|
909
1019
|
findByEmailAndScope(email: string, authScopeType: string, authScopeId: string): Promise<IamUser | null>;
|
|
910
1020
|
/**
|
|
911
1021
|
* Finds all users registered against the given auth scope.
|
|
1022
|
+
* @param authScopeType the scope type to filter by (e.g. {@code SYSTEM}, {@code ORGANIZATION}, {@code APPLICATION})
|
|
1023
|
+
* @param authScopeId the id of the scope to filter by
|
|
1024
|
+
* @param pageable the paging and sort options
|
|
1025
|
+
* @return {@link Promise} emitting a page of users registered against the scope
|
|
912
1026
|
*/
|
|
913
1027
|
findByScope(authScopeType: string, authScopeId: string, pageable: Pageable4): Promise<Page3<IamUser>>;
|
|
914
1028
|
/**
|
|
915
1029
|
* Creates a user and, if a password is provided, the matching credential.
|
|
916
|
-
* APPLICATION-scoped users must carry a {@code tenantId}; SYSTEM and ORGANIZATION users must not.
|
|
1030
|
+
* {@code APPLICATION}-scoped users must carry a {@code tenantId}; {@code SYSTEM} and {@code ORGANIZATION} users must not.
|
|
1031
|
+
* @param user the user to create
|
|
1032
|
+
* @param password the password to set, or {@code null} to create the user without a credential
|
|
1033
|
+
* @return {@link Promise} emitting the persisted user
|
|
917
1034
|
*/
|
|
918
1035
|
createUser(user: IamUser, password: string | null): Promise<IamUser>;
|
|
919
1036
|
/**
|
|
920
1037
|
* Verifies the current password and updates it. Used when the user knows their current password.
|
|
1038
|
+
* @param userId the id of the user whose password should be changed
|
|
1039
|
+
* @param currentPassword the user's current password
|
|
1040
|
+
* @param newPassword the new password to set
|
|
1041
|
+
* @return {@link Promise} that resolves when the password has been updated
|
|
921
1042
|
*/
|
|
922
1043
|
changePassword(userId: string, currentPassword: string, newPassword: string): Promise<void>;
|
|
923
1044
|
/**
|
|
924
1045
|
* Replaces the user's password without verifying the current one. Administrative reset.
|
|
1046
|
+
* @param userId the id of the user whose password should be reset
|
|
1047
|
+
* @param newPassword the new password to set
|
|
1048
|
+
* @return {@link Promise} that resolves when the password has been reset
|
|
925
1049
|
*/
|
|
926
1050
|
resetPassword(userId: string, newPassword: string): Promise<void>;
|
|
1051
|
+
/**
|
|
1052
|
+
* Finds the first user with the given email across all scope ids of the given scope type.
|
|
1053
|
+
* Used by the sign-up flow to enforce one user per email at organization-creation time,
|
|
1054
|
+
* before the new organization's scope id exists.
|
|
1055
|
+
* @param email the email address to look up
|
|
1056
|
+
* @param authScopeType the scope type to search within (e.g. {@code ORGANIZATION})
|
|
1057
|
+
* @return {@link Promise} emitting the first matching user, or {@code null} if no user matches
|
|
1058
|
+
*/
|
|
1059
|
+
findFirstByEmailInScopeType(email: string, authScopeType: string): Promise<IamUser | null>;
|
|
927
1060
|
}
|
|
928
|
-
declare class IamUserService extends
|
|
929
|
-
constructor(kinotic:
|
|
1061
|
+
declare class IamUserService extends CrudServiceProxy8<IamUser> implements IIamUserService {
|
|
1062
|
+
constructor(kinotic: IKinotic11);
|
|
930
1063
|
findByEmailAndScope(email: string, authScopeType: string, authScopeId: string): Promise<IamUser | null>;
|
|
931
1064
|
findByScope(authScopeType: string, authScopeId: string, pageable: Pageable4): Promise<Page3<IamUser>>;
|
|
932
1065
|
createUser(user: IamUser, password: string | null): Promise<IamUser>;
|
|
933
1066
|
changePassword(userId: string, currentPassword: string, newPassword: string): Promise<void>;
|
|
934
1067
|
resetPassword(userId: string, newPassword: string): Promise<void>;
|
|
1068
|
+
findFirstByEmailInScopeType(email: string, authScopeType: string): Promise<IamUser | null>;
|
|
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>;
|
|
935
1118
|
}
|
|
936
1119
|
import { KinoticPlugin } from "@kinotic-ai/core";
|
|
937
1120
|
interface IOsApiExtension {
|
|
938
1121
|
applications: IApplicationService;
|
|
1122
|
+
organizations: IOrganizationService;
|
|
939
1123
|
projects: IProjectService;
|
|
940
1124
|
logManager: ILogManager;
|
|
941
1125
|
entityDefinitions: IEntityDefinitionService;
|
|
@@ -945,9 +1129,11 @@ interface IOsApiExtension {
|
|
|
945
1129
|
vmNodes: IVmNodeService;
|
|
946
1130
|
workloads: IWorkloadService;
|
|
947
1131
|
iamUsers: IIamUserService;
|
|
1132
|
+
githubAppInstallations: IGitHubAppInstallationService;
|
|
1133
|
+
githubRepoLinks: IProjectGitHubRepoService;
|
|
948
1134
|
}
|
|
949
1135
|
declare const OsApiPlugin: KinoticPlugin<IOsApiExtension>;
|
|
950
1136
|
declare module "@kinotic-ai/core" {
|
|
951
1137
|
interface KinoticSingleton extends IOsApiExtension {}
|
|
952
1138
|
}
|
|
953
|
-
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, NotIndexedDecorator, NestedDecorator, NamedQueriesDefinitionService, NamedQueriesDefinition, MigrationService, MigrationResult, MigrationRequest, MigrationDefinition, LoggersDescriptor, LoggerLevelsDescriptor, LogManager, LogLevel, KinoticProjectConfig, InsightRequest, InsightProgress, IdDecorator, IamUserService, IamUser, IWorkloadService, IVmNodeService, IProjectService, IOsApiExtension, 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 };
|