@superdurable/connector-notion 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +18 -2
- package/dex-connector.json +206 -0
- package/dist/chunk-LZTWSFD4.js +390 -0
- package/dist/connection-CFdIOEsZ.d.ts +762 -0
- package/dist/index.d.ts +352 -0
- package/dist/index.js +1187 -0
- package/dist/mock.d.ts +159 -0
- package/dist/mock.js +381 -0
- package/package.json +58 -4
|
@@ -0,0 +1,762 @@
|
|
|
1
|
+
import { SecretString, CredentialProvider, Query, Mutation, ConnectionRef } from '@superdurable/connectors-sdk';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
/** Connector configuration; omitted fields use manifest defaults. */
|
|
5
|
+
interface Config {
|
|
6
|
+
/** Notion REST API base URL, without /v1; leave blank for Notion's public API host, which serves every workspace. Enter an absolute HTTPS URL only for an explicitly supported compatible gateway, or a loopback HTTP URL for a local test server. */
|
|
7
|
+
endpoint?: string;
|
|
8
|
+
/** Maximum complete Notion API response in bytes. Leave blank to keep the displayed safety limit; enter a positive integer only to change it. An oversized read selects invalidResponse, and an oversized response to an accepted createPage selects uncertain. */
|
|
9
|
+
maxResponseBytes?: number;
|
|
10
|
+
}
|
|
11
|
+
/** Runtime schema for manifest configuration. */
|
|
12
|
+
declare const ConfigSchema: z.ZodObject<{
|
|
13
|
+
endpoint: z.ZodOptional<z.ZodString>;
|
|
14
|
+
maxResponseBytes: z.ZodOptional<z.ZodNumber>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
/** Private connector credentials resolved by the host. */
|
|
17
|
+
interface Credentials {
|
|
18
|
+
/** Secret API token of a Notion internal connection, copied from https://app.notion.com/developers/connections > Build > Internal connections > the connection > Configuration > API token; new tokens start with ntn_ and older ones with secret_. A Notion personal access token also works and acts as its creator. Dex Web stores the value as a secret, and blank means no Notion call can authenticate. */
|
|
19
|
+
apiToken: SecretString;
|
|
20
|
+
}
|
|
21
|
+
/** Decode private credential fields for the connector. */
|
|
22
|
+
declare function decodeCredentials(value: unknown): Credentials;
|
|
23
|
+
/** Host-owned source of private connector credentials. */
|
|
24
|
+
type CredentialSource = CredentialProvider<Credentials>;
|
|
25
|
+
/** SearchInput selects one page of title matches among the pages and data
|
|
26
|
+
* sources shared with the connection. */
|
|
27
|
+
interface SearchInput {
|
|
28
|
+
/** Query is matched against titles; blank lists every shared page and data source. */
|
|
29
|
+
"query"?: string | undefined;
|
|
30
|
+
/** ObjectType limits the results to pages or data sources; blank returns both. */
|
|
31
|
+
"objectType"?: "data_source" | "page" | (string & {}) | undefined;
|
|
32
|
+
/** SortDirection orders by last edit time; blank keeps Notion's relevance order. */
|
|
33
|
+
"sortDirection"?: "ascending" | "descending" | (string & {}) | undefined;
|
|
34
|
+
/** PageSize is the number of results to request, 1 to 100; zero requests 20. */
|
|
35
|
+
"pageSize"?: number | undefined;
|
|
36
|
+
/** StartCursor continues a previous search with the same input; blank reads the first page. */
|
|
37
|
+
"startCursor"?: string | undefined;
|
|
38
|
+
}
|
|
39
|
+
/** Parent identifies the object that contains a page or data source. */
|
|
40
|
+
interface Parent {
|
|
41
|
+
/** Type is the parent's kind; other kinds Notion adds are kept with an empty ID. */
|
|
42
|
+
"type": "block_id" | "data_source_id" | "database_id" | "page_id" | "workspace" | (string & {});
|
|
43
|
+
/** ID is the parent's ID; it is empty for the workspace. */
|
|
44
|
+
"id"?: string | undefined;
|
|
45
|
+
/** DatabaseID is the database that contains a data source parent. */
|
|
46
|
+
"databaseId"?: string | undefined;
|
|
47
|
+
}
|
|
48
|
+
/** SearchMatch is one page or data source whose title matched. */
|
|
49
|
+
interface SearchMatch {
|
|
50
|
+
/** ObjectType is page or data_source. */
|
|
51
|
+
"objectType": "data_source" | "page" | (string & {});
|
|
52
|
+
/** ID is the page or data source ID. */
|
|
53
|
+
"id": string;
|
|
54
|
+
/** Title is the plain-text title. */
|
|
55
|
+
"title": string;
|
|
56
|
+
/** URL opens the object in Notion; it is not a stable identifier. */
|
|
57
|
+
"url"?: string | undefined;
|
|
58
|
+
/** Parent contains the object. A data source's parent is its database. */
|
|
59
|
+
"parent": Parent;
|
|
60
|
+
/** LastEditedTime is the RFC 3339 time of the last edit. */
|
|
61
|
+
"lastEditedTime"?: string | undefined;
|
|
62
|
+
/** IsInTrash reports that the object is in the trash. */
|
|
63
|
+
"inTrash": boolean;
|
|
64
|
+
}
|
|
65
|
+
/** SearchOutput is one page of title matches. */
|
|
66
|
+
interface SearchOutput {
|
|
67
|
+
/** Matches lists the page's results in Notion's order. */
|
|
68
|
+
"matches": Array<SearchMatch> | null;
|
|
69
|
+
/** NextCursor continues the search; it is empty on the last page. */
|
|
70
|
+
"nextCursor"?: string | undefined;
|
|
71
|
+
/** HasMore reports that another page of results exists. */
|
|
72
|
+
"hasMore": boolean;
|
|
73
|
+
}
|
|
74
|
+
/** QueryFilter is a typed Notion data source filter. Set exactly one of
|
|
75
|
+
* Property, Timestamp, And, and Or.
|
|
76
|
+
*
|
|
77
|
+
* A property condition names the property, its Type, a Condition the type
|
|
78
|
+
* supports, and the one value field the condition takes: Text for title,
|
|
79
|
+
* rich_text, url, email, phone_number, select, status, and multi_select;
|
|
80
|
+
* Number for number and unique_id; Checkbox for checkbox; Date for date; and
|
|
81
|
+
* ID for people and relation. FilterIsEmpty, FilterIsNotEmpty, and the
|
|
82
|
+
* relative date conditions such as FilterPastWeek take no value. A timestamp
|
|
83
|
+
* condition sets Timestamp, a date Condition, and Date. And and Or combine up to
|
|
84
|
+
* two levels of nested filters. An unsupported combination selects defect
|
|
85
|
+
* before any request is sent. */
|
|
86
|
+
interface QueryFilter {
|
|
87
|
+
/** Property is the property name or ID that the condition reads. */
|
|
88
|
+
"property"?: string | undefined;
|
|
89
|
+
/** Type is the property's Notion type, which selects the filter's shape. */
|
|
90
|
+
"type"?: "checkbox" | "created_by" | "created_time" | "date" | "email" | "files" | "formula" | "last_edited_by" | "last_edited_time" | "multi_select" | "number" | "people" | "phone_number" | "relation" | "rich_text" | "rollup" | "select" | "status" | "title" | "unique_id" | "url" | "verification" | (string & {}) | undefined;
|
|
91
|
+
/** Timestamp filters on the page's creation or last edit time instead of a property. */
|
|
92
|
+
"timestamp"?: "created_time" | "last_edited_time" | (string & {}) | undefined;
|
|
93
|
+
/** Condition is the comparison. */
|
|
94
|
+
"condition"?: "after" | "before" | "contains" | "does_not_contain" | "does_not_equal" | "ends_with" | "equals" | "greater_than" | "greater_than_or_equal_to" | "is_empty" | "is_not_empty" | "less_than" | "less_than_or_equal_to" | "next_month" | "next_week" | "next_year" | "on_or_after" | "on_or_before" | "past_month" | "past_week" | "past_year" | "starts_with" | "this_week" | (string & {}) | undefined;
|
|
95
|
+
/** Text is a text or option-name value. */
|
|
96
|
+
"text"?: string | undefined;
|
|
97
|
+
/** Number is a number value. */
|
|
98
|
+
"number"?: number | undefined;
|
|
99
|
+
/** Checkbox is a checkbox value. */
|
|
100
|
+
"checkbox"?: boolean | undefined;
|
|
101
|
+
/** Date is a YYYY-MM-DD date or RFC 3339 date-time value. */
|
|
102
|
+
"date"?: string | undefined;
|
|
103
|
+
/** ID is a Notion user ID for people or a page ID for relation. */
|
|
104
|
+
"id"?: string | undefined;
|
|
105
|
+
/** And matches pages that match every filter. */
|
|
106
|
+
"and"?: Array<QueryFilter> | undefined;
|
|
107
|
+
/** Or matches pages that match any filter. */
|
|
108
|
+
"or"?: Array<QueryFilter> | undefined;
|
|
109
|
+
}
|
|
110
|
+
/** QuerySort orders query results by a property or a timestamp. Set exactly
|
|
111
|
+
* one of Property and Timestamp. */
|
|
112
|
+
interface QuerySort {
|
|
113
|
+
/** Property is the property name or ID to sort by. */
|
|
114
|
+
"property"?: string | undefined;
|
|
115
|
+
/** Timestamp sorts by the page's creation or last edit time. */
|
|
116
|
+
"timestamp"?: "created_time" | "last_edited_time" | (string & {}) | undefined;
|
|
117
|
+
/** Direction is ascending or descending; blank is ascending. */
|
|
118
|
+
"direction"?: "ascending" | "descending" | (string & {}) | undefined;
|
|
119
|
+
}
|
|
120
|
+
/** QueryDatabaseInput selects one page of a database's rows. Set exactly one of
|
|
121
|
+
* DataSourceID and DatabaseID. */
|
|
122
|
+
interface QueryDatabaseInput {
|
|
123
|
+
/** DataSourceID is the data source to query. In Notion, open the database's
|
|
124
|
+
* settings menu > Manage data sources and choose Copy data source ID. */
|
|
125
|
+
"dataSourceId"?: string | undefined;
|
|
126
|
+
/** DatabaseID is the database ID from its URL, or the URL itself; the database
|
|
127
|
+
* must hold exactly one data source. */
|
|
128
|
+
"databaseId"?: string | undefined;
|
|
129
|
+
/** Filter optionally limits the rows; nil returns every row. */
|
|
130
|
+
"filter"?: QueryFilter | undefined;
|
|
131
|
+
/** Sorts optionally orders the rows; Notion guarantees no order without one. */
|
|
132
|
+
"sorts"?: Array<QuerySort> | undefined;
|
|
133
|
+
/** Properties optionally lists the property names or IDs to return, at most
|
|
134
|
+
* 100; blank returns every property. */
|
|
135
|
+
"properties"?: Array<string> | undefined;
|
|
136
|
+
/** PageSize is the number of rows to request, 1 to 100; zero requests 50. */
|
|
137
|
+
"pageSize"?: number | undefined;
|
|
138
|
+
/** StartCursor continues a previous query with the same input; blank reads the first page. */
|
|
139
|
+
"startCursor"?: string | undefined;
|
|
140
|
+
}
|
|
141
|
+
/** DateRange is a Notion date value: one date or date-time, or a range. */
|
|
142
|
+
interface DateRange {
|
|
143
|
+
/** Start is a YYYY-MM-DD date or an RFC 3339 date-time such as 2026-09-30T14:00:00Z. */
|
|
144
|
+
"start": string;
|
|
145
|
+
/** End optionally ends a range, in the same format as Start; blank means a single date. */
|
|
146
|
+
"end"?: string | undefined;
|
|
147
|
+
/** TimeZone optionally names an IANA time zone, such as America/Los_Angeles, for a
|
|
148
|
+
* date-time without an offset; blank uses the offset in Start. */
|
|
149
|
+
"timeZone"?: string | undefined;
|
|
150
|
+
}
|
|
151
|
+
/** PageProperty is one property value read from a Notion page. The embedded
|
|
152
|
+
* PropertyValue holds the typed value; read-only types fill the closest typed
|
|
153
|
+
* field, such as Number for a numeric formula, Date for created_time, and
|
|
154
|
+
* UserIDs for created_by. */
|
|
155
|
+
interface PageProperty {
|
|
156
|
+
/** ID is Notion's stable property ID. */
|
|
157
|
+
"id": string;
|
|
158
|
+
/** Type is the property's Notion type. */
|
|
159
|
+
"type": "checkbox" | "created_by" | "created_time" | "date" | "email" | "files" | "formula" | "last_edited_by" | "last_edited_time" | "multi_select" | "number" | "people" | "phone_number" | "relation" | "rich_text" | "rollup" | "select" | "status" | "title" | "unique_id" | "url" | "verification" | (string & {});
|
|
160
|
+
/** Text is the plain text of a title or rich_text value, at most 20,000 characters. */
|
|
161
|
+
"text"?: string | undefined;
|
|
162
|
+
/** Number is a finite number value. */
|
|
163
|
+
"number"?: number | undefined;
|
|
164
|
+
/** Checkbox is a checkbox value. */
|
|
165
|
+
"checkbox"?: boolean | undefined;
|
|
166
|
+
/** Option is a select or status option name. Notion adds a missing select
|
|
167
|
+
* option to the data source; a status option must already exist. */
|
|
168
|
+
"option"?: string | undefined;
|
|
169
|
+
/** Options lists multi_select option names, at most 100, without commas. */
|
|
170
|
+
"options"?: Array<string> | undefined;
|
|
171
|
+
/** Date is a date value. */
|
|
172
|
+
"date"?: DateRange | undefined;
|
|
173
|
+
/** URL is an absolute URL value. */
|
|
174
|
+
"url"?: string | undefined;
|
|
175
|
+
/** Email is a plain email address. */
|
|
176
|
+
"email"?: string | undefined;
|
|
177
|
+
/** PhoneNumber is free-form phone text, such as +1 206 555 0100. */
|
|
178
|
+
"phoneNumber"?: string | undefined;
|
|
179
|
+
/** UserIDs lists Notion user IDs for a people value, at most 100. */
|
|
180
|
+
"userIds"?: Array<string> | undefined;
|
|
181
|
+
/** PageIDs lists related page IDs for a relation value, at most 100. */
|
|
182
|
+
"pageIds"?: Array<string> | undefined;
|
|
183
|
+
/** PlainText renders the value as one line of text for display and comparison. */
|
|
184
|
+
"plainText": string;
|
|
185
|
+
/** IsTruncated reports that Notion returned only the first entries of a
|
|
186
|
+
* relation, people, or rich text value; read the property in Notion for the rest. */
|
|
187
|
+
"truncated"?: boolean | undefined;
|
|
188
|
+
}
|
|
189
|
+
/** Page is one Notion page with its property values. A database row is a page
|
|
190
|
+
* whose parent is a data source. */
|
|
191
|
+
interface Page {
|
|
192
|
+
/** ID is the page ID, the page's stable identifier. */
|
|
193
|
+
"id": string;
|
|
194
|
+
/** URL opens the page in Notion; Notion does not keep it stable, so store ID instead. */
|
|
195
|
+
"url"?: string | undefined;
|
|
196
|
+
/** Title is the plain text of the page's title property. */
|
|
197
|
+
"title": string;
|
|
198
|
+
/** Parent contains the page. */
|
|
199
|
+
"parent": Parent;
|
|
200
|
+
/** CreatedTime is the RFC 3339 creation time. */
|
|
201
|
+
"createdTime"?: string | undefined;
|
|
202
|
+
/** LastEditedTime is the RFC 3339 time of the last edit. */
|
|
203
|
+
"lastEditedTime"?: string | undefined;
|
|
204
|
+
/** IsInTrash reports that the page was moved to the trash. */
|
|
205
|
+
"inTrash": boolean;
|
|
206
|
+
/** IsArchived reports that the page was archived, which is separate from the trash. */
|
|
207
|
+
"archived": boolean;
|
|
208
|
+
/** Properties maps each property name to its value. Notion omits the
|
|
209
|
+
* properties of a page the connection can see only partially. */
|
|
210
|
+
"properties": {
|
|
211
|
+
[key: string]: PageProperty;
|
|
212
|
+
} | null;
|
|
213
|
+
}
|
|
214
|
+
/** QueryDatabaseOutput is one page of rows. */
|
|
215
|
+
interface QueryDatabaseOutput {
|
|
216
|
+
/** DataSourceID is the data source that was queried; store it to skip the database lookup. */
|
|
217
|
+
"dataSourceId": string;
|
|
218
|
+
/** Pages lists the page's rows in the requested order. */
|
|
219
|
+
"pages": Array<Page> | null;
|
|
220
|
+
/** NextCursor continues the query; it is empty on the last page. */
|
|
221
|
+
"nextCursor"?: string | undefined;
|
|
222
|
+
/** HasMore reports that another page of rows exists. */
|
|
223
|
+
"hasMore": boolean;
|
|
224
|
+
/** IsResultLimitReached reports that Notion stopped at its 10,000-row limit for one
|
|
225
|
+
* query; narrow the filter, such as by created_time, to read the rest. */
|
|
226
|
+
"resultLimitReached": boolean;
|
|
227
|
+
}
|
|
228
|
+
/** GetPageInput selects one page. */
|
|
229
|
+
interface GetPageInput {
|
|
230
|
+
/** PageID is the page ID, with or without dashes, or the page's Notion URL. */
|
|
231
|
+
"pageId": string;
|
|
232
|
+
/** ShouldSkipContent reads only the page's properties, without its blocks. */
|
|
233
|
+
"skipContent"?: boolean | undefined;
|
|
234
|
+
/** MaxBlocks bounds the top-level blocks read, 1 to 500; zero reads up to 100. */
|
|
235
|
+
"maxBlocks"?: number | undefined;
|
|
236
|
+
/** MaxTextCharacters bounds Content.Text, 1 to 100,000 characters; zero keeps up to 20,000. */
|
|
237
|
+
"maxTextCharacters"?: number | undefined;
|
|
238
|
+
}
|
|
239
|
+
/** PageContent is a bounded plain-text rendering of a page's top-level blocks.
|
|
240
|
+
*
|
|
241
|
+
* Each block becomes one line: list items start with "- " or a number, to-do
|
|
242
|
+
* items with "[ ] " or "[x] ", table rows join their cells with " | ", and child
|
|
243
|
+
* pages and databases show their titles. Blocks inside toggles, columns, and
|
|
244
|
+
* other parents are not read; NestedBlockCount counts the blocks that have them. */
|
|
245
|
+
interface PageContent {
|
|
246
|
+
/** Text is the rendered content, at most MaxTextCharacters characters. */
|
|
247
|
+
"text": string;
|
|
248
|
+
/** BlockCount is the number of top-level blocks read. */
|
|
249
|
+
"blockCount": number;
|
|
250
|
+
/** HasMoreBlocks reports that the page has more top-level blocks than MaxBlocks. */
|
|
251
|
+
"hasMoreBlocks": boolean;
|
|
252
|
+
/** IsTextTruncated reports that Text was cut at MaxTextCharacters. */
|
|
253
|
+
"textTruncated": boolean;
|
|
254
|
+
/** NestedBlockCount counts read blocks whose own child blocks were not read. */
|
|
255
|
+
"nestedBlockCount": number;
|
|
256
|
+
/** SkippedBlockCount counts read blocks with no text rendering, such as images and dividers. */
|
|
257
|
+
"skippedBlockCount": number;
|
|
258
|
+
}
|
|
259
|
+
/** GetPageOutput is one page with its properties and bounded content. */
|
|
260
|
+
interface GetPageOutput {
|
|
261
|
+
/** Page holds the page's metadata and property values. */
|
|
262
|
+
"page": Page;
|
|
263
|
+
/** Content renders the page's top-level blocks as plain text; it is empty when ShouldSkipContent is set. */
|
|
264
|
+
"content": PageContent;
|
|
265
|
+
}
|
|
266
|
+
/** PropertyValue is one typed property value written to a Notion page.
|
|
267
|
+
*
|
|
268
|
+
* Type selects exactly one value field: Text for title and rich_text, Number,
|
|
269
|
+
* Checkbox, Option for select and status, Options for multi_select, Date, URL,
|
|
270
|
+
* Email, PhoneNumber, UserIDs for people, and PageIDs for relation. Setting a
|
|
271
|
+
* field that does not belong to Type selects defect. The zero value of the
|
|
272
|
+
* type's field clears the property, except that a checkbox needs an explicit
|
|
273
|
+
* value and a status needs an option name. Prefer the constructors such as
|
|
274
|
+
* TitleValue and SelectValue, and ClearedValue to clear a property on purpose.
|
|
275
|
+
*
|
|
276
|
+
* Writes replace the property's whole value: a multi_select, people, or
|
|
277
|
+
* relation value lists every entry the property keeps, so repeating the same
|
|
278
|
+
* write leaves the page unchanged. */
|
|
279
|
+
interface PropertyValue {
|
|
280
|
+
/** Type is the property's Notion type. */
|
|
281
|
+
"type": "checkbox" | "created_by" | "created_time" | "date" | "email" | "files" | "formula" | "last_edited_by" | "last_edited_time" | "multi_select" | "number" | "people" | "phone_number" | "relation" | "rich_text" | "rollup" | "select" | "status" | "title" | "unique_id" | "url" | "verification" | (string & {});
|
|
282
|
+
/** Text is the plain text of a title or rich_text value, at most 20,000 characters. */
|
|
283
|
+
"text"?: string | undefined;
|
|
284
|
+
/** Number is a finite number value. */
|
|
285
|
+
"number"?: number | undefined;
|
|
286
|
+
/** Checkbox is a checkbox value. */
|
|
287
|
+
"checkbox"?: boolean | undefined;
|
|
288
|
+
/** Option is a select or status option name. Notion adds a missing select
|
|
289
|
+
* option to the data source; a status option must already exist. */
|
|
290
|
+
"option"?: string | undefined;
|
|
291
|
+
/** Options lists multi_select option names, at most 100, without commas. */
|
|
292
|
+
"options"?: Array<string> | undefined;
|
|
293
|
+
/** Date is a date value. */
|
|
294
|
+
"date"?: DateRange | undefined;
|
|
295
|
+
/** URL is an absolute URL value. */
|
|
296
|
+
"url"?: string | undefined;
|
|
297
|
+
/** Email is a plain email address. */
|
|
298
|
+
"email"?: string | undefined;
|
|
299
|
+
/** PhoneNumber is free-form phone text, such as +1 206 555 0100. */
|
|
300
|
+
"phoneNumber"?: string | undefined;
|
|
301
|
+
/** UserIDs lists Notion user IDs for a people value, at most 100. */
|
|
302
|
+
"userIds"?: Array<string> | undefined;
|
|
303
|
+
/** PageIDs lists related page IDs for a relation value, at most 100. */
|
|
304
|
+
"pageIds"?: Array<string> | undefined;
|
|
305
|
+
}
|
|
306
|
+
/** CreatePageInput describes one database row. Set exactly one of DataSourceID and DatabaseID. */
|
|
307
|
+
interface CreatePageInput {
|
|
308
|
+
/** DataSourceID is the data source that receives the row. In Notion, open the
|
|
309
|
+
* database's settings menu > Manage data sources and choose Copy data source ID. */
|
|
310
|
+
"dataSourceId"?: string | undefined;
|
|
311
|
+
/** DatabaseID is the database ID from its URL, or the URL itself; the database
|
|
312
|
+
* must hold exactly one data source. */
|
|
313
|
+
"databaseId"?: string | undefined;
|
|
314
|
+
/** Properties maps property names or IDs to typed values, at most 100. A
|
|
315
|
+
* property left out keeps the data source's default, such as an empty title. */
|
|
316
|
+
"properties"?: {
|
|
317
|
+
[key: string]: PropertyValue;
|
|
318
|
+
} | undefined;
|
|
319
|
+
/** BodyText is optional plain text for the page body, at most 50,000 characters
|
|
320
|
+
* in at most 100 paragraphs. Blank lines separate paragraphs, other line breaks
|
|
321
|
+
* stay inside a paragraph, and the text is never read as markup. */
|
|
322
|
+
"bodyText"?: string | undefined;
|
|
323
|
+
}
|
|
324
|
+
/** CreatePageOutput identifies the created row. On every other branch PageID is
|
|
325
|
+
* empty and DataSourceID names the data source when it was resolved. */
|
|
326
|
+
interface CreatePageOutput {
|
|
327
|
+
/** DataSourceID is the data source that received, or would have received, the row. */
|
|
328
|
+
"dataSourceId"?: string | undefined;
|
|
329
|
+
/** PageID is the created page's ID. */
|
|
330
|
+
"pageId"?: string | undefined;
|
|
331
|
+
/** Page is the created page, or nil on a non-created outcome. */
|
|
332
|
+
"page"?: Page | undefined;
|
|
333
|
+
/** IsConfirmedAfterTimeout reports a 503 with a saved page ID confirmed during
|
|
334
|
+
* this attempt; a later attempt's read-back cannot recover the original status. */
|
|
335
|
+
"confirmedAfterTimeout"?: boolean | undefined;
|
|
336
|
+
}
|
|
337
|
+
/** UpdatePagePropertiesInput sets property values on one page. Properties left
|
|
338
|
+
* out keep their values; every listed value replaces the property's whole
|
|
339
|
+
* value, so repeating the same input leaves the page unchanged. */
|
|
340
|
+
interface UpdatePagePropertiesInput {
|
|
341
|
+
/** PageID is the page ID, with or without dashes, or the page's Notion URL. */
|
|
342
|
+
"pageId": string;
|
|
343
|
+
/** Properties maps property names or IDs to typed values, 1 to 100. Use
|
|
344
|
+
* ClearedValue to empty a property. */
|
|
345
|
+
"properties": {
|
|
346
|
+
[key: string]: PropertyValue;
|
|
347
|
+
} | null;
|
|
348
|
+
}
|
|
349
|
+
/** UpdatePagePropertiesOutput is the page after the update. */
|
|
350
|
+
interface UpdatePagePropertiesOutput {
|
|
351
|
+
/** Page is the page Notion returned after applying the values; it is empty on other branches. */
|
|
352
|
+
"page": Page;
|
|
353
|
+
}
|
|
354
|
+
/** Runtime validator for SearchInput. */
|
|
355
|
+
declare const SearchInputSchema: z.ZodObject<{
|
|
356
|
+
query: z.ZodOptional<z.ZodString>;
|
|
357
|
+
objectType: z.ZodOptional<z.ZodString>;
|
|
358
|
+
sortDirection: z.ZodOptional<z.ZodString>;
|
|
359
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
360
|
+
startCursor: z.ZodOptional<z.ZodString>;
|
|
361
|
+
}, z.core.$strict>;
|
|
362
|
+
/** Runtime validator for Parent. */
|
|
363
|
+
declare const ParentSchema: z.ZodObject<{
|
|
364
|
+
type: z.ZodString;
|
|
365
|
+
id: z.ZodOptional<z.ZodString>;
|
|
366
|
+
databaseId: z.ZodOptional<z.ZodString>;
|
|
367
|
+
}, z.core.$strict>;
|
|
368
|
+
/** Runtime validator for SearchMatch. */
|
|
369
|
+
declare const SearchMatchSchema: z.ZodObject<{
|
|
370
|
+
objectType: z.ZodString;
|
|
371
|
+
id: z.ZodString;
|
|
372
|
+
title: z.ZodString;
|
|
373
|
+
url: z.ZodOptional<z.ZodString>;
|
|
374
|
+
parent: z.ZodObject<{
|
|
375
|
+
type: z.ZodString;
|
|
376
|
+
id: z.ZodOptional<z.ZodString>;
|
|
377
|
+
databaseId: z.ZodOptional<z.ZodString>;
|
|
378
|
+
}, z.core.$strict>;
|
|
379
|
+
lastEditedTime: z.ZodOptional<z.ZodString>;
|
|
380
|
+
inTrash: z.ZodBoolean;
|
|
381
|
+
}, z.core.$strict>;
|
|
382
|
+
/** Runtime validator for SearchOutput. */
|
|
383
|
+
declare const SearchOutputSchema: z.ZodObject<{
|
|
384
|
+
matches: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
385
|
+
objectType: z.ZodString;
|
|
386
|
+
id: z.ZodString;
|
|
387
|
+
title: z.ZodString;
|
|
388
|
+
url: z.ZodOptional<z.ZodString>;
|
|
389
|
+
parent: z.ZodObject<{
|
|
390
|
+
type: z.ZodString;
|
|
391
|
+
id: z.ZodOptional<z.ZodString>;
|
|
392
|
+
databaseId: z.ZodOptional<z.ZodString>;
|
|
393
|
+
}, z.core.$strict>;
|
|
394
|
+
lastEditedTime: z.ZodOptional<z.ZodString>;
|
|
395
|
+
inTrash: z.ZodBoolean;
|
|
396
|
+
}, z.core.$strict>>>;
|
|
397
|
+
nextCursor: z.ZodOptional<z.ZodString>;
|
|
398
|
+
hasMore: z.ZodBoolean;
|
|
399
|
+
}, z.core.$strict>;
|
|
400
|
+
/** Runtime validator for QueryFilter. */
|
|
401
|
+
declare const QueryFilterSchema: z.ZodType<QueryFilter>;
|
|
402
|
+
/** Runtime validator for QuerySort. */
|
|
403
|
+
declare const QuerySortSchema: z.ZodObject<{
|
|
404
|
+
property: z.ZodOptional<z.ZodString>;
|
|
405
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
406
|
+
direction: z.ZodOptional<z.ZodString>;
|
|
407
|
+
}, z.core.$strict>;
|
|
408
|
+
/** Runtime validator for QueryDatabaseInput. */
|
|
409
|
+
declare const QueryDatabaseInputSchema: z.ZodObject<{
|
|
410
|
+
dataSourceId: z.ZodOptional<z.ZodString>;
|
|
411
|
+
databaseId: z.ZodOptional<z.ZodString>;
|
|
412
|
+
filter: z.ZodOptional<z.ZodType<QueryFilter, unknown, z.core.$ZodTypeInternals<QueryFilter, unknown>>>;
|
|
413
|
+
sorts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
414
|
+
property: z.ZodOptional<z.ZodString>;
|
|
415
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
416
|
+
direction: z.ZodOptional<z.ZodString>;
|
|
417
|
+
}, z.core.$strict>>>;
|
|
418
|
+
properties: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
419
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
420
|
+
startCursor: z.ZodOptional<z.ZodString>;
|
|
421
|
+
}, z.core.$strict>;
|
|
422
|
+
/** Runtime validator for DateRange. */
|
|
423
|
+
declare const DateRangeSchema: z.ZodObject<{
|
|
424
|
+
start: z.ZodString;
|
|
425
|
+
end: z.ZodOptional<z.ZodString>;
|
|
426
|
+
timeZone: z.ZodOptional<z.ZodString>;
|
|
427
|
+
}, z.core.$strict>;
|
|
428
|
+
/** Runtime validator for PageProperty. */
|
|
429
|
+
declare const PagePropertySchema: z.ZodObject<{
|
|
430
|
+
id: z.ZodString;
|
|
431
|
+
type: z.ZodString;
|
|
432
|
+
text: z.ZodOptional<z.ZodString>;
|
|
433
|
+
number: z.ZodOptional<z.ZodNumber>;
|
|
434
|
+
checkbox: z.ZodOptional<z.ZodBoolean>;
|
|
435
|
+
option: z.ZodOptional<z.ZodString>;
|
|
436
|
+
options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
437
|
+
date: z.ZodOptional<z.ZodObject<{
|
|
438
|
+
start: z.ZodString;
|
|
439
|
+
end: z.ZodOptional<z.ZodString>;
|
|
440
|
+
timeZone: z.ZodOptional<z.ZodString>;
|
|
441
|
+
}, z.core.$strict>>;
|
|
442
|
+
url: z.ZodOptional<z.ZodString>;
|
|
443
|
+
email: z.ZodOptional<z.ZodString>;
|
|
444
|
+
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
445
|
+
userIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
446
|
+
pageIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
447
|
+
plainText: z.ZodString;
|
|
448
|
+
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
449
|
+
}, z.core.$strict>;
|
|
450
|
+
/** Runtime validator for Page. */
|
|
451
|
+
declare const PageSchema: z.ZodObject<{
|
|
452
|
+
id: z.ZodString;
|
|
453
|
+
url: z.ZodOptional<z.ZodString>;
|
|
454
|
+
title: z.ZodString;
|
|
455
|
+
parent: z.ZodObject<{
|
|
456
|
+
type: z.ZodString;
|
|
457
|
+
id: z.ZodOptional<z.ZodString>;
|
|
458
|
+
databaseId: z.ZodOptional<z.ZodString>;
|
|
459
|
+
}, z.core.$strict>;
|
|
460
|
+
createdTime: z.ZodOptional<z.ZodString>;
|
|
461
|
+
lastEditedTime: z.ZodOptional<z.ZodString>;
|
|
462
|
+
inTrash: z.ZodBoolean;
|
|
463
|
+
archived: z.ZodBoolean;
|
|
464
|
+
properties: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
465
|
+
id: z.ZodString;
|
|
466
|
+
type: z.ZodString;
|
|
467
|
+
text: z.ZodOptional<z.ZodString>;
|
|
468
|
+
number: z.ZodOptional<z.ZodNumber>;
|
|
469
|
+
checkbox: z.ZodOptional<z.ZodBoolean>;
|
|
470
|
+
option: z.ZodOptional<z.ZodString>;
|
|
471
|
+
options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
472
|
+
date: z.ZodOptional<z.ZodObject<{
|
|
473
|
+
start: z.ZodString;
|
|
474
|
+
end: z.ZodOptional<z.ZodString>;
|
|
475
|
+
timeZone: z.ZodOptional<z.ZodString>;
|
|
476
|
+
}, z.core.$strict>>;
|
|
477
|
+
url: z.ZodOptional<z.ZodString>;
|
|
478
|
+
email: z.ZodOptional<z.ZodString>;
|
|
479
|
+
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
480
|
+
userIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
481
|
+
pageIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
482
|
+
plainText: z.ZodString;
|
|
483
|
+
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
484
|
+
}, z.core.$strict>>>;
|
|
485
|
+
}, z.core.$strict>;
|
|
486
|
+
/** Runtime validator for QueryDatabaseOutput. */
|
|
487
|
+
declare const QueryDatabaseOutputSchema: z.ZodObject<{
|
|
488
|
+
dataSourceId: z.ZodString;
|
|
489
|
+
pages: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
490
|
+
id: z.ZodString;
|
|
491
|
+
url: z.ZodOptional<z.ZodString>;
|
|
492
|
+
title: z.ZodString;
|
|
493
|
+
parent: z.ZodObject<{
|
|
494
|
+
type: z.ZodString;
|
|
495
|
+
id: z.ZodOptional<z.ZodString>;
|
|
496
|
+
databaseId: z.ZodOptional<z.ZodString>;
|
|
497
|
+
}, z.core.$strict>;
|
|
498
|
+
createdTime: z.ZodOptional<z.ZodString>;
|
|
499
|
+
lastEditedTime: z.ZodOptional<z.ZodString>;
|
|
500
|
+
inTrash: z.ZodBoolean;
|
|
501
|
+
archived: z.ZodBoolean;
|
|
502
|
+
properties: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
503
|
+
id: z.ZodString;
|
|
504
|
+
type: z.ZodString;
|
|
505
|
+
text: z.ZodOptional<z.ZodString>;
|
|
506
|
+
number: z.ZodOptional<z.ZodNumber>;
|
|
507
|
+
checkbox: z.ZodOptional<z.ZodBoolean>;
|
|
508
|
+
option: z.ZodOptional<z.ZodString>;
|
|
509
|
+
options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
510
|
+
date: z.ZodOptional<z.ZodObject<{
|
|
511
|
+
start: z.ZodString;
|
|
512
|
+
end: z.ZodOptional<z.ZodString>;
|
|
513
|
+
timeZone: z.ZodOptional<z.ZodString>;
|
|
514
|
+
}, z.core.$strict>>;
|
|
515
|
+
url: z.ZodOptional<z.ZodString>;
|
|
516
|
+
email: z.ZodOptional<z.ZodString>;
|
|
517
|
+
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
518
|
+
userIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
519
|
+
pageIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
520
|
+
plainText: z.ZodString;
|
|
521
|
+
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
522
|
+
}, z.core.$strict>>>;
|
|
523
|
+
}, z.core.$strict>>>;
|
|
524
|
+
nextCursor: z.ZodOptional<z.ZodString>;
|
|
525
|
+
hasMore: z.ZodBoolean;
|
|
526
|
+
resultLimitReached: z.ZodBoolean;
|
|
527
|
+
}, z.core.$strict>;
|
|
528
|
+
/** Runtime validator for GetPageInput. */
|
|
529
|
+
declare const GetPageInputSchema: z.ZodObject<{
|
|
530
|
+
pageId: z.ZodString;
|
|
531
|
+
skipContent: z.ZodOptional<z.ZodBoolean>;
|
|
532
|
+
maxBlocks: z.ZodOptional<z.ZodNumber>;
|
|
533
|
+
maxTextCharacters: z.ZodOptional<z.ZodNumber>;
|
|
534
|
+
}, z.core.$strict>;
|
|
535
|
+
/** Runtime validator for PageContent. */
|
|
536
|
+
declare const PageContentSchema: z.ZodObject<{
|
|
537
|
+
text: z.ZodString;
|
|
538
|
+
blockCount: z.ZodNumber;
|
|
539
|
+
hasMoreBlocks: z.ZodBoolean;
|
|
540
|
+
textTruncated: z.ZodBoolean;
|
|
541
|
+
nestedBlockCount: z.ZodNumber;
|
|
542
|
+
skippedBlockCount: z.ZodNumber;
|
|
543
|
+
}, z.core.$strict>;
|
|
544
|
+
/** Runtime validator for GetPageOutput. */
|
|
545
|
+
declare const GetPageOutputSchema: z.ZodObject<{
|
|
546
|
+
page: z.ZodObject<{
|
|
547
|
+
id: z.ZodString;
|
|
548
|
+
url: z.ZodOptional<z.ZodString>;
|
|
549
|
+
title: z.ZodString;
|
|
550
|
+
parent: z.ZodObject<{
|
|
551
|
+
type: z.ZodString;
|
|
552
|
+
id: z.ZodOptional<z.ZodString>;
|
|
553
|
+
databaseId: z.ZodOptional<z.ZodString>;
|
|
554
|
+
}, z.core.$strict>;
|
|
555
|
+
createdTime: z.ZodOptional<z.ZodString>;
|
|
556
|
+
lastEditedTime: z.ZodOptional<z.ZodString>;
|
|
557
|
+
inTrash: z.ZodBoolean;
|
|
558
|
+
archived: z.ZodBoolean;
|
|
559
|
+
properties: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
560
|
+
id: z.ZodString;
|
|
561
|
+
type: z.ZodString;
|
|
562
|
+
text: z.ZodOptional<z.ZodString>;
|
|
563
|
+
number: z.ZodOptional<z.ZodNumber>;
|
|
564
|
+
checkbox: z.ZodOptional<z.ZodBoolean>;
|
|
565
|
+
option: z.ZodOptional<z.ZodString>;
|
|
566
|
+
options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
567
|
+
date: z.ZodOptional<z.ZodObject<{
|
|
568
|
+
start: z.ZodString;
|
|
569
|
+
end: z.ZodOptional<z.ZodString>;
|
|
570
|
+
timeZone: z.ZodOptional<z.ZodString>;
|
|
571
|
+
}, z.core.$strict>>;
|
|
572
|
+
url: z.ZodOptional<z.ZodString>;
|
|
573
|
+
email: z.ZodOptional<z.ZodString>;
|
|
574
|
+
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
575
|
+
userIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
576
|
+
pageIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
577
|
+
plainText: z.ZodString;
|
|
578
|
+
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
579
|
+
}, z.core.$strict>>>;
|
|
580
|
+
}, z.core.$strict>;
|
|
581
|
+
content: z.ZodObject<{
|
|
582
|
+
text: z.ZodString;
|
|
583
|
+
blockCount: z.ZodNumber;
|
|
584
|
+
hasMoreBlocks: z.ZodBoolean;
|
|
585
|
+
textTruncated: z.ZodBoolean;
|
|
586
|
+
nestedBlockCount: z.ZodNumber;
|
|
587
|
+
skippedBlockCount: z.ZodNumber;
|
|
588
|
+
}, z.core.$strict>;
|
|
589
|
+
}, z.core.$strict>;
|
|
590
|
+
/** Runtime validator for PropertyValue. */
|
|
591
|
+
declare const PropertyValueSchema: z.ZodObject<{
|
|
592
|
+
type: z.ZodString;
|
|
593
|
+
text: z.ZodOptional<z.ZodString>;
|
|
594
|
+
number: z.ZodOptional<z.ZodNumber>;
|
|
595
|
+
checkbox: z.ZodOptional<z.ZodBoolean>;
|
|
596
|
+
option: z.ZodOptional<z.ZodString>;
|
|
597
|
+
options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
598
|
+
date: z.ZodOptional<z.ZodObject<{
|
|
599
|
+
start: z.ZodString;
|
|
600
|
+
end: z.ZodOptional<z.ZodString>;
|
|
601
|
+
timeZone: z.ZodOptional<z.ZodString>;
|
|
602
|
+
}, z.core.$strict>>;
|
|
603
|
+
url: z.ZodOptional<z.ZodString>;
|
|
604
|
+
email: z.ZodOptional<z.ZodString>;
|
|
605
|
+
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
606
|
+
userIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
607
|
+
pageIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
608
|
+
}, z.core.$strict>;
|
|
609
|
+
/** Runtime validator for CreatePageInput. */
|
|
610
|
+
declare const CreatePageInputSchema: z.ZodObject<{
|
|
611
|
+
dataSourceId: z.ZodOptional<z.ZodString>;
|
|
612
|
+
databaseId: z.ZodOptional<z.ZodString>;
|
|
613
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
614
|
+
type: z.ZodString;
|
|
615
|
+
text: z.ZodOptional<z.ZodString>;
|
|
616
|
+
number: z.ZodOptional<z.ZodNumber>;
|
|
617
|
+
checkbox: z.ZodOptional<z.ZodBoolean>;
|
|
618
|
+
option: z.ZodOptional<z.ZodString>;
|
|
619
|
+
options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
620
|
+
date: z.ZodOptional<z.ZodObject<{
|
|
621
|
+
start: z.ZodString;
|
|
622
|
+
end: z.ZodOptional<z.ZodString>;
|
|
623
|
+
timeZone: z.ZodOptional<z.ZodString>;
|
|
624
|
+
}, z.core.$strict>>;
|
|
625
|
+
url: z.ZodOptional<z.ZodString>;
|
|
626
|
+
email: z.ZodOptional<z.ZodString>;
|
|
627
|
+
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
628
|
+
userIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
629
|
+
pageIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
630
|
+
}, z.core.$strict>>>;
|
|
631
|
+
bodyText: z.ZodOptional<z.ZodString>;
|
|
632
|
+
}, z.core.$strict>;
|
|
633
|
+
/** Runtime validator for CreatePageOutput. */
|
|
634
|
+
declare const CreatePageOutputSchema: z.ZodObject<{
|
|
635
|
+
dataSourceId: z.ZodOptional<z.ZodString>;
|
|
636
|
+
pageId: z.ZodOptional<z.ZodString>;
|
|
637
|
+
page: z.ZodOptional<z.ZodObject<{
|
|
638
|
+
id: z.ZodString;
|
|
639
|
+
url: z.ZodOptional<z.ZodString>;
|
|
640
|
+
title: z.ZodString;
|
|
641
|
+
parent: z.ZodObject<{
|
|
642
|
+
type: z.ZodString;
|
|
643
|
+
id: z.ZodOptional<z.ZodString>;
|
|
644
|
+
databaseId: z.ZodOptional<z.ZodString>;
|
|
645
|
+
}, z.core.$strict>;
|
|
646
|
+
createdTime: z.ZodOptional<z.ZodString>;
|
|
647
|
+
lastEditedTime: z.ZodOptional<z.ZodString>;
|
|
648
|
+
inTrash: z.ZodBoolean;
|
|
649
|
+
archived: z.ZodBoolean;
|
|
650
|
+
properties: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
651
|
+
id: z.ZodString;
|
|
652
|
+
type: z.ZodString;
|
|
653
|
+
text: z.ZodOptional<z.ZodString>;
|
|
654
|
+
number: z.ZodOptional<z.ZodNumber>;
|
|
655
|
+
checkbox: z.ZodOptional<z.ZodBoolean>;
|
|
656
|
+
option: z.ZodOptional<z.ZodString>;
|
|
657
|
+
options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
658
|
+
date: z.ZodOptional<z.ZodObject<{
|
|
659
|
+
start: z.ZodString;
|
|
660
|
+
end: z.ZodOptional<z.ZodString>;
|
|
661
|
+
timeZone: z.ZodOptional<z.ZodString>;
|
|
662
|
+
}, z.core.$strict>>;
|
|
663
|
+
url: z.ZodOptional<z.ZodString>;
|
|
664
|
+
email: z.ZodOptional<z.ZodString>;
|
|
665
|
+
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
666
|
+
userIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
667
|
+
pageIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
668
|
+
plainText: z.ZodString;
|
|
669
|
+
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
670
|
+
}, z.core.$strict>>>;
|
|
671
|
+
}, z.core.$strict>>;
|
|
672
|
+
confirmedAfterTimeout: z.ZodOptional<z.ZodBoolean>;
|
|
673
|
+
}, z.core.$strict>;
|
|
674
|
+
/** Runtime validator for UpdatePagePropertiesInput. */
|
|
675
|
+
declare const UpdatePagePropertiesInputSchema: z.ZodObject<{
|
|
676
|
+
pageId: z.ZodString;
|
|
677
|
+
properties: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
678
|
+
type: z.ZodString;
|
|
679
|
+
text: z.ZodOptional<z.ZodString>;
|
|
680
|
+
number: z.ZodOptional<z.ZodNumber>;
|
|
681
|
+
checkbox: z.ZodOptional<z.ZodBoolean>;
|
|
682
|
+
option: z.ZodOptional<z.ZodString>;
|
|
683
|
+
options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
684
|
+
date: z.ZodOptional<z.ZodObject<{
|
|
685
|
+
start: z.ZodString;
|
|
686
|
+
end: z.ZodOptional<z.ZodString>;
|
|
687
|
+
timeZone: z.ZodOptional<z.ZodString>;
|
|
688
|
+
}, z.core.$strict>>;
|
|
689
|
+
url: z.ZodOptional<z.ZodString>;
|
|
690
|
+
email: z.ZodOptional<z.ZodString>;
|
|
691
|
+
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
692
|
+
userIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
693
|
+
pageIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
694
|
+
}, z.core.$strict>>>;
|
|
695
|
+
}, z.core.$strict>;
|
|
696
|
+
/** Runtime validator for UpdatePagePropertiesOutput. */
|
|
697
|
+
declare const UpdatePagePropertiesOutputSchema: z.ZodObject<{
|
|
698
|
+
page: z.ZodObject<{
|
|
699
|
+
id: z.ZodString;
|
|
700
|
+
url: z.ZodOptional<z.ZodString>;
|
|
701
|
+
title: z.ZodString;
|
|
702
|
+
parent: z.ZodObject<{
|
|
703
|
+
type: z.ZodString;
|
|
704
|
+
id: z.ZodOptional<z.ZodString>;
|
|
705
|
+
databaseId: z.ZodOptional<z.ZodString>;
|
|
706
|
+
}, z.core.$strict>;
|
|
707
|
+
createdTime: z.ZodOptional<z.ZodString>;
|
|
708
|
+
lastEditedTime: z.ZodOptional<z.ZodString>;
|
|
709
|
+
inTrash: z.ZodBoolean;
|
|
710
|
+
archived: z.ZodBoolean;
|
|
711
|
+
properties: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
712
|
+
id: z.ZodString;
|
|
713
|
+
type: z.ZodString;
|
|
714
|
+
text: z.ZodOptional<z.ZodString>;
|
|
715
|
+
number: z.ZodOptional<z.ZodNumber>;
|
|
716
|
+
checkbox: z.ZodOptional<z.ZodBoolean>;
|
|
717
|
+
option: z.ZodOptional<z.ZodString>;
|
|
718
|
+
options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
719
|
+
date: z.ZodOptional<z.ZodObject<{
|
|
720
|
+
start: z.ZodString;
|
|
721
|
+
end: z.ZodOptional<z.ZodString>;
|
|
722
|
+
timeZone: z.ZodOptional<z.ZodString>;
|
|
723
|
+
}, z.core.$strict>>;
|
|
724
|
+
url: z.ZodOptional<z.ZodString>;
|
|
725
|
+
email: z.ZodOptional<z.ZodString>;
|
|
726
|
+
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
727
|
+
userIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
728
|
+
pageIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
729
|
+
plainText: z.ZodString;
|
|
730
|
+
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
731
|
+
}, z.core.$strict>>>;
|
|
732
|
+
}, z.core.$strict>;
|
|
733
|
+
}, z.core.$strict>;
|
|
734
|
+
|
|
735
|
+
/** Typed operations supplied by a client or mock. */
|
|
736
|
+
interface Operations {
|
|
737
|
+
/** Invoke search through this connection. */
|
|
738
|
+
search(): Query<SearchInput, SearchOutput>;
|
|
739
|
+
/** Invoke queryDatabase through this connection. */
|
|
740
|
+
queryDatabase(): Query<QueryDatabaseInput, QueryDatabaseOutput>;
|
|
741
|
+
/** Invoke getPage through this connection. */
|
|
742
|
+
getPage(): Query<GetPageInput, GetPageOutput>;
|
|
743
|
+
/** Invoke createPage through this connection. */
|
|
744
|
+
createPage(): Mutation<CreatePageInput, CreatePageOutput>;
|
|
745
|
+
/** Invoke updatePageProperties through this connection. */
|
|
746
|
+
updatePageProperties(): Mutation<UpdatePagePropertiesInput, UpdatePagePropertiesOutput>;
|
|
747
|
+
}
|
|
748
|
+
/** Named connector connection kept outside Flow state. */
|
|
749
|
+
declare class Connection<BoundOperations = Operations> {
|
|
750
|
+
/** Stable provider and connection name. */
|
|
751
|
+
readonly reference: ConnectionRef;
|
|
752
|
+
/** Bound provider operations. */
|
|
753
|
+
readonly operations: BoundOperations;
|
|
754
|
+
/** Validate a reference and bind operations. */
|
|
755
|
+
constructor(reference: ConnectionRef, operations: BoundOperations);
|
|
756
|
+
}
|
|
757
|
+
/** Bind a client to a named connection. */
|
|
758
|
+
declare function newConnection(client: Operations, reference: ConnectionRef): Connection;
|
|
759
|
+
/** Bind scripted operations to a named connection. */
|
|
760
|
+
declare function newConnectionWithOperations(operations: Operations, reference: ConnectionRef): Connection;
|
|
761
|
+
|
|
762
|
+
export { type QueryFilter as A, QueryFilterSchema as B, type CreatePageInput as C, type DateRange as D, type QuerySort as E, QuerySortSchema as F, type GetPageInput as G, SearchInputSchema as H, type SearchMatch as I, SearchMatchSchema as J, SearchOutputSchema as K, UpdatePagePropertiesInputSchema as L, UpdatePagePropertiesOutputSchema as M, decodeCredentials as N, type Operations as O, type Page as P, type QueryDatabaseInput as Q, newConnection as R, type SearchInput as S, newConnectionWithOperations as T, type UpdatePagePropertiesInput as U, type CreatePageOutput as a, Connection as b, type GetPageOutput as c, type QueryDatabaseOutput as d, type SearchOutput as e, type UpdatePagePropertiesOutput as f, type Config as g, type Credentials as h, ConfigSchema as i, CreatePageInputSchema as j, CreatePageOutputSchema as k, type CredentialSource as l, DateRangeSchema as m, GetPageInputSchema as n, GetPageOutputSchema as o, type PageContent as p, PageContentSchema as q, type PageProperty as r, PagePropertySchema as s, PageSchema as t, type Parent as u, ParentSchema as v, type PropertyValue as w, PropertyValueSchema as x, QueryDatabaseInputSchema as y, QueryDatabaseOutputSchema as z };
|