@meshmakers/octo-services 3.3.700 → 3.3.710

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.
@@ -3850,8 +3850,8 @@ class JobManagementService {
3850
3850
  }
3851
3851
  if (jobDto.status === 'Succeeded' || jobDto.status === 'Failed'
3852
3852
  || jobDto.status === 'Deleted' || cancelled) {
3853
+ progressDialog.close();
3853
3854
  if (jobDto.status === 'Succeeded') {
3854
- progressDialog.close();
3855
3855
  return true;
3856
3856
  }
3857
3857
  else {
@@ -4228,6 +4228,89 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
4228
4228
  }]
4229
4229
  }] });
4230
4230
 
4231
+ class CkModelCatalogService {
4232
+ httpClient = inject(HttpClient);
4233
+ configurationService = inject(CONFIGURATION_SERVICE);
4234
+ tenantIdProvider = inject(TENANT_ID_PROVIDER, { optional: true });
4235
+ getSystemApiBaseUrl() {
4236
+ if (!this.configurationService.config?.assetServices)
4237
+ return null;
4238
+ return `${this.configurationService.config.assetServices}system/v1/ckmodelcatalog`;
4239
+ }
4240
+ async getTenantApiBaseUrl() {
4241
+ if (!this.configurationService.config?.assetServices)
4242
+ return null;
4243
+ let tenantId = 'octosystem';
4244
+ if (this.tenantIdProvider) {
4245
+ tenantId = await this.tenantIdProvider() ?? 'octosystem';
4246
+ }
4247
+ return `${this.configurationService.config.assetServices}${tenantId}/v1/models`;
4248
+ }
4249
+ // --- System-scope endpoints ---
4250
+ async getCatalogs() {
4251
+ const baseUrl = this.getSystemApiBaseUrl();
4252
+ if (!baseUrl)
4253
+ return null;
4254
+ const r = await firstValueFrom(this.httpClient.get(`${baseUrl}/catalogs`, { observe: 'response' }));
4255
+ return r.body;
4256
+ }
4257
+ async listModels(skip = 0, take = 100) {
4258
+ const baseUrl = this.getSystemApiBaseUrl();
4259
+ if (!baseUrl)
4260
+ return null;
4261
+ const params = new HttpParams().set('skip', skip.toString()).set('take', take.toString());
4262
+ const r = await firstValueFrom(this.httpClient.get(baseUrl, { params, observe: 'response' }));
4263
+ return r.body;
4264
+ }
4265
+ async searchModels(q, skip = 0, take = 100) {
4266
+ const baseUrl = this.getSystemApiBaseUrl();
4267
+ if (!baseUrl)
4268
+ return null;
4269
+ const params = new HttpParams().set('q', q).set('skip', skip.toString()).set('take', take.toString());
4270
+ const r = await firstValueFrom(this.httpClient.get(`${baseUrl}/search`, { params, observe: 'response' }));
4271
+ return r.body;
4272
+ }
4273
+ async refreshCatalogs() {
4274
+ const baseUrl = this.getSystemApiBaseUrl();
4275
+ if (!baseUrl)
4276
+ return;
4277
+ await firstValueFrom(this.httpClient.post(`${baseUrl}/refresh`, null));
4278
+ }
4279
+ // --- Tenant-scope endpoints ---
4280
+ async importFromCatalog(tenantId, catalogName, modelId) {
4281
+ if (!this.configurationService.config?.assetServices)
4282
+ return null;
4283
+ const url = `${this.configurationService.config.assetServices}${tenantId}/v1/models/ImportFromCatalog`;
4284
+ const body = { catalogName, modelId };
4285
+ const r = await firstValueFrom(this.httpClient.post(url, body, { observe: 'response' }));
4286
+ return r.body;
4287
+ }
4288
+ async resolveDependencies(tenantId, catalogName, modelId) {
4289
+ if (!this.configurationService.config?.assetServices)
4290
+ return null;
4291
+ const url = `${this.configurationService.config.assetServices}${tenantId}/v1/models/ResolveDependencies`;
4292
+ const body = { catalogName, modelId };
4293
+ const r = await firstValueFrom(this.httpClient.post(url, body, { observe: 'response' }));
4294
+ return r.body;
4295
+ }
4296
+ async checkUpgrade(tenantId, catalogName, modelId) {
4297
+ if (!this.configurationService.config?.assetServices)
4298
+ return null;
4299
+ const url = `${this.configurationService.config.assetServices}${tenantId}/v1/models/CheckUpgrade`;
4300
+ const body = { catalogName, modelId };
4301
+ const r = await firstValueFrom(this.httpClient.post(url, body, { observe: 'response' }));
4302
+ return r.body;
4303
+ }
4304
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: CkModelCatalogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4305
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: CkModelCatalogService, providedIn: 'root' });
4306
+ }
4307
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: CkModelCatalogService, decorators: [{
4308
+ type: Injectable,
4309
+ args: [{
4310
+ providedIn: 'root'
4311
+ }]
4312
+ }] });
4313
+
4231
4314
  const GetEntitiesByCkTypeDocumentDto = gql `
4232
4315
  query getEntitiesByCkType($ckTypeId: String!, $rtId: OctoObjectId, $after: String, $first: Int, $searchFilter: SearchFilter, $fieldFilters: [FieldFilter], $sort: [Sort]) {
4233
4316
  runtime {
@@ -4659,5 +4742,5 @@ function provideOctoServices(octoServiceOptions) {
4659
4742
  * Generated bundle index. Do not edit.
4660
4743
  */
4661
4744
 
4662
- export { AggregationInputTypesDto, AggregationTypeDto, AggregationTypesDto, AssetRepoGraphQlDataSource, AssetRepoService, AssociationModOptionsDto, AttributeSelectorService, AttributeValueTypeDto, BasicLegalEntityTypeDto, BasicSalutationDto, BasicTypeOfTelephoneBasicDto, BasicTypeOfTelephoneEnhancedDto, BasicUnitOfMeasureDto, BotService, CONFIGURATION_SERVICE, CkExtensionUpdateOperationsDto, CkModelService, CkTypeAttributeService, CkTypeMetaData, CkTypeSelectorService, CommunicationService, DeleteStrategiesDto, DeploymentState, EnergyCommunityBillingCycleDto, EnergyCommunityBillingDocumentStateDto, EnergyCommunityBillingTypeDto, EnergyCommunityDataQualityDto, EnergyCommunityFacilityTypeDto, EnergyCommunityProductionTypeDto, EnergyCommunityStateDto, EnergyCommunityTaxProcedureCreditNoteDto, EnvironmentGoalStateDto, FieldFilterOperatorsDto, GetCkModelByIdDocumentDto, GetCkModelByIdDtoGQL, GetCkRecordAttributesDocumentDto, GetCkRecordAttributesDtoGQL, GetCkTypeAttributesDocumentDto, GetCkTypeAttributesDtoGQL, GetCkTypeAvailableQueryColumnsDocumentDto, GetCkTypeAvailableQueryColumnsDtoGQL, GetCkTypesDocumentDto, GetCkTypesDtoGQL, GetDerivedCkTypesDocumentDto, GetDerivedCkTypesDtoGQL, GetEntitiesByCkTypeDocumentDto, GetEntitiesByCkTypeDtoGQL, GraphDirectionDto, GraphQL, GraphQLCloneIgnoredProperties, GraphQLCommonIgnoredProperties, GraphQlDataSource, HealthService, HealthStatus, IDENTITY_PROVIDER_TYPE_LABELS, IdentityProviderType, IdentityService, ImportStrategyDto, IndustryBasicAlarmPriorityDto, IndustryBasicAlarmSourceTypeDto, IndustryBasicAlarmStateDto, IndustryBasicAlarmTypeDto, IndustryBasicIecDataTypeDto, IndustryBasicMachineCapabilitiesDto, IndustryBasicMachineStateDto, IndustryMaintenanceAggregationTypeDto, IndustryMaintenanceCostCategoryDto, IndustryMaintenanceEnergyBalanceGroupDto, IndustryMaintenanceEnergyBalanceProductDto, IndustryMaintenanceEnergyBalanceUnitDto, IndustryMaintenanceOrderPriorityDto, IndustryMaintenanceOrderStateDto, IndustryMaintenanceOrderTypeDto, IndustryMaintenanceServiceTypeDto, IndustryManufacturingFeedbackSyncStateDto, IndustryManufacturingProductionOrderItemStateDto, IndustryManufacturingProductionOrderStateDto, JobManagementService, LevelMetaData, LoggerSeverity, ModelStateDto, MultiplicitiesDto, NavigationFilterModeDto, OctoErrorLink, OctoGraphQLServiceBase, OctoSdkDemoCustomerStatusDto, OctoSdkDemoNetworkOperatorDto, OctoSdkDemoOperatingStatusDto, OctoServiceOptions, OctoServicesModule, PagedGraphResultDto, ProgressValue, ProgressWindowService, QueryModeDto, RtAssociationMetaData, RuntimeEntityDialogDataSource, RuntimeEntitySelectDataSource, SearchFilterTypesDto, SortOrderDto, 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 };
4745
+ export { AggregationInputTypesDto, AggregationTypeDto, AggregationTypesDto, AssetRepoGraphQlDataSource, AssetRepoService, AssociationModOptionsDto, AttributeSelectorService, AttributeValueTypeDto, BasicLegalEntityTypeDto, BasicSalutationDto, BasicTypeOfTelephoneBasicDto, BasicTypeOfTelephoneEnhancedDto, BasicUnitOfMeasureDto, BotService, CONFIGURATION_SERVICE, CkExtensionUpdateOperationsDto, CkModelCatalogService, CkModelService, CkTypeAttributeService, CkTypeMetaData, CkTypeSelectorService, CommunicationService, DeleteStrategiesDto, DeploymentState, EnergyCommunityBillingCycleDto, EnergyCommunityBillingDocumentStateDto, EnergyCommunityBillingTypeDto, EnergyCommunityDataQualityDto, EnergyCommunityFacilityTypeDto, EnergyCommunityProductionTypeDto, EnergyCommunityStateDto, EnergyCommunityTaxProcedureCreditNoteDto, EnvironmentGoalStateDto, FieldFilterOperatorsDto, GetCkModelByIdDocumentDto, GetCkModelByIdDtoGQL, GetCkRecordAttributesDocumentDto, GetCkRecordAttributesDtoGQL, GetCkTypeAttributesDocumentDto, GetCkTypeAttributesDtoGQL, GetCkTypeAvailableQueryColumnsDocumentDto, GetCkTypeAvailableQueryColumnsDtoGQL, GetCkTypesDocumentDto, GetCkTypesDtoGQL, GetDerivedCkTypesDocumentDto, GetDerivedCkTypesDtoGQL, GetEntitiesByCkTypeDocumentDto, GetEntitiesByCkTypeDtoGQL, GraphDirectionDto, GraphQL, GraphQLCloneIgnoredProperties, GraphQLCommonIgnoredProperties, GraphQlDataSource, HealthService, HealthStatus, IDENTITY_PROVIDER_TYPE_LABELS, IdentityProviderType, IdentityService, ImportStrategyDto, IndustryBasicAlarmPriorityDto, IndustryBasicAlarmSourceTypeDto, IndustryBasicAlarmStateDto, IndustryBasicAlarmTypeDto, IndustryBasicIecDataTypeDto, IndustryBasicMachineCapabilitiesDto, IndustryBasicMachineStateDto, IndustryMaintenanceAggregationTypeDto, IndustryMaintenanceCostCategoryDto, IndustryMaintenanceEnergyBalanceGroupDto, IndustryMaintenanceEnergyBalanceProductDto, IndustryMaintenanceEnergyBalanceUnitDto, IndustryMaintenanceOrderPriorityDto, IndustryMaintenanceOrderStateDto, IndustryMaintenanceOrderTypeDto, IndustryMaintenanceServiceTypeDto, IndustryManufacturingFeedbackSyncStateDto, IndustryManufacturingProductionOrderItemStateDto, IndustryManufacturingProductionOrderStateDto, JobManagementService, LevelMetaData, LoggerSeverity, ModelStateDto, MultiplicitiesDto, NavigationFilterModeDto, OctoErrorLink, OctoGraphQLServiceBase, OctoSdkDemoCustomerStatusDto, OctoSdkDemoNetworkOperatorDto, OctoSdkDemoOperatingStatusDto, OctoServiceOptions, OctoServicesModule, PagedGraphResultDto, ProgressValue, ProgressWindowService, QueryModeDto, RtAssociationMetaData, RuntimeEntityDialogDataSource, RuntimeEntitySelectDataSource, SearchFilterTypesDto, SortOrderDto, 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 };
4663
4746
  //# sourceMappingURL=meshmakers-octo-services.mjs.map