Skip to content

Commit

Permalink
feat: Export event types
Browse files Browse the repository at this point in the history
So they can be used in tests.
  • Loading branch information
gnarea committed Jul 30, 2023
1 parent bb1a695 commit ab77718
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@

export type { IncomingServiceMessage, OutgoingServiceMessage } from './lib/messages.js';
export { makeIncomingServiceMessage, makeOutgoingCloudEvent } from './lib/converters.js';
export { INCOMING_SERVICE_MESSAGE_TYPE, OUTGOING_SERVICE_MESSAGE_TYPE } from './lib/eventTypes.js';
6 changes: 1 addition & 5 deletions src/lib/converters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ import { CloudEvent, type CloudEventV1 } from 'cloudevents';
import { addMonths, parseISO } from 'date-fns';

import type { IncomingServiceMessage, OutgoingServiceMessage } from './messages.js';

const INCOMING_SERVICE_MESSAGE_TYPE =
'tech.relaycorp.awala.endpoint-internet.incoming-service-message';
const OUTGOING_SERVICE_MESSAGE_TYPE =
'tech.relaycorp.awala.endpoint-internet.outgoing-service-message';
import { INCOMING_SERVICE_MESSAGE_TYPE, OUTGOING_SERVICE_MESSAGE_TYPE } from './eventTypes.js';

const OUTGOING_MESSAGE_TTL_MONTHS = 3;

Expand Down
4 changes: 4 additions & 0 deletions src/lib/eventTypes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export const INCOMING_SERVICE_MESSAGE_TYPE =
'tech.relaycorp.awala.endpoint-internet.incoming-service-message';
export const OUTGOING_SERVICE_MESSAGE_TYPE =
'tech.relaycorp.awala.endpoint-internet.outgoing-service-message';

0 comments on commit ab77718

Please sign in to comment.