@osdk/maker 0.16.0-beta.6 → 0.16.0-beta.7
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/CHANGELOG.md +12 -0
- package/build/browser/api/defineAction.js +6 -0
- package/build/browser/api/defineAction.js.map +1 -1
- package/build/browser/api/defineOntology.js +29 -0
- package/build/browser/api/defineOntology.js.map +1 -1
- package/build/browser/api/test/spt.test.js +28 -0
- package/build/browser/api/test/spt.test.js.map +1 -1
- package/build/browser/cli/main.js +1 -1
- package/build/browser/index.js +5 -2
- package/build/browser/index.js.map +1 -1
- package/build/cjs/index.cjs +55 -1
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/index.d.cts +186 -155
- package/build/esm/api/defineAction.js +6 -0
- package/build/esm/api/defineAction.js.map +1 -1
- package/build/esm/api/defineOntology.js +29 -0
- package/build/esm/api/defineOntology.js.map +1 -1
- package/build/esm/api/test/spt.test.js +28 -0
- package/build/esm/api/test/spt.test.js.map +1 -1
- package/build/esm/cli/main.js +1 -1
- package/build/esm/index.js +5 -2
- package/build/esm/index.js.map +1 -1
- package/build/types/api/defineAction.d.ts.map +1 -1
- package/build/types/api/defineOntology.d.ts +5 -0
- package/build/types/api/defineOntology.d.ts.map +1 -1
- package/build/types/index.d.ts +14 -6
- package/build/types/index.d.ts.map +1 -1
- package/package.json +4 -4
package/build/cjs/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OntologyIrLabelledValue, OntologyIrConditionValue, OntologyIrParameterDateRangeValue, InterfaceTypeApiName, OntologyIrCondition, OntologyIrParameterPrefill, OntologyIrBaseParameterType_decimal, OntologyIrBaseParameterType_decimalList, OntologyIrBaseParameterType_timestamp, OntologyIrBaseParameterType_timestampList, OntologyIrBaseParameterType_objectReference, OntologyIrBaseParameterType_objectReferenceList, OntologyIrBaseParameterType_objectSetRid, OntologyIrBaseParameterType_objectTypeReference, OntologyIrBaseParameterType_interfaceReference, OntologyIrBaseParameterType_interfaceReferenceList, OntologyIrBaseParameterType_struct, OntologyIrBaseParameterType_structList, ParameterRenderHint, ParameterId, ActionTypeStatus_deprecated, ButtonDisplayMetadata, ActionTypeApiName, OntologyIrLogicRule, SectionId, OntologyIrActionTypeEntities, OntologyIrFormContent, OntologyIrValidationRule, DisplayMetadataConfigurationDefaultLayout, DisplayMetadataConfigurationDisplayAndFormat, OntologyIrLogicRuleValue_parameterId, OntologyIrLogicRuleValue_staticValue, OntologyIrLogicRuleValue_objectParameterPropertyValue, OntologyIrLogicRuleValue_interfaceParameterPropertyValue, OntologyIrLogicRuleValue_synchronousWebhookOutput,
|
|
1
|
+
import { OntologyIrLabelledValue, OntologyIrConditionValue, OntologyIrParameterDateRangeValue, InterfaceTypeApiName, OntologyIrCondition, OntologyIrParameterPrefill, OntologyIrBaseParameterType_decimal, OntologyIrBaseParameterType_decimalList, OntologyIrBaseParameterType_timestamp, OntologyIrBaseParameterType_timestampList, OntologyIrBaseParameterType_objectReference, OntologyIrBaseParameterType_objectReferenceList, OntologyIrBaseParameterType_objectSetRid, OntologyIrBaseParameterType_objectTypeReference, OntologyIrBaseParameterType_interfaceReference, OntologyIrBaseParameterType_interfaceReferenceList, OntologyIrBaseParameterType_struct, OntologyIrBaseParameterType_structList, ParameterRenderHint, ParameterId, ActionTypeStatus_deprecated, ButtonDisplayMetadata, ActionTypeApiName, OntologyIrLogicRule, SectionId, OntologyIrActionTypeEntities, OntologyIrFormContent, OntologyIrValidationRule, DisplayMetadataConfigurationDefaultLayout, DisplayMetadataConfigurationDisplayAndFormat, OntologyIrLogicRuleValue_parameterId, OntologyIrLogicRuleValue_staticValue, OntologyIrLogicRuleValue_objectParameterPropertyValue, OntologyIrLogicRuleValue_interfaceParameterPropertyValue, OntologyIrLogicRuleValue_synchronousWebhookOutput, ValueTypeApiName, ValueTypeDisplayMetadata, ValueTypeStatus, ValueTypeVersion, BaseType, ValueTypeDataConstraint, ExampleValue, StructFieldType, OntologyIrValueTypeReferenceWithMetadata, Visibility, SharedPropertyTypeGothamMapping, OntologyIrBaseFormatter, OntologyIrMarketplaceInterfaceType, InterfaceTypeStatus, OntologyIrSecurityGroupGranularCondition, MarkingType, DerivedPropertyLinkTypeSide, ObjectTypeFieldApiName, LinkTypeMetadata, LinkTypeId, OntologyIrObjectType, ValidationRuleDisplayMetadata, ParameterRid, OntologyIr, DataConstraint, FailureMessage, ValueTypeRid, OntologyIrType } from '@osdk/client.unstable';
|
|
2
2
|
|
|
3
3
|
declare function main(args?: string[]): Promise<void>;
|
|
4
4
|
|
|
@@ -228,20 +228,16 @@ type CustomMapping = OntologyIrLogicRuleValue_parameterId | OntologyIrLogicRuleV
|
|
|
228
228
|
|
|
229
229
|
declare function addDependency(namespaceNoDot: string, fileInPackage: string): void;
|
|
230
230
|
|
|
231
|
-
type
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
displayMetadata
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
enableFileImport: boolean;
|
|
242
|
-
fitHorizontally: boolean;
|
|
243
|
-
frozenColumnCount: number;
|
|
244
|
-
rowHeightInLines: number;
|
|
231
|
+
type ValueTypeDefinitionVersion = OntologyEntityBase & {
|
|
232
|
+
apiName: ValueTypeApiName;
|
|
233
|
+
packageNamespace: string;
|
|
234
|
+
displayMetadata: ValueTypeDisplayMetadata;
|
|
235
|
+
status: ValueTypeStatus;
|
|
236
|
+
version: ValueTypeVersion;
|
|
237
|
+
baseType: BaseType;
|
|
238
|
+
constraints: ValueTypeDataConstraint[];
|
|
239
|
+
exampleValues: ExampleValue[];
|
|
240
|
+
__type: OntologyEntityTypeEnum.VALUE_TYPE;
|
|
245
241
|
};
|
|
246
242
|
|
|
247
243
|
type PropertyTypeType = PropertyTypeTypePrimitive | PropertyTypeTypeExotic;
|
|
@@ -276,6 +272,7 @@ type PropertyTypeTypeDecimal = {
|
|
|
276
272
|
scale?: number;
|
|
277
273
|
};
|
|
278
274
|
type PropertyTypeTypesWithoutStruct = Exclude<PropertyTypeType, PropertyTypeTypeStruct>;
|
|
275
|
+
declare function isExotic(type: PropertyTypeType | undefined): type is PropertyTypeTypeExotic;
|
|
279
276
|
type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
|
|
280
277
|
interface StructPropertyType extends Optional<Omit<StructFieldType, "fieldType" | "structFieldRid" | "apiName">, "typeClasses" | "aliases"> {
|
|
281
278
|
fieldType: PropertyTypeTypesWithoutStruct;
|
|
@@ -322,6 +319,7 @@ interface InterfaceSharedPropertyType {
|
|
|
322
319
|
sharedPropertyType: SharedPropertyType;
|
|
323
320
|
required: boolean;
|
|
324
321
|
}
|
|
322
|
+
declare function isInterfaceSharedPropertyType(interfacePropertyType: InterfacePropertyType): interfacePropertyType is InterfaceSharedPropertyType;
|
|
325
323
|
|
|
326
324
|
interface InterfaceType extends OntologyEntityBase, Omit<OntologyIrMarketplaceInterfaceType, "properties" | "propertiesV2" | "propertiesV3" | "extendsInterfaces"> {
|
|
327
325
|
propertiesV2: Record<string, InterfaceSharedPropertyType>;
|
|
@@ -331,16 +329,12 @@ interface InterfaceType extends OntologyEntityBase, Omit<OntologyIrMarketplaceIn
|
|
|
331
329
|
__type: OntologyEntityTypeEnum.INTERFACE_TYPE;
|
|
332
330
|
}
|
|
333
331
|
|
|
334
|
-
type
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
baseType: BaseType;
|
|
341
|
-
constraints: ValueTypeDataConstraint[];
|
|
342
|
-
exampleValues: ExampleValue[];
|
|
343
|
-
__type: OntologyEntityTypeEnum.VALUE_TYPE;
|
|
332
|
+
type InterfaceImplementation = {
|
|
333
|
+
implements: InterfaceType;
|
|
334
|
+
propertyMapping: {
|
|
335
|
+
interfaceProperty: string;
|
|
336
|
+
mapsTo: string;
|
|
337
|
+
}[];
|
|
344
338
|
};
|
|
345
339
|
|
|
346
340
|
type ObjectTypeStatus = "active" | "experimental" | "example" | {
|
|
@@ -373,12 +367,114 @@ interface ObjectPropertyTypeInner {
|
|
|
373
367
|
|
|
374
368
|
type ObjectPropertyTypeUserDefinition = Omit<RequiredFields<Partial<ObjectPropertyTypeInner>, "type">, "apiName">;
|
|
375
369
|
|
|
376
|
-
type
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
370
|
+
type SecurityConditionDefinition = SecurityUnionCondition | OntologyIrSecurityGroupGranularCondition | SecurityGroupValidationRule | SecurityGroupPropertyValidationRule | SecurityMarkingPropertyRule;
|
|
371
|
+
type SecurityUnionCondition = {
|
|
372
|
+
type: "and" | "or";
|
|
373
|
+
conditions: Array<SecurityConditionDefinition>;
|
|
374
|
+
};
|
|
375
|
+
type SecurityGroupValidationRule = {
|
|
376
|
+
type: "group";
|
|
377
|
+
name: string;
|
|
378
|
+
};
|
|
379
|
+
type SecurityGroupPropertyValidationRule = {
|
|
380
|
+
type: "groupProperty";
|
|
381
|
+
property: string;
|
|
382
|
+
};
|
|
383
|
+
type SecurityMarkingPropertyRule = {
|
|
384
|
+
type: "markingProperty";
|
|
385
|
+
property: string;
|
|
386
|
+
};
|
|
387
|
+
|
|
388
|
+
type ObjectTypeDatasourceDefinition = ObjectTypeDatasourceDefinition_stream | ObjectTypeDatasourceDefinition_dataset | ObjectTypeDatasourceDefinition_restrictedView | ObjectTypeDatasourceDefinition_derived | ObjectTypeDatasourceDefinition_direct;
|
|
389
|
+
interface ObjectTypeDatasourceDefinition_dataset {
|
|
390
|
+
type: "dataset";
|
|
391
|
+
objectSecurityPolicy?: ObjectSecurityPolicy;
|
|
392
|
+
propertySecurityGroups?: Array<PropertySecurityGroup>;
|
|
393
|
+
}
|
|
394
|
+
interface ObjectSecurityPolicy {
|
|
395
|
+
name: string;
|
|
396
|
+
granularPolicy?: SecurityConditionDefinition;
|
|
397
|
+
appliedMarkings?: Record<string, MarkingType>;
|
|
398
|
+
assumedMarkings?: Record<string, MarkingType>;
|
|
399
|
+
}
|
|
400
|
+
interface PropertySecurityGroup {
|
|
401
|
+
name: string;
|
|
402
|
+
properties: Array<string>;
|
|
403
|
+
granularPolicy?: SecurityConditionDefinition;
|
|
404
|
+
appliedMarkings?: Record<string, MarkingType>;
|
|
405
|
+
assumedMarkings?: Record<string, MarkingType>;
|
|
406
|
+
}
|
|
407
|
+
interface ObjectTypeDatasourceDefinition_stream {
|
|
408
|
+
type: "stream";
|
|
409
|
+
retentionPeriod?: string;
|
|
410
|
+
}
|
|
411
|
+
interface ObjectTypeDatasourceDefinition_restrictedView {
|
|
412
|
+
type: "restrictedView";
|
|
413
|
+
}
|
|
414
|
+
interface ObjectTypeDatasourceDefinition_derived {
|
|
415
|
+
type: "derived";
|
|
416
|
+
linkDefinition: Array<DerivedPropertiesLinkDefinition>;
|
|
417
|
+
propertyMapping: Record<ObjectTypeFieldApiName, ObjectTypeFieldApiName> | Record<ObjectTypeFieldApiName, DerivedPropertyAggregation>;
|
|
418
|
+
}
|
|
419
|
+
interface DerivedPropertiesLinkDefinition {
|
|
420
|
+
linkType: LinkType;
|
|
421
|
+
side?: DerivedPropertyLinkTypeSide;
|
|
422
|
+
}
|
|
423
|
+
type DerivedPropertyAggregation = {
|
|
424
|
+
type: "count";
|
|
425
|
+
} | {
|
|
426
|
+
type: "avg";
|
|
427
|
+
property: ObjectTypeFieldApiName;
|
|
428
|
+
} | {
|
|
429
|
+
type: "sum";
|
|
430
|
+
property: ObjectTypeFieldApiName;
|
|
431
|
+
} | {
|
|
432
|
+
type: "min";
|
|
433
|
+
property: ObjectTypeFieldApiName;
|
|
434
|
+
} | {
|
|
435
|
+
type: "max";
|
|
436
|
+
property: ObjectTypeFieldApiName;
|
|
437
|
+
} | {
|
|
438
|
+
type: "approximateCardinality";
|
|
439
|
+
property: ObjectTypeFieldApiName;
|
|
440
|
+
} | {
|
|
441
|
+
type: "exactCardinality";
|
|
442
|
+
property: ObjectTypeFieldApiName;
|
|
443
|
+
} | {
|
|
444
|
+
type: "collectList";
|
|
445
|
+
property: ObjectTypeFieldApiName;
|
|
446
|
+
limit: number;
|
|
447
|
+
} | {
|
|
448
|
+
type: "collectSet";
|
|
449
|
+
property: ObjectTypeFieldApiName;
|
|
450
|
+
limit: number;
|
|
451
|
+
};
|
|
452
|
+
interface ObjectTypeDatasourceDefinition_direct {
|
|
453
|
+
type: "direct";
|
|
454
|
+
objectSecurityPolicy?: ObjectSecurityPolicy;
|
|
455
|
+
propertySecurityGroups?: Array<PropertySecurityGroup>;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
type ObjectTypeDefinition = {
|
|
459
|
+
apiName: string;
|
|
460
|
+
primaryKeyPropertyApiName: string;
|
|
461
|
+
displayName: string;
|
|
462
|
+
pluralDisplayName: string;
|
|
463
|
+
titlePropertyApiName: string;
|
|
464
|
+
properties?: {
|
|
465
|
+
[key: string]: ObjectPropertyTypeUserDefinition;
|
|
466
|
+
};
|
|
467
|
+
implementsInterfaces?: Array<InterfaceImplementation>;
|
|
468
|
+
description?: string;
|
|
469
|
+
icon?: {
|
|
470
|
+
locator: BlueprintIcon;
|
|
471
|
+
color: string;
|
|
472
|
+
};
|
|
473
|
+
visibility?: Visibility;
|
|
474
|
+
editsEnabled?: boolean;
|
|
475
|
+
status?: ObjectTypeStatus;
|
|
476
|
+
datasources?: Array<ObjectTypeDatasourceDefinition>;
|
|
477
|
+
aliases?: Array<string>;
|
|
382
478
|
};
|
|
383
479
|
|
|
384
480
|
type LinkType = (OntologyEntityBase & OneToManyLinkTypeDefinition & {
|
|
@@ -487,114 +583,57 @@ type UserLinkTypeStatus = "active" | "experimental" | "example" | {
|
|
|
487
583
|
replacedBy?: LinkTypeId;
|
|
488
584
|
};
|
|
489
585
|
|
|
490
|
-
type
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
conditions: Array<SecurityConditionDefinition>;
|
|
494
|
-
};
|
|
495
|
-
type SecurityGroupValidationRule = {
|
|
496
|
-
type: "group";
|
|
497
|
-
name: string;
|
|
498
|
-
};
|
|
499
|
-
type SecurityGroupPropertyValidationRule = {
|
|
500
|
-
type: "groupProperty";
|
|
501
|
-
property: string;
|
|
502
|
-
};
|
|
503
|
-
type SecurityMarkingPropertyRule = {
|
|
504
|
-
type: "markingProperty";
|
|
505
|
-
property: string;
|
|
506
|
-
};
|
|
507
|
-
|
|
508
|
-
type ObjectTypeDatasourceDefinition = ObjectTypeDatasourceDefinition_stream | ObjectTypeDatasourceDefinition_dataset | ObjectTypeDatasourceDefinition_restrictedView | ObjectTypeDatasourceDefinition_derived | ObjectTypeDatasourceDefinition_direct;
|
|
509
|
-
interface ObjectTypeDatasourceDefinition_dataset {
|
|
510
|
-
type: "dataset";
|
|
511
|
-
objectSecurityPolicy?: ObjectSecurityPolicy;
|
|
512
|
-
propertySecurityGroups?: Array<PropertySecurityGroup>;
|
|
513
|
-
}
|
|
514
|
-
interface ObjectSecurityPolicy {
|
|
515
|
-
name: string;
|
|
516
|
-
granularPolicy?: SecurityConditionDefinition;
|
|
517
|
-
appliedMarkings?: Record<string, MarkingType>;
|
|
518
|
-
assumedMarkings?: Record<string, MarkingType>;
|
|
519
|
-
}
|
|
520
|
-
interface PropertySecurityGroup {
|
|
521
|
-
name: string;
|
|
522
|
-
properties: Array<string>;
|
|
523
|
-
granularPolicy?: SecurityConditionDefinition;
|
|
524
|
-
appliedMarkings?: Record<string, MarkingType>;
|
|
525
|
-
assumedMarkings?: Record<string, MarkingType>;
|
|
526
|
-
}
|
|
527
|
-
interface ObjectTypeDatasourceDefinition_stream {
|
|
528
|
-
type: "stream";
|
|
529
|
-
retentionPeriod?: string;
|
|
530
|
-
}
|
|
531
|
-
interface ObjectTypeDatasourceDefinition_restrictedView {
|
|
532
|
-
type: "restrictedView";
|
|
533
|
-
}
|
|
534
|
-
interface ObjectTypeDatasourceDefinition_derived {
|
|
535
|
-
type: "derived";
|
|
536
|
-
linkDefinition: Array<DerivedPropertiesLinkDefinition>;
|
|
537
|
-
propertyMapping: Record<ObjectTypeFieldApiName, ObjectTypeFieldApiName> | Record<ObjectTypeFieldApiName, DerivedPropertyAggregation>;
|
|
538
|
-
}
|
|
539
|
-
interface DerivedPropertiesLinkDefinition {
|
|
540
|
-
linkType: LinkType;
|
|
541
|
-
side?: DerivedPropertyLinkTypeSide;
|
|
542
|
-
}
|
|
543
|
-
type DerivedPropertyAggregation = {
|
|
544
|
-
type: "count";
|
|
545
|
-
} | {
|
|
546
|
-
type: "avg";
|
|
547
|
-
property: ObjectTypeFieldApiName;
|
|
548
|
-
} | {
|
|
549
|
-
type: "sum";
|
|
550
|
-
property: ObjectTypeFieldApiName;
|
|
551
|
-
} | {
|
|
552
|
-
type: "min";
|
|
553
|
-
property: ObjectTypeFieldApiName;
|
|
554
|
-
} | {
|
|
555
|
-
type: "max";
|
|
556
|
-
property: ObjectTypeFieldApiName;
|
|
557
|
-
} | {
|
|
558
|
-
type: "approximateCardinality";
|
|
559
|
-
property: ObjectTypeFieldApiName;
|
|
560
|
-
} | {
|
|
561
|
-
type: "exactCardinality";
|
|
562
|
-
property: ObjectTypeFieldApiName;
|
|
563
|
-
} | {
|
|
564
|
-
type: "collectList";
|
|
565
|
-
property: ObjectTypeFieldApiName;
|
|
566
|
-
limit: number;
|
|
567
|
-
} | {
|
|
568
|
-
type: "collectSet";
|
|
569
|
-
property: ObjectTypeFieldApiName;
|
|
570
|
-
limit: number;
|
|
586
|
+
type ObjectType = OntologyEntityBase & RequiredFields<Partial<ObjectTypeInner>, "apiName" | "primaryKeyPropertyApiName" | "displayName" | "pluralDisplayName" | "titlePropertyApiName"> & {
|
|
587
|
+
datasources?: Array<ObjectTypeDatasourceDefinition>;
|
|
588
|
+
__type: OntologyEntityTypeEnum.OBJECT_TYPE;
|
|
571
589
|
};
|
|
572
|
-
interface
|
|
573
|
-
type: "direct";
|
|
574
|
-
objectSecurityPolicy?: ObjectSecurityPolicy;
|
|
575
|
-
propertySecurityGroups?: Array<PropertySecurityGroup>;
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
type ObjectTypeDefinition = {
|
|
579
|
-
apiName: string;
|
|
590
|
+
interface ObjectTypeInner extends Omit<OntologyIrObjectType, "titlePropertyTypeRid" | "propertyTypes" | "allImplementsInterfaces" | "implementsInterfaces2" | "displayMetadata" | "primaryKeys" | "status"> {
|
|
580
591
|
primaryKeyPropertyApiName: string;
|
|
581
|
-
|
|
582
|
-
pluralDisplayName: string;
|
|
592
|
+
properties: Array<ObjectPropertyType>;
|
|
583
593
|
titlePropertyApiName: string;
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
implementsInterfaces?: Array<InterfaceImplementation>;
|
|
588
|
-
description?: string;
|
|
589
|
-
icon?: {
|
|
594
|
+
implementsInterfaces: Array<InterfaceImplementation>;
|
|
595
|
+
description: string | undefined;
|
|
596
|
+
icon: {
|
|
590
597
|
locator: BlueprintIcon;
|
|
591
598
|
color: string;
|
|
592
|
-
};
|
|
593
|
-
|
|
594
|
-
|
|
599
|
+
} | undefined;
|
|
600
|
+
displayName: string;
|
|
601
|
+
pluralDisplayName: string;
|
|
602
|
+
visibility: Visibility;
|
|
603
|
+
editsEnabled: boolean;
|
|
595
604
|
status?: ObjectTypeStatus;
|
|
596
|
-
datasources?: Array<ObjectTypeDatasourceDefinition>;
|
|
597
605
|
aliases?: Array<string>;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
interface OntologyEntityTypeMapping {
|
|
609
|
+
[OntologyEntityTypeEnum.OBJECT_TYPE]: ObjectType;
|
|
610
|
+
[OntologyEntityTypeEnum.ACTION_TYPE]: ActionType;
|
|
611
|
+
[OntologyEntityTypeEnum.LINK_TYPE]: LinkType;
|
|
612
|
+
[OntologyEntityTypeEnum.INTERFACE_TYPE]: InterfaceType;
|
|
613
|
+
[OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE]: SharedPropertyType;
|
|
614
|
+
[OntologyEntityTypeEnum.VALUE_TYPE]: ValueTypeDefinitionVersion;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
type OntologyDefinition = {
|
|
618
|
+
[K in Exclude<OntologyEntityTypeEnum, "VALUE_TYPE">]: Record<string, OntologyEntityTypeMapping[K]>;
|
|
619
|
+
} & {
|
|
620
|
+
VALUE_TYPE: Record<string, ValueTypeDefinitionVersion[]>;
|
|
621
|
+
};
|
|
622
|
+
|
|
623
|
+
type ActionLevelValidationDefinition = Array<ActionLevelValidationRule>;
|
|
624
|
+
type ActionLevelValidationRule = {
|
|
625
|
+
condition: ConditionDefinition;
|
|
626
|
+
displayMetadata?: ValidationRuleDisplayMetadata;
|
|
627
|
+
};
|
|
628
|
+
|
|
629
|
+
type DefaultFormat = "FORM" | "TABLE";
|
|
630
|
+
|
|
631
|
+
type TableConfiguration = {
|
|
632
|
+
columnWidthByParameterRid: Record<ParameterRid, number>;
|
|
633
|
+
enableFileImport: boolean;
|
|
634
|
+
fitHorizontally: boolean;
|
|
635
|
+
frozenColumnCount: number;
|
|
636
|
+
rowHeightInLines: number;
|
|
598
637
|
};
|
|
599
638
|
|
|
600
639
|
declare const MODIFY_OBJECT_PARAMETER: string;
|
|
@@ -721,31 +760,17 @@ declare function defineObject(objectDefInput: ObjectTypeDefinition): ObjectTypeD
|
|
|
721
760
|
declare function uppercaseFirstLetter(s: string | undefined | null): string;
|
|
722
761
|
declare function convertToPluralDisplayName(s: string | undefined | null): string;
|
|
723
762
|
|
|
724
|
-
type ObjectType = OntologyEntityBase & RequiredFields<Partial<ObjectTypeInner>, "apiName" | "primaryKeyPropertyApiName" | "displayName" | "pluralDisplayName" | "titlePropertyApiName"> & {
|
|
725
|
-
datasources?: Array<ObjectTypeDatasourceDefinition>;
|
|
726
|
-
__type: OntologyEntityTypeEnum.OBJECT_TYPE;
|
|
727
|
-
};
|
|
728
|
-
interface ObjectTypeInner extends Omit<OntologyIrObjectType, "titlePropertyTypeRid" | "propertyTypes" | "allImplementsInterfaces" | "implementsInterfaces2" | "displayMetadata" | "primaryKeys" | "status"> {
|
|
729
|
-
primaryKeyPropertyApiName: string;
|
|
730
|
-
properties: Array<ObjectPropertyType>;
|
|
731
|
-
titlePropertyApiName: string;
|
|
732
|
-
implementsInterfaces: Array<InterfaceImplementation>;
|
|
733
|
-
description: string | undefined;
|
|
734
|
-
icon: {
|
|
735
|
-
locator: BlueprintIcon;
|
|
736
|
-
color: string;
|
|
737
|
-
} | undefined;
|
|
738
|
-
displayName: string;
|
|
739
|
-
pluralDisplayName: string;
|
|
740
|
-
visibility: Visibility;
|
|
741
|
-
editsEnabled: boolean;
|
|
742
|
-
status?: ObjectTypeStatus;
|
|
743
|
-
aliases?: Array<string>;
|
|
744
|
-
}
|
|
745
|
-
|
|
746
763
|
declare function defineOntology(ns: string, body: () => void | Promise<void>, outputDir: string | undefined, dependencyFile?: string, codeSnippetFiles?: boolean, snippetPackageName?: string, snippetFileOutputDir?: string, randomnessKey?: string): Promise<OntologyIr>;
|
|
764
|
+
declare function cleanAndValidateLinkTypeId(apiName: string): string;
|
|
747
765
|
declare function dumpOntologyFullMetadata(): OntologyIr;
|
|
766
|
+
declare function convertObjectStatus(status: any): any;
|
|
767
|
+
declare function extractNamespace(apiName: string): string;
|
|
768
|
+
declare function withoutNamespace(apiName: string): string;
|
|
748
769
|
declare function addNamespaceIfNone(apiName: string): string;
|
|
770
|
+
declare function initializeOntologyState(ns: string): void;
|
|
771
|
+
declare function getOntologyDefinition(): OntologyDefinition;
|
|
772
|
+
declare function getImportedTypes(): OntologyDefinition;
|
|
773
|
+
declare function getNamespace(): string;
|
|
749
774
|
|
|
750
775
|
interface SharedPropertyTypeDefinition {
|
|
751
776
|
apiName: string;
|
|
@@ -978,6 +1003,12 @@ declare function importSharedPropertyType(opts: {
|
|
|
978
1003
|
array?: boolean;
|
|
979
1004
|
}): SharedPropertyType;
|
|
980
1005
|
|
|
1006
|
+
declare const defaultTypeClasses: TypeClass[];
|
|
1007
|
+
declare function shouldNotHaveRenderHints(type: PropertyTypeType): boolean;
|
|
1008
|
+
declare function hasRenderHints(typeClasses: TypeClass[] | undefined): boolean;
|
|
1009
|
+
declare function getPropertyTypeName(type: PropertyTypeType): string;
|
|
1010
|
+
declare function shouldBeIndexedForSearch(type: PropertyTypeType): boolean;
|
|
1011
|
+
|
|
981
1012
|
/**
|
|
982
1013
|
* Wraps an OntologyEntityType with a Proxy that calls importOntologyEntity when properties are accessed.
|
|
983
1014
|
*
|
|
@@ -988,4 +1019,4 @@ declare function wrapWithProxy<T extends OntologyEntityBase>(entity: T): T;
|
|
|
988
1019
|
|
|
989
1020
|
declare function propertyTypeTypeToOntologyIrType(type: PropertyTypeType, apiName?: string, sharedPropertyType?: SharedPropertyType): OntologyIrType;
|
|
990
1021
|
|
|
991
|
-
export { type ActionParameterAllowedValues, type ActionParameterConditionalOverride, type ActionParameterConfiguration, type ActionParameterValidation, type ActionSection, type ActionType, CREATE_INTERFACE_OBJECT_PARAMETER, CREATE_OR_MODIFY_OBJECT_PARAMETER, type ConditionDefinition, type CurrentTimeMappingValue, type CurrentUserMappingValue, type CustomMapping, DELETE_OBJECT_PARAMETER, type InterfaceDefinedProperty, type InterfaceType, type LinkType, MODIFY_INTERFACE_OBJECT_PARAMETER, MODIFY_OBJECT_PARAMETER, type MappingValue, type ObjectPropertyType, type ObjectType, OntologyEntityTypeEnum, type PropertyTypeType, type SectionConditionalOverride, type SharedPropertyType, type SubmissionMetadata, type UuidMappingValue, type ValueTypeDefinitionVersion, addDependency, addNamespaceIfNone, uppercaseFirstLetter as convertToDisplayName, convertToPluralDisplayName, propertyTypeTypeToOntologyIrType as convertType, main as default, defineAction, defineCreateInterfaceObjectAction, defineCreateObjectAction, defineCreateOrModifyObjectAction, defineDeleteInterfaceObjectAction, defineDeleteObjectAction, defineInterface, defineInterfaceLinkConstraint, defineLink, defineModifyInterfaceObjectAction, defineModifyObjectAction, defineObject, defineOntology, defineSharedPropertyType, defineValueType, dumpOntologyFullMetadata, importOntologyEntity, importSharedPropertyType, wrapWithProxy };
|
|
1022
|
+
export { type ActionParameter, type ActionParameterAllowedValues, type ActionParameterConditionalOverride, type ActionParameterConfiguration, type ActionParameterRequirementConstraint, type ActionParameterValidation, type ActionSection, type ActionType, CREATE_INTERFACE_OBJECT_PARAMETER, CREATE_OR_MODIFY_OBJECT_PARAMETER, type ConditionDefinition, type CurrentTimeMappingValue, type CurrentUserMappingValue, type CustomMapping, DELETE_OBJECT_PARAMETER, type DerivedPropertyAggregation, type InterfaceDefinedProperty, type InterfacePropertyType, type InterfaceType, type LinkType, MODIFY_INTERFACE_OBJECT_PARAMETER, MODIFY_OBJECT_PARAMETER, type MappingValue, type Nullability, type ObjectPropertyType, type ObjectType, type ObjectTypeDatasourceDefinition_dataset, type ObjectTypeDatasourceDefinition_derived, type ObjectTypeDatasourceDefinition_direct, type ObjectTypeDefinition, type OneToManyLinkTypeDefinition, type OntologyDefinition, OntologyEntityTypeEnum, type PropertyTypeType, type SectionConditionalOverride, type SecurityConditionDefinition, type SharedPropertyType, type SubmissionMetadata, type UserLinkTypeStatus, type UuidMappingValue, type ValueTypeDefinitionVersion, addDependency, addNamespaceIfNone, cleanAndValidateLinkTypeId, convertObjectStatus, uppercaseFirstLetter as convertToDisplayName, convertToPluralDisplayName, propertyTypeTypeToOntologyIrType as convertType, main as default, defaultTypeClasses, defineAction, defineCreateInterfaceObjectAction, defineCreateObjectAction, defineCreateOrModifyObjectAction, defineDeleteInterfaceObjectAction, defineDeleteObjectAction, defineInterface, defineInterfaceLinkConstraint, defineLink, defineModifyInterfaceObjectAction, defineModifyObjectAction, defineObject, defineOntology, defineSharedPropertyType, defineValueType, dumpOntologyFullMetadata, extractNamespace, getImportedTypes, getNamespace, getOntologyDefinition, getPropertyTypeName, hasRenderHints, importOntologyEntity, importSharedPropertyType, initializeOntologyState, isExotic, isInterfaceSharedPropertyType, shouldBeIndexedForSearch, shouldNotHaveRenderHints, uppercaseFirstLetter, withoutNamespace, wrapWithProxy };
|
|
@@ -550,6 +550,10 @@ function extractAllowedValuesFromPropertyType(type) {
|
|
|
550
550
|
};
|
|
551
551
|
default:
|
|
552
552
|
switch (type.type) {
|
|
553
|
+
case "decimal":
|
|
554
|
+
return {
|
|
555
|
+
type: "range"
|
|
556
|
+
};
|
|
553
557
|
case "marking":
|
|
554
558
|
return type.markingType === "CBAC" ? {
|
|
555
559
|
type: "cbacMarking"
|
|
@@ -572,6 +576,8 @@ function extractActionParameterType(pt) {
|
|
|
572
576
|
const typeType = pt.type;
|
|
573
577
|
if (typeof typeType === "object") {
|
|
574
578
|
switch (typeType.type) {
|
|
579
|
+
case "decimal":
|
|
580
|
+
return maybeAddList("decimal", pt);
|
|
575
581
|
case "marking":
|
|
576
582
|
return maybeAddList("marking", pt);
|
|
577
583
|
case "string":
|