feat: Update test-apps for TimeSafari integration with Endorser.ch API patterns
- Add comprehensive configuration system with timesafari-config.json - Create shared config-loader.ts with TypeScript interfaces and mock services - Update Android test app to use TimeSafari community notification patterns - Update iOS test app with rolling window and community features - Update Electron test app with desktop-specific TimeSafari integration - Enhance test API server to simulate Endorser.ch API endpoints - Add pagination support with afterId/beforeId parameters - Implement parallel API requests pattern for offers, projects, people, items - Add community analytics and notification bundle endpoints - Update all test app UIs for TimeSafari-specific functionality - Update README with comprehensive TimeSafari testing guide All test apps now demonstrate: - Real Endorser.ch API integration patterns - TimeSafari community-building features - Platform-specific optimizations (Android/iOS/Electron) - Comprehensive error handling and performance monitoring - Configuration-driven testing with type safety
This commit is contained in:
152
test-apps/config/timesafari-config.json
Normal file
152
test-apps/config/timesafari-config.json
Normal file
@@ -0,0 +1,152 @@
|
||||
{
|
||||
"timesafari": {
|
||||
"appId": "app.timesafari.test",
|
||||
"appName": "TimeSafari Test",
|
||||
"version": "1.0.0",
|
||||
"description": "Test app for TimeSafari Daily Notification Plugin integration"
|
||||
},
|
||||
"endorser": {
|
||||
"baseUrl": "http://localhost:3001",
|
||||
"apiVersion": "v2",
|
||||
"endpoints": {
|
||||
"offers": "/api/v2/report/offers",
|
||||
"offersToPlans": "/api/v2/report/offersToPlansOwnedByMe",
|
||||
"plansLastUpdated": "/api/v2/report/plansLastUpdatedBetween",
|
||||
"notificationsBundle": "/api/v2/report/notifications/bundle"
|
||||
},
|
||||
"authentication": {
|
||||
"type": "Bearer",
|
||||
"token": "test-jwt-token-12345",
|
||||
"headers": {
|
||||
"Authorization": "Bearer test-jwt-token-12345",
|
||||
"Content-Type": "application/json",
|
||||
"X-Privacy-Level": "user-controlled"
|
||||
}
|
||||
},
|
||||
"pagination": {
|
||||
"defaultLimit": 50,
|
||||
"maxLimit": 100,
|
||||
"hitLimitThreshold": 50
|
||||
}
|
||||
},
|
||||
"notificationTypes": {
|
||||
"offers": {
|
||||
"enabled": true,
|
||||
"types": [
|
||||
"new_to_me",
|
||||
"changed_to_me",
|
||||
"new_to_projects",
|
||||
"changed_to_projects",
|
||||
"new_to_favorites",
|
||||
"changed_to_favorites"
|
||||
]
|
||||
},
|
||||
"projects": {
|
||||
"enabled": true,
|
||||
"types": [
|
||||
"local_new",
|
||||
"local_changed",
|
||||
"content_interest_new",
|
||||
"favorited_changed"
|
||||
]
|
||||
},
|
||||
"people": {
|
||||
"enabled": true,
|
||||
"types": [
|
||||
"local_new",
|
||||
"local_changed",
|
||||
"content_interest_new",
|
||||
"favorited_changed",
|
||||
"contacts_changed"
|
||||
]
|
||||
},
|
||||
"items": {
|
||||
"enabled": true,
|
||||
"types": [
|
||||
"local_new",
|
||||
"local_changed",
|
||||
"favorited_changed"
|
||||
]
|
||||
}
|
||||
},
|
||||
"scheduling": {
|
||||
"contentFetch": {
|
||||
"schedule": "0 8 * * *",
|
||||
"time": "08:00",
|
||||
"description": "8 AM daily - fetch community updates"
|
||||
},
|
||||
"userNotification": {
|
||||
"schedule": "0 9 * * *",
|
||||
"time": "09:00",
|
||||
"description": "9 AM daily - notify users of community updates"
|
||||
}
|
||||
},
|
||||
"testData": {
|
||||
"userDid": "did:example:testuser123",
|
||||
"starredPlanIds": [
|
||||
"plan-community-garden",
|
||||
"plan-local-food",
|
||||
"plan-sustainability"
|
||||
],
|
||||
"lastKnownOfferId": "01HSE3R9MAC0FT3P3KZ382TWV7",
|
||||
"lastKnownPlanId": "01HSE3R9MAC0FT3P3KZ382TWV8",
|
||||
"mockOffers": [
|
||||
{
|
||||
"jwtId": "01HSE3R9MAC0FT3P3KZ382TWV7",
|
||||
"handleId": "offer-web-dev-001",
|
||||
"offeredByDid": "did:example:offerer123",
|
||||
"recipientDid": "did:example:testuser123",
|
||||
"objectDescription": "Web development services for community project",
|
||||
"unit": "USD",
|
||||
"amount": 1000,
|
||||
"amountGiven": 500,
|
||||
"amountGivenConfirmed": 250
|
||||
}
|
||||
],
|
||||
"mockProjects": [
|
||||
{
|
||||
"plan": {
|
||||
"jwtId": "01HSE3R9MAC0FT3P3KZ382TWV8",
|
||||
"handleId": "plan-community-garden",
|
||||
"name": "Community Garden Project",
|
||||
"description": "Building a community garden for local food production",
|
||||
"issuerDid": "did:example:issuer123",
|
||||
"agentDid": "did:example:agent123"
|
||||
},
|
||||
"wrappedClaimBefore": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"callbacks": {
|
||||
"offers": {
|
||||
"enabled": true,
|
||||
"localHandler": "handleOffersNotification"
|
||||
},
|
||||
"projects": {
|
||||
"enabled": true,
|
||||
"localHandler": "handleProjectsNotification"
|
||||
},
|
||||
"people": {
|
||||
"enabled": true,
|
||||
"localHandler": "handlePeopleNotification"
|
||||
},
|
||||
"items": {
|
||||
"enabled": true,
|
||||
"localHandler": "handleItemsNotification"
|
||||
},
|
||||
"communityAnalytics": {
|
||||
"enabled": true,
|
||||
"endpoint": "http://localhost:3001/api/analytics/community-events",
|
||||
"headers": {
|
||||
"Content-Type": "application/json",
|
||||
"X-Privacy-Level": "aggregated"
|
||||
}
|
||||
}
|
||||
},
|
||||
"observability": {
|
||||
"enableLogging": true,
|
||||
"logLevel": "debug",
|
||||
"enableMetrics": true,
|
||||
"enableHealthChecks": true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user