@kinotic-ai/core 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
@@ -74,7 +74,6 @@ __export(exports_src, {
74
74
  Scope: () => Scope,
75
75
  Publish: () => Publish,
76
76
  ParticipantConstants: () => ParticipantConstants,
77
- Participant: () => Participant,
78
77
  Pageable: () => Pageable,
79
78
  Order: () => Order,
80
79
  OffsetPageable: () => OffsetPageable,
@@ -994,7 +993,7 @@ var import_operators2 = require("rxjs/operators");
994
993
  // packages/core/package.json
995
994
  var package_default = {
996
995
  name: "@kinotic-ai/core",
997
- version: "1.5.0",
996
+ version: "1.6.0",
998
997
  type: "module",
999
998
  files: [
1000
999
  "dist"
@@ -1477,23 +1476,6 @@ class ConnectedInfo {
1477
1476
  replyToId;
1478
1477
  participant;
1479
1478
  }
1480
- // packages/core/src/api/security/Participant.ts
1481
- class Participant {
1482
- id;
1483
- tenantId;
1484
- authScopeType;
1485
- authScopeId;
1486
- metadata;
1487
- roles;
1488
- constructor(id, tenantId, authScopeType, authScopeId, metadata, roles) {
1489
- this.id = id;
1490
- this.tenantId = tenantId;
1491
- this.authScopeType = authScopeType;
1492
- this.authScopeId = authScopeId;
1493
- this.metadata = metadata || new Map;
1494
- this.roles = roles || [];
1495
- }
1496
- }
1497
1479
  // packages/core/src/api/security/ParticipantConstants.ts
1498
1480
  class ParticipantConstants {
1499
1481
  static PARTICIPANT_TYPE_METADATA_KEY = "type";
package/dist/index.d.cts CHANGED
@@ -72,59 +72,37 @@ interface Identifiable<T> {
72
72
  id: T | null;
73
73
  }
74
74
  /**
75
+ * Identifying information about a logged-in participant on the RPC layer.
76
+ *
77
+ * This is the base shape every participant shares, regardless of scope, and is what RPC-only
78
+ * consumers work with directly. The Kinotic OS contract layers scope-typed participants on top
79
+ * of it — see the participant types in {@code @kinotic-ai/os-api}.
80
+ *
81
+ * Mirrors the server {@code org.kinotic.core.api.security.Participant}.
82
+ *
75
83
  * Created by Navíd Mitchell 🤪on 6/16/23.
76
84
  */
77
85
  interface IParticipant extends Identifiable<string> {
78
86
  /**
79
- * The identity of the participant
80
- *
81
- * @return the identity of the participant
87
+ * The identity of the participant.
82
88
  */
83
89
  id: string;
84
90
  /**
85
- * The tenant that the participant belongs to
86
- *
87
- * @return the tenant or null if not using multi-tenancy
91
+ * Key/value pairs carrying additional information about the participant.
88
92
  */
89
- tenantId?: string | null;
93
+ metadata: Record<string, string>;
90
94
  /**
91
- * The scope layer this participant authenticated against.
92
- * Well-known values are "SYSTEM", "ORGANIZATION", and "APPLICATION",
93
- * but custom values are allowed for extensibility.
94
- */
95
- authScopeType?: string | null;
96
- /**
97
- * The identifier of the specific scope this participant belongs to.
98
- * For example, "kinotic" for system scope, an organization ID, or an application ID.
99
- * Together with {@link authScopeType}, uniquely identifies which user pool
100
- * this participant was authenticated from.
101
- */
102
- authScopeId?: string | null;
103
- /**
104
- * Metadata is a map of key value pairs that can be used to store additional information about a participant
105
- *
106
- * @return a map of key value pairs
107
- */
108
- metadata: Map<string, string>;
109
- /**
110
- * Roles are a list of strings that can be used to authorize a participant to perform certain actions
111
- *
112
- * @return a list of roles
95
+ * Roles used to authorize the participant to perform actions.
113
96
  */
114
97
  roles: string[];
115
98
  }
116
99
  /**
100
+ * A logged-in participant on the RPC layer. Alias of {@link IParticipant}; the Kinotic OS contract
101
+ * ({@code @kinotic-ai/os-api}) narrows this to scope-typed participants.
102
+ *
117
103
  * Created by Navid Mitchell on 6/2/20
118
104
  */
119
- declare class Participant implements IParticipant {
120
- id: string;
121
- tenantId?: string | null;
122
- authScopeType?: string | null;
123
- authScopeId?: string | null;
124
- metadata: Map<string, string>;
125
- roles: string[];
126
- constructor(id: string, tenantId?: string, authScopeType?: string, authScopeId?: string, metadata?: Map<string, string>, roles?: string[]);
127
- }
105
+ type Participant = IParticipant;
128
106
  /**
129
107
  * Contains information about the connection that was established
130
108
  */
package/dist/index.d.ts CHANGED
@@ -72,59 +72,37 @@ interface Identifiable<T> {
72
72
  id: T | null;
73
73
  }
74
74
  /**
75
+ * Identifying information about a logged-in participant on the RPC layer.
76
+ *
77
+ * This is the base shape every participant shares, regardless of scope, and is what RPC-only
78
+ * consumers work with directly. The Kinotic OS contract layers scope-typed participants on top
79
+ * of it — see the participant types in {@code @kinotic-ai/os-api}.
80
+ *
81
+ * Mirrors the server {@code org.kinotic.core.api.security.Participant}.
82
+ *
75
83
  * Created by Navíd Mitchell 🤪on 6/16/23.
76
84
  */
77
85
  interface IParticipant extends Identifiable<string> {
78
86
  /**
79
- * The identity of the participant
80
- *
81
- * @return the identity of the participant
87
+ * The identity of the participant.
82
88
  */
83
89
  id: string;
84
90
  /**
85
- * The tenant that the participant belongs to
86
- *
87
- * @return the tenant or null if not using multi-tenancy
91
+ * Key/value pairs carrying additional information about the participant.
88
92
  */
89
- tenantId?: string | null;
93
+ metadata: Record<string, string>;
90
94
  /**
91
- * The scope layer this participant authenticated against.
92
- * Well-known values are "SYSTEM", "ORGANIZATION", and "APPLICATION",
93
- * but custom values are allowed for extensibility.
94
- */
95
- authScopeType?: string | null;
96
- /**
97
- * The identifier of the specific scope this participant belongs to.
98
- * For example, "kinotic" for system scope, an organization ID, or an application ID.
99
- * Together with {@link authScopeType}, uniquely identifies which user pool
100
- * this participant was authenticated from.
101
- */
102
- authScopeId?: string | null;
103
- /**
104
- * Metadata is a map of key value pairs that can be used to store additional information about a participant
105
- *
106
- * @return a map of key value pairs
107
- */
108
- metadata: Map<string, string>;
109
- /**
110
- * Roles are a list of strings that can be used to authorize a participant to perform certain actions
111
- *
112
- * @return a list of roles
95
+ * Roles used to authorize the participant to perform actions.
113
96
  */
114
97
  roles: string[];
115
98
  }
116
99
  /**
100
+ * A logged-in participant on the RPC layer. Alias of {@link IParticipant}; the Kinotic OS contract
101
+ * ({@code @kinotic-ai/os-api}) narrows this to scope-typed participants.
102
+ *
117
103
  * Created by Navid Mitchell on 6/2/20
118
104
  */
119
- declare class Participant implements IParticipant {
120
- id: string;
121
- tenantId?: string | null;
122
- authScopeType?: string | null;
123
- authScopeId?: string | null;
124
- metadata: Map<string, string>;
125
- roles: string[];
126
- constructor(id: string, tenantId?: string, authScopeType?: string, authScopeId?: string, metadata?: Map<string, string>, roles?: string[]);
127
- }
105
+ type Participant = IParticipant;
128
106
  /**
129
107
  * Contains information about the connection that was established
130
108
  */
package/dist/index.js CHANGED
@@ -898,7 +898,7 @@ import { first, map as map2 } from "rxjs/operators";
898
898
  // packages/core/package.json
899
899
  var package_default = {
900
900
  name: "@kinotic-ai/core",
901
- version: "1.5.0",
901
+ version: "1.6.0",
902
902
  type: "module",
903
903
  files: [
904
904
  "dist"
@@ -1381,23 +1381,6 @@ class ConnectedInfo {
1381
1381
  replyToId;
1382
1382
  participant;
1383
1383
  }
1384
- // packages/core/src/api/security/Participant.ts
1385
- class Participant {
1386
- id;
1387
- tenantId;
1388
- authScopeType;
1389
- authScopeId;
1390
- metadata;
1391
- roles;
1392
- constructor(id, tenantId, authScopeType, authScopeId, metadata, roles) {
1393
- this.id = id;
1394
- this.tenantId = tenantId;
1395
- this.authScopeType = authScopeType;
1396
- this.authScopeId = authScopeId;
1397
- this.metadata = metadata || new Map;
1398
- this.roles = roles || [];
1399
- }
1400
- }
1401
1384
  // packages/core/src/api/security/ParticipantConstants.ts
1402
1385
  class ParticipantConstants {
1403
1386
  static PARTICIPANT_TYPE_METADATA_KEY = "type";
@@ -1418,7 +1401,6 @@ export {
1418
1401
  Scope,
1419
1402
  Publish,
1420
1403
  ParticipantConstants,
1421
- Participant,
1422
1404
  Pageable,
1423
1405
  Order,
1424
1406
  OffsetPageable,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kinotic-ai/core",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"