@keystrokehq/notion 0.0.9 → 0.0.11
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/dist/_official/index.d.mts +3 -3
- package/dist/_official/index.mjs +1 -1
- package/dist/_runtime/index.d.mts +25 -25
- package/dist/blocks.d.mts +6 -6
- package/dist/blocks.mjs +7 -7
- package/dist/client.d.mts +1 -1
- package/dist/client.mjs +2 -2
- package/dist/comments.d.mts +4 -4
- package/dist/comments.mjs +5 -5
- package/dist/connection.d.mts +1 -1
- package/dist/connection.mjs +1 -1
- package/dist/data-sources.d.mts +6 -6
- package/dist/data-sources.mjs +7 -7
- package/dist/dist-Bbp6t-WQ.mjs +74 -0
- package/dist/factory-Dw2V3rrS.mjs +7 -0
- package/dist/{integration-D12eY2r0.d.mts → integration-Bc-B-wPX.d.mts} +3 -4
- package/dist/integration-Dqf1rNJ6.mjs +770 -0
- package/dist/pages.d.mts +8 -8
- package/dist/pages.mjs +9 -9
- package/dist/search.d.mts +2 -2
- package/dist/search.mjs +2 -2
- package/dist/triggers.d.mts +2 -3
- package/dist/triggers.mjs +8 -8
- package/dist/users.d.mts +4 -4
- package/dist/users.mjs +5 -5
- package/dist/verification.mjs +86 -1
- package/package.json +5 -5
- package/dist/factory-BvG2wLPI.mjs +0 -8
- package/dist/integration-AVAZpqqY.mjs +0 -93
- /package/dist/{shared-C6A6JPl3.mjs → shared-DwBtvjix.mjs} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as notionBundle } from "../integration-
|
|
2
|
-
import { z } from "zod";
|
|
1
|
+
import { r as notionBundle } from "../integration-Bc-B-wPX.mjs";
|
|
3
2
|
import { CredentialSet } from "@keystrokehq/core";
|
|
3
|
+
import { z } from "zod";
|
|
4
4
|
import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
|
|
5
5
|
import { InferCredentialSetAuth } from "@keystrokehq/core/credential-set";
|
|
6
6
|
|
|
@@ -14,7 +14,7 @@ declare const notionAppCredentialSet: CredentialSet<"keystroke:notion-app", z.Zo
|
|
|
14
14
|
}, z.core.$strip>>[] | undefined>;
|
|
15
15
|
declare const notionOfficialProviderSeed: {
|
|
16
16
|
readonly provider: "notion";
|
|
17
|
-
readonly appRef: "notion-
|
|
17
|
+
readonly appRef: "notion-official";
|
|
18
18
|
readonly displayName: "Notion Platform";
|
|
19
19
|
readonly credentialSetName: "Keystroke Notion Platform App";
|
|
20
20
|
readonly envShape: {
|
package/dist/_official/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as notionOfficialProviderSeed, i as notionAppCredentialSet, n as notionBundle, o as notionWebhookCredentialSet } from "../integration-
|
|
1
|
+
import { a as notionOfficialProviderSeed, i as notionAppCredentialSet, n as notionBundle, o as notionWebhookCredentialSet } from "../integration-Dqf1rNJ6.mjs";
|
|
2
2
|
|
|
3
3
|
export { notionAppCredentialSet, notionBundle, notionOfficialProviderSeed, notionWebhookCredentialSet };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as zod from "zod";
|
|
2
1
|
import * as _keystrokehq_core0 from "@keystrokehq/core";
|
|
2
|
+
import * as zod from "zod";
|
|
3
3
|
import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
|
|
4
4
|
import * as zod_v4_core0 from "zod/v4/core";
|
|
5
5
|
|
|
@@ -25,7 +25,7 @@ declare const notionOperations: {
|
|
|
25
25
|
workspace: zod.ZodOptional<zod.ZodBoolean>;
|
|
26
26
|
}, zod_v4_core0.$strip>>;
|
|
27
27
|
properties: zod.ZodRecord<zod.ZodString, zod.ZodUnknown>;
|
|
28
|
-
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
28
|
+
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"notion", zod.ZodObject<{
|
|
29
29
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
30
30
|
}, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
|
|
31
31
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
@@ -57,7 +57,7 @@ declare const notionOperations: {
|
|
|
57
57
|
workspace: zod.ZodOptional<zod.ZodBoolean>;
|
|
58
58
|
}, zod_v4_core0.$strip>>;
|
|
59
59
|
properties: zod.ZodRecord<zod.ZodString, zod.ZodUnknown>;
|
|
60
|
-
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
60
|
+
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"notion", zod.ZodObject<{
|
|
61
61
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
62
62
|
}, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
|
|
63
63
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
@@ -67,7 +67,7 @@ declare const notionOperations: {
|
|
|
67
67
|
targetPageId: zod.ZodString;
|
|
68
68
|
}, zod_v4_core0.$strip>, zod.ZodObject<{
|
|
69
69
|
success: zod.ZodLiteral<true>;
|
|
70
|
-
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
70
|
+
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"notion", zod.ZodObject<{
|
|
71
71
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
72
72
|
}, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
|
|
73
73
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
@@ -97,7 +97,7 @@ declare const notionOperations: {
|
|
|
97
97
|
workspace: zod.ZodOptional<zod.ZodBoolean>;
|
|
98
98
|
}, zod_v4_core0.$strip>>;
|
|
99
99
|
properties: zod.ZodRecord<zod.ZodString, zod.ZodUnknown>;
|
|
100
|
-
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
100
|
+
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"notion", zod.ZodObject<{
|
|
101
101
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
102
102
|
}, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
|
|
103
103
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
@@ -122,7 +122,7 @@ declare const notionOperations: {
|
|
|
122
122
|
workspace: zod.ZodOptional<zod.ZodBoolean>;
|
|
123
123
|
}, zod_v4_core0.$strip>>;
|
|
124
124
|
properties: zod.ZodRecord<zod.ZodString, zod.ZodUnknown>;
|
|
125
|
-
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
125
|
+
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"notion", zod.ZodObject<{
|
|
126
126
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
127
127
|
}, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
|
|
128
128
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
@@ -147,7 +147,7 @@ declare const notionOperations: {
|
|
|
147
147
|
workspace: zod.ZodOptional<zod.ZodBoolean>;
|
|
148
148
|
}, zod_v4_core0.$strip>>;
|
|
149
149
|
properties: zod.ZodRecord<zod.ZodString, zod.ZodUnknown>;
|
|
150
|
-
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
150
|
+
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"notion", zod.ZodObject<{
|
|
151
151
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
152
152
|
}, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
|
|
153
153
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
@@ -164,7 +164,7 @@ declare const notionOperations: {
|
|
|
164
164
|
value: zod.ZodUnknown;
|
|
165
165
|
nextCursor: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
166
166
|
hasMore: zod.ZodOptional<zod.ZodBoolean>;
|
|
167
|
-
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
167
|
+
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"notion", zod.ZodObject<{
|
|
168
168
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
169
169
|
}, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
|
|
170
170
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
@@ -189,7 +189,7 @@ declare const notionOperations: {
|
|
|
189
189
|
workspace: zod.ZodOptional<zod.ZodBoolean>;
|
|
190
190
|
}, zod_v4_core0.$strip>>;
|
|
191
191
|
value: zod.ZodOptional<zod.ZodUnknown>;
|
|
192
|
-
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
192
|
+
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"notion", zod.ZodObject<{
|
|
193
193
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
194
194
|
}, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
|
|
195
195
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
@@ -221,7 +221,7 @@ declare const notionOperations: {
|
|
|
221
221
|
}, zod_v4_core0.$strip>>;
|
|
222
222
|
hasMore: zod.ZodBoolean;
|
|
223
223
|
nextCursor: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
224
|
-
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
224
|
+
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"notion", zod.ZodObject<{
|
|
225
225
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
226
226
|
}, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
|
|
227
227
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
@@ -231,7 +231,7 @@ declare const notionOperations: {
|
|
|
231
231
|
children: zod.ZodArray<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
|
|
232
232
|
}, zod_v4_core0.$strip>, zod.ZodObject<{
|
|
233
233
|
success: zod.ZodLiteral<true>;
|
|
234
|
-
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
234
|
+
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"notion", zod.ZodObject<{
|
|
235
235
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
236
236
|
}, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
|
|
237
237
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
@@ -257,7 +257,7 @@ declare const notionOperations: {
|
|
|
257
257
|
workspace: zod.ZodOptional<zod.ZodBoolean>;
|
|
258
258
|
}, zod_v4_core0.$strip>>;
|
|
259
259
|
value: zod.ZodOptional<zod.ZodUnknown>;
|
|
260
|
-
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
260
|
+
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"notion", zod.ZodObject<{
|
|
261
261
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
262
262
|
}, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
|
|
263
263
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
@@ -282,7 +282,7 @@ declare const notionOperations: {
|
|
|
282
282
|
workspace: zod.ZodOptional<zod.ZodBoolean>;
|
|
283
283
|
}, zod_v4_core0.$strip>>;
|
|
284
284
|
value: zod.ZodOptional<zod.ZodUnknown>;
|
|
285
|
-
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
285
|
+
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"notion", zod.ZodObject<{
|
|
286
286
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
287
287
|
}, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
|
|
288
288
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
@@ -295,7 +295,7 @@ declare const notionOperations: {
|
|
|
295
295
|
id: zod.ZodString;
|
|
296
296
|
name: zod.ZodString;
|
|
297
297
|
}, zod_v4_core0.$strip>>;
|
|
298
|
-
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
298
|
+
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"notion", zod.ZodObject<{
|
|
299
299
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
300
300
|
}, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
|
|
301
301
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
@@ -318,7 +318,7 @@ declare const notionOperations: {
|
|
|
318
318
|
workspace: zod.ZodOptional<zod.ZodBoolean>;
|
|
319
319
|
}, zod_v4_core0.$strip>>;
|
|
320
320
|
properties: zod.ZodRecord<zod.ZodString, zod.ZodUnknown>;
|
|
321
|
-
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
321
|
+
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"notion", zod.ZodObject<{
|
|
322
322
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
323
323
|
}, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
|
|
324
324
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
@@ -351,7 +351,7 @@ declare const notionOperations: {
|
|
|
351
351
|
}, zod_v4_core0.$strip>>;
|
|
352
352
|
hasMore: zod.ZodBoolean;
|
|
353
353
|
nextCursor: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
354
|
-
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
354
|
+
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"notion", zod.ZodObject<{
|
|
355
355
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
356
356
|
}, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
|
|
357
357
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
@@ -378,7 +378,7 @@ declare const notionOperations: {
|
|
|
378
378
|
workspace: zod.ZodOptional<zod.ZodBoolean>;
|
|
379
379
|
}, zod_v4_core0.$strip>>;
|
|
380
380
|
properties: zod.ZodRecord<zod.ZodString, zod.ZodUnknown>;
|
|
381
|
-
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
381
|
+
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"notion", zod.ZodObject<{
|
|
382
382
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
383
383
|
}, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
|
|
384
384
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
@@ -405,7 +405,7 @@ declare const notionOperations: {
|
|
|
405
405
|
workspace: zod.ZodOptional<zod.ZodBoolean>;
|
|
406
406
|
}, zod_v4_core0.$strip>>;
|
|
407
407
|
properties: zod.ZodRecord<zod.ZodString, zod.ZodUnknown>;
|
|
408
|
-
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
408
|
+
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"notion", zod.ZodObject<{
|
|
409
409
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
410
410
|
}, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
|
|
411
411
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
@@ -441,7 +441,7 @@ declare const notionOperations: {
|
|
|
441
441
|
}, zod_v4_core0.$strip>>;
|
|
442
442
|
hasMore: zod.ZodBoolean;
|
|
443
443
|
nextCursor: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
444
|
-
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
444
|
+
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"notion", zod.ZodObject<{
|
|
445
445
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
446
446
|
}, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
|
|
447
447
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
@@ -471,7 +471,7 @@ declare const notionOperations: {
|
|
|
471
471
|
avatarUrl: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
472
472
|
email: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
473
473
|
}, zod_v4_core0.$strip>>;
|
|
474
|
-
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
474
|
+
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"notion", zod.ZodObject<{
|
|
475
475
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
476
476
|
}, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
|
|
477
477
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
@@ -507,7 +507,7 @@ declare const notionOperations: {
|
|
|
507
507
|
avatarUrl: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
508
508
|
email: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
509
509
|
}, zod_v4_core0.$strip>>;
|
|
510
|
-
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
510
|
+
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"notion", zod.ZodObject<{
|
|
511
511
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
512
512
|
}, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
|
|
513
513
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
@@ -519,7 +519,7 @@ declare const notionOperations: {
|
|
|
519
519
|
name: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
520
520
|
avatarUrl: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
521
521
|
email: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
522
|
-
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
522
|
+
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"notion", zod.ZodObject<{
|
|
523
523
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
524
524
|
}, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
|
|
525
525
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
@@ -533,7 +533,7 @@ declare const notionOperations: {
|
|
|
533
533
|
name: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
534
534
|
avatarUrl: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
535
535
|
email: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
536
|
-
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
536
|
+
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"notion", zod.ZodObject<{
|
|
537
537
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
538
538
|
}, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
|
|
539
539
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
@@ -552,7 +552,7 @@ declare const notionOperations: {
|
|
|
552
552
|
}, zod_v4_core0.$strip>>;
|
|
553
553
|
hasMore: zod.ZodBoolean;
|
|
554
554
|
nextCursor: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
555
|
-
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
555
|
+
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"notion", zod.ZodObject<{
|
|
556
556
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
557
557
|
}, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
|
|
558
558
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
@@ -590,7 +590,7 @@ declare const notionOperations: {
|
|
|
590
590
|
}, zod_v4_core0.$strip>>;
|
|
591
591
|
hasMore: zod.ZodBoolean;
|
|
592
592
|
nextCursor: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
593
|
-
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
593
|
+
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"notion", zod.ZodObject<{
|
|
594
594
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
|
595
595
|
}, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
|
|
596
596
|
NOTION_ACCESS_TOKEN: zod.ZodString;
|
package/dist/blocks.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
1
|
import * as _keystrokehq_core0 from "@keystrokehq/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
3
|
import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
|
|
4
4
|
|
|
5
5
|
//#region src/blocks.d.ts
|
|
@@ -23,7 +23,7 @@ declare const getBlock: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
23
23
|
workspace: z.ZodOptional<z.ZodBoolean>;
|
|
24
24
|
}, z.core.$strip>>;
|
|
25
25
|
value: z.ZodOptional<z.ZodUnknown>;
|
|
26
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
26
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"notion", z.ZodObject<{
|
|
27
27
|
NOTION_ACCESS_TOKEN: z.ZodString;
|
|
28
28
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
29
29
|
NOTION_ACCESS_TOKEN: z.ZodString;
|
|
@@ -55,7 +55,7 @@ declare const listBlockChildren: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
55
55
|
}, z.core.$strip>>;
|
|
56
56
|
hasMore: z.ZodBoolean;
|
|
57
57
|
nextCursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
58
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
58
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"notion", z.ZodObject<{
|
|
59
59
|
NOTION_ACCESS_TOKEN: z.ZodString;
|
|
60
60
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
61
61
|
NOTION_ACCESS_TOKEN: z.ZodString;
|
|
@@ -65,7 +65,7 @@ declare const appendBlockChildren: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
65
65
|
children: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
66
66
|
}, z.core.$strip>, z.ZodObject<{
|
|
67
67
|
success: z.ZodLiteral<true>;
|
|
68
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
68
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"notion", z.ZodObject<{
|
|
69
69
|
NOTION_ACCESS_TOKEN: z.ZodString;
|
|
70
70
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
71
71
|
NOTION_ACCESS_TOKEN: z.ZodString;
|
|
@@ -91,7 +91,7 @@ declare const updateBlock: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
91
91
|
workspace: z.ZodOptional<z.ZodBoolean>;
|
|
92
92
|
}, z.core.$strip>>;
|
|
93
93
|
value: z.ZodOptional<z.ZodUnknown>;
|
|
94
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
94
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"notion", z.ZodObject<{
|
|
95
95
|
NOTION_ACCESS_TOKEN: z.ZodString;
|
|
96
96
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
97
97
|
NOTION_ACCESS_TOKEN: z.ZodString;
|
|
@@ -116,7 +116,7 @@ declare const deleteBlock: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
116
116
|
workspace: z.ZodOptional<z.ZodBoolean>;
|
|
117
117
|
}, z.core.$strip>>;
|
|
118
118
|
value: z.ZodOptional<z.ZodUnknown>;
|
|
119
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
119
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"notion", z.ZodObject<{
|
|
120
120
|
NOTION_ACCESS_TOKEN: z.ZodString;
|
|
121
121
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
122
122
|
NOTION_ACCESS_TOKEN: z.ZodString;
|
package/dist/blocks.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { appendBlockChildrenInChunks, createNotionClient, listAllPaginatedResults, withRateLimitRetry } from "./client.mjs";
|
|
2
2
|
import { normalizeBlock, normalizeListMeta, notionBlockSchema, notionListResponseSchema, notionSuccessResponseSchema } from "./schemas.mjs";
|
|
3
|
-
import { t as notionOperation } from "./factory-
|
|
4
|
-
import { r as buildPaginationInput } from "./shared-
|
|
3
|
+
import { t as notionOperation } from "./factory-Dw2V3rrS.mjs";
|
|
4
|
+
import { r as buildPaginationInput } from "./shared-DwBtvjix.mjs";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
|
|
7
7
|
//#region src/blocks.ts
|
|
@@ -14,7 +14,7 @@ async function listBlockChildrenRecursively(client, blockId) {
|
|
|
14
14
|
return normalized.concat(...nested);
|
|
15
15
|
}
|
|
16
16
|
const getBlock = notionOperation({
|
|
17
|
-
id: "
|
|
17
|
+
id: "notion.get-notion-block",
|
|
18
18
|
name: "Get Notion Block",
|
|
19
19
|
description: "Retrieve a Notion block by ID",
|
|
20
20
|
input: z.object({ blockId: z.string().min(1) }),
|
|
@@ -25,7 +25,7 @@ const getBlock = notionOperation({
|
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
27
|
const listBlockChildren = notionOperation({
|
|
28
|
-
id: "
|
|
28
|
+
id: "notion.list-notion-block-children",
|
|
29
29
|
name: "List Notion Block Children",
|
|
30
30
|
description: "List the children for a Notion block or page",
|
|
31
31
|
input: z.object({
|
|
@@ -55,7 +55,7 @@ const listBlockChildren = notionOperation({
|
|
|
55
55
|
}
|
|
56
56
|
});
|
|
57
57
|
const appendBlockChildren = notionOperation({
|
|
58
|
-
id: "
|
|
58
|
+
id: "notion.append-notion-block-children",
|
|
59
59
|
name: "Append Notion Block Children",
|
|
60
60
|
description: "Append one or more child blocks to a Notion block or page",
|
|
61
61
|
input: z.object({
|
|
@@ -70,7 +70,7 @@ const appendBlockChildren = notionOperation({
|
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
72
|
const updateBlock = notionOperation({
|
|
73
|
-
id: "
|
|
73
|
+
id: "notion.update-notion-block",
|
|
74
74
|
name: "Update Notion Block",
|
|
75
75
|
description: "Update a Notion block by applying a typed block patch",
|
|
76
76
|
input: z.object({
|
|
@@ -88,7 +88,7 @@ const updateBlock = notionOperation({
|
|
|
88
88
|
}
|
|
89
89
|
});
|
|
90
90
|
const deleteBlock = notionOperation({
|
|
91
|
-
id: "
|
|
91
|
+
id: "notion.delete-notion-block",
|
|
92
92
|
name: "Delete Notion Block",
|
|
93
93
|
description: "Delete a Notion block",
|
|
94
94
|
input: z.object({ blockId: z.string().min(1) }),
|
package/dist/client.d.mts
CHANGED
package/dist/client.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as notion } from "./integration-
|
|
1
|
+
import { t as notion } from "./integration-Dqf1rNJ6.mjs";
|
|
2
|
+
import { t as createErrorNormalizingProxy } from "./dist-Bbp6t-WQ.mjs";
|
|
2
3
|
import { CredentialRevokedError } from "@keystrokehq/core/errors";
|
|
3
|
-
import { createErrorNormalizingProxy } from "@keystrokehq/integration-authoring";
|
|
4
4
|
import { Client } from "@notionhq/client";
|
|
5
5
|
|
|
6
6
|
//#region src/client.ts
|
package/dist/comments.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
1
|
import * as _keystrokehq_core0 from "@keystrokehq/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
3
|
import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
|
|
4
4
|
|
|
5
5
|
//#region src/comments.d.ts
|
|
@@ -34,7 +34,7 @@ declare const listComments: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
34
34
|
}, z.core.$strip>>;
|
|
35
35
|
hasMore: z.ZodBoolean;
|
|
36
36
|
nextCursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
37
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
37
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"notion", z.ZodObject<{
|
|
38
38
|
NOTION_ACCESS_TOKEN: z.ZodString;
|
|
39
39
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
40
40
|
NOTION_ACCESS_TOKEN: z.ZodString;
|
|
@@ -64,7 +64,7 @@ declare const getComment: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
64
64
|
avatarUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
65
65
|
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
66
66
|
}, z.core.$strip>>;
|
|
67
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
67
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"notion", z.ZodObject<{
|
|
68
68
|
NOTION_ACCESS_TOKEN: z.ZodString;
|
|
69
69
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
70
70
|
NOTION_ACCESS_TOKEN: z.ZodString;
|
|
@@ -100,7 +100,7 @@ declare const createComment: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
100
100
|
avatarUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
101
101
|
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
102
102
|
}, z.core.$strip>>;
|
|
103
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
103
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"notion", z.ZodObject<{
|
|
104
104
|
NOTION_ACCESS_TOKEN: z.ZodString;
|
|
105
105
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
106
106
|
NOTION_ACCESS_TOKEN: z.ZodString;
|
package/dist/comments.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createNotionClient, withRateLimitRetry } from "./client.mjs";
|
|
2
2
|
import { normalizeComment, normalizeListMeta, notionCommentSchema, notionListResponseSchema } from "./schemas.mjs";
|
|
3
|
-
import { t as notionOperation } from "./factory-
|
|
4
|
-
import { i as buildPlainTextRichText, r as buildPaginationInput, t as buildCommentTarget } from "./shared-
|
|
3
|
+
import { t as notionOperation } from "./factory-Dw2V3rrS.mjs";
|
|
4
|
+
import { i as buildPlainTextRichText, r as buildPaginationInput, t as buildCommentTarget } from "./shared-DwBtvjix.mjs";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
|
|
7
7
|
//#region src/comments.ts
|
|
@@ -15,7 +15,7 @@ const commentTargetSchema = z.object({
|
|
|
15
15
|
value.discussionId
|
|
16
16
|
].filter((entry) => Boolean(entry)).length === 1, { error: "Provide exactly one of pageId, blockId, or discussionId." });
|
|
17
17
|
const listComments = notionOperation({
|
|
18
|
-
id: "
|
|
18
|
+
id: "notion.list-notion-comments",
|
|
19
19
|
name: "List Notion Comments",
|
|
20
20
|
description: "List the open comments for a Notion page or block",
|
|
21
21
|
input: z.object({
|
|
@@ -39,7 +39,7 @@ const listComments = notionOperation({
|
|
|
39
39
|
}
|
|
40
40
|
});
|
|
41
41
|
const getComment = notionOperation({
|
|
42
|
-
id: "
|
|
42
|
+
id: "notion.get-notion-comment",
|
|
43
43
|
name: "Get Notion Comment",
|
|
44
44
|
description: "Retrieve a Notion comment by ID",
|
|
45
45
|
input: z.object({ commentId: z.string().min(1) }),
|
|
@@ -50,7 +50,7 @@ const getComment = notionOperation({
|
|
|
50
50
|
}
|
|
51
51
|
});
|
|
52
52
|
const createComment = notionOperation({
|
|
53
|
-
id: "
|
|
53
|
+
id: "notion.create-notion-comment",
|
|
54
54
|
name: "Create Notion Comment",
|
|
55
55
|
description: "Create a page comment or reply to an existing Notion discussion",
|
|
56
56
|
input: z.object({
|
package/dist/connection.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as notionOfficialIntegration, n as notion, t as NotionCredentials } from "./integration-
|
|
1
|
+
import { i as notionOfficialIntegration, n as notion, t as NotionCredentials } from "./integration-Bc-B-wPX.mjs";
|
|
2
2
|
export { type NotionCredentials, notion, notionOfficialIntegration };
|
package/dist/connection.mjs
CHANGED
package/dist/data-sources.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
1
|
import * as _keystrokehq_core0 from "@keystrokehq/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
3
|
import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
|
|
4
4
|
|
|
5
5
|
//#region src/data-sources.d.ts
|
|
@@ -11,7 +11,7 @@ declare const discoverDatabaseDataSources: _keystrokehq_core0.Operation<z.ZodObj
|
|
|
11
11
|
id: z.ZodString;
|
|
12
12
|
name: z.ZodString;
|
|
13
13
|
}, z.core.$strip>>;
|
|
14
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
14
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"notion", z.ZodObject<{
|
|
15
15
|
NOTION_ACCESS_TOKEN: z.ZodString;
|
|
16
16
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
17
17
|
NOTION_ACCESS_TOKEN: z.ZodString;
|
|
@@ -34,7 +34,7 @@ declare const getDataSource: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
34
34
|
workspace: z.ZodOptional<z.ZodBoolean>;
|
|
35
35
|
}, z.core.$strip>>;
|
|
36
36
|
properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
37
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
37
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"notion", z.ZodObject<{
|
|
38
38
|
NOTION_ACCESS_TOKEN: z.ZodString;
|
|
39
39
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
40
40
|
NOTION_ACCESS_TOKEN: z.ZodString;
|
|
@@ -67,7 +67,7 @@ declare const queryDataSource: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
67
67
|
}, z.core.$strip>>;
|
|
68
68
|
hasMore: z.ZodBoolean;
|
|
69
69
|
nextCursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
70
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
70
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"notion", z.ZodObject<{
|
|
71
71
|
NOTION_ACCESS_TOKEN: z.ZodString;
|
|
72
72
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
73
73
|
NOTION_ACCESS_TOKEN: z.ZodString;
|
|
@@ -94,7 +94,7 @@ declare const createDataSourceEntry: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
94
94
|
workspace: z.ZodOptional<z.ZodBoolean>;
|
|
95
95
|
}, z.core.$strip>>;
|
|
96
96
|
properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
97
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
97
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"notion", z.ZodObject<{
|
|
98
98
|
NOTION_ACCESS_TOKEN: z.ZodString;
|
|
99
99
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
100
100
|
NOTION_ACCESS_TOKEN: z.ZodString;
|
|
@@ -121,7 +121,7 @@ declare const updateDataSourceEntry: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
121
121
|
workspace: z.ZodOptional<z.ZodBoolean>;
|
|
122
122
|
}, z.core.$strip>>;
|
|
123
123
|
properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
124
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
124
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"notion", z.ZodObject<{
|
|
125
125
|
NOTION_ACCESS_TOKEN: z.ZodString;
|
|
126
126
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
127
127
|
NOTION_ACCESS_TOKEN: z.ZodString;
|
package/dist/data-sources.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createNotionClient, withRateLimitRetry } from "./client.mjs";
|
|
2
2
|
import { normalizeDataSource, normalizeListMeta, normalizePage, notionDataSourceSchema, notionListResponseSchema, notionPageSchema } from "./schemas.mjs";
|
|
3
|
-
import { t as notionOperation } from "./factory-
|
|
4
|
-
import { r as buildPaginationInput } from "./shared-
|
|
3
|
+
import { t as notionOperation } from "./factory-Dw2V3rrS.mjs";
|
|
4
|
+
import { r as buildPaginationInput } from "./shared-DwBtvjix.mjs";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
|
|
7
7
|
//#region src/data-sources.ts
|
|
@@ -13,7 +13,7 @@ const databaseDiscoverySchema = z.object({
|
|
|
13
13
|
}))
|
|
14
14
|
});
|
|
15
15
|
const discoverDatabaseDataSources = notionOperation({
|
|
16
|
-
id: "
|
|
16
|
+
id: "notion.discover-notion-database-data-sources",
|
|
17
17
|
name: "Discover Notion Database Data Sources",
|
|
18
18
|
description: "Retrieve the data-source references that belong to a Notion database",
|
|
19
19
|
input: z.object({ databaseId: z.string().min(1) }),
|
|
@@ -31,7 +31,7 @@ const discoverDatabaseDataSources = notionOperation({
|
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
33
|
const getDataSource = notionOperation({
|
|
34
|
-
id: "
|
|
34
|
+
id: "notion.get-notion-data-source",
|
|
35
35
|
name: "Get Notion Data Source",
|
|
36
36
|
description: "Retrieve a Notion data source by ID",
|
|
37
37
|
input: z.object({ dataSourceId: z.string().min(1) }),
|
|
@@ -42,7 +42,7 @@ const getDataSource = notionOperation({
|
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
44
|
const queryDataSource = notionOperation({
|
|
45
|
-
id: "
|
|
45
|
+
id: "notion.query-notion-data-source",
|
|
46
46
|
name: "Query Notion Data Source",
|
|
47
47
|
description: "Query pages in a Notion data source with filters, sorts, and pagination",
|
|
48
48
|
input: z.object({
|
|
@@ -70,7 +70,7 @@ const queryDataSource = notionOperation({
|
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
72
|
const createDataSourceEntry = notionOperation({
|
|
73
|
-
id: "
|
|
73
|
+
id: "notion.create-notion-data-source-entry",
|
|
74
74
|
name: "Create Notion Data Source Entry",
|
|
75
75
|
description: "Create a new page inside a Notion data source",
|
|
76
76
|
input: z.object({
|
|
@@ -93,7 +93,7 @@ const createDataSourceEntry = notionOperation({
|
|
|
93
93
|
}
|
|
94
94
|
});
|
|
95
95
|
const updateDataSourceEntry = notionOperation({
|
|
96
|
-
id: "
|
|
96
|
+
id: "notion.update-notion-data-source-entry",
|
|
97
97
|
name: "Update Notion Data Source Entry",
|
|
98
98
|
description: "Update the properties for a page that belongs to a Notion data source",
|
|
99
99
|
input: z.object({
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Operation } from "@keystrokehq/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { pollingTrigger } from "@keystrokehq/core/trigger";
|
|
4
|
+
|
|
5
|
+
//#region ../../packages/integration-authoring/dist/index.mjs
|
|
6
|
+
function isThenable(value) {
|
|
7
|
+
return !!value && typeof value === "object" && "then" in value && typeof value.then === "function";
|
|
8
|
+
}
|
|
9
|
+
function createErrorNormalizingProxy(target, normalizeError, path = []) {
|
|
10
|
+
return new Proxy(target, { get(obj, property, receiver) {
|
|
11
|
+
const value = Reflect.get(obj, property, receiver);
|
|
12
|
+
if (typeof value === "function") return (...args) => {
|
|
13
|
+
try {
|
|
14
|
+
const result = value.apply(obj, args);
|
|
15
|
+
if (isThenable(result)) return result.then(void 0, (error) => {
|
|
16
|
+
throw normalizeError(error, { methodPath: [...path, String(property)].join(".") });
|
|
17
|
+
});
|
|
18
|
+
return result;
|
|
19
|
+
} catch (error) {
|
|
20
|
+
throw normalizeError(error, { methodPath: [...path, String(property)].join(".") });
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
if (value && typeof value === "object") return createErrorNormalizingProxy(value, normalizeError, [...path, String(property)]);
|
|
24
|
+
return value;
|
|
25
|
+
} });
|
|
26
|
+
}
|
|
27
|
+
const IntegrationConfigSchema = z.object({
|
|
28
|
+
id: z.string().min(1),
|
|
29
|
+
name: z.string().min(1),
|
|
30
|
+
description: z.string().optional()
|
|
31
|
+
});
|
|
32
|
+
function resolveMetadata(metadata, defaults) {
|
|
33
|
+
return {
|
|
34
|
+
id: metadata?.id ?? defaults.defaultId,
|
|
35
|
+
description: metadata?.description ?? defaults.defaultDescription
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function resolveAuthorPayload(payload, mapPayload) {
|
|
39
|
+
if (!mapPayload) return payload;
|
|
40
|
+
return mapPayload(payload);
|
|
41
|
+
}
|
|
42
|
+
function createIntegrationTriggerBindingFactory(config) {
|
|
43
|
+
const bind = (options) => {
|
|
44
|
+
const resolvedMetadata = resolveMetadata(options, config);
|
|
45
|
+
const baseTrigger = config.createBaseTrigger(resolvedMetadata);
|
|
46
|
+
const userTransform = options?.transform;
|
|
47
|
+
return baseTrigger({ transform: userTransform || config.mapPayload ? (runtimePayload, request) => {
|
|
48
|
+
const authorPayload = resolveAuthorPayload(runtimePayload, config.mapPayload);
|
|
49
|
+
if (authorPayload === null) throw new Error(`Trigger "${resolvedMetadata.id}" mapPayload returned null after the trigger filter passed; tighten the trigger filter schema.`);
|
|
50
|
+
if (!userTransform) return authorPayload;
|
|
51
|
+
return userTransform(authorPayload, request);
|
|
52
|
+
} : void 0 });
|
|
53
|
+
};
|
|
54
|
+
return Object.freeze(bind);
|
|
55
|
+
}
|
|
56
|
+
function createPollingTriggerBindingFactory(config) {
|
|
57
|
+
return createIntegrationTriggerBindingFactory({
|
|
58
|
+
defaultId: config.defaultId,
|
|
59
|
+
defaultDescription: config.defaultDescription,
|
|
60
|
+
mapPayload: config.mapPayload,
|
|
61
|
+
createBaseTrigger: (metadata) => pollingTrigger({
|
|
62
|
+
id: metadata.id,
|
|
63
|
+
description: metadata.description,
|
|
64
|
+
schedule: config.schedule,
|
|
65
|
+
response: config.response,
|
|
66
|
+
poll: config.poll,
|
|
67
|
+
...config.credentialSets ? { credentialSets: config.credentialSets } : {},
|
|
68
|
+
...config.filter ? { filter: config.filter } : {}
|
|
69
|
+
})
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
//#endregion
|
|
74
|
+
export { createPollingTriggerBindingFactory as n, createErrorNormalizingProxy as t };
|