@ebarooni/capacitor-calendar
Advanced tools
Comparing version 5.2.0 to 5.3.0
@@ -685,2 +685,94 @@ { | ||
"slug": "deletecalendar" | ||
}, | ||
{ | ||
"name": "getRemindersFromLists", | ||
"signature": "(options?: { listIds: string[]; } | undefined) => Promise<{ result: Reminder[]; }>", | ||
"parameters": [ | ||
{ | ||
"name": "options", | ||
"docs": "Options for defining the date range.\nIt Will fetch all reminders from all available lists if not provided. (Optional)", | ||
"type": "{ listIds: string[]; } | undefined" | ||
} | ||
], | ||
"returns": "Promise<{ result: Reminder[]; }>", | ||
"tags": [ | ||
{ | ||
"name": "method", | ||
"text": "getRemindersFromLists" | ||
}, | ||
{ | ||
"name": "since", | ||
"text": "5.3.0" | ||
}, | ||
{ | ||
"name": "platform", | ||
"text": "iOS" | ||
}, | ||
{ | ||
"name": "permissions", | ||
"text": "<h3>Runtime Permissions:</h3>\n<ul>\n <li><strong>iOS:</strong> readReminders</li>\n</ul>" | ||
}, | ||
{ | ||
"name": "param", | ||
"text": "options Options for defining the date range.\nIt Will fetch all reminders from all available lists if not provided. (Optional)" | ||
}, | ||
{ | ||
"name": "returns", | ||
"text": "A Promise that resolves with the list of reminders." | ||
}, | ||
{ | ||
"name": "example", | ||
"text": "const now = Date.now();\nconst { result } = await CapacitorCalendar.getRemindersFromLists({\n listIds: ['LIST_ID_1', 'LIST_ID_2'],\n});" | ||
} | ||
], | ||
"docs": "Retrieves the list of reminders present in the given date range.", | ||
"complexTypes": [ | ||
"Reminder" | ||
], | ||
"slug": "getremindersfromlists" | ||
}, | ||
{ | ||
"name": "deleteRemindersById", | ||
"signature": "(options: { ids: string[]; }) => Promise<{ result: { deleted: string[]; failed: string[]; }; }>", | ||
"parameters": [ | ||
{ | ||
"name": "options", | ||
"docs": "Options for defining reminder IDs.", | ||
"type": "{ ids: string[]; }" | ||
} | ||
], | ||
"returns": "Promise<{ result: { deleted: string[]; failed: string[]; }; }>", | ||
"tags": [ | ||
{ | ||
"name": "method", | ||
"text": "deleteRemindersById" | ||
}, | ||
{ | ||
"name": "since", | ||
"text": "5.3.0" | ||
}, | ||
{ | ||
"name": "platform", | ||
"text": "iOS" | ||
}, | ||
{ | ||
"name": "permissions", | ||
"text": "<h3>Runtime Permissions:</h3>\n<ul>\n <li><strong>iOS:</strong> writeReminders</li>\n</ul>" | ||
}, | ||
{ | ||
"name": "param", | ||
"text": "options Options for defining reminder IDs." | ||
}, | ||
{ | ||
"name": "returns", | ||
"text": "A promise that resolves to an object with two properties:\n - deleted: string[] - An array of IDs that were successfully deleted.\n - failed: string[] - An array of IDs that could not be deleted." | ||
}, | ||
{ | ||
"name": "example", | ||
"text": "const idsToDelete = ['ID_1', 'ID_2', 'ID_DOES_NOT_EXIST'];\nconst { result } = await CapacitorCalendar.deleteRemindersById(idsToDelete)\nconsole.log(result.deleted) // ['ID_1', 'ID_2']\nconsole.log(result.failed) // ['ID_DOES_NOT_EXIST']" | ||
} | ||
], | ||
"docs": "Deletes reminders given their IDs.", | ||
"complexTypes": [], | ||
"slug": "deleteremindersbyid" | ||
} | ||
@@ -1015,2 +1107,206 @@ ], | ||
] | ||
}, | ||
{ | ||
"name": "Reminder", | ||
"slug": "reminder", | ||
"docs": "Represents a reminder in a reminders list.", | ||
"tags": [ | ||
{ | ||
"text": "Reminder", | ||
"name": "interface" | ||
}, | ||
{ | ||
"text": "{string} id The unique identifier of the reminder.", | ||
"name": "property" | ||
}, | ||
{ | ||
"text": "{string} title The title or name of the reminder. (Optional)", | ||
"name": "property" | ||
}, | ||
{ | ||
"text": "{string} listId The list that the reminder belongs to. (Optional)", | ||
"name": "property" | ||
}, | ||
{ | ||
"text": "{boolean} isCompleted Whether the reminder is completed already or not.", | ||
"name": "property" | ||
}, | ||
{ | ||
"text": "{number} priority The priority of the reminder. (Optional)", | ||
"name": "property" | ||
}, | ||
{ | ||
"text": "{string} notes The notes of the reminder. (Optional)", | ||
"name": "property" | ||
}, | ||
{ | ||
"text": "{string} url The url of the reminder. (Optional)", | ||
"name": "property" | ||
}, | ||
{ | ||
"text": "{number} startDate The start date of the reminder. (Optional)", | ||
"name": "property" | ||
}, | ||
{ | ||
"text": "{number} dueDate The due date of the reminder. (Optional)", | ||
"name": "property" | ||
}, | ||
{ | ||
"text": "{number} completionDate The completion date of the reminder. (Optional)", | ||
"name": "property" | ||
}, | ||
{ | ||
"text": "{ReminderRecurrenceRule[]} recurrence The recurrence rules of the reminder. (Optional)", | ||
"name": "property" | ||
} | ||
], | ||
"methods": [], | ||
"properties": [ | ||
{ | ||
"name": "id", | ||
"tags": [ | ||
{ | ||
"text": "iOS", | ||
"name": "platform" | ||
} | ||
], | ||
"docs": "", | ||
"complexTypes": [], | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "title", | ||
"tags": [ | ||
{ | ||
"text": "iOS", | ||
"name": "platform" | ||
} | ||
], | ||
"docs": "", | ||
"complexTypes": [], | ||
"type": "string | undefined" | ||
}, | ||
{ | ||
"name": "listId", | ||
"tags": [ | ||
{ | ||
"text": "iOS", | ||
"name": "platform" | ||
} | ||
], | ||
"docs": "", | ||
"complexTypes": [], | ||
"type": "string | undefined" | ||
}, | ||
{ | ||
"name": "isCompleted", | ||
"tags": [ | ||
{ | ||
"text": "iOS", | ||
"name": "platform" | ||
} | ||
], | ||
"docs": "", | ||
"complexTypes": [], | ||
"type": "boolean | undefined" | ||
}, | ||
{ | ||
"name": "priority", | ||
"tags": [ | ||
{ | ||
"text": "iOS", | ||
"name": "platform" | ||
} | ||
], | ||
"docs": "", | ||
"complexTypes": [], | ||
"type": "number | undefined" | ||
}, | ||
{ | ||
"name": "notes", | ||
"tags": [ | ||
{ | ||
"text": "iOS", | ||
"name": "platform" | ||
} | ||
], | ||
"docs": "", | ||
"complexTypes": [], | ||
"type": "string | undefined" | ||
}, | ||
{ | ||
"name": "location", | ||
"tags": [ | ||
{ | ||
"text": "iOS", | ||
"name": "platform" | ||
} | ||
], | ||
"docs": "", | ||
"complexTypes": [], | ||
"type": "string | undefined" | ||
}, | ||
{ | ||
"name": "url", | ||
"tags": [ | ||
{ | ||
"text": "iOS", | ||
"name": "platform" | ||
} | ||
], | ||
"docs": "", | ||
"complexTypes": [], | ||
"type": "string | undefined" | ||
}, | ||
{ | ||
"name": "startDate", | ||
"tags": [ | ||
{ | ||
"text": "iOS", | ||
"name": "platform" | ||
} | ||
], | ||
"docs": "", | ||
"complexTypes": [], | ||
"type": "number | undefined" | ||
}, | ||
{ | ||
"name": "dueDate", | ||
"tags": [ | ||
{ | ||
"text": "iOS", | ||
"name": "platform" | ||
} | ||
], | ||
"docs": "", | ||
"complexTypes": [], | ||
"type": "number | undefined" | ||
}, | ||
{ | ||
"name": "completionDate", | ||
"tags": [ | ||
{ | ||
"text": "iOS", | ||
"name": "platform" | ||
} | ||
], | ||
"docs": "", | ||
"complexTypes": [], | ||
"type": "number | undefined" | ||
}, | ||
{ | ||
"name": "recurrence", | ||
"tags": [ | ||
{ | ||
"text": "iOS", | ||
"name": "platform" | ||
} | ||
], | ||
"docs": "", | ||
"complexTypes": [ | ||
"ReminderRecurrenceRule" | ||
], | ||
"type": "ReminderRecurrenceRule[] | undefined" | ||
} | ||
] | ||
} | ||
@@ -1017,0 +1313,0 @@ ], |
@@ -10,2 +10,3 @@ import { CalendarChooserDisplayStyle } from './schemas/enums/calendar-chooser-display-style'; | ||
import type { CalendarEvent } from './schemas/interfaces/calendar-event'; | ||
import type { Reminder } from './schemas/interfaces/reminder'; | ||
export interface CapacitorCalendarPlugin { | ||
@@ -436,2 +437,59 @@ /** | ||
}): Promise<void>; | ||
/** | ||
* Retrieves the list of reminders present in the given date range. | ||
* | ||
* @method getRemindersFromLists | ||
* @since 5.3.0 | ||
* @platform iOS | ||
* @permissions | ||
* <h3>Runtime Permissions:</h3> | ||
* <ul> | ||
* <li><strong>iOS:</strong> readReminders</li> | ||
* </ul> | ||
* @param {object} options Options for defining the date range. | ||
* It Will fetch all reminders from all available lists if not provided. (Optional) | ||
* @param {string[]} options.listIds An array of reminder list ids. | ||
* @returns {Promise<{ result: Reminder[] }>} A Promise that resolves with the list of reminders. | ||
* @example | ||
* const now = Date.now(); | ||
* const { result } = await CapacitorCalendar.getRemindersFromLists({ | ||
* listIds: ['LIST_ID_1', 'LIST_ID_2'], | ||
* }); | ||
*/ | ||
getRemindersFromLists(options?: { | ||
listIds: string[]; | ||
}): Promise<{ | ||
result: Reminder[]; | ||
}>; | ||
/** | ||
* Deletes reminders given their IDs. | ||
* | ||
* @method deleteRemindersById | ||
* @since 5.3.0 | ||
* @platform iOS | ||
* @permissions | ||
* <h3>Runtime Permissions:</h3> | ||
* <ul> | ||
* <li><strong>iOS:</strong> writeReminders</li> | ||
* </ul> | ||
* @param {object} options Options for defining reminder IDs. | ||
* @param {number} options.ids An array of reminder IDs to be deleted. | ||
* @returns {Promise<{ deleted: string[], failed: string[] }>} | ||
* A promise that resolves to an object with two properties: | ||
* - deleted: string[] - An array of IDs that were successfully deleted. | ||
* - failed: string[] - An array of IDs that could not be deleted. | ||
* @example | ||
* const idsToDelete = ['ID_1', 'ID_2', 'ID_DOES_NOT_EXIST']; | ||
* const { result } = await CapacitorCalendar.deleteRemindersById(idsToDelete) | ||
* console.log(result.deleted) // ['ID_1', 'ID_2'] | ||
* console.log(result.failed) // ['ID_DOES_NOT_EXIST'] | ||
*/ | ||
deleteRemindersById(options: { | ||
ids: string[]; | ||
}): Promise<{ | ||
result: { | ||
deleted: string[]; | ||
failed: string[]; | ||
}; | ||
}>; | ||
} |
@@ -11,5 +11,6 @@ import { CalendarChooserDisplayStyle } from './schemas/enums/calendar-chooser-display-style'; | ||
import type { CalendarEvent } from './schemas/interfaces/calendar-event'; | ||
import type { Reminder } from './schemas/interfaces/reminder'; | ||
declare const CapacitorCalendar: CapacitorCalendarPlugin; | ||
export * from './definitions'; | ||
export type { Calendar, RemindersList, ReminderRecurrenceRule }; | ||
export { CalendarChooserSelectionStyle, CalendarChooserDisplayStyle, PluginPermission, PluginPermissionsMap, ReminderRecurrenceFrequency, CalendarEvent, CapacitorCalendar, }; | ||
export { CalendarChooserSelectionStyle, CalendarChooserDisplayStyle, PluginPermission, PluginPermissionsMap, ReminderRecurrenceFrequency, CalendarEvent, Reminder, CapacitorCalendar, }; |
@@ -9,2 +9,3 @@ import { PermissionState, WebPlugin } from '@capacitor/core'; | ||
import type { CalendarEvent } from './schemas/interfaces/calendar-event'; | ||
import type { Reminder } from './schemas/interfaces/reminder'; | ||
export declare class CapacitorCalendarWeb extends WebPlugin implements CapacitorCalendarPlugin { | ||
@@ -102,2 +103,15 @@ checkPermission(_options: { | ||
}): Promise<void>; | ||
getRemindersFromLists(_options?: { | ||
listIds: string[]; | ||
}): Promise<{ | ||
result: Reminder[]; | ||
}>; | ||
deleteRemindersById(_options: { | ||
ids: string[]; | ||
}): Promise<{ | ||
result: { | ||
deleted: string[]; | ||
failed: string[]; | ||
}; | ||
}>; | ||
} |
@@ -58,3 +58,9 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ | ||
} | ||
getRemindersFromLists(_options) { | ||
throw this.unimplemented(`${this.getRemindersFromLists.name} is not implemented on the web`); | ||
} | ||
deleteRemindersById(_options) { | ||
throw this.unimplemented(`${this.deleteRemindersById.name} is not implemented on the web`); | ||
} | ||
} | ||
//# sourceMappingURL=web.js.map |
@@ -187,2 +187,8 @@ 'use strict'; | ||
} | ||
getRemindersFromLists(_options) { | ||
throw this.unimplemented(`${this.getRemindersFromLists.name} is not implemented on the web`); | ||
} | ||
deleteRemindersById(_options) { | ||
throw this.unimplemented(`${this.deleteRemindersById.name} is not implemented on the web`); | ||
} | ||
} | ||
@@ -189,0 +195,0 @@ |
@@ -186,2 +186,8 @@ var capacitorCapacitorCalendar = (function (exports, core) { | ||
} | ||
getRemindersFromLists(_options) { | ||
throw this.unimplemented(`${this.getRemindersFromLists.name} is not implemented on the web`); | ||
} | ||
deleteRemindersById(_options) { | ||
throw this.unimplemented(`${this.deleteRemindersById.name} is not implemented on the web`); | ||
} | ||
} | ||
@@ -188,0 +194,0 @@ |
{ | ||
"name": "@ebarooni/capacitor-calendar", | ||
"version": "5.2.0", | ||
"version": "5.3.0", | ||
"description": "The Capacitor Calendar Plugin enables full calendar functionality on iOS and Android, with added reminder support for iOS devices.", | ||
@@ -5,0 +5,0 @@ "main": "dist/plugin.cjs.js", |
@@ -94,2 +94,4 @@ <p align="center"> | ||
* [`deleteCalendar(...)`](#deletecalendar) | ||
* [`getRemindersFromLists(...)`](#getremindersfromlists) | ||
* [`deleteRemindersById(...)`](#deleteremindersbyid) | ||
* [Interfaces](#interfaces) | ||
@@ -96,0 +98,0 @@ * [Type Aliases](#type-aliases) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
258077
66
2984
120