@vibesdotdev/integrations-notion 0.0.0-stage → 1.0.0-rc.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 +126 -0
- package/README.md +142 -2
- package/dist/client/helper.d.ts +16 -0
- package/dist/client/helper.d.ts.map +1 -0
- package/dist/client/helper.js +17 -0
- package/dist/client/helper.js.map +1 -0
- package/dist/client/index.d.ts +3 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +3 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/runtime-client.d.ts +89 -0
- package/dist/client/runtime-client.d.ts.map +1 -0
- package/dist/client/runtime-client.js +130 -0
- package/dist/client/runtime-client.js.map +1 -0
- package/dist/docs/integrations-notion.docs.descriptor.d.ts +19 -0
- package/dist/docs/integrations-notion.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/integrations-notion.docs.descriptor.js +62 -0
- package/dist/docs/integrations-notion.docs.descriptor.js.map +1 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -0
- package/dist/integrations-notion.plugin.d.ts +19 -0
- package/dist/integrations-notion.plugin.d.ts.map +1 -0
- package/dist/integrations-notion.plugin.js +37 -0
- package/dist/integrations-notion.plugin.js.map +1 -0
- package/dist/notion/index.d.ts +12 -0
- package/dist/notion/index.d.ts.map +1 -0
- package/dist/notion/index.js +13 -0
- package/dist/notion/index.js.map +1 -0
- package/dist/notion/notion-client.d.ts +119 -0
- package/dist/notion/notion-client.d.ts.map +1 -0
- package/dist/notion/notion-client.js +438 -0
- package/dist/notion/notion-client.js.map +1 -0
- package/dist/notion/notion-implementation.d.ts +72 -0
- package/dist/notion/notion-implementation.d.ts.map +1 -0
- package/dist/notion/notion-implementation.js +222 -0
- package/dist/notion/notion-implementation.js.map +1 -0
- package/dist/notion/notion-schemas.d.ts +2 -0
- package/dist/notion/notion-schemas.d.ts.map +1 -0
- package/dist/notion/notion-schemas.js +2 -0
- package/dist/notion/notion-schemas.js.map +1 -0
- package/dist/notion/system.integration.notion.descriptor.d.ts +69 -0
- package/dist/notion/system.integration.notion.descriptor.d.ts.map +1 -0
- package/dist/notion/system.integration.notion.descriptor.js +109 -0
- package/dist/notion/system.integration.notion.descriptor.js.map +1 -0
- package/dist/notion.catalog.plugin.d.ts +78 -0
- package/dist/notion.catalog.plugin.d.ts.map +1 -0
- package/dist/notion.catalog.plugin.js +21 -0
- package/dist/notion.catalog.plugin.js.map +1 -0
- package/dist/notion.client.plugin.d.ts +3 -0
- package/dist/notion.client.plugin.d.ts.map +1 -0
- package/dist/notion.client.plugin.js +49 -0
- package/dist/notion.client.plugin.js.map +1 -0
- package/dist/schemas/json.d.ts +6 -0
- package/dist/schemas/json.d.ts.map +1 -0
- package/dist/schemas/json.js +4 -0
- package/dist/schemas/json.js.map +1 -0
- package/dist/schemas/notion.d.ts +221 -0
- package/dist/schemas/notion.d.ts.map +1 -0
- package/dist/schemas/notion.js +130 -0
- package/dist/schemas/notion.js.map +1 -0
- package/dist/schemas/oauth.d.ts +63 -0
- package/dist/schemas/oauth.d.ts.map +1 -0
- package/dist/schemas/oauth.js +15 -0
- package/dist/schemas/oauth.js.map +1 -0
- package/dist/schemas/operations.d.ts +556 -0
- package/dist/schemas/operations.d.ts.map +1 -0
- package/dist/schemas/operations.js +39 -0
- package/dist/schemas/operations.js.map +1 -0
- package/dist/schemas/sync.d.ts +32 -0
- package/dist/schemas/sync.d.ts.map +1 -0
- package/dist/schemas/sync.js +12 -0
- package/dist/schemas/sync.js.map +1 -0
- package/dist/schemas/tools.d.ts +239 -0
- package/dist/schemas/tools.d.ts.map +1 -0
- package/dist/schemas/tools.js +93 -0
- package/dist/schemas/tools.js.map +1 -0
- package/dist/schemas/vendor.d.ts +150 -0
- package/dist/schemas/vendor.d.ts.map +1 -0
- package/dist/schemas/vendor.js +31 -0
- package/dist/schemas/vendor.js.map +1 -0
- package/dist/server/oauth.d.ts +17 -0
- package/dist/server/oauth.d.ts.map +1 -0
- package/dist/server/oauth.js +64 -0
- package/dist/server/oauth.js.map +1 -0
- package/dist/sync/knowledge.notion.sync-mapping.descriptor.d.ts +15 -0
- package/dist/sync/knowledge.notion.sync-mapping.descriptor.d.ts.map +1 -0
- package/dist/sync/knowledge.notion.sync-mapping.descriptor.js +15 -0
- package/dist/sync/knowledge.notion.sync-mapping.descriptor.js.map +1 -0
- package/dist/sync/knowledge.notion.sync-mapping.impl.d.ts +13 -0
- package/dist/sync/knowledge.notion.sync-mapping.impl.d.ts.map +1 -0
- package/dist/sync/knowledge.notion.sync-mapping.impl.js +27 -0
- package/dist/sync/knowledge.notion.sync-mapping.impl.js.map +1 -0
- package/dist/sync/notion-record-projection.d.ts +16 -0
- package/dist/sync/notion-record-projection.d.ts.map +1 -0
- package/dist/sync/notion-record-projection.js +50 -0
- package/dist/sync/notion-record-projection.js.map +1 -0
- package/dist/sync/notion.sync-endpoint.descriptor.d.ts +14 -0
- package/dist/sync/notion.sync-endpoint.descriptor.d.ts.map +1 -0
- package/dist/sync/notion.sync-endpoint.descriptor.js +10 -0
- package/dist/sync/notion.sync-endpoint.descriptor.js.map +1 -0
- package/dist/sync/notion.sync-endpoint.impl.d.ts +55 -0
- package/dist/sync/notion.sync-endpoint.impl.d.ts.map +1 -0
- package/dist/sync/notion.sync-endpoint.impl.js +557 -0
- package/dist/sync/notion.sync-endpoint.impl.js.map +1 -0
- package/dist/sync/projects.notion.sync-mapping.descriptor.d.ts +15 -0
- package/dist/sync/projects.notion.sync-mapping.descriptor.d.ts.map +1 -0
- package/dist/sync/projects.notion.sync-mapping.descriptor.js +15 -0
- package/dist/sync/projects.notion.sync-mapping.descriptor.js.map +1 -0
- package/dist/sync/projects.notion.sync-mapping.impl.d.ts +13 -0
- package/dist/sync/projects.notion.sync-mapping.impl.d.ts.map +1 -0
- package/dist/sync/projects.notion.sync-mapping.impl.js +26 -0
- package/dist/sync/projects.notion.sync-mapping.impl.js.map +1 -0
- package/dist/sync/work.notion.sync-mapping.descriptor.d.ts +15 -0
- package/dist/sync/work.notion.sync-mapping.descriptor.d.ts.map +1 -0
- package/dist/sync/work.notion.sync-mapping.descriptor.js +15 -0
- package/dist/sync/work.notion.sync-mapping.descriptor.js.map +1 -0
- package/dist/sync/work.notion.sync-mapping.impl.d.ts +13 -0
- package/dist/sync/work.notion.sync-mapping.impl.d.ts.map +1 -0
- package/dist/sync/work.notion.sync-mapping.impl.js +63 -0
- package/dist/sync/work.notion.sync-mapping.impl.js.map +1 -0
- package/dist/tools/descriptors.d.ts +781 -0
- package/dist/tools/descriptors.d.ts.map +1 -0
- package/dist/tools/descriptors.js +129 -0
- package/dist/tools/descriptors.js.map +1 -0
- package/dist/tools/impl.d.ts +12 -0
- package/dist/tools/impl.d.ts.map +1 -0
- package/dist/tools/impl.js +61 -0
- package/dist/tools/impl.js.map +1 -0
- package/dist/tools/index.d.ts +3 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +3 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/schemas.d.ts +2 -0
- package/dist/tools/schemas.d.ts.map +1 -0
- package/dist/tools/schemas.js +2 -0
- package/dist/tools/schemas.js.map +1 -0
- package/package.json +105 -4
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { CapabilityError } from '@vibesdotdev/kernel';
|
|
2
|
+
import * as z from 'zod/v4';
|
|
3
|
+
import { NotionIntegrationConfigSchema } from "../schemas/notion.js";
|
|
4
|
+
import { JsonObjectSchema } from "../schemas/json.js";
|
|
5
|
+
import { OperationIdSchema, OperationInputs, OperationResults, contract } from "../schemas/operations.js";
|
|
6
|
+
import { BaseIntegrationProvider } from '@vibesdotdev/integrations/kinds/integration';
|
|
7
|
+
import { NotionAPIClient } from "./notion-client.js";
|
|
8
|
+
import { sendIntegrationAuthenticatedRequest } from '@vibesdotdev/integrations/server/secrets';
|
|
9
|
+
import { NotionPullOptionsSchema } from "./notion-schemas.js";
|
|
10
|
+
/**
|
|
11
|
+
* Notion integration implementation.
|
|
12
|
+
*
|
|
13
|
+
* Provides authenticated access to the Notion API with bounded pull transport.
|
|
14
|
+
* Credential and config resolution is inherited from
|
|
15
|
+
* `BaseIntegrationProvider` (consume-don't-reimplement): the base resolver
|
|
16
|
+
* reads the live request orgId on every call (the provider instance is
|
|
17
|
+
* value-cached by the runtime, so a constructor-snapshot orgId would bleed
|
|
18
|
+
* org A's credentials into org B's requests) and delivers credential
|
|
19
|
+
* references for the Secrets request owner. NOTION_API_TOKEN is a declared
|
|
20
|
+
* secret reference, never a feature-owned host environment read.
|
|
21
|
+
*/
|
|
22
|
+
export class NotionIntegration extends BaseIntegrationProvider {
|
|
23
|
+
async startAuthorization(_input) {
|
|
24
|
+
throw new CapabilityError('Notion OAuth authorization requires the platform host.', 'INVALID_INPUT', { reason: 'notion-oauth-host-required' });
|
|
25
|
+
}
|
|
26
|
+
async completeAuthorization(_input) {
|
|
27
|
+
throw new CapabilityError('Notion OAuth completion requires the platform host.', 'INVALID_INPUT', { reason: 'notion-oauth-host-required' });
|
|
28
|
+
}
|
|
29
|
+
async invokeOperation(opId, args) {
|
|
30
|
+
return this.dispatch(opId, args);
|
|
31
|
+
}
|
|
32
|
+
async invokeOperationForConnection(selector, opId, args) {
|
|
33
|
+
return this.dispatch(opId, args, selector);
|
|
34
|
+
}
|
|
35
|
+
async dispatch(opId, args, selector) {
|
|
36
|
+
const op = contract(OperationIdSchema).parse(opId);
|
|
37
|
+
const data = await this.dispatchClientOp(op, args, selector);
|
|
38
|
+
return { ok: true, data: contract(OperationResults[op]).parse(data) };
|
|
39
|
+
}
|
|
40
|
+
async dispatchClientOp(op, args, selector) {
|
|
41
|
+
if (op === 'pull-data-source')
|
|
42
|
+
return this.pullDataSource(contract(NotionPullOptionsSchema).parse(args ?? {}), selector);
|
|
43
|
+
const client = await this.getClient(selector);
|
|
44
|
+
switch (op) {
|
|
45
|
+
case 'getMe':
|
|
46
|
+
contract(OperationInputs.getMe).parse(args ?? {});
|
|
47
|
+
return client.getMe();
|
|
48
|
+
case 'listUsers':
|
|
49
|
+
contract(OperationInputs.listUsers).parse(args ?? {});
|
|
50
|
+
return client.listUsers();
|
|
51
|
+
case 'getDatabase': return client.getDatabase(contract(OperationInputs.getDatabase).parse(args).databaseId);
|
|
52
|
+
case 'getDataSource': return client.getDataSource(contract(OperationInputs.getDataSource).parse(args).dataSourceId);
|
|
53
|
+
case 'getPage': return client.getPage(contract(OperationInputs.getPage).parse(args).pageId);
|
|
54
|
+
case 'queryDataSource': return client.queryDataSource(contract(OperationInputs.queryDataSource).parse(args));
|
|
55
|
+
case 'createPage': return client.createPage(contract(OperationInputs.createPage).parse(args));
|
|
56
|
+
case 'updatePage': {
|
|
57
|
+
const input = contract(OperationInputs.updatePage).parse(args);
|
|
58
|
+
return client.updatePage(input.pageId, input.input);
|
|
59
|
+
}
|
|
60
|
+
case 'search': {
|
|
61
|
+
const input = contract(OperationInputs.search).parse(args ?? {});
|
|
62
|
+
return client.search(input.query, input);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Create a reference-bound client for the current connection. Secrets resolves
|
|
68
|
+
* credential values at each HTTP use, including after credential rotation.
|
|
69
|
+
*/
|
|
70
|
+
async getClient(selector) {
|
|
71
|
+
return this.createClient(await this.getCredentialUseConfiguration(selector));
|
|
72
|
+
}
|
|
73
|
+
createClient(resolved) {
|
|
74
|
+
const runtime = this.context.runtime;
|
|
75
|
+
if (!runtime) {
|
|
76
|
+
throw new CapabilityError('Notion runtime is required.', 'UNAVAILABLE', { reason: 'notion-runtime-required' });
|
|
77
|
+
}
|
|
78
|
+
const candidates = resolved.credentialReferences.accessToken ?? [];
|
|
79
|
+
if (candidates.length === 0) {
|
|
80
|
+
throw new CapabilityError('Notion access credential is required.', 'PERMISSION_DENIED', { reason: 'notion-credential-required' });
|
|
81
|
+
}
|
|
82
|
+
return new NotionAPIClient({
|
|
83
|
+
runtime,
|
|
84
|
+
fetchFn: async (input, init) => {
|
|
85
|
+
const request = new Request(input, init);
|
|
86
|
+
const method = request.method;
|
|
87
|
+
if (method !== 'GET' && method !== 'POST' && method !== 'PUT' && method !== 'PATCH' && method !== 'DELETE') {
|
|
88
|
+
throw new CapabilityError('Notion request method is unsupported.', 'INVALID_INPUT', { reason: 'notion-request-method-invalid' });
|
|
89
|
+
}
|
|
90
|
+
const textBody = z.string().safeParse(init?.body);
|
|
91
|
+
return sendIntegrationAuthenticatedRequest(runtime, {
|
|
92
|
+
url: request.url,
|
|
93
|
+
signal: request.signal,
|
|
94
|
+
options: {
|
|
95
|
+
method,
|
|
96
|
+
headers: Object.fromEntries(request.headers),
|
|
97
|
+
body: textBody.success ? textBody.data : request.body ?? undefined,
|
|
98
|
+
credentialBindings: [{
|
|
99
|
+
kind: 'header', candidates, header: 'authorization', prefix: 'Bearer '
|
|
100
|
+
}]
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Pull one cursor page from a Notion data source. If no data source id is
|
|
108
|
+
* passed, the provider resolves the canonical `dataSourceId` config.
|
|
109
|
+
* With neither configured, it performs the workspace-page-search fallback
|
|
110
|
+
* without exposing the credential to the caller.
|
|
111
|
+
*
|
|
112
|
+
* This is provider transport, not a claim that records were synchronized.
|
|
113
|
+
* Callers persist the cursor and feed the returned pages into a domain-owned
|
|
114
|
+
* sync endpoint and projection binding.
|
|
115
|
+
*/
|
|
116
|
+
async pullDataSource(options = {}, selector) {
|
|
117
|
+
const request = contract(NotionPullOptionsSchema).parse(options);
|
|
118
|
+
const resolved = await this.getCredentialUseConfiguration(selector);
|
|
119
|
+
const client = this.createClient(resolved);
|
|
120
|
+
let dataSourceId = request.dataSourceId;
|
|
121
|
+
if (!dataSourceId) {
|
|
122
|
+
// Core owns the protected transport endpoint; the feature config stays strict.
|
|
123
|
+
const { baseUrl: _baseUrl, ...sourceConfig } = resolved.config;
|
|
124
|
+
const config = contract(NotionIntegrationConfigSchema).parse(sourceConfig);
|
|
125
|
+
dataSourceId = config.dataSourceId;
|
|
126
|
+
}
|
|
127
|
+
if (!dataSourceId) {
|
|
128
|
+
if (request.since) {
|
|
129
|
+
throw new CapabilityError('Notion pull with since requires a configured dataSourceId.', 'INVALID_INPUT', { reason: 'notion-pull-source-required' });
|
|
130
|
+
}
|
|
131
|
+
const response = await client.search(undefined, {
|
|
132
|
+
filter: 'page',
|
|
133
|
+
pageSize: request.pageSize,
|
|
134
|
+
startCursor: request.startCursor
|
|
135
|
+
});
|
|
136
|
+
return {
|
|
137
|
+
pages: response.pages,
|
|
138
|
+
source: 'workspace_search',
|
|
139
|
+
hasMore: response.hasMore,
|
|
140
|
+
nextCursor: response.nextCursor,
|
|
141
|
+
scanned: response.pages.length
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
const response = await client.queryDataSource({
|
|
145
|
+
dataSourceId,
|
|
146
|
+
filter: request.since
|
|
147
|
+
? {
|
|
148
|
+
timestamp: 'last_edited_time',
|
|
149
|
+
last_edited_time: { after: request.since }
|
|
150
|
+
}
|
|
151
|
+
: undefined,
|
|
152
|
+
pageSize: request.pageSize,
|
|
153
|
+
startCursor: request.startCursor
|
|
154
|
+
});
|
|
155
|
+
return {
|
|
156
|
+
pages: response.pages,
|
|
157
|
+
source: 'data_source',
|
|
158
|
+
dataSourceId: response.dataSourceId,
|
|
159
|
+
hasMore: response.hasMore,
|
|
160
|
+
nextCursor: response.nextCursor,
|
|
161
|
+
scanned: response.pages.length
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Import a single page from Notion by ID.
|
|
166
|
+
*/
|
|
167
|
+
async importPage(pageId) {
|
|
168
|
+
const client = await this.getClient();
|
|
169
|
+
return client.getPage(pageId);
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Import a database schema from Notion by ID.
|
|
173
|
+
*/
|
|
174
|
+
async importDatabase(databaseId) {
|
|
175
|
+
const client = await this.getClient();
|
|
176
|
+
return client.getDatabase(databaseId);
|
|
177
|
+
}
|
|
178
|
+
/** Import a data source schema from Notion by ID. */
|
|
179
|
+
async importDataSource(dataSourceId) {
|
|
180
|
+
const client = await this.getClient();
|
|
181
|
+
return client.getDataSource(dataSourceId);
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Export a local item to Notion as a page.
|
|
185
|
+
*/
|
|
186
|
+
async exportPage(item) {
|
|
187
|
+
const client = await this.getClient();
|
|
188
|
+
const properties = contract(JsonObjectSchema).parse({
|
|
189
|
+
...item.properties
|
|
190
|
+
});
|
|
191
|
+
// Add title to properties if data source parent.
|
|
192
|
+
if (item.dataSourceId ?? item.databaseId) {
|
|
193
|
+
properties.Name = {
|
|
194
|
+
title: [{ text: { content: item.title } }]
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
return client.createPage({
|
|
198
|
+
parentDataSourceId: item.dataSourceId ?? item.databaseId,
|
|
199
|
+
parentPageId: item.parentPageId,
|
|
200
|
+
properties,
|
|
201
|
+
children: item.description
|
|
202
|
+
? [
|
|
203
|
+
{
|
|
204
|
+
object: 'block',
|
|
205
|
+
type: 'paragraph',
|
|
206
|
+
paragraph: {
|
|
207
|
+
rich_text: [{ text: { content: item.description } }]
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
]
|
|
211
|
+
: undefined
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Search for pages and data sources in the workspace.
|
|
216
|
+
*/
|
|
217
|
+
async search(query, options) {
|
|
218
|
+
const client = await this.getClient();
|
|
219
|
+
return client.search(query, options);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
//# sourceMappingURL=notion-implementation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notion-implementation.js","sourceRoot":"","sources":["../../src/notion/notion-implementation.ts"],"names":[],"mappings":"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AAM,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;CACD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notion-schemas.d.ts","sourceRoot":"","sources":["../../src/notion/notion-schemas.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notion-schemas.js","sourceRoot":"","sources":["../../src/notion/notion-schemas.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
id: string;
|
|
3
|
+
kind: "integration/provider";
|
|
4
|
+
name?: string | undefined;
|
|
5
|
+
description?: string | undefined;
|
|
6
|
+
tags?: string[] | undefined;
|
|
7
|
+
hardware?: string[] | undefined;
|
|
8
|
+
enabled?: boolean | undefined;
|
|
9
|
+
capabilityId?: string | undefined;
|
|
10
|
+
retention?: string | {
|
|
11
|
+
reason: string;
|
|
12
|
+
maxAgeDays?: number | undefined;
|
|
13
|
+
maxEntries?: number | undefined;
|
|
14
|
+
maxBytes?: number | undefined;
|
|
15
|
+
cascadeFrom?: string | undefined;
|
|
16
|
+
ageField?: string | undefined;
|
|
17
|
+
enforcedBy?: string | undefined;
|
|
18
|
+
} | undefined;
|
|
19
|
+
requiredContext?: string[] | undefined;
|
|
20
|
+
optionalContext?: string[] | undefined;
|
|
21
|
+
provider?: string | undefined;
|
|
22
|
+
category?: "push" | "email" | "webhook" | "accounting" | "vcs" | "issue-tracker" | "productivity" | "ocr" | "messaging" | "sms" | "storage" | "analytics" | "observability" | "crm" | "calendar" | "other" | undefined;
|
|
23
|
+
priority?: number | undefined;
|
|
24
|
+
baseUrl?: string | undefined;
|
|
25
|
+
config?: Record<string, import("@vibesdotdev/kernel/bootstrap").JsonValue> | undefined;
|
|
26
|
+
protectedConfigKeys?: string[] | undefined;
|
|
27
|
+
configurationSource?: "account" | "host" | undefined;
|
|
28
|
+
configSettingKey?: string | undefined;
|
|
29
|
+
credentials?: {
|
|
30
|
+
key: string;
|
|
31
|
+
source: "secret" | "setting";
|
|
32
|
+
reference?: {
|
|
33
|
+
source: "secret";
|
|
34
|
+
key: string;
|
|
35
|
+
store?: string | undefined;
|
|
36
|
+
operation?: object | undefined;
|
|
37
|
+
} | undefined;
|
|
38
|
+
providerType?: string | undefined;
|
|
39
|
+
scope?: "user" | "project" | "platform" | "org" | undefined;
|
|
40
|
+
scopeId?: string | undefined;
|
|
41
|
+
settingKey?: string | undefined;
|
|
42
|
+
required?: boolean | undefined;
|
|
43
|
+
}[] | undefined;
|
|
44
|
+
oauth?: {
|
|
45
|
+
authorizationEndpoint: string;
|
|
46
|
+
tokenEndpoint: string;
|
|
47
|
+
scopes?: string[] | undefined;
|
|
48
|
+
authorizationParams?: Record<string, string> | undefined;
|
|
49
|
+
configFromCallback?: string[] | undefined;
|
|
50
|
+
clientAuthentication?: "form" | "basic" | undefined;
|
|
51
|
+
bodyEncoding?: "form" | "json" | undefined;
|
|
52
|
+
headers?: Record<string, string> | undefined;
|
|
53
|
+
scopeIdCallbackParam?: string | undefined;
|
|
54
|
+
} | undefined;
|
|
55
|
+
operations?: {
|
|
56
|
+
id: string;
|
|
57
|
+
name: string;
|
|
58
|
+
description?: string | undefined;
|
|
59
|
+
requiresOrg?: boolean | undefined;
|
|
60
|
+
}[] | undefined;
|
|
61
|
+
connection?: {
|
|
62
|
+
authMode?: "oauth" | "webhook" | "delegated" | "system-config" | undefined;
|
|
63
|
+
connectable?: boolean | undefined;
|
|
64
|
+
checkable?: boolean | undefined;
|
|
65
|
+
requiresProviderAdmin?: boolean | undefined;
|
|
66
|
+
} | undefined;
|
|
67
|
+
};
|
|
68
|
+
export default _default;
|
|
69
|
+
//# sourceMappingURL=system.integration.notion.descriptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system.integration.notion.descriptor.d.ts","sourceRoot":"","sources":["../../src/notion/system.integration.notion.descriptor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,wBA6GG"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { createRuntimeAsset } from '@vibesdotdev/kernel/factory';
|
|
2
|
+
import {} from '@vibesdotdev/integrations/schemas/integration-descriptor';
|
|
3
|
+
export default createRuntimeAsset({
|
|
4
|
+
kind: 'integration/provider',
|
|
5
|
+
id: 'integration.notion',
|
|
6
|
+
name: 'Notion',
|
|
7
|
+
description: 'Notion API 2026-03-11 integration for planning and synchronized projections.',
|
|
8
|
+
provider: 'notion',
|
|
9
|
+
category: 'productivity',
|
|
10
|
+
enabled: true,
|
|
11
|
+
priority: 90,
|
|
12
|
+
baseUrl: 'https://api.notion.com/v1',
|
|
13
|
+
protectedConfigKeys: [],
|
|
14
|
+
configSettingKey: 'integrations.notion.config',
|
|
15
|
+
config: {
|
|
16
|
+
dataSourceId: ''
|
|
17
|
+
},
|
|
18
|
+
credentials: [
|
|
19
|
+
{
|
|
20
|
+
key: 'accessToken',
|
|
21
|
+
source: 'secret',
|
|
22
|
+
providerType: 'notion',
|
|
23
|
+
scope: 'org',
|
|
24
|
+
required: false
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
key: 'accessToken',
|
|
28
|
+
source: 'secret',
|
|
29
|
+
reference: { source: 'secret', key: 'NOTION_API_TOKEN' },
|
|
30
|
+
required: false
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
oauth: {
|
|
34
|
+
authorizationEndpoint: 'https://api.notion.com/v1/oauth/authorize',
|
|
35
|
+
tokenEndpoint: 'https://api.notion.com/v1/oauth/token',
|
|
36
|
+
scopes: [],
|
|
37
|
+
configFromCallback: []
|
|
38
|
+
},
|
|
39
|
+
connection: {
|
|
40
|
+
authMode: 'oauth',
|
|
41
|
+
connectable: true,
|
|
42
|
+
checkable: true,
|
|
43
|
+
requiresProviderAdmin: false
|
|
44
|
+
},
|
|
45
|
+
operations: [
|
|
46
|
+
{
|
|
47
|
+
id: 'pull-data-source',
|
|
48
|
+
name: 'Pull data source page',
|
|
49
|
+
description: 'Pull one cursor page of data source rows, optionally filtered by last-edited time. Uses configured dataSourceId when omitted.',
|
|
50
|
+
requiresOrg: true
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
id: 'getMe',
|
|
54
|
+
name: 'Get current user',
|
|
55
|
+
description: 'Fetch the authenticated bot user (no args).',
|
|
56
|
+
requiresOrg: true
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
id: 'listUsers',
|
|
60
|
+
name: 'List workspace users',
|
|
61
|
+
description: 'List users in the workspace (no args).',
|
|
62
|
+
requiresOrg: true
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: 'getDatabase',
|
|
66
|
+
name: 'Get database',
|
|
67
|
+
description: 'Fetch a database container and its child data source ids.',
|
|
68
|
+
requiresOrg: true
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: 'getDataSource',
|
|
72
|
+
name: 'Get data source',
|
|
73
|
+
description: 'Fetch a data source schema. Args: `{ dataSourceId: string }`.',
|
|
74
|
+
requiresOrg: true
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: 'queryDataSource',
|
|
78
|
+
name: 'Query data source',
|
|
79
|
+
description: 'Query rows of a data source with optional filter/sorts. Args: `QueryNotionDataSourceInput`.',
|
|
80
|
+
requiresOrg: true
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
id: 'getPage',
|
|
84
|
+
name: 'Get page',
|
|
85
|
+
description: 'Fetch a page by id. Args: `{ pageId: string }`.',
|
|
86
|
+
requiresOrg: true
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
id: 'createPage',
|
|
90
|
+
name: 'Create page',
|
|
91
|
+
description: 'Create a new page. Args: `CreateNotionPageInput`.',
|
|
92
|
+
requiresOrg: true
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
id: 'updatePage',
|
|
96
|
+
name: 'Update page',
|
|
97
|
+
description: 'Update an existing page. Args: `{ pageId: string; input: UpdateNotionPageInput }`.',
|
|
98
|
+
requiresOrg: true
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
id: 'search',
|
|
102
|
+
name: 'Search workspace',
|
|
103
|
+
description: 'Workspace search for pages or data sources. Filter values: `page` or `data_source`.',
|
|
104
|
+
requiresOrg: true
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
tags: ['system', 'integration', 'notion', 'planning']
|
|
108
|
+
});
|
|
109
|
+
//# sourceMappingURL=system.integration.notion.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system.integration.notion.descriptor.js","sourceRoot":"","sources":["../../src/notion/system.integration.notion.descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAEN,MAAM,0DAA0D,CAAC;AAElE,eAAe,kBAAkB,CAAqC;IACrE,IAAI,EAAE,sBAAsB;IAC5B,EAAE,EAAE,oBAAoB;IACxB,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,8EAA8E;IAC3F,QAAQ,EAAE,QAAQ;IAClB,QAAQ,EAAE,cAAc;IACxB,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,EAAE;IACZ,OAAO,EAAE,2BAA2B;IACpC,mBAAmB,EAAE,EAAE;IACvB,gBAAgB,EAAE,4BAA4B;IAC9C,MAAM,EAAE;QACP,YAAY,EAAE,EAAE;KAChB;IACD,WAAW,EAAE;QACZ;YACC,GAAG,EAAE,aAAa;YAClB,MAAM,EAAE,QAAQ;YAChB,YAAY,EAAE,QAAQ;YACtB,KAAK,EAAE,KAAK;YACZ,QAAQ,EAAE,KAAK;SACf;QACD;YACC,GAAG,EAAE,aAAa;YAClB,MAAM,EAAE,QAAQ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YAChE,WAAW,EAAE,IAAI;SACjB;QACD;YACC,EAAE,EAAE,YAAY;YAChB,IAAI,EAAE,aAAa;YACnB,WAAW,EACV,oFAAoF;YACrF,WAAW,EAAE,IAAI;SACjB;QACD;YACC,EAAE,EAAE,QAAQ;YACZ,IAAI,EAAE,kBAAkB;YACxB,WAAW,EACV,qFAAqF;YACtF,WAAW,EAAE,IAAI;SACjB;KACD;IACD,IAAI,EAAE,CAAC,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,UAAU,CAAC;CACrD,CAAC,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/** Renderer-safe Notion declaration. Operational authority stays with the host plugin. */
|
|
2
|
+
export declare const notionCatalogProviderDescriptor: {
|
|
3
|
+
id: string;
|
|
4
|
+
kind: "integration/provider";
|
|
5
|
+
requiredContext: string[];
|
|
6
|
+
optionalContext: string[];
|
|
7
|
+
provider: string;
|
|
8
|
+
category: "push" | "email" | "webhook" | "accounting" | "vcs" | "issue-tracker" | "productivity" | "ocr" | "messaging" | "sms" | "storage" | "analytics" | "observability" | "crm" | "calendar" | "other";
|
|
9
|
+
priority: number;
|
|
10
|
+
config: Record<string, import("@vibesdotdev/kernel/bootstrap").JsonValue>;
|
|
11
|
+
protectedConfigKeys: string[];
|
|
12
|
+
credentials: {
|
|
13
|
+
key: string;
|
|
14
|
+
source: "secret" | "setting";
|
|
15
|
+
required: boolean;
|
|
16
|
+
reference?: {
|
|
17
|
+
source: "secret";
|
|
18
|
+
key: string;
|
|
19
|
+
store?: string | undefined;
|
|
20
|
+
operation?: object | undefined;
|
|
21
|
+
} | undefined;
|
|
22
|
+
providerType?: string | undefined;
|
|
23
|
+
scope?: "user" | "project" | "platform" | "org" | undefined;
|
|
24
|
+
scopeId?: string | undefined;
|
|
25
|
+
settingKey?: string | undefined;
|
|
26
|
+
}[];
|
|
27
|
+
operations: {
|
|
28
|
+
id: string;
|
|
29
|
+
name: string;
|
|
30
|
+
requiresOrg: boolean;
|
|
31
|
+
description?: string | undefined;
|
|
32
|
+
}[];
|
|
33
|
+
name?: string | undefined;
|
|
34
|
+
description?: string | undefined;
|
|
35
|
+
tags?: string[] | undefined;
|
|
36
|
+
hardware?: string[] | undefined;
|
|
37
|
+
enabled?: boolean | undefined;
|
|
38
|
+
capabilityId?: string | undefined;
|
|
39
|
+
retention?: string | {
|
|
40
|
+
reason: string;
|
|
41
|
+
maxAgeDays?: number | undefined;
|
|
42
|
+
maxEntries?: number | undefined;
|
|
43
|
+
maxBytes?: number | undefined;
|
|
44
|
+
cascadeFrom?: string | undefined;
|
|
45
|
+
ageField?: string | undefined;
|
|
46
|
+
enforcedBy?: string | undefined;
|
|
47
|
+
} | undefined;
|
|
48
|
+
baseUrl?: string | undefined;
|
|
49
|
+
configurationSource?: "account" | "host" | undefined;
|
|
50
|
+
configSettingKey?: string | undefined;
|
|
51
|
+
oauth?: {
|
|
52
|
+
authorizationEndpoint: string;
|
|
53
|
+
tokenEndpoint: string;
|
|
54
|
+
scopes: string[];
|
|
55
|
+
configFromCallback: string[];
|
|
56
|
+
clientAuthentication: "form" | "basic";
|
|
57
|
+
bodyEncoding: "form" | "json";
|
|
58
|
+
headers: Record<string, string>;
|
|
59
|
+
authorizationParams?: Record<string, string> | undefined;
|
|
60
|
+
scopeIdCallbackParam?: string | undefined;
|
|
61
|
+
} | undefined;
|
|
62
|
+
connection?: {
|
|
63
|
+
connectable: boolean;
|
|
64
|
+
checkable: boolean;
|
|
65
|
+
requiresProviderAdmin: boolean;
|
|
66
|
+
authMode?: "oauth" | "webhook" | "delegated" | "system-config" | undefined;
|
|
67
|
+
} | undefined;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Descriptor-only catalog contribution for browser and consumer-daemon runtimes.
|
|
71
|
+
*
|
|
72
|
+
* This plugin deliberately owns no loader, implementation, credentials, or
|
|
73
|
+
* provider operations. Hosts compose the full Notion plugin where execution is
|
|
74
|
+
* authorized; consumer surfaces only receive the projected declaration.
|
|
75
|
+
*/
|
|
76
|
+
export declare const integrationsNotionCatalogPlugin: import("@vibesdotdev/kernel").RuntimePlugin;
|
|
77
|
+
export default integrationsNotionCatalogPlugin;
|
|
78
|
+
//# sourceMappingURL=notion.catalog.plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notion.catalog.plugin.d.ts","sourceRoot":"","sources":["../src/notion.catalog.plugin.ts"],"names":[],"mappings":"AAIA,0FAA0F;AAC1F,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAE3C,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,+BAA+B,6CAM1C,CAAC;AAEH,eAAe,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { projectIntegrationCatalogProvider } from '@vibesdotdev/integrations/catalog';
|
|
2
|
+
import { createRuntimePlugin } from '@vibesdotdev/kernel/factory';
|
|
3
|
+
import notionProviderDescriptor from "./notion/system.integration.notion.descriptor.js";
|
|
4
|
+
/** Renderer-safe Notion declaration. Operational authority stays with the host plugin. */
|
|
5
|
+
export const notionCatalogProviderDescriptor = projectIntegrationCatalogProvider(notionProviderDescriptor);
|
|
6
|
+
/**
|
|
7
|
+
* Descriptor-only catalog contribution for browser and consumer-daemon runtimes.
|
|
8
|
+
*
|
|
9
|
+
* This plugin deliberately owns no loader, implementation, credentials, or
|
|
10
|
+
* provider operations. Hosts compose the full Notion plugin where execution is
|
|
11
|
+
* authorized; consumer surfaces only receive the projected declaration.
|
|
12
|
+
*/
|
|
13
|
+
export const integrationsNotionCatalogPlugin = createRuntimePlugin({
|
|
14
|
+
id: 'integrations-notion/catalog',
|
|
15
|
+
name: 'Notion Integration Catalog',
|
|
16
|
+
description: 'Renderer-safe Notion integration catalog declaration.',
|
|
17
|
+
dependencies: ['integrations'],
|
|
18
|
+
descriptors: [notionCatalogProviderDescriptor]
|
|
19
|
+
});
|
|
20
|
+
export default integrationsNotionCatalogPlugin;
|
|
21
|
+
//# sourceMappingURL=notion.catalog.plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notion.catalog.plugin.js","sourceRoot":"","sources":["../src/notion.catalog.plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iCAAiC,EAAE,MAAM,mCAAmC,CAAC;AACtF,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,wBAAwB,MAAM,kDAAkD,CAAC;AAExF,0FAA0F;AAC1F,MAAM,CAAC,MAAM,+BAA+B,GAAG,iCAAiC,CAC9E,wBAAwB,CACzB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,mBAAmB,CAAC;IACjE,EAAE,EAAE,6BAA6B;IACjC,IAAI,EAAE,4BAA4B;IAClC,WAAW,EAAE,uDAAuD;IACpE,YAAY,EAAE,CAAC,cAAc,CAAC;IAC9B,WAAW,EAAE,CAAC,+BAA+B,CAAC;CAC/C,CAAC,CAAC;AAEH,eAAe,+BAA+B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notion.client.plugin.d.ts","sourceRoot":"","sources":["../src/notion.client.plugin.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,8BAA8B,6CAmDzC,CAAC;AAEH,eAAe,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Consumer-only Notion plugin.
|
|
3
|
+
*
|
|
4
|
+
* Register this in apps that call the platform-hosted Notion provider. It
|
|
5
|
+
* exposes only the typed `runtime/client`; it never registers the provider,
|
|
6
|
+
* loads credentials, or performs Notion REST requests in the consumer worker.
|
|
7
|
+
*/
|
|
8
|
+
import { createRuntimePlugin, loader } from '@vibesdotdev/kernel/factory';
|
|
9
|
+
import integrationsNotionDocsDescriptor from "./docs/integrations-notion.docs.descriptor.js";
|
|
10
|
+
import knowledgeNotionSyncMapping from "./sync/knowledge.notion.sync-mapping.descriptor.js";
|
|
11
|
+
import projectsNotionSyncMapping from "./sync/projects.notion.sync-mapping.descriptor.js";
|
|
12
|
+
import workNotionSyncMapping from "./sync/work.notion.sync-mapping.descriptor.js";
|
|
13
|
+
import notionSyncEndpoint from "./sync/notion.sync-endpoint.descriptor.js";
|
|
14
|
+
import { NOTION_TOOL_IDS, notionToolDescriptors } from "./tools/descriptors.js";
|
|
15
|
+
export const integrationsNotionClientPlugin = createRuntimePlugin({
|
|
16
|
+
id: 'integrations-notion/client',
|
|
17
|
+
name: 'Integrations Notion Client Plugin',
|
|
18
|
+
description: 'Consumer-only typed client for the platform-hosted Notion integration',
|
|
19
|
+
dependencies: ['sync'],
|
|
20
|
+
descriptors: [
|
|
21
|
+
{
|
|
22
|
+
id: 'notion',
|
|
23
|
+
kind: 'runtime/client',
|
|
24
|
+
description: 'Canonical Notion client — pages / data sources / databases / users over declared operations'
|
|
25
|
+
},
|
|
26
|
+
notionSyncEndpoint,
|
|
27
|
+
knowledgeNotionSyncMapping,
|
|
28
|
+
projectsNotionSyncMapping,
|
|
29
|
+
workNotionSyncMapping,
|
|
30
|
+
integrationsNotionDocsDescriptor,
|
|
31
|
+
...notionToolDescriptors
|
|
32
|
+
],
|
|
33
|
+
loaders: [
|
|
34
|
+
loader('notion', { kind: 'runtime/client' }, async () => {
|
|
35
|
+
const { NotionClient } = await import("./client/runtime-client.js");
|
|
36
|
+
return { impl: NotionClient };
|
|
37
|
+
}),
|
|
38
|
+
loader(notionSyncEndpoint.id, { kind: 'sync/endpoint' }, () => import("./sync/notion.sync-endpoint.impl.js")),
|
|
39
|
+
loader(knowledgeNotionSyncMapping.id, { kind: 'sync/mapping' }, () => import("./sync/knowledge.notion.sync-mapping.impl.js")),
|
|
40
|
+
loader(projectsNotionSyncMapping.id, { kind: 'sync/mapping' }, () => import("./sync/projects.notion.sync-mapping.impl.js")),
|
|
41
|
+
loader(workNotionSyncMapping.id, { kind: 'sync/mapping' }, () => import("./sync/work.notion.sync-mapping.impl.js")),
|
|
42
|
+
...NOTION_TOOL_IDS.map((toolId) => loader(toolId, { kind: 'tools/tool' }, async () => {
|
|
43
|
+
const { createNotionTool } = await import("./tools/impl.js");
|
|
44
|
+
return createNotionTool(toolId);
|
|
45
|
+
}))
|
|
46
|
+
]
|
|
47
|
+
});
|
|
48
|
+
export default integrationsNotionClientPlugin;
|
|
49
|
+
//# sourceMappingURL=notion.client.plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notion.client.plugin.js","sourceRoot":"","sources":["../src/notion.client.plugin.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,gCAAgC,MAAM,+CAA+C,CAAC;AAC7F,OAAO,0BAA0B,MAAM,oDAAoD,CAAC;AAC5F,OAAO,yBAAyB,MAAM,mDAAmD,CAAC;AAC1F,OAAO,qBAAqB,MAAM,+CAA+C,CAAC;AAClF,OAAO,kBAAkB,MAAM,2CAA2C,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAEhF,MAAM,CAAC,MAAM,8BAA8B,GAAG,mBAAmB,CAAC;IACjE,EAAE,EAAE,4BAA4B;IAChC,IAAI,EAAE,mCAAmC;IACzC,WAAW,EAAE,uEAAuE;IACpF,YAAY,EAAE,CAAC,MAAM,CAAC;IACtB,WAAW,EAAE;QACZ;YACC,EAAE,EAAE,QAAQ;YACZ,IAAI,EAAE,gBAAgB;YACtB,WAAW,EACV,6FAA6F;SAC9F;QACD,kBAAkB;QAClB,0BAA0B;QAC1B,yBAAyB;QACzB,qBAAqB;QACrB,gCAAgC;QAChC,GAAG,qBAAqB;KACxB;IACD,OAAO,EAAE;QACR,MAAM,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,EAAE,KAAK,IAAI,EAAE;YACvD,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,MAAM,CAAC,4BAA4B,CAAC,CAAC;YACpE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;QAC/B,CAAC,CAAC;QACF,MAAM,CACL,kBAAkB,CAAC,EAAE,EACrB,EAAE,IAAI,EAAE,eAAe,EAAE,EACzB,GAAG,EAAE,CAAC,MAAM,CAAC,qCAAqC,CAAC,CACnD;QACD,MAAM,CACL,0BAA0B,CAAC,EAAE,EAC7B,EAAE,IAAI,EAAE,cAAc,EAAE,EACxB,GAAG,EAAE,CAAC,MAAM,CAAC,8CAA8C,CAAC,CAC5D;QACD,MAAM,CACL,yBAAyB,CAAC,EAAE,EAC5B,EAAE,IAAI,EAAE,cAAc,EAAE,EACxB,GAAG,EAAE,CAAC,MAAM,CAAC,6CAA6C,CAAC,CAC3D;QACD,MAAM,CACL,qBAAqB,CAAC,EAAE,EACxB,EAAE,IAAI,EAAE,cAAc,EAAE,EACxB,GAAG,EAAE,CAAC,MAAM,CAAC,yCAAyC,CAAC,CACvD;QACD,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CACjC,MAAM,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,EAAE,KAAK,IAAI,EAAE;YACjD,MAAM,EAAE,gBAAgB,EAAE,GAAG,MAAM,MAAM,CAAC,iBAAiB,CAAC,CAAC;YAC7D,OAAO,gBAAgB,CAAC,MAAM,CAAC,CAAC;QACjC,CAAC,CAAC,CACF;KACD;CACD,CAAC,CAAC;AAEH,eAAe,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
import { JsonObjectSchema, JsonValueSchema } from '@vibesdotdev/kernel/schemas/json';
|
|
3
|
+
export { JsonObjectSchema, JsonValueSchema };
|
|
4
|
+
export type JsonValue = z.infer<typeof JsonValueSchema>;
|
|
5
|
+
export type JsonObject = z.infer<typeof JsonObjectSchema>;
|
|
6
|
+
//# sourceMappingURL=json.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../src/schemas/json.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,CAAC;AAE7C,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json.js","sourceRoot":"","sources":["../../src/schemas/json.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,CAAC"}
|