@ebarooni/capacitor-calendar
Advanced tools
Comparing version 5.4.1 to 5.5.0
@@ -164,8 +164,8 @@ { | ||
"name": "createEventWithPrompt", | ||
"signature": "(options: { title: string; calendarId?: string; location?: string; startDate?: number; endDate?: number; isAllDay?: boolean; alertOffsetInMinutes?: number; }) => Promise<{ result: string[]; }>", | ||
"signature": "(options: { title: string; calendarId?: string; location?: string; startDate?: number; endDate?: number; isAllDay?: boolean; alertOffsetInMinutes?: number | number[]; url?: string; notes?: string; }) => Promise<{ result: string[]; }>", | ||
"parameters": [ | ||
{ | ||
"name": "options", | ||
"docs": "- Options for creating the event.", | ||
"type": "{ title: string; calendarId?: string | undefined; location?: string | undefined; startDate?: number | undefined; endDate?: number | undefined; isAllDay?: boolean | undefined; alertOffsetInMinutes?: number | undefined; }" | ||
"docs": "Options for creating the event.", | ||
"type": "{ title: string; calendarId?: string | undefined; location?: string | undefined; startDate?: number | undefined; endDate?: number | undefined; isAllDay?: boolean | undefined; alertOffsetInMinutes?: number | number[] | undefined; url?: string | undefined; notes?: string | undefined; }" | ||
} | ||
@@ -193,3 +193,3 @@ ], | ||
"name": "param", | ||
"text": "options - Options for creating the event." | ||
"text": "options Options for creating the event." | ||
}, | ||
@@ -202,3 +202,3 @@ { | ||
"name": "example", | ||
"text": "if (capacitor.getPlatform() === 'android') {\n await this.requestPermission({ alias: 'readCalendar' });\n { result } = result = await this.createEventWithPrompt({\n title: 'Title',\n alertOffsetInMinutes: 5,\n });\n} else {\n { result } = result = await this.createEventWithPrompt({\n title: 'Title',\n alertOffsetInMinutes: 5,\n });\n}" | ||
"text": "if (capacitor.getPlatform() === 'android') {\n await this.requestPermission({ alias: 'readCalendar' });\n { result } = result = await this.createEventWithPrompt({\n title: 'Title',\n alertOffsetInMinutes: [5, 30],\n url: 'https://capacitor-calendar.pages.dev',\n notes: 'A CapacitorJS plugin',\n });\n} else {\n { result } = result = await this.createEventWithPrompt({\n title: 'Title',\n alertOffsetInMinutes: [0, 1440],\n url: 'https://capacitor-calendar.pages.dev',\n notes: 'A CapacitorJS plugin'\n });\n}" | ||
} | ||
@@ -330,8 +330,8 @@ ], | ||
"name": "createEvent", | ||
"signature": "(options: { title: string; calendarId?: string; location?: string; startDate?: number; endDate?: number; isAllDay?: boolean; alertOffsetInMinutes?: number; }) => Promise<{ result: string; }>", | ||
"signature": "(options: { title: string; calendarId?: string; location?: string; startDate?: number; endDate?: number; isAllDay?: boolean; alertOffsetInMinutes?: number | number[]; url?: string; notes?: string; }) => Promise<{ result: string; }>", | ||
"parameters": [ | ||
{ | ||
"name": "options", | ||
"docs": "- Options for creating the event.", | ||
"type": "{ title: string; calendarId?: string | undefined; location?: string | undefined; startDate?: number | undefined; endDate?: number | undefined; isAllDay?: boolean | undefined; alertOffsetInMinutes?: number | undefined; }" | ||
"docs": "Options for creating the event.", | ||
"type": "{ title: string; calendarId?: string | undefined; location?: string | undefined; startDate?: number | undefined; endDate?: number | undefined; isAllDay?: boolean | undefined; alertOffsetInMinutes?: number | number[] | undefined; url?: string | undefined; notes?: string | undefined; }" | ||
} | ||
@@ -346,2 +346,6 @@ ], | ||
{ | ||
"name": "since", | ||
"text": "0.4.0" | ||
}, | ||
{ | ||
"name": "platform", | ||
@@ -356,3 +360,3 @@ "text": "iOS, Android" | ||
"name": "param", | ||
"text": "options - Options for creating the event." | ||
"text": "options Options for creating the event." | ||
}, | ||
@@ -365,3 +369,3 @@ { | ||
"name": "example", | ||
"text": "const now = Date.now();\nconst eventOptions = {\n title: 'Team Meeting',\n location: 'Conference Room A',\n startDate: now,\n endDate: now + 2 * 60 * 60 * 1000,\n isAllDay: false,\n alertOffsetInMinutes: 5,\n};\nconst { result } = await createEvent(eventOptions);" | ||
"text": "const now = Date.now();\nconst eventOptions = {\n title: 'Team Meeting',\n location: 'Conference Room A',\n startDate: now,\n endDate: now + 2 * 60 * 60 * 1000,\n isAllDay: false,\n alertOffsetInMinutes: 5,\n url: 'https://capacitor-calendar.pages.dev',\n notes: 'A CapacitorJS plugin'\n};\nconst { result } = await createEvent(eventOptions);" | ||
} | ||
@@ -368,0 +372,0 @@ ], |
@@ -79,12 +79,15 @@ import { CalendarChooserDisplayStyle } from './schemas/enums/calendar-chooser-display-style'; | ||
* </ul> | ||
* @param {object} options - Options for creating the event. | ||
* @param {string} options.title - The title of the event. | ||
* @param {string} options.calendarId - The id of the destination calendar. (Optional) | ||
* @param {string} [options.location] - The location of the event. (Optional) | ||
* @param {number} [options.startDate] - The start date and time of the event. (Optional) | ||
* @param {number} [options.endDate] - The end date and time of the event. (Optional) | ||
* @param {boolean} [options.isAllDay] - Weather the event is for the entire day or not. (Optional) | ||
* @param {number} [options.alertOffsetInMinutes] - Ignored on Android. If a number >= 0 is provided, | ||
* an alert will be set for the event this many minutes *before* the event. | ||
* Negative values are ignored. (Optional) | ||
* @param {object} options Options for creating the event. | ||
* @param {string} options.title The title of the event. | ||
* @param {string} options.calendarId The id of the destination calendar. (Optional) | ||
* @param {string} [options.location] The location of the event. (Optional) | ||
* @param {number} [options.startDate] The start date and time of the event. (Optional) | ||
* @param {number} [options.endDate] The end date and time of the event. (Optional) | ||
* @param {boolean} [options.isAllDay] Weather the event is for the entire day or not. (Optional) | ||
* @param {number} [options.alertOffsetInMinutes] If a number >= 0 is provided, an alert will be set for the event this many | ||
* minutes *before* the event. If an array of number >= 0 are provided, it will add multiple alerts. | ||
* On iOS only the first two valid elements of the array are taken into account. | ||
* The parameter is not supported on Android. Negative values are ignored. (Optional) | ||
* @param {string} [options.url] The URL of the event. (Optional) | ||
* @param {string} [options.notes] The notes of the event. (Optional) | ||
* @returns {Promise<{ result: string[] }>} A promise that resolves with an array of the ids of created events. | ||
@@ -96,3 +99,5 @@ * @example | ||
* title: 'Title', | ||
* alertOffsetInMinutes: 5, | ||
* alertOffsetInMinutes: [5, 30], | ||
* url: 'https://capacitor-calendar.pages.dev', | ||
* notes: 'A CapacitorJS plugin', | ||
* }); | ||
@@ -102,3 +107,5 @@ * } else { | ||
* title: 'Title', | ||
* alertOffsetInMinutes: 5, | ||
* alertOffsetInMinutes: [0, 1440], | ||
* url: 'https://capacitor-calendar.pages.dev', | ||
* notes: 'A CapacitorJS plugin' | ||
* }); | ||
@@ -114,3 +121,5 @@ * } | ||
isAllDay?: boolean; | ||
alertOffsetInMinutes?: number; | ||
alertOffsetInMinutes?: number | number[]; | ||
url?: string; | ||
notes?: string; | ||
}): Promise<{ | ||
@@ -187,2 +196,3 @@ result: string[]; | ||
* @method createEvent | ||
* @since 0.4.0 | ||
* @platform iOS, Android | ||
@@ -195,11 +205,15 @@ * @permissions | ||
* </ul> | ||
* @param {object} options - Options for creating the event. | ||
* @param {string} options.title - The title of the event. | ||
* @param {string} options.calendarId - The id of the destination calendar. (Optional) | ||
* @param {string} [options.location] - The location of the event. (Optional) | ||
* @param {number} [options.startDate] - The start date and time of the event. (Optional) | ||
* @param {number} [options.endDate] - The end date and time of the event. (Optional) | ||
* @param {boolean} [options.isAllDay] - Weather the event is for the entire day or not. (Optional) | ||
* @param {number} [options.alertOffsetInMinutes] - If a number >= 0 is provided, an alert will be set for the event this many | ||
* minutes *before* the event. Negative values are ignored. (Optional) | ||
* @param {object} options Options for creating the event. | ||
* @param {string} options.title The title of the event. | ||
* @param {string} options.calendarId The id of the destination calendar. (Optional) | ||
* @param {string} [options.location] The location of the event. (Optional) | ||
* @param {number} [options.startDate] The start date and time of the event. (Optional) | ||
* @param {number} [options.endDate] The end date and time of the event. (Optional) | ||
* @param {boolean} [options.isAllDay] Weather the event is for the entire day or not. (Optional) | ||
* @param {number} [options.alertOffsetInMinutes] If a number >= 0 is provided, an alert will be set for the event this many | ||
* minutes *before* the event. If an array of number >= 0 are provided, it will add multiple alerts. | ||
* On iOS only the first two valid elements of the array are taken into account. | ||
* Negative values are ignored. (Optional) | ||
* @param {string} [options.url] The URL of the event. (Optional) | ||
* @param {string} [options.notes] The notes of the event. (Optional) | ||
* @returns {Promise<{ result: string }>} A promise that resolves with the id of the created event. | ||
@@ -215,2 +229,4 @@ * @example | ||
* alertOffsetInMinutes: 5, | ||
* url: 'https://capacitor-calendar.pages.dev', | ||
* notes: 'A CapacitorJS plugin' | ||
* }; | ||
@@ -226,3 +242,5 @@ * const { result } = await createEvent(eventOptions); | ||
isAllDay?: boolean; | ||
alertOffsetInMinutes?: number; | ||
alertOffsetInMinutes?: number | number[]; | ||
url?: string; | ||
notes?: string; | ||
}): Promise<{ | ||
@@ -229,0 +247,0 @@ result: string; |
@@ -30,3 +30,5 @@ import { PermissionState, WebPlugin } from '@capacitor/core'; | ||
isAllDay?: boolean; | ||
alertOffsetInMinutes?: number; | ||
alertOffsetInMinutes?: number | number[]; | ||
url?: string; | ||
notes?: string; | ||
}): Promise<{ | ||
@@ -51,3 +53,5 @@ result: string[]; | ||
isAllDay?: boolean; | ||
alertOffsetInMinutes?: number; | ||
alertOffsetInMinutes?: number | number[]; | ||
url?: string; | ||
notes?: string; | ||
}): Promise<{ | ||
@@ -54,0 +58,0 @@ result: string; |
{ | ||
"name": "@ebarooni/capacitor-calendar", | ||
"version": "5.4.1", | ||
"version": "5.5.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", |
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
285738
3282