@i2analyze/notebook-sdk 1.5.1-dev.0 → 1.6.0-dev.2

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.
@@ -952,6 +952,30 @@ export declare namespace app {
952
952
  * @i2since 1.1
953
953
  */
954
954
  removeSelectedRecords(): void;
955
+ /**
956
+ * Creates an entity type.
957
+ *
958
+ * @param typeTemplate - The data from which to create the entity type.
959
+ * @returns The new, pending item type.
960
+ * @i2since 1.6
961
+ */
962
+ addEntityType(typeTemplate: schema.IChartEntityTypeData): schema.IPendingItemType;
963
+ /**
964
+ * Creates a link type.
965
+ *
966
+ * @param typeTemplate - The data from which to create the link type.
967
+ * @returns The new, pending item type.
968
+ * @i2since 1.6
969
+ */
970
+ addLinkType(typeTemplate: schema.IChartLinkTypeData): schema.IPendingItemType;
971
+ /**
972
+ * Gets an object with methods for editing an item type.
973
+ *
974
+ * @param itemType - The type to be edited.
975
+ * @returns The type-editing object..
976
+ * @i2since 1.6
977
+ */
978
+ editItemType(itemType: schema.ItemTypeSpecifier): schema.IItemTypeEditor;
955
979
  }
956
980
  /**
957
981
  * A collection of elements and records that together represent a selection on the chart surface.
@@ -3559,7 +3583,7 @@ export declare interface NotebookStatic {
3559
3583
  * @public
3560
3584
  * @i2since 1.0
3561
3585
  */
3562
- getEntryPointApi(pluginId: string, apiVersion: '1.0' | '1.1' | '1.2' | '1.3' | '1.4' | '1.5'): Promise<IEntryPointApi>;
3586
+ getEntryPointApi(pluginId: string, apiVersion: '1.0' | '1.1' | '1.2' | '1.3' | '1.4' | '1.5' | '1.6'): Promise<IEntryPointApi>;
3563
3587
  }
3564
3588
 
3565
3589
  /**
@@ -4270,6 +4294,11 @@ export declare namespace schema {
4270
4294
  * @i2since 1.1
4271
4295
  */
4272
4296
  readonly isInfoStore: boolean;
4297
+ /**
4298
+ * Indicates whether the item type is custom type.
4299
+ * @i2since 1.6
4300
+ */
4301
+ readonly isCustomType: boolean;
4273
4302
  /**
4274
4303
  * Gets the label definition for the item type, which describes how record labels are formed.
4275
4304
  * @i2since 1.0
@@ -4307,6 +4336,154 @@ export declare namespace schema {
4307
4336
  */
4308
4337
  readonly name?: string;
4309
4338
  }
4339
+ /**
4340
+ * A set of data for creating an item type.
4341
+ * @i2since 1.6
4342
+ */
4343
+ export interface IChartItemTypeData {
4344
+ /**
4345
+ * Gets or sets the display name of the item type.
4346
+ * @i2since 1.6
4347
+ */
4348
+ readonly displayName: string;
4349
+ /**
4350
+ * Gets or sets the propertyTypes of the item type.
4351
+ * @i2since 1.6
4352
+ */
4353
+ readonly propertyTypes?: Iterable<IPropertyTypeData>;
4354
+ /**
4355
+ * Gets or sets the labelDefinition of the item type.
4356
+ * @i2since 1.6
4357
+ */
4358
+ readonly labelDefinition?: Iterable<ILabelPart>;
4359
+ }
4360
+ /**
4361
+ * A set of data for creating an entity type.
4362
+ * @i2since 1.6
4363
+ */
4364
+ export interface IChartEntityTypeData extends IChartItemTypeData {
4365
+ /**
4366
+ * Gets or sets the image icon of the entity type.
4367
+ * @i2since 1.6
4368
+ */
4369
+ readonly icon: string;
4370
+ }
4371
+ /**
4372
+ * A set of data for creating a link type.
4373
+ * @i2since 1.6
4374
+ */
4375
+ export interface IChartLinkTypeData extends IChartItemTypeData {
4376
+ }
4377
+ /**
4378
+ * A set of data for creating a property type.
4379
+ * @i2since 1.6
4380
+ */
4381
+ export interface IPropertyTypeData {
4382
+ /**
4383
+ * Gets or sets the display name of the property type.
4384
+ * @i2since 1.6
4385
+ */
4386
+ readonly displayName: string;
4387
+ /**
4388
+ * Gets or sets the logicalType of the property type.
4389
+ * @i2since 1.6
4390
+ */
4391
+ readonly logicalType: ICustomLogicalType;
4392
+ }
4393
+ /**
4394
+ * An item type that has been created in a transaction handler, but has not yet been added to a chart's schema.
4395
+ * @i2since 1.6
4396
+ */
4397
+ export interface IPendingItemType extends IItemTypeEditor {
4398
+ /**
4399
+ * Gets the identifier of the item type.
4400
+ * @i2since 1.6
4401
+ */
4402
+ readonly analyzeId: string;
4403
+ }
4404
+ /**
4405
+ * A set of methods for modifying the contents of an item type.
4406
+ * @i2since 1.6
4407
+ */
4408
+ export interface IItemTypeEditor extends IPropertyTypeFactory {
4409
+ /**
4410
+ * Gets the item type as a custom type only.
4411
+ * @i2since 1.6
4412
+ */
4413
+ readonly isCustomType: true;
4414
+ /**
4415
+ * Sets the value of displayName on the item type.
4416
+ *
4417
+ * @param name - The value of the displayName to set.
4418
+ * @returns This item type editor, with the edited properties in place.
4419
+ * @i2since 1.6
4420
+ */
4421
+ setDisplayName(name: string): this;
4422
+ /**
4423
+ * Sets the value of label definition on the item type.
4424
+ * @param labelDefinition - The value of label definition to set.
4425
+ * @returns This item type editor, with the edited properties in place.
4426
+ * @i2since 1.6
4427
+ */
4428
+ setLabelDefinition(labelDefinition: Iterable<ILabelPart>): this;
4429
+ }
4430
+ /**
4431
+ * A set of methods to add and edit property types.
4432
+ * @i2since 1.6
4433
+ */
4434
+ export interface IPropertyTypeFactory {
4435
+ /**
4436
+ * Indicates the type is a custom type or not.
4437
+ * @i2since 1.6
4438
+ */
4439
+ isCustomType: boolean;
4440
+ /**
4441
+ * Creates a property type.
4442
+ *
4443
+ * @param propertyTypeTemplate - The data from which to create the property type.
4444
+ * @returns The new, pending property type.
4445
+ * @i2since 1.6
4446
+ */
4447
+ addPropertyType(propertyTypeTemplate: IPropertyTypeData): IPendingPropertyType;
4448
+ /**
4449
+ * Gets an object with methods for editing a property type.
4450
+ *
4451
+ * @param propertyType - The propertyType to be edited.
4452
+ * @returns The new, pending property type.
4453
+ * @i2since 1.6
4454
+ */
4455
+ editPropertyType(propertyType: CustomPropertyTypeSpecifier): IPendingPropertyType;
4456
+ }
4457
+ /**
4458
+ * A common specifier for a custom property type.
4459
+ * @i2since 1.6
4460
+ */
4461
+ export type CustomPropertyTypeSpecifier = IChartPropertyType | IPendingPropertyType | AnalyzePropertyTypeId;
4462
+ /**
4463
+ * A property type that has been created in a transaction handler, but has not yet been added to a chart's schema.
4464
+ * @i2since 1.6
4465
+ */
4466
+ export interface IPendingPropertyType extends IPropertyTypeEditor {
4467
+ /**
4468
+ * Gets identifier of a property type in the i2 Analyze schema.
4469
+ * @i2since 1.6
4470
+ */
4471
+ analyzeId: string;
4472
+ }
4473
+ /**
4474
+ * A set of methods for modifying the contents of a property type.
4475
+ * @i2since 1.6
4476
+ */
4477
+ export interface IPropertyTypeEditor {
4478
+ /**
4479
+ * Sets the value of displayName on the property type.
4480
+ *
4481
+ * @param name - The value of the displayName to set.
4482
+ * @returns This property type editor, with the edited properties in place.
4483
+ * @i2since 1.6
4484
+ */
4485
+ setDisplayName(name: string): this;
4486
+ }
4310
4487
  /**
4311
4488
  * The type of a schema.
4312
4489
  * @i2since 1.5
@@ -4317,8 +4494,14 @@ export declare namespace schema {
4317
4494
  * - `gateway`: A gateway schema.
4318
4495
  * - `connector`: A connector schema.
4319
4496
  * - `unknown`: An unknown schema, which can denote an orphaned item type.
4497
+ * - `custom`: A user defined type.
4498
+ */
4499
+ export type SchemaType = 'infostore' | 'gateway' | 'connector' | 'unknown' | 'custom';
4500
+ /**
4501
+ * A common specifier for an item type.
4502
+ * @i2since 1.6
4320
4503
  */
4321
- export type SchemaType = 'infostore' | 'gateway' | 'connector' | 'unknown';
4504
+ export type ItemTypeSpecifier = AnalyzeItemTypeId | IChartItemType | IPendingItemType;
4322
4505
  /**
4323
4506
  * An identifier of a property type in a chart schema.
4324
4507
  * @i2since 1.0
@@ -4379,6 +4562,11 @@ export declare namespace schema {
4379
4562
  * @i2since 1.0
4380
4563
  */
4381
4564
  readonly isOrphaned: boolean;
4565
+ /**
4566
+ * Indicates whether the property type is custom type.
4567
+ * @i2since 1.6
4568
+ */
4569
+ readonly isCustomType: boolean;
4382
4570
  /**
4383
4571
  * Gets the maximum string length for the value of a property that has the property type.
4384
4572
  *
@@ -4423,6 +4611,12 @@ export declare namespace schema {
4423
4611
  */
4424
4612
  readonly description?: string;
4425
4613
  }
4614
+ /**
4615
+ * A logical type for the value of a custom property.
4616
+ * @i2since 1.6
4617
+ */
4618
+ export interface ICustomLogicalType extends Omit<data.LogicalType, 'selectedFromList' | 'suggestedFromList'> {
4619
+ }
4426
4620
  /**
4427
4621
  * A schema for notes, which places constraints on their use.
4428
4622
  * @i2since 1.0
package/lib/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  * i2, i2 Group, the i2 Group logo, and i2group.com are trademarks of N.Harris Computer Corporation.
3
3
  * © N.Harris Computer Corporation (2022)
4
4
  */
5
- const apiVersion = '1.5';
5
+ const apiVersion = '1.6';
6
6
  /**
7
7
  * Retrieves the plug-in entry point API.
8
8
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@i2analyze/notebook-sdk",
3
- "version": "1.5.1-dev.0",
3
+ "version": "1.6.0-dev.2",
4
4
  "description": "i2 Notebook SDK",
5
5
  "license": "MIT",
6
6
  "publishConfig": {