@superdurable/connector-notion 0.1.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.
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # Notion TypeScript connector
2
2
 
3
- `@superdurable/connector-notion@0.1.0` implements Notion's `search`, `queryDatabase`, and `getPage` Queries and `createPage` and `updatePageProperties` Mutations. The manifest generates operation models, Step factories, connection bindings, mock cases, and `dex-connector.json`. Import scripted mocks from `@superdurable/connector-notion/mock`.
3
+ `@superdurable/connector-notion@0.2.0` implements Notion's `search`, `queryDatabase`, and `getPage` Queries, `createPage` and `updatePageProperties` Mutations, and, from 0.2.0, the `databaseRowChanged` poll Trigger. It requires `@superdurable/connectors-sdk` 0.12.0 and `@superdurable/dex` 1.45.4 or newer. The manifest generates operation models, Step factories, connection bindings, mock cases, and `dex-connector.json`. Import scripted mocks from `@superdurable/connector-notion/mock`.
4
4
 
5
5
  ## Configure a connection
6
6
 
7
- Create a Notion internal connection at [Notion's developer portal](https://app.notion.com/developers/connections) under **Build → Internal connections**. Enable **Read content**, **Update content**, and **Insert content**, then share each database or page with the connection. Save its API token in the secret `api_token` field in Dex Web **Connections**. Keep the token out of Flow inputs, Attributes, and logs. `endpoint` and `maxResponseBytes` may be left blank for the manifest defaults.
7
+ Create a Notion internal connection at [Notion's developer portal](https://app.notion.com/developers/connections) under **Build → Internal connections**. Enable **Read content**, **Update content**, and **Insert content**, then share each database or page with the connection. Save its API token in the secret `api_token` field in Dex Web **Connections**. Keep the token out of Flow inputs, Attributes, and logs. `endpoint`, `maxResponseBytes`, `pollInterval`, and `pollPageSize` may be left blank for the manifest defaults; `pollInterval` must be at least 5 seconds and `pollPageSize` 1 to 100.
8
8
 
9
9
  A database contains one or more data sources. `queryDatabase` and `createPage` accept either a data source ID or a database ID; a database ID triggers one lookup and requires exactly one data source. A page ID accepts dashed or compact hex and a Notion page URL. Search is title-only and may lag recently created pages.
10
10
 
@@ -12,8 +12,22 @@ A database contains one or more data sources. `queryDatabase` and `createPage` a
12
12
 
13
13
  The [search-pages example](examples/search-pages/README.md) loads the static `notion` connection and runs the generated `newSearchStep` through a Dex Worker. It persists the request and result as Attributes. The optional `noMatch` and rejection branches remain unwired, so selecting one fails the Flow. The API token stays in the connection credential source.
14
14
 
15
+ ## databaseRowChanged Trigger
16
+
17
+ `databaseRowChanged` delivers each row created or edited in one data source, at parity with the Go Trigger, on the TypeScript Connector SDK's durable poll Trigger kit (`@superdurable/connectors-sdk/pollingtrigger`). It polls `POST /v1/data_sources/{id}/query` with a `last_edited_time` `on_or_after` filter, sorted ascending, and needs only the **Read content** capability.
18
+
19
+ - **Baseline.** The first poll reads the newest `last_edited_time` with one descending one-row query, then remembers every row edited in the two minutes before it, so no existing row is delivered. An empty data source starts at the Unix epoch, not the host clock.
20
+ - **Cursor.** The cursor holds the newest `last_edited_time` read, 96-bit digests of the rows seen inside the two-minute lookback, and Notion's `start_cursor` while a query spans pages. Each poll queries from the high water minus the lookback, so shared, rounded, or late-indexed timestamps are delivered once. At most 2,000 seen rows and 48 KiB of them are kept; an evicted row can repeat with the same event ID, which a Dex Flow target does not start twice.
21
+ - **Events.** `DatabaseRowChangedEvent` carries the data source ID, the row as `Page`, and `changeKind` (`DatabaseRowChangeKind`): `created` when `created_time` equals `last_edited_time`, else `updated`. The event ID hashes the data source, row ID, and `last_edited_time`. Trashed and archived rows are not returned by the query, so they are not delivered.
22
+ - **Limits.** Each request reads `pollPageSize` rows and a poll follows at most ten pages; a sequence ends at Notion's 10,000-row query limit.
23
+ - **Failures.** 429 `rate_limited` and 529 `service_overload` pause every binding of the connection for `Retry-After`. A 400 `validation_error` for a stored `start_cursor` restarts the query without a gap; a cursor for another data source or an undecodable one records a new baseline. A 404, a revoked token, or `public_api_request_blocked` backs off per binding.
24
+
25
+ `newProjectDatabaseRowTriggerRunner(project, connectionName, config, options)` opens the project connection and records each change in the binding's project Trigger inbox before the cursor commits in its project poll cursor; it requires a saved data source. `newDatabaseRowTriggerRunner` takes targets and cursor stores directly, and `newDatabaseRowChangedTrigger` keeps the cursor in memory, so each start records a new baseline. `defineDatabaseRowChangedTriggerBinding` declares the binding, and `decodeDatabaseRowChangedEventPayload` decodes inbox payloads written by Go, Python, or TypeScript. `NotionClientOptions.logger` receives the poll records, never row contents or the API token.
26
+
27
+ The fetcher sends the same queries, commits the same cursor documents byte for byte, and derives the same Trigger event IDs as Go, so Go and TypeScript replicas can share one binding's cursor and inbox; `test/database_row_go_fixtures.test.ts` replays polls recorded from the Go fetcher. The [row-changed example](examples/row-changed/README.md) starts one `NotionDatabaseRowChangeTypeScript` Flow per row version and has real Dex integration tests.
28
+
15
29
  ## Failure behavior and verification
16
30
 
17
31
  Reads retry transient transport, 408, 409, 429, 529, and server errors. `updatePageProperties` repeats absolute values safely and retries transient failures. `createPage` uses the Connector SDK single-dispatch fence; an ambiguous write without a confirmable page ID selects `uncertain`, while a known accepted ID can be read back. Conclusive provider rejections select operation branches. Notion error message text is not exposed.
18
32
 
19
- Run `npm ci && npm run check`. With a local `dexcli dev` service, set `DEX_FLOW_SERVICE_ADDRESS` and run `npm run test:integration`. The conformance suite replays Go-recorded provider requests and results. Live Notion authorization and response behavior remain unverified.
33
+ Run `npm ci && npm run check`. With a local `dexcli dev` service, set `DEX_FLOW_SERVICE_ADDRESS` and run `npm run test:integration`. The conformance suite replays Go-recorded provider requests and results. Live Notion authorization, response behavior, and data source query polling remain unverified.
@@ -1,16 +1,18 @@
1
1
  {
2
2
  "connectorId": "notion",
3
- "releaseTag": "connectors/notion/go/v0.24.0",
3
+ "releaseTag": "connectors/notion/go/v0.25.0",
4
4
  "package": {
5
5
  "ecosystem": "npm",
6
6
  "name": "@superdurable/connector-notion",
7
- "version": "0.1.0"
7
+ "version": "0.2.0"
8
8
  },
9
9
  "factories": [
10
10
  {
11
11
  "name": "newSearchStep",
12
12
  "kind": "query",
13
13
  "operationId": "search",
14
+ "inputType": "SearchInput",
15
+ "description": "Search one bounded page of the pages and data sources shared with the connection by title, continuing with Notion's cursor.",
14
16
  "fields": {
15
17
  "stepType": "stepType",
16
18
  "annotations": "annotations",
@@ -43,12 +45,49 @@
43
45
  "field": "defect",
44
46
  "optional": true
45
47
  }
46
- ]
48
+ ],
49
+ "inputSchema": {
50
+ "additionalProperties": false,
51
+ "description": "SearchInput selects one page of title matches among the pages and data sources shared with the connection.",
52
+ "properties": {
53
+ "objectType": {
54
+ "description": "ObjectType limits the results to pages or data sources; blank returns both.",
55
+ "enum": [
56
+ "data_source",
57
+ "page"
58
+ ],
59
+ "type": "string"
60
+ },
61
+ "pageSize": {
62
+ "description": "PageSize is the number of results to request, 1 to 100; zero requests 20.",
63
+ "type": "integer"
64
+ },
65
+ "query": {
66
+ "description": "Query is matched against titles; blank lists every shared page and data source.",
67
+ "type": "string"
68
+ },
69
+ "sortDirection": {
70
+ "description": "SortDirection orders by last edit time; blank keeps Notion's relevance order.",
71
+ "enum": [
72
+ "ascending",
73
+ "descending"
74
+ ],
75
+ "type": "string"
76
+ },
77
+ "startCursor": {
78
+ "description": "StartCursor continues a previous search with the same input; blank reads the first page.",
79
+ "type": "string"
80
+ }
81
+ },
82
+ "type": "object"
83
+ }
47
84
  },
48
85
  {
49
86
  "name": "newQueryDatabaseStep",
50
87
  "kind": "query",
51
88
  "operationId": "queryDatabase",
89
+ "inputType": "QueryDatabaseInput",
90
+ "description": "Query one bounded page of a database's rows through its data source with a typed filter and sorts, continuing with Notion's cursor.",
52
91
  "fields": {
53
92
  "stepType": "stepType",
54
93
  "annotations": "annotations",
@@ -81,12 +120,194 @@
81
120
  "field": "defect",
82
121
  "optional": true
83
122
  }
84
- ]
123
+ ],
124
+ "inputSchema": {
125
+ "$defs": {
126
+ "QueryFilter": {
127
+ "additionalProperties": false,
128
+ "description": "QueryFilter is a typed Notion data source filter. Set exactly one of Property, Timestamp, And, and Or. A property condition names the property, its Type, a Condition the type supports, and the one value field the condition takes: Text for title, rich_text, url, email, phone_number, select, status, and multi_select; Number for number and unique_id; Checkbox for checkbox; Date for date; and ID for people and relation. FilterIsEmpty, FilterIsNotEmpty, and the relative date conditions such as FilterPastWeek take no value. A timestamp condition sets Timestamp, a date Condition, and Date. And and Or combine up to two levels of nested filters. An unsupported combination selects defect before any request is sent.",
129
+ "properties": {
130
+ "and": {
131
+ "description": "And matches pages that match every filter.",
132
+ "items": {
133
+ "$ref": "#/$defs/QueryFilter"
134
+ },
135
+ "type": "array"
136
+ },
137
+ "checkbox": {
138
+ "description": "Checkbox is a checkbox value.",
139
+ "type": "boolean"
140
+ },
141
+ "condition": {
142
+ "description": "Condition is the comparison.",
143
+ "enum": [
144
+ "after",
145
+ "before",
146
+ "contains",
147
+ "does_not_contain",
148
+ "does_not_equal",
149
+ "ends_with",
150
+ "equals",
151
+ "greater_than",
152
+ "greater_than_or_equal_to",
153
+ "is_empty",
154
+ "is_not_empty",
155
+ "less_than",
156
+ "less_than_or_equal_to",
157
+ "next_month",
158
+ "next_week",
159
+ "next_year",
160
+ "on_or_after",
161
+ "on_or_before",
162
+ "past_month",
163
+ "past_week",
164
+ "past_year",
165
+ "starts_with",
166
+ "this_week"
167
+ ],
168
+ "type": "string"
169
+ },
170
+ "date": {
171
+ "description": "Date is a YYYY-MM-DD date or RFC 3339 date-time value.",
172
+ "type": "string"
173
+ },
174
+ "id": {
175
+ "description": "ID is a Notion user ID for people or a page ID for relation.",
176
+ "type": "string"
177
+ },
178
+ "number": {
179
+ "description": "Number is a number value.",
180
+ "type": "number"
181
+ },
182
+ "or": {
183
+ "description": "Or matches pages that match any filter.",
184
+ "items": {
185
+ "$ref": "#/$defs/QueryFilter"
186
+ },
187
+ "type": "array"
188
+ },
189
+ "property": {
190
+ "description": "Property is the property name or ID that the condition reads.",
191
+ "type": "string"
192
+ },
193
+ "text": {
194
+ "description": "Text is a text or option-name value.",
195
+ "type": "string"
196
+ },
197
+ "timestamp": {
198
+ "description": "Timestamp filters on the page's creation or last edit time instead of a property.",
199
+ "enum": [
200
+ "created_time",
201
+ "last_edited_time"
202
+ ],
203
+ "type": "string"
204
+ },
205
+ "type": {
206
+ "description": "Type is the property's Notion type, which selects the filter's shape.",
207
+ "enum": [
208
+ "checkbox",
209
+ "created_by",
210
+ "created_time",
211
+ "date",
212
+ "email",
213
+ "files",
214
+ "formula",
215
+ "last_edited_by",
216
+ "last_edited_time",
217
+ "multi_select",
218
+ "number",
219
+ "people",
220
+ "phone_number",
221
+ "relation",
222
+ "rich_text",
223
+ "rollup",
224
+ "select",
225
+ "status",
226
+ "title",
227
+ "unique_id",
228
+ "url",
229
+ "verification"
230
+ ],
231
+ "type": "string"
232
+ }
233
+ },
234
+ "type": "object"
235
+ },
236
+ "QuerySort": {
237
+ "additionalProperties": false,
238
+ "description": "QuerySort orders query results by a property or a timestamp. Set exactly one of Property and Timestamp.",
239
+ "properties": {
240
+ "direction": {
241
+ "description": "Direction is ascending or descending; blank is ascending.",
242
+ "enum": [
243
+ "ascending",
244
+ "descending"
245
+ ],
246
+ "type": "string"
247
+ },
248
+ "property": {
249
+ "description": "Property is the property name or ID to sort by.",
250
+ "type": "string"
251
+ },
252
+ "timestamp": {
253
+ "description": "Timestamp sorts by the page's creation or last edit time.",
254
+ "enum": [
255
+ "created_time",
256
+ "last_edited_time"
257
+ ],
258
+ "type": "string"
259
+ }
260
+ },
261
+ "type": "object"
262
+ }
263
+ },
264
+ "additionalProperties": false,
265
+ "description": "QueryDatabaseInput selects one page of a database's rows. Set exactly one of DataSourceID and DatabaseID.",
266
+ "properties": {
267
+ "dataSourceId": {
268
+ "description": "DataSourceID is the data source to query. In Notion, open the database's settings menu > Manage data sources and choose Copy data source ID.",
269
+ "type": "string"
270
+ },
271
+ "databaseId": {
272
+ "description": "DatabaseID is the database ID from its URL, or the URL itself; the database must hold exactly one data source.",
273
+ "type": "string"
274
+ },
275
+ "filter": {
276
+ "$ref": "#/$defs/QueryFilter",
277
+ "description": "Filter optionally limits the rows; nil returns every row."
278
+ },
279
+ "pageSize": {
280
+ "description": "PageSize is the number of rows to request, 1 to 100; zero requests 50.",
281
+ "type": "integer"
282
+ },
283
+ "properties": {
284
+ "description": "Properties optionally lists the property names or IDs to return, at most 100; blank returns every property.",
285
+ "items": {
286
+ "type": "string"
287
+ },
288
+ "type": "array"
289
+ },
290
+ "sorts": {
291
+ "description": "Sorts optionally orders the rows; Notion guarantees no order without one.",
292
+ "items": {
293
+ "$ref": "#/$defs/QuerySort"
294
+ },
295
+ "type": "array"
296
+ },
297
+ "startCursor": {
298
+ "description": "StartCursor continues a previous query with the same input; blank reads the first page.",
299
+ "type": "string"
300
+ }
301
+ },
302
+ "type": "object"
303
+ }
85
304
  },
86
305
  {
87
306
  "name": "newGetPageStep",
88
307
  "kind": "query",
89
308
  "operationId": "getPage",
309
+ "inputType": "GetPageInput",
310
+ "description": "Read one page's properties and a bounded plain-text rendering of its top-level blocks.",
90
311
  "fields": {
91
312
  "stepType": "stepType",
92
313
  "annotations": "annotations",
@@ -119,12 +340,40 @@
119
340
  "field": "defect",
120
341
  "optional": true
121
342
  }
122
- ]
343
+ ],
344
+ "inputSchema": {
345
+ "additionalProperties": false,
346
+ "description": "GetPageInput selects one page.",
347
+ "properties": {
348
+ "maxBlocks": {
349
+ "description": "MaxBlocks bounds the top-level blocks read, 1 to 500; zero reads up to 100.",
350
+ "type": "integer"
351
+ },
352
+ "maxTextCharacters": {
353
+ "description": "MaxTextCharacters bounds Content.Text, 1 to 100,000 characters; zero keeps up to 20,000.",
354
+ "type": "integer"
355
+ },
356
+ "pageId": {
357
+ "description": "PageID is the page ID, with or without dashes, or the page's Notion URL.",
358
+ "type": "string"
359
+ },
360
+ "skipContent": {
361
+ "description": "ShouldSkipContent reads only the page's properties, without its blocks.",
362
+ "type": "boolean"
363
+ }
364
+ },
365
+ "required": [
366
+ "pageId"
367
+ ],
368
+ "type": "object"
369
+ }
123
370
  },
124
371
  {
125
372
  "name": "newCreatePageStep",
126
373
  "kind": "mutation",
127
374
  "operationId": "createPage",
375
+ "inputType": "CreatePageInput",
376
+ "description": "Create one database row with typed property values and optional plain-text body paragraphs. Sync durability persists the single-dispatch fence before sending so retries cannot duplicate an unconfirmed page.",
128
377
  "fields": {
129
378
  "stepType": "stepType",
130
379
  "annotations": "annotations",
@@ -162,12 +411,155 @@
162
411
  "field": "defect",
163
412
  "optional": true
164
413
  }
165
- ]
414
+ ],
415
+ "inputSchema": {
416
+ "$defs": {
417
+ "DateRange": {
418
+ "additionalProperties": false,
419
+ "description": "DateRange is a Notion date value: one date or date-time, or a range.",
420
+ "properties": {
421
+ "end": {
422
+ "description": "End optionally ends a range, in the same format as Start; blank means a single date.",
423
+ "type": "string"
424
+ },
425
+ "start": {
426
+ "description": "Start is a YYYY-MM-DD date or an RFC 3339 date-time such as 2026-09-30T14:00:00Z.",
427
+ "type": "string"
428
+ },
429
+ "timeZone": {
430
+ "description": "TimeZone optionally names an IANA time zone, such as America/Los_Angeles, for a date-time without an offset; blank uses the offset in Start.",
431
+ "type": "string"
432
+ }
433
+ },
434
+ "required": [
435
+ "start"
436
+ ],
437
+ "type": "object"
438
+ },
439
+ "PropertyValue": {
440
+ "additionalProperties": false,
441
+ "description": "PropertyValue is one typed property value written to a Notion page. Type selects exactly one value field: Text for title and rich_text, Number, Checkbox, Option for select and status, Options for multi_select, Date, URL, Email, PhoneNumber, UserIDs for people, and PageIDs for relation. Setting a field that does not belong to Type selects defect. The zero value of the type's field clears the property, except that a checkbox needs an explicit value and a status needs an option name. Prefer the constructors such as TitleValue and SelectValue, and ClearedValue to clear a property on purpose. Writes replace the property's whole value: a multi_select, people, or relation value lists every entry the property keeps, so repeating the same write leaves the page unchanged.",
442
+ "properties": {
443
+ "checkbox": {
444
+ "description": "Checkbox is a checkbox value.",
445
+ "type": "boolean"
446
+ },
447
+ "date": {
448
+ "$ref": "#/$defs/DateRange",
449
+ "description": "Date is a date value."
450
+ },
451
+ "email": {
452
+ "description": "Email is a plain email address.",
453
+ "type": "string"
454
+ },
455
+ "number": {
456
+ "description": "Number is a finite number value.",
457
+ "type": "number"
458
+ },
459
+ "option": {
460
+ "description": "Option is a select or status option name. Notion adds a missing select option to the data source; a status option must already exist.",
461
+ "type": "string"
462
+ },
463
+ "options": {
464
+ "description": "Options lists multi_select option names, at most 100, without commas.",
465
+ "items": {
466
+ "type": "string"
467
+ },
468
+ "type": "array"
469
+ },
470
+ "pageIds": {
471
+ "description": "PageIDs lists related page IDs for a relation value, at most 100.",
472
+ "items": {
473
+ "type": "string"
474
+ },
475
+ "type": "array"
476
+ },
477
+ "phoneNumber": {
478
+ "description": "PhoneNumber is free-form phone text, such as +1 206 555 0100.",
479
+ "type": "string"
480
+ },
481
+ "text": {
482
+ "description": "Text is the plain text of a title or rich_text value, at most 20,000 characters.",
483
+ "type": "string"
484
+ },
485
+ "type": {
486
+ "description": "Type is the property's Notion type.",
487
+ "enum": [
488
+ "checkbox",
489
+ "created_by",
490
+ "created_time",
491
+ "date",
492
+ "email",
493
+ "files",
494
+ "formula",
495
+ "last_edited_by",
496
+ "last_edited_time",
497
+ "multi_select",
498
+ "number",
499
+ "people",
500
+ "phone_number",
501
+ "relation",
502
+ "rich_text",
503
+ "rollup",
504
+ "select",
505
+ "status",
506
+ "title",
507
+ "unique_id",
508
+ "url",
509
+ "verification"
510
+ ],
511
+ "type": "string"
512
+ },
513
+ "url": {
514
+ "description": "URL is an absolute URL value.",
515
+ "type": "string"
516
+ },
517
+ "userIds": {
518
+ "description": "UserIDs lists Notion user IDs for a people value, at most 100.",
519
+ "items": {
520
+ "type": "string"
521
+ },
522
+ "type": "array"
523
+ }
524
+ },
525
+ "required": [
526
+ "type"
527
+ ],
528
+ "type": "object"
529
+ }
530
+ },
531
+ "additionalProperties": false,
532
+ "description": "CreatePageInput describes one database row. Set exactly one of DataSourceID and DatabaseID.",
533
+ "properties": {
534
+ "bodyText": {
535
+ "description": "BodyText is optional plain text for the page body, at most 50,000 characters in at most 100 paragraphs. Blank lines separate paragraphs, other line breaks stay inside a paragraph, and the text is never read as markup.",
536
+ "type": "string"
537
+ },
538
+ "dataSourceId": {
539
+ "description": "DataSourceID is the data source that receives the row. In Notion, open the database's settings menu > Manage data sources and choose Copy data source ID.",
540
+ "type": "string"
541
+ },
542
+ "databaseId": {
543
+ "description": "DatabaseID is the database ID from its URL, or the URL itself; the database must hold exactly one data source.",
544
+ "type": "string"
545
+ },
546
+ "properties": {
547
+ "additionalProperties": {
548
+ "$ref": "#/$defs/PropertyValue"
549
+ },
550
+ "description": "Properties maps property names or IDs to typed values, at most 100. A property left out keeps the data source's default, such as an empty title.",
551
+ "type": "object"
552
+ }
553
+ },
554
+ "type": "object"
555
+ }
166
556
  },
167
557
  {
168
558
  "name": "newUpdatePagePropertiesStep",
169
559
  "kind": "mutation",
170
560
  "operationId": "updatePageProperties",
561
+ "inputType": "UpdatePagePropertiesInput",
562
+ "description": "Set typed property values on one page with absolute values, so a repeated or duplicated update leaves the page unchanged.",
171
563
  "fields": {
172
564
  "stepType": "stepType",
173
565
  "annotations": "annotations",
@@ -200,7 +592,157 @@
200
592
  "field": "defect",
201
593
  "optional": true
202
594
  }
203
- ]
595
+ ],
596
+ "inputSchema": {
597
+ "$defs": {
598
+ "DateRange": {
599
+ "additionalProperties": false,
600
+ "description": "DateRange is a Notion date value: one date or date-time, or a range.",
601
+ "properties": {
602
+ "end": {
603
+ "description": "End optionally ends a range, in the same format as Start; blank means a single date.",
604
+ "type": "string"
605
+ },
606
+ "start": {
607
+ "description": "Start is a YYYY-MM-DD date or an RFC 3339 date-time such as 2026-09-30T14:00:00Z.",
608
+ "type": "string"
609
+ },
610
+ "timeZone": {
611
+ "description": "TimeZone optionally names an IANA time zone, such as America/Los_Angeles, for a date-time without an offset; blank uses the offset in Start.",
612
+ "type": "string"
613
+ }
614
+ },
615
+ "required": [
616
+ "start"
617
+ ],
618
+ "type": "object"
619
+ },
620
+ "PropertyValue": {
621
+ "additionalProperties": false,
622
+ "description": "PropertyValue is one typed property value written to a Notion page. Type selects exactly one value field: Text for title and rich_text, Number, Checkbox, Option for select and status, Options for multi_select, Date, URL, Email, PhoneNumber, UserIDs for people, and PageIDs for relation. Setting a field that does not belong to Type selects defect. The zero value of the type's field clears the property, except that a checkbox needs an explicit value and a status needs an option name. Prefer the constructors such as TitleValue and SelectValue, and ClearedValue to clear a property on purpose. Writes replace the property's whole value: a multi_select, people, or relation value lists every entry the property keeps, so repeating the same write leaves the page unchanged.",
623
+ "properties": {
624
+ "checkbox": {
625
+ "description": "Checkbox is a checkbox value.",
626
+ "type": "boolean"
627
+ },
628
+ "date": {
629
+ "$ref": "#/$defs/DateRange",
630
+ "description": "Date is a date value."
631
+ },
632
+ "email": {
633
+ "description": "Email is a plain email address.",
634
+ "type": "string"
635
+ },
636
+ "number": {
637
+ "description": "Number is a finite number value.",
638
+ "type": "number"
639
+ },
640
+ "option": {
641
+ "description": "Option is a select or status option name. Notion adds a missing select option to the data source; a status option must already exist.",
642
+ "type": "string"
643
+ },
644
+ "options": {
645
+ "description": "Options lists multi_select option names, at most 100, without commas.",
646
+ "items": {
647
+ "type": "string"
648
+ },
649
+ "type": "array"
650
+ },
651
+ "pageIds": {
652
+ "description": "PageIDs lists related page IDs for a relation value, at most 100.",
653
+ "items": {
654
+ "type": "string"
655
+ },
656
+ "type": "array"
657
+ },
658
+ "phoneNumber": {
659
+ "description": "PhoneNumber is free-form phone text, such as +1 206 555 0100.",
660
+ "type": "string"
661
+ },
662
+ "text": {
663
+ "description": "Text is the plain text of a title or rich_text value, at most 20,000 characters.",
664
+ "type": "string"
665
+ },
666
+ "type": {
667
+ "description": "Type is the property's Notion type.",
668
+ "enum": [
669
+ "checkbox",
670
+ "created_by",
671
+ "created_time",
672
+ "date",
673
+ "email",
674
+ "files",
675
+ "formula",
676
+ "last_edited_by",
677
+ "last_edited_time",
678
+ "multi_select",
679
+ "number",
680
+ "people",
681
+ "phone_number",
682
+ "relation",
683
+ "rich_text",
684
+ "rollup",
685
+ "select",
686
+ "status",
687
+ "title",
688
+ "unique_id",
689
+ "url",
690
+ "verification"
691
+ ],
692
+ "type": "string"
693
+ },
694
+ "url": {
695
+ "description": "URL is an absolute URL value.",
696
+ "type": "string"
697
+ },
698
+ "userIds": {
699
+ "description": "UserIDs lists Notion user IDs for a people value, at most 100.",
700
+ "items": {
701
+ "type": "string"
702
+ },
703
+ "type": "array"
704
+ }
705
+ },
706
+ "required": [
707
+ "type"
708
+ ],
709
+ "type": "object"
710
+ }
711
+ },
712
+ "additionalProperties": false,
713
+ "description": "UpdatePagePropertiesInput sets property values on one page. Properties left out keep their values; every listed value replaces the property's whole value, so repeating the same input leaves the page unchanged.",
714
+ "properties": {
715
+ "pageId": {
716
+ "description": "PageID is the page ID, with or without dashes, or the page's Notion URL.",
717
+ "type": "string"
718
+ },
719
+ "properties": {
720
+ "additionalProperties": {
721
+ "$ref": "#/$defs/PropertyValue"
722
+ },
723
+ "description": "Properties maps property names or IDs to typed values, 1 to 100. Use ClearedValue to empty a property.",
724
+ "type": [
725
+ "object",
726
+ "null"
727
+ ]
728
+ }
729
+ },
730
+ "required": [
731
+ "pageId",
732
+ "properties"
733
+ ],
734
+ "type": "object"
735
+ }
736
+ },
737
+ {
738
+ "name": "defineDatabaseRowChangedTriggerBinding",
739
+ "kind": "trigger",
740
+ "triggerName": "databaseRowChanged",
741
+ "fields": {
742
+ "connectionName": "connectionName",
743
+ "bindingName": "bindingName",
744
+ "configurationUI": "configurationUI"
745
+ }
204
746
  }
205
747
  ]
206
748
  }