@kinotic-ai/os-api 1.12.0 → 1.14.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
@@ -82,6 +82,7 @@ __export(exports_src, {
82
82
  LogManager: () => LogManager,
83
83
  LogLevel: () => LogLevel,
84
84
  KinoticProjectConfig: () => KinoticProjectConfig,
85
+ KinoticOsCredentialsAuthProvider: () => KinoticOsCredentialsAuthProvider,
85
86
  InviteEmailTemplateService: () => InviteEmailTemplateService,
86
87
  InviteEmailTemplate: () => InviteEmailTemplate,
87
88
  IdDecorator: () => IdDecorator,
@@ -561,6 +562,21 @@ function isOrganizationParticipant(participant) {
561
562
  function isApplicationParticipant(participant) {
562
563
  return scopeType(participant) === "application" /* APPLICATION */;
563
564
  }
565
+ // packages/os-api/src/api/security/KinoticOsCredentialsAuthProvider.ts
566
+ class KinoticOsCredentialsAuthProvider {
567
+ authHeaders;
568
+ constructor(clientId, clientSecret, organizationId, applicationId) {
569
+ const authHeaders = { clientId, clientSecret };
570
+ if (organizationId != null)
571
+ authHeaders.organizationId = organizationId;
572
+ if (applicationId != null)
573
+ authHeaders.applicationId = applicationId;
574
+ this.authHeaders = authHeaders;
575
+ }
576
+ getAuthHeaders() {
577
+ return this.authHeaders;
578
+ }
579
+ }
564
580
  // packages/os-api/src/api/services/IApplicationService.ts
565
581
  var import_core = require("@kinotic-ai/core");
566
582
 
package/dist/index.d.cts CHANGED
@@ -879,6 +879,21 @@ declare function isOrganizationParticipant(participant: IParticipant4): particip
879
879
  * @return true if the participant authenticated against an Application
880
880
  */
881
881
  declare function isApplicationParticipant(participant: IParticipant4): participant is IApplicationParticipant;
882
+ import { IAuthProvider } from "@kinotic-ai/core";
883
+ /**
884
+ * {@link IAuthProvider} for Kinotic OS credential authentication. Sends the credential and
885
+ * scope as discrete WebSocket upgrade headers — {@code clientId}, {@code clientSecret}, and,
886
+ * when supplied, {@code organizationId} / {@code applicationId} — which the gateway matches
887
+ * against an {@code IamUser} at handshake time.
888
+ *
889
+ * Scope is structural, determined by which ids are given: neither → SYSTEM, organizationId
890
+ * only → ORGANIZATION, both → APPLICATION.
891
+ */
892
+ declare class KinoticOsCredentialsAuthProvider implements IAuthProvider {
893
+ private readonly authHeaders;
894
+ constructor(clientId: string, clientSecret: string, organizationId?: string, applicationId?: string);
895
+ getAuthHeaders(): Record<string, string>;
896
+ }
882
897
  import { IKinotic } from "@kinotic-ai/core";
883
898
  import { CrudServiceProxy, ICrudServiceProxy } from "@kinotic-ai/core";
884
899
  interface IApplicationService extends ICrudServiceProxy<Application> {
@@ -1346,4 +1361,4 @@ declare const OsApiPlugin: KinoticPlugin<IOsApiExtension>;
1346
1361
  declare module "@kinotic-ai/core" {
1347
1362
  interface KinoticSingleton extends IOsApiExtension {}
1348
1363
  }
1349
- 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, 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 };
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 };
package/dist/index.d.ts CHANGED
@@ -879,6 +879,21 @@ declare function isOrganizationParticipant(participant: IParticipant4): particip
879
879
  * @return true if the participant authenticated against an Application
880
880
  */
881
881
  declare function isApplicationParticipant(participant: IParticipant4): participant is IApplicationParticipant;
882
+ import { IAuthProvider } from "@kinotic-ai/core";
883
+ /**
884
+ * {@link IAuthProvider} for Kinotic OS credential authentication. Sends the credential and
885
+ * scope as discrete WebSocket upgrade headers — {@code clientId}, {@code clientSecret}, and,
886
+ * when supplied, {@code organizationId} / {@code applicationId} — which the gateway matches
887
+ * against an {@code IamUser} at handshake time.
888
+ *
889
+ * Scope is structural, determined by which ids are given: neither → SYSTEM, organizationId
890
+ * only → ORGANIZATION, both → APPLICATION.
891
+ */
892
+ declare class KinoticOsCredentialsAuthProvider implements IAuthProvider {
893
+ private readonly authHeaders;
894
+ constructor(clientId: string, clientSecret: string, organizationId?: string, applicationId?: string);
895
+ getAuthHeaders(): Record<string, string>;
896
+ }
882
897
  import { IKinotic } from "@kinotic-ai/core";
883
898
  import { CrudServiceProxy, ICrudServiceProxy } from "@kinotic-ai/core";
884
899
  interface IApplicationService extends ICrudServiceProxy<Application> {
@@ -1346,4 +1361,4 @@ declare const OsApiPlugin: KinoticPlugin<IOsApiExtension>;
1346
1361
  declare module "@kinotic-ai/core" {
1347
1362
  interface KinoticSingleton extends IOsApiExtension {}
1348
1363
  }
1349
- 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, 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 };
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 };
package/dist/index.js CHANGED
@@ -452,6 +452,21 @@ function isOrganizationParticipant(participant) {
452
452
  function isApplicationParticipant(participant) {
453
453
  return scopeType(participant) === "application" /* APPLICATION */;
454
454
  }
455
+ // packages/os-api/src/api/security/KinoticOsCredentialsAuthProvider.ts
456
+ class KinoticOsCredentialsAuthProvider {
457
+ authHeaders;
458
+ constructor(clientId, clientSecret, organizationId, applicationId) {
459
+ const authHeaders = { clientId, clientSecret };
460
+ if (organizationId != null)
461
+ authHeaders.organizationId = organizationId;
462
+ if (applicationId != null)
463
+ authHeaders.applicationId = applicationId;
464
+ this.authHeaders = authHeaders;
465
+ }
466
+ getAuthHeaders() {
467
+ return this.authHeaders;
468
+ }
469
+ }
455
470
  // packages/os-api/src/api/services/IApplicationService.ts
456
471
  import { CrudServiceProxy } from "@kinotic-ai/core";
457
472
 
@@ -814,6 +829,7 @@ export {
814
829
  LogManager,
815
830
  LogLevel,
816
831
  KinoticProjectConfig,
832
+ KinoticOsCredentialsAuthProvider,
817
833
  InviteEmailTemplateService,
818
834
  InviteEmailTemplate,
819
835
  IdDecorator,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kinotic-ai/os-api",
3
- "version": "1.12.0",
3
+ "version": "1.14.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -33,15 +33,15 @@
33
33
  "ui-test": "vitest --ui --coverage.enabled=true --mode development"
34
34
  },
35
35
  "peerDependencies": {
36
- "@kinotic-ai/core": ">=1.7.0"
36
+ "@kinotic-ai/core": ">=1.8.0"
37
37
  },
38
38
  "dependencies": {
39
39
  "@kinotic-ai/idl": "1.0.9",
40
- "@kinotic-ai/persistence": "1.4.0",
40
+ "@kinotic-ai/persistence": "1.5.0",
41
41
  "rxjs": "^7.8.2"
42
42
  },
43
43
  "devDependencies": {
44
- "@kinotic-ai/core": "1.7.0",
44
+ "@kinotic-ai/core": "1.8.0",
45
45
  "@types/node": "^25.3.2",
46
46
  "@vitest/coverage-v8": "^4.0.18",
47
47
  "@vitest/runner": "^4.0.18",