Skip to content

Commit

Permalink
Export RSVP methods object.
Browse files Browse the repository at this point in the history
  • Loading branch information
barinbritva committed Apr 25, 2023
1 parent d82c5b2 commit cb30511
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
16 changes: 5 additions & 11 deletions src/Generator/ICalendar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,12 @@ export interface DataPiece {

export type Method = 'PUBLISH' | 'REQUEST' | 'REPLY' | 'ADD' | 'CANCEL';

const publish: Method = 'PUBLISH';
const request: Method = 'REQUEST';
const reply: Method = 'REPLY';
const add: Method = 'ADD';
const cancel: Method = 'CANCEL';

export const Methods = {
Publish: publish,
Request: request,
Reply: reply,
Add: add,
Cancel: cancel
Publish: 'PUBLISH' as const,
Request: 'REQUEST' as const,
Reply: 'REPLY' as const,
Add: 'ADD' as const,
Cancel: 'CANCEL' as const
};

export interface InvitationMeta {
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ export {Outlook} from './Generator/Outlook';
export {Office365} from './Generator/Office365';
export {Google} from './Generator/Google';
export {Yahoo} from './Generator/Yahoo';
export {ICalendar} from './Generator/ICalendar';
export {ICalendar, Methods} from './Generator/ICalendar';
export {MultiGenerator} from './Generator/MultiGenerator';
3 changes: 1 addition & 2 deletions tests/i-calendar.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {describe, expect, it, beforeAll, afterAll} from 'vitest';
import sinon from 'sinon';
import {Event, ICalendar} from '../src';
import {Methods} from '../src/Generator/ICalendar';
import {Event, ICalendar, Methods} from '../src';

const random = sinon.stub(Math, 'random');

Expand Down

0 comments on commit cb30511

Please sign in to comment.