@notionhq/client 3.1.2 → 3.1.3
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/build/package.json +1 -2
- package/build/src/Client.d.ts.map +1 -1
- package/build/src/Client.js.map +1 -1
- package/build/src/api-endpoints.d.ts +84 -0
- package/build/src/api-endpoints.d.ts.map +1 -1
- package/build/src/api-endpoints.js +84 -0
- package/build/src/api-endpoints.js.map +1 -1
- package/build/src/fetch-types.d.ts +1 -2
- package/build/src/fetch-types.d.ts.map +1 -1
- package/build/src/fetch-types.js.map +1 -1
- package/package.json +1 -2
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
// Note: This is a generated file. DO NOT EDIT!
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
exports.oauthIntrospect = exports.oauthRevoke = exports.oauthToken = exports.getFileUpload = exports.completeFileUpload = exports.sendFileUpload = exports.listFileUploads = exports.createFileUpload = exports.listComments = exports.createComment = exports.search = exports.createDatabase = exports.listDatabases = exports.queryDatabase = exports.updateDatabase = exports.getDatabase = exports.appendBlockChildren = exports.listBlockChildren = exports.deleteBlock = exports.updateBlock = exports.getBlock = exports.getPageProperty = exports.updatePage = exports.getPage = exports.createPage = exports.listUsers = exports.getUser = exports.getSelf = void 0;
|
|
6
|
+
/**
|
|
7
|
+
* Retrieve your token's bot user
|
|
8
|
+
*/
|
|
6
9
|
exports.getSelf = {
|
|
7
10
|
method: "get",
|
|
8
11
|
pathParams: [],
|
|
@@ -10,6 +13,9 @@ exports.getSelf = {
|
|
|
10
13
|
bodyParams: [],
|
|
11
14
|
path: () => `users/me`,
|
|
12
15
|
};
|
|
16
|
+
/**
|
|
17
|
+
* Retrieve a user
|
|
18
|
+
*/
|
|
13
19
|
exports.getUser = {
|
|
14
20
|
method: "get",
|
|
15
21
|
pathParams: ["user_id"],
|
|
@@ -17,6 +23,9 @@ exports.getUser = {
|
|
|
17
23
|
bodyParams: [],
|
|
18
24
|
path: (p) => `users/${p.user_id}`,
|
|
19
25
|
};
|
|
26
|
+
/**
|
|
27
|
+
* List all users
|
|
28
|
+
*/
|
|
20
29
|
exports.listUsers = {
|
|
21
30
|
method: "get",
|
|
22
31
|
pathParams: [],
|
|
@@ -24,6 +33,9 @@ exports.listUsers = {
|
|
|
24
33
|
bodyParams: [],
|
|
25
34
|
path: () => `users`,
|
|
26
35
|
};
|
|
36
|
+
/**
|
|
37
|
+
* Create a page
|
|
38
|
+
*/
|
|
27
39
|
exports.createPage = {
|
|
28
40
|
method: "post",
|
|
29
41
|
pathParams: [],
|
|
@@ -31,6 +43,9 @@ exports.createPage = {
|
|
|
31
43
|
bodyParams: ["parent", "properties", "icon", "cover", "content", "children"],
|
|
32
44
|
path: () => `pages`,
|
|
33
45
|
};
|
|
46
|
+
/**
|
|
47
|
+
* Retrieve a page
|
|
48
|
+
*/
|
|
34
49
|
exports.getPage = {
|
|
35
50
|
method: "get",
|
|
36
51
|
pathParams: ["page_id"],
|
|
@@ -38,6 +53,9 @@ exports.getPage = {
|
|
|
38
53
|
bodyParams: [],
|
|
39
54
|
path: (p) => `pages/${p.page_id}`,
|
|
40
55
|
};
|
|
56
|
+
/**
|
|
57
|
+
* Update page properties
|
|
58
|
+
*/
|
|
41
59
|
exports.updatePage = {
|
|
42
60
|
method: "patch",
|
|
43
61
|
pathParams: ["page_id"],
|
|
@@ -45,6 +63,9 @@ exports.updatePage = {
|
|
|
45
63
|
bodyParams: ["properties", "icon", "cover", "archived", "in_trash"],
|
|
46
64
|
path: (p) => `pages/${p.page_id}`,
|
|
47
65
|
};
|
|
66
|
+
/**
|
|
67
|
+
* Retrieve a page property item
|
|
68
|
+
*/
|
|
48
69
|
exports.getPageProperty = {
|
|
49
70
|
method: "get",
|
|
50
71
|
pathParams: ["page_id", "property_id"],
|
|
@@ -52,6 +73,9 @@ exports.getPageProperty = {
|
|
|
52
73
|
bodyParams: [],
|
|
53
74
|
path: (p) => `pages/${p.page_id}/properties/${p.property_id}`,
|
|
54
75
|
};
|
|
76
|
+
/**
|
|
77
|
+
* Retrieve a block
|
|
78
|
+
*/
|
|
55
79
|
exports.getBlock = {
|
|
56
80
|
method: "get",
|
|
57
81
|
pathParams: ["block_id"],
|
|
@@ -59,6 +83,9 @@ exports.getBlock = {
|
|
|
59
83
|
bodyParams: [],
|
|
60
84
|
path: (p) => `blocks/${p.block_id}`,
|
|
61
85
|
};
|
|
86
|
+
/**
|
|
87
|
+
* Update a block
|
|
88
|
+
*/
|
|
62
89
|
exports.updateBlock = {
|
|
63
90
|
method: "patch",
|
|
64
91
|
pathParams: ["block_id"],
|
|
@@ -98,6 +125,9 @@ exports.updateBlock = {
|
|
|
98
125
|
],
|
|
99
126
|
path: (p) => `blocks/${p.block_id}`,
|
|
100
127
|
};
|
|
128
|
+
/**
|
|
129
|
+
* Delete a block
|
|
130
|
+
*/
|
|
101
131
|
exports.deleteBlock = {
|
|
102
132
|
method: "delete",
|
|
103
133
|
pathParams: ["block_id"],
|
|
@@ -105,6 +135,9 @@ exports.deleteBlock = {
|
|
|
105
135
|
bodyParams: [],
|
|
106
136
|
path: (p) => `blocks/${p.block_id}`,
|
|
107
137
|
};
|
|
138
|
+
/**
|
|
139
|
+
* Retrieve block children
|
|
140
|
+
*/
|
|
108
141
|
exports.listBlockChildren = {
|
|
109
142
|
method: "get",
|
|
110
143
|
pathParams: ["block_id"],
|
|
@@ -112,6 +145,9 @@ exports.listBlockChildren = {
|
|
|
112
145
|
bodyParams: [],
|
|
113
146
|
path: (p) => `blocks/${p.block_id}/children`,
|
|
114
147
|
};
|
|
148
|
+
/**
|
|
149
|
+
* Append block children
|
|
150
|
+
*/
|
|
115
151
|
exports.appendBlockChildren = {
|
|
116
152
|
method: "patch",
|
|
117
153
|
pathParams: ["block_id"],
|
|
@@ -119,6 +155,9 @@ exports.appendBlockChildren = {
|
|
|
119
155
|
bodyParams: ["children", "after"],
|
|
120
156
|
path: (p) => `blocks/${p.block_id}/children`,
|
|
121
157
|
};
|
|
158
|
+
/**
|
|
159
|
+
* Retrieve a database
|
|
160
|
+
*/
|
|
122
161
|
exports.getDatabase = {
|
|
123
162
|
method: "get",
|
|
124
163
|
pathParams: ["database_id"],
|
|
@@ -126,6 +165,9 @@ exports.getDatabase = {
|
|
|
126
165
|
bodyParams: [],
|
|
127
166
|
path: (p) => `databases/${p.database_id}`,
|
|
128
167
|
};
|
|
168
|
+
/**
|
|
169
|
+
* Update a database
|
|
170
|
+
*/
|
|
129
171
|
exports.updateDatabase = {
|
|
130
172
|
method: "patch",
|
|
131
173
|
pathParams: ["database_id"],
|
|
@@ -142,6 +184,9 @@ exports.updateDatabase = {
|
|
|
142
184
|
],
|
|
143
185
|
path: (p) => `databases/${p.database_id}`,
|
|
144
186
|
};
|
|
187
|
+
/**
|
|
188
|
+
* Query a database
|
|
189
|
+
*/
|
|
145
190
|
exports.queryDatabase = {
|
|
146
191
|
method: "post",
|
|
147
192
|
pathParams: ["database_id"],
|
|
@@ -156,6 +201,9 @@ exports.queryDatabase = {
|
|
|
156
201
|
],
|
|
157
202
|
path: (p) => `databases/${p.database_id}/query`,
|
|
158
203
|
};
|
|
204
|
+
/**
|
|
205
|
+
* List databases
|
|
206
|
+
*/
|
|
159
207
|
exports.listDatabases = {
|
|
160
208
|
method: "get",
|
|
161
209
|
pathParams: [],
|
|
@@ -163,6 +211,9 @@ exports.listDatabases = {
|
|
|
163
211
|
bodyParams: [],
|
|
164
212
|
path: () => `databases`,
|
|
165
213
|
};
|
|
214
|
+
/**
|
|
215
|
+
* Create a database
|
|
216
|
+
*/
|
|
166
217
|
exports.createDatabase = {
|
|
167
218
|
method: "post",
|
|
168
219
|
pathParams: [],
|
|
@@ -178,6 +229,9 @@ exports.createDatabase = {
|
|
|
178
229
|
],
|
|
179
230
|
path: () => `databases`,
|
|
180
231
|
};
|
|
232
|
+
/**
|
|
233
|
+
* Search by title
|
|
234
|
+
*/
|
|
181
235
|
exports.search = {
|
|
182
236
|
method: "post",
|
|
183
237
|
pathParams: [],
|
|
@@ -185,6 +239,9 @@ exports.search = {
|
|
|
185
239
|
bodyParams: ["sort", "query", "start_cursor", "page_size", "filter"],
|
|
186
240
|
path: () => `search`,
|
|
187
241
|
};
|
|
242
|
+
/**
|
|
243
|
+
* Create comment
|
|
244
|
+
*/
|
|
188
245
|
exports.createComment = {
|
|
189
246
|
method: "post",
|
|
190
247
|
pathParams: [],
|
|
@@ -192,6 +249,9 @@ exports.createComment = {
|
|
|
192
249
|
bodyParams: ["parent", "rich_text", "discussion_id"],
|
|
193
250
|
path: () => `comments`,
|
|
194
251
|
};
|
|
252
|
+
/**
|
|
253
|
+
* List comments
|
|
254
|
+
*/
|
|
195
255
|
exports.listComments = {
|
|
196
256
|
method: "get",
|
|
197
257
|
pathParams: [],
|
|
@@ -199,6 +259,9 @@ exports.listComments = {
|
|
|
199
259
|
bodyParams: [],
|
|
200
260
|
path: () => `comments`,
|
|
201
261
|
};
|
|
262
|
+
/**
|
|
263
|
+
* Create a file upload
|
|
264
|
+
*/
|
|
202
265
|
exports.createFileUpload = {
|
|
203
266
|
method: "post",
|
|
204
267
|
pathParams: [],
|
|
@@ -212,6 +275,9 @@ exports.createFileUpload = {
|
|
|
212
275
|
],
|
|
213
276
|
path: () => `file_uploads`,
|
|
214
277
|
};
|
|
278
|
+
/**
|
|
279
|
+
* List file uploads
|
|
280
|
+
*/
|
|
215
281
|
exports.listFileUploads = {
|
|
216
282
|
method: "get",
|
|
217
283
|
pathParams: [],
|
|
@@ -219,6 +285,9 @@ exports.listFileUploads = {
|
|
|
219
285
|
bodyParams: [],
|
|
220
286
|
path: () => `file_uploads`,
|
|
221
287
|
};
|
|
288
|
+
/**
|
|
289
|
+
* Upload a file
|
|
290
|
+
*/
|
|
222
291
|
exports.sendFileUpload = {
|
|
223
292
|
method: "post",
|
|
224
293
|
pathParams: ["file_upload_id"],
|
|
@@ -227,6 +296,9 @@ exports.sendFileUpload = {
|
|
|
227
296
|
formDataParams: ["file", "part_number"],
|
|
228
297
|
path: (p) => `file_uploads/${p.file_upload_id}/send`,
|
|
229
298
|
};
|
|
299
|
+
/**
|
|
300
|
+
* Complete a multi-part file upload
|
|
301
|
+
*/
|
|
230
302
|
exports.completeFileUpload = {
|
|
231
303
|
method: "post",
|
|
232
304
|
pathParams: ["file_upload_id"],
|
|
@@ -234,6 +306,9 @@ exports.completeFileUpload = {
|
|
|
234
306
|
bodyParams: [],
|
|
235
307
|
path: (p) => `file_uploads/${p.file_upload_id}/complete`,
|
|
236
308
|
};
|
|
309
|
+
/**
|
|
310
|
+
* Retrieve a file upload
|
|
311
|
+
*/
|
|
237
312
|
exports.getFileUpload = {
|
|
238
313
|
method: "get",
|
|
239
314
|
pathParams: ["file_upload_id"],
|
|
@@ -241,6 +316,9 @@ exports.getFileUpload = {
|
|
|
241
316
|
bodyParams: [],
|
|
242
317
|
path: (p) => `file_uploads/${p.file_upload_id}`,
|
|
243
318
|
};
|
|
319
|
+
/**
|
|
320
|
+
* Exchange an authorization code for an access token
|
|
321
|
+
*/
|
|
244
322
|
exports.oauthToken = {
|
|
245
323
|
method: "post",
|
|
246
324
|
pathParams: [],
|
|
@@ -248,6 +326,9 @@ exports.oauthToken = {
|
|
|
248
326
|
bodyParams: ["grant_type", "code", "redirect_uri", "external_account"],
|
|
249
327
|
path: () => `oauth/token`,
|
|
250
328
|
};
|
|
329
|
+
/**
|
|
330
|
+
* Revoke a token
|
|
331
|
+
*/
|
|
251
332
|
exports.oauthRevoke = {
|
|
252
333
|
method: "post",
|
|
253
334
|
pathParams: [],
|
|
@@ -255,6 +336,9 @@ exports.oauthRevoke = {
|
|
|
255
336
|
bodyParams: ["token"],
|
|
256
337
|
path: () => `oauth/revoke`,
|
|
257
338
|
};
|
|
339
|
+
/**
|
|
340
|
+
* Introspect a token
|
|
341
|
+
*/
|
|
258
342
|
exports.oauthIntrospect = {
|
|
259
343
|
method: "post",
|
|
260
344
|
pathParams: [],
|