Files
the-order/packages/api-client/src/client.ts
T
defiQUG 92cc41d26d Add Legal Office seal and complete Azure CDN deployment
- Add Legal Office of the Master seal (SVG design with Maltese Cross, scales of justice, legal scroll)
- Create legal-office-manifest-template.json for Legal Office credentials
- Update SEAL_MAPPING.md and DESIGN_GUIDE.md with Legal Office seal documentation
- Complete Azure CDN infrastructure deployment:
  - Resource group, storage account, and container created
  - 17 PNG seal files uploaded to Azure Blob Storage
  - All manifest templates updated with Azure URLs
  - Configuration files generated (azure-cdn-config.env)
- Add comprehensive Azure CDN setup scripts and documentation
- Fix manifest URL generation to prevent double slashes
- Verify all seals accessible via HTTPS
2025-11-12 22:03:42 -08:00

54 lines
1.6 KiB
TypeScript

import { IdentityClient } from './identity';
import { EResidencyClient } from './eresidency';
import { IntakeClient } from './intake';
import { FinanceClient } from './finance';
import { DataroomClient } from './dataroom';
export class ApiClient {
public readonly identity: IdentityClient;
public readonly eresidency: EResidencyClient;
public readonly intake: IntakeClient;
public readonly finance: FinanceClient;
public readonly dataroom: DataroomClient;
constructor(baseURL?: string) {
// Initialize service clients - each manages its own axios instance
this.identity = new IdentityClient(baseURL);
this.eresidency = new EResidencyClient(baseURL);
this.intake = new IntakeClient(baseURL);
this.finance = new FinanceClient(baseURL);
this.dataroom = new DataroomClient(baseURL);
}
setAuthToken(token: string): void {
if (typeof window !== 'undefined') {
localStorage.setItem('auth_token', token);
}
// Update all service clients
this.identity.setAuthToken(token);
this.eresidency.setAuthToken(token);
this.intake.setAuthToken(token);
this.finance.setAuthToken(token);
this.dataroom.setAuthToken(token);
}
clearAuth(): void {
// Clear tokens in all service clients
this.identity.clearAuthToken();
this.eresidency.clearAuthToken();
this.intake.clearAuthToken();
this.finance.clearAuthToken();
this.dataroom.clearAuthToken();
}
}
// Singleton instance
let apiClientInstance: ApiClient | null = null;
export function getApiClient(): ApiClient {
if (!apiClientInstance) {
apiClientInstance = new ApiClient();
}
return apiClientInstance;
}