@kinotic-ai/os-api 1.0.15 → 1.0.16

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
@@ -71,6 +71,7 @@ __export(exports_src, {
71
71
  LoggerLevelsDescriptor: () => LoggerLevelsDescriptor,
72
72
  LogManager: () => LogManager,
73
73
  LogLevel: () => LogLevel,
74
+ KinoticProjectConfig: () => KinoticProjectConfig,
74
75
  IdDecorator: () => IdDecorator,
75
76
  IamUserService: () => IamUserService,
76
77
  IamUser: () => IamUser,
@@ -297,6 +298,7 @@ var ProjectType;
297
298
  // packages/os-api/src/api/model/EntityDefinition.ts
298
299
  class EntityDefinition {
299
300
  id;
301
+ organizationId;
300
302
  applicationId;
301
303
  projectId;
302
304
  name;
@@ -317,6 +319,7 @@ class EntityDefinition {
317
319
  // packages/os-api/src/api/model/NamedQueriesDefinition.ts
318
320
  class NamedQueriesDefinition {
319
321
  id;
322
+ organizationId;
320
323
  applicationId;
321
324
  projectId;
322
325
  entityDefinitionName;
@@ -427,6 +430,17 @@ class IamUser {
427
430
  created = null;
428
431
  updated = null;
429
432
  }
433
+ // packages/os-api/src/api/model/KinoticProjectConfig.ts
434
+ class KinoticProjectConfig {
435
+ name;
436
+ description;
437
+ organization;
438
+ application;
439
+ entitiesPaths;
440
+ generatedPath;
441
+ fileExtensionForImports = ".js";
442
+ validate;
443
+ }
430
444
  // packages/os-api/src/api/services/IApplicationService.ts
431
445
  var import_core = require("@kinotic-ai/core");
432
446
 
package/dist/index.d.cts CHANGED
@@ -180,6 +180,11 @@ import { Identifiable as Identifiable3 } from "@kinotic-ai/core";
180
180
  declare class EntityDefinition implements Identifiable3<string> {
181
181
  id: string | null;
182
182
  /**
183
+ * The id of the organization that owns this entity definition.
184
+ * Populated server-side by org enforcement on save.
185
+ */
186
+ organizationId: string;
187
+ /**
183
188
  * The id of the application that this entity definition belongs to.
184
189
  * All application ids are unique throughout the entire system.
185
190
  */
@@ -205,6 +210,7 @@ import { FunctionDefinition } from "@kinotic-ai/idl";
205
210
  */
206
211
  declare class NamedQueriesDefinition implements Identifiable4<string> {
207
212
  id: string;
213
+ organizationId?: string | null;
208
214
  applicationId: string;
209
215
  projectId: string;
210
216
  entityDefinitionName: string;
@@ -528,6 +534,70 @@ interface SignUpCompleteRequest {
528
534
  token: string;
529
535
  password: string;
530
536
  }
537
+ /**
538
+ * Configuration for a single entities path and its corresponding repository output.
539
+ */
540
+ type EntitiesPathConfig = {
541
+ /**
542
+ * The path to search for classes decorated with @Entity.
543
+ */
544
+ path: string;
545
+ /**
546
+ * The path where generated Repository classes will be placed.
547
+ */
548
+ repositoryPath: string;
549
+ /**
550
+ * If true, the subfolder structure under the entities path will be mirrored under the repository path.
551
+ * For example, if entitiesPath is "src/model" and contains "payments/Payment.ts",
552
+ * the generated repository will be placed in "repositoryPath/payments/".
553
+ * If false, all generated repositories are placed directly in the repositoryPath.
554
+ * Defaults to true.
555
+ */
556
+ mirrorFolderStructure?: boolean;
557
+ };
558
+ /**
559
+ * The project configuration for a Kinotic project.
560
+ */
561
+ declare class KinoticProjectConfig {
562
+ /**
563
+ * The name of the project or undefined if a project name is used.
564
+ * i.e. if the project is typescript the package.json name will be used.
565
+ */
566
+ name?: string;
567
+ /**
568
+ * The description of the project.
569
+ */
570
+ description?: string;
571
+ /**
572
+ * The Kinotic Organization that this project belongs to.
573
+ */
574
+ organization: string;
575
+ /**
576
+ * The Kinotic Application that this project belongs to.
577
+ */
578
+ application: string;
579
+ /**
580
+ * The paths to search for classes decorated with @Entity that Kinotic will be created for.
581
+ * Each entry can be a string (simple path) or an {@link EntitiesPathConfig} object for full control
582
+ * over where repository classes are generated.
583
+ *
584
+ * When a plain string is provided, the {@link generatedPath} will be used as the repository output path.
585
+ */
586
+ entitiesPaths: (string | EntitiesPathConfig)[];
587
+ /**
588
+ * The default path to where generated files will be placed when entitiesPaths contains plain strings.
589
+ * Ignored for entitiesPaths entries that use {@link EntitiesPathConfig}.
590
+ */
591
+ generatedPath?: string;
592
+ /**
593
+ * The file extension to use for imports in generated files.
594
+ */
595
+ fileExtensionForImports: string;
596
+ /**
597
+ * If true the generated Repository classes will validate all data before sending to the server.
598
+ */
599
+ validate?: boolean;
600
+ }
531
601
  import { IKinotic } from "@kinotic-ai/core";
532
602
  import { CrudServiceProxy, ICrudServiceProxy } from "@kinotic-ai/core";
533
603
  interface IApplicationService extends ICrudServiceProxy<Application> {
@@ -880,4 +950,4 @@ declare const OsApiPlugin: KinoticPlugin<IOsApiExtension>;
880
950
  declare module "@kinotic-ai/core" {
881
951
  interface KinoticSingleton extends IOsApiExtension {}
882
952
  }
883
- export { WorkloadStatus, WorkloadServiceProxy, Workload, VmProviderType, VmNodeStatus, VmNodeServiceProxy, VmNode, VersionDecorator, TimeReferenceDecorator, TextDecorator, TenantSelectionC3Type, TenantIdDecorator, SingleLoggerLevelsDescriptor, SignUpRequest, SignUpCompleteRequest, QueryOptionsC3Type, QueryDecorator, ProjectType, ProjectService, Project, ProgressType, PageableC3Type, PageC3Type, OsApiPlugin, NotIndexedDecorator, NestedDecorator, NamedQueriesDefinitionService, NamedQueriesDefinition, MigrationService, MigrationResult, MigrationRequest, MigrationDefinition, LoggersDescriptor, LoggerLevelsDescriptor, LogManager, LogLevel, InsightRequest, InsightProgress, IdDecorator, IamUserService, IamUser, IWorkloadService, IVmNodeService, IProjectService, IOsApiExtension, INamedQueriesDefinitionService, IMigrationService, ILogManager, IIamUserService, IEntityDefinitionService, IDataInsightsService, IApplicationService, GroupLoggerLevelsDescriptor, FlattenedDecorator, EsIndexConfigurationDecorator, EntityDefinitionService, EntityDefinition, EntityDecorator, DiscriminatorDecorator, DataInsightsService, DataInsightsComponent, AutoGeneratedIdDecorator, AuthType, ApplicationService, Application };
953
+ export { WorkloadStatus, WorkloadServiceProxy, Workload, VmProviderType, VmNodeStatus, VmNodeServiceProxy, VmNode, VersionDecorator, TimeReferenceDecorator, TextDecorator, TenantSelectionC3Type, TenantIdDecorator, SingleLoggerLevelsDescriptor, SignUpRequest, SignUpCompleteRequest, QueryOptionsC3Type, QueryDecorator, ProjectType, ProjectService, Project, ProgressType, PageableC3Type, PageC3Type, OsApiPlugin, NotIndexedDecorator, NestedDecorator, NamedQueriesDefinitionService, NamedQueriesDefinition, MigrationService, MigrationResult, MigrationRequest, MigrationDefinition, LoggersDescriptor, LoggerLevelsDescriptor, LogManager, LogLevel, KinoticProjectConfig, InsightRequest, InsightProgress, IdDecorator, IamUserService, IamUser, IWorkloadService, IVmNodeService, IProjectService, IOsApiExtension, INamedQueriesDefinitionService, IMigrationService, ILogManager, IIamUserService, IEntityDefinitionService, IDataInsightsService, IApplicationService, GroupLoggerLevelsDescriptor, FlattenedDecorator, EsIndexConfigurationDecorator, EntityDefinitionService, EntityDefinition, EntityDecorator, EntitiesPathConfig, DiscriminatorDecorator, DataInsightsService, DataInsightsComponent, AutoGeneratedIdDecorator, AuthType, ApplicationService, Application };
package/dist/index.d.ts CHANGED
@@ -180,6 +180,11 @@ import { Identifiable as Identifiable3 } from "@kinotic-ai/core";
180
180
  declare class EntityDefinition implements Identifiable3<string> {
181
181
  id: string | null;
182
182
  /**
183
+ * The id of the organization that owns this entity definition.
184
+ * Populated server-side by org enforcement on save.
185
+ */
186
+ organizationId: string;
187
+ /**
183
188
  * The id of the application that this entity definition belongs to.
184
189
  * All application ids are unique throughout the entire system.
185
190
  */
@@ -205,6 +210,7 @@ import { FunctionDefinition } from "@kinotic-ai/idl";
205
210
  */
206
211
  declare class NamedQueriesDefinition implements Identifiable4<string> {
207
212
  id: string;
213
+ organizationId?: string | null;
208
214
  applicationId: string;
209
215
  projectId: string;
210
216
  entityDefinitionName: string;
@@ -528,6 +534,70 @@ interface SignUpCompleteRequest {
528
534
  token: string;
529
535
  password: string;
530
536
  }
537
+ /**
538
+ * Configuration for a single entities path and its corresponding repository output.
539
+ */
540
+ type EntitiesPathConfig = {
541
+ /**
542
+ * The path to search for classes decorated with @Entity.
543
+ */
544
+ path: string;
545
+ /**
546
+ * The path where generated Repository classes will be placed.
547
+ */
548
+ repositoryPath: string;
549
+ /**
550
+ * If true, the subfolder structure under the entities path will be mirrored under the repository path.
551
+ * For example, if entitiesPath is "src/model" and contains "payments/Payment.ts",
552
+ * the generated repository will be placed in "repositoryPath/payments/".
553
+ * If false, all generated repositories are placed directly in the repositoryPath.
554
+ * Defaults to true.
555
+ */
556
+ mirrorFolderStructure?: boolean;
557
+ };
558
+ /**
559
+ * The project configuration for a Kinotic project.
560
+ */
561
+ declare class KinoticProjectConfig {
562
+ /**
563
+ * The name of the project or undefined if a project name is used.
564
+ * i.e. if the project is typescript the package.json name will be used.
565
+ */
566
+ name?: string;
567
+ /**
568
+ * The description of the project.
569
+ */
570
+ description?: string;
571
+ /**
572
+ * The Kinotic Organization that this project belongs to.
573
+ */
574
+ organization: string;
575
+ /**
576
+ * The Kinotic Application that this project belongs to.
577
+ */
578
+ application: string;
579
+ /**
580
+ * The paths to search for classes decorated with @Entity that Kinotic will be created for.
581
+ * Each entry can be a string (simple path) or an {@link EntitiesPathConfig} object for full control
582
+ * over where repository classes are generated.
583
+ *
584
+ * When a plain string is provided, the {@link generatedPath} will be used as the repository output path.
585
+ */
586
+ entitiesPaths: (string | EntitiesPathConfig)[];
587
+ /**
588
+ * The default path to where generated files will be placed when entitiesPaths contains plain strings.
589
+ * Ignored for entitiesPaths entries that use {@link EntitiesPathConfig}.
590
+ */
591
+ generatedPath?: string;
592
+ /**
593
+ * The file extension to use for imports in generated files.
594
+ */
595
+ fileExtensionForImports: string;
596
+ /**
597
+ * If true the generated Repository classes will validate all data before sending to the server.
598
+ */
599
+ validate?: boolean;
600
+ }
531
601
  import { IKinotic } from "@kinotic-ai/core";
532
602
  import { CrudServiceProxy, ICrudServiceProxy } from "@kinotic-ai/core";
533
603
  interface IApplicationService extends ICrudServiceProxy<Application> {
@@ -880,4 +950,4 @@ declare const OsApiPlugin: KinoticPlugin<IOsApiExtension>;
880
950
  declare module "@kinotic-ai/core" {
881
951
  interface KinoticSingleton extends IOsApiExtension {}
882
952
  }
883
- export { WorkloadStatus, WorkloadServiceProxy, Workload, VmProviderType, VmNodeStatus, VmNodeServiceProxy, VmNode, VersionDecorator, TimeReferenceDecorator, TextDecorator, TenantSelectionC3Type, TenantIdDecorator, SingleLoggerLevelsDescriptor, SignUpRequest, SignUpCompleteRequest, QueryOptionsC3Type, QueryDecorator, ProjectType, ProjectService, Project, ProgressType, PageableC3Type, PageC3Type, OsApiPlugin, NotIndexedDecorator, NestedDecorator, NamedQueriesDefinitionService, NamedQueriesDefinition, MigrationService, MigrationResult, MigrationRequest, MigrationDefinition, LoggersDescriptor, LoggerLevelsDescriptor, LogManager, LogLevel, InsightRequest, InsightProgress, IdDecorator, IamUserService, IamUser, IWorkloadService, IVmNodeService, IProjectService, IOsApiExtension, INamedQueriesDefinitionService, IMigrationService, ILogManager, IIamUserService, IEntityDefinitionService, IDataInsightsService, IApplicationService, GroupLoggerLevelsDescriptor, FlattenedDecorator, EsIndexConfigurationDecorator, EntityDefinitionService, EntityDefinition, EntityDecorator, DiscriminatorDecorator, DataInsightsService, DataInsightsComponent, AutoGeneratedIdDecorator, AuthType, ApplicationService, Application };
953
+ export { WorkloadStatus, WorkloadServiceProxy, Workload, VmProviderType, VmNodeStatus, VmNodeServiceProxy, VmNode, VersionDecorator, TimeReferenceDecorator, TextDecorator, TenantSelectionC3Type, TenantIdDecorator, SingleLoggerLevelsDescriptor, SignUpRequest, SignUpCompleteRequest, QueryOptionsC3Type, QueryDecorator, ProjectType, ProjectService, Project, ProgressType, PageableC3Type, PageC3Type, OsApiPlugin, NotIndexedDecorator, NestedDecorator, NamedQueriesDefinitionService, NamedQueriesDefinition, MigrationService, MigrationResult, MigrationRequest, MigrationDefinition, LoggersDescriptor, LoggerLevelsDescriptor, LogManager, LogLevel, KinoticProjectConfig, InsightRequest, InsightProgress, IdDecorator, IamUserService, IamUser, IWorkloadService, IVmNodeService, IProjectService, IOsApiExtension, INamedQueriesDefinitionService, IMigrationService, ILogManager, IIamUserService, IEntityDefinitionService, IDataInsightsService, IApplicationService, GroupLoggerLevelsDescriptor, FlattenedDecorator, EsIndexConfigurationDecorator, EntityDefinitionService, EntityDefinition, EntityDecorator, EntitiesPathConfig, DiscriminatorDecorator, DataInsightsService, DataInsightsComponent, AutoGeneratedIdDecorator, AuthType, ApplicationService, Application };
package/dist/index.js CHANGED
@@ -206,6 +206,7 @@ var ProjectType;
206
206
  // packages/os-api/src/api/model/EntityDefinition.ts
207
207
  class EntityDefinition {
208
208
  id;
209
+ organizationId;
209
210
  applicationId;
210
211
  projectId;
211
212
  name;
@@ -226,6 +227,7 @@ class EntityDefinition {
226
227
  // packages/os-api/src/api/model/NamedQueriesDefinition.ts
227
228
  class NamedQueriesDefinition {
228
229
  id;
230
+ organizationId;
229
231
  applicationId;
230
232
  projectId;
231
233
  entityDefinitionName;
@@ -336,6 +338,17 @@ class IamUser {
336
338
  created = null;
337
339
  updated = null;
338
340
  }
341
+ // packages/os-api/src/api/model/KinoticProjectConfig.ts
342
+ class KinoticProjectConfig {
343
+ name;
344
+ description;
345
+ organization;
346
+ application;
347
+ entitiesPaths;
348
+ generatedPath;
349
+ fileExtensionForImports = ".js";
350
+ validate;
351
+ }
339
352
  // packages/os-api/src/api/services/IApplicationService.ts
340
353
  import { CrudServiceProxy } from "@kinotic-ai/core";
341
354
 
@@ -613,6 +626,7 @@ export {
613
626
  LoggerLevelsDescriptor,
614
627
  LogManager,
615
628
  LogLevel,
629
+ KinoticProjectConfig,
616
630
  IdDecorator,
617
631
  IamUserService,
618
632
  IamUser,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kinotic-ai/os-api",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@kinotic-ai/idl": "1.0.9",
40
- "@kinotic-ai/persistence": "1.1.0",
40
+ "@kinotic-ai/persistence": "1.1.1",
41
41
  "rxjs": "^7.8.2"
42
42
  },
43
43
  "devDependencies": {