@automate.ax/integration-contracts 0.55.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/dist/airtable/api.d.ts +19 -0
  2. package/dist/airtable/api.js +44 -0
  3. package/dist/airtable/index.d.ts +353 -0
  4. package/dist/airtable/index.js +32 -0
  5. package/dist/airtable/schemas.d.ts +716 -0
  6. package/dist/airtable/schemas.js +184 -0
  7. package/dist/asana/api.d.ts +70 -0
  8. package/dist/asana/api.js +119 -0
  9. package/dist/asana/index.d.ts +384 -0
  10. package/dist/asana/index.js +38 -0
  11. package/dist/asana/schemas.d.ts +1060 -0
  12. package/dist/asana/schemas.js +512 -0
  13. package/dist/brevo/api.d.ts +31 -0
  14. package/dist/brevo/api.js +64 -0
  15. package/dist/brevo/index.d.ts +822 -0
  16. package/dist/brevo/index.js +51 -0
  17. package/dist/brevo/schemas.d.ts +1217 -0
  18. package/dist/brevo/schemas.js +332 -0
  19. package/dist/github/index.d.ts +37 -0
  20. package/dist/github/index.js +106 -0
  21. package/dist/github/schemas.d.ts +8014 -0
  22. package/dist/github/schemas.js +113 -0
  23. package/dist/gmail/gmail.d.ts +172 -0
  24. package/dist/gmail/gmail.js +405 -0
  25. package/dist/gmail/index.d.ts +262 -0
  26. package/dist/gmail/index.js +23 -0
  27. package/dist/gmail/schemas.d.ts +444 -0
  28. package/dist/gmail/schemas.js +242 -0
  29. package/dist/google-calendar/event-schemas.d.ts +117 -0
  30. package/dist/google-calendar/event-schemas.js +13 -0
  31. package/dist/google-calendar/google-calendar.d.ts +147 -0
  32. package/dist/google-calendar/google-calendar.js +583 -0
  33. package/dist/google-calendar/index.d.ts +365 -0
  34. package/dist/google-calendar/index.js +24 -0
  35. package/dist/google-calendar/schemas.d.ts +592 -0
  36. package/dist/google-calendar/schemas.js +379 -0
  37. package/dist/google-forms/event-schemas.d.ts +105 -0
  38. package/dist/google-forms/event-schemas.js +20 -0
  39. package/dist/google-forms/google-forms.d.ts +243 -0
  40. package/dist/google-forms/google-forms.js +581 -0
  41. package/dist/google-forms/index.d.ts +141 -0
  42. package/dist/google-forms/index.js +20 -0
  43. package/dist/google-forms/schemas.d.ts +618 -0
  44. package/dist/google-forms/schemas.js +383 -0
  45. package/dist/linear/api.d.ts +63 -0
  46. package/dist/linear/api.js +88 -0
  47. package/dist/linear/index.d.ts +1338 -0
  48. package/dist/linear/index.js +55 -0
  49. package/dist/linear/schemas.d.ts +1795 -0
  50. package/dist/linear/schemas.js +760 -0
  51. package/dist/outlook/graph.d.ts +34 -0
  52. package/dist/outlook/graph.js +98 -0
  53. package/dist/outlook/index.d.ts +115 -0
  54. package/dist/outlook/index.js +11 -0
  55. package/dist/outlook/schemas.d.ts +529 -0
  56. package/dist/outlook/schemas.js +312 -0
  57. package/dist/resend/index.d.ts +707 -0
  58. package/dist/resend/index.js +54 -0
  59. package/dist/resend/schemas.d.ts +1033 -0
  60. package/dist/resend/schemas.js +377 -0
  61. package/dist/slack/index.d.ts +151 -0
  62. package/dist/slack/index.js +22 -0
  63. package/dist/slack/schemas.d.ts +641 -0
  64. package/dist/slack/schemas.js +581 -0
  65. package/dist/teams/graph.d.ts +33 -0
  66. package/dist/teams/graph.js +95 -0
  67. package/dist/teams/index.d.ts +164 -0
  68. package/dist/teams/index.js +21 -0
  69. package/dist/teams/schemas.d.ts +675 -0
  70. package/dist/teams/schemas.js +365 -0
  71. package/dist/trello/api.d.ts +69 -0
  72. package/dist/trello/api.js +140 -0
  73. package/dist/trello/event-schemas.d.ts +1101 -0
  74. package/dist/trello/event-schemas.js +233 -0
  75. package/dist/trello/index.d.ts +721 -0
  76. package/dist/trello/index.js +35 -0
  77. package/dist/trello/schemas.d.ts +283 -0
  78. package/dist/trello/schemas.js +401 -0
  79. package/dist/triggers.d.ts +26 -0
  80. package/dist/triggers.js +33 -0
  81. package/dist/vercel/index.d.ts +1065 -0
  82. package/dist/vercel/index.js +114 -0
  83. package/dist/vercel/schemas.d.ts +1518 -0
  84. package/dist/vercel/schemas.js +335 -0
  85. package/dist/whatsapp/api.d.ts +62 -0
  86. package/dist/whatsapp/api.js +121 -0
  87. package/dist/whatsapp/index.d.ts +614 -0
  88. package/dist/whatsapp/index.js +35 -0
  89. package/dist/whatsapp/schemas.d.ts +926 -0
  90. package/dist/whatsapp/schemas.js +326 -0
  91. package/package.json +169 -0
  92. package/src/airtable/api.ts +66 -0
  93. package/src/airtable/index.ts +41 -0
  94. package/src/airtable/schemas.ts +231 -0
  95. package/src/asana/api.ts +171 -0
  96. package/src/asana/index.ts +49 -0
  97. package/src/asana/schemas.ts +655 -0
  98. package/src/brevo/api.ts +89 -0
  99. package/src/brevo/index.ts +66 -0
  100. package/src/brevo/schemas.ts +449 -0
  101. package/src/github/index.ts +217 -0
  102. package/src/github/schemas.ts +435 -0
  103. package/src/gmail/gmail.ts +577 -0
  104. package/src/gmail/index.ts +26 -0
  105. package/src/gmail/schemas.ts +327 -0
  106. package/src/google-calendar/event-schemas.ts +16 -0
  107. package/src/google-calendar/google-calendar.ts +727 -0
  108. package/src/google-calendar/index.ts +27 -0
  109. package/src/google-calendar/schemas.ts +529 -0
  110. package/src/google-forms/event-schemas.ts +26 -0
  111. package/src/google-forms/google-forms.ts +683 -0
  112. package/src/google-forms/index.ts +23 -0
  113. package/src/google-forms/schemas.ts +499 -0
  114. package/src/linear/api.ts +141 -0
  115. package/src/linear/index.ts +71 -0
  116. package/src/linear/schemas.ts +1060 -0
  117. package/src/outlook/graph.ts +132 -0
  118. package/src/outlook/index.ts +14 -0
  119. package/src/outlook/schemas.ts +388 -0
  120. package/src/resend/index.ts +70 -0
  121. package/src/resend/schemas.ts +462 -0
  122. package/src/slack/index.ts +29 -0
  123. package/src/slack/schemas.ts +737 -0
  124. package/src/teams/graph.ts +130 -0
  125. package/src/teams/index.ts +27 -0
  126. package/src/teams/schemas.ts +463 -0
  127. package/src/trello/api.ts +190 -0
  128. package/src/trello/event-schemas.ts +290 -0
  129. package/src/trello/index.ts +45 -0
  130. package/src/trello/schemas.ts +507 -0
  131. package/src/triggers.ts +68 -0
  132. package/src/vercel/index.ts +147 -0
  133. package/src/vercel/schemas.ts +594 -0
  134. package/src/whatsapp/api.ts +171 -0
  135. package/src/whatsapp/index.ts +46 -0
  136. package/src/whatsapp/schemas.ts +341 -0
@@ -0,0 +1,117 @@
1
+ import { z } from "zod";
2
+ export declare const GOOGLE_CALENDAR_EVENT_DELETED_SCHEMA: z.ZodObject<{
3
+ calendarId: z.ZodString;
4
+ event: z.ZodOptional<z.ZodObject<{
5
+ attachments: z.ZodArray<z.ZodObject<{
6
+ fileId: z.ZodOptional<z.ZodString>;
7
+ fileUrl: z.ZodURL;
8
+ mimeType: z.ZodOptional<z.ZodString>;
9
+ title: z.ZodOptional<z.ZodString>;
10
+ iconLink: z.ZodOptional<z.ZodString>;
11
+ }, z.core.$strip>>;
12
+ attendees: z.ZodArray<z.ZodObject<{
13
+ additionalGuests: z.ZodOptional<z.ZodNumber>;
14
+ comment: z.ZodOptional<z.ZodString>;
15
+ email: z.ZodEmail;
16
+ displayName: z.ZodOptional<z.ZodString>;
17
+ optional: z.ZodOptional<z.ZodBoolean>;
18
+ resource: z.ZodOptional<z.ZodBoolean>;
19
+ responseStatus: z.ZodOptional<z.ZodEnum<{
20
+ tentative: "tentative";
21
+ needsAction: "needsAction";
22
+ declined: "declined";
23
+ accepted: "accepted";
24
+ }>>;
25
+ organizer: z.ZodBoolean;
26
+ self: z.ZodBoolean;
27
+ }, z.core.$strip>>;
28
+ calendarId: z.ZodString;
29
+ colorId: z.ZodOptional<z.ZodString>;
30
+ conference: z.ZodOptional<z.ZodObject<{
31
+ conferenceId: z.ZodOptional<z.ZodString>;
32
+ creationStatus: z.ZodOptional<z.ZodEnum<{
33
+ success: "success";
34
+ pending: "pending";
35
+ failure: "failure";
36
+ }>>;
37
+ entryPoints: z.ZodArray<z.ZodObject<{
38
+ label: z.ZodOptional<z.ZodString>;
39
+ passcode: z.ZodOptional<z.ZodString>;
40
+ type: z.ZodString;
41
+ uri: z.ZodString;
42
+ }, z.core.$strip>>;
43
+ name: z.ZodOptional<z.ZodString>;
44
+ }, z.core.$strip>>;
45
+ createdAt: z.ZodOptional<z.ZodString>;
46
+ creator: z.ZodOptional<z.ZodObject<{
47
+ displayName: z.ZodOptional<z.ZodString>;
48
+ email: z.ZodOptional<z.ZodString>;
49
+ self: z.ZodBoolean;
50
+ }, z.core.$strip>>;
51
+ description: z.ZodOptional<z.ZodString>;
52
+ end: z.ZodOptional<z.ZodObject<{
53
+ date: z.ZodOptional<z.ZodISODate>;
54
+ dateTime: z.ZodOptional<z.ZodString>;
55
+ timeZone: z.ZodOptional<z.ZodString>;
56
+ }, z.core.$strip>>;
57
+ extendedProperties: z.ZodObject<{
58
+ private: z.ZodRecord<z.ZodString, z.ZodString>;
59
+ shared: z.ZodRecord<z.ZodString, z.ZodString>;
60
+ }, z.core.$strip>;
61
+ guestsCanInviteOthers: z.ZodBoolean;
62
+ guestsCanModify: z.ZodBoolean;
63
+ guestsCanSeeOtherGuests: z.ZodBoolean;
64
+ hangoutLink: z.ZodOptional<z.ZodString>;
65
+ htmlLink: z.ZodOptional<z.ZodString>;
66
+ id: z.ZodString;
67
+ iCalUID: z.ZodOptional<z.ZodString>;
68
+ location: z.ZodOptional<z.ZodString>;
69
+ originalStart: z.ZodOptional<z.ZodObject<{
70
+ date: z.ZodOptional<z.ZodISODate>;
71
+ dateTime: z.ZodOptional<z.ZodString>;
72
+ timeZone: z.ZodOptional<z.ZodString>;
73
+ }, z.core.$strip>>;
74
+ organizer: z.ZodOptional<z.ZodObject<{
75
+ displayName: z.ZodOptional<z.ZodString>;
76
+ email: z.ZodOptional<z.ZodString>;
77
+ self: z.ZodBoolean;
78
+ }, z.core.$strip>>;
79
+ recurrence: z.ZodArray<z.ZodString>;
80
+ recurringEventId: z.ZodOptional<z.ZodString>;
81
+ reminders: z.ZodObject<{
82
+ overrides: z.ZodArray<z.ZodObject<{
83
+ minutes: z.ZodNumber;
84
+ method: z.ZodEnum<{
85
+ email: "email";
86
+ popup: "popup";
87
+ }>;
88
+ }, z.core.$strip>>;
89
+ useDefault: z.ZodBoolean;
90
+ }, z.core.$strip>;
91
+ sequence: z.ZodNumber;
92
+ start: z.ZodOptional<z.ZodObject<{
93
+ date: z.ZodOptional<z.ZodISODate>;
94
+ dateTime: z.ZodOptional<z.ZodString>;
95
+ timeZone: z.ZodOptional<z.ZodString>;
96
+ }, z.core.$strip>>;
97
+ status: z.ZodEnum<{
98
+ confirmed: "confirmed";
99
+ tentative: "tentative";
100
+ cancelled: "cancelled";
101
+ }>;
102
+ summary: z.ZodString;
103
+ transparency: z.ZodEnum<{
104
+ opaque: "opaque";
105
+ transparent: "transparent";
106
+ }>;
107
+ type: z.ZodString;
108
+ updatedAt: z.ZodOptional<z.ZodString>;
109
+ visibility: z.ZodEnum<{
110
+ default: "default";
111
+ public: "public";
112
+ private: "private";
113
+ confidential: "confidential";
114
+ }>;
115
+ }, z.core.$strip>>;
116
+ eventId: z.ZodString;
117
+ }, z.core.$strip>;
@@ -0,0 +1,13 @@
1
+ import { CALENDAR_EVENT_SCHEMA } from "./schemas.js";
2
+ import { z } from "zod";
3
+ export const GOOGLE_CALENDAR_EVENT_DELETED_SCHEMA = z.object({
4
+ /** Calendar that previously contained the event. */
5
+ calendarId: z.string(),
6
+ /**
7
+ * Last normalized event representation, when the event existed in the
8
+ * synchronization baseline.
9
+ */
10
+ event: CALENDAR_EVENT_SCHEMA.optional(),
11
+ /** Immutable provider event ID. */
12
+ eventId: z.string(),
13
+ });
@@ -0,0 +1,147 @@
1
+ import { type calendar_v3 } from "@googleapis/calendar";
2
+ import { z } from "zod";
3
+ import { ACL_PAGE_SCHEMA, ACL_RULE_SCHEMA, CALENDAR_EVENT_SCHEMA, CALENDAR_PAGE_SCHEMA, CALENDAR_SCHEMA, COLOR_PALETTE_SCHEMA, EVENT_PAGE_SCHEMA, EVENT_DETAILS_INPUT_SCHEMA, EVENT_SCHEDULE_INPUT_SCHEMA, FREE_BUSY_SCHEMA } from "./schemas.js";
4
+ /**
5
+ * Creates the official Calendar client from a resolved Google integration
6
+ * secret.
7
+ *
8
+ * @param secret - Refreshed Google integration secret.
9
+ */
10
+ export declare function getGoogleCalendarApi(secret: Record<string, unknown>): calendar_v3.Calendar;
11
+ /**
12
+ * Resolves an exact calendar title or ID to the provider's canonical ID.
13
+ *
14
+ * Unknown references are returned unchanged so email-address and otherwise
15
+ * unlisted calendar IDs remain usable.
16
+ *
17
+ * @param calendarApi - Authenticated Google Calendar client.
18
+ * @param reference - Calendar title or ID, defaulting to `primary`.
19
+ */
20
+ export declare function resolveCalendarId(calendarApi: calendar_v3.Calendar, reference?: string): Promise<string>;
21
+ /**
22
+ * Resolves multiple exact calendar titles or IDs with one paginated listing.
23
+ *
24
+ * Unknown references are returned unchanged so email-address and otherwise
25
+ * unlisted calendar IDs remain usable.
26
+ *
27
+ * @param calendarApi - Authenticated Google Calendar client.
28
+ * @param references - Calendar titles or IDs, with absent values as primary.
29
+ */
30
+ export declare function resolveCalendarIds(calendarApi: calendar_v3.Calendar, references: (string | undefined)[]): Promise<string[]>;
31
+ /**
32
+ * Resolves one calendar reference against an already fetched calendar list.
33
+ *
34
+ * @param calendars - Visible Google Calendar list entries.
35
+ * @param reference - Calendar title or ID, defaulting to primary.
36
+ * @throws When the calendar title matches more than one visible calendar.
37
+ */
38
+ export declare function resolveCalendarReference(calendars: calendar_v3.Schema$CalendarListEntry[], reference?: string): string;
39
+ /**
40
+ * Accepts a raw event ID or a standard Google Calendar event URL.
41
+ *
42
+ * @param event - Event ID or URL.
43
+ * @throws When a URL is not a recognizable Google Calendar event URL.
44
+ */
45
+ export declare function normalizeEventId(event: string): string;
46
+ /**
47
+ * Converts an ergonomic timed or all-day schedule to Calendar API date-times.
48
+ *
49
+ * @param schedule - Timed or all-day event schedule.
50
+ */
51
+ export declare function toEventDateTimes(schedule: z.infer<typeof EVENT_SCHEDULE_INPUT_SCHEMA>): {
52
+ end: {
53
+ date: string;
54
+ dateTime?: undefined;
55
+ timeZone?: undefined;
56
+ };
57
+ start: {
58
+ date: string;
59
+ dateTime?: undefined;
60
+ timeZone?: undefined;
61
+ };
62
+ } | {
63
+ end: {
64
+ dateTime: string;
65
+ timeZone: string | undefined;
66
+ date?: undefined;
67
+ };
68
+ start: {
69
+ dateTime: string;
70
+ timeZone: string | undefined;
71
+ date?: undefined;
72
+ };
73
+ };
74
+ /**
75
+ * Normalizes a provider event into the stable public Calendar event shape.
76
+ *
77
+ * @param event - Provider event.
78
+ * @param calendarId - Calendar from which the event was read.
79
+ * @throws When the provider omits the event ID.
80
+ */
81
+ export declare function normalizeCalendarEvent(event: calendar_v3.Schema$Event, calendarId: string): z.infer<typeof CALENDAR_EVENT_SCHEMA>;
82
+ /**
83
+ * Normalizes a provider event page while retaining pagination and sync tokens.
84
+ *
85
+ * @param events - Provider event collection.
86
+ * @param calendarId - Calendar from which events were read.
87
+ */
88
+ export declare function normalizeEventPage(events: calendar_v3.Schema$Events, calendarId: string): z.infer<typeof EVENT_PAGE_SCHEMA>;
89
+ /**
90
+ * Normalizes a calendar or calendar-list entry.
91
+ *
92
+ * @param value - Provider calendar metadata.
93
+ * @param id - Calendar ID when not included in the provider resource.
94
+ * @throws When neither the resource nor caller supplies a calendar ID.
95
+ */
96
+ export declare function normalizeCalendar(value: calendar_v3.Schema$Calendar | calendar_v3.Schema$CalendarListEntry, id?: string): z.infer<typeof CALENDAR_SCHEMA>;
97
+ /**
98
+ * Normalizes a provider calendar-list page.
99
+ *
100
+ * @param value - Provider calendar-list collection.
101
+ */
102
+ export declare function normalizeCalendarPage(value: calendar_v3.Schema$CalendarList): z.infer<typeof CALENDAR_PAGE_SCHEMA>;
103
+ /**
104
+ * Normalizes a provider free/busy response.
105
+ *
106
+ * @param value - Provider free/busy response.
107
+ * @throws When the provider omits the requested time range.
108
+ */
109
+ export declare function normalizeFreeBusy(value: calendar_v3.Schema$FreeBusyResponse): z.infer<typeof FREE_BUSY_SCHEMA>;
110
+ /**
111
+ * Normalizes Google Calendar color definitions.
112
+ *
113
+ * @param value - Provider color palette.
114
+ */
115
+ export declare function normalizeColors(value: calendar_v3.Schema$Colors): z.infer<typeof COLOR_PALETTE_SCHEMA>;
116
+ /**
117
+ * Normalizes one calendar ACL rule.
118
+ *
119
+ * @param value - Provider ACL rule.
120
+ * @throws When the provider omits the rule ID or scope.
121
+ */
122
+ export declare function normalizeAclRule(value: calendar_v3.Schema$AclRule): z.infer<typeof ACL_RULE_SCHEMA>;
123
+ /**
124
+ * Normalizes a page of calendar ACL rules.
125
+ *
126
+ * @param value - Provider ACL collection.
127
+ */
128
+ export declare function normalizeAclPage(value: calendar_v3.Schema$Acl): z.infer<typeof ACL_PAGE_SCHEMA>;
129
+ /**
130
+ * Finds common free windows of a requested duration.
131
+ *
132
+ * @param freeBusy - Normalized free/busy response.
133
+ * @param durationMinutes - Required duration.
134
+ * @param stepMinutes - Candidate-start increment.
135
+ * @param limit - Maximum returned slots.
136
+ */
137
+ export declare function findAvailableSlots(freeBusy: z.infer<typeof FREE_BUSY_SCHEMA>, durationMinutes: number, stepMinutes: number, limit: number): {
138
+ durationMinutes: number;
139
+ end: string;
140
+ start: string;
141
+ }[];
142
+ /**
143
+ * Builds the provider event body shared by create, update, and import actions.
144
+ *
145
+ * @param input - Public event fields.
146
+ */
147
+ export declare function toEventResource(input: z.infer<typeof EVENT_DETAILS_INPUT_SCHEMA>): calendar_v3.Schema$Event;