@kinotic-ai/os-api 1.8.0 → 1.10.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
@@ -62,6 +62,7 @@ __export(exports_src, {
62
62
  ProjectService: () => ProjectService,
63
63
  Project: () => Project,
64
64
  ProgressType: () => ProgressType,
65
+ PendingInviteSummary: () => PendingInviteSummary,
65
66
  ParticipantType: () => ParticipantType,
66
67
  PageableC3Type: () => PageableC3Type,
67
68
  PageC3Type: () => PageC3Type,
@@ -73,13 +74,15 @@ __export(exports_src, {
73
74
  NamedQueriesDefinitionService: () => NamedQueriesDefinitionService,
74
75
  NamedQueriesDefinition: () => NamedQueriesDefinition,
75
76
  MigrationService: () => MigrationService,
77
+ MemberService: () => MemberService,
76
78
  LoggersDescriptor: () => LoggersDescriptor,
77
79
  LoggerLevelsDescriptor: () => LoggerLevelsDescriptor,
78
80
  LogManager: () => LogManager,
79
81
  LogLevel: () => LogLevel,
80
82
  KinoticProjectConfig: () => KinoticProjectConfig,
83
+ InviteEmailTemplateService: () => InviteEmailTemplateService,
84
+ InviteEmailTemplate: () => InviteEmailTemplate,
81
85
  IdDecorator: () => IdDecorator,
82
- IamUserService: () => IamUserService,
83
86
  IamUser: () => IamUser,
84
87
  GroupLoggerLevelsDescriptor: () => GroupLoggerLevelsDescriptor,
85
88
  GitHubToken: () => GitHubToken,
@@ -282,6 +285,7 @@ class Application {
282
285
  id;
283
286
  organizationId;
284
287
  description;
288
+ tenantPerUser = false;
285
289
  updated = null;
286
290
  constructor(id, description) {
287
291
  this.id = id;
@@ -460,6 +464,27 @@ class IamUser {
460
464
  created = null;
461
465
  updated = null;
462
466
  }
467
+ // packages/os-api/src/api/model/iam/PendingInviteSummary.ts
468
+ class PendingInviteSummary {
469
+ id = null;
470
+ email = "";
471
+ displayName = null;
472
+ applicationId = null;
473
+ invitedByName = null;
474
+ created = null;
475
+ expiresAt = null;
476
+ }
477
+ // packages/os-api/src/api/model/InviteEmailTemplate.ts
478
+ class InviteEmailTemplate {
479
+ id = null;
480
+ organizationId = null;
481
+ applicationId = "";
482
+ subject = "";
483
+ htmlBody = "";
484
+ textBody = "";
485
+ created = null;
486
+ updated = null;
487
+ }
463
488
  // packages/os-api/src/api/model/github/GitHubAppInstallation.ts
464
489
  class GitHubAppInstallation {
465
490
  id = null;
@@ -512,8 +537,7 @@ function isSystemParticipant(participant) {
512
537
  return scopeType(participant) === "system" /* SYSTEM */;
513
538
  }
514
539
  function isOrganizationParticipant(participant) {
515
- const type = scopeType(participant);
516
- return type === "organization" /* ORGANIZATION */ || type === "application" /* APPLICATION */;
540
+ return scopeType(participant) === "organization" /* ORGANIZATION */;
517
541
  }
518
542
  function isApplicationParticipant(participant) {
519
543
  return scopeType(participant) === "application" /* APPLICATION */;
@@ -734,27 +758,54 @@ class WorkloadServiceProxy extends import_core7.CrudServiceProxy {
734
758
  return this.serviceProxy.invoke("syncIndex", []);
735
759
  }
736
760
  }
737
- // packages/os-api/src/api/services/IIamUserService.ts
761
+ // packages/os-api/src/api/services/IMemberService.ts
738
762
  var import_core8 = require("@kinotic-ai/core");
739
763
 
740
- class IamUserService extends import_core8.CrudServiceProxy {
764
+ class MemberService {
765
+ serviceProxy;
741
766
  constructor(kinotic) {
742
- super(kinotic.serviceProxy("org.kinotic.domain.api.services.iam.IamUserService"));
767
+ this.serviceProxy = kinotic.serviceProxy("org.kinotic.os.api.services.iam.MemberService");
743
768
  }
744
- findByEmail(email, organizationId, applicationId) {
745
- return arguments.length >= 3 ? this.serviceProxy.invoke("findByEmail", [email, organizationId, applicationId]) : this.serviceProxy.invoke("findByEmail", [email]);
769
+ async findMembers(applicationId, pageable) {
770
+ const page = await this.serviceProxy.invoke("findMembers", [applicationId, pageable]);
771
+ return new import_core8.FunctionalIterablePage(pageable, page, (next) => this.serviceProxy.invoke("findMembers", [applicationId, next]));
746
772
  }
747
- findFirstOrgUserByEmail(email) {
748
- return this.serviceProxy.invoke("findFirstOrgUserByEmail", [email]);
773
+ async searchMembers(searchText, applicationId, pageable) {
774
+ const page = await this.serviceProxy.invoke("searchMembers", [searchText, applicationId, pageable]);
775
+ return new import_core8.FunctionalIterablePage(pageable, page, (next) => this.serviceProxy.invoke("searchMembers", [searchText, applicationId, next]));
749
776
  }
750
- findByOidcIdentity(oidcSubject, oidcConfigId, organizationId, applicationId) {
751
- return this.serviceProxy.invoke("findByOidcIdentity", [oidcSubject, oidcConfigId, organizationId, applicationId]);
777
+ inviteMember(email, displayName, applicationId) {
778
+ return this.serviceProxy.invoke("inviteMember", [email, displayName, applicationId]);
752
779
  }
753
- findAllByOidcIdentity(oidcSubject, oidcConfigId) {
754
- return this.serviceProxy.invoke("findAllByOidcIdentity", [oidcSubject, oidcConfigId]);
780
+ setMemberEnabled(userId, enabled) {
781
+ return this.serviceProxy.invoke("setMemberEnabled", [userId, enabled]);
755
782
  }
756
- createUser(user, password) {
757
- return this.serviceProxy.invoke("createUser", [user, password]);
783
+ removeMember(userId) {
784
+ return this.serviceProxy.invoke("removeMember", [userId]);
785
+ }
786
+ async findPendingInvites(applicationId, pageable) {
787
+ const page = await this.serviceProxy.invoke("findPendingInvites", [applicationId, pageable]);
788
+ return new import_core8.FunctionalIterablePage(pageable, page, (next) => this.serviceProxy.invoke("findPendingInvites", [applicationId, next]));
789
+ }
790
+ cancelInvite(inviteId) {
791
+ return this.serviceProxy.invoke("cancelInvite", [inviteId]);
792
+ }
793
+ memberDataSource(applicationId) {
794
+ return {
795
+ findAll: (pageable) => this.findMembers(applicationId, pageable),
796
+ search: (searchText, pageable) => this.searchMembers(searchText, applicationId, pageable)
797
+ };
798
+ }
799
+ }
800
+ // packages/os-api/src/api/services/IInviteEmailTemplateService.ts
801
+ var import_core9 = require("@kinotic-ai/core");
802
+
803
+ class InviteEmailTemplateService extends import_core9.CrudServiceProxy {
804
+ constructor(kinotic) {
805
+ super(kinotic.serviceProxy("org.kinotic.os.api.services.InviteEmailTemplateService"));
806
+ }
807
+ findByApplication(applicationId) {
808
+ return this.serviceProxy.invoke("findByApplication", [applicationId]);
758
809
  }
759
810
  }
760
811
  // packages/os-api/src/api/services/IDeviceApprovalService.ts
@@ -768,9 +819,9 @@ class DeviceApprovalService {
768
819
  }
769
820
  }
770
821
  // packages/os-api/src/api/services/IGitHubAppInstallationService.ts
771
- var import_core9 = require("@kinotic-ai/core");
822
+ var import_core10 = require("@kinotic-ai/core");
772
823
 
773
- class GitHubAppInstallationService extends import_core9.CrudServiceProxy {
824
+ class GitHubAppInstallationService extends import_core10.CrudServiceProxy {
774
825
  constructor(kinotic) {
775
826
  super(kinotic.serviceProxy("org.kinotic.github.api.services.GitHubAppInstallationService"));
776
827
  }
@@ -798,7 +849,8 @@ var OsApiPlugin = {
798
849
  dataInsights: new DataInsightsService(kinotic),
799
850
  vmNodes: new VmNodeServiceProxy(kinotic),
800
851
  workloads: new WorkloadServiceProxy(kinotic),
801
- iamUsers: new IamUserService(kinotic),
852
+ members: new MemberService(kinotic),
853
+ inviteEmailTemplates: new InviteEmailTemplateService(kinotic),
802
854
  deviceApproval: new DeviceApprovalService(kinotic),
803
855
  githubAppInstallations: new GitHubAppInstallationService(kinotic)
804
856
  };
package/dist/index.d.cts CHANGED
@@ -145,6 +145,12 @@ declare class Application implements Identifiable<string> {
145
145
  */
146
146
  organizationId: string;
147
147
  description: string;
148
+ /**
149
+ * When true, every APPLICATION-scope user created for this application receives an
150
+ * auto-generated unique tenantId, isolating each user's SHARED entity data in its own
151
+ * tenant. Applies only to users created after it is enabled.
152
+ */
153
+ tenantPerUser: boolean;
148
154
  updated: number | null;
149
155
  constructor(id: string, description: string);
150
156
  }
@@ -585,12 +591,52 @@ interface CompleteOrgRequest {
585
591
  }
586
592
  import { Identifiable as Identifiable9 } from "@kinotic-ai/core";
587
593
  /**
594
+ * View of a pending invitation for listing in the web app. Deliberately excludes the accept token — anyone who
595
+ * can list invitations must not be able to redeem them.
596
+ */
597
+ declare class PendingInviteSummary implements Identifiable9<string> {
598
+ id: string | null;
599
+ /** Email the invitation was sent to. */
600
+ email: string;
601
+ /** Display name the inviter entered, if any. */
602
+ displayName: string | null;
603
+ /** The application the invitee would join; null for an organization-member invite. */
604
+ applicationId: string | null;
605
+ /** Display name of the member who sent the invitation. */
606
+ invitedByName: string | null;
607
+ created: number | null;
608
+ /** When the invitation stops being acceptable. */
609
+ expiresAt: number | null;
610
+ }
611
+ import { Identifiable as Identifiable10 } from "@kinotic-ai/core";
612
+ /**
613
+ * An application's customized invitation email — at most one per application. Subject and
614
+ * bodies are Handlebars sources rendered with the same variables as the built-in
615
+ * invitation template; when an application has no template, the built-in is used.
616
+ */
617
+ declare class InviteEmailTemplate implements Identifiable10<string> {
618
+ id: string | null;
619
+ /** The organization that owns {@link applicationId}; set by the server on save. */
620
+ organizationId: string | null;
621
+ /** The application whose invitation email this template customizes. Always set. */
622
+ applicationId: string;
623
+ /** Handlebars source for the subject line (rendered as plain text). */
624
+ subject: string;
625
+ /** Handlebars source for the HTML body. */
626
+ htmlBody: string;
627
+ /** Handlebars source for the plain-text body. */
628
+ textBody: string;
629
+ created: number | null;
630
+ updated: number | null;
631
+ }
632
+ import { Identifiable as Identifiable11 } from "@kinotic-ai/core";
633
+ /**
588
634
  * Persisted record of one GitHub App installation that a Kinotic Org has authorised.
589
635
  * The durable binding that says "Org X has access to GitHub install Y" — without it,
590
636
  * no installation token can be minted on behalf of the org and webhook deliveries
591
637
  * can't be matched to a project.
592
638
  */
593
- declare class GitHubAppInstallation implements Identifiable9<string> {
639
+ declare class GitHubAppInstallation implements Identifiable11<string> {
594
640
  id: string | null;
595
641
  organizationId: string;
596
642
  githubInstallationId: number;
@@ -716,27 +762,33 @@ interface ISystemParticipant extends IParticipant {
716
762
  }
717
763
  import { IParticipant as IParticipant2 } from "@kinotic-ai/core";
718
764
  /**
719
- * A participant authenticated against an Organization. {@link organizationId} is the id of the
720
- * owning Organization and is never null. {@link IApplicationParticipant} extends this type, so an
721
- * application-scoped participant also satisfies it. Mirrors the server
722
- * {@code OrganizationParticipant}.
765
+ * A participant authenticated against an Organization, carrying ORGANIZATION-scope authority over
766
+ * that Organization's resources. {@link organizationId} is the id of the owning Organization and
767
+ * is never null. Mirrors the server {@code OrganizationParticipant}.
723
768
  */
724
769
  interface IOrganizationParticipant extends IParticipant2 {
725
- type: ParticipantType.ORGANIZATION | ParticipantType.APPLICATION;
770
+ type: ParticipantType.ORGANIZATION;
726
771
  /**
727
772
  * The id of the Organization this participant is authenticated under; never null.
728
773
  */
729
774
  organizationId: string;
730
775
  }
776
+ import { IParticipant as IParticipant3 } from "@kinotic-ai/core";
731
777
  /**
732
- * A participant authenticated against an Application. Extends {@link IOrganizationParticipant}
733
- * because every Application belongs to an Organization, so an application-scoped session
734
- * intrinsically carries the owning Organization's id as well. Mirrors the server
735
- * {@code ApplicationParticipant}.
778
+ * A participant authenticated against an Application, carrying APPLICATION-scope authority over
779
+ * that Application's own resources and end-user data. {@link organizationId} is the id of the
780
+ * Organization that owns the Application; it identifies the owning org for data ownership and
781
+ * routing of the Application's entity definitions and end-user data, and is never null.
782
+ * Mirrors the server {@code ApplicationParticipant}.
736
783
  */
737
- interface IApplicationParticipant extends IOrganizationParticipant {
784
+ interface IApplicationParticipant extends IParticipant3 {
738
785
  type: ParticipantType.APPLICATION;
739
786
  /**
787
+ * The id of the Organization that owns the Application this participant is authenticated
788
+ * under; never null.
789
+ */
790
+ organizationId: string;
791
+ /**
740
792
  * The id of the Application this participant is authenticated under; never null.
741
793
  */
742
794
  applicationId: string;
@@ -746,23 +798,22 @@ interface IApplicationParticipant extends IOrganizationParticipant {
746
798
  */
747
799
  tenantId?: string | null;
748
800
  }
749
- import { IParticipant as IParticipant3 } from "@kinotic-ai/core";
801
+ import { IParticipant as IParticipant4 } from "@kinotic-ai/core";
750
802
  /**
751
803
  * @return true if the participant authenticated against the platform SYSTEM scope
752
804
  */
753
- declare function isSystemParticipant(participant: IParticipant3): participant is ISystemParticipant;
805
+ declare function isSystemParticipant(participant: IParticipant4): participant is ISystemParticipant;
754
806
  /**
755
- * Narrows to an {@link IOrganizationParticipant}, which carries an {@code organizationId}. An
756
- * application-scoped participant satisfies this too, since every Application is owned by an
757
- * Organization.
807
+ * Narrows to an {@link IOrganizationParticipant}, which carries an {@code organizationId} and
808
+ * ORGANIZATION-scope authority.
758
809
  *
759
- * @return true if the participant authenticated against an Organization or an Application
810
+ * @return true if the participant authenticated against an Organization
760
811
  */
761
- declare function isOrganizationParticipant(participant: IParticipant3): participant is IOrganizationParticipant;
812
+ declare function isOrganizationParticipant(participant: IParticipant4): participant is IOrganizationParticipant;
762
813
  /**
763
814
  * @return true if the participant authenticated against an Application
764
815
  */
765
- declare function isApplicationParticipant(participant: IParticipant3): participant is IApplicationParticipant;
816
+ declare function isApplicationParticipant(participant: IParticipant4): participant is IApplicationParticipant;
766
817
  import { IKinotic } from "@kinotic-ai/core";
767
818
  import { CrudServiceProxy, ICrudServiceProxy } from "@kinotic-ai/core";
768
819
  interface IApplicationService extends ICrudServiceProxy<Application> {
@@ -1082,48 +1133,76 @@ declare class WorkloadServiceProxy extends CrudServiceProxy7<Workload> implement
1082
1133
  countForNode(nodeId: string): Promise<number>;
1083
1134
  syncIndex(): Promise<void>;
1084
1135
  }
1085
- import { CrudServiceProxy as CrudServiceProxy8, IKinotic as IKinotic11, ICrudServiceProxy as ICrudServiceProxy8 } from "@kinotic-ai/core";
1136
+ import { IDataSource, IKinotic as IKinotic11, IterablePage as IterablePage4, Pageable as Pageable4 } from "@kinotic-ai/core";
1086
1137
  /**
1087
- * Client proxy for the server's {@code IamUserService}; method shapes mirror the Java interface.
1088
- *
1089
- * NOTE: the server interface now lives in {@code kinotic-domain} and is not currently
1090
- * {@code @Publish}-annotated, so this proxy is not callable over RPC until the backend publishes
1091
- * the service. The shape here is kept in sync so it is ready once that happens; confirm the
1092
- * published namespace before relying on it.
1138
+ * Member management for the caller's organization and its applications. Scope is selected
1139
+ * with applicationId — null addresses org members, set addresses that application's
1140
+ * members and the backend derives the organization from the authenticated participant,
1141
+ * so it is never a parameter.
1093
1142
  */
1094
- interface IIamUserService extends ICrudServiceProxy8<IamUser> {
1095
- /** Finds the first user with the given email across all scopes, or null. */
1096
- findByEmail(email: string): Promise<IamUser | null>;
1143
+ interface IMemberService {
1144
+ /** Lists the members of the scope. */
1145
+ findMembers(applicationId: string | null, pageable: Pageable4): Promise<IterablePage4<IamUser>>;
1097
1146
  /**
1098
- * Finds the user with the given email within a scope identified structurally by
1099
- * (organizationId, applicationId): both null SYSTEM, organizationId only → ORGANIZATION,
1100
- * both set → APPLICATION.
1147
+ * Searches the scope's members by free text over email and display name. Blank
1148
+ * searchText is equivalent to {@link findMembers}.
1101
1149
  */
1102
- findByEmail(email: string, organizationId: string | null, applicationId: string | null): Promise<IamUser | null>;
1150
+ searchMembers(searchText: string, applicationId: string | null, pageable: Pageable4): Promise<IterablePage4<IamUser>>;
1103
1151
  /**
1104
- * Finds the first ORGANIZATION-scope user with the given email across all organizations.
1105
- * Used by sign-up to enforce one user per email before the new org's id exists.
1152
+ * Invites someone into the scope by email. Sends the invitation email and returns the
1153
+ * pending invitation. Rejects when the email already has an account in the scope or an
1154
+ * invitation is already pending for it.
1106
1155
  */
1107
- findFirstOrgUserByEmail(email: string): Promise<IamUser | null>;
1156
+ inviteMember(email: string, displayName: string | null, applicationId: string | null): Promise<PendingInviteSummary>;
1108
1157
  /**
1109
- * Finds the user (if any) with the given OIDC identity within a specific scope, using the
1110
- * same (organizationId, applicationId) null conventions as {@link findByEmail}.
1158
+ * Enables or disables a member of the caller's organization. Disabling gates future
1159
+ * logins; established sessions last until they expire. Callers cannot disable themselves.
1111
1160
  */
1112
- findByOidcIdentity(oidcSubject: string, oidcConfigId: string, organizationId: string | null, applicationId: string | null): Promise<IamUser | null>;
1113
- /** Finds every user across scopes for a given OIDC identity — e.g. the orgs it can access. */
1114
- findAllByOidcIdentity(oidcSubject: string, oidcConfigId: string): Promise<IamUser[]>;
1115
- /** Creates a user and, if a password is provided, the matching credential. */
1116
- createUser(user: IamUser, password: string | null): Promise<IamUser>;
1161
+ setMemberEnabled(userId: string, enabled: boolean): Promise<void>;
1162
+ /**
1163
+ * Permanently removes a member of the caller's organization, including any stored
1164
+ * credential. Callers cannot remove themselves.
1165
+ */
1166
+ removeMember(userId: string): Promise<void>;
1167
+ /** Lists the scope's live (unexpired) pending invitations. */
1168
+ findPendingInvites(applicationId: string | null, pageable: Pageable4): Promise<IterablePage4<PendingInviteSummary>>;
1169
+ /** Cancels a pending invitation belonging to the caller's organization. */
1170
+ cancelInvite(inviteId: string): Promise<void>;
1171
+ /** An {@link IDataSource} over the scope's members, for table components. */
1172
+ memberDataSource(applicationId: string | null): IDataSource<IamUser>;
1117
1173
  }
1118
- declare class IamUserService extends CrudServiceProxy8<IamUser> implements IIamUserService {
1174
+ declare class MemberService implements IMemberService {
1175
+ private readonly serviceProxy;
1119
1176
  constructor(kinotic: IKinotic11);
1120
- findByEmail(email: string, organizationId?: string | null, applicationId?: string | null): Promise<IamUser | null>;
1121
- findFirstOrgUserByEmail(email: string): Promise<IamUser | null>;
1122
- findByOidcIdentity(oidcSubject: string, oidcConfigId: string, organizationId: string | null, applicationId: string | null): Promise<IamUser | null>;
1123
- findAllByOidcIdentity(oidcSubject: string, oidcConfigId: string): Promise<IamUser[]>;
1124
- createUser(user: IamUser, password: string | null): Promise<IamUser>;
1177
+ findMembers(applicationId: string | null, pageable: Pageable4): Promise<IterablePage4<IamUser>>;
1178
+ searchMembers(searchText: string, applicationId: string | null, pageable: Pageable4): Promise<IterablePage4<IamUser>>;
1179
+ inviteMember(email: string, displayName: string | null, applicationId: string | null): Promise<PendingInviteSummary>;
1180
+ setMemberEnabled(userId: string, enabled: boolean): Promise<void>;
1181
+ removeMember(userId: string): Promise<void>;
1182
+ findPendingInvites(applicationId: string | null, pageable: Pageable4): Promise<IterablePage4<PendingInviteSummary>>;
1183
+ cancelInvite(inviteId: string): Promise<void>;
1184
+ memberDataSource(applicationId: string | null): IDataSource<IamUser>;
1125
1185
  }
1126
1186
  import { IKinotic as IKinotic12 } from "@kinotic-ai/core";
1187
+ import { CrudServiceProxy as CrudServiceProxy8, ICrudServiceProxy as ICrudServiceProxy8 } from "@kinotic-ai/core";
1188
+ /**
1189
+ * CRUD service for an application's customized invitation email — at most one
1190
+ * {@link InviteEmailTemplate} per application. Saving validates the Handlebars sources, so
1191
+ * a broken template is rejected instead of breaking the next send. Deleting the template
1192
+ * reverts the application to the built-in invitation email.
1193
+ */
1194
+ interface IInviteEmailTemplateService extends ICrudServiceProxy8<InviteEmailTemplate> {
1195
+ /**
1196
+ * Finds the application's invitation template, or null when the application uses the
1197
+ * built-in email.
1198
+ */
1199
+ findByApplication(applicationId: string): Promise<InviteEmailTemplate | null>;
1200
+ }
1201
+ declare class InviteEmailTemplateService extends CrudServiceProxy8<InviteEmailTemplate> implements IInviteEmailTemplateService {
1202
+ constructor(kinotic: IKinotic12);
1203
+ findByApplication(applicationId: string): Promise<InviteEmailTemplate | null>;
1204
+ }
1205
+ import { IKinotic as IKinotic13 } from "@kinotic-ai/core";
1127
1206
  /**
1128
1207
  * Browser-invoked service for the RFC 8628 device-authorization approve step. The signed-in
1129
1208
  * browser user calls {@link approve} with the user_code shown in their CLI; the gateway
@@ -1138,10 +1217,10 @@ interface IDeviceApprovalService {
1138
1217
  }
1139
1218
  declare class DeviceApprovalService implements IDeviceApprovalService {
1140
1219
  private readonly serviceProxy;
1141
- constructor(kinotic: IKinotic12);
1220
+ constructor(kinotic: IKinotic13);
1142
1221
  approve(userCode: string): Promise<void>;
1143
1222
  }
1144
- import { CrudServiceProxy as CrudServiceProxy9, IKinotic as IKinotic13, ICrudServiceProxy as ICrudServiceProxy9 } from "@kinotic-ai/core";
1223
+ import { CrudServiceProxy as CrudServiceProxy9, IKinotic as IKinotic14, ICrudServiceProxy as ICrudServiceProxy9 } from "@kinotic-ai/core";
1145
1224
  interface IGitHubAppInstallationService extends ICrudServiceProxy9<GitHubAppInstallation> {
1146
1225
  /**
1147
1226
  * Stages a single-use state token bound to the caller's organization plus the
@@ -1168,7 +1247,7 @@ interface IGitHubAppInstallationService extends ICrudServiceProxy9<GitHubAppInst
1168
1247
  findForCurrentOrg(): Promise<GitHubAppInstallation | null>;
1169
1248
  }
1170
1249
  declare class GitHubAppInstallationService extends CrudServiceProxy9<GitHubAppInstallation> implements IGitHubAppInstallationService {
1171
- constructor(kinotic: IKinotic13);
1250
+ constructor(kinotic: IKinotic14);
1172
1251
  startInstall(returnTo: string | null): Promise<string>;
1173
1252
  completeInstall(installationId: number, state: string): Promise<GitHubInstallCompletion>;
1174
1253
  findForCurrentOrg(): Promise<GitHubAppInstallation | null>;
@@ -1185,7 +1264,8 @@ interface IOsApiExtension {
1185
1264
  dataInsights: IDataInsightsService;
1186
1265
  vmNodes: IVmNodeService;
1187
1266
  workloads: IWorkloadService;
1188
- iamUsers: IIamUserService;
1267
+ members: IMemberService;
1268
+ inviteEmailTemplates: IInviteEmailTemplateService;
1189
1269
  deviceApproval: IDeviceApprovalService;
1190
1270
  githubAppInstallations: IGitHubAppInstallationService;
1191
1271
  }
@@ -1193,4 +1273,4 @@ declare const OsApiPlugin: KinoticPlugin<IOsApiExtension>;
1193
1273
  declare module "@kinotic-ai/core" {
1194
1274
  interface KinoticSingleton extends IOsApiExtension {}
1195
1275
  }
1196
- export { isSystemParticipant, isOrganizationParticipant, isApplicationParticipant, WorkloadStatus, WorkloadServiceProxy, Workload, VmProviderType, VmNodeStatus, VmNodeServiceProxy, VmNode, VersionDecorator, TimeReferenceDecorator, TextDecorator, TenantSelectionC3Type, TenantIdDecorator, SingleLoggerLevelsDescriptor, SignUpRequest, SignUpCompleteRequest, QueryOptionsC3Type, QueryDecorator, ProjectType, ProjectService, Project, ProgressType, ParticipantType, 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, ISystemParticipant, IProjectService, IOsApiExtension, IOrganizationService, IOrganizationParticipant, INamedQueriesDefinitionService, IMigrationService, ILogManager, IIamUserService, 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 };
1276
+ export { isSystemParticipant, isOrganizationParticipant, isApplicationParticipant, WorkloadStatus, WorkloadServiceProxy, Workload, VmProviderType, VmNodeStatus, VmNodeServiceProxy, VmNode, VersionDecorator, TimeReferenceDecorator, TextDecorator, TenantSelectionC3Type, TenantIdDecorator, SingleLoggerLevelsDescriptor, SignUpRequest, SignUpCompleteRequest, QueryOptionsC3Type, QueryDecorator, ProjectType, ProjectService, Project, ProgressType, 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 };
package/dist/index.d.ts CHANGED
@@ -145,6 +145,12 @@ declare class Application implements Identifiable<string> {
145
145
  */
146
146
  organizationId: string;
147
147
  description: string;
148
+ /**
149
+ * When true, every APPLICATION-scope user created for this application receives an
150
+ * auto-generated unique tenantId, isolating each user's SHARED entity data in its own
151
+ * tenant. Applies only to users created after it is enabled.
152
+ */
153
+ tenantPerUser: boolean;
148
154
  updated: number | null;
149
155
  constructor(id: string, description: string);
150
156
  }
@@ -585,12 +591,52 @@ interface CompleteOrgRequest {
585
591
  }
586
592
  import { Identifiable as Identifiable9 } from "@kinotic-ai/core";
587
593
  /**
594
+ * View of a pending invitation for listing in the web app. Deliberately excludes the accept token — anyone who
595
+ * can list invitations must not be able to redeem them.
596
+ */
597
+ declare class PendingInviteSummary implements Identifiable9<string> {
598
+ id: string | null;
599
+ /** Email the invitation was sent to. */
600
+ email: string;
601
+ /** Display name the inviter entered, if any. */
602
+ displayName: string | null;
603
+ /** The application the invitee would join; null for an organization-member invite. */
604
+ applicationId: string | null;
605
+ /** Display name of the member who sent the invitation. */
606
+ invitedByName: string | null;
607
+ created: number | null;
608
+ /** When the invitation stops being acceptable. */
609
+ expiresAt: number | null;
610
+ }
611
+ import { Identifiable as Identifiable10 } from "@kinotic-ai/core";
612
+ /**
613
+ * An application's customized invitation email — at most one per application. Subject and
614
+ * bodies are Handlebars sources rendered with the same variables as the built-in
615
+ * invitation template; when an application has no template, the built-in is used.
616
+ */
617
+ declare class InviteEmailTemplate implements Identifiable10<string> {
618
+ id: string | null;
619
+ /** The organization that owns {@link applicationId}; set by the server on save. */
620
+ organizationId: string | null;
621
+ /** The application whose invitation email this template customizes. Always set. */
622
+ applicationId: string;
623
+ /** Handlebars source for the subject line (rendered as plain text). */
624
+ subject: string;
625
+ /** Handlebars source for the HTML body. */
626
+ htmlBody: string;
627
+ /** Handlebars source for the plain-text body. */
628
+ textBody: string;
629
+ created: number | null;
630
+ updated: number | null;
631
+ }
632
+ import { Identifiable as Identifiable11 } from "@kinotic-ai/core";
633
+ /**
588
634
  * Persisted record of one GitHub App installation that a Kinotic Org has authorised.
589
635
  * The durable binding that says "Org X has access to GitHub install Y" — without it,
590
636
  * no installation token can be minted on behalf of the org and webhook deliveries
591
637
  * can't be matched to a project.
592
638
  */
593
- declare class GitHubAppInstallation implements Identifiable9<string> {
639
+ declare class GitHubAppInstallation implements Identifiable11<string> {
594
640
  id: string | null;
595
641
  organizationId: string;
596
642
  githubInstallationId: number;
@@ -716,27 +762,33 @@ interface ISystemParticipant extends IParticipant {
716
762
  }
717
763
  import { IParticipant as IParticipant2 } from "@kinotic-ai/core";
718
764
  /**
719
- * A participant authenticated against an Organization. {@link organizationId} is the id of the
720
- * owning Organization and is never null. {@link IApplicationParticipant} extends this type, so an
721
- * application-scoped participant also satisfies it. Mirrors the server
722
- * {@code OrganizationParticipant}.
765
+ * A participant authenticated against an Organization, carrying ORGANIZATION-scope authority over
766
+ * that Organization's resources. {@link organizationId} is the id of the owning Organization and
767
+ * is never null. Mirrors the server {@code OrganizationParticipant}.
723
768
  */
724
769
  interface IOrganizationParticipant extends IParticipant2 {
725
- type: ParticipantType.ORGANIZATION | ParticipantType.APPLICATION;
770
+ type: ParticipantType.ORGANIZATION;
726
771
  /**
727
772
  * The id of the Organization this participant is authenticated under; never null.
728
773
  */
729
774
  organizationId: string;
730
775
  }
776
+ import { IParticipant as IParticipant3 } from "@kinotic-ai/core";
731
777
  /**
732
- * A participant authenticated against an Application. Extends {@link IOrganizationParticipant}
733
- * because every Application belongs to an Organization, so an application-scoped session
734
- * intrinsically carries the owning Organization's id as well. Mirrors the server
735
- * {@code ApplicationParticipant}.
778
+ * A participant authenticated against an Application, carrying APPLICATION-scope authority over
779
+ * that Application's own resources and end-user data. {@link organizationId} is the id of the
780
+ * Organization that owns the Application; it identifies the owning org for data ownership and
781
+ * routing of the Application's entity definitions and end-user data, and is never null.
782
+ * Mirrors the server {@code ApplicationParticipant}.
736
783
  */
737
- interface IApplicationParticipant extends IOrganizationParticipant {
784
+ interface IApplicationParticipant extends IParticipant3 {
738
785
  type: ParticipantType.APPLICATION;
739
786
  /**
787
+ * The id of the Organization that owns the Application this participant is authenticated
788
+ * under; never null.
789
+ */
790
+ organizationId: string;
791
+ /**
740
792
  * The id of the Application this participant is authenticated under; never null.
741
793
  */
742
794
  applicationId: string;
@@ -746,23 +798,22 @@ interface IApplicationParticipant extends IOrganizationParticipant {
746
798
  */
747
799
  tenantId?: string | null;
748
800
  }
749
- import { IParticipant as IParticipant3 } from "@kinotic-ai/core";
801
+ import { IParticipant as IParticipant4 } from "@kinotic-ai/core";
750
802
  /**
751
803
  * @return true if the participant authenticated against the platform SYSTEM scope
752
804
  */
753
- declare function isSystemParticipant(participant: IParticipant3): participant is ISystemParticipant;
805
+ declare function isSystemParticipant(participant: IParticipant4): participant is ISystemParticipant;
754
806
  /**
755
- * Narrows to an {@link IOrganizationParticipant}, which carries an {@code organizationId}. An
756
- * application-scoped participant satisfies this too, since every Application is owned by an
757
- * Organization.
807
+ * Narrows to an {@link IOrganizationParticipant}, which carries an {@code organizationId} and
808
+ * ORGANIZATION-scope authority.
758
809
  *
759
- * @return true if the participant authenticated against an Organization or an Application
810
+ * @return true if the participant authenticated against an Organization
760
811
  */
761
- declare function isOrganizationParticipant(participant: IParticipant3): participant is IOrganizationParticipant;
812
+ declare function isOrganizationParticipant(participant: IParticipant4): participant is IOrganizationParticipant;
762
813
  /**
763
814
  * @return true if the participant authenticated against an Application
764
815
  */
765
- declare function isApplicationParticipant(participant: IParticipant3): participant is IApplicationParticipant;
816
+ declare function isApplicationParticipant(participant: IParticipant4): participant is IApplicationParticipant;
766
817
  import { IKinotic } from "@kinotic-ai/core";
767
818
  import { CrudServiceProxy, ICrudServiceProxy } from "@kinotic-ai/core";
768
819
  interface IApplicationService extends ICrudServiceProxy<Application> {
@@ -1082,48 +1133,76 @@ declare class WorkloadServiceProxy extends CrudServiceProxy7<Workload> implement
1082
1133
  countForNode(nodeId: string): Promise<number>;
1083
1134
  syncIndex(): Promise<void>;
1084
1135
  }
1085
- import { CrudServiceProxy as CrudServiceProxy8, IKinotic as IKinotic11, ICrudServiceProxy as ICrudServiceProxy8 } from "@kinotic-ai/core";
1136
+ import { IDataSource, IKinotic as IKinotic11, IterablePage as IterablePage4, Pageable as Pageable4 } from "@kinotic-ai/core";
1086
1137
  /**
1087
- * Client proxy for the server's {@code IamUserService}; method shapes mirror the Java interface.
1088
- *
1089
- * NOTE: the server interface now lives in {@code kinotic-domain} and is not currently
1090
- * {@code @Publish}-annotated, so this proxy is not callable over RPC until the backend publishes
1091
- * the service. The shape here is kept in sync so it is ready once that happens; confirm the
1092
- * published namespace before relying on it.
1138
+ * Member management for the caller's organization and its applications. Scope is selected
1139
+ * with applicationId — null addresses org members, set addresses that application's
1140
+ * members and the backend derives the organization from the authenticated participant,
1141
+ * so it is never a parameter.
1093
1142
  */
1094
- interface IIamUserService extends ICrudServiceProxy8<IamUser> {
1095
- /** Finds the first user with the given email across all scopes, or null. */
1096
- findByEmail(email: string): Promise<IamUser | null>;
1143
+ interface IMemberService {
1144
+ /** Lists the members of the scope. */
1145
+ findMembers(applicationId: string | null, pageable: Pageable4): Promise<IterablePage4<IamUser>>;
1097
1146
  /**
1098
- * Finds the user with the given email within a scope identified structurally by
1099
- * (organizationId, applicationId): both null SYSTEM, organizationId only → ORGANIZATION,
1100
- * both set → APPLICATION.
1147
+ * Searches the scope's members by free text over email and display name. Blank
1148
+ * searchText is equivalent to {@link findMembers}.
1101
1149
  */
1102
- findByEmail(email: string, organizationId: string | null, applicationId: string | null): Promise<IamUser | null>;
1150
+ searchMembers(searchText: string, applicationId: string | null, pageable: Pageable4): Promise<IterablePage4<IamUser>>;
1103
1151
  /**
1104
- * Finds the first ORGANIZATION-scope user with the given email across all organizations.
1105
- * Used by sign-up to enforce one user per email before the new org's id exists.
1152
+ * Invites someone into the scope by email. Sends the invitation email and returns the
1153
+ * pending invitation. Rejects when the email already has an account in the scope or an
1154
+ * invitation is already pending for it.
1106
1155
  */
1107
- findFirstOrgUserByEmail(email: string): Promise<IamUser | null>;
1156
+ inviteMember(email: string, displayName: string | null, applicationId: string | null): Promise<PendingInviteSummary>;
1108
1157
  /**
1109
- * Finds the user (if any) with the given OIDC identity within a specific scope, using the
1110
- * same (organizationId, applicationId) null conventions as {@link findByEmail}.
1158
+ * Enables or disables a member of the caller's organization. Disabling gates future
1159
+ * logins; established sessions last until they expire. Callers cannot disable themselves.
1111
1160
  */
1112
- findByOidcIdentity(oidcSubject: string, oidcConfigId: string, organizationId: string | null, applicationId: string | null): Promise<IamUser | null>;
1113
- /** Finds every user across scopes for a given OIDC identity — e.g. the orgs it can access. */
1114
- findAllByOidcIdentity(oidcSubject: string, oidcConfigId: string): Promise<IamUser[]>;
1115
- /** Creates a user and, if a password is provided, the matching credential. */
1116
- createUser(user: IamUser, password: string | null): Promise<IamUser>;
1161
+ setMemberEnabled(userId: string, enabled: boolean): Promise<void>;
1162
+ /**
1163
+ * Permanently removes a member of the caller's organization, including any stored
1164
+ * credential. Callers cannot remove themselves.
1165
+ */
1166
+ removeMember(userId: string): Promise<void>;
1167
+ /** Lists the scope's live (unexpired) pending invitations. */
1168
+ findPendingInvites(applicationId: string | null, pageable: Pageable4): Promise<IterablePage4<PendingInviteSummary>>;
1169
+ /** Cancels a pending invitation belonging to the caller's organization. */
1170
+ cancelInvite(inviteId: string): Promise<void>;
1171
+ /** An {@link IDataSource} over the scope's members, for table components. */
1172
+ memberDataSource(applicationId: string | null): IDataSource<IamUser>;
1117
1173
  }
1118
- declare class IamUserService extends CrudServiceProxy8<IamUser> implements IIamUserService {
1174
+ declare class MemberService implements IMemberService {
1175
+ private readonly serviceProxy;
1119
1176
  constructor(kinotic: IKinotic11);
1120
- findByEmail(email: string, organizationId?: string | null, applicationId?: string | null): Promise<IamUser | null>;
1121
- findFirstOrgUserByEmail(email: string): Promise<IamUser | null>;
1122
- findByOidcIdentity(oidcSubject: string, oidcConfigId: string, organizationId: string | null, applicationId: string | null): Promise<IamUser | null>;
1123
- findAllByOidcIdentity(oidcSubject: string, oidcConfigId: string): Promise<IamUser[]>;
1124
- createUser(user: IamUser, password: string | null): Promise<IamUser>;
1177
+ findMembers(applicationId: string | null, pageable: Pageable4): Promise<IterablePage4<IamUser>>;
1178
+ searchMembers(searchText: string, applicationId: string | null, pageable: Pageable4): Promise<IterablePage4<IamUser>>;
1179
+ inviteMember(email: string, displayName: string | null, applicationId: string | null): Promise<PendingInviteSummary>;
1180
+ setMemberEnabled(userId: string, enabled: boolean): Promise<void>;
1181
+ removeMember(userId: string): Promise<void>;
1182
+ findPendingInvites(applicationId: string | null, pageable: Pageable4): Promise<IterablePage4<PendingInviteSummary>>;
1183
+ cancelInvite(inviteId: string): Promise<void>;
1184
+ memberDataSource(applicationId: string | null): IDataSource<IamUser>;
1125
1185
  }
1126
1186
  import { IKinotic as IKinotic12 } from "@kinotic-ai/core";
1187
+ import { CrudServiceProxy as CrudServiceProxy8, ICrudServiceProxy as ICrudServiceProxy8 } from "@kinotic-ai/core";
1188
+ /**
1189
+ * CRUD service for an application's customized invitation email — at most one
1190
+ * {@link InviteEmailTemplate} per application. Saving validates the Handlebars sources, so
1191
+ * a broken template is rejected instead of breaking the next send. Deleting the template
1192
+ * reverts the application to the built-in invitation email.
1193
+ */
1194
+ interface IInviteEmailTemplateService extends ICrudServiceProxy8<InviteEmailTemplate> {
1195
+ /**
1196
+ * Finds the application's invitation template, or null when the application uses the
1197
+ * built-in email.
1198
+ */
1199
+ findByApplication(applicationId: string): Promise<InviteEmailTemplate | null>;
1200
+ }
1201
+ declare class InviteEmailTemplateService extends CrudServiceProxy8<InviteEmailTemplate> implements IInviteEmailTemplateService {
1202
+ constructor(kinotic: IKinotic12);
1203
+ findByApplication(applicationId: string): Promise<InviteEmailTemplate | null>;
1204
+ }
1205
+ import { IKinotic as IKinotic13 } from "@kinotic-ai/core";
1127
1206
  /**
1128
1207
  * Browser-invoked service for the RFC 8628 device-authorization approve step. The signed-in
1129
1208
  * browser user calls {@link approve} with the user_code shown in their CLI; the gateway
@@ -1138,10 +1217,10 @@ interface IDeviceApprovalService {
1138
1217
  }
1139
1218
  declare class DeviceApprovalService implements IDeviceApprovalService {
1140
1219
  private readonly serviceProxy;
1141
- constructor(kinotic: IKinotic12);
1220
+ constructor(kinotic: IKinotic13);
1142
1221
  approve(userCode: string): Promise<void>;
1143
1222
  }
1144
- import { CrudServiceProxy as CrudServiceProxy9, IKinotic as IKinotic13, ICrudServiceProxy as ICrudServiceProxy9 } from "@kinotic-ai/core";
1223
+ import { CrudServiceProxy as CrudServiceProxy9, IKinotic as IKinotic14, ICrudServiceProxy as ICrudServiceProxy9 } from "@kinotic-ai/core";
1145
1224
  interface IGitHubAppInstallationService extends ICrudServiceProxy9<GitHubAppInstallation> {
1146
1225
  /**
1147
1226
  * Stages a single-use state token bound to the caller's organization plus the
@@ -1168,7 +1247,7 @@ interface IGitHubAppInstallationService extends ICrudServiceProxy9<GitHubAppInst
1168
1247
  findForCurrentOrg(): Promise<GitHubAppInstallation | null>;
1169
1248
  }
1170
1249
  declare class GitHubAppInstallationService extends CrudServiceProxy9<GitHubAppInstallation> implements IGitHubAppInstallationService {
1171
- constructor(kinotic: IKinotic13);
1250
+ constructor(kinotic: IKinotic14);
1172
1251
  startInstall(returnTo: string | null): Promise<string>;
1173
1252
  completeInstall(installationId: number, state: string): Promise<GitHubInstallCompletion>;
1174
1253
  findForCurrentOrg(): Promise<GitHubAppInstallation | null>;
@@ -1185,7 +1264,8 @@ interface IOsApiExtension {
1185
1264
  dataInsights: IDataInsightsService;
1186
1265
  vmNodes: IVmNodeService;
1187
1266
  workloads: IWorkloadService;
1188
- iamUsers: IIamUserService;
1267
+ members: IMemberService;
1268
+ inviteEmailTemplates: IInviteEmailTemplateService;
1189
1269
  deviceApproval: IDeviceApprovalService;
1190
1270
  githubAppInstallations: IGitHubAppInstallationService;
1191
1271
  }
@@ -1193,4 +1273,4 @@ declare const OsApiPlugin: KinoticPlugin<IOsApiExtension>;
1193
1273
  declare module "@kinotic-ai/core" {
1194
1274
  interface KinoticSingleton extends IOsApiExtension {}
1195
1275
  }
1196
- export { isSystemParticipant, isOrganizationParticipant, isApplicationParticipant, WorkloadStatus, WorkloadServiceProxy, Workload, VmProviderType, VmNodeStatus, VmNodeServiceProxy, VmNode, VersionDecorator, TimeReferenceDecorator, TextDecorator, TenantSelectionC3Type, TenantIdDecorator, SingleLoggerLevelsDescriptor, SignUpRequest, SignUpCompleteRequest, QueryOptionsC3Type, QueryDecorator, ProjectType, ProjectService, Project, ProgressType, ParticipantType, 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, ISystemParticipant, IProjectService, IOsApiExtension, IOrganizationService, IOrganizationParticipant, INamedQueriesDefinitionService, IMigrationService, ILogManager, IIamUserService, 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 };
1276
+ export { isSystemParticipant, isOrganizationParticipant, isApplicationParticipant, WorkloadStatus, WorkloadServiceProxy, Workload, VmProviderType, VmNodeStatus, VmNodeServiceProxy, VmNode, VersionDecorator, TimeReferenceDecorator, TextDecorator, TenantSelectionC3Type, TenantIdDecorator, SingleLoggerLevelsDescriptor, SignUpRequest, SignUpCompleteRequest, QueryOptionsC3Type, QueryDecorator, ProjectType, ProjectService, Project, ProgressType, 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 };
package/dist/index.js CHANGED
@@ -178,6 +178,7 @@ class Application {
178
178
  id;
179
179
  organizationId;
180
180
  description;
181
+ tenantPerUser = false;
181
182
  updated = null;
182
183
  constructor(id, description) {
183
184
  this.id = id;
@@ -356,6 +357,27 @@ class IamUser {
356
357
  created = null;
357
358
  updated = null;
358
359
  }
360
+ // packages/os-api/src/api/model/iam/PendingInviteSummary.ts
361
+ class PendingInviteSummary {
362
+ id = null;
363
+ email = "";
364
+ displayName = null;
365
+ applicationId = null;
366
+ invitedByName = null;
367
+ created = null;
368
+ expiresAt = null;
369
+ }
370
+ // packages/os-api/src/api/model/InviteEmailTemplate.ts
371
+ class InviteEmailTemplate {
372
+ id = null;
373
+ organizationId = null;
374
+ applicationId = "";
375
+ subject = "";
376
+ htmlBody = "";
377
+ textBody = "";
378
+ created = null;
379
+ updated = null;
380
+ }
359
381
  // packages/os-api/src/api/model/github/GitHubAppInstallation.ts
360
382
  class GitHubAppInstallation {
361
383
  id = null;
@@ -408,8 +430,7 @@ function isSystemParticipant(participant) {
408
430
  return scopeType(participant) === "system" /* SYSTEM */;
409
431
  }
410
432
  function isOrganizationParticipant(participant) {
411
- const type = scopeType(participant);
412
- return type === "organization" /* ORGANIZATION */ || type === "application" /* APPLICATION */;
433
+ return scopeType(participant) === "organization" /* ORGANIZATION */;
413
434
  }
414
435
  function isApplicationParticipant(participant) {
415
436
  return scopeType(participant) === "application" /* APPLICATION */;
@@ -630,27 +651,56 @@ class WorkloadServiceProxy extends CrudServiceProxy7 {
630
651
  return this.serviceProxy.invoke("syncIndex", []);
631
652
  }
632
653
  }
633
- // packages/os-api/src/api/services/IIamUserService.ts
634
- import { CrudServiceProxy as CrudServiceProxy8 } from "@kinotic-ai/core";
654
+ // packages/os-api/src/api/services/IMemberService.ts
655
+ import {
656
+ FunctionalIterablePage as FunctionalIterablePage4
657
+ } from "@kinotic-ai/core";
635
658
 
636
- class IamUserService extends CrudServiceProxy8 {
659
+ class MemberService {
660
+ serviceProxy;
637
661
  constructor(kinotic) {
638
- super(kinotic.serviceProxy("org.kinotic.domain.api.services.iam.IamUserService"));
662
+ this.serviceProxy = kinotic.serviceProxy("org.kinotic.os.api.services.iam.MemberService");
663
+ }
664
+ async findMembers(applicationId, pageable) {
665
+ const page = await this.serviceProxy.invoke("findMembers", [applicationId, pageable]);
666
+ return new FunctionalIterablePage4(pageable, page, (next) => this.serviceProxy.invoke("findMembers", [applicationId, next]));
667
+ }
668
+ async searchMembers(searchText, applicationId, pageable) {
669
+ const page = await this.serviceProxy.invoke("searchMembers", [searchText, applicationId, pageable]);
670
+ return new FunctionalIterablePage4(pageable, page, (next) => this.serviceProxy.invoke("searchMembers", [searchText, applicationId, next]));
671
+ }
672
+ inviteMember(email, displayName, applicationId) {
673
+ return this.serviceProxy.invoke("inviteMember", [email, displayName, applicationId]);
674
+ }
675
+ setMemberEnabled(userId, enabled) {
676
+ return this.serviceProxy.invoke("setMemberEnabled", [userId, enabled]);
677
+ }
678
+ removeMember(userId) {
679
+ return this.serviceProxy.invoke("removeMember", [userId]);
639
680
  }
640
- findByEmail(email, organizationId, applicationId) {
641
- return arguments.length >= 3 ? this.serviceProxy.invoke("findByEmail", [email, organizationId, applicationId]) : this.serviceProxy.invoke("findByEmail", [email]);
681
+ async findPendingInvites(applicationId, pageable) {
682
+ const page = await this.serviceProxy.invoke("findPendingInvites", [applicationId, pageable]);
683
+ return new FunctionalIterablePage4(pageable, page, (next) => this.serviceProxy.invoke("findPendingInvites", [applicationId, next]));
642
684
  }
643
- findFirstOrgUserByEmail(email) {
644
- return this.serviceProxy.invoke("findFirstOrgUserByEmail", [email]);
685
+ cancelInvite(inviteId) {
686
+ return this.serviceProxy.invoke("cancelInvite", [inviteId]);
645
687
  }
646
- findByOidcIdentity(oidcSubject, oidcConfigId, organizationId, applicationId) {
647
- return this.serviceProxy.invoke("findByOidcIdentity", [oidcSubject, oidcConfigId, organizationId, applicationId]);
688
+ memberDataSource(applicationId) {
689
+ return {
690
+ findAll: (pageable) => this.findMembers(applicationId, pageable),
691
+ search: (searchText, pageable) => this.searchMembers(searchText, applicationId, pageable)
692
+ };
648
693
  }
649
- findAllByOidcIdentity(oidcSubject, oidcConfigId) {
650
- return this.serviceProxy.invoke("findAllByOidcIdentity", [oidcSubject, oidcConfigId]);
694
+ }
695
+ // packages/os-api/src/api/services/IInviteEmailTemplateService.ts
696
+ import { CrudServiceProxy as CrudServiceProxy8 } from "@kinotic-ai/core";
697
+
698
+ class InviteEmailTemplateService extends CrudServiceProxy8 {
699
+ constructor(kinotic) {
700
+ super(kinotic.serviceProxy("org.kinotic.os.api.services.InviteEmailTemplateService"));
651
701
  }
652
- createUser(user, password) {
653
- return this.serviceProxy.invoke("createUser", [user, password]);
702
+ findByApplication(applicationId) {
703
+ return this.serviceProxy.invoke("findByApplication", [applicationId]);
654
704
  }
655
705
  }
656
706
  // packages/os-api/src/api/services/IDeviceApprovalService.ts
@@ -694,7 +744,8 @@ var OsApiPlugin = {
694
744
  dataInsights: new DataInsightsService(kinotic),
695
745
  vmNodes: new VmNodeServiceProxy(kinotic),
696
746
  workloads: new WorkloadServiceProxy(kinotic),
697
- iamUsers: new IamUserService(kinotic),
747
+ members: new MemberService(kinotic),
748
+ inviteEmailTemplates: new InviteEmailTemplateService(kinotic),
698
749
  deviceApproval: new DeviceApprovalService(kinotic),
699
750
  githubAppInstallations: new GitHubAppInstallationService(kinotic)
700
751
  };
@@ -723,6 +774,7 @@ export {
723
774
  ProjectService,
724
775
  Project,
725
776
  ProgressType,
777
+ PendingInviteSummary,
726
778
  ParticipantType,
727
779
  PageableC3Type,
728
780
  PageC3Type,
@@ -734,13 +786,15 @@ export {
734
786
  NamedQueriesDefinitionService,
735
787
  NamedQueriesDefinition,
736
788
  MigrationService,
789
+ MemberService,
737
790
  LoggersDescriptor,
738
791
  LoggerLevelsDescriptor,
739
792
  LogManager,
740
793
  LogLevel,
741
794
  KinoticProjectConfig,
795
+ InviteEmailTemplateService,
796
+ InviteEmailTemplate,
742
797
  IdDecorator,
743
- IamUserService,
744
798
  IamUser,
745
799
  GroupLoggerLevelsDescriptor,
746
800
  GitHubToken,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kinotic-ai/os-api",
3
- "version": "1.8.0",
3
+ "version": "1.10.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.6.0",
44
+ "@kinotic-ai/core": "1.6.2",
45
45
  "@types/node": "^25.3.2",
46
46
  "@vitest/coverage-v8": "^4.0.18",
47
47
  "@vitest/runner": "^4.0.18",