diff --git a/lib/facts/reports-service.js b/lib/facts/reports-service.js new file mode 100644 --- /dev/null +++ b/lib/facts/reports-service.js @@ -0,0 +1,19 @@ +// @flow + +import { isDev } from '../utils/dev-utils.js'; + +const reportsServiceURL: string = isDev + ? 'https://reports.staging.commtechnologies.org' + : 'https://reports.commtechnologies.org'; + +type ReportsServiceHTTPEndpoint = { + +path: '/reports', + +method: 'POST', +}; + +const sendReportEndpoint: ReportsServiceHTTPEndpoint = Object.freeze({ + path: `/reports`, + method: 'POST', +}); + +export { reportsServiceURL, sendReportEndpoint }; diff --git a/lib/types/report-types.js b/lib/types/report-types.js --- a/lib/types/report-types.js +++ b/lib/types/report-types.js @@ -188,6 +188,15 @@ +id: string, }; +// Reports Service specific types +export type ReportsServiceSendReportsRequest = + | ClientReportCreationRequest + | $ReadOnlyArray; +export type ReportsServiceSendReportsResponse = { + +reportIDs: $ReadOnlyArray, +}; + +// Keyserver specific types type ReportInfo = { +id: string, +viewerID: string,