Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,29 @@ Returns all subscription IDs for a given subscriber.
| ------------ | --------- | ---------- |
| `subscriber` | `Address` | `Vec<u64>` |

#### `generateMerchantReport(dashboardData, format)`
Generates exportable standardized merchant reports in `json` or `csv` format.

---

## Automated Compliance API

The `ComplianceService` handles continuous regulatory monitoring, automated checks, alerts management, audit trail logging, and reporting exports.

### Methods

#### `runAutomatedChecks(subscriptions)`
Executes compliance rule evaluation across all subscriptions and generates warning/failure alerts.

#### `getAlerts()` & `acknowledgeAlert(alertId, performer)`
Retrieves active compliance alerts and acknowledges specific regulatory issues.

#### `getAuditTrail()` & `logAuditEntry(action, performer, targetId, details)`
Manages immutable audit trail logs for compliance operations.

#### `generateComplianceReport(format)`
Exports full compliance status and audit logs in `json` or `csv`.

#### `get_merchant_plans`

Returns all plan IDs for a given merchant.
Expand Down
4 changes: 4 additions & 0 deletions docs/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,10 @@ components:
tags:
- name: Initialization
description: One-time contract setup
- name: Merchant Analytics
description: Merchant revenue, subscriber analytics, and reporting
- name: Automated Compliance
description: Automated compliance checks, alerts, regulatory monitoring, and audit trail
- name: Plan Management
description: Create and manage subscription plans
- name: Subscription Management
Expand Down
8 changes: 7 additions & 1 deletion src/navigation/AppNavigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ const PaymentMethodsScreen = lazyScreen(() =>
}))
);
const AnalyticsDashboard = lazyScreen(() => import('../../app/screens/AnalyticsDashboard'));
const AutomatedComplianceDashboard = lazyScreen(() => import('../screens/AutomatedComplianceDashboard'));
const TrialDetailsScreen = lazyScreen(() => import('../screens/TrialDetailsScreen'));

// Issue #547: GDPR
Expand Down Expand Up @@ -617,7 +618,12 @@ const SettingsStack = () => (
<Stack.Screen
name="AnalyticsDashboard"
component={AnalyticsDashboard}
options={{ title: 'Analytics Dashboard', headerShown: true }}
options={{ title: 'Analytics', headerShown: true }}
/>
<Stack.Screen
name="AutomatedCompliance"
component={AutomatedComplianceDashboard}
options={{ title: 'Automated Compliance', headerShown: true }}
/>
{/* Issue #547: GDPR */}
<Stack.Screen
Expand Down
2 changes: 2 additions & 0 deletions src/navigation/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export type RootStackParamList = {
PauseSubscription: { subscriptionId: string };
RoleManagement: undefined;
RevenueReport: undefined;
AutomatedCompliance: undefined;
};

export type TabParamList = {
Expand All @@ -98,6 +99,7 @@ export type TabParamList = {
WalletTab: undefined;
AnalyticsTab: undefined;
RevenueTab: undefined;
ComplianceTab: undefined;
SettingsTab: NavigatorScreenParams<RootStackParamList> | undefined;
};

Expand Down
Loading
Loading