Merge release/delivery (IAM single sign-on) into the triage work

Brings the four release/delivery commits (IAM SSO for the admin panel,
both apps and the API; IAM env in docker-compose) onto fix/issues-triage.

Conflicts:
- customer-auth.service.ts imports: both kept.
- both apps' api/client.ts: both kept (AccountingBalance/WageQuote, and
  iamAppUrl).
- all build output (admin-panel, user-app, user-app-v2 dist, and the api
  release bundle): rebuilt from the merged source instead of picking a
  side.

Fixed while verifying:
- The IAM change calls iam.browserBootstrapUrl after every login, but
  the identity-service stand-ins in three test files lacked it. 15 tests
  failed on release/delivery itself.
- SMS relay: SMS_RELAY_PLATFORM was read but never sent, so the gateway
  never got `platform` (documented body: phone, host, text, platform).
  relayConfig() now returns it ("default" → null) and the request carries
  it. sms.service.spec now passes.

All 249 API tests pass; the three front-ends type-check and build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
s.esmaeili
2026-10-10 09:03:53 +03:30
co-authored by Claude Opus 5.5
315 changed files with 82919 additions and 7020 deletions
+18
View File
@@ -26,3 +26,21 @@ export function envOrNull(name: string): string | null {
const trimmed = typeof raw === 'string' ? raw.trim() : '';
return trimmed === '' ? null : trimmed;
}
/** Comma-separated env list. Blank entries are dropped. */
export function envList(name: string): string[] {
const raw = envOrNull(name);
if (!raw) return [];
return raw.split(',').map((item) => item.trim()).filter(Boolean);
}
/**
* Exact string match. A requested URI that is not in the list is refused
* (null) instead of being replaced by another app's address.
* With no request, the first configured value is used.
*/
export function pickExactUri(requested: string | undefined, allowed: Array<string | null>): string | null {
const unique = [...new Set(allowed.filter((item): item is string => Boolean(item)))];
if (requested) return unique.includes(requested) ? requested : null;
return unique[0] ?? null;
}