@kinotic-ai/os-api 1.5.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -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,
@@ -348,8 +349,9 @@ class NamedQueriesDefinition {
348
349
  projectId;
349
350
  entityDefinitionName;
350
351
  namedQueries;
351
- constructor(id, applicationId, projectId, entityDefinitionName, namedQueries) {
352
+ constructor(organizationId, id, applicationId, projectId, entityDefinitionName, namedQueries) {
352
353
  this.id = id;
354
+ this.organizationId = organizationId;
353
355
  this.applicationId = applicationId;
354
356
  this.projectId = projectId;
355
357
  this.entityDefinitionName = entityDefinitionName;
@@ -733,6 +735,16 @@ class IamUserService extends import_core8.CrudServiceProxy {
733
735
  return this.serviceProxy.invoke("findFirstByEmailInScopeType", [email, authScopeType]);
734
736
  }
735
737
  }
738
+ // packages/os-api/src/api/services/IDeviceApprovalService.ts
739
+ class DeviceApprovalService {
740
+ serviceProxy;
741
+ constructor(kinotic) {
742
+ this.serviceProxy = kinotic.serviceProxy("org.kinotic.os.api.services.iam.DeviceApprovalService");
743
+ }
744
+ approve(userCode) {
745
+ return this.serviceProxy.invoke("approve", [userCode]);
746
+ }
747
+ }
736
748
  // packages/os-api/src/api/services/IGitHubAppInstallationService.ts
737
749
  var import_core9 = require("@kinotic-ai/core");
738
750
 
@@ -765,6 +777,7 @@ var OsApiPlugin = {
765
777
  vmNodes: new VmNodeServiceProxy(kinotic),
766
778
  workloads: new WorkloadServiceProxy(kinotic),
767
779
  iamUsers: new IamUserService(kinotic),
780
+ deviceApproval: new DeviceApprovalService(kinotic),
768
781
  githubAppInstallations: new GitHubAppInstallationService(kinotic)
769
782
  };
770
783
  }
package/dist/index.d.cts CHANGED
@@ -256,12 +256,12 @@ import { FunctionDefinition } from "@kinotic-ai/idl";
256
256
  */
257
257
  declare class NamedQueriesDefinition implements Identifiable5<string> {
258
258
  id: string;
259
- organizationId?: string | null;
259
+ organizationId: string;
260
260
  applicationId: string;
261
261
  projectId: string;
262
262
  entityDefinitionName: string;
263
263
  namedQueries: FunctionDefinition[];
264
- constructor(id: string, applicationId: string, projectId: string, entityDefinitionName: string, namedQueries: FunctionDefinition[]);
264
+ constructor(organizationId: string, id: string, applicationId: string, projectId: string, entityDefinitionName: string, namedQueries: FunctionDefinition[]);
265
265
  }
266
266
  /**
267
267
  * Represents a migration definition that can be sent via the API.
@@ -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 { CrudServiceProxy as CrudServiceProxy9, IKinotic as IKinotic12, ICrudServiceProxy as ICrudServiceProxy9 } from "@kinotic-ai/core";
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: IKinotic12);
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
@@ -256,12 +256,12 @@ import { FunctionDefinition } from "@kinotic-ai/idl";
256
256
  */
257
257
  declare class NamedQueriesDefinition implements Identifiable5<string> {
258
258
  id: string;
259
- organizationId?: string | null;
259
+ organizationId: string;
260
260
  applicationId: string;
261
261
  projectId: string;
262
262
  entityDefinitionName: string;
263
263
  namedQueries: FunctionDefinition[];
264
- constructor(id: string, applicationId: string, projectId: string, entityDefinitionName: string, namedQueries: FunctionDefinition[]);
264
+ constructor(organizationId: string, id: string, applicationId: string, projectId: string, entityDefinitionName: string, namedQueries: FunctionDefinition[]);
265
265
  }
266
266
  /**
267
267
  * Represents a migration definition that can be sent via the API.
@@ -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 { CrudServiceProxy as CrudServiceProxy9, IKinotic as IKinotic12, ICrudServiceProxy as ICrudServiceProxy9 } from "@kinotic-ai/core";
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: IKinotic12);
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
@@ -249,8 +249,9 @@ class NamedQueriesDefinition {
249
249
  projectId;
250
250
  entityDefinitionName;
251
251
  namedQueries;
252
- constructor(id, applicationId, projectId, entityDefinitionName, namedQueries) {
252
+ constructor(organizationId, id, applicationId, projectId, entityDefinitionName, namedQueries) {
253
253
  this.id = id;
254
+ this.organizationId = organizationId;
254
255
  this.applicationId = applicationId;
255
256
  this.projectId = projectId;
256
257
  this.entityDefinitionName = entityDefinitionName;
@@ -634,6 +635,16 @@ class IamUserService extends CrudServiceProxy8 {
634
635
  return this.serviceProxy.invoke("findFirstByEmailInScopeType", [email, authScopeType]);
635
636
  }
636
637
  }
638
+ // packages/os-api/src/api/services/IDeviceApprovalService.ts
639
+ class DeviceApprovalService {
640
+ serviceProxy;
641
+ constructor(kinotic) {
642
+ this.serviceProxy = kinotic.serviceProxy("org.kinotic.os.api.services.iam.DeviceApprovalService");
643
+ }
644
+ approve(userCode) {
645
+ return this.serviceProxy.invoke("approve", [userCode]);
646
+ }
647
+ }
637
648
  // packages/os-api/src/api/services/IGitHubAppInstallationService.ts
638
649
  import { CrudServiceProxy as CrudServiceProxy9 } from "@kinotic-ai/core";
639
650
 
@@ -666,6 +677,7 @@ var OsApiPlugin = {
666
677
  vmNodes: new VmNodeServiceProxy(kinotic),
667
678
  workloads: new WorkloadServiceProxy(kinotic),
668
679
  iamUsers: new IamUserService(kinotic),
680
+ deviceApproval: new DeviceApprovalService(kinotic),
669
681
  githubAppInstallations: new GitHubAppInstallationService(kinotic)
670
682
  };
671
683
  }
@@ -720,6 +732,7 @@ export {
720
732
  EntityDefinition,
721
733
  EntityDecorator,
722
734
  DiscriminatorDecorator,
735
+ DeviceApprovalService,
723
736
  DataInsightsService,
724
737
  AutoGeneratedIdDecorator,
725
738
  AuthType,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kinotic-ai/os-api",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
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.2.2",
44
+ "@kinotic-ai/core": "1.4.0",
45
45
  "@types/node": "^25.3.2",
46
46
  "@vitest/coverage-v8": "^4.0.18",
47
47
  "@vitest/runner": "^4.0.18",