@kinotic-ai/os-api 1.13.0 → 1.14.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 +16 -0
- package/dist/index.d.cts +16 -1
- package/dist/index.d.ts +16 -1
- package/dist/index.js +16 -0
- package/package.json +7 -12
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.
|
|
3
|
+
"version": "1.14.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -28,27 +28,22 @@
|
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
30
30
|
"type-check": "tsc --noEmit",
|
|
31
|
-
"test": "
|
|
32
|
-
"coverage": "
|
|
33
|
-
"ui-test": "vitest --ui --coverage.enabled=true --mode development"
|
|
31
|
+
"test": "bun test --pass-with-no-tests",
|
|
32
|
+
"coverage": "bun test --coverage --pass-with-no-tests"
|
|
34
33
|
},
|
|
35
34
|
"peerDependencies": {
|
|
36
|
-
"@kinotic-ai/core": ">=1.
|
|
35
|
+
"@kinotic-ai/core": ">=1.9.0"
|
|
37
36
|
},
|
|
38
37
|
"dependencies": {
|
|
39
38
|
"@kinotic-ai/idl": "1.0.9",
|
|
40
|
-
"@kinotic-ai/persistence": "1.5.
|
|
39
|
+
"@kinotic-ai/persistence": "1.5.1",
|
|
41
40
|
"rxjs": "^7.8.2"
|
|
42
41
|
},
|
|
43
42
|
"devDependencies": {
|
|
44
|
-
"@kinotic-ai/core": "1.
|
|
43
|
+
"@kinotic-ai/core": "1.9.0",
|
|
45
44
|
"@types/node": "^25.3.2",
|
|
46
|
-
"@vitest/coverage-v8": "^4.0.18",
|
|
47
|
-
"@vitest/runner": "^4.0.18",
|
|
48
|
-
"@vitest/ui": "^4.0.18",
|
|
49
45
|
"tslib": "^2.8.1",
|
|
50
|
-
"typescript": "^5.9.3"
|
|
51
|
-
"vitest": "^4.0.18"
|
|
46
|
+
"typescript": "^5.9.3"
|
|
52
47
|
},
|
|
53
48
|
"peerDependenciesMeta": {
|
|
54
49
|
"typescript": {
|