{"_id":"@edenhealth/react-native-calendar-events","_rev":"1-1e006d0bdc39c69a201e4fb5923a491f","name":"@edenhealth/react-native-calendar-events","dist-tags":{"latest":"1.6.4"},"versions":{"1.6.4":{"name":"@edenhealth/react-native-calendar-events","description":"React Native module for iOS Calendar Events","version":"1.6.4","bugs":{"url":"https://github.com/edenhealth/react-native-calendar-events/issues"},"devDependencies":{"semantic-release":"^15.9.17"},"homepage":"https://github.com/edenhealth/react-native-calendar-events","keywords":["android","calendar-events","eventkit","ios","react-component","react-native","reminders"],"license":"MIT","peerDependencies":{"react-native":">=0.56.0"},"publishConfig":{"registry":"https://registry.npmjs.org","access":"public"},"repository":{"type":"git","url":"git+https://github.com/edenhealth/react-native-calendar-events.git"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"gitHead":"d516d7aebd324eb06611c6496b3220c376a2dd7a","_id":"@edenhealth/react-native-calendar-events@1.6.4","_npmVersion":"6.4.1","_nodeVersion":"10.11.0","_npmUser":{"name":"jesses","email":"hi@jessestuart.com"},"dist":{"integrity":"sha512-TSjx/hd4AuxfX4C2ncE0A8ah9SMmdIGhyX9h0vQoa6MPoG2YypwwPIG0ttFhwrop9HYb5qMs7a9AntnNl8TXDw==","shasum":"87136d810a36614875165368bf1256881470c59e","tarball":"https://registry.npmjs.org/@edenhealth/react-native-calendar-events/-/react-native-calendar-events-1.6.4.tgz","fileCount":26,"unpackedSize":401856,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbu39iCRA9TVsSAnZWagAA4dYQAITJo/PTeGDwQTxW90Xc\nDtTdeTt6CsuxfqCoaWe+PHi8iWwZdue25cHaD62QCA/sJBGm/gO7i+MO0tYn\njgHEVetmj1Tdryl/ui+fqEqHBd7fzCFmgAw63MLZy4U1BylUL4/qrOnf1Lxv\navmmcguCgovQsc2i8RIUNYZzElSi0GnSYi7Hdqw3mPoNfkGWg4LBa3VKq4r2\n1TfxicuOLqitvQU5ybeHHPZ6JHr3ZhGBEBoHtMy/G0RvkBGd4uKe2v59UlpV\ngwF6inMf8Kb3H7s+/Rm8k7fLnsGK1sZBReKo/XcdkIUl7TPEuL8zMV4c8/UW\nofyAcAzYI+suQmmXnuh4vqGRv+coil7KG6KZ7//7TfCiNYiWG4bjndED2z1V\nAgECfj7oLKtQRhD5BTP5ibLw71ykHjrcozNIzLNUD3lbskfVBxpuerPXf0IC\nJEwneS/xvWTEMJt3VImh6Lrx4D3uLrDEwWKiC6s9PzWHw8e5mQePOuHkhNn7\n9OsXqIgzlelyORcB24nMTF0+Dc8aXOMbbyHenQaDYwNShUjZqwd+AZcYQbat\nGerqdvil/MNua0oQtKUpc/Iz5uBJ5n5ugKTOrqTAA9su/tVSBc6WY7tFT81f\nA4ctHWx/AmzZCqRaQAh5Thcc5itTZD2S6KBues9hrcjywxHC83xkJXV2d9pj\nwGsG\r\n=LI7F\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBNDy0QJteWhv5qluvz78mz1cErDvQwbssAFW2rrXY+9AiAzGGN1QmQIaS++GmgOEVWz5jjzi2N7gaM/ZLAVrpKJIA=="}]},"maintainers":[{"name":"jesses","email":"hi@jessestuart.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-calendar-events_1.6.4_1539014497552_0.9838631062570318"},"_hasShrinkwrap":false}},"time":{"created":"2018-10-08T16:01:37.462Z","1.6.4":"2018-10-08T16:01:37.677Z","modified":"2022-04-05T06:41:14.350Z"},"maintainers":[{"name":"jesses","email":"hi@jessestuart.com"}],"description":"React Native module for iOS Calendar Events","homepage":"https://github.com/edenhealth/react-native-calendar-events","keywords":["android","calendar-events","eventkit","ios","react-component","react-native","reminders"],"repository":{"type":"git","url":"git+https://github.com/edenhealth/react-native-calendar-events.git"},"bugs":{"url":"https://github.com/edenhealth/react-native-calendar-events/issues"},"license":"MIT","readme":"# React Native Calendar Events\n\n[![npm](https://img.shields.io/npm/v/react-native-calendar-events.svg?style=flat-square)](https://www.npmjs.com/package/react-native-calendar-events)\n[![npm](https://img.shields.io/npm/dm/react-native-calendar-events.svg?style=flat-square)](https://www.npmjs.com/package/react-native-calendar-events)\n[![npm](https://img.shields.io/npm/l/react-native-calendar-events.svg?style=flat-square)](https://github.com/wmcmahan/react-native-calendar-events/blob/master/LICENSE.md)\n\nA React Native module to help access and save events to iOS and Android calendars.\n\n## Table of contents\n- [**Getting started**](#getting-started)\n  - [Install](#step-1---install)\n  - [Link the library](#step-2---link-the-library)\n  - [OS specific setup](#step-3---os-specific-setup)\n- [**API methods**](#api)\n  - [authorizationStatus](#authorizationstatus)\n  - [authorizeEventStore](#authorizeeventstore)\n  - [findCalendars](#findcalendars)\n  - [findEventById](#findeventbyid)\n  - [fetchAllEvents](#fetchallevents)\n  - [saveEvent](#saveevent)\n  - [removeEvent](#removeevent)\n- [**Event fields**](#event-fields)\n  - [Recurrence rules](#recurrence-rule)\n  - [Alarm](#alarms)\n  - [Alarm structuredLocation](#alarm-structuredlocation)\n  - [Options](#options)\n- [**Wiki**](https://github.com/wmcmahan/react-native-calendar-events/wiki)\n\n\n## Getting started\nThis package assumes that you already have a React Native project or are familiar with React Native. If not, checkout the official documentation for more details about getting started with [React Native](https://facebook.github.io/react-native/docs/getting-started.html).\n<br/>\n\nThe following is **required** for the package to work properly.\n\n### Step 1. - Install\nInstall the `react-native-calendar-events` library with native code.\n\n```\nnpm install --save react-native-calendar-events\n```\n\n### Step 2. - Link the library\nSince this package contains native code, you will need to include the code as a library. The React Native documentation on [\"Linking Libraries\"](https://facebook.github.io/react-native/docs/linking-libraries-ios.html) also provides some details for this process.\n\n+ **Automatic linking**\n```\nreact-native link\n```\n\n+ **Manual linking**<br/>\nSometimes \"automatic linking\" is not sufficient or is not properly including the library. Fortunately, the React Native docs on [\"Manual Linking\"](https://facebook.github.io/react-native/docs/linking-libraries-ios.html#manual-linking) serves a helpful guide (with pictures) in the process.\n\n### Step 3. - OS specific setup\n\n- [**iOS specific instructions**](https://github.com/wmcmahan/react-native-calendar-events/wiki/iOS-setup)<br/> iOS specific requirements, such as mandatory privacy usage descriptions and including the `EventKit.framework`.\n\n- [**Android specific instructions**](https://github.com/wmcmahan/react-native-calendar-events/wiki/Android-setup)<br/> Android specific requirements, such as mandatory application permissions.\n\n<br/>\n\n## API\nThe following API allows for interacting with both iOS and Android device calendars. See the full list of available [event fields](#event-fields).\n\n\n```javascript\nimport RNCalendarEvents from 'react-native-calendar-events';\n```\n\n<br/>\n\n### authorizationStatus\nGet calendar authorization status.\n\n```javascript\nRNCalendarEvents.authorizationStatus()\n```\n\nReturns: **Promise** \n- fulfilled: String - `denied`, `restricted`, `authorized` or `undetermined`\n- rejected: Error\n\n<br/>\n\n### authorizeEventStore\nRequest calendar authorization. Authorization must be granted before accessing calendar events.\n\n> Android note: This is only necessary for targeted SDK of 23 and higher.\n\n```javascript\nRNCalendarEvents.authorizeEventStore()\n```\n\nReturns: **Promise** \n - fulfilled: String - `denied`, `restricted`, `authorized` or `undetermined`\n - rejected: Error\n\n<br/>\n\n\n### findCalendars\nFinds all the calendars on the device.\n\n```javascript\nRNCalendarEvents.findCalendars()\n```\n\nReturns: **Promise**\n - fulfilled: Array - A list of known calendars on the device\n - rejected: Error\n\n<br/>\n\n### findEventById\nFind calendar event by id.\nReturns a promise with fulfilled found events.\n\n```javascript\nRNCalendarEvents.findEventById(id)\n```\n\nArguments: \n - id: String - The events unique id.\n\nReturns: **Promise**  \n - fulfilled: Object | null - Found event with unique id.\n - rejected: Error\n\n<br/>\n\n### fetchAllEvents\nFetch all calendar events.\nReturns a promise with fulfilled found events.\n\n```javascript\nRNCalendarEvents.fetchAllEvents(startDate, endDate, calendars)\n```\n\nArguments: \n - startDate: Date - The start date of the range of events fetched.\n - endDate: Date - The end date of the range of events fetched.\n - calendars: Array - List of calendar id strings to specify calendar events. Defaults to all calendars if empty.\n\nReturns: **Promise**  \n - fulfilled: Array - Matched events within the specified date range.\n - rejected: Error\n\n<br/>\n\n### saveEvent\nCreates or updates a calendar event. - [wiki guide](https://github.com/wmcmahan/react-native-calendar-events/wiki/Creating-basic-event)\n\n```javascript\nRNCalendarEvents.saveEvent(title, details, options);\n```\n\nArguments: \n - title: String - The title of the event.\n - [details](#event-fields): Object - The event's details.\n - [options](#options): Object - Options specific to the saved event.\n\nReturns: **Promise** \n - fulfilled: String - Created event's ID.\n - rejected: Error\n\n<br/>\n\nTo update an event, the event `id` must be defined. - [wiki guide](https://github.com/wmcmahan/react-native-calendar-events/wiki/Updating-events)\n\n```javascript\nRNCalendarEvents.saveEvent(title, {id: 'FE6B128F-C0D8-4FB8-8FC6-D1D6BA015CDE'})\n```\n\n<br/>\n\n### removeEvent\nRemoves calendar event.\n\n```javascript\nRNCalendarEvents.removeEvent(id, options)\n```\n\nArguments:\n - id: String - The id of the event to remove.\n - [options](#options): Object - Options specific to event removal.\n\nReturns: **Promise** \n - fulfilled: Bool - Successful\n - rejected: Error\n\n<br/>\n\n## Event fields\n\n| Property        | Type            | Description | iOS | Android |\n| :--------------- | :---------------- | :----------- | :-----------: | :-----------: |\n| **id***  | String  | Unique id for the calendar event. | ✓ | ✓ |\n| **calendarId****   | String           | Unique id for the calendar where the event will be saved. Defaults to the device's default calendar. | ✓ | ✓ |\n| **title**           | String           | The title for the calendar event. | ✓ | ✓ |\n| **startDate**       | Date             | The start date of the calendar event in ISO format. | ✓ | ✓ |\n| **endDate**         | Date             | The end date of the calendar event in ISO format. | ✓ | ✓ |\n| **allDay**          | Bool             | Indicates whether the event is an all-day event. | ✓ | ✓ |\n| **recurrence**      | String           | The simple recurrence frequency of the calendar event `daily`, `weekly`, `monthly`, `yearly` or none. | ✓ | ✓ |\n| [**recurrenceRule**](#recurrence-rule) **  | Object           | The events recurrence settings. | ✓ | ✓ |\n| **occurrenceDate***  | Date | The original occurrence date of an event if it is part of a recurring series. | ✓ |  |\n| **isDetached**      | Bool        | Indicates whether an event is a detached instance of a repeating event. | ✓ |  |\n| **url**             | String           | The url associated with the calendar event. | ✓ |  |\n| **location**        | String           | The location associated with the calendar event. | ✓ | ✓ |\n| **notes**           | String           | The notes associated with the calendar event. | ✓ |  |\n| **description**     | String           | The description associated with the calendar event. |  | ✓ |\n| [**alarms**](#alarms)          | Array            | The alarms associated with the calendar event, as an array of alarm objects. | ✓ | ✓ |\n| [**attendees**](#attendees)*   | Array            | The attendees of the event, including the organizer. | ✓ | ✓ |\n| [**calendar**](#calendar)*    | Object      | The calendar containing the event.| ✓ | ✓ |\n\n\n### Calendar\n\n| Property        | Type            | Description | iOS | Android |\n| :--------------- | :---------------- | :----------- | :-----------: | :-----------: |\n| **id**       | String   | Unique calendar ID. | ✓ | ✓ |\n| **title**       | String   | The calendar’s title. | ✓ | ✓ |\n| **type**       | String   | The calendar’s type. | ✓ | ✓ |\n| **source**       | String   | The source object representing the account to which this calendar belongs. | ✓ | ✓ |\n| **isPrimary***   | Bool | Indicates if the calendar is assigned as primary. | ✓ | ✓ |\n| **allowsModifications***   | Bool | Indicates if the calendar allows events to be written, edited or removed. | ✓ | ✓ |\n| **color***   | String   | The color assigned to the calendar represented as a hex value. | ✓ | ✓ |\n| **allowedAvailabilities***   | Array   | The event availability settings supported by the calendar. | ✓ | ✓ |\n\n\n### Attendees\n\n| Property        | Type            | Description | iOS | Android |\n| :--------------- | :---------------- | :----------- | :-----------: | :-----------: |\n| **name**  | String  | The name of the attendee. | ✓ | ✓ |\n| **email***   | String           | The email address of the attendee. | ✓ | ✓ |\n| **phone***   | String           | The phone number of the attendee. | ✓ |  |\n\n\n### Recurrence rule\n| Property        | Type            | Description |  iOS | Android |\n| :--------------- | :---------------- | :----------- | :-----------: | :-----------: |\n| **frequency**     | String           | Event recurring frequency. Allowed values are `daily`, `weekly`, `monthly`, `yearly`. | ✓ | ✓ |\n| **endDate**       | Date             | Event recurring end date. This overrides occurrence. | ✓ | ✓ |\n| **occurrence**    | Number           | Number of event occurrences. | ✓ | ✓ |\n| **interval**      | Number           | The interval between events of this recurrence. | ✓ | ✓ |\n\n\n### Alarms\n\n| Property        | Type            | Description | iOS | Android |\n| :--------------- | :------------------| :----------- | :-----------: | :-----------: | \n| **date**           | Date or Number    | If a Date is given, an alarm will be set with an absolute date. If a Number is given, an alarm will be set with a relative offset (in minutes) from the start date. | ✓ | ✓ |\n| [**structuredLocation**](#alarm-structuredlocation) | Object             | The location to trigger an alarm. | ✓ |  |\n\n\n### Alarm structuredLocation\n\n| Property        | Type            | Description | iOS | Android |\n| :--------------- | :------------------| :----------- | :-----------: | :-----------: |\n| **title**           | String  | The title of the location.| ✓ |  |\n| **proximity** | String             | A value indicating how a location-based alarm is triggered. Possible values: `enter`, `leave`, `none`. | ✓ |  |\n| **radius** | Number             | A minimum distance from the core location that would trigger the calendar event's alarm. | ✓ |  |\n| **coords** | Object             | The geolocation coordinates, as an object with latitude and longitude properties | ✓ |  |\n\n\n### Options\n| Property        | Type            | Description |  iOS | Android |\n| :--------------- | :---------------- | :----------- | :-----------: | :-----------: |\n| **exceptionDate**   | Date           | The start date of a recurring event's exception instance. Used for updating single event in a recurring series | ✓ | ✓ |\n| **futureEvents**   | Bool            | If `true` the update will span all future events. If `false` it only update the single instance.  | ✓ |  |\n\n<p>* <i>Read only</i>, ** <i>Write only</i> </p>\n\n<br/>\n\n## Wiki\n\n- [Create basic event](https://github.com/wmcmahan/react-native-calendar-events/wiki/Creating-basic-event)\n- [Create recurring event](https://github.com/wmcmahan/react-native-calendar-events/wiki/Create-recurring-event)\n- [Updating events](https://github.com/wmcmahan/react-native-calendar-events/wiki/Updating-events)\n- [Adding alarms](https://github.com/wmcmahan/react-native-calendar-events/wiki/Event-alarms)\n\n## Authors\n\n* **Will McMahan** - Initial code - [github.com/wmcmahan](https://github.com/wmcmahan)\n\nSee also the list of [contributors](https://github.com/wmcmahan/react-native-calendar-events/contributors) who participated in this project.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](https://github.com/wmcmahan/react-native-calendar-events/blob/master/LICENSE.md) file for details\n\n## Acknowledgments\n\n* Big thanks to all who have contributed, raised an issue or simply find use in this project. Cheers!\n","readmeFilename":"README.md"}