@meshmakers/octo-services 3.3.980 → 3.3.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.
|
@@ -835,6 +835,7 @@ var SystemCommunicationConfigurationStateDto;
|
|
|
835
835
|
var SystemCommunicationDeploymentStateDto;
|
|
836
836
|
(function (SystemCommunicationDeploymentStateDto) {
|
|
837
837
|
SystemCommunicationDeploymentStateDto["DeployedDto"] = "DEPLOYED";
|
|
838
|
+
SystemCommunicationDeploymentStateDto["DisabledDto"] = "DISABLED";
|
|
838
839
|
SystemCommunicationDeploymentStateDto["ErrorDto"] = "ERROR";
|
|
839
840
|
SystemCommunicationDeploymentStateDto["PendingDto"] = "PENDING";
|
|
840
841
|
SystemCommunicationDeploymentStateDto["UndeployedDto"] = "UNDEPLOYED";
|
|
@@ -3802,6 +3803,68 @@ class IdentityService {
|
|
|
3802
3803
|
}));
|
|
3803
3804
|
}
|
|
3804
3805
|
}
|
|
3806
|
+
// ---- Multi-tenant client mirrors (Epic 3054 #4045) -----------------------
|
|
3807
|
+
/**
|
|
3808
|
+
* Lists the sub-tenants this `ClientCredentials` client has been
|
|
3809
|
+
* auto-provisioned into. Empty array when the client has no mirrors.
|
|
3810
|
+
*/
|
|
3811
|
+
async getClientMirrors(clientId) {
|
|
3812
|
+
const baseUrl = await this.getApiBaseUrl();
|
|
3813
|
+
if (baseUrl) {
|
|
3814
|
+
const response = await firstValueFrom(this.httpClient.get(baseUrl + `clients/${clientId}/mirrors`, {
|
|
3815
|
+
observe: 'response'
|
|
3816
|
+
}));
|
|
3817
|
+
return response.body ?? [];
|
|
3818
|
+
}
|
|
3819
|
+
return [];
|
|
3820
|
+
}
|
|
3821
|
+
/**
|
|
3822
|
+
* Backfill: provisions a flagged client into every existing sub-tenant of
|
|
3823
|
+
* the calling tenant. Server returns `400` if the client is not flagged.
|
|
3824
|
+
*/
|
|
3825
|
+
async provisionClientInExistingTenants(clientId) {
|
|
3826
|
+
const baseUrl = await this.getApiBaseUrl();
|
|
3827
|
+
if (baseUrl) {
|
|
3828
|
+
const response = await firstValueFrom(this.httpClient.post(baseUrl + `clients/${clientId}/mirrors/provisionInExistingTenants`, null, { observe: 'response' }));
|
|
3829
|
+
return response.body;
|
|
3830
|
+
}
|
|
3831
|
+
return null;
|
|
3832
|
+
}
|
|
3833
|
+
/**
|
|
3834
|
+
* Manually provisions a flagged client into one specific sub-tenant.
|
|
3835
|
+
*/
|
|
3836
|
+
async provisionClientInTenant(clientId, childTenantId) {
|
|
3837
|
+
const params = new HttpParams().set('childTenantId', childTenantId);
|
|
3838
|
+
const baseUrl = await this.getApiBaseUrl();
|
|
3839
|
+
if (baseUrl) {
|
|
3840
|
+
const response = await firstValueFrom(this.httpClient.post(baseUrl + `clients/${clientId}/mirrors/provisionInTenant`, null, { params, observe: 'response' }));
|
|
3841
|
+
return response.body;
|
|
3842
|
+
}
|
|
3843
|
+
return null;
|
|
3844
|
+
}
|
|
3845
|
+
/**
|
|
3846
|
+
* Removes a single mirror (drops both the child-side client and the parent's
|
|
3847
|
+
* tracking row).
|
|
3848
|
+
*/
|
|
3849
|
+
async unprovisionClientFromTenant(clientId, childTenantId) {
|
|
3850
|
+
const baseUrl = await this.getApiBaseUrl();
|
|
3851
|
+
if (baseUrl) {
|
|
3852
|
+
await firstValueFrom(this.httpClient.delete(baseUrl + `clients/${clientId}/mirrors/${childTenantId}`, {
|
|
3853
|
+
observe: 'response'
|
|
3854
|
+
}));
|
|
3855
|
+
}
|
|
3856
|
+
}
|
|
3857
|
+
/**
|
|
3858
|
+
* Flips the `AutoProvisionInChildTenants` flag on a client without rewriting
|
|
3859
|
+
* the full client object. Flipping `false → true` does NOT auto-backfill —
|
|
3860
|
+
* use {@link provisionClientInExistingTenants} for that.
|
|
3861
|
+
*/
|
|
3862
|
+
async setClientAutoProvisionInChildTenants(clientId, enabled) {
|
|
3863
|
+
const baseUrl = await this.getApiBaseUrl();
|
|
3864
|
+
if (baseUrl) {
|
|
3865
|
+
await firstValueFrom(this.httpClient.patch(baseUrl + `clients/${clientId}/autoProvisionInChildTenants`, { enabled }, { observe: 'response' }));
|
|
3866
|
+
}
|
|
3867
|
+
}
|
|
3805
3868
|
async generatePassword() {
|
|
3806
3869
|
const params = new HttpParams();
|
|
3807
3870
|
const baseUrl = await this.getApiBaseUrl();
|