@kinotic-ai/os-api 1.5.0 → 1.5.1
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 +12 -0
- package/dist/index.d.cts +22 -3
- package/dist/index.d.ts +22 -3
- package/dist/index.js +12 -0
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -89,6 +89,7 @@ __export(exports_src, {
|
|
|
89
89
|
EntityDefinition: () => EntityDefinition,
|
|
90
90
|
EntityDecorator: () => EntityDecorator,
|
|
91
91
|
DiscriminatorDecorator: () => DiscriminatorDecorator,
|
|
92
|
+
DeviceApprovalService: () => DeviceApprovalService,
|
|
92
93
|
DataInsightsService: () => DataInsightsService,
|
|
93
94
|
AutoGeneratedIdDecorator: () => AutoGeneratedIdDecorator,
|
|
94
95
|
AuthType: () => AuthType,
|
|
@@ -733,6 +734,16 @@ class IamUserService extends import_core8.CrudServiceProxy {
|
|
|
733
734
|
return this.serviceProxy.invoke("findFirstByEmailInScopeType", [email, authScopeType]);
|
|
734
735
|
}
|
|
735
736
|
}
|
|
737
|
+
// packages/os-api/src/api/services/IDeviceApprovalService.ts
|
|
738
|
+
class DeviceApprovalService {
|
|
739
|
+
serviceProxy;
|
|
740
|
+
constructor(kinotic) {
|
|
741
|
+
this.serviceProxy = kinotic.serviceProxy("org.kinotic.os.api.services.iam.DeviceApprovalService");
|
|
742
|
+
}
|
|
743
|
+
approve(userCode) {
|
|
744
|
+
return this.serviceProxy.invoke("approve", [userCode]);
|
|
745
|
+
}
|
|
746
|
+
}
|
|
736
747
|
// packages/os-api/src/api/services/IGitHubAppInstallationService.ts
|
|
737
748
|
var import_core9 = require("@kinotic-ai/core");
|
|
738
749
|
|
|
@@ -765,6 +776,7 @@ var OsApiPlugin = {
|
|
|
765
776
|
vmNodes: new VmNodeServiceProxy(kinotic),
|
|
766
777
|
workloads: new WorkloadServiceProxy(kinotic),
|
|
767
778
|
iamUsers: new IamUserService(kinotic),
|
|
779
|
+
deviceApproval: new DeviceApprovalService(kinotic),
|
|
768
780
|
githubAppInstallations: new GitHubAppInstallationService(kinotic)
|
|
769
781
|
};
|
|
770
782
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -1072,7 +1072,25 @@ declare class IamUserService extends CrudServiceProxy8<IamUser> implements IIamU
|
|
|
1072
1072
|
resetPassword(userId: string, newPassword: string): Promise<void>;
|
|
1073
1073
|
findFirstByEmailInScopeType(email: string, authScopeType: string): Promise<IamUser | null>;
|
|
1074
1074
|
}
|
|
1075
|
-
import {
|
|
1075
|
+
import { IKinotic as IKinotic12 } from "@kinotic-ai/core";
|
|
1076
|
+
/**
|
|
1077
|
+
* Browser-invoked service for the RFC 8628 device-authorization approve step. The signed-in
|
|
1078
|
+
* browser user calls {@link approve} with the user_code shown in their CLI; the gateway
|
|
1079
|
+
* binds the pending grant to the calling participant.
|
|
1080
|
+
*/
|
|
1081
|
+
interface IDeviceApprovalService {
|
|
1082
|
+
/**
|
|
1083
|
+
* Binds the calling user to the pending device-authorization grant identified by
|
|
1084
|
+
* {@code userCode}. Rejects when the code is unknown, already approved, or expired.
|
|
1085
|
+
*/
|
|
1086
|
+
approve(userCode: string): Promise<void>;
|
|
1087
|
+
}
|
|
1088
|
+
declare class DeviceApprovalService implements IDeviceApprovalService {
|
|
1089
|
+
private readonly serviceProxy;
|
|
1090
|
+
constructor(kinotic: IKinotic12);
|
|
1091
|
+
approve(userCode: string): Promise<void>;
|
|
1092
|
+
}
|
|
1093
|
+
import { CrudServiceProxy as CrudServiceProxy9, IKinotic as IKinotic13, ICrudServiceProxy as ICrudServiceProxy9 } from "@kinotic-ai/core";
|
|
1076
1094
|
interface IGitHubAppInstallationService extends ICrudServiceProxy9<GitHubAppInstallation> {
|
|
1077
1095
|
/**
|
|
1078
1096
|
* Stages a single-use state token bound to the caller's organization plus the
|
|
@@ -1099,7 +1117,7 @@ interface IGitHubAppInstallationService extends ICrudServiceProxy9<GitHubAppInst
|
|
|
1099
1117
|
findForCurrentOrg(): Promise<GitHubAppInstallation | null>;
|
|
1100
1118
|
}
|
|
1101
1119
|
declare class GitHubAppInstallationService extends CrudServiceProxy9<GitHubAppInstallation> implements IGitHubAppInstallationService {
|
|
1102
|
-
constructor(kinotic:
|
|
1120
|
+
constructor(kinotic: IKinotic13);
|
|
1103
1121
|
startInstall(returnTo: string | null): Promise<string>;
|
|
1104
1122
|
completeInstall(installationId: number, state: string): Promise<GitHubInstallCompletion>;
|
|
1105
1123
|
findForCurrentOrg(): Promise<GitHubAppInstallation | null>;
|
|
@@ -1117,10 +1135,11 @@ interface IOsApiExtension {
|
|
|
1117
1135
|
vmNodes: IVmNodeService;
|
|
1118
1136
|
workloads: IWorkloadService;
|
|
1119
1137
|
iamUsers: IIamUserService;
|
|
1138
|
+
deviceApproval: IDeviceApprovalService;
|
|
1120
1139
|
githubAppInstallations: IGitHubAppInstallationService;
|
|
1121
1140
|
}
|
|
1122
1141
|
declare const OsApiPlugin: KinoticPlugin<IOsApiExtension>;
|
|
1123
1142
|
declare module "@kinotic-ai/core" {
|
|
1124
1143
|
interface KinoticSingleton extends IOsApiExtension {}
|
|
1125
1144
|
}
|
|
1126
|
-
export { WorkloadStatus, WorkloadServiceProxy, Workload, VmProviderType, VmNodeStatus, VmNodeServiceProxy, VmNode, VersionDecorator, TimeReferenceDecorator, TextDecorator, TenantSelectionC3Type, TenantIdDecorator, SingleLoggerLevelsDescriptor, SignUpRequest, SignUpCompleteRequest, QueryOptionsC3Type, QueryDecorator, ProjectType, ProjectService, Project, ProgressType, PageableC3Type, PageC3Type, OsApiPlugin, OrganizationService, Organization, NotIndexedDecorator, NestedDecorator, NamedQueriesDefinitionService, NamedQueriesDefinition, MigrationService, MigrationResult, MigrationRequest, MigrationDefinition, LoggersDescriptor, LoggerLevelsDescriptor, LogManager, LogLevel, KinoticProjectConfig, InsightRequest, InsightProgress, IdDecorator, IamUserService, IamUser, IWorkloadService, IVmNodeService, IProjectService, IOsApiExtension, IOrganizationService, INamedQueriesDefinitionService, IMigrationService, ILogManager, IIamUserService, IGitHubAppInstallationService, IEntityDefinitionService, IDataInsightsService, IApplicationService, GroupLoggerLevelsDescriptor, GitHubToken, GitHubRepoToken, GitHubInstallCompletion, GitHubAppInstallationService, GitHubAppInstallation, FlattenedDecorator, EsIndexConfigurationDecorator, EntityDefinitionService, EntityDefinition, EntityDecorator, EntitiesPathConfig, DiscriminatorDecorator, DataInsightsService, DataInsightsComponent, AutoGeneratedIdDecorator, AuthType, ApplicationService, Application };
|
|
1145
|
+
export { WorkloadStatus, WorkloadServiceProxy, Workload, VmProviderType, VmNodeStatus, VmNodeServiceProxy, VmNode, VersionDecorator, TimeReferenceDecorator, TextDecorator, TenantSelectionC3Type, TenantIdDecorator, SingleLoggerLevelsDescriptor, SignUpRequest, SignUpCompleteRequest, QueryOptionsC3Type, QueryDecorator, ProjectType, ProjectService, Project, ProgressType, PageableC3Type, PageC3Type, OsApiPlugin, OrganizationService, Organization, NotIndexedDecorator, NestedDecorator, NamedQueriesDefinitionService, NamedQueriesDefinition, MigrationService, MigrationResult, MigrationRequest, MigrationDefinition, LoggersDescriptor, LoggerLevelsDescriptor, LogManager, LogLevel, KinoticProjectConfig, InsightRequest, InsightProgress, IdDecorator, IamUserService, IamUser, IWorkloadService, IVmNodeService, IProjectService, IOsApiExtension, IOrganizationService, INamedQueriesDefinitionService, IMigrationService, ILogManager, IIamUserService, IGitHubAppInstallationService, IEntityDefinitionService, IDeviceApprovalService, IDataInsightsService, IApplicationService, GroupLoggerLevelsDescriptor, GitHubToken, GitHubRepoToken, GitHubInstallCompletion, GitHubAppInstallationService, GitHubAppInstallation, FlattenedDecorator, EsIndexConfigurationDecorator, EntityDefinitionService, EntityDefinition, EntityDecorator, EntitiesPathConfig, DiscriminatorDecorator, DeviceApprovalService, DataInsightsService, DataInsightsComponent, AutoGeneratedIdDecorator, AuthType, ApplicationService, Application };
|
package/dist/index.d.ts
CHANGED
|
@@ -1072,7 +1072,25 @@ declare class IamUserService extends CrudServiceProxy8<IamUser> implements IIamU
|
|
|
1072
1072
|
resetPassword(userId: string, newPassword: string): Promise<void>;
|
|
1073
1073
|
findFirstByEmailInScopeType(email: string, authScopeType: string): Promise<IamUser | null>;
|
|
1074
1074
|
}
|
|
1075
|
-
import {
|
|
1075
|
+
import { IKinotic as IKinotic12 } from "@kinotic-ai/core";
|
|
1076
|
+
/**
|
|
1077
|
+
* Browser-invoked service for the RFC 8628 device-authorization approve step. The signed-in
|
|
1078
|
+
* browser user calls {@link approve} with the user_code shown in their CLI; the gateway
|
|
1079
|
+
* binds the pending grant to the calling participant.
|
|
1080
|
+
*/
|
|
1081
|
+
interface IDeviceApprovalService {
|
|
1082
|
+
/**
|
|
1083
|
+
* Binds the calling user to the pending device-authorization grant identified by
|
|
1084
|
+
* {@code userCode}. Rejects when the code is unknown, already approved, or expired.
|
|
1085
|
+
*/
|
|
1086
|
+
approve(userCode: string): Promise<void>;
|
|
1087
|
+
}
|
|
1088
|
+
declare class DeviceApprovalService implements IDeviceApprovalService {
|
|
1089
|
+
private readonly serviceProxy;
|
|
1090
|
+
constructor(kinotic: IKinotic12);
|
|
1091
|
+
approve(userCode: string): Promise<void>;
|
|
1092
|
+
}
|
|
1093
|
+
import { CrudServiceProxy as CrudServiceProxy9, IKinotic as IKinotic13, ICrudServiceProxy as ICrudServiceProxy9 } from "@kinotic-ai/core";
|
|
1076
1094
|
interface IGitHubAppInstallationService extends ICrudServiceProxy9<GitHubAppInstallation> {
|
|
1077
1095
|
/**
|
|
1078
1096
|
* Stages a single-use state token bound to the caller's organization plus the
|
|
@@ -1099,7 +1117,7 @@ interface IGitHubAppInstallationService extends ICrudServiceProxy9<GitHubAppInst
|
|
|
1099
1117
|
findForCurrentOrg(): Promise<GitHubAppInstallation | null>;
|
|
1100
1118
|
}
|
|
1101
1119
|
declare class GitHubAppInstallationService extends CrudServiceProxy9<GitHubAppInstallation> implements IGitHubAppInstallationService {
|
|
1102
|
-
constructor(kinotic:
|
|
1120
|
+
constructor(kinotic: IKinotic13);
|
|
1103
1121
|
startInstall(returnTo: string | null): Promise<string>;
|
|
1104
1122
|
completeInstall(installationId: number, state: string): Promise<GitHubInstallCompletion>;
|
|
1105
1123
|
findForCurrentOrg(): Promise<GitHubAppInstallation | null>;
|
|
@@ -1117,10 +1135,11 @@ interface IOsApiExtension {
|
|
|
1117
1135
|
vmNodes: IVmNodeService;
|
|
1118
1136
|
workloads: IWorkloadService;
|
|
1119
1137
|
iamUsers: IIamUserService;
|
|
1138
|
+
deviceApproval: IDeviceApprovalService;
|
|
1120
1139
|
githubAppInstallations: IGitHubAppInstallationService;
|
|
1121
1140
|
}
|
|
1122
1141
|
declare const OsApiPlugin: KinoticPlugin<IOsApiExtension>;
|
|
1123
1142
|
declare module "@kinotic-ai/core" {
|
|
1124
1143
|
interface KinoticSingleton extends IOsApiExtension {}
|
|
1125
1144
|
}
|
|
1126
|
-
export { WorkloadStatus, WorkloadServiceProxy, Workload, VmProviderType, VmNodeStatus, VmNodeServiceProxy, VmNode, VersionDecorator, TimeReferenceDecorator, TextDecorator, TenantSelectionC3Type, TenantIdDecorator, SingleLoggerLevelsDescriptor, SignUpRequest, SignUpCompleteRequest, QueryOptionsC3Type, QueryDecorator, ProjectType, ProjectService, Project, ProgressType, PageableC3Type, PageC3Type, OsApiPlugin, OrganizationService, Organization, NotIndexedDecorator, NestedDecorator, NamedQueriesDefinitionService, NamedQueriesDefinition, MigrationService, MigrationResult, MigrationRequest, MigrationDefinition, LoggersDescriptor, LoggerLevelsDescriptor, LogManager, LogLevel, KinoticProjectConfig, InsightRequest, InsightProgress, IdDecorator, IamUserService, IamUser, IWorkloadService, IVmNodeService, IProjectService, IOsApiExtension, IOrganizationService, INamedQueriesDefinitionService, IMigrationService, ILogManager, IIamUserService, IGitHubAppInstallationService, IEntityDefinitionService, IDataInsightsService, IApplicationService, GroupLoggerLevelsDescriptor, GitHubToken, GitHubRepoToken, GitHubInstallCompletion, GitHubAppInstallationService, GitHubAppInstallation, FlattenedDecorator, EsIndexConfigurationDecorator, EntityDefinitionService, EntityDefinition, EntityDecorator, EntitiesPathConfig, DiscriminatorDecorator, DataInsightsService, DataInsightsComponent, AutoGeneratedIdDecorator, AuthType, ApplicationService, Application };
|
|
1145
|
+
export { WorkloadStatus, WorkloadServiceProxy, Workload, VmProviderType, VmNodeStatus, VmNodeServiceProxy, VmNode, VersionDecorator, TimeReferenceDecorator, TextDecorator, TenantSelectionC3Type, TenantIdDecorator, SingleLoggerLevelsDescriptor, SignUpRequest, SignUpCompleteRequest, QueryOptionsC3Type, QueryDecorator, ProjectType, ProjectService, Project, ProgressType, PageableC3Type, PageC3Type, OsApiPlugin, OrganizationService, Organization, NotIndexedDecorator, NestedDecorator, NamedQueriesDefinitionService, NamedQueriesDefinition, MigrationService, MigrationResult, MigrationRequest, MigrationDefinition, LoggersDescriptor, LoggerLevelsDescriptor, LogManager, LogLevel, KinoticProjectConfig, InsightRequest, InsightProgress, IdDecorator, IamUserService, IamUser, IWorkloadService, IVmNodeService, IProjectService, IOsApiExtension, IOrganizationService, INamedQueriesDefinitionService, IMigrationService, ILogManager, IIamUserService, IGitHubAppInstallationService, IEntityDefinitionService, IDeviceApprovalService, IDataInsightsService, IApplicationService, GroupLoggerLevelsDescriptor, GitHubToken, GitHubRepoToken, GitHubInstallCompletion, GitHubAppInstallationService, GitHubAppInstallation, FlattenedDecorator, EsIndexConfigurationDecorator, EntityDefinitionService, EntityDefinition, EntityDecorator, EntitiesPathConfig, DiscriminatorDecorator, DeviceApprovalService, DataInsightsService, DataInsightsComponent, AutoGeneratedIdDecorator, AuthType, ApplicationService, Application };
|
package/dist/index.js
CHANGED
|
@@ -634,6 +634,16 @@ class IamUserService extends CrudServiceProxy8 {
|
|
|
634
634
|
return this.serviceProxy.invoke("findFirstByEmailInScopeType", [email, authScopeType]);
|
|
635
635
|
}
|
|
636
636
|
}
|
|
637
|
+
// packages/os-api/src/api/services/IDeviceApprovalService.ts
|
|
638
|
+
class DeviceApprovalService {
|
|
639
|
+
serviceProxy;
|
|
640
|
+
constructor(kinotic) {
|
|
641
|
+
this.serviceProxy = kinotic.serviceProxy("org.kinotic.os.api.services.iam.DeviceApprovalService");
|
|
642
|
+
}
|
|
643
|
+
approve(userCode) {
|
|
644
|
+
return this.serviceProxy.invoke("approve", [userCode]);
|
|
645
|
+
}
|
|
646
|
+
}
|
|
637
647
|
// packages/os-api/src/api/services/IGitHubAppInstallationService.ts
|
|
638
648
|
import { CrudServiceProxy as CrudServiceProxy9 } from "@kinotic-ai/core";
|
|
639
649
|
|
|
@@ -666,6 +676,7 @@ var OsApiPlugin = {
|
|
|
666
676
|
vmNodes: new VmNodeServiceProxy(kinotic),
|
|
667
677
|
workloads: new WorkloadServiceProxy(kinotic),
|
|
668
678
|
iamUsers: new IamUserService(kinotic),
|
|
679
|
+
deviceApproval: new DeviceApprovalService(kinotic),
|
|
669
680
|
githubAppInstallations: new GitHubAppInstallationService(kinotic)
|
|
670
681
|
};
|
|
671
682
|
}
|
|
@@ -720,6 +731,7 @@ export {
|
|
|
720
731
|
EntityDefinition,
|
|
721
732
|
EntityDecorator,
|
|
722
733
|
DiscriminatorDecorator,
|
|
734
|
+
DeviceApprovalService,
|
|
723
735
|
DataInsightsService,
|
|
724
736
|
AutoGeneratedIdDecorator,
|
|
725
737
|
AuthType,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kinotic-ai/os-api",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"rxjs": "^7.8.2"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@kinotic-ai/core": "1.
|
|
44
|
+
"@kinotic-ai/core": "1.3.1",
|
|
45
45
|
"@types/node": "^25.3.2",
|
|
46
46
|
"@vitest/coverage-v8": "^4.0.18",
|
|
47
47
|
"@vitest/runner": "^4.0.18",
|