@meshmakers/octo-services 3.4.980 → 3.4.1000

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.
@@ -4456,9 +4456,9 @@ class AssetRepoService {
4456
4456
  }
4457
4457
  }
4458
4458
  /**
4459
- * Enables the Stream Data feature for a tenant. Installs the
4460
- * `System.StreamData` CK model and provisions the backing time-series
4461
- * storage. Errors propagate to the caller.
4459
+ * Enables the Stream Data feature for a tenant: switches the tenant flag on
4460
+ * and imports the `System.StreamData` CK model. No time-series storage is
4461
+ * provisioned until an archive is activated. Errors propagate to the caller.
4462
4462
  *
4463
4463
  * Tenant-scoped REST endpoint: `POST {assetServices}{tenantId}/v1/streamdata/enable`.
4464
4464
  */
@@ -4469,10 +4469,13 @@ class AssetRepoService {
4469
4469
  }
4470
4470
  }
4471
4471
  /**
4472
- * Disables the Stream Data feature for a tenant. Drops the backing
4473
- * time-series storage and removes the `System.StreamData` model.
4474
- * Destructive — the UI must confirm before calling. Errors propagate to the
4475
- * caller.
4472
+ * Disables the Stream Data feature for a tenant: a reversible flag flip.
4473
+ * Refused with HTTP 409 while any archive of the tenant is still activated —
4474
+ * the `OperationFailedErrorDto` body names them and the remediation
4475
+ * (`DisableArchive` / `DeleteArchive`). The `System.StreamData` model, the
4476
+ * archive definitions and the stored stream data are kept; re-enabling
4477
+ * restores access. Precondition for tenant delete/detach (AB#4255). Errors
4478
+ * propagate to the caller.
4476
4479
  *
4477
4480
  * Tenant-scoped REST endpoint: `POST {assetServices}{tenantId}/v1/streamdata/disable`.
4478
4481
  */
@@ -4482,6 +4485,22 @@ class AssetRepoService {
4482
4485
  await firstValueFrom(this.httpClient.post(uri, null, { observe: 'response' }));
4483
4486
  }
4484
4487
  }
4488
+ /**
4489
+ * Reads the tenant-level Stream Data status. `tenantEnabled` reflects the
4490
+ * tenant flag that `enableStreamData` / `disableStreamData` switch — unlike
4491
+ * the presence of the `System.StreamData` CK model, which a disable keeps
4492
+ * (AB#4255). Returns `null` when the asset service is not configured.
4493
+ * Errors propagate to the caller.
4494
+ *
4495
+ * Tenant-scoped REST endpoint: `GET {assetServices}{tenantId}/v1/streamdata/status`.
4496
+ */
4497
+ async getStreamDataStatus(tenantId) {
4498
+ if (!this.configurationService.config?.assetServices) {
4499
+ return null;
4500
+ }
4501
+ const uri = `${this.configurationService.config.assetServices}${tenantId}/v1/streamdata/status`;
4502
+ return await firstValueFrom(this.httpClient.get(uri));
4503
+ }
4485
4504
  async importRtModel(tenantId, file, importStrategy = ImportStrategyDto.InsertOnly) {
4486
4505
  const params = new HttpParams()
4487
4506
  .set('importStrategy', importStrategy.toString());
@@ -5586,8 +5605,10 @@ class CommunicationService {
5586
5605
  await firstValueFrom(this.httpClient.post(uri, null, { observe: 'response' }));
5587
5606
  }
5588
5607
  /**
5589
- * Disables the Communication feature for a tenant. Tears down the adapter
5590
- * wiring and removes the `System.Communication` model. Destructive the UI
5608
+ * Disables the Communication feature for a tenant. Reversible flag flip that
5609
+ * removes the trigger schedules and unloads the tenant from the controller;
5610
+ * nothing is undeployed. Refused with 409 while pools or workloads of the
5611
+ * tenant are still deployed (AB#4255) — the error body names them. The UI
5591
5612
  * must confirm before calling. Errors propagate to the caller.
5592
5613
  */
5593
5614
  async disableCommunication(tenantId) {
@@ -6059,9 +6080,11 @@ class ReportingService {
6059
6080
  await firstValueFrom(this.httpClient.post(uri, null, { observe: 'response' }));
6060
6081
  }
6061
6082
  /**
6062
- * Disables the Reporting feature for a tenant. Drops the backing storage and
6063
- * removes the `System.Reporting` model. Destructive the UI must confirm
6064
- * before calling. Errors propagate to the caller.
6083
+ * Disables the Reporting feature for a tenant. Reversible flag flip: report
6084
+ * definitions and stored reports stay in the tenant and are accessible again
6085
+ * after `enableReporting`; until then the reporting API, designer and viewer
6086
+ * answer 403. Precondition for tenant delete/detach (AB#4255). The UI must
6087
+ * confirm before calling. Errors propagate to the caller.
6065
6088
  */
6066
6089
  async disableReporting(tenantId) {
6067
6090
  if (!this.reportingServicesUrl) {