@particle-academy/microsoft-outlook-js 0.0.0 → 0.2.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.
@@ -0,0 +1,342 @@
1
+ import { ServiceDescriptor, PreparedRequest, ConnectorMode, ConnectorFaker, RequestedMode, Transport, ConnectorResult, TriggerDescriptor, ChallengeHandshake, LeaseDeclaration, SharedTokenScheme, handshakeResponse, InboundDelivery, WebhookVerification } from '@particle-academy/fancy-connector-core';
2
+
3
+ /**
4
+ * GENERATED FILE — do not edit.
5
+ *
6
+ * Emitted from provider/manifest.json by weaver's generator.
7
+ * A hand-edit here is destroyed by the next protocol sync, which is worse than
8
+ * being rejected, because it works until it silently does not. Fix
9
+ * provider/manifest.json (or weaver's template/) and regenerate:
10
+ *
11
+ * npm run provider -- microsoft_outlook
12
+ */
13
+ /**
14
+ * Microsoft Outlook, as one service descriptor shared by every Microsoft
15
+ * Outlook operation.
16
+ *
17
+ * @particle-academy/fancy-connector-core carries what is true of ALL
18
+ * connectors. This carries what is true of Microsoft Outlook: its base URL,
19
+ * its auth scheme, its idempotency header, and its faker.
20
+ *
21
+ * ## The sandbox trap, written down where it is used
22
+ *
23
+ * Microsoft's test estate is a Microsoft 365 Developer Program sandbox: a
24
+ * separate E5 tenant with its own users, its own calendars and its own OAuth
25
+ * consent, on the SAME host. Eligibility is limited -- Visual Studio
26
+ * Professional or Enterprise subscribers, ISV Success / Microsoft AI Cloud
27
+ * Partner Program members, or Premier/Unified Support customers -- and the
28
+ * tenant expires after 90 days of no development activity. Without one, every
29
+ * call reaches a real mailbox.
30
+ */
31
+
32
+ /**
33
+ * The connector API version this package was GENERATED against.
34
+ *
35
+ * A literal, never imported. An imported constant lets an upgrade rewrite the
36
+ * very claim it exists to detect, after which the copy agrees with itself
37
+ * forever.
38
+ */
39
+ declare const CONNECTOR_API_VERSION = 1;
40
+ declare const MICROSOFT_OUTLOOK_BASE_URLS: {
41
+ readonly live: "https://graph.microsoft.com";
42
+ readonly sandbox: "https://graph.microsoft.com";
43
+ };
44
+ /** Credential keys a remote call cannot proceed without. */
45
+ declare const MICROSOFT_OUTLOOK_REQUIRES: readonly ["accessToken", "refreshToken", "clientId", "clientSecret"];
46
+ /**
47
+ * Apply Microsoft Outlook's auth scheme to an outgoing request.
48
+ *
49
+ *
50
+ *
51
+ * The mode is passed in because for some providers auth and estate are the
52
+ * same decision expressed in the URL; here it is unused, and saying so is
53
+ * cheaper than wondering later whether it was forgotten.
54
+ */
55
+ declare function microsoftOutlookAuthorize(credentials: Record<string, string | undefined>, request: PreparedRequest, _mode: ConnectorMode): void;
56
+ /** The Microsoft Outlook service, for the TypeScript runtime. */
57
+ declare const MICROSOFT_OUTLOOK: ServiceDescriptor;
58
+
59
+ /**
60
+ * GENERATED FILE — do not edit.
61
+ *
62
+ * Emitted from provider/fixtures/ by weaver's generator.
63
+ * A hand-edit here is destroyed by the next protocol sync, which is worse than
64
+ * being rejected, because it works until it silently does not. Fix
65
+ * provider/fixtures/ (or weaver's template/) and regenerate:
66
+ *
67
+ * npm run provider -- microsoft_outlook
68
+ */
69
+ /**
70
+ * The Microsoft Outlook faker.
71
+ *
72
+ * Shapes, not behaviour: the goal is that a downstream node sees the field
73
+ * NAMES Microsoft Outlook actually publishes, so an author can wire {{
74
+ * $json.data.id }} against a fake and have it keep working against the real
75
+ * thing.
76
+ *
77
+ * Deterministic — same inputs, same output. A faker returning a fresh uuid
78
+ * every call cannot be asserted on, so its fixtures degrade to "it did not
79
+ * throw", which is the assertion that catches nothing.
80
+ */
81
+
82
+ declare const microsoftOutlookFaker: ConnectorFaker;
83
+
84
+ /**
85
+ * GENERATED FILE — do not edit.
86
+ *
87
+ * Emitted from provider/actions/event-get.json by weaver's generator.
88
+ * A hand-edit here is destroyed by the next protocol sync, which is worse than
89
+ * being rejected, because it works until it silently does not. Fix
90
+ * provider/actions/event-get.json (or weaver's template/) and regenerate:
91
+ *
92
+ * npm run provider -- microsoft_outlook
93
+ */
94
+ /**
95
+ * Read one event from the connected account's Outlook calendar.
96
+ *
97
+ * GET /v1.0/me/events/{id} —
98
+ * https://learn.microsoft.com/en-us/graph/api/event-get?view=graph-rest-1.0
99
+ *
100
+ * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,
101
+ * no fake/real branch. This describes the request; callConnector resolves the
102
+ * connection, picks the estate, and either calls Microsoft Outlook or calls
103
+ * the faker.
104
+ */
105
+
106
+ declare const EVENT_GET_OPERATION = "event_get";
107
+ type EventGetOptions = {
108
+ /** The node's resolved config. Keys: id. */
109
+ config: Record<string, unknown>;
110
+ credentials?: Record<string, string | undefined>;
111
+ mode?: RequestedMode;
112
+ connectionId?: string | null;
113
+ input?: unknown;
114
+ attempts?: number;
115
+ /** Override the transport. The only way to exercise this without a network. */
116
+ transport?: Transport;
117
+ };
118
+ declare function microsoftOutlookEventGet(options: EventGetOptions): Promise<ConnectorResult>;
119
+
120
+ /**
121
+ * GENERATED FILE — do not edit.
122
+ *
123
+ * Emitted from provider/actions/event-list.json by weaver's generator.
124
+ * A hand-edit here is destroyed by the next protocol sync, which is worse than
125
+ * being rejected, because it works until it silently does not. Fix
126
+ * provider/actions/event-list.json (or weaver's template/) and regenerate:
127
+ *
128
+ * npm run provider -- microsoft_outlook
129
+ */
130
+ /**
131
+ * List events from the connected account's Outlook calendar.
132
+ *
133
+ * GET /v1.0/me/events —
134
+ * https://learn.microsoft.com/en-us/graph/api/user-list-events?view=graph-rest-1.0
135
+ *
136
+ * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,
137
+ * no fake/real branch. This describes the request; callConnector resolves the
138
+ * connection, picks the estate, and either calls Microsoft Outlook or calls
139
+ * the faker.
140
+ */
141
+
142
+ declare const EVENT_LIST_OPERATION = "event_list";
143
+ type EventListOptions = {
144
+ /** The node's resolved config. Keys: top, filter, orderby, select. */
145
+ config: Record<string, unknown>;
146
+ credentials?: Record<string, string | undefined>;
147
+ mode?: RequestedMode;
148
+ connectionId?: string | null;
149
+ input?: unknown;
150
+ attempts?: number;
151
+ /** Override the transport. The only way to exercise this without a network. */
152
+ transport?: Transport;
153
+ };
154
+ declare function microsoftOutlookEventList(options: EventListOptions): Promise<ConnectorResult>;
155
+
156
+ /**
157
+ * GENERATED FILE — do not edit.
158
+ *
159
+ * Emitted from provider/actions/subscription-create.json by weaver's generator.
160
+ * A hand-edit here is destroyed by the next protocol sync, which is worse than
161
+ * being rejected, because it works until it silently does not. Fix
162
+ * provider/actions/subscription-create.json (or weaver's template/) and regenerate:
163
+ *
164
+ * npm run provider -- microsoft_outlook
165
+ */
166
+ /**
167
+ * Subscribe to change notifications on the connected account's calendar
168
+ * events. The host's subscription machinery calls this; it is not a node most
169
+ * workflows need.
170
+ *
171
+ * POST /v1.0/subscriptions —
172
+ * https://learn.microsoft.com/en-us/graph/api/subscription-post-subscriptions?view=graph-rest-1.0
173
+ *
174
+ * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,
175
+ * no fake/real branch. This describes the request; callConnector resolves the
176
+ * connection, picks the estate, and either calls Microsoft Outlook or calls
177
+ * the faker.
178
+ *
179
+ * sideEffects: unsafe-to-replay.
180
+ */
181
+
182
+ declare const SUBSCRIPTION_CREATE_OPERATION = "subscription_create";
183
+ type SubscriptionCreateOptions = {
184
+ /** The node's resolved config. Keys: changeType, resource, notificationUrl, lifecycleNotificationUrl, expirationDateTime, clientState. */
185
+ config: Record<string, unknown>;
186
+ credentials?: Record<string, string | undefined>;
187
+ mode?: RequestedMode;
188
+ connectionId?: string | null;
189
+ input?: unknown;
190
+ attempts?: number;
191
+ /** Override the transport. The only way to exercise this without a network. */
192
+ transport?: Transport;
193
+ };
194
+ declare function microsoftOutlookSubscriptionCreate(options: SubscriptionCreateOptions): Promise<ConnectorResult>;
195
+
196
+ /**
197
+ * GENERATED FILE — do not edit.
198
+ *
199
+ * Emitted from provider/actions/subscription-delete.json by weaver's generator.
200
+ * A hand-edit here is destroyed by the next protocol sync, which is worse than
201
+ * being rejected, because it works until it silently does not. Fix
202
+ * provider/actions/subscription-delete.json (or weaver's template/) and regenerate:
203
+ *
204
+ * npm run provider -- microsoft_outlook
205
+ */
206
+ /**
207
+ * Delete a change-notification subscription. The host's subscription machinery
208
+ * calls this when a trigger is removed.
209
+ *
210
+ * DELETE /v1.0/subscriptions/{id} —
211
+ * https://learn.microsoft.com/en-us/graph/api/subscription-delete?view=graph-rest-1.0
212
+ *
213
+ * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,
214
+ * no fake/real branch. This describes the request; callConnector resolves the
215
+ * connection, picks the estate, and either calls Microsoft Outlook or calls
216
+ * the faker.
217
+ */
218
+
219
+ declare const SUBSCRIPTION_DELETE_OPERATION = "subscription_delete";
220
+ type SubscriptionDeleteOptions = {
221
+ /** The node's resolved config. Keys: id. */
222
+ config: Record<string, unknown>;
223
+ credentials?: Record<string, string | undefined>;
224
+ mode?: RequestedMode;
225
+ connectionId?: string | null;
226
+ input?: unknown;
227
+ attempts?: number;
228
+ /** Override the transport. The only way to exercise this without a network. */
229
+ transport?: Transport;
230
+ };
231
+ declare function microsoftOutlookSubscriptionDelete(options: SubscriptionDeleteOptions): Promise<ConnectorResult>;
232
+
233
+ /**
234
+ * GENERATED FILE — do not edit.
235
+ *
236
+ * Emitted from provider/actions/subscription-renew.json by weaver's generator.
237
+ * A hand-edit here is destroyed by the next protocol sync, which is worse than
238
+ * being rejected, because it works until it silently does not. Fix
239
+ * provider/actions/subscription-renew.json (or weaver's template/) and regenerate:
240
+ *
241
+ * npm run provider -- microsoft_outlook
242
+ */
243
+ /**
244
+ * Extend a change-notification subscription before it expires. The host's
245
+ * subscription machinery calls this when the lease is due.
246
+ *
247
+ * PATCH /v1.0/subscriptions/{id} —
248
+ * https://learn.microsoft.com/en-us/graph/api/subscription-update?view=graph-rest-1.0
249
+ *
250
+ * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,
251
+ * no fake/real branch. This describes the request; callConnector resolves the
252
+ * connection, picks the estate, and either calls Microsoft Outlook or calls
253
+ * the faker.
254
+ */
255
+
256
+ declare const SUBSCRIPTION_RENEW_OPERATION = "subscription_renew";
257
+ type SubscriptionRenewOptions = {
258
+ /** The node's resolved config. Keys: id, expirationDateTime. */
259
+ config: Record<string, unknown>;
260
+ credentials?: Record<string, string | undefined>;
261
+ mode?: RequestedMode;
262
+ connectionId?: string | null;
263
+ input?: unknown;
264
+ attempts?: number;
265
+ /** Override the transport. The only way to exercise this without a network. */
266
+ transport?: Transport;
267
+ };
268
+ declare function microsoftOutlookSubscriptionRenew(options: SubscriptionRenewOptions): Promise<ConnectorResult>;
269
+
270
+ /**
271
+ * GENERATED FILE — do not edit.
272
+ *
273
+ * Emitted from provider/triggers/calendar-changed.json by weaver's generator.
274
+ * A hand-edit here is destroyed by the next protocol sync, which is worse than
275
+ * being rejected, because it works until it silently does not. Fix
276
+ * provider/triggers/calendar-changed.json (or weaver's template/) and regenerate:
277
+ *
278
+ * npm run provider -- microsoft_outlook
279
+ */
280
+ /**
281
+ * Microsoft Outlook's subscription trigger — the delivery contract.
282
+ *
283
+ * Kept beside the service descriptor rather than inside a node, because the
284
+ * way a delivery is verified is a fact about MICROSOFT OUTLOOK. Two Microsoft
285
+ * Outlook triggers must not be able to disagree about how a delivery is
286
+ * verified.
287
+ *
288
+ * A SUBSCRIPTION: Microsoft Outlook stops delivering unless somebody renews
289
+ * it, forever, and if nobody does the workflow stops firing with no error
290
+ * anywhere. The lease below says where the expiry is read from and how early
291
+ * to renew; the host runs ONE renewal scheduler for every expiring trigger.
292
+ */
293
+
294
+ /** Where Microsoft Outlook echoes the token it was given when the subscription was created. */
295
+ declare const MICROSOFT_OUTLOOK_CALENDAR_CHANGED_TOKEN_SCHEME: SharedTokenScheme;
296
+ /**
297
+ * Microsoft Outlook's challenge before it delivers anything: a request
298
+ * carrying `?validationToken=…` must be answered with that value as plain
299
+ * text, or the subscription is never created.
300
+ * `answerMicrosoftOutlookHandshake` is the pure half; the host's routing layer
301
+ * asks it before mounting the route.
302
+ */
303
+ declare const MICROSOFT_OUTLOOK_CALENDAR_CHANGED_HANDSHAKE: ChallengeHandshake;
304
+ /**
305
+ * The lease this subscription carries: where the provider's expiry sits in the
306
+ * `subscription_create` response (`expirationDateTime`, rfc3339), how early
307
+ * the host renews, and what it calls when the lease is due. The host builds
308
+ * the value with the core's `leaseFromResponse` and runs one scheduler for
309
+ * every expiring trigger.
310
+ */
311
+ declare const MICROSOFT_OUTLOOK_CALENDAR_CHANGED_LEASE: LeaseDeclaration;
312
+ /**
313
+ * Which of this package's actions create, renew and stop the subscription.
314
+ * `renew` is null where the provider cannot renew and the host calls create
315
+ * again — after stopping the old one, and after re-listing, because
316
+ * notifications during the gap are gone.
317
+ */
318
+ declare const MICROSOFT_OUTLOOK_CALENDAR_CHANGED_SUBSCRIPTION: {
319
+ readonly create: "subscription_create";
320
+ readonly renew: "subscription_renew";
321
+ readonly stop: "subscription_delete";
322
+ };
323
+ declare const MICROSOFT_OUTLOOK_CALENDAR_CHANGED: TriggerDescriptor;
324
+ /**
325
+ * Verify one inbound Microsoft Outlook delivery.
326
+ *
327
+ * The host calls this BEFORE starting a run, with the body exactly as
328
+ * received. Re-serialised JSON changes key order and whitespace, and produces
329
+ * a mismatch that looks precisely like a wrong secret — hours of debugging the
330
+ * wrong thing.
331
+ *
332
+ * The secret is the connection's `clientState`.
333
+ */
334
+ declare function verifyMicrosoftOutlookDelivery(delivery: InboundDelivery, clientState: string | undefined, now?: number): Promise<WebhookVerification>;
335
+ /**
336
+ * Answer Microsoft Outlook's challenge — what to send back (200, text/plain,
337
+ * the decoded `validationToken`), or undefined when the request is not a
338
+ * challenge at all.
339
+ */
340
+ declare function answerMicrosoftOutlookHandshake(query: Record<string, string | string[] | undefined>): ReturnType<typeof handshakeResponse>;
341
+
342
+ export { CONNECTOR_API_VERSION, EVENT_GET_OPERATION, EVENT_LIST_OPERATION, type EventGetOptions, type EventListOptions, MICROSOFT_OUTLOOK, MICROSOFT_OUTLOOK_BASE_URLS, MICROSOFT_OUTLOOK_CALENDAR_CHANGED, MICROSOFT_OUTLOOK_CALENDAR_CHANGED_HANDSHAKE, MICROSOFT_OUTLOOK_CALENDAR_CHANGED_LEASE, MICROSOFT_OUTLOOK_CALENDAR_CHANGED_SUBSCRIPTION, MICROSOFT_OUTLOOK_CALENDAR_CHANGED_TOKEN_SCHEME, MICROSOFT_OUTLOOK_REQUIRES, SUBSCRIPTION_CREATE_OPERATION, SUBSCRIPTION_DELETE_OPERATION, SUBSCRIPTION_RENEW_OPERATION, type SubscriptionCreateOptions, type SubscriptionDeleteOptions, type SubscriptionRenewOptions, answerMicrosoftOutlookHandshake, microsoftOutlookAuthorize, microsoftOutlookEventGet, microsoftOutlookEventList, microsoftOutlookFaker, microsoftOutlookSubscriptionCreate, microsoftOutlookSubscriptionDelete, microsoftOutlookSubscriptionRenew, verifyMicrosoftOutlookDelivery };
@@ -0,0 +1,342 @@
1
+ import { ServiceDescriptor, PreparedRequest, ConnectorMode, ConnectorFaker, RequestedMode, Transport, ConnectorResult, TriggerDescriptor, ChallengeHandshake, LeaseDeclaration, SharedTokenScheme, handshakeResponse, InboundDelivery, WebhookVerification } from '@particle-academy/fancy-connector-core';
2
+
3
+ /**
4
+ * GENERATED FILE — do not edit.
5
+ *
6
+ * Emitted from provider/manifest.json by weaver's generator.
7
+ * A hand-edit here is destroyed by the next protocol sync, which is worse than
8
+ * being rejected, because it works until it silently does not. Fix
9
+ * provider/manifest.json (or weaver's template/) and regenerate:
10
+ *
11
+ * npm run provider -- microsoft_outlook
12
+ */
13
+ /**
14
+ * Microsoft Outlook, as one service descriptor shared by every Microsoft
15
+ * Outlook operation.
16
+ *
17
+ * @particle-academy/fancy-connector-core carries what is true of ALL
18
+ * connectors. This carries what is true of Microsoft Outlook: its base URL,
19
+ * its auth scheme, its idempotency header, and its faker.
20
+ *
21
+ * ## The sandbox trap, written down where it is used
22
+ *
23
+ * Microsoft's test estate is a Microsoft 365 Developer Program sandbox: a
24
+ * separate E5 tenant with its own users, its own calendars and its own OAuth
25
+ * consent, on the SAME host. Eligibility is limited -- Visual Studio
26
+ * Professional or Enterprise subscribers, ISV Success / Microsoft AI Cloud
27
+ * Partner Program members, or Premier/Unified Support customers -- and the
28
+ * tenant expires after 90 days of no development activity. Without one, every
29
+ * call reaches a real mailbox.
30
+ */
31
+
32
+ /**
33
+ * The connector API version this package was GENERATED against.
34
+ *
35
+ * A literal, never imported. An imported constant lets an upgrade rewrite the
36
+ * very claim it exists to detect, after which the copy agrees with itself
37
+ * forever.
38
+ */
39
+ declare const CONNECTOR_API_VERSION = 1;
40
+ declare const MICROSOFT_OUTLOOK_BASE_URLS: {
41
+ readonly live: "https://graph.microsoft.com";
42
+ readonly sandbox: "https://graph.microsoft.com";
43
+ };
44
+ /** Credential keys a remote call cannot proceed without. */
45
+ declare const MICROSOFT_OUTLOOK_REQUIRES: readonly ["accessToken", "refreshToken", "clientId", "clientSecret"];
46
+ /**
47
+ * Apply Microsoft Outlook's auth scheme to an outgoing request.
48
+ *
49
+ *
50
+ *
51
+ * The mode is passed in because for some providers auth and estate are the
52
+ * same decision expressed in the URL; here it is unused, and saying so is
53
+ * cheaper than wondering later whether it was forgotten.
54
+ */
55
+ declare function microsoftOutlookAuthorize(credentials: Record<string, string | undefined>, request: PreparedRequest, _mode: ConnectorMode): void;
56
+ /** The Microsoft Outlook service, for the TypeScript runtime. */
57
+ declare const MICROSOFT_OUTLOOK: ServiceDescriptor;
58
+
59
+ /**
60
+ * GENERATED FILE — do not edit.
61
+ *
62
+ * Emitted from provider/fixtures/ by weaver's generator.
63
+ * A hand-edit here is destroyed by the next protocol sync, which is worse than
64
+ * being rejected, because it works until it silently does not. Fix
65
+ * provider/fixtures/ (or weaver's template/) and regenerate:
66
+ *
67
+ * npm run provider -- microsoft_outlook
68
+ */
69
+ /**
70
+ * The Microsoft Outlook faker.
71
+ *
72
+ * Shapes, not behaviour: the goal is that a downstream node sees the field
73
+ * NAMES Microsoft Outlook actually publishes, so an author can wire {{
74
+ * $json.data.id }} against a fake and have it keep working against the real
75
+ * thing.
76
+ *
77
+ * Deterministic — same inputs, same output. A faker returning a fresh uuid
78
+ * every call cannot be asserted on, so its fixtures degrade to "it did not
79
+ * throw", which is the assertion that catches nothing.
80
+ */
81
+
82
+ declare const microsoftOutlookFaker: ConnectorFaker;
83
+
84
+ /**
85
+ * GENERATED FILE — do not edit.
86
+ *
87
+ * Emitted from provider/actions/event-get.json by weaver's generator.
88
+ * A hand-edit here is destroyed by the next protocol sync, which is worse than
89
+ * being rejected, because it works until it silently does not. Fix
90
+ * provider/actions/event-get.json (or weaver's template/) and regenerate:
91
+ *
92
+ * npm run provider -- microsoft_outlook
93
+ */
94
+ /**
95
+ * Read one event from the connected account's Outlook calendar.
96
+ *
97
+ * GET /v1.0/me/events/{id} —
98
+ * https://learn.microsoft.com/en-us/graph/api/event-get?view=graph-rest-1.0
99
+ *
100
+ * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,
101
+ * no fake/real branch. This describes the request; callConnector resolves the
102
+ * connection, picks the estate, and either calls Microsoft Outlook or calls
103
+ * the faker.
104
+ */
105
+
106
+ declare const EVENT_GET_OPERATION = "event_get";
107
+ type EventGetOptions = {
108
+ /** The node's resolved config. Keys: id. */
109
+ config: Record<string, unknown>;
110
+ credentials?: Record<string, string | undefined>;
111
+ mode?: RequestedMode;
112
+ connectionId?: string | null;
113
+ input?: unknown;
114
+ attempts?: number;
115
+ /** Override the transport. The only way to exercise this without a network. */
116
+ transport?: Transport;
117
+ };
118
+ declare function microsoftOutlookEventGet(options: EventGetOptions): Promise<ConnectorResult>;
119
+
120
+ /**
121
+ * GENERATED FILE — do not edit.
122
+ *
123
+ * Emitted from provider/actions/event-list.json by weaver's generator.
124
+ * A hand-edit here is destroyed by the next protocol sync, which is worse than
125
+ * being rejected, because it works until it silently does not. Fix
126
+ * provider/actions/event-list.json (or weaver's template/) and regenerate:
127
+ *
128
+ * npm run provider -- microsoft_outlook
129
+ */
130
+ /**
131
+ * List events from the connected account's Outlook calendar.
132
+ *
133
+ * GET /v1.0/me/events —
134
+ * https://learn.microsoft.com/en-us/graph/api/user-list-events?view=graph-rest-1.0
135
+ *
136
+ * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,
137
+ * no fake/real branch. This describes the request; callConnector resolves the
138
+ * connection, picks the estate, and either calls Microsoft Outlook or calls
139
+ * the faker.
140
+ */
141
+
142
+ declare const EVENT_LIST_OPERATION = "event_list";
143
+ type EventListOptions = {
144
+ /** The node's resolved config. Keys: top, filter, orderby, select. */
145
+ config: Record<string, unknown>;
146
+ credentials?: Record<string, string | undefined>;
147
+ mode?: RequestedMode;
148
+ connectionId?: string | null;
149
+ input?: unknown;
150
+ attempts?: number;
151
+ /** Override the transport. The only way to exercise this without a network. */
152
+ transport?: Transport;
153
+ };
154
+ declare function microsoftOutlookEventList(options: EventListOptions): Promise<ConnectorResult>;
155
+
156
+ /**
157
+ * GENERATED FILE — do not edit.
158
+ *
159
+ * Emitted from provider/actions/subscription-create.json by weaver's generator.
160
+ * A hand-edit here is destroyed by the next protocol sync, which is worse than
161
+ * being rejected, because it works until it silently does not. Fix
162
+ * provider/actions/subscription-create.json (or weaver's template/) and regenerate:
163
+ *
164
+ * npm run provider -- microsoft_outlook
165
+ */
166
+ /**
167
+ * Subscribe to change notifications on the connected account's calendar
168
+ * events. The host's subscription machinery calls this; it is not a node most
169
+ * workflows need.
170
+ *
171
+ * POST /v1.0/subscriptions —
172
+ * https://learn.microsoft.com/en-us/graph/api/subscription-post-subscriptions?view=graph-rest-1.0
173
+ *
174
+ * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,
175
+ * no fake/real branch. This describes the request; callConnector resolves the
176
+ * connection, picks the estate, and either calls Microsoft Outlook or calls
177
+ * the faker.
178
+ *
179
+ * sideEffects: unsafe-to-replay.
180
+ */
181
+
182
+ declare const SUBSCRIPTION_CREATE_OPERATION = "subscription_create";
183
+ type SubscriptionCreateOptions = {
184
+ /** The node's resolved config. Keys: changeType, resource, notificationUrl, lifecycleNotificationUrl, expirationDateTime, clientState. */
185
+ config: Record<string, unknown>;
186
+ credentials?: Record<string, string | undefined>;
187
+ mode?: RequestedMode;
188
+ connectionId?: string | null;
189
+ input?: unknown;
190
+ attempts?: number;
191
+ /** Override the transport. The only way to exercise this without a network. */
192
+ transport?: Transport;
193
+ };
194
+ declare function microsoftOutlookSubscriptionCreate(options: SubscriptionCreateOptions): Promise<ConnectorResult>;
195
+
196
+ /**
197
+ * GENERATED FILE — do not edit.
198
+ *
199
+ * Emitted from provider/actions/subscription-delete.json by weaver's generator.
200
+ * A hand-edit here is destroyed by the next protocol sync, which is worse than
201
+ * being rejected, because it works until it silently does not. Fix
202
+ * provider/actions/subscription-delete.json (or weaver's template/) and regenerate:
203
+ *
204
+ * npm run provider -- microsoft_outlook
205
+ */
206
+ /**
207
+ * Delete a change-notification subscription. The host's subscription machinery
208
+ * calls this when a trigger is removed.
209
+ *
210
+ * DELETE /v1.0/subscriptions/{id} —
211
+ * https://learn.microsoft.com/en-us/graph/api/subscription-delete?view=graph-rest-1.0
212
+ *
213
+ * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,
214
+ * no fake/real branch. This describes the request; callConnector resolves the
215
+ * connection, picks the estate, and either calls Microsoft Outlook or calls
216
+ * the faker.
217
+ */
218
+
219
+ declare const SUBSCRIPTION_DELETE_OPERATION = "subscription_delete";
220
+ type SubscriptionDeleteOptions = {
221
+ /** The node's resolved config. Keys: id. */
222
+ config: Record<string, unknown>;
223
+ credentials?: Record<string, string | undefined>;
224
+ mode?: RequestedMode;
225
+ connectionId?: string | null;
226
+ input?: unknown;
227
+ attempts?: number;
228
+ /** Override the transport. The only way to exercise this without a network. */
229
+ transport?: Transport;
230
+ };
231
+ declare function microsoftOutlookSubscriptionDelete(options: SubscriptionDeleteOptions): Promise<ConnectorResult>;
232
+
233
+ /**
234
+ * GENERATED FILE — do not edit.
235
+ *
236
+ * Emitted from provider/actions/subscription-renew.json by weaver's generator.
237
+ * A hand-edit here is destroyed by the next protocol sync, which is worse than
238
+ * being rejected, because it works until it silently does not. Fix
239
+ * provider/actions/subscription-renew.json (or weaver's template/) and regenerate:
240
+ *
241
+ * npm run provider -- microsoft_outlook
242
+ */
243
+ /**
244
+ * Extend a change-notification subscription before it expires. The host's
245
+ * subscription machinery calls this when the lease is due.
246
+ *
247
+ * PATCH /v1.0/subscriptions/{id} —
248
+ * https://learn.microsoft.com/en-us/graph/api/subscription-update?view=graph-rest-1.0
249
+ *
250
+ * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,
251
+ * no fake/real branch. This describes the request; callConnector resolves the
252
+ * connection, picks the estate, and either calls Microsoft Outlook or calls
253
+ * the faker.
254
+ */
255
+
256
+ declare const SUBSCRIPTION_RENEW_OPERATION = "subscription_renew";
257
+ type SubscriptionRenewOptions = {
258
+ /** The node's resolved config. Keys: id, expirationDateTime. */
259
+ config: Record<string, unknown>;
260
+ credentials?: Record<string, string | undefined>;
261
+ mode?: RequestedMode;
262
+ connectionId?: string | null;
263
+ input?: unknown;
264
+ attempts?: number;
265
+ /** Override the transport. The only way to exercise this without a network. */
266
+ transport?: Transport;
267
+ };
268
+ declare function microsoftOutlookSubscriptionRenew(options: SubscriptionRenewOptions): Promise<ConnectorResult>;
269
+
270
+ /**
271
+ * GENERATED FILE — do not edit.
272
+ *
273
+ * Emitted from provider/triggers/calendar-changed.json by weaver's generator.
274
+ * A hand-edit here is destroyed by the next protocol sync, which is worse than
275
+ * being rejected, because it works until it silently does not. Fix
276
+ * provider/triggers/calendar-changed.json (or weaver's template/) and regenerate:
277
+ *
278
+ * npm run provider -- microsoft_outlook
279
+ */
280
+ /**
281
+ * Microsoft Outlook's subscription trigger — the delivery contract.
282
+ *
283
+ * Kept beside the service descriptor rather than inside a node, because the
284
+ * way a delivery is verified is a fact about MICROSOFT OUTLOOK. Two Microsoft
285
+ * Outlook triggers must not be able to disagree about how a delivery is
286
+ * verified.
287
+ *
288
+ * A SUBSCRIPTION: Microsoft Outlook stops delivering unless somebody renews
289
+ * it, forever, and if nobody does the workflow stops firing with no error
290
+ * anywhere. The lease below says where the expiry is read from and how early
291
+ * to renew; the host runs ONE renewal scheduler for every expiring trigger.
292
+ */
293
+
294
+ /** Where Microsoft Outlook echoes the token it was given when the subscription was created. */
295
+ declare const MICROSOFT_OUTLOOK_CALENDAR_CHANGED_TOKEN_SCHEME: SharedTokenScheme;
296
+ /**
297
+ * Microsoft Outlook's challenge before it delivers anything: a request
298
+ * carrying `?validationToken=…` must be answered with that value as plain
299
+ * text, or the subscription is never created.
300
+ * `answerMicrosoftOutlookHandshake` is the pure half; the host's routing layer
301
+ * asks it before mounting the route.
302
+ */
303
+ declare const MICROSOFT_OUTLOOK_CALENDAR_CHANGED_HANDSHAKE: ChallengeHandshake;
304
+ /**
305
+ * The lease this subscription carries: where the provider's expiry sits in the
306
+ * `subscription_create` response (`expirationDateTime`, rfc3339), how early
307
+ * the host renews, and what it calls when the lease is due. The host builds
308
+ * the value with the core's `leaseFromResponse` and runs one scheduler for
309
+ * every expiring trigger.
310
+ */
311
+ declare const MICROSOFT_OUTLOOK_CALENDAR_CHANGED_LEASE: LeaseDeclaration;
312
+ /**
313
+ * Which of this package's actions create, renew and stop the subscription.
314
+ * `renew` is null where the provider cannot renew and the host calls create
315
+ * again — after stopping the old one, and after re-listing, because
316
+ * notifications during the gap are gone.
317
+ */
318
+ declare const MICROSOFT_OUTLOOK_CALENDAR_CHANGED_SUBSCRIPTION: {
319
+ readonly create: "subscription_create";
320
+ readonly renew: "subscription_renew";
321
+ readonly stop: "subscription_delete";
322
+ };
323
+ declare const MICROSOFT_OUTLOOK_CALENDAR_CHANGED: TriggerDescriptor;
324
+ /**
325
+ * Verify one inbound Microsoft Outlook delivery.
326
+ *
327
+ * The host calls this BEFORE starting a run, with the body exactly as
328
+ * received. Re-serialised JSON changes key order and whitespace, and produces
329
+ * a mismatch that looks precisely like a wrong secret — hours of debugging the
330
+ * wrong thing.
331
+ *
332
+ * The secret is the connection's `clientState`.
333
+ */
334
+ declare function verifyMicrosoftOutlookDelivery(delivery: InboundDelivery, clientState: string | undefined, now?: number): Promise<WebhookVerification>;
335
+ /**
336
+ * Answer Microsoft Outlook's challenge — what to send back (200, text/plain,
337
+ * the decoded `validationToken`), or undefined when the request is not a
338
+ * challenge at all.
339
+ */
340
+ declare function answerMicrosoftOutlookHandshake(query: Record<string, string | string[] | undefined>): ReturnType<typeof handshakeResponse>;
341
+
342
+ export { CONNECTOR_API_VERSION, EVENT_GET_OPERATION, EVENT_LIST_OPERATION, type EventGetOptions, type EventListOptions, MICROSOFT_OUTLOOK, MICROSOFT_OUTLOOK_BASE_URLS, MICROSOFT_OUTLOOK_CALENDAR_CHANGED, MICROSOFT_OUTLOOK_CALENDAR_CHANGED_HANDSHAKE, MICROSOFT_OUTLOOK_CALENDAR_CHANGED_LEASE, MICROSOFT_OUTLOOK_CALENDAR_CHANGED_SUBSCRIPTION, MICROSOFT_OUTLOOK_CALENDAR_CHANGED_TOKEN_SCHEME, MICROSOFT_OUTLOOK_REQUIRES, SUBSCRIPTION_CREATE_OPERATION, SUBSCRIPTION_DELETE_OPERATION, SUBSCRIPTION_RENEW_OPERATION, type SubscriptionCreateOptions, type SubscriptionDeleteOptions, type SubscriptionRenewOptions, answerMicrosoftOutlookHandshake, microsoftOutlookAuthorize, microsoftOutlookEventGet, microsoftOutlookEventList, microsoftOutlookFaker, microsoftOutlookSubscriptionCreate, microsoftOutlookSubscriptionDelete, microsoftOutlookSubscriptionRenew, verifyMicrosoftOutlookDelivery };