@notionhq/apps 0.0.16 → 0.0.18

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 (77) hide show
  1. package/AGENTS.md +27 -0
  2. package/README.md +86 -36
  3. package/dist/connections.d.ts +39 -11
  4. package/dist/connections.d.ts.map +1 -1
  5. package/dist/connections.js +85 -21
  6. package/dist/index.d.ts +2 -0
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +2 -0
  9. package/dist/notion-as-code/database.d.ts +89 -48
  10. package/dist/notion-as-code/database.d.ts.map +1 -1
  11. package/dist/notion-as-code/database.js +132 -45
  12. package/dist/notion-as-code/database.test.d.ts +2 -0
  13. package/dist/notion-as-code/database.test.d.ts.map +1 -0
  14. package/dist/notion-as-code/handles.d.ts +2 -0
  15. package/dist/notion-as-code/handles.d.ts.map +1 -1
  16. package/dist/notion-as-code/handles.js +2 -0
  17. package/dist/notion-as-code/index.d.ts +5 -2
  18. package/dist/notion-as-code/index.d.ts.map +1 -1
  19. package/dist/notion-as-code/intents.d.ts +36 -3
  20. package/dist/notion-as-code/intents.d.ts.map +1 -1
  21. package/dist/notion-as-code/schema.d.ts +8 -4
  22. package/dist/notion-as-code/schema.d.ts.map +1 -1
  23. package/dist/notion-as-code/view.d.ts +12 -0
  24. package/dist/notion-as-code/view.d.ts.map +1 -0
  25. package/dist/notion-as-code/view.js +13 -0
  26. package/dist/notion-as-code/views-types.test.d.ts +2 -0
  27. package/dist/notion-as-code/views-types.test.d.ts.map +1 -0
  28. package/dist/notion-as-code/views.d.ts +488 -0
  29. package/dist/notion-as-code/views.d.ts.map +1 -0
  30. package/dist/notion-as-code/views.js +0 -0
  31. package/dist/oauth.d.ts +11 -0
  32. package/dist/oauth.d.ts.map +1 -0
  33. package/dist/oauth.js +26 -0
  34. package/dist/providers.generated.d.ts +26 -86
  35. package/dist/providers.generated.d.ts.map +1 -1
  36. package/dist/providers.generated.js +54 -66
  37. package/dist/sync.d.ts +33 -15
  38. package/dist/sync.d.ts.map +1 -1
  39. package/dist/sync.js +12 -0
  40. package/dist/triggers.generated.d.ts +3 -3
  41. package/dist/triggers.generated.d.ts.map +1 -1
  42. package/dist/workflow-state.d.ts +13 -0
  43. package/dist/workflow-state.d.ts.map +1 -0
  44. package/dist/workflow-state.js +107 -0
  45. package/dist/workflow.d.ts +56 -11
  46. package/dist/workflow.d.ts.map +1 -1
  47. package/dist/workflow.js +123 -10
  48. package/docs/BUILD.md +96 -0
  49. package/docs/CONNECTIONS.md +70 -22
  50. package/package.json +1 -1
  51. package/skills/connections/SKILL.md +7 -8
  52. package/skills/notion-as-code/SKILL.md +88 -50
  53. package/skills/sync/SKILL.md +21 -18
  54. package/skills/workflow/SKILL.md +52 -3
  55. package/src/cli/build.test.ts +124 -64
  56. package/src/connections.test.ts +205 -41
  57. package/src/connections.ts +144 -38
  58. package/src/index.ts +2 -0
  59. package/src/notion-as-code/database.test.ts +661 -0
  60. package/src/notion-as-code/database.ts +346 -129
  61. package/src/notion-as-code/handles.ts +2 -0
  62. package/src/notion-as-code/index.ts +71 -1
  63. package/src/notion-as-code/intents.ts +41 -4
  64. package/src/notion-as-code/schema.ts +11 -3
  65. package/src/notion-as-code/view.ts +23 -0
  66. package/src/notion-as-code/views-types.test.ts +59 -0
  67. package/src/notion-as-code/views.ts +573 -0
  68. package/src/oauth.ts +40 -0
  69. package/src/providers.generated.ts +68 -163
  70. package/src/sync.test.ts +295 -0
  71. package/src/sync.ts +85 -21
  72. package/src/triggers.generated.ts +4 -4
  73. package/src/workflow-connections-types.test.ts +16 -10
  74. package/src/workflow-state.ts +152 -0
  75. package/src/workflow-types.test.ts +88 -16
  76. package/src/workflow.test.ts +374 -18
  77. package/src/workflow.ts +211 -23
@@ -0,0 +1,488 @@
1
+ import type { NotionAsCodeIcon, NotionAsCodeProperty, ResourceId } from "./intents.js";
2
+ export type ViewType = "table" | "board" | "calendar" | "list" | "gallery" | "feed" | "timeline";
3
+ export type PropertyVisibility = "show" | "hide" | "hide_if_empty";
4
+ /**
5
+ * Format for a single visible property entry in a view (table / board / list /
6
+ * gallery / feed / timeline).
7
+ *
8
+ * `property` must be the `resourceId` of a property in the view's data
9
+ * source, matching the same convention used by board `groupBy.property`,
10
+ * `calendarBy`, and `timelineBy`.
11
+ *
12
+ */
13
+ export type PropertyFormat = {
14
+ /** ResourceId of the property in the view's data source. */
15
+ property: ResourceId;
16
+ visible?: boolean;
17
+ width?: number;
18
+ visibility?: PropertyVisibility;
19
+ };
20
+ /**
21
+ * Format for a single column entry in a board view.
22
+ *
23
+ * `property` must be the `resourceId` of a property in the view's data
24
+ * source, matching the same convention used by `PropertyFormat.property`
25
+ * and board `groupBy.property`.
26
+ *
27
+ */
28
+ export type GroupFormat = {
29
+ /** ResourceId of the property in the view's data source. */
30
+ property: ResourceId;
31
+ hidden?: boolean;
32
+ value?: {
33
+ type: string;
34
+ value?: string | boolean | number | null;
35
+ };
36
+ };
37
+ export type GroupByFormatBase = {
38
+ /** ResourceId of the property in the view's data source. */
39
+ property: ResourceId;
40
+ /** Whether groups with no pages are visible. Defaults to "show". */
41
+ emptyGroupVisibility?: "show" | "hide";
42
+ statusBy?: never;
43
+ };
44
+ export type SelectGroupByFormat = GroupByFormatBase & {
45
+ type: "select" | "multi_select";
46
+ };
47
+ export type StatusGroupByFormat = Omit<GroupByFormatBase, "statusBy"> & {
48
+ type: "status";
49
+ /** Groups status values by their canonical status group or individual option. */
50
+ statusBy?: "group" | "option";
51
+ };
52
+ export type PersonGroupByFormat = GroupByFormatBase & {
53
+ type: "person" | "created_by" | "last_edited_by";
54
+ };
55
+ export type DateGroupByFormat = GroupByFormatBase & {
56
+ type: "date" | "created_time" | "last_edited_time" | "last_visited_time";
57
+ };
58
+ export type TextGroupByFormat = GroupByFormatBase & {
59
+ type: "text" | "title" | "url" | "email" | "phone_number";
60
+ };
61
+ export type NumberGroupByFormat = GroupByFormatBase & {
62
+ type: "number";
63
+ };
64
+ export type CheckboxGroupByFormat = GroupByFormatBase & {
65
+ type: "checkbox";
66
+ };
67
+ export type RelationGroupByFormat = GroupByFormatBase & {
68
+ type: "relation";
69
+ };
70
+ export type LocationGroupByFormat = GroupByFormatBase & {
71
+ type: "location";
72
+ };
73
+ export type FormulaGroupByFormat = GroupByFormatBase & {
74
+ type: "formula";
75
+ };
76
+ /**
77
+ * Board view group-by configuration.
78
+ *
79
+ * `property` must be the `resourceId` of a property in the view's data
80
+ * source, matching the same convention used by `PropertyFormat.property`,
81
+ * `CalendarViewSchema.calendarBy`, and `TimelineViewSchema.timelineBy`.
82
+ *
83
+ */
84
+ export type GroupByFormat = SelectGroupByFormat | StatusGroupByFormat | PersonGroupByFormat | DateGroupByFormat | TextGroupByFormat | NumberGroupByFormat | CheckboxGroupByFormat | RelationGroupByFormat | LocationGroupByFormat | FormulaGroupByFormat;
85
+ export type CoverFormat = {
86
+ type: "page_cover";
87
+ } | {
88
+ type: "page_content";
89
+ } | {
90
+ type: "page_content_first";
91
+ } | {
92
+ type: "property";
93
+ property: string;
94
+ };
95
+ export type CoverSizeFormat = "small" | "medium" | "large";
96
+ export type CoverAspectFormat = "contain" | "cover";
97
+ export type DatabaseViewSortDirection = "ascending" | "descending";
98
+ /**
99
+ * Sort schema for ordering database view results.
100
+ * Sorts are applied in order — all pages are first sorted by the first sort,
101
+ * then ties are broken by the second sort, and so on.
102
+ */
103
+ export type PropertyViewSortSchema = {
104
+ propertyId: string;
105
+ direction: DatabaseViewSortDirection;
106
+ };
107
+ type PropertyType = NotionAsCodeProperty["type"];
108
+ export type DatePropertyTypes = "date" | "created_time" | "last_edited_time";
109
+ export type BasePropertyFilter = {
110
+ propertyId: string;
111
+ type: "property";
112
+ };
113
+ export type TextPropertyFilter = {
114
+ propertyType: Extract<PropertyType, "text" | "title" | "url" | "email" | "phone_number">;
115
+ operator: "string_is" | "string_is_not" | "string_contains" | "string_does_not_contain" | "string_starts_with" | "string_ends_with";
116
+ value: string;
117
+ } & BasePropertyFilter;
118
+ export type NumberPropertyFilter = {
119
+ propertyType: Extract<PropertyType, "number">;
120
+ operator: "number_equals" | "number_does_not_equal" | "number_greater_than" | "number_less_than" | "number_greater_than_or_equal_to" | "number_less_than_or_equal_to";
121
+ value: number;
122
+ } & BasePropertyFilter;
123
+ export type CheckboxPropertyFilter = {
124
+ propertyType: Extract<PropertyType, "checkbox">;
125
+ operator: "checkbox_is" | "checkbox_is_not";
126
+ value: boolean;
127
+ } & BasePropertyFilter;
128
+ export type SelectPropertyFilter = {
129
+ propertyType: Extract<PropertyType, "select">;
130
+ operator: "enum_is" | "enum_is_not";
131
+ value: Array<string>;
132
+ } & BasePropertyFilter;
133
+ export type MultiSelectPropertyFilter = {
134
+ propertyType: Extract<PropertyType, "multi_select">;
135
+ operator: "enum_contains" | "enum_does_not_contain" | "enum_contains_all";
136
+ value: Array<string>;
137
+ } & BasePropertyFilter;
138
+ export type StatusPropertyFilter = {
139
+ propertyType: Extract<PropertyType, "status">;
140
+ operator: "status_is" | "status_is_not";
141
+ value: Array<string>;
142
+ } & BasePropertyFilter;
143
+ /**
144
+ * Date presets resolved relative to today, matching options such as
145
+ * "Today", "Tomorrow", and "One week ago".
146
+ */
147
+ export type RelativeDatePreset = "today" | "tomorrow" | "yesterday" | "one_week_ago" | "one_week_from_now" | "one_month_ago" | "one_month_from_now";
148
+ /**
149
+ * The unit spanned by a relative "is relative to today" date range.
150
+ */
151
+ export type RelativeDateRangeUnit = "day" | "week" | "month" | "year";
152
+ /**
153
+ * Which date a date property filter compares against. Notion date properties
154
+ * can hold a range, and `end_date` reads the far end of it.
155
+ */
156
+ export type DateFilterMode = "start_date" | "end_date";
157
+ export type ExactDatePropertyFilterValue = {
158
+ type: "exact";
159
+ value: string;
160
+ };
161
+ export type RelativeDatePropertyFilterValue = {
162
+ type: "relative";
163
+ value: RelativeDatePreset;
164
+ };
165
+ export type RelativeToTodayDatePropertyFilterValue = {
166
+ type: "relative_to_today";
167
+ value: {
168
+ direction: "past" | "next" | "this";
169
+ count?: number;
170
+ unit: RelativeDateRangeUnit;
171
+ };
172
+ };
173
+ /**
174
+ * Value for the `date_is_within` operator, shown as "Is between" in the UI.
175
+ *
176
+ * Bounds are inclusive `YYYY-MM-DD` dates; supplying only one leaves the range
177
+ * open at the other end.
178
+ *
179
+ */
180
+ export type ExactRangeDatePropertyFilterValue = {
181
+ type: "exact_range";
182
+ value: {
183
+ startDate: string;
184
+ endDate?: string;
185
+ } | {
186
+ startDate?: string;
187
+ endDate: string;
188
+ };
189
+ };
190
+ /**
191
+ * Value for a date property filter.
192
+ *
193
+ * - `exact` matches a calendar date in `YYYY-MM-DD` format.
194
+ * - `relative` matches a date preset such as today or tomorrow.
195
+ * - `relative_to_today` matches a range relative to today. `unit` can be
196
+ * `day`, `week`, `month`, or `year`. `count` defaults to `1` when omitted
197
+ * and is unnecessary for `direction: "this"`.
198
+ * - `exact_range` matches a fixed calendar range, optionally open at one end.
199
+ *
200
+ */
201
+ export type DatePropertyFilterValue = ExactDatePropertyFilterValue | RelativeDatePropertyFilterValue | RelativeToTodayDatePropertyFilterValue | ExactRangeDatePropertyFilterValue;
202
+ /**
203
+ * Date property filter.
204
+ *
205
+ * Single-date operators accept `exact` or `relative` values.
206
+ * `date_is_relative_to` requires a `relative_to_today` value.
207
+ * `date_is_within` requires an `exact_range` value.
208
+ *
209
+ * `dateFilterMode` chooses which end of a date range the comparison reads.
210
+ * It defaults to `"start_date"`. `"end_date"` falls back to the start date for
211
+ * rows whose date is a single day rather than a range, and has no effect on
212
+ * `created_time` / `last_edited_time` properties, which are never ranges.
213
+ *
214
+ * @example Exact date
215
+ * {
216
+ * type: "property",
217
+ * propertyId: "due",
218
+ * propertyType: "date",
219
+ * operator: "date_is_on_or_after",
220
+ * value: { type: "exact", value: "2025-10-03" }
221
+ * }
222
+ *
223
+ * @example Relative date preset
224
+ * {
225
+ * type: "property",
226
+ * propertyId: "due",
227
+ * propertyType: "date",
228
+ * operator: "date_is",
229
+ * value: { type: "relative", value: "today" }
230
+ * }
231
+ *
232
+ * @example Next two months
233
+ * {
234
+ * type: "property",
235
+ * propertyId: "due",
236
+ * propertyType: "date",
237
+ * operator: "date_is_relative_to",
238
+ * value: { type: "relative_to_today", value: { direction: "next", count: 2, unit: "month" } }
239
+ * }
240
+ *
241
+ * @example Sprints that end this week
242
+ * {
243
+ * type: "property",
244
+ * propertyId: "sprint",
245
+ * propertyType: "date",
246
+ * operator: "date_is_relative_to",
247
+ * value: { type: "relative_to_today", value: { direction: "this", unit: "week" } },
248
+ * dateFilterMode: "end_date"
249
+ * }
250
+ *
251
+ * @example Fixed calendar range
252
+ * {
253
+ * type: "property",
254
+ * propertyId: "due",
255
+ * propertyType: "date",
256
+ * operator: "date_is_within",
257
+ * value: { type: "exact_range", value: { startDate: "2026-01-01", endDate: "2026-03-31" } }
258
+ * }
259
+ *
260
+ * @example Range left open at the end
261
+ * {
262
+ * type: "property",
263
+ * propertyId: "due",
264
+ * propertyType: "date",
265
+ * operator: "date_is_within",
266
+ * value: { type: "exact_range", value: { startDate: "2026-01-01" } }
267
+ * }
268
+ *
269
+ */
270
+ export type DatePropertyFilter = ({
271
+ propertyType: DatePropertyTypes;
272
+ operator: "date_is" | "date_is_before" | "date_is_after" | "date_is_on_or_before" | "date_is_on_or_after";
273
+ value: ExactDatePropertyFilterValue | RelativeDatePropertyFilterValue;
274
+ dateFilterMode?: DateFilterMode;
275
+ } & BasePropertyFilter) | ({
276
+ propertyType: DatePropertyTypes;
277
+ operator: "date_is_relative_to";
278
+ value: RelativeToTodayDatePropertyFilterValue;
279
+ dateFilterMode?: DateFilterMode;
280
+ } & BasePropertyFilter) | ({
281
+ propertyType: DatePropertyTypes;
282
+ operator: "date_is_within";
283
+ value: ExactRangeDatePropertyFilterValue;
284
+ dateFilterMode?: DateFilterMode;
285
+ } & BasePropertyFilter);
286
+ export type RelationPropertyFilter = {
287
+ propertyType: Extract<PropertyType, "relation">;
288
+ operator: "relation_contains" | "relation_does_not_contain";
289
+ /** References related pages, or the current page when rendered as a page-layout tab. */
290
+ value: {
291
+ type: "exact";
292
+ value: Array<ResourceId>;
293
+ } | {
294
+ type: "relative";
295
+ value: "this_page";
296
+ };
297
+ } & BasePropertyFilter;
298
+ /**
299
+ * Person property filter — matches rows whose person property contains (or
300
+ * does not contain) the viewer (the `"me"` template variable, resolved at
301
+ * read time).
302
+ */
303
+ export type PersonPropertyFilter = {
304
+ propertyType: Extract<PropertyType, "person" | "created_by" | "last_edited_by">;
305
+ operator: "person_contains" | "person_does_not_contain";
306
+ value: [{
307
+ type: "relative";
308
+ value: "me";
309
+ }];
310
+ } & BasePropertyFilter;
311
+ /**
312
+ * Filter schema for filtering database views by property values.
313
+ * Used in view definitions to specify which pages should be visible.
314
+ *
315
+ * Each filter targets a specific property by ID and applies a type-appropriate
316
+ * filter operator with a comparison value.
317
+ *
318
+ * @example Text property filter
319
+ * {
320
+ * propertyId: "name-prop",
321
+ * type: "property",
322
+ * propertyType: "text",
323
+ * operator: "string_contains",
324
+ * value: "Project"
325
+ * }
326
+ */
327
+ export type PropertyFilterSchema = TextPropertyFilter | NumberPropertyFilter | CheckboxPropertyFilter | SelectPropertyFilter | MultiSelectPropertyFilter | StatusPropertyFilter | DatePropertyFilter | RelationPropertyFilter | PersonPropertyFilter;
328
+ export type FilterSchema = Array<PropertyFilterSchema | AdvancedFilterSchema>;
329
+ export type AdvancedFilterSchema = {
330
+ type: "advanced";
331
+ operator: "and" | "or";
332
+ filters: FilterSchema;
333
+ };
334
+ /**
335
+ * Base view schema shared by all view types.
336
+ *
337
+ * `dataSourceResourceId` must reference a data source created by the script or
338
+ * supplied through existing resources.
339
+ *
340
+ * Database declarations require at least one data source or at least one view.
341
+ * A linked-only database may omit `datasources`, or use `datasources: {}`, only
342
+ * when its `views` list is nonempty. `{}`, `{ datasources: {} }`, and
343
+ * `{ datasources: {}, views: [] }` are invalid.
344
+ *
345
+ * @example
346
+ * // A linked-only database can use a typed table view for an explicit source.
347
+ * const linkedTableView: TableViewSchema = {
348
+ * resourceId: "issues-table-view",
349
+ * type: "table",
350
+ * dataSourceResourceId: "issues-source",
351
+ * properties: [{ property: "issue-title", visible: true }]
352
+ * };
353
+ * const linkedDatabase = notion.database("issues-linked-database", {
354
+ * parent: { type: "resourceId", resourceId: "project-page" },
355
+ * views: [linkedTableView]
356
+ * })
357
+ *
358
+ * @example
359
+ * // When creating a database with a data source
360
+ * const db = notion.database("my-database", {
361
+ * dataSourceResourceId: "my-datasource",
362
+ * name: "Main",
363
+ * schema: { Name: { resourceId: "my-title", type: "title" } }
364
+ * })
365
+ *
366
+ * // Views must reference that data source
367
+ * db.addView({
368
+ * resourceId: "my-table-view",
369
+ * type: "table",
370
+ * dataSourceResourceId: "my-datasource" // REQUIRED: matches data source above
371
+ * })
372
+ *
373
+ * @example
374
+ * // The explicit empty `datasources` form is valid with a nonempty view list.
375
+ * const explicitLinkedDatabase = notion.database("issues-linked-database-explicit", {
376
+ * datasources: {},
377
+ * views: [{
378
+ * resourceId: "issues-table-view-explicit",
379
+ * type: "table",
380
+ * dataSourceResourceId: "issues-source",
381
+ * properties: [{ property: "issue-title", visible: true }]
382
+ * }]
383
+ * })
384
+ */
385
+ export type BaseViewSchema = {
386
+ resourceId: ResourceId;
387
+ name?: string;
388
+ /**
389
+ * Notion icon shown in the view tab, including tabs in database page layouts.
390
+ * View icons do not support emoji or uploaded files. Omit to use the default
391
+ * icon for the view type.
392
+ */
393
+ icon?: Extract<NotionAsCodeIcon, {
394
+ type: "notion_icon";
395
+ }>;
396
+ type: ViewType;
397
+ /** Resource ID of a script-created or existing data source. */
398
+ dataSourceResourceId: ResourceId;
399
+ /**
400
+ * Optional resource ID of a template page in this view's data source to use as
401
+ * the view default template.
402
+ *
403
+ * The referenced page must be created with `template: true` and be parented to
404
+ * this same data source.
405
+ */
406
+ defaultTemplate?: ResourceId;
407
+ /**
408
+ * Optional: create this view as a linked view referenced by `<database>` tags
409
+ * in page content markdown or use it as a tab in a database layout. It does
410
+ * not attach to the database block's main view tabs.
411
+ */
412
+ ephemeral?: boolean;
413
+ sorts?: Array<PropertyViewSortSchema>;
414
+ /** Optional filter to control which pages appear in this view. */
415
+ filters?: FilterSchema;
416
+ /** Whether page icons are shown in this view. */
417
+ showPageIcon?: boolean;
418
+ };
419
+ export type TableViewSchema = BaseViewSchema & {
420
+ type: "table";
421
+ properties?: Array<PropertyFormat>;
422
+ wrap?: boolean;
423
+ groupBy?: GroupByFormat;
424
+ };
425
+ export type BoardViewSchema = BaseViewSchema & {
426
+ type: "board";
427
+ properties?: Array<PropertyFormat>;
428
+ groupBy?: GroupByFormat;
429
+ columns?: Array<GroupFormat>;
430
+ cover?: CoverFormat;
431
+ coverSize?: CoverSizeFormat;
432
+ coverAspect?: CoverAspectFormat;
433
+ wrap?: boolean;
434
+ };
435
+ export type CalendarViewSchema = BaseViewSchema & {
436
+ type: "calendar";
437
+ properties?: Array<PropertyFormat>;
438
+ /**
439
+ * REQUIRED: ResourceId of the date property to use for the calendar.
440
+ * Must match the `resourceId` of a date property in the database schema.
441
+ *
442
+ * @example
443
+ * calendarBy: "due-date-prop" // resourceId of a property of type "date"
444
+ */
445
+ calendarBy: ResourceId;
446
+ showWeekends?: boolean;
447
+ };
448
+ export type ListViewSchema = BaseViewSchema & {
449
+ type: "list";
450
+ properties?: Array<PropertyFormat>;
451
+ groupBy?: GroupByFormat;
452
+ };
453
+ export type GalleryViewSchema = BaseViewSchema & {
454
+ type: "gallery";
455
+ properties?: Array<PropertyFormat>;
456
+ cover?: CoverFormat;
457
+ coverSize?: CoverSizeFormat;
458
+ coverAspect?: CoverAspectFormat;
459
+ };
460
+ export type FeedViewSchema = BaseViewSchema & {
461
+ type: "feed";
462
+ properties?: Array<PropertyFormat>;
463
+ wrap?: boolean;
464
+ showAuthorByline?: boolean;
465
+ };
466
+ export type TimelineViewSchema = BaseViewSchema & {
467
+ type: "timeline";
468
+ properties?: Array<PropertyFormat>;
469
+ tableProperties?: Array<PropertyFormat>;
470
+ /**
471
+ * REQUIRED: ResourceId of the date property to use for the timeline start.
472
+ * Must match the `resourceId` of a date property in the database schema.
473
+ *
474
+ * @example
475
+ * timelineBy: "start-date-prop" // resourceId of a property of type "date"
476
+ */
477
+ timelineBy: ResourceId;
478
+ /**
479
+ * Optional: ResourceId of the date property to use for the timeline end
480
+ * (for date ranges). Must match the `resourceId` of a date property in
481
+ * the database schema.
482
+ */
483
+ timelineByEnd?: ResourceId;
484
+ showTable?: boolean;
485
+ };
486
+ export type ViewSchema = TableViewSchema | BoardViewSchema | CalendarViewSchema | ListViewSchema | GalleryViewSchema | FeedViewSchema | TimelineViewSchema;
487
+ export {};
488
+ //# sourceMappingURL=views.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"views.d.ts","sourceRoot":"","sources":["../../src/notion-as-code/views.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAGvF,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,UAAU,CAAC;AAEjG,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,MAAM,GAAG,eAAe,CAAC;AAEnE;;;;;;;;GAQG;AACH,MAAM,MAAM,cAAc,GAAG;IAC5B,4DAA4D;IAC5D,QAAQ,EAAE,UAAU,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,kBAAkB,CAAC;CAChC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,WAAW,GAAG;IACzB,4DAA4D;IAC5D,QAAQ,EAAE,UAAU,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,GAA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,cAAc,CAAC,CAAC;IACnC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,cAAc,GAAG;IACjD,IAAI,EAAE,UAAU,CAAC;IACjB,UAAU,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IACnC,eAAe,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IACxC;;;;;;OAMG;IACH,UAAU,EAAE,UAAU,CAAC;IACvB;;;;OAIG;IACH,aAAa,CAAC,EAAE,UAAU,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,UAAU,GACnB,eAAe,GACf,eAAe,GACf,kBAAkB,GAClB,cAAc,GACd,iBAAiB,GACjB,cAAc,GACd,kBAAkB,CAAC"}
File without changes
@@ -0,0 +1,11 @@
1
+ /** OAuth 2.0 provider configuration. The secret value is stored with the app. */
2
+ export type OAuthConfiguration = {
3
+ authorizationEndpoint: string;
4
+ tokenEndpoint: string;
5
+ clientId: string;
6
+ clientSecretEnv: string;
7
+ scope: string;
8
+ authorizationParams?: Record<string, string>;
9
+ accessTokenExpireMs?: number;
10
+ };
11
+ //# sourceMappingURL=oauth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../src/oauth.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,MAAM,MAAM,kBAAkB,GAAG;IAChC,qBAAqB,EAAE,MAAM,CAAC;IAC9B,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC"}
package/dist/oauth.js ADDED
@@ -0,0 +1,26 @@
1
+ function validateOAuthConfiguration(config) {
2
+ if (!config.clientId || !/^[A-Za-z_][A-Za-z0-9_]*$/.test(config.clientSecretEnv))
3
+ throw new Error("OAuth connections require a client ID and clientSecretEnv secret name.");
4
+ for (const endpoint of [config.authorizationEndpoint, config.tokenEndpoint]) {
5
+ const url = new URL(endpoint);
6
+ if (url.protocol !== "https:" || url.username || url.password || url.hash)
7
+ throw new Error("OAuth endpoints must be HTTPS URLs without credentials or fragments.");
8
+ }
9
+ if (config.accessTokenExpireMs !== void 0 && (!Number.isFinite(config.accessTokenExpireMs) || config.accessTokenExpireMs <= 0))
10
+ throw new Error("OAuth token expiry must be positive.");
11
+ if (Object.keys(config.authorizationParams ?? {}).some(
12
+ (key) => [
13
+ "state",
14
+ "redirect_uri",
15
+ "client_id",
16
+ "response_type",
17
+ "code_challenge",
18
+ "code_challenge_method",
19
+ "scope"
20
+ ].includes(key)
21
+ ))
22
+ throw new Error("OAuth authorization parameters cannot override protocol fields.");
23
+ }
24
+ export {
25
+ validateOAuthConfiguration
26
+ };
@@ -26,92 +26,32 @@ export declare const connections: {
26
26
  outlook: typeof outlook;
27
27
  salesforce: typeof salesforce;
28
28
  };
29
- export type ConnectionProviders = {
30
- calendar(key?: string): CalendarConnectionClient;
31
- slack(key?: string): SlackConnectionClient;
32
- googleDriveOauth(key?: string): GoogleDriveOauthConnectionClient;
33
- discord(key?: string): DiscordConnectionClient;
34
- cursor(key?: string): CursorConnectionClient;
35
- box(key?: string): BoxConnectionClient;
36
- confluence(key?: string): ConfluenceConnectionClient;
37
- gmail(key?: string): GmailConnectionClient;
38
- googleCalendar(key?: string): GoogleCalendarConnectionClient;
39
- googleDrive(key?: string): GoogleDriveConnectionClient;
40
- outlook(key?: string): OutlookConnectionClient;
41
- salesforce(key?: string): SalesforceConnectionClient;
29
+ export type ConnectionClients = {
30
+ calendar: CalendarConnectionClient;
31
+ slack: SlackConnectionClient;
32
+ googleDriveOauth: GoogleDriveOauthConnectionClient;
33
+ discord: DiscordConnectionClient;
34
+ cursor: CursorConnectionClient;
35
+ box: BoxConnectionClient;
36
+ confluence: ConfluenceConnectionClient;
37
+ gmail: GmailConnectionClient;
38
+ googleCalendar: GoogleCalendarConnectionClient;
39
+ googleDrive: GoogleDriveConnectionClient;
40
+ outlook: OutlookConnectionClient;
41
+ salesforce: SalesforceConnectionClient;
42
42
  };
43
- export declare function createConnectionProviders(invoker: (provider: string, key: string) => ConnectionActionInvoker): ConnectionProviders;
44
- declare function calendar(options?: {
45
- key?: never;
46
- }): WorkflowConnection<"calendar", "calendar">;
47
- declare function calendar<const TKey extends string>(options: {
48
- key: TKey;
49
- }): WorkflowConnection<"calendar", TKey>;
50
- declare function slack(options?: {
51
- key?: never;
52
- }): WorkflowConnection<"slack", "slack">;
53
- declare function slack<const TKey extends string>(options: {
54
- key: TKey;
55
- }): WorkflowConnection<"slack", TKey>;
56
- declare function googleDriveOauth(options?: {
57
- key?: never;
58
- }): WorkflowConnection<"googleDriveOauth", "googleDriveOauth">;
59
- declare function googleDriveOauth<const TKey extends string>(options: {
60
- key: TKey;
61
- }): WorkflowConnection<"googleDriveOauth", TKey>;
62
- declare function discord(options?: {
63
- key?: never;
64
- }): WorkflowConnection<"discord", "discord">;
65
- declare function discord<const TKey extends string>(options: {
66
- key: TKey;
67
- }): WorkflowConnection<"discord", TKey>;
68
- declare function cursor(options?: {
69
- key?: never;
70
- }): WorkflowConnection<"cursor", "cursor">;
71
- declare function cursor<const TKey extends string>(options: {
72
- key: TKey;
73
- }): WorkflowConnection<"cursor", TKey>;
74
- declare function box(options?: {
75
- key?: never;
76
- }): WorkflowConnection<"box", "box">;
77
- declare function box<const TKey extends string>(options: {
78
- key: TKey;
79
- }): WorkflowConnection<"box", TKey>;
80
- declare function confluence(options?: {
81
- key?: never;
82
- }): WorkflowConnection<"confluence", "confluence">;
83
- declare function confluence<const TKey extends string>(options: {
84
- key: TKey;
85
- }): WorkflowConnection<"confluence", TKey>;
86
- declare function gmail(options?: {
87
- key?: never;
88
- }): WorkflowConnection<"gmail", "gmail">;
89
- declare function gmail<const TKey extends string>(options: {
90
- key: TKey;
91
- }): WorkflowConnection<"gmail", TKey>;
92
- declare function googleCalendar(options?: {
93
- key?: never;
94
- }): WorkflowConnection<"googleCalendar", "googleCalendar">;
95
- declare function googleCalendar<const TKey extends string>(options: {
96
- key: TKey;
97
- }): WorkflowConnection<"googleCalendar", TKey>;
98
- declare function googleDrive(options?: {
99
- key?: never;
100
- }): WorkflowConnection<"googleDrive", "googleDrive">;
101
- declare function googleDrive<const TKey extends string>(options: {
102
- key: TKey;
103
- }): WorkflowConnection<"googleDrive", TKey>;
104
- declare function outlook(options?: {
105
- key?: never;
106
- }): WorkflowConnection<"outlook", "outlook">;
107
- declare function outlook<const TKey extends string>(options: {
108
- key: TKey;
109
- }): WorkflowConnection<"outlook", TKey>;
110
- declare function salesforce(options?: {
111
- key?: never;
112
- }): WorkflowConnection<"salesforce", "salesforce">;
113
- declare function salesforce<const TKey extends string>(options: {
114
- key: TKey;
115
- }): WorkflowConnection<"salesforce", TKey>;
43
+ export declare function createConnectionClient(provider: string, invoker: ConnectionActionInvoker): ConnectionClients[keyof ConnectionClients];
44
+ declare function calendar(): WorkflowConnection<"calendar">;
45
+ declare function slack(): WorkflowConnection<"slack">;
46
+ declare function googleDriveOauth(): WorkflowConnection<"googleDriveOauth">;
47
+ declare function discord(): WorkflowConnection<"discord">;
48
+ declare function cursor(): WorkflowConnection<"cursor">;
49
+ declare function box(): WorkflowConnection<"box">;
50
+ declare function confluence(): WorkflowConnection<"confluence">;
51
+ declare function gmail(): WorkflowConnection<"gmail">;
52
+ declare function googleCalendar(): WorkflowConnection<"googleCalendar">;
53
+ declare function googleDrive(): WorkflowConnection<"googleDrive">;
54
+ declare function outlook(): WorkflowConnection<"outlook">;
55
+ declare function salesforce(): WorkflowConnection<"salesforce">;
116
56
  export {};
117
57
  //# sourceMappingURL=providers.generated.d.ts.map