@i2analyze/notebook-sdk 1.6.0-dev.1 → 1.6.0-dev.11

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 a custom entity type that is added to the chart on committal.
957
+ *
958
+ * @param typeTemplate - The data for creating the custom 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 custom link type that is added to the chart on committal.
965
+ *
966
+ * @param typeTemplate - The data for creating the custom 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 a schema or custom item type.
973
+ *
974
+ * @param itemType - The item type to be edited.
975
+ * @returns The type-editing object.
976
+ * @i2since 1.6
977
+ */
978
+ editItemType(itemType: schema.ItemTypeSpecifier): schema.IItemTypeEditor | schema.IPropertyTypeFactory;
955
979
  }
956
980
  /**
957
981
  * A collection of elements and records that together represent a selection on the chart surface.
@@ -4041,29 +4065,10 @@ export declare namespace schema {
4041
4065
  */
4042
4066
  readonly sourceIdentifiersSchema: ISourceIdentifiersSchema;
4043
4067
  /**
4044
- * Creates an entity type.
4045
- *
4046
- * @param typeTemplate - The data from which to create the entity type.
4047
- * @returns The new, pending item type.
4048
- * @i2since 1.6
4049
- */
4050
- addEntityType(typeTemplate: IChartEntityTypeData): IPendingItemType;
4051
- /**
4052
- * Creates a link type.
4053
- *
4054
- * @param typeTemplate - The data from which to create the link type.
4055
- * @returns The new, pending item type.
4056
- * @i2since 1.6
4057
- */
4058
- addLinkType(typeTemplate: IChartLinkTypeData): IPendingItemType;
4059
- /**
4060
- * Gets an object with methods for editing an item type.
4061
- *
4062
- * @param itemType - The type to be edited.
4063
- * @returns The type-editing object..
4068
+ * Gets the maximum length for the names of custom types.
4064
4069
  * @i2since 1.6
4065
4070
  */
4066
- editItemType(itemType: ItemTypeSpecifier): IItemTypeEditor;
4071
+ readonly maxCustomTypeNameLength: data.ICharLimit;
4067
4072
  }
4068
4073
  /**
4069
4074
  * A schema for source identifiers, which places constraints on their use.
@@ -4295,10 +4300,10 @@ export declare namespace schema {
4295
4300
  */
4296
4301
  readonly isInfoStore: boolean;
4297
4302
  /**
4298
- * Indicates whether the item type is custom type.
4303
+ * Indicates whether the item type is a custom type.
4299
4304
  * @i2since 1.6
4300
4305
  */
4301
- readonly isCustomType: boolean;
4306
+ readonly isCustom: boolean;
4302
4307
  /**
4303
4308
  * Gets the label definition for the item type, which describes how record labels are formed.
4304
4309
  * @i2since 1.0
@@ -4337,88 +4342,79 @@ export declare namespace schema {
4337
4342
  readonly name?: string;
4338
4343
  }
4339
4344
  /**
4340
- * A set of data for creating an item type.
4345
+ * A set of data that is common to creating all custom item types.
4341
4346
  * @i2since 1.6
4342
4347
  */
4343
- export interface IChartItemTypeData {
4348
+ export interface IChartItemTypeDataBase {
4344
4349
  /**
4345
- * Gets or sets the display name of the item type.
4350
+ * Gets the display name for the custom item type.
4346
4351
  * @i2since 1.6
4347
4352
  */
4348
4353
  readonly displayName: string;
4349
4354
  /**
4350
- * Gets or sets the description of the item type.
4351
- * @i2since 1.6
4352
- */
4353
- readonly description?: string;
4354
- /**
4355
- * Gets or sets the semanticTypeId of the item type.
4356
- * @i2since 1.6
4357
- */
4358
- readonly semanticTypeId?: string;
4359
- /**
4360
- * Gets or sets the propertyTypes of the item type.
4355
+ * Gets the property types for the custom item type.
4361
4356
  * @i2since 1.6
4362
4357
  */
4363
4358
  readonly propertyTypes?: Iterable<IPropertyTypeData>;
4364
4359
  /**
4365
- * Gets or sets the labelDefinition of the item type.
4360
+ * Gets the label definition for the custom item type.
4366
4361
  * @i2since 1.6
4367
4362
  */
4368
- readonly labelDefinition?: Iterable<ILabelPart>;
4363
+ readonly labelDefinition?: Iterable<ILabelPartData>;
4369
4364
  }
4370
4365
  /**
4371
- * A set of data for creating an entity type.
4366
+ * A set of data for creating a custom entity type.
4372
4367
  * @i2since 1.6
4373
4368
  */
4374
- export interface IChartEntityTypeData extends IChartItemTypeData {
4369
+ export interface IChartEntityTypeData extends IChartItemTypeDataBase {
4375
4370
  /**
4376
- * Gets or sets the image icon of the entity type.
4371
+ * Gets the name of the icon for the custom entity type.
4377
4372
  * @i2since 1.6
4378
4373
  */
4379
- readonly icon: IImageData;
4374
+ readonly icon: string;
4380
4375
  }
4381
4376
  /**
4382
- * A set of data for creating a link type.
4377
+ * A set of data for creating a custom link type.
4383
4378
  * @i2since 1.6
4384
4379
  */
4385
- export interface IChartLinkTypeData extends IChartItemTypeData {
4380
+ export interface IChartLinkTypeData extends IChartItemTypeDataBase {
4386
4381
  }
4387
4382
  /**
4388
- * A set of data for creating a property type.
4383
+ * A set of data for creating a label definition.
4389
4384
  * @i2since 1.6
4390
4385
  */
4391
- export interface IPropertyTypeData {
4392
- /**
4393
- * Gets or sets the display name of the property type.
4394
- * @i2since 1.6
4395
- */
4396
- readonly displayName: string;
4397
- /**
4398
- * Gets or sets the logicalType of the property type.
4399
- * @i2since 1.6
4400
- */
4401
- readonly logicalType: data.LogicalType;
4386
+ export type ILabelPartData = ILiteralLabelPart | IChartPropertyLabelPart | IPendingPropertyLabelPart;
4387
+ /**
4388
+ * A part of a label that consists of a pending custom property type.
4389
+ * @i2since 1.6
4390
+ */
4391
+ export interface IPendingPropertyLabelPart {
4402
4392
  /**
4403
- * Gets or sets the description of the property type.
4393
+ * Gets the type of the property whose value is used for the label part.
4404
4394
  * @i2since 1.6
4405
4395
  */
4406
- readonly description?: string;
4396
+ readonly propertyType: IPendingPropertyType;
4407
4397
  /**
4408
- * Gets or sets the semanticTypeId of the property type.
4398
+ * Gets the type of label part.
4409
4399
  * @i2since 1.6
4410
4400
  */
4411
- readonly semanticTypeId?: string;
4401
+ readonly type: 'chartProperty';
4402
+ }
4403
+ /**
4404
+ * A set of data for creating a custom property type.
4405
+ * @i2since 1.6
4406
+ */
4407
+ export interface IPropertyTypeData {
4412
4408
  /**
4413
- * Indicates whether the property type is mandatory.
4409
+ * Gets the display name of the custom property type.
4414
4410
  * @i2since 1.6
4415
4411
  */
4416
- readonly mandatory?: boolean;
4412
+ readonly displayName: string;
4417
4413
  /**
4418
- * Gets or sets the possibleValues of the property type.
4414
+ * Gets the logical type of the custom property type.
4419
4415
  * @i2since 1.6
4420
4416
  */
4421
- readonly possibleValues?: Iterable<IPossibleValue>;
4417
+ readonly logicalType: CustomLogicalType;
4422
4418
  }
4423
4419
  /**
4424
4420
  * An item type that has been created in a transaction handler, but has not yet been added to a chart's schema.
@@ -4429,141 +4425,117 @@ export declare namespace schema {
4429
4425
  * Gets the identifier of the item type.
4430
4426
  * @i2since 1.6
4431
4427
  */
4432
- readonly analyzeId: string;
4428
+ readonly typeId: AnalyzeItemTypeId;
4433
4429
  }
4434
4430
  /**
4435
- * A set of methods for modifying the contents of an item type.
4431
+ * A set of methods for modifying a custom item type.
4436
4432
  * @i2since 1.6
4437
4433
  */
4438
4434
  export interface IItemTypeEditor extends IPropertyTypeFactory {
4439
4435
  /**
4440
- * Gets the item type as a custom type only.
4436
+ * Indicates that the item type is a custom type.
4441
4437
  * @i2since 1.6
4442
4438
  */
4443
4439
  readonly isCustomType: true;
4444
4440
  /**
4445
- * Sets the value of displayName on the item type.
4441
+ * Sets the display name of the item type.
4446
4442
  *
4447
- * @param name - The value of the displayName to set.
4448
- * @returns This item type editor, with the edited properties in place.
4449
- * @i2since 1.6
4450
- */
4451
- setDisplayName(name: string): this;
4452
- /**
4453
- * Sets the value of description on the item type.
4454
- * @param description - The value of the displayName to set.
4455
- * @returns This item type editor, with the edited properties in place.
4456
- * @i2since 1.6
4457
- */
4458
- setDescription(description: string): this;
4459
- /**
4460
- * Sets the value of semantic type id on the item type.
4461
- * @param semanticId - The value of the semantic type id to set.
4462
- * @returns This item type editor, with the edited properties in place.
4443
+ * @param displayName - The display name to set.
4444
+ * @returns This item type, with the new display name in place.
4463
4445
  * @i2since 1.6
4464
4446
  */
4465
- setSemanticTypeId(semanticId: string): this;
4447
+ setDisplayName(displayName: string): this;
4466
4448
  /**
4467
- * Sets the value of label definition on the item type.
4468
- * @param labelDefinition - The value of label definition to set.
4469
- * @returns This item type editor, with the edited properties in place.
4449
+ * Sets the label definition of the item type.
4450
+ *
4451
+ * @param labelDefinition - The label definition to set.
4452
+ * @returns This item type, with the new label definition in place.
4470
4453
  * @i2since 1.6
4471
4454
  */
4472
- setLabelDefinition(labelDefinition: Iterable<ILabelPart>): this;
4455
+ setLabelDefinition(labelDefinition: Iterable<ILabelPartData>): this;
4473
4456
  }
4474
4457
  /**
4475
- * A set of methods to add and edit property types.
4458
+ * A set of methods for adding and editing custom property types on schema and custom item types.
4476
4459
  * @i2since 1.6
4477
4460
  */
4478
4461
  export interface IPropertyTypeFactory {
4479
4462
  /**
4480
- * Indicates the type is a custom type or not.
4463
+ * Indicates whether the item type is a custom type.
4481
4464
  * @i2since 1.6
4482
4465
  */
4483
4466
  isCustomType: boolean;
4484
4467
  /**
4485
- * Creates a property type.
4468
+ * Creates a custom property type that is added to the chart schema on committal.
4486
4469
  *
4487
- * @param propertyTypeTemplate - The data from which to create the property type.
4470
+ * @param propertyTypeTemplate - The data for creating the custom property type.
4471
+ * @param insertAfter - The position of the new property type.
4472
+ * If this is not provided, the new property type is added at the end of the list.
4473
+ * If this is null, the new property type is added at the beginning of the list.
4488
4474
  * @returns The new, pending property type.
4489
4475
  * @i2since 1.6
4490
4476
  */
4491
- addPropertyType(propertyTypeTemplate: IPropertyTypeData): IPendingPropertyType;
4477
+ addPropertyType(propertyTypeTemplate: IPropertyTypeData, insertAfter?: CustomPropertyTypeSpecifier | null): IPendingPropertyType;
4492
4478
  /**
4493
- * Gets an object with methods for editing a property type.
4479
+ * Gets an object with methods for editing a custom property type.
4494
4480
  *
4495
- * @param propertyType - The propertyType to be edited.
4496
- * @returns The new, pending property type.
4481
+ * @param propertyType - The custom property type to be edited.
4482
+ * @returns The type-editing object.
4497
4483
  * @i2since 1.6
4498
4484
  */
4499
- editPropertyType(propertyType: PropertyTypeSpecifier): IPendingPropertyType;
4485
+ editPropertyType(propertyType: CustomPropertyTypeSpecifier): IPropertyTypeEditor;
4500
4486
  /**
4501
- * Gets an object with methods for editing a property type.
4487
+ * Gets an object with methods for editing a custom property type.
4502
4488
  *
4503
- * @param analyzePropertyTypeId - The id of the propertyType to be edited.
4504
- * @param logicalType - The logical type of the propertyType to be edited.
4505
- * @returns The new, pending property type.
4489
+ * @param typeId - The identifier of the property type to be edited.
4490
+ * @param logicalType - The logical type of the property type to be edited.
4491
+ * @returns The type-editing object.
4506
4492
  * @i2since 1.6
4507
4493
  */
4508
- editPropertyType(analyzePropertyTypeId: AnalyzePropertyTypeId, logicalType: data.LogicalType): IPendingPropertyType;
4494
+ editPropertyType(typeId: AnalyzePropertyTypeId, logicalType: CustomLogicalType): IPropertyTypeEditor;
4509
4495
  }
4510
4496
  /**
4511
- * A property type that has been created in a transaction handler, but has not yet been added to a chart's schema.
4497
+ * A common specifier for a custom property type.
4498
+ * @i2since 1.6
4499
+ */
4500
+ export type CustomPropertyTypeSpecifier = IChartPropertyType | IPendingPropertyType;
4501
+ /**
4502
+ * A custom property type that has been created in a transaction handler, but has not yet been added to a chart schema.
4512
4503
  * @i2since 1.6
4513
4504
  */
4514
4505
  export interface IPendingPropertyType extends IPropertyTypeEditor {
4515
4506
  /**
4516
- * Gets identifier of a property type in the i2 Analyze schema.
4507
+ * Gets or sets the identifier of the property type.
4517
4508
  * @i2since 1.6
4518
4509
  */
4519
- analyzeId: string;
4510
+ typeId: AnalyzePropertyTypeId;
4520
4511
  /**
4521
- * Gets the logical type of the property type.
4512
+ * Gets or sets the logical type of the property type.
4522
4513
  * @i2since 1.6
4523
4514
  */
4524
- logicalType: data.LogicalType;
4515
+ logicalType: CustomLogicalType;
4525
4516
  }
4526
4517
  /**
4527
- * A set of methods for modifying the contents of a property type.
4518
+ * A set of methods for modifying a custom property type.
4528
4519
  * @i2since 1.6
4529
4520
  */
4530
4521
  export interface IPropertyTypeEditor {
4531
4522
  /**
4532
- * Sets the value of displayName on the property type.
4523
+ * Sets the display name of the property type.
4533
4524
  *
4534
- * @param name - The value of the displayName to set.
4535
- * @returns This property type editor, with the edited properties in place.
4536
- * @i2since 1.6
4537
- */
4538
- setDisplayName(name: string): this;
4539
- /**
4540
- * Sets the value of description on the property type.
4541
- * @param description - The value of the description to set.
4542
- * @returns This property type editor, with the edited properties in place.
4525
+ * @param displayName - The display name to set.
4526
+ * @returns This property type, with the new display name in place.
4543
4527
  * @i2since 1.6
4544
4528
  */
4545
- setDescription(description: string): this;
4529
+ setDisplayName(displayName: string): this;
4546
4530
  /**
4547
- * Sets the value of semantic type id on the property type.
4548
- * @param typeId - The value of the semantic type id to set.
4549
- * @returns This property type editor, with the edited properties in place.
4550
- * @i2since 1.6
4551
- */
4552
- setSemanticTypeId(typeId: string): this;
4553
- /**
4554
- * Sets the given property type is mandatory or not.
4555
- * @param isMandatory - The value of the logical type to set.
4556
- * @returns This property type editor, with the edited properties in place.
4557
- * @i2since 1.6
4558
- */
4559
- setMandatory(isMandatory: boolean): this;
4560
- /**
4561
- * Sets the value of the property type.
4562
- * @param values - The value for a property to set.
4531
+ * Moves the property type after the specified property type.
4532
+ *
4533
+ * @param propertyType - The property type that serves as the reference for positioning.
4534
+ * Passing null moves the property type to the beginning of the list.
4563
4535
  * @returns This property type editor, with the edited properties in place.
4564
4536
  * @i2since 1.6
4565
4537
  */
4566
- setPossibleValues(values: Iterable<IPossibleValue>): this;
4538
+ moveAfter(propertyType: CustomPropertyTypeSpecifier | null): this;
4567
4539
  }
4568
4540
  /**
4569
4541
  * The type of a schema.
@@ -4571,10 +4543,11 @@ export declare namespace schema {
4571
4543
  *
4572
4544
  * @remarks
4573
4545
  * The possible values are:
4574
- * - `infostore`: The Information Store schema.
4575
- * - `gateway`: A gateway schema.
4576
- * - `connector`: A connector schema.
4577
- * - `unknown`: An unknown schema, which can denote an orphaned item type.
4546
+ * `infostore` - The Information Store schema.
4547
+ * `gateway` - A gateway schema.
4548
+ * `connector` - A connector schema.
4549
+ * `unknown` - An unknown schema, which can denote an orphaned item type.
4550
+ * `custom` - A schema that contains user-created types.
4578
4551
  */
4579
4552
  export type SchemaType = 'infostore' | 'gateway' | 'connector' | 'unknown' | 'custom';
4580
4553
  /**
@@ -4643,7 +4616,7 @@ export declare namespace schema {
4643
4616
  */
4644
4617
  readonly isOrphaned: boolean;
4645
4618
  /**
4646
- * Indicates whether the property type is custom type.
4619
+ * Indicates whether the property type is a custom type.
4647
4620
  * @i2since 1.6
4648
4621
  */
4649
4622
  readonly isCustomType: boolean;
@@ -4691,6 +4664,11 @@ export declare namespace schema {
4691
4664
  */
4692
4665
  readonly description?: string;
4693
4666
  }
4667
+ /**
4668
+ * A logical type for the value of a custom record property.
4669
+ * @i2since 1.6
4670
+ */
4671
+ export type CustomLogicalType = Omit<data.LogicalType, 'selectedFromList' | 'suggestedFromList'>;
4694
4672
  /**
4695
4673
  * A schema for notes, which places constraints on their use.
4696
4674
  * @i2since 1.0
@@ -4807,17 +4785,6 @@ export declare namespace schema {
4807
4785
  */
4808
4786
  readonly possibleValues: data.IReadOnlyCollection<IPossibleValue>;
4809
4787
  }
4810
- /**
4811
- * An image icon, specified by the URL of the image file.
4812
- * @i2since 1.6
4813
- */
4814
- export interface IImageData {
4815
- /**
4816
- * Gets the URL of the image.
4817
- * @i2since 1.6
4818
- */
4819
- readonly href: string;
4820
- }
4821
4788
  /**
4822
4789
  * A type for the value of a field in a source reference.
4823
4790
  * @i2since 1.0
@@ -4864,6 +4831,11 @@ export declare namespace schema {
4864
4831
  * @i2since 1.5
4865
4832
  */
4866
4833
  readonly changedTypes: data.IReadOnlyCollection<IChartItemType>;
4834
+ /**
4835
+ * Gets the identifiers of the item types that were removed from the schema.
4836
+ * @i2since 1.6
4837
+ */
4838
+ readonly removedTypes: data.IReadOnlyCollection<ChartItemTypeId>;
4867
4839
  }
4868
4840
  }
4869
4841
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@i2analyze/notebook-sdk",
3
- "version": "1.6.0-dev.1",
3
+ "version": "1.6.0-dev.11",
4
4
  "description": "i2 Notebook SDK",
5
5
  "license": "MIT",
6
6
  "publishConfig": {