@meshmakers/octo-services 3.3.440 → 3.3.460

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.
@@ -1490,6 +1490,54 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
1490
1490
  }]
1491
1491
  }], ctorParameters: () => [{ type: i1.Apollo }] });
1492
1492
 
1493
+ const GetDerivedCkTypesDocumentDto = gql `
1494
+ query getDerivedCkTypes($rtCkTypeId: String!, $ignoreAbstractTypes: Boolean, $includeSelf: Boolean) {
1495
+ constructionKit {
1496
+ types(rtCkId: $rtCkTypeId) {
1497
+ items {
1498
+ directAndIndirectDerivedTypes(
1499
+ ignoreAbstractTypes: $ignoreAbstractTypes
1500
+ includeSelf: $includeSelf
1501
+ ) {
1502
+ totalCount
1503
+ items {
1504
+ baseType {
1505
+ ckTypeId {
1506
+ fullName
1507
+ }
1508
+ rtCkTypeId
1509
+ isAbstract
1510
+ isFinal
1511
+ }
1512
+ ckTypeId {
1513
+ fullName
1514
+ }
1515
+ rtCkTypeId
1516
+ isAbstract
1517
+ isFinal
1518
+ description
1519
+ }
1520
+ }
1521
+ }
1522
+ }
1523
+ }
1524
+ }
1525
+ `;
1526
+ class GetDerivedCkTypesDtoGQL extends i1.Query {
1527
+ document = GetDerivedCkTypesDocumentDto;
1528
+ constructor(apollo) {
1529
+ super(apollo);
1530
+ }
1531
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: GetDerivedCkTypesDtoGQL, deps: [{ token: i1.Apollo }], target: i0.ɵɵFactoryTarget.Injectable });
1532
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: GetDerivedCkTypesDtoGQL, providedIn: 'root' });
1533
+ }
1534
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: GetDerivedCkTypesDtoGQL, decorators: [{
1535
+ type: Injectable,
1536
+ args: [{
1537
+ providedIn: 'root'
1538
+ }]
1539
+ }], ctorParameters: () => [{ type: i1.Apollo }] });
1540
+
1493
1541
  const GetCkModelByIdDocumentDto = gql `
1494
1542
  query getCkModelById($model: SimpleScalar!) {
1495
1543
  constructionKit {
@@ -1680,6 +1728,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
1680
1728
  class CkTypeSelectorService {
1681
1729
  getCkTypesGQL = inject(GetCkTypesDtoGQL);
1682
1730
  getCkTypeByRtCkTypeIdGQL = inject(GetCkTypeByRtCkTypeIdDtoGQL);
1731
+ getDerivedCkTypesGQL = inject(GetDerivedCkTypesDtoGQL);
1683
1732
  /**
1684
1733
  * Get a CkType by its rtCkTypeId
1685
1734
  * @param rtCkTypeId The runtime CK type ID, e.g., "OctoSdkDemo-1.0.0/Customer"
@@ -1740,6 +1789,41 @@ class CkTypeSelectorService {
1740
1789
  };
1741
1790
  }));
1742
1791
  }
1792
+ /**
1793
+ * Get derived CkTypes for a given base type rtCkTypeId, with optional client-side text filter
1794
+ * @param rtCkTypeId The runtime CK type ID of the base type, e.g., "Basic/TreeNode"
1795
+ * @param options Search options
1796
+ * @returns Observable of CkTypeSelectorResult
1797
+ */
1798
+ getDerivedCkTypes(rtCkTypeId, options = {}) {
1799
+ const { searchText, ignoreAbstractTypes = true, includeSelf = true } = options;
1800
+ return this.getDerivedCkTypesGQL.fetch({
1801
+ variables: {
1802
+ rtCkTypeId,
1803
+ ignoreAbstractTypes,
1804
+ includeSelf
1805
+ },
1806
+ fetchPolicy: 'network-only'
1807
+ }).pipe(map(result => {
1808
+ const derivedTypes = result.data?.constructionKit?.types?.items?.[0]?.directAndIndirectDerivedTypes;
1809
+ if (!derivedTypes) {
1810
+ return { items: [], totalCount: 0 };
1811
+ }
1812
+ let items = (derivedTypes.items || [])
1813
+ .filter((item) => item !== null)
1814
+ .map(item => this.mapDerivedToSelectorItem(item));
1815
+ // Client-side text filter
1816
+ if (searchText) {
1817
+ const lowerFilter = searchText.toLowerCase();
1818
+ items = items.filter(item => item.rtCkTypeId.toLowerCase().includes(lowerFilter) ||
1819
+ item.fullName.toLowerCase().includes(lowerFilter));
1820
+ }
1821
+ return {
1822
+ items,
1823
+ totalCount: items.length
1824
+ };
1825
+ }));
1826
+ }
1743
1827
  mapToSelectorItem(item) {
1744
1828
  return {
1745
1829
  fullName: item.ckTypeId.fullName,
@@ -1751,6 +1835,17 @@ class CkTypeSelectorService {
1751
1835
  description: item.description ?? undefined
1752
1836
  };
1753
1837
  }
1838
+ mapDerivedToSelectorItem(item) {
1839
+ return {
1840
+ fullName: item.ckTypeId.fullName,
1841
+ rtCkTypeId: item.rtCkTypeId,
1842
+ baseTypeFullName: item.baseType?.ckTypeId.fullName,
1843
+ baseTypeRtCkTypeId: item.baseType?.rtCkTypeId,
1844
+ isAbstract: item.isAbstract,
1845
+ isFinal: item.isFinal,
1846
+ description: item.description ?? undefined
1847
+ };
1848
+ }
1754
1849
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: CkTypeSelectorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1755
1850
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: CkTypeSelectorService, providedIn: 'root' });
1756
1851
  }
@@ -3062,5 +3157,5 @@ function provideOctoServices(octoServiceOptions) {
3062
3157
  * Generated bundle index. Do not edit.
3063
3158
  */
3064
3159
 
3065
- export { AggregationInputTypesDto, AggregationTypesDto, AssetRepoGraphQlDataSource, AssetRepoService, AssociationModOptionsDto, AttributeSelectorService, AttributeValueTypeDto, BasicLegalEntityTypeDto, BasicSalutationDto, BasicTypeOfTelephoneBasicDto, BasicTypeOfTelephoneEnhancedDto, BasicUnitOfMeasureDto, BotService, CONFIGURATION_SERVICE, CkExtensionUpdateOperationsDto, CkModelService, CkTypeAttributeService, CkTypeMetaData, CkTypeSelectorService, CommunicationService, DeleteStrategiesDto, DeploymentState, FieldFilterOperatorsDto, GetCkModelByIdDocumentDto, GetCkModelByIdDtoGQL, GetCkRecordAttributesDocumentDto, GetCkRecordAttributesDtoGQL, GetCkTypeAttributesDocumentDto, GetCkTypeAttributesDtoGQL, GetCkTypeAvailableQueryColumnsDocumentDto, GetCkTypeAvailableQueryColumnsDtoGQL, GetCkTypesDocumentDto, GetCkTypesDtoGQL, GraphDirectionDto, GraphQL, GraphQLCloneIgnoredProperties, GraphQLCommonIgnoredProperties, GraphQlDataSource, HealthService, HealthStatus, IdentityService, ImportStrategyDto, JobManagementService, LevelMetaData, LoggerSeverity, ModelStateDto, MultiplicitiesDto, OctoErrorLink, OctoGraphQLServiceBase, OctoSdkDemoCustomerStatusDto, OctoSdkDemoNetworkOperatorDto, OctoSdkDemoOperatingStatusDto, OctoServiceOptions, OctoServicesModule, PagedGraphResultDto, ProgressValue, ProgressWindowService, RtAssociationMetaData, SearchFilterTypesDto, SortOrdersDto, SystemAggregationTypesDto, SystemCommunicationCommunicationStateDto, SystemCommunicationConfigurationStateDto, SystemCommunicationDeploymentStateDto, SystemCommunicationPipelineExecutionStatusDto, SystemCommunicationPipelineTriggerTypeDto, SystemEnvironmentModesDto, SystemFieldFilterOperatorDto, SystemIdentityTokenExpirationDto, SystemIdentityTokenTypeDto, SystemIdentityTokenUsageDto, SystemMaintenanceLevelsDto, SystemNavigationFilterModesDto, SystemNotificationEventLevelsDto, SystemNotificationEventSourcesDto, SystemNotificationEventStatesDto, SystemNotificationNotificationTypesDto, SystemNotificationRenderingTypesDto, SystemQueryTypesDto, SystemSortOrdersDto, TENANT_ID_PROVIDER, TusUploadService, UpdateTypeDto, result as possibleTypes, provideOctoServices };
3160
+ export { AggregationInputTypesDto, AggregationTypesDto, AssetRepoGraphQlDataSource, AssetRepoService, AssociationModOptionsDto, AttributeSelectorService, AttributeValueTypeDto, BasicLegalEntityTypeDto, BasicSalutationDto, BasicTypeOfTelephoneBasicDto, BasicTypeOfTelephoneEnhancedDto, BasicUnitOfMeasureDto, BotService, CONFIGURATION_SERVICE, CkExtensionUpdateOperationsDto, CkModelService, CkTypeAttributeService, CkTypeMetaData, CkTypeSelectorService, CommunicationService, DeleteStrategiesDto, DeploymentState, FieldFilterOperatorsDto, GetCkModelByIdDocumentDto, GetCkModelByIdDtoGQL, GetCkRecordAttributesDocumentDto, GetCkRecordAttributesDtoGQL, GetCkTypeAttributesDocumentDto, GetCkTypeAttributesDtoGQL, GetCkTypeAvailableQueryColumnsDocumentDto, GetCkTypeAvailableQueryColumnsDtoGQL, GetCkTypesDocumentDto, GetCkTypesDtoGQL, GetDerivedCkTypesDocumentDto, GetDerivedCkTypesDtoGQL, GraphDirectionDto, GraphQL, GraphQLCloneIgnoredProperties, GraphQLCommonIgnoredProperties, GraphQlDataSource, HealthService, HealthStatus, IdentityService, ImportStrategyDto, JobManagementService, LevelMetaData, LoggerSeverity, ModelStateDto, MultiplicitiesDto, OctoErrorLink, OctoGraphQLServiceBase, OctoSdkDemoCustomerStatusDto, OctoSdkDemoNetworkOperatorDto, OctoSdkDemoOperatingStatusDto, OctoServiceOptions, OctoServicesModule, PagedGraphResultDto, ProgressValue, ProgressWindowService, RtAssociationMetaData, SearchFilterTypesDto, SortOrdersDto, SystemAggregationTypesDto, SystemCommunicationCommunicationStateDto, SystemCommunicationConfigurationStateDto, SystemCommunicationDeploymentStateDto, SystemCommunicationPipelineExecutionStatusDto, SystemCommunicationPipelineTriggerTypeDto, SystemEnvironmentModesDto, SystemFieldFilterOperatorDto, SystemIdentityTokenExpirationDto, SystemIdentityTokenTypeDto, SystemIdentityTokenUsageDto, SystemMaintenanceLevelsDto, SystemNavigationFilterModesDto, SystemNotificationEventLevelsDto, SystemNotificationEventSourcesDto, SystemNotificationEventStatesDto, SystemNotificationNotificationTypesDto, SystemNotificationRenderingTypesDto, SystemQueryTypesDto, SystemSortOrdersDto, TENANT_ID_PROVIDER, TusUploadService, UpdateTypeDto, result as possibleTypes, provideOctoServices };
3066
3161
  //# sourceMappingURL=meshmakers-octo-services.mjs.map