Add improvements 2
This commit is contained in:
@@ -71,7 +71,7 @@ class ServiceAuthenticator:
|
||||
}
|
||||
|
||||
if tenant_id:
|
||||
headers["X-Tenant-ID"] = str(tenant_id)
|
||||
headers["x-tenant-id"] = str(tenant_id)
|
||||
|
||||
return headers
|
||||
|
||||
|
||||
@@ -351,7 +351,7 @@ class ForecastServiceClient(BaseServiceClient):
|
||||
"""
|
||||
Trigger demand forecasting insights for a tenant (internal service use only).
|
||||
|
||||
This method calls the internal endpoint which is protected by X-Internal-Service header.
|
||||
This method calls the internal endpoint which is protected by x-internal-service header.
|
||||
Used by demo-session service after cloning to generate AI insights from seeded data.
|
||||
|
||||
Args:
|
||||
@@ -366,7 +366,7 @@ class ForecastServiceClient(BaseServiceClient):
|
||||
endpoint=f"forecasting/internal/ml/generate-demand-insights",
|
||||
tenant_id=tenant_id,
|
||||
data={"tenant_id": tenant_id},
|
||||
headers={"X-Internal-Service": "demo-session"}
|
||||
headers={"x-internal-service": "demo-session"}
|
||||
)
|
||||
|
||||
if result:
|
||||
|
||||
@@ -766,7 +766,7 @@ class InventoryServiceClient(BaseServiceClient):
|
||||
"""
|
||||
Trigger inventory alerts for a tenant (internal service use only).
|
||||
|
||||
This method calls the internal endpoint which is protected by X-Internal-Service header.
|
||||
This method calls the internal endpoint which is protected by x-internal-service header.
|
||||
The endpoint should trigger alerts specifically for the given tenant.
|
||||
|
||||
Args:
|
||||
@@ -783,7 +783,7 @@ class InventoryServiceClient(BaseServiceClient):
|
||||
endpoint="inventory/internal/alerts/trigger",
|
||||
tenant_id=tenant_id,
|
||||
data={},
|
||||
headers={"X-Internal-Service": "demo-session"}
|
||||
headers={"x-internal-service": "demo-session"}
|
||||
)
|
||||
|
||||
if result:
|
||||
@@ -819,7 +819,7 @@ class InventoryServiceClient(BaseServiceClient):
|
||||
"""
|
||||
Trigger safety stock optimization insights for a tenant (internal service use only).
|
||||
|
||||
This method calls the internal endpoint which is protected by X-Internal-Service header.
|
||||
This method calls the internal endpoint which is protected by x-internal-service header.
|
||||
|
||||
Args:
|
||||
tenant_id: Tenant ID to trigger insights for
|
||||
@@ -833,7 +833,7 @@ class InventoryServiceClient(BaseServiceClient):
|
||||
endpoint="inventory/internal/ml/generate-safety-stock-insights",
|
||||
tenant_id=tenant_id,
|
||||
data={"tenant_id": tenant_id},
|
||||
headers={"X-Internal-Service": "demo-session"}
|
||||
headers={"x-internal-service": "demo-session"}
|
||||
)
|
||||
|
||||
if result:
|
||||
|
||||
@@ -580,7 +580,7 @@ class ProcurementServiceClient(BaseServiceClient):
|
||||
"""
|
||||
Trigger delivery tracking for a tenant (internal service use only).
|
||||
|
||||
This method calls the internal endpoint which is protected by X-Internal-Service header.
|
||||
This method calls the internal endpoint which is protected by x-internal-service header.
|
||||
|
||||
Args:
|
||||
tenant_id: Tenant ID to trigger delivery tracking for
|
||||
@@ -596,7 +596,7 @@ class ProcurementServiceClient(BaseServiceClient):
|
||||
endpoint="procurement/internal/delivery-tracking/trigger",
|
||||
tenant_id=tenant_id,
|
||||
data={},
|
||||
headers={"X-Internal-Service": "demo-session"}
|
||||
headers={"x-internal-service": "demo-session"}
|
||||
)
|
||||
|
||||
if result:
|
||||
@@ -632,7 +632,7 @@ class ProcurementServiceClient(BaseServiceClient):
|
||||
"""
|
||||
Trigger price forecasting insights for a tenant (internal service use only).
|
||||
|
||||
This method calls the internal endpoint which is protected by X-Internal-Service header.
|
||||
This method calls the internal endpoint which is protected by x-internal-service header.
|
||||
|
||||
Args:
|
||||
tenant_id: Tenant ID to trigger insights for
|
||||
@@ -646,7 +646,7 @@ class ProcurementServiceClient(BaseServiceClient):
|
||||
endpoint="procurement/internal/ml/generate-price-insights",
|
||||
tenant_id=tenant_id,
|
||||
data={"tenant_id": tenant_id},
|
||||
headers={"X-Internal-Service": "demo-session"}
|
||||
headers={"x-internal-service": "demo-session"}
|
||||
)
|
||||
|
||||
if result:
|
||||
|
||||
@@ -630,7 +630,7 @@ class ProductionServiceClient(BaseServiceClient):
|
||||
"""
|
||||
Trigger production alerts for a tenant (internal service use only).
|
||||
|
||||
This method calls the internal endpoint which is protected by X-Internal-Service header.
|
||||
This method calls the internal endpoint which is protected by x-internal-service header.
|
||||
Includes both production alerts and equipment maintenance checks.
|
||||
|
||||
Args:
|
||||
@@ -647,7 +647,7 @@ class ProductionServiceClient(BaseServiceClient):
|
||||
endpoint="production/internal/alerts/trigger",
|
||||
tenant_id=tenant_id,
|
||||
data={},
|
||||
headers={"X-Internal-Service": "demo-session"}
|
||||
headers={"x-internal-service": "demo-session"}
|
||||
)
|
||||
|
||||
if result:
|
||||
@@ -683,7 +683,7 @@ class ProductionServiceClient(BaseServiceClient):
|
||||
"""
|
||||
Trigger yield improvement insights for a tenant (internal service use only).
|
||||
|
||||
This method calls the internal endpoint which is protected by X-Internal-Service header.
|
||||
This method calls the internal endpoint which is protected by x-internal-service header.
|
||||
|
||||
Args:
|
||||
tenant_id: Tenant ID to trigger insights for
|
||||
@@ -697,7 +697,7 @@ class ProductionServiceClient(BaseServiceClient):
|
||||
endpoint="production/internal/ml/generate-yield-insights",
|
||||
tenant_id=tenant_id,
|
||||
data={"tenant_id": tenant_id},
|
||||
headers={"X-Internal-Service": "demo-session"}
|
||||
headers={"x-internal-service": "demo-session"}
|
||||
)
|
||||
|
||||
if result:
|
||||
|
||||
Reference in New Issue
Block a user