AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
TypeScript ai-agentai-agent-toolsai-agentsai-agents-frameworkmcpmcp-servermcp-toolsmcpsn8n-alternativeno-code-automationworkflowworkflow-automationworkflows
feat(microsoft-outlook-calendar): let AI agents manage calendars, events and invitations (#17009)
Kishan Parmarb09e40676c6a
diff --git a/bun.lock b/bun.lockindex bd523f6aff9..ba212a18031 100644--- a/bun.lock+++ b/bun.lock@@ -167,7 +167,7 @@},"packages/core/shared": {"name": "@activepieces/shared",- "version": "0.209.1",+ "version": "0.210.0","dependencies": {"@activepieces/core-execution": "workspace:*","@activepieces/core-formula": "workspace:*",@@ -6044,12 +6044,14 @@},"packages/pieces/community/microsoft-outlook-calendar": {"name": "@activepieces/piece-microsoft-outlook-calendar",- "version": "0.3.1",+ "version": "0.4.0","dependencies": {"@activepieces/core-piece-types": "workspace:*","@activepieces/core-utils": "workspace:*","@activepieces/pieces-common": "workspace:*","@activepieces/pieces-framework": "workspace:*",+ "@microsoft/microsoft-graph-client": "3.0.7",+ "@microsoft/microsoft-graph-types": "2.40.0","dayjs": "1.11.9",},"devDependencies": {@@ -10957,7 +10959,7 @@},"packages/pieces/core/webhook": {"name": "@activepieces/piece-webhook",- "version": "0.1.42",+ "version": "0.1.43","dependencies": {"@activepieces/core-piece-types": "workspace:*","@activepieces/core-utils": "workspace:*",@@ -11005,7 +11007,7 @@},"packages/pieces/framework": {"name": "@activepieces/pieces-framework",- "version": "0.41.1",+ "version": "0.42.0","dependencies": {"@activepieces/core-piece-types": "workspace:*","@activepieces/core-utils": "workspace:*",diff --git a/packages/pieces/community/microsoft-outlook-calendar/package.json b/packages/pieces/community/microsoft-outlook-calendar/package.jsonindex 608699b46eb..2b56ff9040f 100644--- a/packages/pieces/community/microsoft-outlook-calendar/package.json+++ b/packages/pieces/community/microsoft-outlook-calendar/package.json@@ -1,6 +1,6 @@{"name": "@activepieces/piece-microsoft-outlook-calendar",- "version": "0.3.1",+ "version": "0.4.0","main": "./dist/src/index.js","types": "./dist/src/index.d.ts","scripts": {@@ -11,6 +11,8 @@"dependencies": {"@activepieces/pieces-common": "workspace:*","@activepieces/pieces-framework": "workspace:*",+ "@microsoft/microsoft-graph-client": "3.0.7",+ "@microsoft/microsoft-graph-types": "2.40.0","dayjs": "1.11.9","@activepieces/core-piece-types": "workspace:*","@activepieces/core-utils": "workspace:*"diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/index.ts b/packages/pieces/community/microsoft-outlook-calendar/src/index.tsindex 455a8f60ed1..ad6c24877f7 100644--- a/packages/pieces/community/microsoft-outlook-calendar/src/index.ts+++ b/packages/pieces/community/microsoft-outlook-calendar/src/index.ts@@ -1,40 +1,18 @@import { createCustomApiCallAction } from '@activepieces/pieces-common';-import { microsoftCloudProperty } from './lib/common/microsoft-cloud';-import {- createPiece,- OAuth2PropertyValue,- PieceAuth,-} from '@activepieces/pieces-framework';+import { createPiece } from '@activepieces/pieces-framework';import { PieceCategory } from '@activepieces/pieces-framework';import { createEventAction } from './lib/actions/create-event';import { deleteEventAction } from './lib/actions/delete-event';import { listEventsAction } from './lib/actions/list-events';-import { outlookCalendarCommon } from './lib/common/common';--const authDesc = `-If you’d like to use your own custom Azure app instead of the default app, follow the [Azure app creation guide](https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app#register-an-application),- set the **Redirect URI** to {{redirectUrl}} and add the following **Microsoft Graph (Delegated) permissions** under **API permissions**:- - User.Read- - Calendars.ReadWrite- - offline_access`;--export const outlookCalendarAuth = PieceAuth.OAuth2({- description: authDesc,- props: {- cloud: microsoftCloudProperty,- },- authUrl: 'https://{cloud}/common/oauth2/v2.0/authorize',- tokenUrl: 'https://{cloud}/common/oauth2/v2.0/token',- required: true,- scope: ['User.Read', 'Calendars.ReadWrite', 'offline_access', 'openid', 'email', 'profile'],- prompt: 'omit',-});+import { outlookCalendarAiActions } from './lib/actions/ai';+import { outlookCalendarAuth } from './lib/auth';+import { outlookCalendarClient } from './lib/common/client';export const microsoftOutlookCalendar = createPiece({displayName: 'Microsoft Outlook Calendar',description: 'Calendar software by Microsoft',auth: outlookCalendarAuth,- minimumSupportedRelease: '0.30.0',+ minimumSupportedRelease: '0.88.2',logoUrl: 'https://cdn.activepieces.com/pieces/microsoft-outlook.png',categories: [PieceCategory.PRODUCTIVITY],authors: ['antonyvigouret'],@@ -42,17 +20,13 @@ export const microsoftOutlookCalendar = createPiece({createEventAction,deleteEventAction,listEventsAction,+ ...outlookCalendarAiActions,createCustomApiCallAction({auth: outlookCalendarAuth,- baseUrl(auth) {- const cloud = (auth as OAuth2PropertyValue).props?.['cloud'] as string | undefined;- return outlookCalendarCommon.getBaseUrl(cloud);- },- authMapping: async (auth) => {- return {- Authorization: `Bearer ${(auth as OAuth2PropertyValue).access_token}`,- };- },+ baseUrl: (auth) => (auth ? outlookCalendarClient.baseUrl({ auth }) : ''),+ authMapping: async (auth) => ({+ Authorization: `Bearer ${auth.access_token}`,+ }),}),],triggers: [],diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/attachments/add-event-attachment.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/attachments/add-event-attachment.tsnew file mode 100644index 00000000000..53f085d22eb--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/attachments/add-event-attachment.ts@@ -0,0 +1,61 @@+import { createAction, Property } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';++import type { Attachment } from '../../../common/types';+import { outlookCalendarAttachmentOutputSchema } from '../../../output-schemas';++export const outlookCalendarAddEventAttachmentAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_add_event_attachment',+ outputSchema: outlookCalendarAttachmentOutputSchema,+ displayName: 'Add Event Attachment',+ description: 'Attaches a file of up to 3 MB to an event.',+ audience: 'ai',+ classification: 'WRITE',+ aiMetadata: {+ description:+ 'Attaches a file to an event and returns the new attachment with its ID. The file must be 3 MB or smaller; larger files are rejected. Each call adds another attachment, even with the same file. The event ID comes from List Events or Create Event.',+ idempotent: false,+ },+ props: {+ eventId: outlookCalendarAiProps.eventId({ required: true }),+ file: Property.File({+ displayName: 'File',+ description: 'The file to attach, 3 MB or smaller.',+ required: true,+ }),+ name: Property.ShortText({+ displayName: 'Name',+ description: 'Attachment name shown on the event. Defaults to the file name.',+ required: false,+ }),+ contentType: Property.ShortText({+ displayName: 'Content Type',+ description: 'MIME type of the file, e.g. "application/pdf".',+ required: false,+ }),+ },+ async run({ auth, propsValue }) {+ const { file, name, contentType } = propsValue;+ if (file.data.length > MAX_ATTACHMENT_BYTES) {+ throw new Error(+ 'File is larger than 3 MB. Add Event Attachment only accepts files up to 3 MB.',+ );+ }+ const response: Attachment = await outlookCalendarClient+ .create({ auth })+ .api(`/me/events/${encodeURIComponent(propsValue.eventId)}/attachments`)+ .post({+ '@odata.type': '#microsoft.graph.fileAttachment',+ name: name ?? file.filename,+ contentBytes: file.data.toString('base64'),+ ...(contentType !== undefined ? { contentType } : {}),+ });+ return response;+ },+});++const MAX_ATTACHMENT_BYTES = 3 * 1024 * 1024;diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/attachments/delete-event-attachment.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/attachments/delete-event-attachment.tsnew file mode 100644index 00000000000..e75f24eb760--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/attachments/delete-event-attachment.ts@@ -0,0 +1,36 @@+import { createAction } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';+import { outlookCalendarSuccessOutputSchema } from '../../../output-schemas';++export const outlookCalendarDeleteEventAttachmentAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_delete_event_attachment',+ outputSchema: outlookCalendarSuccessOutputSchema,+ displayName: 'Delete Event Attachment',+ description: 'Permanently removes an attachment from an event.',+ audience: 'ai',+ classification: 'DESTRUCTIVE',+ aiMetadata: {+ description:+ 'Permanently removes one attachment from an event; it cannot be recovered. Deleting an attachment that is already gone also succeeds. The attachment ID comes from List Event Attachments or Add Event Attachment.',+ idempotent: false,+ },+ props: {+ eventId: outlookCalendarAiProps.eventId({ required: true }),+ attachmentId: outlookCalendarAiProps.attachmentId({ required: true }),+ },+ async run({ auth, propsValue }) {+ await outlookCalendarClient+ .create({ auth })+ .api(+ `/me/events/${encodeURIComponent(propsValue.eventId)}/attachments/${encodeURIComponent(+ propsValue.attachmentId,+ )}`,+ )+ .delete();+ return { success: true };+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/attachments/get-event-attachment.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/attachments/get-event-attachment.tsnew file mode 100644index 00000000000..64ef3e1f946--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/attachments/get-event-attachment.ts@@ -0,0 +1,38 @@+import { createAction } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';++import type { Attachment } from '../../../common/types';+import { outlookCalendarAttachmentOutputSchema } from '../../../output-schemas';++export const outlookCalendarGetEventAttachmentAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_get_event_attachment',+ outputSchema: outlookCalendarAttachmentOutputSchema,+ displayName: 'Get Event Attachment',+ description: 'Gets one attachment of an event, including its content.',+ audience: 'ai',+ classification: 'READ',+ aiMetadata: {+ description:+ 'Gets one attachment of an event by ID, including its name, content type, size and, for file attachments, the base64 content in contentBytes. The attachment ID comes from List Event Attachments or Add Event Attachment.',+ idempotent: true,+ },+ props: {+ eventId: outlookCalendarAiProps.eventId({ required: true }),+ attachmentId: outlookCalendarAiProps.attachmentId({ required: true }),+ },+ async run({ auth, propsValue }) {+ const response: Attachment = await outlookCalendarClient+ .create({ auth })+ .api(+ `/me/events/${encodeURIComponent(propsValue.eventId)}/attachments/${encodeURIComponent(+ propsValue.attachmentId,+ )}`,+ )+ .get();+ return response;+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/attachments/list-event-attachments.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/attachments/list-event-attachments.tsnew file mode 100644index 00000000000..2e9c19c620c--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/attachments/list-event-attachments.ts@@ -0,0 +1,34 @@+import { createAction } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';++import type { Attachment, OutlookCalendarPage } from '../../../common/types';+import { outlookCalendarAttachmentListOutputSchema } from '../../../output-schemas';++export const outlookCalendarListEventAttachmentsAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_list_event_attachments',+ outputSchema: outlookCalendarAttachmentListOutputSchema,+ displayName: 'List Event Attachments',+ description: 'Lists the attachments of an event.',+ audience: 'ai',+ classification: 'READ',+ aiMetadata: {+ description:+ 'Lists the attachments of one event with their ID, name, content type, size and inline flag, without the file content. Use it to find the attachment ID that Get Event Attachment and Delete Event Attachment take; Get Event Attachment returns the content.',+ idempotent: true,+ },+ props: {+ eventId: outlookCalendarAiProps.eventId({ required: true }),+ },+ async run({ auth, propsValue }) {+ const response: OutlookCalendarPage<Attachment> = await outlookCalendarClient+ .create({ auth })+ .api(`/me/events/${encodeURIComponent(propsValue.eventId)}/attachments`)+ .query({ $select: 'id,name,contentType,size,isInline,lastModifiedDateTime' })+ .get();+ return response;+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/calendar-groups/create-calendar-group.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/calendar-groups/create-calendar-group.tsnew file mode 100644index 00000000000..ed5cbb1b8d2--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/calendar-groups/create-calendar-group.ts@@ -0,0 +1,36 @@+import { createAction, Property } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarClient } from '../../../common/client';++import type { CalendarGroup } from '../../../common/types';+import { outlookCalendarCalendarGroupOutputSchema } from '../../../output-schemas';++export const outlookCalendarCreateCalendarGroupAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_create_calendar_group',+ outputSchema: outlookCalendarCalendarGroupOutputSchema,+ displayName: 'Create Calendar Group',+ description: 'Creates a calendar group.',+ audience: 'ai',+ classification: 'WRITE',+ aiMetadata: {+ description:+ 'Creates a new, empty calendar group and returns it with its ID; add calendars to it with Create Calendar in Group. Calling it twice creates two groups, so check List Calendar Groups first.',+ idempotent: false,+ },+ props: {+ name: Property.ShortText({+ displayName: 'Name',+ description: 'Name of the new calendar group.',+ required: true,+ }),+ },+ async run({ auth, propsValue }) {+ const response: CalendarGroup = await outlookCalendarClient+ .create({ auth })+ .api('/me/calendarGroups')+ .post({ name: propsValue.name });+ return response;+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/calendar-groups/create-calendar-in-group.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/calendar-groups/create-calendar-in-group.tsnew file mode 100644index 00000000000..8c594dae6fc--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/calendar-groups/create-calendar-in-group.ts@@ -0,0 +1,40 @@+import { createAction, Property } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';++import type { Calendar } from '../../../common/types';+import { outlookCalendarCalendarOutputSchema } from '../../../output-schemas';++export const outlookCalendarCreateCalendarInGroupAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_create_calendar_in_group',+ outputSchema: outlookCalendarCalendarOutputSchema,+ displayName: 'Create Calendar in Group',+ description: 'Creates a calendar in a calendar group.',+ audience: 'ai',+ classification: 'WRITE',+ aiMetadata: {+ description:+ 'Creates a new calendar inside the given calendar group, whose ID comes from List Calendar Groups, and returns it with its ID. Use Create Calendar for the default group. Calling it twice creates two calendars, so check List Calendars in Group first.',+ idempotent: false,+ },+ props: {+ calendarGroupId: outlookCalendarAiProps.calendarGroupId({ required: true }),+ name: Property.ShortText({+ displayName: 'Name',+ description: 'Name of the new calendar.',+ required: true,+ }),+ color: outlookCalendarAiProps.calendarColor({ required: false }),+ },+ async run({ auth, propsValue }) {+ const { calendarGroupId, name, color } = propsValue;+ const response: Calendar = await outlookCalendarClient+ .create({ auth })+ .api(`/me/calendarGroups/${encodeURIComponent(calendarGroupId)}/calendars`)+ .post({ name, ...(color !== undefined ? { color } : {}) });+ return response;+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/calendar-groups/delete-calendar-group.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/calendar-groups/delete-calendar-group.tsnew file mode 100644index 00000000000..e7c362f14ae--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/calendar-groups/delete-calendar-group.ts@@ -0,0 +1,31 @@+import { createAction } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';+import { outlookCalendarSuccessOutputSchema } from '../../../output-schemas';++export const outlookCalendarDeleteCalendarGroupAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_delete_calendar_group',+ outputSchema: outlookCalendarSuccessOutputSchema,+ displayName: 'Delete Calendar Group',+ description: 'Deletes a calendar group.',+ audience: 'ai',+ classification: 'DESTRUCTIVE',+ aiMetadata: {+ description:+ "Deletes a calendar group, whose ID comes from List Calendar Groups. The default calendar group can't be deleted.",+ idempotent: false,+ },+ props: {+ calendarGroupId: outlookCalendarAiProps.calendarGroupId({ required: true }),+ },+ async run({ auth, propsValue }) {+ await outlookCalendarClient+ .create({ auth })+ .api(`/me/calendarGroups/${encodeURIComponent(propsValue.calendarGroupId)}`)+ .delete();+ return { success: true };+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/calendar-groups/get-calendar-group.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/calendar-groups/get-calendar-group.tsnew file mode 100644index 00000000000..18fc23408ca--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/calendar-groups/get-calendar-group.ts@@ -0,0 +1,33 @@+import { createAction } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';++import type { CalendarGroup } from '../../../common/types';+import { outlookCalendarCalendarGroupOutputSchema } from '../../../output-schemas';++export const outlookCalendarGetCalendarGroupAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_get_calendar_group',+ outputSchema: outlookCalendarCalendarGroupOutputSchema,+ displayName: 'Get Calendar Group',+ description: 'Gets one calendar group.',+ audience: 'ai',+ classification: 'READ',+ aiMetadata: {+ description:+ "Gets one calendar group's name, class ID and change key by its ID, from List Calendar Groups. Use List Calendars in Group for the calendars it holds.",+ idempotent: true,+ },+ props: {+ calendarGroupId: outlookCalendarAiProps.calendarGroupId({ required: true }),+ },+ async run({ auth, propsValue }) {+ const response: CalendarGroup = await outlookCalendarClient+ .create({ auth })+ .api(`/me/calendarGroups/${encodeURIComponent(propsValue.calendarGroupId)}`)+ .get();+ return response;+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/calendar-groups/list-calendar-groups.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/calendar-groups/list-calendar-groups.tsnew file mode 100644index 00000000000..b41a0cb2a80--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/calendar-groups/list-calendar-groups.ts@@ -0,0 +1,39 @@+import { createAction } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';+import { outlookCalendarUtils } from '../../../common/utils';++import type { CalendarGroup, OutlookCalendarPage } from '../../../common/types';+import { outlookCalendarCalendarGroupListOutputSchema } from '../../../output-schemas';++export const outlookCalendarListCalendarGroupsAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_list_calendar_groups',+ outputSchema: outlookCalendarCalendarGroupListOutputSchema,+ displayName: 'List Calendar Groups',+ description: "Lists the signed-in user's calendar groups.",+ audience: 'ai',+ classification: 'READ',+ aiMetadata: {+ description:+ "Lists the signed-in user's calendar groups with their IDs and names. Use it to find the calendar group ID that List Calendars in Group and Create Calendar in Group take. Returns @odata.nextLink when more pages exist; pass it as Page URL.",+ idempotent: true,+ },+ props: {+ limit: outlookCalendarAiProps.limit({ required: false }),+ pageUrl: outlookCalendarAiProps.pageUrl({ required: false }),+ },+ async run({ auth, propsValue }) {+ const response: OutlookCalendarPage<CalendarGroup> = await outlookCalendarClient+ .list({+ auth,+ path: '/me/calendarGroups',+ query: { $top: outlookCalendarUtils.top({ limit: propsValue.limit }) },+ pageUrl: propsValue.pageUrl,+ })+ .get();+ return response;+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/calendar-groups/list-calendars-in-group.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/calendar-groups/list-calendars-in-group.tsnew file mode 100644index 00000000000..b353df425d6--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/calendar-groups/list-calendars-in-group.ts@@ -0,0 +1,40 @@+import { createAction } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';+import { outlookCalendarUtils } from '../../../common/utils';++import type { Calendar, OutlookCalendarPage } from '../../../common/types';+import { outlookCalendarCalendarListOutputSchema } from '../../../output-schemas';++export const outlookCalendarListCalendarsInGroupAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_list_calendars_in_group',+ outputSchema: outlookCalendarCalendarListOutputSchema,+ displayName: 'List Calendars in Group',+ description: 'Lists the calendars in one calendar group.',+ audience: 'ai',+ classification: 'READ',+ aiMetadata: {+ description:+ 'Lists the calendars in one calendar group, with ID, name, color, owner and edit rights; the group ID comes from List Calendar Groups. Use List Calendars for every calendar across groups. Returns @odata.nextLink when more pages exist; pass it as Page URL.',+ idempotent: true,+ },+ props: {+ calendarGroupId: outlookCalendarAiProps.calendarGroupId({ required: true }),+ limit: outlookCalendarAiProps.limit({ required: false }),+ pageUrl: outlookCalendarAiProps.pageUrl({ required: false }),+ },+ async run({ auth, propsValue }) {+ const response: OutlookCalendarPage<Calendar> = await outlookCalendarClient+ .list({+ auth,+ path: `/me/calendarGroups/${encodeURIComponent(propsValue.calendarGroupId)}/calendars`,+ query: { $top: outlookCalendarUtils.top({ limit: propsValue.limit }) },+ pageUrl: propsValue.pageUrl,+ })+ .get();+ return response;+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/calendar-groups/update-calendar-group.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/calendar-groups/update-calendar-group.tsnew file mode 100644index 00000000000..d40ef56e151--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/calendar-groups/update-calendar-group.ts@@ -0,0 +1,38 @@+import { createAction, Property } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';++import type { CalendarGroup } from '../../../common/types';+import { outlookCalendarCalendarGroupOutputSchema } from '../../../output-schemas';++export const outlookCalendarUpdateCalendarGroupAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_update_calendar_group',+ outputSchema: outlookCalendarCalendarGroupOutputSchema,+ displayName: 'Update Calendar Group',+ description: 'Renames a calendar group.',+ audience: 'ai',+ classification: 'WRITE',+ aiMetadata: {+ description:+ 'Renames a calendar group, whose ID comes from List Calendar Groups, and returns the updated group. The name is the only writable field.',+ idempotent: true,+ },+ props: {+ calendarGroupId: outlookCalendarAiProps.calendarGroupId({ required: true }),+ name: Property.ShortText({+ displayName: 'Name',+ description: 'New calendar group name.',+ required: true,+ }),+ },+ async run({ auth, propsValue }) {+ const response: CalendarGroup = await outlookCalendarClient+ .create({ auth })+ .api(`/me/calendarGroups/${encodeURIComponent(propsValue.calendarGroupId)}`)+ .patch({ name: propsValue.name });+ return response;+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/calendars/create-calendar.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/calendars/create-calendar.tsnew file mode 100644index 00000000000..87206726377--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/calendars/create-calendar.ts@@ -0,0 +1,39 @@+import { createAction, Property } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';++import type { Calendar } from '../../../common/types';+import { outlookCalendarCalendarOutputSchema } from '../../../output-schemas';++export const outlookCalendarCreateCalendarAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_create_calendar',+ outputSchema: outlookCalendarCalendarOutputSchema,+ displayName: 'Create Calendar',+ description: 'Creates a calendar in the default calendar group.',+ audience: 'ai',+ classification: 'WRITE',+ aiMetadata: {+ description:+ "Creates a new calendar in the signed-in user's default calendar group and returns it with its ID. Use Create Calendar in Group to place it in another group. Calling it twice creates two calendars, so check List Calendars first.",+ idempotent: false,+ },+ props: {+ name: Property.ShortText({+ displayName: 'Name',+ description: 'Name of the new calendar.',+ required: true,+ }),+ color: outlookCalendarAiProps.calendarColor({ required: false }),+ },+ async run({ auth, propsValue }) {+ const { name, color } = propsValue;+ const response: Calendar = await outlookCalendarClient+ .create({ auth })+ .api('/me/calendars')+ .post({ name, ...(color !== undefined ? { color } : {}) });+ return response;+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/calendars/delete-calendar.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/calendars/delete-calendar.tsnew file mode 100644index 00000000000..4360011a5e8--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/calendars/delete-calendar.ts@@ -0,0 +1,31 @@+import { createAction } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';+import { outlookCalendarSuccessOutputSchema } from '../../../output-schemas';++export const outlookCalendarDeleteCalendarAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_delete_calendar',+ outputSchema: outlookCalendarSuccessOutputSchema,+ displayName: 'Delete Calendar',+ description: 'Deletes a calendar and its events.',+ audience: 'ai',+ classification: 'DESTRUCTIVE',+ aiMetadata: {+ description:+ "Deletes a calendar and every event in it; the items move to Recoverable Items, while Permanently Delete Calendar purges them. The default calendar can't be deleted. Calendar IDs come from List Calendars or List Calendars in Group.",+ idempotent: false,+ },+ props: {+ calendarId: outlookCalendarAiProps.calendarId({ required: true }),+ },+ async run({ auth, propsValue }) {+ await outlookCalendarClient+ .create({ auth })+ .api(`/me/calendars/${encodeURIComponent(propsValue.calendarId)}`)+ .delete();+ return { success: true };+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/calendars/get-calendar.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/calendars/get-calendar.tsnew file mode 100644index 00000000000..6643fd9da63--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/calendars/get-calendar.ts@@ -0,0 +1,38 @@+import { createAction } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';++import type { Calendar } from '../../../common/types';+import { outlookCalendarCalendarOutputSchema } from '../../../output-schemas';++export const outlookCalendarGetCalendarAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_get_calendar',+ outputSchema: outlookCalendarCalendarOutputSchema,+ displayName: 'Get Calendar',+ description: 'Gets one calendar, or the default calendar.',+ audience: 'ai',+ classification: 'READ',+ aiMetadata: {+ description:+ "Gets one calendar's name, color, owner, edit and share rights and whether it is the default. Leave Calendar ID empty to get the signed-in user's default calendar; calendar IDs come from List Calendars or List Calendars in Group.",+ idempotent: true,+ },+ props: {+ calendarId: outlookCalendarAiProps.calendarId({+ required: false,+ description:+ 'Calendar ID, from List Calendars or List Calendars in Group. Leave empty for the default calendar.',+ }),+ },+ async run({ auth, propsValue }) {+ const { calendarId } = propsValue;+ const response: Calendar = await outlookCalendarClient+ .create({ auth })+ .api(calendarId ? `/me/calendars/${encodeURIComponent(calendarId)}` : '/me/calendar')+ .get();+ return response;+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/calendars/list-calendars.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/calendars/list-calendars.tsnew file mode 100644index 00000000000..42bde6d219a--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/calendars/list-calendars.ts@@ -0,0 +1,39 @@+import { createAction } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';+import { outlookCalendarUtils } from '../../../common/utils';++import type { Calendar, OutlookCalendarPage } from '../../../common/types';+import { outlookCalendarCalendarListOutputSchema } from '../../../output-schemas';++export const outlookCalendarListCalendarsAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_list_calendars',+ outputSchema: outlookCalendarCalendarListOutputSchema,+ displayName: 'List Calendars',+ description: "Lists the signed-in user's calendars.",+ audience: 'ai',+ classification: 'READ',+ aiMetadata: {+ description:+ "Lists every calendar in the signed-in user's mailbox, across all calendar groups, with its ID, name, color, owner and edit rights. Use it to find the calendar ID other actions take; List Calendars in Group narrows to one group. Returns @odata.nextLink when more pages exist; pass it as Page URL.",+ idempotent: true,+ },+ props: {+ limit: outlookCalendarAiProps.limit({ required: false }),+ pageUrl: outlookCalendarAiProps.pageUrl({ required: false }),+ },+ async run({ auth, propsValue }) {+ const response: OutlookCalendarPage<Calendar> = await outlookCalendarClient+ .list({+ auth,+ path: '/me/calendars',+ query: { $top: outlookCalendarUtils.top({ limit: propsValue.limit }) },+ pageUrl: propsValue.pageUrl,+ })+ .get();+ return response;+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/calendars/permanently-delete-calendar.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/calendars/permanently-delete-calendar.tsnew file mode 100644index 00000000000..3721f4bcd48--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/calendars/permanently-delete-calendar.ts@@ -0,0 +1,31 @@+import { createAction } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';+import { outlookCalendarSuccessOutputSchema } from '../../../output-schemas';++export const outlookCalendarPermanentlyDeleteCalendarAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_permanently_delete_calendar',+ outputSchema: outlookCalendarSuccessOutputSchema,+ displayName: 'Permanently Delete Calendar',+ description: 'Permanently deletes a calendar and its events.',+ audience: 'ai',+ classification: 'DESTRUCTIVE',+ aiMetadata: {+ description:+ 'Permanently deletes a calendar and every event in it, bypassing Recoverable Items so nothing can be restored; prefer Delete Calendar when recovery may be needed. Calendar IDs come from List Calendars or List Calendars in Group.',+ idempotent: false,+ },+ props: {+ calendarId: outlookCalendarAiProps.calendarId({ required: true }),+ },+ async run({ auth, propsValue }) {+ await outlookCalendarClient+ .create({ auth })+ .api(`/me/calendars/${encodeURIComponent(propsValue.calendarId)}/permanentDelete`)+ .post({});+ return { success: true };+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/calendars/update-calendar.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/calendars/update-calendar.tsnew file mode 100644index 00000000000..9527a5414dc--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/calendars/update-calendar.ts@@ -0,0 +1,62 @@+import { createAction, Property } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';++import type { Calendar } from '../../../common/types';+import { outlookCalendarCalendarOutputSchema } from '../../../output-schemas';++export const outlookCalendarUpdateCalendarAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_update_calendar',+ outputSchema: outlookCalendarCalendarOutputSchema,+ displayName: 'Update Calendar',+ description: 'Renames or recolors a calendar, or makes it the default.',+ audience: 'ai',+ classification: 'WRITE',+ aiMetadata: {+ description:+ 'Changes only the fields you set on a calendar (name, color, default flag) and returns the updated calendar. Calendar IDs come from List Calendars or List Calendars in Group. At least one field must be set.',+ idempotent: true,+ },+ props: {+ calendarId: outlookCalendarAiProps.calendarId({ required: true }),+ name: Property.ShortText({+ displayName: 'Name',+ description: 'New calendar name.',+ required: false,+ }),+ color: outlookCalendarAiProps.calendarColor({ required: false }),+ isDefaultCalendar: Property.StaticDropdown({+ displayName: 'Is Default Calendar',+ description: "Whether this calendar is the user's default calendar.",+ required: false,+ options: {+ disabled: false,+ options: [+ { label: 'Yes', value: 'true' },+ { label: 'No', value: 'false' },+ ],+ },+ }),+ },+ async run({ auth, propsValue }) {+ const { calendarId, name, color, isDefaultCalendar } = propsValue;+ const body = {+ ...(name !== undefined ? { name } : {}),+ ...(color !== undefined ? { color } : {}),+ ...(isDefaultCalendar !== undefined+ ? { isDefaultCalendar: isDefaultCalendar === 'true' }+ : {}),+ };+ if (Object.keys(body).length === 0) {+ throw new Error('Set at least one of Name, Color or Is Default Calendar.');+ }+ const response: Calendar = await outlookCalendarClient+ .create({ auth })+ .api(`/me/calendars/${encodeURIComponent(calendarId)}`)+ .patch(body);+ return response;+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/events/create-event.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/events/create-event.tsnew file mode 100644index 00000000000..bfa85c65216--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/events/create-event.ts@@ -0,0 +1,183 @@+import { createAction, Property } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';+import { outlookCalendarUtils } from '../../../common/utils';++import type { Event } from '../../../common/types';+import { outlookCalendarEventOutputSchema } from '../../../output-schemas';++export const outlookCalendarCreateEventAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_create_event',+ outputSchema: outlookCalendarEventOutputSchema,+ displayName: 'Create Event',+ description: 'Creates a calendar event, optionally with attendees.',+ audience: 'ai',+ classification: 'WRITE',+ aiMetadata: {+ description:+ "Creates an event in the user's default calendar, or in one calendar when Calendar ID is set (from List Calendars). When attendees are given, Outlook sends each of them a meeting invitation immediately. Not idempotent: every call creates a new event, so check Get Calendar View before retrying.",+ idempotent: false,+ },+ props: {+ subject: Property.ShortText({+ displayName: 'Subject',+ required: true,+ }),+ start: Property.ShortText({+ displayName: 'Start',+ description:+ 'Start as a local date-time without offset, e.g. "2026-11-01T09:00:00", read in Time Zone. For an all-day event use midnight.',+ required: true,+ }),+ end: Property.ShortText({+ displayName: 'End',+ description:+ 'End as a local date-time without offset, e.g. "2026-11-01T10:00:00", read in Time Zone. For an all-day event use midnight of the following day.',+ required: true,+ }),+ timeZone: Property.ShortText({+ displayName: 'Time Zone',+ description:+ 'Time zone of Start and End, IANA or Windows name, e.g. "Europe/London" or "Pacific Standard Time" (see Get Supported Time Zones). Defaults to UTC.',+ required: false,+ }),+ calendarId: outlookCalendarAiProps.calendarId({+ required: false,+ description: "Calendar ID, from List Calendars. Leave empty for the user's default calendar.",+ }),+ bodyContent: Property.LongText({+ displayName: 'Body',+ description: 'Event description.',+ required: false,+ }),+ bodyContentType: Property.StaticDropdown({+ displayName: 'Body Type',+ description: 'Format of Body. Defaults to text.',+ required: false,+ options: { options: outlookCalendarUtils.eventOptions().bodyType },+ }),+ location: Property.ShortText({+ displayName: 'Location',+ description: 'Location display name, e.g. a room or address.',+ required: false,+ }),+ attendees: Property.Array({+ displayName: 'Attendees',+ description:+ 'People to invite; each one receives a meeting invitation when the event is created.',+ required: false,+ properties: {+ email: Property.ShortText({ displayName: 'Email', required: true }),+ name: Property.ShortText({ displayName: 'Name', required: false }),+ type: Property.StaticDropdown({+ displayName: 'Type',+ description: 'Defaults to required.',+ required: false,+ options: { options: outlookCalendarUtils.eventOptions().attendeeType },+ }),+ },+ }),+ isAllDay: Property.StaticDropdown({+ displayName: 'All Day',+ description:+ 'Whether the event lasts whole days. Start and End must then be midnight in Time Zone.',+ required: false,+ options: { options: outlookCalendarUtils.eventOptions().boolean },+ }),+ isOnlineMeeting: Property.StaticDropdown({+ displayName: 'Online Meeting',+ description:+ "Whether to add an online meeting link using the mailbox's default provider, e.g. Teams.",+ required: false,+ options: { options: outlookCalendarUtils.eventOptions().boolean },+ }),+ showAs: Property.StaticDropdown({+ displayName: 'Show As',+ description: 'Free/busy status shown for the event. Defaults to busy.',+ required: false,+ options: { options: outlookCalendarUtils.eventOptions().showAs },+ }),+ importance: Property.StaticDropdown({+ displayName: 'Importance',+ required: false,+ options: { options: outlookCalendarUtils.eventOptions().importance },+ }),+ sensitivity: Property.StaticDropdown({+ displayName: 'Sensitivity',+ required: false,+ options: { options: outlookCalendarUtils.eventOptions().sensitivity },+ }),+ categories: Property.Array({+ displayName: 'Categories',+ description: 'Category names, e.g. "Red category".',+ required: false,+ }),+ isReminderOn: Property.StaticDropdown({+ displayName: 'Reminder On',+ required: false,+ options: { options: outlookCalendarUtils.eventOptions().boolean },+ }),+ reminderMinutesBeforeStart: Property.Number({+ displayName: 'Reminder Minutes Before Start',+ required: false,+ }),+ allowNewTimeProposals: Property.StaticDropdown({+ displayName: 'Allow New Time Proposals',+ description: 'Whether attendees may propose another time. Defaults to true.',+ required: false,+ options: { options: outlookCalendarUtils.eventOptions().boolean },+ }),+ recurrence: Property.Json({+ displayName: 'Recurrence',+ description:+ 'Graph patternedRecurrence object, e.g. {"pattern":{"type":"weekly","interval":1,"daysOfWeek":["monday"]},"range":{"type":"endDate","startDate":"2026-11-02","endDate":"2026-12-28"}}. Leave empty for a single event.',+ required: false,+ }),+ },+ async run({ auth, propsValue }) {+ const p = propsValue;+ const timeZone = p.timeZone || 'UTC';+ const categories = p.categories ?? [];+ const attendees = p.attendees ?? [];+ const response: Event = await outlookCalendarClient+ .create({ auth })+ .api(p.calendarId ? `/me/calendars/${encodeURIComponent(p.calendarId)}/events` : '/me/events')+ .post({+ subject: p.subject,+ start: { dateTime: p.start, timeZone },+ end: { dateTime: p.end, timeZone },+ ...(p.bodyContent !== undefined+ ? {+ body: {+ contentType: p.bodyContentType ?? 'text',+ content: p.bodyContent,+ },+ }+ : {}),+ ...(p.location !== undefined ? { location: { displayName: p.location } } : {}),+ ...(attendees.length > 0+ ? { attendees: outlookCalendarUtils.toAttendees({ items: attendees }) }+ : {}),+ ...(p.isAllDay !== undefined ? { isAllDay: p.isAllDay === 'true' } : {}),+ ...(p.isOnlineMeeting !== undefined+ ? { isOnlineMeeting: p.isOnlineMeeting === 'true' }+ : {}),+ ...(p.showAs !== undefined ? { showAs: p.showAs } : {}),+ ...(p.importance !== undefined ? { importance: p.importance } : {}),+ ...(p.sensitivity !== undefined ? { sensitivity: p.sensitivity } : {}),+ ...(categories.length > 0 ? { categories } : {}),+ ...(p.isReminderOn !== undefined ? { isReminderOn: p.isReminderOn === 'true' } : {}),+ ...(p.reminderMinutesBeforeStart !== undefined+ ? { reminderMinutesBeforeStart: p.reminderMinutesBeforeStart }+ : {}),+ ...(p.allowNewTimeProposals !== undefined+ ? { allowNewTimeProposals: p.allowNewTimeProposals === 'true' }+ : {}),+ ...(p.recurrence !== undefined ? { recurrence: p.recurrence } : {}),+ });+ return response;+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/events/delete-event.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/events/delete-event.tsnew file mode 100644index 00000000000..21346b84e59--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/events/delete-event.ts@@ -0,0 +1,31 @@+import { createAction } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';+import { outlookCalendarSuccessOutputSchema } from '../../../output-schemas';++export const outlookCalendarDeleteEventAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_delete_event',+ outputSchema: outlookCalendarSuccessOutputSchema,+ displayName: 'Delete Event',+ description: 'Deletes a calendar event, moving it to Deleted Items.',+ audience: 'ai',+ classification: 'DESTRUCTIVE',+ aiMetadata: {+ description:+ 'Deletes an event by its ID (from List Events, Get Calendar View or Create Event), moving it to the Deleted Items folder where it can still be recovered. If the signed-in user organizes a meeting with attendees, they receive a cancellation. Use Permanently Delete Event to remove it beyond recovery.',+ idempotent: false,+ },+ props: {+ eventId: outlookCalendarAiProps.eventId({ required: true }),+ },+ async run({ auth, propsValue }) {+ await outlookCalendarClient+ .create({ auth })+ .api(`/me/events/${encodeURIComponent(propsValue.eventId)}`)+ .delete();+ return { success: true };+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/events/get-calendar-view-delta.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/events/get-calendar-view-delta.tsnew file mode 100644index 00000000000..90045a2feb8--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/events/get-calendar-view-delta.ts@@ -0,0 +1,73 @@+import { createAction, Property } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';+import { outlookCalendarUtils } from '../../../common/utils';++import type { Event, OutlookCalendarPage } from '../../../common/types';+import { outlookCalendarEventDeltaOutputSchema } from '../../../output-schemas';++export const outlookCalendarGetCalendarViewDeltaAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_get_calendar_view_delta',+ outputSchema: outlookCalendarEventDeltaOutputSchema,+ displayName: 'Get Calendar View Delta',+ description: 'Syncs the events in a date range: added, changed and deleted since the last sync.',+ audience: 'ai',+ classification: 'READ',+ aiMetadata: {+ description:+ 'Incrementally syncs the events in a date range. The first call takes Start and End and returns every event in the range; keep passing @odata.nextLink as Page URL until the response carries @odata.deltaLink instead, then store that deltaLink and later pass it as Page URL to get only events added, changed or deleted (marked "@removed") since then. Start and End are only needed on the first call.',+ idempotent: true,+ },+ props: {+ startDateTime: Property.ShortText({+ displayName: 'Start',+ description:+ 'Start of the range as ISO 8601, e.g. "2026-11-01T00:00:00Z". Required unless Page URL is set.',+ required: false,+ }),+ endDateTime: Property.ShortText({+ displayName: 'End',+ description:+ 'End of the range as ISO 8601, e.g. "2026-12-01T00:00:00Z". Required unless Page URL is set.',+ required: false,+ }),+ calendarId: outlookCalendarAiProps.calendarId({+ required: false,+ description: "Calendar ID, from List Calendars. Leave empty for the user's default calendar.",+ }),+ limit: outlookCalendarAiProps.limit({ required: false }),+ pageUrl: outlookCalendarAiProps.pageUrl({+ required: false,+ description:+ 'The @odata.nextLink or @odata.deltaLink from a previous call of this action. When set, Start, End and Calendar ID are ignored because the link already carries them.',+ }),+ timeZone: outlookCalendarAiProps.timeZone({ required: false }),+ },+ async run({ auth, propsValue }) {+ const { startDateTime, endDateTime, calendarId, pageUrl } = propsValue;+ if (!pageUrl && (!startDateTime || !endDateTime)) {+ throw new Error('Start and End are required unless Page URL is set.');+ }+ const prefer = [+ `odata.maxpagesize=${outlookCalendarUtils.top({ limit: propsValue.limit })}`,+ outlookCalendarUtils.preferTimeZone({ timeZone: propsValue.timeZone })?.['Prefer'],+ ]+ .filter(Boolean)+ .join(', ');+ const response: OutlookCalendarPage<Event> = await outlookCalendarClient+ .list({+ auth,+ path: calendarId+ ? `/me/calendars/${encodeURIComponent(calendarId)}/calendarView/delta`+ : '/me/calendarView/delta',+ query: startDateTime && endDateTime ? { startDateTime, endDateTime } : undefined,+ pageUrl: pageUrl,+ })+ .headers({ Prefer: prefer })+ .get();+ return response;+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/events/get-calendar-view.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/events/get-calendar-view.tsnew file mode 100644index 00000000000..d3e6579e90c--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/events/get-calendar-view.ts@@ -0,0 +1,68 @@+import { createAction, Property } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';+import { outlookCalendarUtils } from '../../../common/utils';++import type { Event, OutlookCalendarPage } from '../../../common/types';+import { outlookCalendarEventListOutputSchema } from '../../../output-schemas';++export const outlookCalendarGetCalendarViewAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_get_calendar_view',+ outputSchema: outlookCalendarEventListOutputSchema,+ displayName: 'Get Calendar View',+ description: 'Lists every event occurrence inside a date range.',+ audience: 'ai',+ classification: 'READ',+ aiMetadata: {+ description:+ "Lists the events, occurrences and exceptions of recurring series that fall between Start and End, in the user's default calendar or in one calendar when Calendar ID is set. Use it to answer what is on the calendar in a period; List Events returns series masters instead of occurrences. Returns @odata.nextLink when more pages exist; pass it as Page URL.",+ idempotent: true,+ },+ props: {+ startDateTime: Property.ShortText({+ displayName: 'Start',+ description:+ 'Start of the range as ISO 8601, e.g. "2026-11-01T00:00:00Z". Without an offset it is read as UTC.',+ required: true,+ }),+ endDateTime: Property.ShortText({+ displayName: 'End',+ description:+ 'End of the range as ISO 8601, e.g. "2026-11-08T00:00:00Z". Without an offset it is read as UTC.',+ required: true,+ }),+ calendarId: outlookCalendarAiProps.calendarId({+ required: false,+ description: "Calendar ID, from List Calendars. Leave empty for the user's default calendar.",+ }),+ limit: outlookCalendarAiProps.limit({ required: false }),+ pageUrl: outlookCalendarAiProps.pageUrl({ required: false }),+ timeZone: outlookCalendarAiProps.timeZone({ required: false }),+ },+ async run({ auth, propsValue }) {+ const { calendarId } = propsValue;+ const response: OutlookCalendarPage<Event> = await outlookCalendarClient+ .list({+ auth,+ path: calendarId+ ? `/me/calendars/${encodeURIComponent(calendarId)}/calendarView`+ : '/me/calendarView',+ query: {+ startDateTime: propsValue.startDateTime,+ endDateTime: propsValue.endDateTime,+ $top: outlookCalendarUtils.top({ limit: propsValue.limit }),+ },+ pageUrl: propsValue.pageUrl,+ })+ .headers(+ outlookCalendarUtils.preferTimeZone({+ timeZone: propsValue.timeZone,+ }),+ )+ .get();+ return response;+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/events/get-event-calendar.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/events/get-event-calendar.tsnew file mode 100644index 00000000000..231b01236aa--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/events/get-event-calendar.ts@@ -0,0 +1,33 @@+import { createAction } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';++import type { Calendar } from '../../../common/types';+import { outlookCalendarCalendarOutputSchema } from '../../../output-schemas';++export const outlookCalendarGetEventCalendarAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_get_event_calendar',+ outputSchema: outlookCalendarCalendarOutputSchema,+ displayName: 'Get Event Calendar',+ description: 'Gets the calendar that contains an event.',+ audience: 'ai',+ classification: 'READ',+ aiMetadata: {+ description:+ 'Gets the calendar that holds an event, given the event ID from List Events, Get Calendar View or Create Event. Use it to find which calendar an event lives in, e.g. before deciding whether it is on a shared calendar.',+ idempotent: true,+ },+ props: {+ eventId: outlookCalendarAiProps.eventId({ required: true }),+ },+ async run({ auth, propsValue }) {+ const client = outlookCalendarClient.create({ auth });+ const eventPath = `/me/events/${encodeURIComponent(propsValue.eventId)}`;+ await client.api(eventPath).query({ $select: 'id' }).get();+ const response: Calendar = await client.api(`${eventPath}/calendar`).get();+ return response;+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/events/get-event.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/events/get-event.tsnew file mode 100644index 00000000000..1e5eb69a233--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/events/get-event.ts@@ -0,0 +1,47 @@+import { createAction, Property } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';+import { outlookCalendarUtils } from '../../../common/utils';++import type { Event } from '../../../common/types';+import { outlookCalendarEventOutputSchema } from '../../../output-schemas';++export const outlookCalendarGetEventAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_get_event',+ outputSchema: outlookCalendarEventOutputSchema,+ displayName: 'Get Event',+ description: 'Gets one calendar event by ID.',+ audience: 'ai',+ classification: 'READ',+ aiMetadata: {+ description:+ "Gets one event in the signed-in user's mailbox by its ID (from List Events, Get Calendar View or Create Event), with subject, start, end, attendees, location, body and recurrence. Event IDs are mailbox-wide, so no calendar ID is needed.",+ idempotent: true,+ },+ props: {+ eventId: outlookCalendarAiProps.eventId({ required: true }),+ select: Property.ShortText({+ displayName: 'Select',+ description:+ 'Comma-separated event properties to return, e.g. "subject,start,end,attendees". Leave empty for all properties.',+ required: false,+ }),+ timeZone: outlookCalendarAiProps.timeZone({ required: false }),+ },+ async run({ auth, propsValue }) {+ const response: Event = await outlookCalendarClient+ .create({ auth })+ .api(`/me/events/${encodeURIComponent(propsValue.eventId)}`)+ .query(propsValue.select ? { $select: propsValue.select } : {})+ .headers(+ outlookCalendarUtils.preferTimeZone({+ timeZone: propsValue.timeZone,+ }),+ )+ .get();+ return response;+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/events/list-event-instances.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/events/list-event-instances.tsnew file mode 100644index 00000000000..85075dc7cf5--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/events/list-event-instances.ts@@ -0,0 +1,66 @@+import { createAction, Property } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';+import { outlookCalendarUtils } from '../../../common/utils';++import type { Event, OutlookCalendarPage } from '../../../common/types';+import { outlookCalendarEventInstanceListOutputSchema } from '../../../output-schemas';++export const outlookCalendarListEventInstancesAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_list_event_instances',+ outputSchema: outlookCalendarEventInstanceListOutputSchema,+ displayName: 'List Event Instances',+ description: 'Lists the occurrences of a recurring event inside a date range.',+ audience: 'ai',+ classification: 'READ',+ aiMetadata: {+ description:+ 'Lists the occurrences and exceptions of one recurring series between Start and End. Event ID is the series master ID (an event with type "seriesMaster" from List Events, or the seriesMasterId of an occurrence from Get Calendar View). Returns @odata.nextLink when more pages exist; pass it as Page URL.',+ idempotent: true,+ },+ props: {+ eventId: outlookCalendarAiProps.eventId({+ required: true,+ description:+ 'Series master event ID, from List Events (type "seriesMaster") or the seriesMasterId of an occurrence from Get Calendar View.',+ }),+ startDateTime: Property.ShortText({+ displayName: 'Start',+ description:+ 'Start of the range as ISO 8601, e.g. "2026-11-01T00:00:00Z". Without an offset it is read as UTC.',+ required: true,+ }),+ endDateTime: Property.ShortText({+ displayName: 'End',+ description:+ 'End of the range as ISO 8601, e.g. "2026-12-01T00:00:00Z". Without an offset it is read as UTC.',+ required: true,+ }),+ limit: outlookCalendarAiProps.limit({ required: false }),+ pageUrl: outlookCalendarAiProps.pageUrl({ required: false }),+ timeZone: outlookCalendarAiProps.timeZone({ required: false }),+ },+ async run({ auth, propsValue }) {+ const response: OutlookCalendarPage<Event> = await outlookCalendarClient+ .list({+ auth,+ path: `/me/events/${encodeURIComponent(propsValue.eventId)}/instances`,+ query: {+ startDateTime: propsValue.startDateTime,+ endDateTime: propsValue.endDateTime,+ $top: outlookCalendarUtils.top({ limit: propsValue.limit }),+ },+ pageUrl: propsValue.pageUrl,+ })+ .headers(+ outlookCalendarUtils.preferTimeZone({+ timeZone: propsValue.timeZone,+ }),+ )+ .get();+ return response;+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/events/list-events.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/events/list-events.tsnew file mode 100644index 00000000000..764d7cf853c--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/events/list-events.ts@@ -0,0 +1,72 @@+import { createAction, Property } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';+import { outlookCalendarUtils } from '../../../common/utils';++import type { Event, OutlookCalendarPage } from '../../../common/types';+import { outlookCalendarEventListOutputSchema } from '../../../output-schemas';++export const outlookCalendarListEventsAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_list_events',+ outputSchema: outlookCalendarEventListOutputSchema,+ displayName: 'List Events',+ description: 'Lists events in the mailbox or in one calendar.',+ audience: 'ai',+ classification: 'READ',+ aiMetadata: {+ description:+ "Lists event records (single events and recurring series masters, not expanded occurrences) across the signed-in user's default calendar, or in one calendar when Calendar ID is set. Narrow with an OData $filter and sort with $orderby; use Get Calendar View instead to get every occurrence inside a date range. Returns @odata.nextLink when more pages exist; pass it as Page URL together with the same Output Time Zone, because the link does not carry it.",+ idempotent: true,+ },+ props: {+ calendarId: outlookCalendarAiProps.calendarId({+ required: false,+ description: "Calendar ID, from List Calendars. Leave empty for the user's default calendar.",+ }),+ filter: Property.ShortText({+ displayName: 'Filter',+ description:+ 'OData $filter expression, e.g. "start/dateTime ge \'2026-11-01T00:00:00\'" or "contains(subject,\'review\')". Dates in the filter are read in the Output Time Zone when it is set, else in UTC.',+ required: false,+ }),+ orderBy: Property.ShortText({+ displayName: 'Order By',+ description: 'OData $orderby expression, e.g. "start/dateTime desc".',+ required: false,+ }),+ select: Property.ShortText({+ displayName: 'Select',+ description:+ 'Comma-separated event properties to return, e.g. "subject,start,end,organizer". Leave empty for all properties.',+ required: false,+ }),+ limit: outlookCalendarAiProps.limit({ required: false }),+ pageUrl: outlookCalendarAiProps.pageUrl({ required: false }),+ timeZone: outlookCalendarAiProps.timeZone({ required: false }),+ },+ async run({ auth, propsValue }) {+ const { calendarId, filter, orderBy, select } = propsValue;+ const response: OutlookCalendarPage<Event> = await outlookCalendarClient+ .list({+ auth,+ path: calendarId ? `/me/calendars/${encodeURIComponent(calendarId)}/events` : '/me/events',+ query: {+ $top: outlookCalendarUtils.top({ limit: propsValue.limit }),+ ...(filter ? { $filter: filter } : {}),+ ...(orderBy ? { $orderby: orderBy } : {}),+ ...(select ? { $select: select } : {}),+ },+ pageUrl: propsValue.pageUrl,+ })+ .headers(+ outlookCalendarUtils.preferTimeZone({+ timeZone: propsValue.timeZone,+ }),+ )+ .get();+ return response;+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/events/permanently-delete-event.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/events/permanently-delete-event.tsnew file mode 100644index 00000000000..f1904b5d379--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/events/permanently-delete-event.ts@@ -0,0 +1,31 @@+import { createAction } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';+import { outlookCalendarSuccessOutputSchema } from '../../../output-schemas';++export const outlookCalendarPermanentlyDeleteEventAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_permanently_delete_event',+ outputSchema: outlookCalendarSuccessOutputSchema,+ displayName: 'Permanently Delete Event',+ description: 'Permanently deletes a calendar event so it cannot be recovered.',+ audience: 'ai',+ classification: 'DESTRUCTIVE',+ aiMetadata: {+ description:+ 'Permanently deletes an event by its ID (from List Events, Get Calendar View or Create Event); unlike Delete Event it skips Deleted Items and cannot be undone. If the signed-in user organizes a meeting with attendees, they receive a cancellation.',+ idempotent: false,+ },+ props: {+ eventId: outlookCalendarAiProps.eventId({ required: true }),+ },+ async run({ auth, propsValue }) {+ await outlookCalendarClient+ .create({ auth })+ .api(`/me/events/${encodeURIComponent(propsValue.eventId)}/permanentDelete`)+ .post({});+ return { success: true };+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/events/update-event.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/events/update-event.tsnew file mode 100644index 00000000000..f3285db0537--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/events/update-event.ts@@ -0,0 +1,216 @@+import { createAction, Property } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';+import { outlookCalendarUtils } from '../../../common/utils';++import type { Event } from '../../../common/types';+import { outlookCalendarEventOutputSchema } from '../../../output-schemas';++const CLEARABLE_FIELDS = [+ { label: 'Body', value: 'body' },+ { label: 'Location', value: 'location' },+ { label: 'Attendees', value: 'attendees' },+ { label: 'Categories', value: 'categories' },+ { label: 'Recurrence', value: 'recurrence' },+];++export const outlookCalendarUpdateEventAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_update_event',+ outputSchema: outlookCalendarEventOutputSchema,+ displayName: 'Update Event',+ description: 'Updates the fields you set on a calendar event.',+ audience: 'ai',+ classification: 'WRITE',+ aiMetadata: {+ description:+ 'Changes only the fields that are set on an event, by its ID from List Events, Get Calendar View or Create Event; use Clear Fields to empty body, location, attendees, categories or recurrence. Attendees replaces the whole list, and when the signed-in user organizes the meeting, attendees receive an updated invitation. Updating a series master changes every occurrence.',+ idempotent: true,+ },+ props: {+ eventId: outlookCalendarAiProps.eventId({ required: true }),+ subject: Property.ShortText({+ displayName: 'Subject',+ required: false,+ }),+ start: Property.ShortText({+ displayName: 'Start',+ description:+ 'Start as a local date-time without offset, e.g. "2026-11-01T09:00:00", read in Time Zone. For an all-day event use midnight.',+ required: false,+ }),+ end: Property.ShortText({+ displayName: 'End',+ description:+ 'End as a local date-time without offset, e.g. "2026-11-01T10:00:00", read in Time Zone. For an all-day event use midnight of the following day.',+ required: false,+ }),+ timeZone: Property.ShortText({+ displayName: 'Time Zone',+ description:+ 'Time zone of Start and End, used only when one of them is set; IANA or Windows name, e.g. "Europe/London" or "Pacific Standard Time" (see Get Supported Time Zones). Defaults to UTC.',+ required: false,+ }),+ bodyContent: Property.LongText({+ displayName: 'Body',+ description: 'Event description.',+ required: false,+ }),+ bodyContentType: Property.StaticDropdown({+ displayName: 'Body Type',+ description: 'Format of Body. Defaults to text.',+ required: false,+ options: { options: outlookCalendarUtils.eventOptions().bodyType },+ }),+ location: Property.ShortText({+ displayName: 'Location',+ description: 'Location display name, e.g. a room or address.',+ required: false,+ }),+ attendees: Property.Array({+ displayName: 'Attendees',+ description:+ 'Replaces the whole attendee list; added attendees get an invitation, removed ones a cancellation. Use Clear Fields to remove all attendees.',+ required: false,+ properties: {+ email: Property.ShortText({ displayName: 'Email', required: true }),+ name: Property.ShortText({ displayName: 'Name', required: false }),+ type: Property.StaticDropdown({+ displayName: 'Type',+ description: 'Defaults to required.',+ required: false,+ options: { options: outlookCalendarUtils.eventOptions().attendeeType },+ }),+ },+ }),+ isAllDay: Property.StaticDropdown({+ displayName: 'All Day',+ description:+ 'Whether the event lasts whole days. Start and End must then be midnight in Time Zone.',+ required: false,+ options: { options: outlookCalendarUtils.eventOptions().boolean },+ }),+ isOnlineMeeting: Property.StaticDropdown({+ displayName: 'Online Meeting',+ description:+ "Whether to add an online meeting link using the mailbox's default provider, e.g. Teams.",+ required: false,+ options: { options: outlookCalendarUtils.eventOptions().boolean },+ }),+ showAs: Property.StaticDropdown({+ displayName: 'Show As',+ description: 'Free/busy status shown for the event. Defaults to busy.',+ required: false,+ options: { options: outlookCalendarUtils.eventOptions().showAs },+ }),+ importance: Property.StaticDropdown({+ displayName: 'Importance',+ required: false,+ options: { options: outlookCalendarUtils.eventOptions().importance },+ }),+ sensitivity: Property.StaticDropdown({+ displayName: 'Sensitivity',+ required: false,+ options: { options: outlookCalendarUtils.eventOptions().sensitivity },+ }),+ categories: Property.Array({+ displayName: 'Categories',+ description: 'Category names, e.g. "Red category".',+ required: false,+ }),+ isReminderOn: Property.StaticDropdown({+ displayName: 'Reminder On',+ required: false,+ options: { options: outlookCalendarUtils.eventOptions().boolean },+ }),+ reminderMinutesBeforeStart: Property.Number({+ displayName: 'Reminder Minutes Before Start',+ required: false,+ }),+ allowNewTimeProposals: Property.StaticDropdown({+ displayName: 'Allow New Time Proposals',+ description: 'Whether attendees may propose another time. Defaults to true.',+ required: false,+ options: { options: outlookCalendarUtils.eventOptions().boolean },+ }),+ recurrence: Property.Json({+ displayName: 'Recurrence',+ description:+ 'Graph patternedRecurrence object, e.g. {"pattern":{"type":"weekly","interval":1,"daysOfWeek":["monday"]},"range":{"type":"endDate","startDate":"2026-11-02","endDate":"2026-12-28"}}. Use Clear Fields to stop the recurrence.',+ required: false,+ }),+ clearFields: Property.StaticMultiSelectDropdown({+ displayName: 'Clear Fields',+ description: 'Fields to empty. A field listed here cannot also be given a value.',+ required: false,+ options: { options: CLEARABLE_FIELDS },+ }),+ },+ async run({ auth, propsValue }) {+ const p = propsValue;+ const clear = p.clearFields ?? [];+ const categories = p.categories ?? [];+ const attendees = p.attendees ?? [];+ const given: Record<string, boolean> = {+ body: p.bodyContent !== undefined,+ location: p.location !== undefined,+ attendees: attendees.length > 0,+ categories: categories.length > 0,+ recurrence: p.recurrence !== undefined,+ };+ const conflicts = clear.filter((field) => given[field]);+ if (conflicts.length > 0) {+ throw new Error(`Clear Fields and a value were both given for: ${conflicts.join(', ')}.`);+ }+ if (p.timeZone && p.start === undefined && p.end === undefined) {+ throw new Error('Time Zone only applies together with Start or End.');+ }+ const timeZone = p.timeZone || 'UTC';+ const body = {+ ...(p.subject !== undefined ? { subject: p.subject } : {}),+ ...(p.start !== undefined ? { start: { dateTime: p.start, timeZone } } : {}),+ ...(p.end !== undefined ? { end: { dateTime: p.end, timeZone } } : {}),+ ...(p.bodyContent !== undefined+ ? {+ body: {+ contentType: p.bodyContentType ?? 'text',+ content: p.bodyContent,+ },+ }+ : {}),+ ...(clear.includes('body') ? { body: { contentType: 'text', content: '' } } : {}),+ ...(p.location !== undefined ? { location: { displayName: p.location } } : {}),+ ...(clear.includes('location') ? { location: { displayName: '' } } : {}),+ ...(attendees.length > 0+ ? { attendees: outlookCalendarUtils.toAttendees({ items: attendees }) }+ : {}),+ ...(clear.includes('attendees') ? { attendees: [] } : {}),+ ...(p.isAllDay !== undefined ? { isAllDay: p.isAllDay === 'true' } : {}),+ ...(p.isOnlineMeeting !== undefined ? { isOnlineMeeting: p.isOnlineMeeting === 'true' } : {}),+ ...(p.showAs !== undefined ? { showAs: p.showAs } : {}),+ ...(p.importance !== undefined ? { importance: p.importance } : {}),+ ...(p.sensitivity !== undefined ? { sensitivity: p.sensitivity } : {}),+ ...(categories.length > 0 ? { categories } : {}),+ ...(clear.includes('categories') ? { categories: [] } : {}),+ ...(p.isReminderOn !== undefined ? { isReminderOn: p.isReminderOn === 'true' } : {}),+ ...(p.reminderMinutesBeforeStart !== undefined+ ? { reminderMinutesBeforeStart: p.reminderMinutesBeforeStart }+ : {}),+ ...(p.allowNewTimeProposals !== undefined+ ? { allowNewTimeProposals: p.allowNewTimeProposals === 'true' }+ : {}),+ ...(p.recurrence !== undefined ? { recurrence: p.recurrence } : {}),+ ...(clear.includes('recurrence') ? { recurrence: null } : {}),+ };+ if (Object.keys(body).length === 0) {+ throw new Error('Set at least one field to update or to clear.');+ }+ const response: Event = await outlookCalendarClient+ .create({ auth })+ .api(`/me/events/${encodeURIComponent(p.eventId)}`)+ .patch(body);+ return response;+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/extensions/create-event-extension.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/extensions/create-event-extension.tsnew file mode 100644index 00000000000..be236dbcbdd--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/extensions/create-event-extension.ts@@ -0,0 +1,49 @@+import { createAction, Property } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';++import type { Extension } from '../../../common/types';+import { outlookCalendarExtensionOutputSchema } from '../../../output-schemas';++export const outlookCalendarCreateEventExtensionAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_create_event_extension',+ outputSchema: outlookCalendarExtensionOutputSchema,+ displayName: 'Create Event Extension',+ description: 'Stores custom data on an event as an open extension.',+ audience: 'ai',+ classification: 'WRITE',+ aiMetadata: {+ description:+ 'Creates an open extension on an event that stores custom key-value data under a unique extensionName in reverse-DNS form (e.g. "Com.Contoso.Referral"). If the event already has an extension with that name, its data is replaced, so read it first with Get Event Extension when it must be kept. The event ID comes from List Events or Create Event.',+ idempotent: false,+ },+ props: {+ eventId: outlookCalendarAiProps.eventId({ required: true }),+ extensionName: Property.ShortText({+ displayName: 'Extension Name',+ description:+ 'Unique name for the extension in reverse-DNS form, e.g. "Com.Contoso.Referral".',+ required: true,+ }),+ customData: Property.Json({+ displayName: 'Custom Data',+ description:+ 'JSON object of the custom properties to store, e.g. {"companyName": "Contoso", "dealValue": 500}. Values must be primitives or arrays of primitives.',+ required: true,+ }),+ },+ async run({ auth, propsValue }) {+ const response: Extension = await outlookCalendarClient+ .create({ auth })+ .api(`/me/events/${encodeURIComponent(propsValue.eventId)}/extensions`)+ .post({+ ...propsValue.customData,+ '@odata.type': 'microsoft.graph.openTypeExtension',+ extensionName: propsValue.extensionName,+ });+ return response;+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/extensions/delete-event-extension.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/extensions/delete-event-extension.tsnew file mode 100644index 00000000000..7b742310f16--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/extensions/delete-event-extension.ts@@ -0,0 +1,36 @@+import { createAction } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';+import { outlookCalendarSuccessOutputSchema } from '../../../output-schemas';++export const outlookCalendarDeleteEventExtensionAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_delete_event_extension',+ outputSchema: outlookCalendarSuccessOutputSchema,+ displayName: 'Delete Event Extension',+ description: 'Permanently deletes an open extension and its custom data from an event.',+ audience: 'ai',+ classification: 'DESTRUCTIVE',+ aiMetadata: {+ description:+ 'Permanently deletes one open extension and all its custom data from an event; it cannot be recovered. The extension is identified by its extensionName or ID, from Create Event Extension.',+ idempotent: false,+ },+ props: {+ eventId: outlookCalendarAiProps.eventId({ required: true }),+ extensionId: outlookCalendarAiProps.extensionId({ required: true }),+ },+ async run({ auth, propsValue }) {+ await outlookCalendarClient+ .create({ auth })+ .api(+ `/me/events/${encodeURIComponent(propsValue.eventId)}/extensions/${encodeURIComponent(+ propsValue.extensionId,+ )}`,+ )+ .delete();+ return { success: true };+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/extensions/get-event-extension.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/extensions/get-event-extension.tsnew file mode 100644index 00000000000..256da521660--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/extensions/get-event-extension.ts@@ -0,0 +1,38 @@+import { createAction } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';++import type { Extension } from '../../../common/types';+import { outlookCalendarExtensionOutputSchema } from '../../../output-schemas';++export const outlookCalendarGetEventExtensionAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_get_event_extension',+ outputSchema: outlookCalendarExtensionOutputSchema,+ displayName: 'Get Event Extension',+ description: 'Gets one open extension (custom data) on an event.',+ audience: 'ai',+ classification: 'READ',+ aiMetadata: {+ description:+ 'Gets one open extension on an event with its custom data. The extension is identified by its extensionName (e.g. "Com.Contoso.Referral") or its ID, from Create Event Extension.',+ idempotent: true,+ },+ props: {+ eventId: outlookCalendarAiProps.eventId({ required: true }),+ extensionId: outlookCalendarAiProps.extensionId({ required: true }),+ },+ async run({ auth, propsValue }) {+ const response: Extension = await outlookCalendarClient+ .create({ auth })+ .api(+ `/me/events/${encodeURIComponent(propsValue.eventId)}/extensions/${encodeURIComponent(+ propsValue.extensionId,+ )}`,+ )+ .get();+ return response;+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/extensions/update-event-extension.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/extensions/update-event-extension.tsnew file mode 100644index 00000000000..f8e38bdc715--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/extensions/update-event-extension.ts@@ -0,0 +1,53 @@+import { createAction, Property } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';++import type { Extension } from '../../../common/types';+import { outlookCalendarExtensionOutputSchema } from '../../../output-schemas';++export const outlookCalendarUpdateEventExtensionAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_update_event_extension',+ outputSchema: outlookCalendarExtensionOutputSchema,+ displayName: 'Update Event Extension',+ description: 'Changes or adds custom data in an open extension on an event.',+ audience: 'ai',+ classification: 'WRITE',+ aiMetadata: {+ description:+ 'Updates an open extension on an event: each given property is changed or added, and properties not given keep their values; null values are not accepted, so a property cannot be removed. If the event has no extension with that name, one is created. The extension name comes from Create Event Extension.',+ idempotent: true,+ },+ props: {+ eventId: outlookCalendarAiProps.eventId({ required: true }),+ extensionName: Property.ShortText({+ displayName: 'Extension Name',+ description:+ 'The extensionName of the extension to update (e.g. "Com.Contoso.Referral"), from Create Event Extension.',+ required: true,+ }),+ customData: Property.Json({+ displayName: 'Custom Data',+ description:+ 'JSON object of the custom properties to change or add, e.g. {"dealValue": 600}. Values must be primitives or arrays of primitives.',+ required: true,+ }),+ },+ async run({ auth, propsValue }) {+ const response: Extension = await outlookCalendarClient+ .create({ auth })+ .api(+ `/me/events/${encodeURIComponent(propsValue.eventId)}/extensions/${encodeURIComponent(+ propsValue.extensionName,+ )}`,+ )+ .patch({+ ...propsValue.customData,+ '@odata.type': 'microsoft.graph.openTypeExtension',+ extensionName: propsValue.extensionName,+ });+ return response;+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/index.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/index.tsnew file mode 100644index 00000000000..4b53451b18e--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/index.ts@@ -0,0 +1,97 @@+import { outlookCalendarAddEventAttachmentAction } from './attachments/add-event-attachment';+import { outlookCalendarDeleteEventAttachmentAction } from './attachments/delete-event-attachment';+import { outlookCalendarGetEventAttachmentAction } from './attachments/get-event-attachment';+import { outlookCalendarListEventAttachmentsAction } from './attachments/list-event-attachments';+import { outlookCalendarCreateCalendarGroupAction } from './calendar-groups/create-calendar-group';+import { outlookCalendarCreateCalendarInGroupAction } from './calendar-groups/create-calendar-in-group';+import { outlookCalendarDeleteCalendarGroupAction } from './calendar-groups/delete-calendar-group';+import { outlookCalendarGetCalendarGroupAction } from './calendar-groups/get-calendar-group';+import { outlookCalendarListCalendarGroupsAction } from './calendar-groups/list-calendar-groups';+import { outlookCalendarListCalendarsInGroupAction } from './calendar-groups/list-calendars-in-group';+import { outlookCalendarUpdateCalendarGroupAction } from './calendar-groups/update-calendar-group';+import { outlookCalendarCreateCalendarAction } from './calendars/create-calendar';+import { outlookCalendarDeleteCalendarAction } from './calendars/delete-calendar';+import { outlookCalendarGetCalendarAction } from './calendars/get-calendar';+import { outlookCalendarListCalendarsAction } from './calendars/list-calendars';+import { outlookCalendarPermanentlyDeleteCalendarAction } from './calendars/permanently-delete-calendar';+import { outlookCalendarUpdateCalendarAction } from './calendars/update-calendar';+import { outlookCalendarCreateEventAction } from './events/create-event';+import { outlookCalendarDeleteEventAction } from './events/delete-event';+import { outlookCalendarGetCalendarViewAction } from './events/get-calendar-view';+import { outlookCalendarGetCalendarViewDeltaAction } from './events/get-calendar-view-delta';+import { outlookCalendarGetEventAction } from './events/get-event';+import { outlookCalendarGetEventCalendarAction } from './events/get-event-calendar';+import { outlookCalendarListEventInstancesAction } from './events/list-event-instances';+import { outlookCalendarListEventsAction } from './events/list-events';+import { outlookCalendarPermanentlyDeleteEventAction } from './events/permanently-delete-event';+import { outlookCalendarUpdateEventAction } from './events/update-event';+import { outlookCalendarCreateEventExtensionAction } from './extensions/create-event-extension';+import { outlookCalendarDeleteEventExtensionAction } from './extensions/delete-event-extension';+import { outlookCalendarGetEventExtensionAction } from './extensions/get-event-extension';+import { outlookCalendarUpdateEventExtensionAction } from './extensions/update-event-extension';+import { outlookCalendarDismissReminderAction } from './reminders/dismiss-reminder';+import { outlookCalendarListRemindersAction } from './reminders/list-reminders';+import { outlookCalendarSnoozeReminderAction } from './reminders/snooze-reminder';+import { outlookCalendarAcceptEventAction } from './responses/accept-event';+import { outlookCalendarCancelEventAction } from './responses/cancel-event';+import { outlookCalendarDeclineEventAction } from './responses/decline-event';+import { outlookCalendarForwardEventAction } from './responses/forward-event';+import { outlookCalendarTentativelyAcceptEventAction } from './responses/tentatively-accept-event';+import { outlookCalendarGetScheduleAction } from './scheduling/get-schedule';+import { outlookCalendarGetSupportedTimeZonesAction } from './scheduling/get-supported-time-zones';+import { outlookCalendarCreateCalendarPermissionAction } from './sharing/create-calendar-permission';+import { outlookCalendarDeleteCalendarPermissionAction } from './sharing/delete-calendar-permission';+import { outlookCalendarGetAllowedSharingRolesAction } from './sharing/get-allowed-sharing-roles';+import { outlookCalendarGetCalendarPermissionAction } from './sharing/get-calendar-permission';+import { outlookCalendarListCalendarPermissionsAction } from './sharing/list-calendar-permissions';+import { outlookCalendarUpdateCalendarPermissionAction } from './sharing/update-calendar-permission';++export const outlookCalendarAiActions = [+ outlookCalendarAddEventAttachmentAction,+ outlookCalendarDeleteEventAttachmentAction,+ outlookCalendarGetEventAttachmentAction,+ outlookCalendarListEventAttachmentsAction,+ outlookCalendarCreateCalendarGroupAction,+ outlookCalendarCreateCalendarInGroupAction,+ outlookCalendarDeleteCalendarGroupAction,+ outlookCalendarGetCalendarGroupAction,+ outlookCalendarListCalendarGroupsAction,+ outlookCalendarListCalendarsInGroupAction,+ outlookCalendarUpdateCalendarGroupAction,+ outlookCalendarCreateCalendarAction,+ outlookCalendarDeleteCalendarAction,+ outlookCalendarGetCalendarAction,+ outlookCalendarListCalendarsAction,+ outlookCalendarPermanentlyDeleteCalendarAction,+ outlookCalendarUpdateCalendarAction,+ outlookCalendarCreateEventAction,+ outlookCalendarDeleteEventAction,+ outlookCalendarGetCalendarViewDeltaAction,+ outlookCalendarGetCalendarViewAction,+ outlookCalendarGetEventCalendarAction,+ outlookCalendarGetEventAction,+ outlookCalendarListEventInstancesAction,+ outlookCalendarListEventsAction,+ outlookCalendarPermanentlyDeleteEventAction,+ outlookCalendarUpdateEventAction,+ outlookCalendarCreateEventExtensionAction,+ outlookCalendarDeleteEventExtensionAction,+ outlookCalendarGetEventExtensionAction,+ outlookCalendarUpdateEventExtensionAction,+ outlookCalendarDismissReminderAction,+ outlookCalendarListRemindersAction,+ outlookCalendarSnoozeReminderAction,+ outlookCalendarAcceptEventAction,+ outlookCalendarCancelEventAction,+ outlookCalendarDeclineEventAction,+ outlookCalendarForwardEventAction,+ outlookCalendarTentativelyAcceptEventAction,+ outlookCalendarGetScheduleAction,+ outlookCalendarGetSupportedTimeZonesAction,+ outlookCalendarCreateCalendarPermissionAction,+ outlookCalendarDeleteCalendarPermissionAction,+ outlookCalendarGetAllowedSharingRolesAction,+ outlookCalendarGetCalendarPermissionAction,+ outlookCalendarListCalendarPermissionsAction,+ outlookCalendarUpdateCalendarPermissionAction,+];diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/reminders/dismiss-reminder.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/reminders/dismiss-reminder.tsnew file mode 100644index 00000000000..fead845db14--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/reminders/dismiss-reminder.ts@@ -0,0 +1,31 @@+import { createAction } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';+import { outlookCalendarSuccessOutputSchema } from '../../../output-schemas';++export const outlookCalendarDismissReminderAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_dismiss_reminder',+ outputSchema: outlookCalendarSuccessOutputSchema,+ displayName: 'Dismiss Reminder',+ description: 'Dismisses the reminder of an event.',+ audience: 'ai',+ classification: 'WRITE',+ aiMetadata: {+ description:+ "Dismisses the reminder of an event in the signed-in user's calendar so it stops firing. Takes the event ID from List Reminders, List Events or Get Calendar View; use Snooze Reminder to postpone it instead.",+ idempotent: true,+ },+ props: {+ eventId: outlookCalendarAiProps.eventId({ required: true }),+ },+ async run({ auth, propsValue }) {+ await outlookCalendarClient+ .create({ auth })+ .api(`/me/events/${encodeURIComponent(propsValue.eventId)}/dismissReminder`)+ .post({});+ return { success: true };+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/reminders/list-reminders.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/reminders/list-reminders.tsnew file mode 100644index 00000000000..28dc39e64d7--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/reminders/list-reminders.ts@@ -0,0 +1,50 @@+import { createAction, Property } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';+import { outlookCalendarUtils } from '../../../common/utils';++import type { OutlookCalendarPage, Reminder } from '../../../common/types';+import { outlookCalendarReminderListOutputSchema } from '../../../output-schemas';++export const outlookCalendarListRemindersAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_list_reminders',+ outputSchema: outlookCalendarReminderListOutputSchema,+ displayName: 'List Reminders',+ description: "Lists event reminders in the signed-in user's calendar between two times.",+ audience: 'ai',+ classification: 'READ',+ aiMetadata: {+ description:+ "Lists the reminders of events in the signed-in user's calendar between a start and end time, each with its event ID, subject, start, end and fire time. Use the event ID with Snooze Reminder or Dismiss Reminder. Start and end are read in the Output Time Zone when it is set, else in UTC. Returns every reminder in the window in one response, so keep the window narrow.",+ idempotent: true,+ },+ props: {+ startDateTime: Property.ShortText({+ displayName: 'Start Date Time',+ description: 'Start of the window, ISO 8601, e.g. "2026-11-03T00:00:00".',+ required: true,+ }),+ endDateTime: Property.ShortText({+ displayName: 'End Date Time',+ description: 'End of the window, ISO 8601, e.g. "2026-11-10T00:00:00".',+ required: true,+ }),+ timeZone: outlookCalendarAiProps.timeZone({ required: false }),+ },+ async run({ auth, propsValue }) {+ const { startDateTime, endDateTime, timeZone } = propsValue;+ const response: OutlookCalendarPage<Reminder> = await outlookCalendarClient+ .create({ auth })+ .api(+ `/me/reminderView(StartDateTime='${encodeURIComponent(+ startDateTime,+ )}',EndDateTime='${encodeURIComponent(endDateTime)}')`,+ )+ .headers(outlookCalendarUtils.preferTimeZone({ timeZone }))+ .get();+ return response;+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/reminders/snooze-reminder.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/reminders/snooze-reminder.tsnew file mode 100644index 00000000000..f4e4f2bc8a0--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/reminders/snooze-reminder.ts@@ -0,0 +1,44 @@+import { createAction, Property } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';+import { outlookCalendarSuccessOutputSchema } from '../../../output-schemas';++export const outlookCalendarSnoozeReminderAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_snooze_reminder',+ outputSchema: outlookCalendarSuccessOutputSchema,+ displayName: 'Snooze Reminder',+ description: 'Postpones the reminder of an event to a new time.',+ audience: 'ai',+ classification: 'WRITE',+ aiMetadata: {+ description:+ "Postpones the reminder of an event in the signed-in user's calendar until the given time. The new time must be later than the current reminder time; an earlier one is accepted but ignored. Takes the event ID from List Reminders, List Events or Get Calendar View; use Dismiss Reminder to stop it instead.",+ idempotent: true,+ },+ props: {+ eventId: outlookCalendarAiProps.eventId({ required: true }),+ newReminderTime: Property.ShortText({+ displayName: 'New Reminder Time',+ description:+ 'When the reminder should fire again, ISO 8601 without offset, e.g. "2026-11-03T14:45:00".',+ required: true,+ }),+ timeZone: Property.ShortText({+ displayName: 'Time Zone',+ description:+ 'Time zone of New Reminder Time, IANA or Windows name (see Get Supported Time Zones). Defaults to UTC.',+ required: false,+ }),+ },+ async run({ auth, propsValue }) {+ const { eventId, newReminderTime, timeZone } = propsValue;+ await outlookCalendarClient+ .create({ auth })+ .api(`/me/events/${encodeURIComponent(eventId)}/snoozeReminder`)+ .post({ newReminderTime: { dateTime: newReminderTime, timeZone: timeZone ?? 'UTC' } });+ return { success: true };+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/responses/accept-event.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/responses/accept-event.tsnew file mode 100644index 00000000000..46bcd094328--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/responses/accept-event.ts@@ -0,0 +1,41 @@+import { createAction, Property } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';+import { outlookCalendarSuccessOutputSchema } from '../../../output-schemas';++export const outlookCalendarAcceptEventAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_accept_event',+ outputSchema: outlookCalendarSuccessOutputSchema,+ displayName: 'Accept Event',+ description: "Accepts a meeting invitation in the signed-in user's calendar.",+ audience: 'ai',+ classification: 'WRITE',+ aiMetadata: {+ description:+ 'Accepts a meeting the signed-in user was invited to, optionally with a comment, and by default notifies the organizer; Send Response must stay on when a Comment is given. Takes the event ID from List Events or Get Calendar View; use Tentatively Accept Event or Decline Event for the other answers. Repeating it re-sends the response.',+ idempotent: false,+ },+ props: {+ eventId: outlookCalendarAiProps.eventId({ required: true }),+ comment: Property.LongText({+ displayName: 'Comment',+ description: 'Text included in the response to the organizer.',+ required: false,+ }),+ sendResponse: outlookCalendarAiProps.sendResponse({ required: false }),+ },+ async run({ auth, propsValue }) {+ const { eventId, comment, sendResponse } = propsValue;+ await outlookCalendarClient+ .create({ auth })+ .api(`/me/events/${encodeURIComponent(eventId)}/accept`)+ .post({+ ...(comment !== undefined ? { comment } : {}),+ ...(sendResponse !== undefined ? { sendResponse: sendResponse === 'true' } : {}),+ });+ return { success: true };+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/responses/cancel-event.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/responses/cancel-event.tsnew file mode 100644index 00000000000..1b86dac3225--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/responses/cancel-event.ts@@ -0,0 +1,37 @@+import { createAction, Property } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';+import { outlookCalendarSuccessOutputSchema } from '../../../output-schemas';++export const outlookCalendarCancelEventAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_cancel_event',+ outputSchema: outlookCalendarSuccessOutputSchema,+ displayName: 'Cancel Event',+ description: 'Cancels a meeting the signed-in user organizes and notifies the attendees.',+ audience: 'ai',+ classification: 'DESTRUCTIVE',+ aiMetadata: {+ description:+ 'Cancels a meeting the signed-in user organizes, sends a cancellation with the optional comment to every attendee, and removes the event. Only the organizer can cancel; an attendee uses Decline Event. Delete Event also sends the attendees a cancellation, but without a comment. Takes the event ID from List Events or Get Calendar View.',+ idempotent: false,+ },+ props: {+ eventId: outlookCalendarAiProps.eventId({ required: true }),+ comment: Property.LongText({+ displayName: 'Comment',+ description: 'Message sent to the attendees with the cancellation.',+ required: false,+ }),+ },+ async run({ auth, propsValue }) {+ const { eventId, comment } = propsValue;+ await outlookCalendarClient+ .create({ auth })+ .api(`/me/events/${encodeURIComponent(eventId)}/cancel`)+ .post(comment !== undefined ? { comment } : {});+ return { success: true };+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/responses/decline-event.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/responses/decline-event.tsnew file mode 100644index 00000000000..e762a94ef56--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/responses/decline-event.ts@@ -0,0 +1,50 @@+import { createAction, Property } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';+import { outlookCalendarUtils } from '../../../common/utils';+import { outlookCalendarSuccessOutputSchema } from '../../../output-schemas';++export const outlookCalendarDeclineEventAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_decline_event',+ outputSchema: outlookCalendarSuccessOutputSchema,+ displayName: 'Decline Event',+ description: "Declines a meeting invitation in the signed-in user's calendar.",+ audience: 'ai',+ classification: 'WRITE',+ aiMetadata: {+ description:+ 'Declines a meeting the signed-in user was invited to, optionally with a comment and a proposed new time, and by default notifies the organizer (Send Response must stay on when a Comment is given); the event then moves to Deleted Items. Takes the event ID from List Events or Get Calendar View. Proposed New Start and End go together, only work when the organizer allows new time proposals, and need Send Response left on; a repeat may fail once the event is removed.',+ idempotent: false,+ },+ props: {+ eventId: outlookCalendarAiProps.eventId({ required: true }),+ comment: Property.LongText({+ displayName: 'Comment',+ description: 'Text included in the response to the organizer.',+ required: false,+ }),+ sendResponse: outlookCalendarAiProps.sendResponse({ required: false }),+ proposedStart: outlookCalendarAiProps.proposedStart({ required: false }),+ proposedEnd: outlookCalendarAiProps.proposedEnd({ required: false }),+ proposedTimeZone: outlookCalendarAiProps.proposedTimeZone({ required: false }),+ },+ async run({ auth, propsValue }) {+ const { eventId, comment, sendResponse, proposedStart, proposedEnd } = propsValue;+ await outlookCalendarClient+ .create({ auth })+ .api(`/me/events/${encodeURIComponent(eventId)}/decline`)+ .post({+ ...(comment !== undefined ? { comment } : {}),+ ...(sendResponse !== undefined ? { sendResponse: sendResponse === 'true' } : {}),+ ...outlookCalendarUtils.proposedNewTime({+ start: proposedStart,+ end: proposedEnd,+ timeZone: propsValue.proposedTimeZone,+ }),+ });+ return { success: true };+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/responses/forward-event.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/responses/forward-event.tsnew file mode 100644index 00000000000..8105642612c--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/responses/forward-event.ts@@ -0,0 +1,53 @@+import { createAction, Property } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';+import { outlookCalendarSuccessOutputSchema } from '../../../output-schemas';++export const outlookCalendarForwardEventAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_forward_event',+ outputSchema: outlookCalendarSuccessOutputSchema,+ displayName: 'Forward Event',+ description: 'Forwards a meeting request to other recipients.',+ audience: 'ai',+ classification: 'WRITE',+ aiMetadata: {+ description:+ 'Forwards a meeting request to the given email addresses with an optional comment; an attendee forwarding notifies the organizer, who decides whether to add the new recipients. Takes the event ID from List Events or Get Calendar View. Each call sends a new message.',+ idempotent: false,+ },+ props: {+ eventId: outlookCalendarAiProps.eventId({ required: true }),+ toRecipients: Property.Array({+ displayName: 'To Recipients',+ description: 'Email addresses to forward the meeting request to.',+ required: true,+ }),+ comment: Property.LongText({+ displayName: 'Comment',+ description: 'Message included with the forwarded request.',+ required: false,+ }),+ },+ async run({ auth, propsValue }) {+ const { eventId, toRecipients, comment } = propsValue;+ if (+ toRecipients.length === 0 ||+ !toRecipients.every(+ (address): address is string => typeof address === 'string' && address !== '',+ )+ ) {+ throw new Error('To Recipients must be a non-empty list of email addresses.');+ }+ await outlookCalendarClient+ .create({ auth })+ .api(`/me/events/${encodeURIComponent(eventId)}/forward`)+ .post({+ toRecipients: toRecipients.map((address) => ({ emailAddress: { address } })),+ ...(comment !== undefined ? { comment } : {}),+ });+ return { success: true };+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/responses/tentatively-accept-event.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/responses/tentatively-accept-event.tsnew file mode 100644index 00000000000..5e2fe39f4c7--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/responses/tentatively-accept-event.ts@@ -0,0 +1,50 @@+import { createAction, Property } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';+import { outlookCalendarUtils } from '../../../common/utils';+import { outlookCalendarSuccessOutputSchema } from '../../../output-schemas';++export const outlookCalendarTentativelyAcceptEventAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_tentatively_accept_event',+ outputSchema: outlookCalendarSuccessOutputSchema,+ displayName: 'Tentatively Accept Event',+ description: "Tentatively accepts a meeting invitation in the signed-in user's calendar.",+ audience: 'ai',+ classification: 'WRITE',+ aiMetadata: {+ description:+ 'Tentatively accepts a meeting the signed-in user was invited to, optionally with a comment and a proposed new time, and by default notifies the organizer; Send Response must stay on when a Comment is given. Takes the event ID from List Events or Get Calendar View; use Accept Event or Decline Event for the other answers. Proposed New Start and End go together, only work when the organizer allows new time proposals, and need Send Response left on; repeating the call re-sends the response.',+ idempotent: false,+ },+ props: {+ eventId: outlookCalendarAiProps.eventId({ required: true }),+ comment: Property.LongText({+ displayName: 'Comment',+ description: 'Text included in the response to the organizer.',+ required: false,+ }),+ sendResponse: outlookCalendarAiProps.sendResponse({ required: false }),+ proposedStart: outlookCalendarAiProps.proposedStart({ required: false }),+ proposedEnd: outlookCalendarAiProps.proposedEnd({ required: false }),+ proposedTimeZone: outlookCalendarAiProps.proposedTimeZone({ required: false }),+ },+ async run({ auth, propsValue }) {+ const { eventId, comment, sendResponse, proposedStart, proposedEnd } = propsValue;+ await outlookCalendarClient+ .create({ auth })+ .api(`/me/events/${encodeURIComponent(eventId)}/tentativelyAccept`)+ .post({+ ...(comment !== undefined ? { comment } : {}),+ ...(sendResponse !== undefined ? { sendResponse: sendResponse === 'true' } : {}),+ ...outlookCalendarUtils.proposedNewTime({+ start: proposedStart,+ end: proposedEnd,+ timeZone: propsValue.proposedTimeZone,+ }),+ });+ return { success: true };+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/scheduling/get-schedule.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/scheduling/get-schedule.tsnew file mode 100644index 00000000000..2f8605de106--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/scheduling/get-schedule.ts@@ -0,0 +1,74 @@+import { createAction, Property } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarClient } from '../../../common/client';++import type { OutlookCalendarPage, ScheduleInformation } from '../../../common/types';+import { outlookCalendarScheduleOutputSchema } from '../../../output-schemas';++export const outlookCalendarGetScheduleAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_get_schedule',+ outputSchema: outlookCalendarScheduleOutputSchema,+ displayName: 'Get Schedule',+ description: 'Gets the free/busy availability of people, rooms or resources.',+ audience: 'ai',+ classification: 'READ',+ aiMetadata: {+ description:+ 'Gets the free/busy schedule of one or more users, distribution lists or rooms for a time window, with their busy items, availability view and working hours. Use it to check availability before Create Event. Works only for work or school accounts, not personal Microsoft accounts.',+ idempotent: true,+ },+ props: {+ schedules: Property.Array({+ displayName: 'Email Addresses',+ description:+ 'Email addresses of the users, distribution lists or resources to get availability for.',+ required: true,+ }),+ startTime: Property.ShortText({+ displayName: 'Start Time',+ description:+ 'Start of the window, as a local date-time without offset, e.g. "2026-03-15T09:00:00".',+ required: true,+ }),+ endTime: Property.ShortText({+ displayName: 'End Time',+ description:+ 'End of the window, as a local date-time without offset, e.g. "2026-03-15T18:00:00".',+ required: true,+ }),+ timeZone: Property.ShortText({+ displayName: 'Time Zone',+ description:+ 'Time zone of Start Time and End Time, e.g. "Pacific Standard Time" or "Europe/London" (see Get Supported Time Zones). Defaults to UTC.',+ required: false,+ }),+ availabilityViewInterval: Property.Number({+ displayName: 'Availability View Interval',+ description:+ 'Length in minutes of each slot in the availability view (5-1440). Defaults to 30.',+ required: false,+ }),+ },+ async run({ auth, propsValue }) {+ const { schedules, startTime, endTime, availabilityViewInterval } = propsValue;+ const timeZone = propsValue.timeZone || 'UTC';+ if (+ schedules.length === 0 ||+ !schedules.every((s): s is string => typeof s === 'string' && s !== '')+ ) {+ throw new Error('Email Addresses must be a non-empty list of email address strings.');+ }+ const response: OutlookCalendarPage<ScheduleInformation> = await outlookCalendarClient+ .create({ auth })+ .api('/me/calendar/getSchedule')+ .post({+ schedules,+ startTime: { dateTime: startTime, timeZone },+ endTime: { dateTime: endTime, timeZone },+ ...(availabilityViewInterval !== undefined ? { availabilityViewInterval } : {}),+ });+ return response;+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/scheduling/get-supported-time-zones.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/scheduling/get-supported-time-zones.tsnew file mode 100644index 00000000000..cf5adbeee97--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/scheduling/get-supported-time-zones.ts@@ -0,0 +1,51 @@+import { createAction, Property } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarClient } from '../../../common/client';++import type { OutlookCalendarPage, TimeZoneInformation } from '../../../common/types';+import { outlookCalendarTimeZoneListOutputSchema } from '../../../output-schemas';++export const outlookCalendarGetSupportedTimeZonesAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_get_supported_time_zones',+ outputSchema: outlookCalendarTimeZoneListOutputSchema,+ displayName: 'Get Supported Time Zones',+ description: "Lists the time zones supported by the user's mailbox server.",+ audience: 'ai',+ classification: 'READ',+ aiMetadata: {+ description:+ "Lists the time zones the signed-in user's mailbox supports, each with its alias and display name. Use an alias as the time zone of event and schedule actions; pick the standard to get Windows names or IANA names.",+ idempotent: true,+ },+ props: {+ timeZoneStandard: Property.StaticDropdown({+ displayName: 'Time Zone Standard',+ description:+ 'Naming standard for the returned aliases: windows (e.g. "Pacific Standard Time") or iana (e.g. "America/Los_Angeles"). Defaults to windows.',+ required: false,+ options: {+ disabled: false,+ options: [+ { label: 'Windows', value: 'windows' },+ { label: 'IANA', value: 'iana' },+ ],+ },+ }),+ },+ async run({ auth, propsValue }) {+ const { timeZoneStandard } = propsValue;+ const response: OutlookCalendarPage<TimeZoneInformation> = await outlookCalendarClient+ .create({ auth })+ .api(+ timeZoneStandard+ ? `/me/outlook/supportedTimeZones(TimeZoneStandard=microsoft.graph.timeZoneStandard'${encodeURIComponent(+ timeZoneStandard,+ )}')`+ : '/me/outlook/supportedTimeZones',+ )+ .get();+ return response;+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/sharing/create-calendar-permission.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/sharing/create-calendar-permission.tsnew file mode 100644index 00000000000..980b4e16f6f--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/sharing/create-calendar-permission.ts@@ -0,0 +1,81 @@+import { createAction, Property } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';+import { outlookCalendarUtils } from '../../../common/utils';++import type { CalendarPermission } from '../../../common/types';+import { outlookCalendarPermissionOutputSchema } from '../../../output-schemas';++export const outlookCalendarCreateCalendarPermissionAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_create_calendar_permission',+ outputSchema: outlookCalendarPermissionOutputSchema,+ displayName: 'Create Calendar Permission',+ description: 'Shares a calendar with someone or makes them a delegate.',+ audience: 'ai',+ classification: 'WRITE',+ aiMetadata: {+ description:+ "Shares the signed-in user's calendar with another person (or makes them a delegate) at the given role, giving them access to its events. Calendar ID comes from List Calendars or Get Calendar; check which roles the person can get with Get Allowed Sharing Roles first. Delegate roles work only for people inside the same organization.",+ idempotent: false,+ },+ props: {+ calendarId: outlookCalendarAiProps.calendarId({ required: true }),+ emailAddress: Property.ShortText({+ displayName: 'Email Address',+ description: 'Email address of the person to share the calendar with.',+ required: true,+ }),+ name: Property.ShortText({+ displayName: 'Name',+ description: 'Display name of the person.',+ required: false,+ }),+ role: outlookCalendarAiProps.calendarRole({ required: true }),+ isInsideOrganization: Property.StaticDropdown({+ displayName: 'Is Inside Organization',+ description: 'Whether the person is in the same organization as the calendar owner.',+ required: false,+ options: {+ disabled: false,+ options: [+ { label: 'Yes', value: 'true' },+ { label: 'No', value: 'false' },+ ],+ },+ }),+ isRemovable: Property.StaticDropdown({+ displayName: 'Is Removable',+ description: "Whether the person can later be removed from the calendar's recipients.",+ required: false,+ options: {+ disabled: false,+ options: [+ { label: 'Yes', value: 'true' },+ { label: 'No', value: 'false' },+ ],+ },+ }),+ },+ async run({ auth, propsValue }) {+ const { calendarId, emailAddress, name, role, isInsideOrganization, isRemovable } = propsValue;+ outlookCalendarUtils.assertCalendarRole({ role });+ const response: CalendarPermission = await outlookCalendarClient+ .create({ auth })+ .api(`/me/calendars/${encodeURIComponent(calendarId)}/calendarPermissions`)+ .post({+ emailAddress: {+ address: emailAddress,+ ...(name !== undefined ? { name } : {}),+ },+ role,+ ...(isInsideOrganization !== undefined+ ? { isInsideOrganization: isInsideOrganization === 'true' }+ : {}),+ ...(isRemovable !== undefined ? { isRemovable: isRemovable === 'true' } : {}),+ });+ return response;+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/sharing/delete-calendar-permission.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/sharing/delete-calendar-permission.tsnew file mode 100644index 00000000000..a34b67421c5--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/sharing/delete-calendar-permission.ts@@ -0,0 +1,36 @@+import { createAction } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';+import { outlookCalendarSuccessOutputSchema } from '../../../output-schemas';++export const outlookCalendarDeleteCalendarPermissionAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_delete_calendar_permission',+ outputSchema: outlookCalendarSuccessOutputSchema,+ displayName: 'Delete Calendar Permission',+ description: 'Stops sharing a calendar with someone or removes a delegate.',+ audience: 'ai',+ classification: 'DESTRUCTIVE',+ aiMetadata: {+ description:+ "Removes a share recipient or delegate from a calendar, revoking their access at once; it can't be undone except by sharing again with Create Calendar Permission. Calendar ID comes from List Calendars or Get Calendar; Permission ID from List Calendar Permissions (permissions with isRemovable false, such as My Organization, can't be removed).",+ idempotent: false,+ },+ props: {+ calendarId: outlookCalendarAiProps.calendarId({ required: true }),+ permissionId: outlookCalendarAiProps.permissionId({ required: true }),+ },+ async run({ auth, propsValue }) {+ await outlookCalendarClient+ .create({ auth })+ .api(+ `/me/calendars/${encodeURIComponent(+ propsValue.calendarId,+ )}/calendarPermissions/${encodeURIComponent(propsValue.permissionId)}`,+ )+ .delete();+ return { success: true };+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/sharing/get-allowed-sharing-roles.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/sharing/get-allowed-sharing-roles.tsnew file mode 100644index 00000000000..29ecbba9693--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/sharing/get-allowed-sharing-roles.ts@@ -0,0 +1,43 @@+import { createAction, Property } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';++import type { CalendarRoleType, OutlookCalendarPage } from '../../../common/types';+import { outlookCalendarAllowedRolesOutputSchema } from '../../../output-schemas';++export const outlookCalendarGetAllowedSharingRolesAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_get_allowed_sharing_roles',+ outputSchema: outlookCalendarAllowedRolesOutputSchema,+ displayName: 'Get Allowed Sharing Roles',+ description: 'Lists the roles a calendar can be shared with a person at.',+ audience: 'ai',+ classification: 'READ',+ aiMetadata: {+ description:+ 'Lists the permission roles a calendar can be shared with or delegated to the given person at, before calling Create Calendar Permission. Calendar ID comes from List Calendars or Get Calendar.',+ idempotent: true,+ },+ props: {+ calendarId: outlookCalendarAiProps.calendarId({ required: true }),+ user: Property.ShortText({+ displayName: 'User Email',+ description: 'Email address of the person to check.',+ required: true,+ }),+ },+ async run({ auth, propsValue }) {+ const user = encodeURIComponent(propsValue.user.replace(/'/g, "''"));+ const response: OutlookCalendarPage<CalendarRoleType> = await outlookCalendarClient+ .create({ auth })+ .api(+ `/me/calendars/${encodeURIComponent(+ propsValue.calendarId,+ )}/allowedCalendarSharingRoles(User='${user}')`,+ )+ .get();+ return response;+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/sharing/get-calendar-permission.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/sharing/get-calendar-permission.tsnew file mode 100644index 00000000000..c33bc3cd30b--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/sharing/get-calendar-permission.ts@@ -0,0 +1,38 @@+import { createAction } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';++import type { CalendarPermission } from '../../../common/types';+import { outlookCalendarPermissionOutputSchema } from '../../../output-schemas';++export const outlookCalendarGetCalendarPermissionAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_get_calendar_permission',+ outputSchema: outlookCalendarPermissionOutputSchema,+ displayName: 'Get Calendar Permission',+ description: 'Gets one share recipient or delegate of a calendar.',+ audience: 'ai',+ classification: 'READ',+ aiMetadata: {+ description:+ 'Gets one permission on a calendar: the recipient or delegate, their role, the roles they could be given and whether they can be removed. Calendar ID comes from List Calendars or Get Calendar; Permission ID from List Calendar Permissions.',+ idempotent: true,+ },+ props: {+ calendarId: outlookCalendarAiProps.calendarId({ required: true }),+ permissionId: outlookCalendarAiProps.permissionId({ required: true }),+ },+ async run({ auth, propsValue }) {+ const response: CalendarPermission = await outlookCalendarClient+ .create({ auth })+ .api(+ `/me/calendars/${encodeURIComponent(+ propsValue.calendarId,+ )}/calendarPermissions/${encodeURIComponent(propsValue.permissionId)}`,+ )+ .get();+ return response;+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/sharing/list-calendar-permissions.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/sharing/list-calendar-permissions.tsnew file mode 100644index 00000000000..5c1a70743e8--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/sharing/list-calendar-permissions.ts@@ -0,0 +1,40 @@+import { createAction } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';+import { outlookCalendarUtils } from '../../../common/utils';++import type { CalendarPermission, OutlookCalendarPage } from '../../../common/types';+import { outlookCalendarPermissionListOutputSchema } from '../../../output-schemas';++export const outlookCalendarListCalendarPermissionsAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_list_calendar_permissions',+ outputSchema: outlookCalendarPermissionListOutputSchema,+ displayName: 'List Calendar Permissions',+ description: 'Lists who a calendar is shared with or delegated to.',+ audience: 'ai',+ classification: 'READ',+ aiMetadata: {+ description:+ 'Lists the share recipients and delegates of a calendar, each with its permission ID, email address and role. Use it to find the permission ID that Get, Update and Delete Calendar Permission take; Calendar ID comes from List Calendars or Get Calendar. Returns @odata.nextLink when more pages exist; pass it as Page URL.',+ idempotent: true,+ },+ props: {+ calendarId: outlookCalendarAiProps.calendarId({ required: true }),+ limit: outlookCalendarAiProps.limit({ required: false }),+ pageUrl: outlookCalendarAiProps.pageUrl({ required: false }),+ },+ async run({ auth, propsValue }) {+ const response: OutlookCalendarPage<CalendarPermission> = await outlookCalendarClient+ .list({+ auth,+ path: `/me/calendars/${encodeURIComponent(propsValue.calendarId)}/calendarPermissions`,+ query: { $top: outlookCalendarUtils.top({ limit: propsValue.limit }) },+ pageUrl: propsValue.pageUrl,+ })+ .get();+ return response;+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/sharing/update-calendar-permission.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/sharing/update-calendar-permission.tsnew file mode 100644index 00000000000..408ee2c1b79--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/ai/sharing/update-calendar-permission.ts@@ -0,0 +1,42 @@+import { createAction } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../../../auth';+import { outlookCalendarAiProps } from '../../../common/ai-props';+import { outlookCalendarClient } from '../../../common/client';+import { outlookCalendarUtils } from '../../../common/utils';++import type { CalendarPermission } from '../../../common/types';+import { outlookCalendarPermissionOutputSchema } from '../../../output-schemas';++export const outlookCalendarUpdateCalendarPermissionAction = createAction({+ auth: outlookCalendarAuth,+ name: 'microsoft_outlook_calendar_update_calendar_permission',+ outputSchema: outlookCalendarPermissionOutputSchema,+ displayName: 'Update Calendar Permission',+ description: "Changes a share recipient's or delegate's role on a calendar.",+ audience: 'ai',+ classification: 'WRITE',+ aiMetadata: {+ description:+ 'Sets the role of an existing share recipient or delegate on a calendar; only the role can change. Calendar ID comes from List Calendars or Get Calendar; Permission ID from List Calendar Permissions, whose allowedRoles lists the roles this person can get.',+ idempotent: true,+ },+ props: {+ calendarId: outlookCalendarAiProps.calendarId({ required: true }),+ permissionId: outlookCalendarAiProps.permissionId({ required: true }),+ role: outlookCalendarAiProps.calendarRole({ required: true }),+ },+ async run({ auth, propsValue }) {+ const { calendarId, permissionId, role } = propsValue;+ outlookCalendarUtils.assertCalendarRole({ role });+ const response: CalendarPermission = await outlookCalendarClient+ .create({ auth })+ .api(+ `/me/calendars/${encodeURIComponent(calendarId)}/calendarPermissions/${encodeURIComponent(+ permissionId,+ )}`,+ )+ .patch({ role });+ return response;+ },+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/create-event.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/create-event.tsindex 2ecdfff756d..5924e873a3b 100644--- a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/create-event.ts+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/create-event.ts@@ -1,24 +1,23 @@import { createAction, Property } from '@activepieces/pieces-framework';-import {- AuthenticationType,- httpClient,- HttpMethod,- HttpRequest,-} from '@activepieces/pieces-common';-import { outlookCalendarAuth } from '../..';-import { outlookCalendarCommon } from '../common/common';+import { outlookCalendarAuth } from '../auth';+import { outlookCalendarClient } from '../common/client';+import { outlookCalendarProps } from '../common/props';import dayjs from 'dayjs';+import type { Event } from '../common/types';+import { outlookCalendarCreatedEventOutputSchema } from '../output-schemas';+export const createEventAction = createAction({auth: outlookCalendarAuth,name: 'create_event',+ outputSchema: outlookCalendarCreatedEventOutputSchema,classification: 'WRITE',description: 'Create a new event in a calendar',- audience: 'both',+ audience: 'human',aiMetadata: { description: 'Creates a new calendar event in a specified Microsoft Outlook calendar with a title, start time, and optional end time (defaults to 30 minutes after start), timezone, and location. Use to schedule a meeting or appointment. Not idempotent: each call adds a new event, so repeated calls create duplicates.', idempotent: false },displayName: 'Create a new event in a calendar',props: {- calendarId: outlookCalendarCommon.calendarDropdown,+ calendarId: outlookCalendarProps.calendarId({ required: true }),title: Property.ShortText({displayName: 'Title of the event',required: true,@@ -32,7 +31,7 @@ export const createEventAction = createAction({description: "By default it'll be 30 min post start time",required: false,}),- timezone: outlookCalendarCommon.timezoneDropdown,+ timezone: outlookCalendarProps.timezone({ required: true }),location: Property.ShortText({displayName: 'Location',required: false,@@ -44,12 +43,11 @@ export const createEventAction = createAction({? propsValue.end: dayjs(startDateTime).add(30, 'm');const endDateTime = dayjs(endTime).format('YYYY-MM-DDTHH:mm:ss');- const cloud = (auth as unknown as { props?: Record<string, unknown> }).props?.['cloud'] as string | undefined;- const request: HttpRequest = {- method: HttpMethod.POST,- url: `${outlookCalendarCommon.getBaseUrl(cloud)}/calendars/${propsValue.calendarId}/events`,- body: {+ const response: Event = await outlookCalendarClient+ .create({ auth })+ .api(`/me/calendars/${propsValue.calendarId}/events`)+ .post({subject: propsValue.title,body: {},start: {@@ -63,15 +61,7 @@ export const createEventAction = createAction({location: {displayName: propsValue.location,},- },- authentication: {- type: AuthenticationType.BEARER_TOKEN,- token: auth['access_token'],- },- };-- const response = await httpClient.sendRequest(request);-- return response.body;+ });+ return response;},});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/delete-event.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/delete-event.tsindex 3dfa9c669b3..29f90f9e8db 100644--- a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/delete-event.ts+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/delete-event.ts@@ -1,42 +1,28 @@import { createAction, Property } from '@activepieces/pieces-framework';-import {- AuthenticationType,- httpClient,- HttpMethod,- HttpRequest,-} from '@activepieces/pieces-common';-import { outlookCalendarAuth } from '../..';-import { outlookCalendarCommon } from '../common/common';+import { outlookCalendarAuth } from '../auth';+import { outlookCalendarClient } from '../common/client';+import { outlookCalendarProps } from '../common/props';export const deleteEventAction = createAction({auth: outlookCalendarAuth,name: 'delete_event',classification: 'DESTRUCTIVE',description: 'Delete an event in a calendar',- audience: 'both',+ audience: 'human',aiMetadata: { description: 'Permanently deletes a specific event from a Microsoft Outlook calendar, identified by its calendar and event ID. Use to remove a known meeting or appointment. Requires the exact event ID. Not strictly idempotent: a repeat call for an already-deleted event will error, though no new side effect occurs.', idempotent: false },displayName: 'Delete an event in a calendar',props: {- calendarId: outlookCalendarCommon.calendarDropdown,+ calendarId: outlookCalendarProps.calendarId({ required: true }),eventId: Property.ShortText({displayName: 'Event ID',required: true,}),},async run({ propsValue, auth }) {- const cloud = (auth as unknown as { props?: Record<string, unknown> }).props?.['cloud'] as string | undefined;- const request: HttpRequest = {- method: HttpMethod.DELETE,- url: `${outlookCalendarCommon.getBaseUrl(cloud)}/calendars/${propsValue.calendarId}/events/${propsValue.eventId}`,- body: {},- authentication: {- type: AuthenticationType.BEARER_TOKEN,- token: auth['access_token'],- },- };-- const response = await httpClient.sendRequest(request);-- return response.body;+ const response: unknown = await outlookCalendarClient+ .create({ auth })+ .api(`/me/calendars/${propsValue.calendarId}/events/${propsValue.eventId}`)+ .delete();+ return response;},});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/list-events.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/list-events.tsindex 6e15aa9cac7..f18a7e5750f 100644--- a/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/list-events.ts+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/actions/list-events.ts@@ -1,23 +1,22 @@import { createAction, Property } from '@activepieces/pieces-framework';-import {- AuthenticationType,- httpClient,- HttpMethod,- HttpRequest,-} from '@activepieces/pieces-common';-import { outlookCalendarAuth } from '../..';-import { outlookCalendarCommon } from '../common/common';+import { outlookCalendarAuth } from '../auth';+import { outlookCalendarClient } from '../common/client';+import { outlookCalendarProps } from '../common/props';++import type { Event, OutlookCalendarPage } from '../common/types';+import { outlookCalendarCalendarEventListOutputSchema } from '../output-schemas';export const listEventsAction = createAction({auth: outlookCalendarAuth,name: 'list_events',+ outputSchema: outlookCalendarCalendarEventListOutputSchema,classification: 'SEARCH',description: 'List events in a calendar',- audience: 'both',+ audience: 'human',aiMetadata: { description: 'Retrieves events from a specified Microsoft Outlook calendar. Leave the filter empty to fetch all events, or supply an OData $filter expression to narrow results to matching events. Use to look up or browse existing events. Read-only and idempotent.', idempotent: true },displayName: 'List events in a calendar',props: {- calendarId: outlookCalendarCommon.calendarDropdown,+ calendarId: outlookCalendarProps.calendarId({ required: true }),filter: Property.LongText({displayName: 'Filter',required: false,@@ -30,20 +29,14 @@ export const listEventsAction = createAction({if (propsValue.filter) queryParams['$filter'] = propsValue.filter;- const cloud = (auth as unknown as { props?: Record<string, unknown> }).props?.['cloud'] as string | undefined;- const request: HttpRequest = {- method: HttpMethod.GET,- url: `${outlookCalendarCommon.getBaseUrl(cloud)}/calendars/${propsValue.calendarId}/events`,- queryParams,- body: {},- authentication: {- type: AuthenticationType.BEARER_TOKEN,- token: auth['access_token'],- },- };-- const response = await httpClient.sendRequest(request);-- return response.body;+ const response: OutlookCalendarPage<Event> = await outlookCalendarClient+ .list({+ auth,+ path: `/me/calendars/${propsValue.calendarId}/events`,+ query: queryParams,+ pageUrl: undefined,+ })+ .get();+ return response;},});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/auth.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/auth.tsnew file mode 100644index 00000000000..066291f162a--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/auth.ts@@ -0,0 +1,34 @@+import { PieceAuth, Property } from '@activepieces/pieces-framework';++const authDesc = `+If you’d like to use your own custom Azure app instead of the default app, follow the [Azure app creation guide](https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app#register-an-application),+ set the **Redirect URI** to {{redirectUrl}} and add the following **Microsoft Graph (Delegated) permissions** under **API permissions**:+ - User.Read+ - Calendars.ReadWrite+ - offline_access`;++const microsoftCloudProperty = Property.StaticDropdown({+ displayName: 'Cloud Environment',+ description: 'Select your Microsoft cloud environment.',+ required: true,+ defaultValue: 'login.microsoftonline.com',+ options: {+ disabled: false,+ options: [+ { label: 'Commercial (Global)', value: 'login.microsoftonline.com' },+ { label: 'US Government (GCC High)', value: 'login.microsoftonline.us' },+ ],+ },+});++export const outlookCalendarAuth = PieceAuth.OAuth2({+ description: authDesc,+ props: {+ cloud: microsoftCloudProperty,+ },+ authUrl: 'https://{cloud}/common/oauth2/v2.0/authorize',+ tokenUrl: 'https://{cloud}/common/oauth2/v2.0/token',+ required: true,+ scope: ['User.Read', 'Calendars.ReadWrite', 'offline_access', 'openid', 'email', 'profile'],+ prompt: 'omit',+});diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/common/ai-props.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/common/ai-props.tsnew file mode 100644index 00000000000..88bf01e0ad2--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/common/ai-props.ts@@ -0,0 +1,184 @@+import { Property } from '@activepieces/pieces-framework';++import { outlookCalendarUtils } from './utils';++import type { PropParams } from './props';++function calendarId<R extends boolean>({+ required,+ displayName = 'Calendar ID',+ description = 'Calendar ID, from List Calendars or List Calendars in Group.',+}: PropParams<R>) {+ return Property.ShortText({ displayName, description, required });+}++function calendarGroupId<R extends boolean>({+ required,+ displayName = 'Calendar Group ID',+ description = 'Calendar group ID, from List Calendar Groups.',+}: PropParams<R>) {+ return Property.ShortText({ displayName, description, required });+}++function eventId<R extends boolean>({+ required,+ displayName = 'Event ID',+ description = 'Event ID, from List Events, Get Calendar View or Create Event.',+}: PropParams<R>) {+ return Property.ShortText({ displayName, description, required });+}++function limit<R extends boolean>({+ required,+ displayName = 'Limit',+ description = 'Maximum number of items to return in this page (1-1000). Defaults to 50.',+}: PropParams<R>) {+ return Property.Number({ displayName, description, required });+}++function pageUrl<R extends boolean>({+ required,+ displayName = 'Page URL',+ description = 'The @odata.nextLink from a previous call of this action, to fetch the next page. When set, the other filters are ignored because the link already carries them.',+}: PropParams<R>) {+ return Property.ShortText({ displayName, description, required });+}++function timeZone<R extends boolean>({+ required,+ displayName = 'Output Time Zone',+ description = 'Time zone for the start and end times in the response, e.g. "Pacific Standard Time" or "Europe/London" (see Get Supported Time Zones). Defaults to UTC.',+}: PropParams<R>) {+ return Property.ShortText({ displayName, description, required });+}++function attachmentId<R extends boolean>({+ required,+ displayName = 'Attachment ID',+ description = 'Attachment ID, from List Event Attachments or Add Event Attachment.',+}: PropParams<R>) {+ return Property.ShortText({ displayName, description, required });+}++function extensionId<R extends boolean>({+ required,+ displayName = 'Extension Name or ID',+ description = 'The extensionName (e.g. "Com.Contoso.Referral") or the extension ID, from Create Event Extension.',+}: PropParams<R>) {+ return Property.ShortText({ displayName, description, required });+}++function permissionId<R extends boolean>({+ required,+ displayName = 'Permission ID',+ description = 'Calendar permission ID, from List Calendar Permissions.',+}: PropParams<R>) {+ return Property.ShortText({ displayName, description, required });+}++function calendarColor<R extends boolean>({+ required,+ displayName = 'Color',+ description = 'Color theme that distinguishes the calendar in Outlook.',+}: PropParams<R>) {+ return Property.StaticDropdown({+ displayName,+ description,+ required,+ options: { disabled: false, options: CALENDAR_COLORS },+ });+}++function calendarRole<R extends boolean>({+ required,+ displayName = 'Role',+ description = `Permission level. One of: ${outlookCalendarUtils.calendarRoles().join(', ')}.`,+}: PropParams<R>) {+ return Property.StaticDropdown({+ displayName,+ description,+ required,+ options: {+ disabled: false,+ options: outlookCalendarUtils.calendarRoles().map((value) => ({+ label: value,+ value,+ })),+ },+ });+}++function sendResponse<R extends boolean>({+ required,+ displayName = 'Send Response',+ description = 'Whether to send the response to the organizer. Defaults to true. Must stay true when proposing a new time.',+}: PropParams<R>) {+ return Property.StaticDropdown({+ displayName,+ description,+ required,+ options: {+ disabled: false,+ options: [+ { label: 'Yes', value: 'true' },+ { label: 'No', value: 'false' },+ ],+ },+ });+}++function proposedStart<R extends boolean>({+ required,+ displayName = 'Proposed New Start',+ description = 'Start of the alternative time to propose, ISO 8601 without offset, e.g. "2026-11-03T15:00:00". Requires Proposed New End.',+}: PropParams<R>) {+ return Property.ShortText({ displayName, description, required });+}++function proposedEnd<R extends boolean>({+ required,+ displayName = 'Proposed New End',+ description = 'End of the alternative time to propose, ISO 8601 without offset, e.g. "2026-11-03T16:00:00". Requires Proposed New Start.',+}: PropParams<R>) {+ return Property.ShortText({ displayName, description, required });+}++function proposedTimeZone<R extends boolean>({+ required,+ displayName = 'Proposed Time Zone',+ description = 'Time zone of the proposed start and end, IANA or Windows name (see Get Supported Time Zones). Defaults to UTC.',+}: PropParams<R>) {+ return Property.ShortText({ displayName, description, required });+}++export const outlookCalendarAiProps = {+ calendarId,+ calendarGroupId,+ eventId,+ limit,+ pageUrl,+ timeZone,+ attachmentId,+ extensionId,+ permissionId,+ calendarColor,+ calendarRole,+ sendResponse,+ proposedStart,+ proposedEnd,+ proposedTimeZone,+};++const CALENDAR_COLORS = [+ { label: 'Auto', value: 'auto' },+ { label: 'Light Blue', value: 'lightBlue' },+ { label: 'Light Green', value: 'lightGreen' },+ { label: 'Light Orange', value: 'lightOrange' },+ { label: 'Light Gray', value: 'lightGray' },+ { label: 'Light Yellow', value: 'lightYellow' },+ { label: 'Light Teal', value: 'lightTeal' },+ { label: 'Light Pink', value: 'lightPink' },+ { label: 'Light Brown', value: 'lightBrown' },+ { label: 'Light Red', value: 'lightRed' },+ { label: 'Max Color', value: 'maxColor' },+];diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/common/client.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/common/client.tsnew file mode 100644index 00000000000..f7fb5fc437c--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/common/client.ts@@ -0,0 +1,60 @@+import { Client, GraphRequest } from '@microsoft/microsoft-graph-client';++import { QueryParams } from '@activepieces/pieces-common';++import type { OutlookCalendarAuthValue } from './types';++function graphUrl({ auth }: { auth: OutlookCalendarAuthValue }): string {+ const host = auth.props?.cloud ?? COMMERCIAL_LOGIN_HOST;+ return GRAPH_BASE_URLS[host] ?? GRAPH_BASE_URLS[COMMERCIAL_LOGIN_HOST];+}++function baseUrl({ auth }: { auth: OutlookCalendarAuthValue }): string {+ return `${graphUrl({ auth })}/v1.0/me`;+}++function create({ auth }: { auth: OutlookCalendarAuthValue }): Client {+ return Client.initWithMiddleware({+ authProvider: {+ getAccessToken: () => Promise.resolve(auth.access_token),+ },+ baseUrl: graphUrl({ auth }),+ });+}++function list({+ auth,+ path,+ query,+ pageUrl,+}: {+ auth: OutlookCalendarAuthValue;+ path: string;+ query?: QueryParams;+ pageUrl: string | undefined;+}): GraphRequest {+ if (!pageUrl) {+ return create({ auth })+ .api(path)+ .query(+ Object.fromEntries(+ Object.entries(query ?? {}).map(([key, value]) => [key, encodeURIComponent(value)]),+ ),+ );+ }+ if (!pageUrl.startsWith(`${graphUrl({ auth })}/v1.0/`)) {+ throw new Error(+ 'Page URL must be the @odata.nextLink or @odata.deltaLink returned by a previous call of this action.',+ );+ }+ return create({ auth }).api(pageUrl);+}++export const outlookCalendarClient = { baseUrl, create, list };++const COMMERCIAL_LOGIN_HOST = 'login.microsoftonline.com';++const GRAPH_BASE_URLS: Record<string, string> = {+ [COMMERCIAL_LOGIN_HOST]: 'https://graph.microsoft.com',+ 'login.microsoftonline.us': 'https://graph.microsoft.us',+};diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/common/common.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/common/common.tsdeleted file mode 100644index 1b118bcd7be..00000000000--- a/packages/pieces/community/microsoft-outlook-calendar/src/lib/common/common.ts+++ /dev/null@@ -1,90 +0,0 @@-import { OAuth2PropertyValue, Property } from '@activepieces/pieces-framework';-import {- AuthenticationType,- httpClient,- HttpMethod,-} from '@activepieces/pieces-common';-import { getGraphBaseUrl } from './microsoft-cloud';-import { outlookCalendarAuth } from '../..';--export const outlookCalendarCommon = {- getBaseUrl: (cloud?: string | null) => getGraphBaseUrl(cloud) + '/v1.0/me',- calendarDropdown: Property.Dropdown({- displayName: 'Calendar',- required: true,- auth: outlookCalendarAuth,- options: async ({ auth }) => {- if (!auth) {- return {- disabled: true,- options: [],- placeholder: 'Please authenticate first',- };- }- const authProp: OAuth2PropertyValue = auth as OAuth2PropertyValue;- const cloud = authProp.props?.['cloud'] as string | undefined;- const calendars: { id: string; name: string }[] = (- await httpClient.sendRequest<{ value: { id: string; name: string }[] }>(- {- method: HttpMethod.GET,- url: `${outlookCalendarCommon.getBaseUrl(cloud)}/calendars`,- authentication: {- type: AuthenticationType.BEARER_TOKEN,- token: authProp['access_token'],- },- }- )- ).body.value;- return {- disabled: false,- options: calendars.map((calendar: { id: string; name: string }) => {- return {- label: calendar.name,- value: calendar.id,- };- }),- };- },- refreshers: [],- }),- timezoneDropdown: Property.Dropdown({- displayName: 'Timezone',- required: true,- auth: outlookCalendarAuth,- options: async ({ auth }) => {- if (!auth) {- return {- disabled: true,- options: [],- placeholder: 'Please authenticate first',- };- }- const authProp: OAuth2PropertyValue = auth as OAuth2PropertyValue;- const cloud = authProp.props?.['cloud'] as string | undefined;- const timezones: { displayName: string; alias: string }[] = (- await httpClient.sendRequest<{- value: { displayName: string; alias: string }[];- }>({- method: HttpMethod.GET,- url: `${outlookCalendarCommon.getBaseUrl(cloud)}/outlook/supportedTimeZones`,- authentication: {- type: AuthenticationType.BEARER_TOKEN,- token: authProp['access_token'],- },- })- ).body.value;- return {- disabled: false,- options: timezones.map(- (timezone: { displayName: string; alias: string }) => {- return {- label: timezone.displayName,- value: timezone.alias,- };- }- ),- };- },- refreshers: [],- }),-};diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/common/microsoft-cloud.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/common/microsoft-cloud.tsdeleted file mode 100644index 065a7056060..00000000000--- a/packages/pieces/community/microsoft-outlook-calendar/src/lib/common/microsoft-cloud.ts+++ /dev/null@@ -1,36 +0,0 @@-import { OAuth2PropertyValue, Property } from '@activepieces/pieces-framework';--const COMMERCIAL_LOGIN_HOST = 'login.microsoftonline.com';-const GOV_LOGIN_HOST = 'login.microsoftonline.us';--const GRAPH_BASE_URLS: Record<string, string> = {- [COMMERCIAL_LOGIN_HOST]: 'https://graph.microsoft.com',- [GOV_LOGIN_HOST]: 'https://graph.microsoft.us',-};--export const microsoftCloudProperty = Property.StaticDropdown({- displayName: 'Cloud Environment',- description: 'Select your Microsoft cloud environment.',- required: true,- defaultValue: COMMERCIAL_LOGIN_HOST,- options: {- disabled: false,- options: [- { label: 'Commercial (Global)', value: COMMERCIAL_LOGIN_HOST },- { label: 'US Government (GCC High)', value: GOV_LOGIN_HOST },- ],- },-});--function resolveCloudHost(cloudLoginHost: string | undefined | null): string {- return cloudLoginHost ?? COMMERCIAL_LOGIN_HOST;-}--export function getMicrosoftCloudFromAuth(auth: OAuth2PropertyValue): string {- return resolveCloudHost(auth.props?.['cloud'] as string | undefined);-}--export function getGraphBaseUrl(cloudLoginHost: string | undefined | null): string {- const host = resolveCloudHost(cloudLoginHost);- return GRAPH_BASE_URLS[host] ?? GRAPH_BASE_URLS[COMMERCIAL_LOGIN_HOST];-}diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/common/props.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/common/props.tsnew file mode 100644index 00000000000..76071c5e661--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/common/props.ts@@ -0,0 +1,78 @@+import { DropdownState, Property } from '@activepieces/pieces-framework';++import { outlookCalendarAuth } from '../auth';+import { outlookCalendarClient } from './client';++import type { Calendar, OutlookCalendarPage, TimeZoneInformation } from './types';++function calendarId<R extends boolean>({+ required,+ displayName = 'Calendar',+ description,+}: PropParams<R>) {+ return Property.Dropdown({+ displayName,+ description,+ required,+ auth: outlookCalendarAuth,+ refreshers: [],+ options: async ({ auth }) => {+ if (!auth) {+ return disabledOptions({ placeholder: 'Please authenticate first' });+ }+ const response: OutlookCalendarPage<Calendar> = await outlookCalendarClient+ .create({ auth })+ .api('/me/calendars')+ .get();+ return {+ disabled: false,+ options: response.value.map((calendar) => ({+ label: calendar.name ?? '',+ value: calendar.id ?? '',+ })),+ };+ },+ });+}++function timezone<R extends boolean>({+ required,+ displayName = 'Timezone',+ description,+}: PropParams<R>) {+ return Property.Dropdown({+ displayName,+ description,+ required,+ auth: outlookCalendarAuth,+ refreshers: [],+ options: async ({ auth }) => {+ if (!auth) {+ return disabledOptions({ placeholder: 'Please authenticate first' });+ }+ const response: OutlookCalendarPage<TimeZoneInformation> = await outlookCalendarClient+ .create({ auth })+ .api('/me/outlook/supportedTimeZones')+ .get();+ return {+ disabled: false,+ options: response.value.map((tz) => ({+ label: tz.displayName ?? '',+ value: tz.alias ?? '',+ })),+ };+ },+ });+}++function disabledOptions({ placeholder }: { placeholder: string }): DropdownState<never> {+ return { disabled: true, options: [], placeholder };+}++export const outlookCalendarProps = { calendarId, timezone };++export type PropParams<R extends boolean> = {+ required: R;+ displayName?: string;+ description?: string;+};diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/common/types.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/common/types.tsnew file mode 100644index 00000000000..8f1453aa2bd--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/common/types.ts@@ -0,0 +1,29 @@+import type { AppConnectionType } from '@activepieces/pieces-framework';++export type {+ Attachment,+ Calendar,+ CalendarGroup,+ CalendarPermission,+ CalendarRoleType,+ Event,+ Extension,+ Reminder,+ ScheduleInformation,+ TimeZoneInformation,+} from '@microsoft/microsoft-graph-types';++export type OutlookCalendarAuthValue = {+ type:+ | AppConnectionType.OAUTH2+ | AppConnectionType.CLOUD_OAUTH2+ | AppConnectionType.PLATFORM_OAUTH2;+ access_token: string;+ props?: { cloud?: string | null };+};++export type OutlookCalendarPage<T> = {+ value: T[];+ '@odata.nextLink'?: string;+ '@odata.deltaLink'?: string;+};diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/common/utils.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/common/utils.tsnew file mode 100644index 00000000000..c07eeebab7f--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/common/utils.ts@@ -0,0 +1,128 @@+function top({ limit }: { limit: number | undefined }): string {+ const value = limit ?? DEFAULT_LIMIT;+ if (!Number.isInteger(value) || value < 1) {+ throw new Error('Limit must be a whole number of at least 1.');+ }+ return String(Math.min(value, MAX_LIMIT));+}++function preferTimeZone({ timeZone }: { timeZone: string | undefined }): Record<string, string> {+ return timeZone ? { Prefer: `outlook.timezone="${timeZone}"` } : {};+}++function eventOptions(): typeof EVENT_OPTIONS {+ return EVENT_OPTIONS;+}++function toAttendees({ items }: { items: unknown[] }) {+ return items.map((item) => {+ if (+ typeof item !== 'object' ||+ item === null ||+ !('email' in item) ||+ typeof item.email !== 'string' ||+ item.email === ''+ ) {+ throw new Error('Each attendee needs an email.');+ }+ const name = 'name' in item && typeof item.name === 'string' ? item.name : '';+ const type = 'type' in item && typeof item.type === 'string' ? item.type : '';+ return {+ emailAddress: { address: item.email, ...(name ? { name } : {}) },+ type: type || 'required',+ };+ });+}++function calendarRoles(): string[] {+ return CALENDAR_ROLES;+}++function assertCalendarRole({ role }: { role: string }): void {+ if (!CALENDAR_ROLES.includes(role)) {+ throw new Error(`Role must be one of: ${CALENDAR_ROLES.join(', ')}.`);+ }+}++function proposedNewTime({+ start,+ end,+ timeZone,+}: {+ start: string | undefined;+ end: string | undefined;+ timeZone: string | undefined;+}): Record<string, unknown> {+ if ((start === undefined) !== (end === undefined)) {+ throw new Error('Proposed New Start and Proposed New End must be set together.');+ }+ if (start === undefined || end === undefined) {+ return {};+ }+ const zone = timeZone ?? 'UTC';+ return {+ proposedNewTime: {+ start: { dateTime: start, timeZone: zone },+ end: { dateTime: end, timeZone: zone },+ },+ };+}++export const outlookCalendarUtils = {+ top,+ preferTimeZone,+ assertCalendarRole,+ proposedNewTime,+ calendarRoles,+ eventOptions,+ toAttendees,+};++const DEFAULT_LIMIT = 50;+const MAX_LIMIT = 1000;++const CALENDAR_ROLES = [+ 'none',+ 'freeBusyRead',+ 'limitedRead',+ 'read',+ 'write',+ 'delegateWithoutPrivateEventAccess',+ 'delegateWithPrivateEventAccess',+ 'custom',+];++const EVENT_OPTIONS = {+ boolean: [+ { label: 'Yes', value: 'true' },+ { label: 'No', value: 'false' },+ ],+ bodyType: [+ { label: 'Text', value: 'text' },+ { label: 'HTML', value: 'html' },+ ],+ attendeeType: [+ { label: 'Required', value: 'required' },+ { label: 'Optional', value: 'optional' },+ { label: 'Resource', value: 'resource' },+ ],+ showAs: [+ { label: 'Free', value: 'free' },+ { label: 'Tentative', value: 'tentative' },+ { label: 'Busy', value: 'busy' },+ { label: 'Out of Office', value: 'oof' },+ { label: 'Working Elsewhere', value: 'workingElsewhere' },+ { label: 'Unknown', value: 'unknown' },+ ],+ importance: [+ { label: 'Low', value: 'low' },+ { label: 'Normal', value: 'normal' },+ { label: 'High', value: 'high' },+ ],+ sensitivity: [+ { label: 'Normal', value: 'normal' },+ { label: 'Personal', value: 'personal' },+ { label: 'Private', value: 'private' },+ { label: 'Confidential', value: 'confidential' },+ ],+};diff --git a/packages/pieces/community/microsoft-outlook-calendar/src/lib/output-schemas.ts b/packages/pieces/community/microsoft-outlook-calendar/src/lib/output-schemas.tsnew file mode 100644index 00000000000..10c16e2d101--- /dev/null+++ b/packages/pieces/community/microsoft-outlook-calendar/src/lib/output-schemas.ts@@ -0,0 +1,335 @@+import { OutputSchema } from '@activepieces/pieces-framework';++const emailAddressFields: OutputSchema['fields'] = [+ { key: 'name', label: 'Name' },+ { key: 'address', label: 'Email', format: 'email' },+];++const dateTimeZoneFields: OutputSchema['fields'] = [+ { key: 'dateTime', label: 'Date and Time', format: 'datetime' },+ { key: 'timeZone', label: 'Time Zone' },+];++const locationFields: OutputSchema['fields'] = [+ { key: 'displayName', label: 'Name' },+ { key: 'locationType', label: 'Location Type' },+ { key: 'address', label: 'Address' },+ { key: 'coordinates', label: 'Coordinates' },+];++const eventLocationFields: OutputSchema['fields'] = [+ ...locationFields,+ { key: 'uniqueId', label: 'Unique ID' },+ { key: 'uniqueIdType', label: 'Unique ID Type' },+];++const responseStatusFields: OutputSchema['fields'] = [+ { key: 'response', label: 'Response' },+ { key: 'time', label: 'Responded At', format: 'datetime' },+];++const eventFields: OutputSchema['fields'] = [+ { key: 'id', label: 'Event ID' },+ { key: 'subject', label: 'Subject' },+ { key: 'bodyPreview', label: 'Body Preview' },+ {+ key: 'body',+ label: 'Body',+ children: [+ { key: 'contentType', label: 'Content Type' },+ { key: 'content', label: 'Content', format: 'html' },+ ],+ },+ { key: 'start', label: 'Start', children: dateTimeZoneFields },+ { key: 'end', label: 'End', children: dateTimeZoneFields },+ { key: 'isAllDay', label: 'All Day', format: 'boolean' },+ { key: 'originalStartTimeZone', label: 'Original Start Time Zone' },+ { key: 'originalEndTimeZone', label: 'Original End Time Zone' },+ { key: 'location', label: 'Location', children: locationFields },+ { key: 'locations', label: 'Locations', labelKey: 'displayName', listItems: eventLocationFields },+ {+ key: 'organizer',+ label: 'Organizer',+ children: [{ key: 'emailAddress', label: 'Email Address', children: emailAddressFields }],+ },+ {+ key: 'attendees',+ label: 'Attendees',+ listItems: [+ { key: 'type', label: 'Type' },+ { key: 'status', label: 'Status', children: responseStatusFields },+ { key: 'emailAddress', label: 'Email Address', children: emailAddressFields },+ ],+ },+ { key: 'responseStatus', label: 'My Response', children: responseStatusFields },+ { key: 'responseRequested', label: 'Response Requested', format: 'boolean' },+ { key: 'isOrganizer', label: 'I Am Organizer', format: 'boolean' },+ { key: 'isCancelled', label: 'Cancelled', format: 'boolean' },+ { key: 'isDraft', label: 'Draft', format: 'boolean' },+ { key: 'type', label: 'Event Type' },+ { key: 'seriesMasterId', label: 'Series Master ID' },+ { key: 'occurrenceId', label: 'Occurrence ID' },+ {+ key: 'recurrence',+ label: 'Recurrence',+ children: [+ {+ key: 'pattern',+ label: 'Pattern',+ children: [+ { key: 'type', label: 'Type' },+ { key: 'interval', label: 'Interval', format: 'number' },+ { key: 'month', label: 'Month', format: 'number' },+ { key: 'dayOfMonth', label: 'Day of Month', format: 'number' },+ { key: 'daysOfWeek', label: 'Days of Week' },+ { key: 'firstDayOfWeek', label: 'First Day of Week' },+ { key: 'index', label: 'Week Index' },+ ],+ },+ {+ key: 'range',+ label: 'Range',+ children: [+ { key: 'type', label: 'Type' },+ { key: 'startDate', label: 'Start Date', format: 'date' },+ { key: 'endDate', label: 'End Date', format: 'date' },+ { key: 'recurrenceTimeZone', label: 'Time Zone' },+ { key: 'numberOfOccurrences', label: 'Number of Occurrences', format: 'number' },+ ],+ },+ ],+ },+ { key: 'categories', label: 'Categories' },+ { key: 'importance', label: 'Importance' },+ { key: 'sensitivity', label: 'Sensitivity' },+ { key: 'showAs', label: 'Show As' },+ { key: 'isReminderOn', label: 'Reminder On', format: 'boolean' },+ { key: 'reminderMinutesBeforeStart', label: 'Reminder Minutes Before Start', format: 'number' },+ { key: 'hasAttachments', label: 'Has Attachments', format: 'boolean' },+ { key: 'allowNewTimeProposals', label: 'Allows New Time Proposals', format: 'boolean' },+ { key: 'hideAttendees', label: 'Attendees Hidden', format: 'boolean' },+ { key: 'isOnlineMeeting', label: 'Online Meeting', format: 'boolean' },+ { key: 'onlineMeetingProvider', label: 'Online Meeting Provider' },+ { key: 'onlineMeetingUrl', label: 'Online Meeting URL', format: 'url' },+ { key: 'onlineMeeting', label: 'Online Meeting Details', children: [{ key: 'joinUrl', label: 'Join URL', format: 'url' }] },+ { key: 'webLink', label: 'Outlook Link', format: 'url' },+ { key: 'iCalUId', label: 'iCalendar UID' },+ { key: 'uid', label: 'UID' },+ { key: 'transactionId', label: 'Transaction ID' },+ { key: 'changeKey', label: 'Change Key' },+ { key: '@odata.etag', label: 'ETag', value: "['@odata.etag']" },+ { key: 'createdDateTime', label: 'Created At', format: 'datetime' },+ { key: 'lastModifiedDateTime', label: 'Last Modified At', format: 'datetime' },+];++const eventFieldsWithoutListDetails: OutputSchema['fields'] = eventFields.map((field) =>+ field.key === 'attendees' || field.key === 'locations' ? { key: field.key, label: field.label } : field,+);++const calendarFields: OutputSchema['fields'] = [+ { key: 'id', label: 'Calendar ID' },+ { key: 'name', label: 'Name' },+ { key: 'color', label: 'Color' },+ { key: 'hexColor', label: 'Hex Color' },+ { key: 'isDefaultCalendar', label: 'Default Calendar', format: 'boolean' },+ { key: 'owner', label: 'Owner', children: emailAddressFields },+ { key: 'canEdit', label: 'Can Edit', format: 'boolean' },+ { key: 'canShare', label: 'Can Share', format: 'boolean' },+ { key: 'canViewPrivateItems', label: 'Can View Private Items', format: 'boolean' },+ { key: 'isRemovable', label: 'Removable', format: 'boolean' },+ { key: 'isTallyingResponses', label: 'Tallies Responses', format: 'boolean' },+ { key: 'allowedOnlineMeetingProviders', label: 'Allowed Online Meeting Providers' },+ { key: 'defaultOnlineMeetingProvider', label: 'Default Online Meeting Provider' },+ { key: 'groupClassId', label: 'Calendar Group Class ID' },+ { key: 'changeKey', label: 'Change Key' },+];++const calendarGroupFields: OutputSchema['fields'] = [+ { key: 'id', label: 'Calendar Group ID' },+ { key: 'name', label: 'Name' },+ { key: 'classId', label: 'Class ID' },+ { key: 'changeKey', label: 'Change Key' },+];++const attachmentFields: OutputSchema['fields'] = [+ { key: 'id', label: 'Attachment ID' },+ { key: 'name', label: 'File Name' },+ { key: 'contentType', label: 'Content Type' },+ { key: 'size', label: 'Size', format: 'filesize' },+ { key: 'isInline', label: 'Inline', format: 'boolean' },+ { key: 'lastModifiedDateTime', label: 'Last Modified At', format: 'datetime' },+];++const permissionFields: OutputSchema['fields'] = [+ { key: 'id', label: 'Permission ID' },+ { key: 'emailAddress', label: 'Shared With', children: emailAddressFields },+ { key: 'role', label: 'Role' },+ { key: 'allowedRoles', label: 'Allowed Roles' },+ { key: 'isInsideOrganization', label: 'Inside Organization', format: 'boolean' },+ { key: 'isRemovable', label: 'Removable', format: 'boolean' },+];++const nextLinkField: OutputSchema['fields'][number] = {+ key: '@odata.nextLink',+ label: 'Next Page URL',+ value: "['@odata.nextLink']",+ format: 'url',+};++export const outlookCalendarSuccessOutputSchema: OutputSchema = {+ fields: [{ key: 'success', label: 'Success', format: 'boolean' }],+};++export const outlookCalendarEventOutputSchema: OutputSchema = {+ fields: eventFields,+};++export const outlookCalendarCreatedEventOutputSchema: OutputSchema = {+ fields: eventFieldsWithoutListDetails,+};++export const outlookCalendarEventListOutputSchema: OutputSchema = {+ fields: [{ key: 'value', label: 'Events', labelKey: 'subject', listItems: eventFields }, nextLinkField],+};++export const outlookCalendarCalendarEventListOutputSchema: OutputSchema = {+ fields: [{ key: 'value', label: 'Events', labelKey: 'subject', listItems: eventFields }],+};++export const outlookCalendarEventInstanceListOutputSchema: OutputSchema = {+ fields: [+ { key: 'value', label: 'Occurrences', labelKey: 'subject', listItems: eventFieldsWithoutListDetails },+ nextLinkField,+ ],+};++export const outlookCalendarEventDeltaOutputSchema: OutputSchema = {+ fields: [+ {+ key: 'value',+ label: 'Changed Events',+ labelKey: 'subject',+ listItems: [+ ...eventFieldsWithoutListDetails,+ {+ key: '@removed',+ label: 'Removed',+ value: "['@removed']",+ children: [{ key: 'reason', label: 'Removal Reason' }],+ },+ ],+ },+ nextLinkField,+ { key: '@odata.deltaLink', label: 'Delta URL', value: "['@odata.deltaLink']", format: 'url' },+ ],+};++export const outlookCalendarCalendarOutputSchema: OutputSchema = {+ fields: calendarFields,+};++export const outlookCalendarCalendarListOutputSchema: OutputSchema = {+ fields: [{ key: 'value', label: 'Calendars', labelKey: 'name', listItems: calendarFields }, nextLinkField],+};++export const outlookCalendarCalendarGroupOutputSchema: OutputSchema = {+ fields: calendarGroupFields,+};++export const outlookCalendarCalendarGroupListOutputSchema: OutputSchema = {+ fields: [+ { key: 'value', label: 'Calendar Groups', labelKey: 'name', listItems: calendarGroupFields },+ nextLinkField,+ ],+};++export const outlookCalendarAttachmentOutputSchema: OutputSchema = {+ fields: [+ ...attachmentFields,+ { key: 'contentBytes', label: 'Content (Base64)' },+ { key: 'contentId', label: 'Content ID' },+ { key: 'contentLocation', label: 'Content Location' },+ ],+};++export const outlookCalendarAttachmentListOutputSchema: OutputSchema = {+ fields: [{ key: 'value', label: 'Attachments', labelKey: 'name', listItems: attachmentFields }],+};++export const outlookCalendarExtensionOutputSchema: OutputSchema = {+ fields: [+ { key: 'id', label: 'Extension ID' },+ { key: 'extensionName', label: 'Extension Name' },+ ],+};++export const outlookCalendarReminderListOutputSchema: OutputSchema = {+ fields: [+ {+ key: 'value',+ label: 'Reminders',+ labelKey: 'eventSubject',+ listItems: [+ { key: 'eventId', label: 'Event ID' },+ { key: 'eventSubject', label: 'Event Subject' },+ { key: 'eventStartTime', label: 'Event Start', children: dateTimeZoneFields },+ { key: 'eventEndTime', label: 'Event End', children: dateTimeZoneFields },+ { key: 'eventLocation', label: 'Event Location', children: locationFields },+ { key: 'reminderFireTime', label: 'Reminder Time', children: dateTimeZoneFields },+ { key: 'eventWebLink', label: 'Event Outlook Link', format: 'url' },+ { key: 'changeKey', label: 'Change Key' },+ ],+ },+ ],+};++export const outlookCalendarPermissionOutputSchema: OutputSchema = {+ fields: permissionFields,+};++export const outlookCalendarPermissionListOutputSchema: OutputSchema = {+ fields: [{ key: 'value', label: 'Permissions' }],+};++export const outlookCalendarAllowedRolesOutputSchema: OutputSchema = {+ fields: [{ key: 'value', label: 'Allowed Roles' }],+};++export const outlookCalendarScheduleOutputSchema: OutputSchema = {+ fields: [+ {+ key: 'value',+ label: 'Schedules',+ labelKey: 'scheduleId',+ listItems: [+ { key: 'scheduleId', label: 'Email', format: 'email' },+ { key: 'availabilityView', label: 'Availability View' },+ { key: 'scheduleItems', label: 'Busy Items' },+ {+ key: 'workingHours',+ label: 'Working Hours',+ children: [+ { key: 'daysOfWeek', label: 'Days of Week' },+ { key: 'startTime', label: 'Start Time' },+ { key: 'endTime', label: 'End Time' },+ { key: 'timeZone', label: 'Time Zone', children: [{ key: 'name', label: 'Name' }] },+ ],+ },+ ],+ },+ ],+};++export const outlookCalendarTimeZoneListOutputSchema: OutputSchema = {+ fields: [+ {+ key: 'value',+ label: 'Time Zones',+ labelKey: 'displayName',+ listItems: [+ { key: 'alias', label: 'Time Zone ID' },+ { key: 'displayName', label: 'Display Name' },+ ],+ },+ ],+};