@pageloop/external 0.5.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 ADDED
@@ -0,0 +1,94 @@
1
+ Required Notice: Copyright 2026 Ryan Weiss (https://pageloop.dev)
2
+ Licensor Line of Business: PageLoop — drop-in commenting and change-tracking for web content (https://pageloop.dev)
3
+
4
+ ---
5
+
6
+ # PolyForm Shield License 1.0.0
7
+
8
+ <https://polyformproject.org/licenses/shield/1.0.0>
9
+
10
+ ## Acceptance
11
+
12
+ In order to get any license under these terms, you must agree to them as both strict obligations and conditions to all your licenses.
13
+
14
+ ## Copyright License
15
+
16
+ The licensor grants you a copyright license for the software to do everything you might do with the software that would otherwise infringe the licensor's copyright in it for any permitted purpose. However, you may only distribute the software according to [Distribution License](#distribution-license) and make changes or new works based on the software according to [Changes and New Works License](#changes-and-new-works-license).
17
+
18
+ ## Distribution License
19
+
20
+ The licensor grants you an additional copyright license to distribute copies of the software. Your license to distribute covers distributing the software with changes and new works permitted by [Changes and New Works License](#changes-and-new-works-license).
21
+
22
+ ## Notices
23
+
24
+ You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms or the URL for them above, as well as copies of any plain-text lines beginning with `Required Notice:` that the licensor provided with the software. For example:
25
+
26
+ > Required Notice: Copyright Yoyodyne, Inc. (http://example.com)
27
+
28
+ ## Changes and New Works License
29
+
30
+ The licensor grants you an additional copyright license to make changes and new works based on the software for any permitted purpose.
31
+
32
+ ## Patent License
33
+
34
+ The licensor grants you a patent license for the software that covers patent claims the licensor can license, or becomes able to license, that you would infringe by using the software.
35
+
36
+ ## Noncompete
37
+
38
+ Any purpose is a permitted purpose, except for providing any product that competes with the software or any product the licensor or any of its affiliates provides using the software.
39
+
40
+ ## Competition
41
+
42
+ Goods and services compete even when they provide functionality through different kinds of interfaces or for different technical platforms. Applications can compete with services, libraries with plugins, frameworks with development tools, and so on, even if they're written in different programming languages or for different computer architectures. Goods and services compete even when provided free of charge. If you market a product as a practical substitute for the software or another product, it definitely competes.
43
+
44
+ ## New Products
45
+
46
+ If you are using the software to provide a product that does not compete, but the licensor or any of its affiliates brings your product into competition by providing a new version of the software or another product using the software, you may continue using versions of the software available under these terms beforehand to provide your competing product, but not any later versions.
47
+
48
+ ## Discontinued Products
49
+
50
+ You may begin using the software to compete with a product or service that the licensor or any of its affiliates has stopped providing, unless the licensor includes a plain-text line beginning with `Licensor Line of Business:` with the software that mentions that line of business. For example:
51
+
52
+ > Licensor Line of Business: YoyodyneCMS Content Management System (http://example.com/cms)
53
+
54
+ ## Sales of Business
55
+
56
+ If the licensor or any of its affiliates sells a line of business developing the software or using the software to provide a product, the buyer can also enforce [Noncompete](#noncompete) for that product.
57
+
58
+ ## Fair Use
59
+
60
+ You may have "fair use" rights for the software under the law. These terms do not limit them.
61
+
62
+ ## No Other Rights
63
+
64
+ These terms do not allow you to sublicense or transfer any of your licenses to anyone else, or prevent the licensor from granting licenses to anyone else. These terms do not imply any other licenses.
65
+
66
+ ## Patent Defense
67
+
68
+ If you make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
69
+
70
+ ## Violations
71
+
72
+ The first time you are notified in writing that you have violated any of these terms, or done anything with the software not covered by your licenses, your licenses can nonetheless continue if you come into full compliance with these terms, and take practical steps to correct past violations, within 32 days of receiving notice. Otherwise, all your licenses end immediately.
73
+
74
+ ## No Liability
75
+
76
+ ***As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.***
77
+
78
+ ## Definitions
79
+
80
+ The **licensor** is the individual or entity offering these terms, and the **software** is the software the licensor makes available under these terms.
81
+
82
+ A **product** can be a good or service, or a combination of them.
83
+
84
+ **You** refers to the individual or entity agreeing to these terms.
85
+
86
+ **Your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all its affiliates.
87
+
88
+ **Affiliates** means the other organizations than an organization has control over, is under the control of, or is under common control with.
89
+
90
+ **Control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
91
+
92
+ **Your licenses** are all the licenses granted to you for the software under these terms.
93
+
94
+ **Use** means anything you do with the software requiring one of your licenses.
package/README.md ADDED
@@ -0,0 +1,69 @@
1
+ # @pageloop/external
2
+
3
+ `ExternalIntegrationAdapter` implementations for the
4
+ [PageLoop](https://github.com/rw3iss/pageloop) server — pull (or accept pushes
5
+ of) content from third-party note/doc sources into a project. One subpath per
6
+ provider; none pulls a heavyweight SDK (they talk HTTP / parse files).
7
+
8
+ ## Install
9
+
10
+ ```bash
11
+ pnpm add @pageloop/external
12
+ ```
13
+
14
+ ## Exports
15
+
16
+ | Subpath | Provider | Auth mode |
17
+ |---|---|---|
18
+ | `.` | re-exports every provider factory below | — |
19
+ | `/notion` | `createNotionAdapter(config)` — Notion | `oauth-pull` |
20
+ | `/evernote` | `createEvernoteAdapter(config)` — Evernote | `oauth-pull` (OAuth 1.0a) |
21
+ | `/obsidian` | `createObsidianAdapter()` — Obsidian | `plugin-push` |
22
+
23
+ Each factory returns an `ExternalIntegrationAdapter` you register with the
24
+ `Application`'s integration registry.
25
+
26
+ > Notion is the only provider with a working content-fetch path today; Evernote
27
+ > and Obsidian are Phase 2 skeletons (auth/fetch methods throw `not yet
28
+ > implemented`). The adapter shape and registration wiring are stable.
29
+
30
+ ## `.` — all providers
31
+
32
+ ```ts
33
+ import { createNotionAdapter, createObsidianAdapter } from '@pageloop/external';
34
+ ```
35
+
36
+ ## `/notion` — OAuth 2.0 pull
37
+
38
+ ```ts
39
+ import { createNotionAdapter } from '@pageloop/external/notion';
40
+
41
+ const notion = createNotionAdapter({
42
+ clientId: process.env.PAGELOOP_NOTION_CLIENT_ID!,
43
+ clientSecret: process.env.PAGELOOP_NOTION_CLIENT_SECRET!,
44
+ // redirectUri defaults to the Application's baseUrl + the OAuth callback path
45
+ });
46
+ ```
47
+
48
+ ## `/evernote` — OAuth 1.0a pull
49
+
50
+ ```ts
51
+ import { createEvernoteAdapter } from '@pageloop/external/evernote';
52
+
53
+ const evernote = createEvernoteAdapter({
54
+ consumerKey: process.env.PAGELOOP_EVERNOTE_CONSUMER_KEY!,
55
+ consumerSecret: process.env.PAGELOOP_EVERNOTE_CONSUMER_SECRET!,
56
+ env: 'sandbox', // 'production' once Evernote promotes the key
57
+ });
58
+ ```
59
+
60
+ ## `/obsidian` — plugin push
61
+
62
+ No server config — the first-party Obsidian Sync plugin POSTs note changes with
63
+ a user-minted Personal Access Token:
64
+
65
+ ```ts
66
+ import { createObsidianAdapter } from '@pageloop/external/obsidian';
67
+
68
+ const obsidian = createObsidianAdapter();
69
+ ```
@@ -0,0 +1 @@
1
+ {"fileNames":["../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../../shared/types/dist/brand.d.ts","../../../../shared/types/dist/themes.d.ts","../../../../shared/types/dist/author.d.ts","../../../../shared/types/dist/time.d.ts","../../../../shared/types/dist/page-settings.d.ts","../../../../shared/types/dist/entities.d.ts","../../../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/typeAliases.d.cts","../../../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.d.cts","../../../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/index.d.cts","../../../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.d.cts","../../../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.d.cts","../../../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.d.cts","../../../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.d.cts","../../../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/enumUtil.d.cts","../../../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.d.cts","../../../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/partialUtil.d.cts","../../../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/standard-schema.d.cts","../../../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.d.cts","../../../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/external.d.cts","../../../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/index.d.cts","../../../../shared/types/dist/schemas.d.ts","../../../../shared/types/dist/storage.d.ts","../../../../shared/types/dist/external-integrations.d.ts","../../../../shared/types/dist/adapters.d.ts","../../../../shared/types/dist/commands.d.ts","../../../../shared/types/dist/events.d.ts","../../../../shared/types/dist/errors.d.ts","../../../../shared/types/dist/plans.d.ts","../../../../shared/types/dist/managed-docs.d.ts","../../../../shared/types/dist/user-settings.d.ts","../../../../shared/types/dist/repo-file-filters.d.ts","../../../../shared/types/dist/content-sources.d.ts","../../../../shared/types/dist/index.d.ts","../src/evernote.ts","../src/notion/blocksToMarkdown.ts","../src/notion/index.ts","../src/obsidian.ts","../src/index.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/compatibility/disposable.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/compatibility/indexable.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/compatibility/iterators.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/compatibility/index.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/globals.typedarray.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/buffer.buffer.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/globals.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/web-globals/abortcontroller.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/web-globals/domexception.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/web-globals/events.d.ts","../../../../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.d.ts","../../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/header.d.ts","../../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/readable.d.ts","../../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/file.d.ts","../../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/fetch.d.ts","../../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/formdata.d.ts","../../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/connector.d.ts","../../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/client.d.ts","../../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/errors.d.ts","../../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/dispatcher.d.ts","../../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/global-dispatcher.d.ts","../../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/global-origin.d.ts","../../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/pool-stats.d.ts","../../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/pool.d.ts","../../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/handlers.d.ts","../../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/balanced-pool.d.ts","../../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/agent.d.ts","../../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-interceptor.d.ts","../../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-agent.d.ts","../../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-client.d.ts","../../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-pool.d.ts","../../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-errors.d.ts","../../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/proxy-agent.d.ts","../../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/env-http-proxy-agent.d.ts","../../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/retry-handler.d.ts","../../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/retry-agent.d.ts","../../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/api.d.ts","../../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/interceptors.d.ts","../../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/util.d.ts","../../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/cookies.d.ts","../../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/patch.d.ts","../../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/websocket.d.ts","../../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/eventsource.d.ts","../../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/filereader.d.ts","../../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/diagnostics-channel.d.ts","../../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/content-type.d.ts","../../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/cache.d.ts","../../../../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/index.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/web-globals/fetch.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/web-globals/navigator.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/web-globals/storage.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/assert.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/assert/strict.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/async_hooks.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/buffer.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/child_process.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/cluster.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/console.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/constants.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/crypto.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/dgram.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/diagnostics_channel.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/dns.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/dns/promises.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/domain.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/events.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/fs.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/fs/promises.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/http.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/http2.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/https.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/inspector.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/inspector.generated.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/module.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/net.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/os.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/path.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/perf_hooks.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/process.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/punycode.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/querystring.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/readline.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/readline/promises.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/repl.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/sea.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/sqlite.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/stream.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/stream/promises.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/stream/consumers.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/stream/web.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/string_decoder.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/test.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/timers.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/timers/promises.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/tls.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/trace_events.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/tty.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/url.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/util.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/v8.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/vm.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/wasi.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/worker_threads.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/zlib.d.ts","../../../../../node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/index.d.ts"],"fileIdsList":[[101,147,148,150,167,168],[101,149,150,167,168],[150,167,168],[101,150,155,167,168,185],[101,150,151,156,161,167,168,170,182,193],[101,150,151,152,161,167,168,170],[101,150,167,168],[96,97,98,101,150,167,168],[101,150,153,167,168,194],[101,150,154,155,162,167,168,171],[101,150,155,167,168,182,190],[101,150,156,158,161,167,168,170],[101,149,150,157,167,168],[101,150,158,159,167,168],[101,150,160,161,167,168],[101,149,150,161,167,168],[101,150,161,162,163,167,168,182,193],[101,150,161,162,163,167,168,177,182,185],[101,143,150,158,161,164,167,168,170,182,193],[101,150,161,162,164,165,167,168,170,182,190,193],[101,150,164,166,167,168,182,190,193],[99,100,101,102,103,104,105,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199],[101,150,161,167,168],[101,150,167,168,169,193],[101,150,158,161,167,168,170,182],[101,150,167,168,171],[101,150,167,168,172],[101,149,150,167,168,173],[101,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199],[101,150,167,168,175],[101,150,167,168,176],[101,150,161,167,168,177,178],[101,150,167,168,177,179,194,196],[101,150,162,167,168],[101,150,161,167,168,182,183,185],[101,150,167,168,184,185],[101,150,167,168,182,183],[101,150,167,168,185],[101,150,167,168,186],[101,147,150,167,168,182,187,193],[101,150,161,167,168,188,189],[101,150,167,168,188,189],[101,150,155,167,168,170,182,190],[101,150,167,168,191],[101,150,167,168,170,192],[101,150,164,167,168,176,193],[101,150,155,167,168,194],[101,150,167,168,182,195],[101,150,167,168,169,196],[101,150,167,168,197],[101,143,150,167,168],[101,143,150,161,163,167,168,173,182,185,193,195,196,198],[101,150,167,168,182,199],[101,115,119,150,167,168,193],[101,115,150,167,168,182,193],[101,110,150,167,168],[101,112,115,150,167,168,190,193],[101,150,167,168,170,190],[101,150,167,168,200],[101,110,150,167,168,200],[101,112,115,150,167,168,170,193],[101,107,108,111,114,150,161,167,168,182,193],[101,115,122,150,167,168],[101,107,113,150,167,168],[101,115,136,137,150,167,168],[101,111,115,150,167,168,185,193,200],[101,136,150,167,168,200],[101,109,110,150,167,168,200],[101,115,150,167,168],[101,109,110,111,112,113,114,115,116,117,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,137,138,139,140,141,142,150,167,168],[101,115,130,150,167,168],[101,115,122,123,150,167,168],[101,113,115,123,124,150,167,168],[101,114,150,167,168],[101,107,110,115,150,167,168],[101,115,119,123,124,150,167,168],[101,119,150,167,168],[101,113,115,118,150,167,168,193],[101,107,112,115,122,150,167,168],[101,150,167,168,182],[101,110,115,136,150,167,168,198,200],[76,101,150,167,168],[64,65,66,101,150,167,168],[67,68,101,150,167,168],[64,65,67,69,70,75,101,150,167,168],[65,67,101,150,167,168],[75,101,150,167,168],[67,101,150,167,168],[64,65,67,70,71,72,73,74,101,150,167,168],[90,101,150,167,168],[91,93,94,101,150,167,168],[90,92,101,150,167,168],[63,78,80,101,150,167,168,182],[63,78,80,81,101,150,167,168],[79,80,81,101,150,167,168],[59,62,101,150,167,168],[63,101,150,167,168],[79,101,150,167,168],[58,59,60,61,62,63,78,79,80,81,82,83,84,85,86,87,88,89,101,150,167,168],[77,101,150,167,168]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},"b8ac24533393b91109361fcece1670802c0789cc75fc62d85af9698d4281bd48","9bec273bf3b223faa8340561e13934c959216aaf887f0780662c1c2949ab4547","fa1a4160468b5ae10ff84a2383dbaec4ea7ba522c0b2e0dca6799d7b504b7e94","255a684087d15bfb315c0bf8e7230358042b7698ded9a5c2586592037badec3b","f24ad829d6b9d61af34d48ebdfa33b5216dce7452c1e51b202c255c432f812c1","4dff3974bc4f52d04191b376e2a3388aaa49f071cc8abf3f33070032f0d89930",{"version":"d3cfde44f8089768ebb08098c96d01ca260b88bccf238d55eee93f1c620ff5a5","impliedFormat":1},{"version":"293eadad9dead44c6fd1db6de552663c33f215c55a1bfa2802a1bceed88ff0ec","impliedFormat":1},{"version":"833e92c058d033cde3f29a6c7603f517001d1ddd8020bc94d2067a3bc69b2a8e","impliedFormat":1},{"version":"08b2fae7b0f553ad9f79faec864b179fc58bc172e295a70943e8585dd85f600c","impliedFormat":1},{"version":"f12edf1672a94c578eca32216839604f1e1c16b40a1896198deabf99c882b340","impliedFormat":1},{"version":"e3498cf5e428e6c6b9e97bd88736f26d6cf147dedbfa5a8ad3ed8e05e059af8a","impliedFormat":1},{"version":"dba3f34531fd9b1b6e072928b6f885aa4d28dd6789cbd0e93563d43f4b62da53","impliedFormat":1},{"version":"f672c876c1a04a223cf2023b3d91e8a52bb1544c576b81bf64a8fec82be9969c","impliedFormat":1},{"version":"e4b03ddcf8563b1c0aee782a185286ed85a255ce8a30df8453aade2188bbc904","impliedFormat":1},{"version":"2329d90062487e1eaca87b5e06abcbbeeecf80a82f65f949fd332cfcf824b87b","impliedFormat":1},{"version":"25b3f581e12ede11e5739f57a86e8668fbc0124f6649506def306cad2c59d262","impliedFormat":1},{"version":"4fdb529707247a1a917a4626bfb6a293d52cd8ee57ccf03830ec91d39d606d6d","impliedFormat":1},{"version":"a9ebb67d6bbead6044b43714b50dcb77b8f7541ffe803046fdec1714c1eba206","impliedFormat":1},{"version":"5780b706cece027f0d4444fbb4e1af62dc51e19da7c3d3719f67b22b033859b9","impliedFormat":1},"5833055abceaa3da00c8a053ddadbfe57e7e2f000fe525ebd5acae1b1907d2c6","0edf19a006317337b5af892cbe5af3a181bf44c9c0b4a56ff0c1083871f50995","68064ff14c916ac6d998eeb4007df7024b00a525dbc3cf1ee3ad6dee4dede8d3","9687af4926ad814a42712c6b5e326ee11fe07585db694acd073b9e0c508bf9f4","d3422d4d9a32f6120c29c15e26936cc222eb4b3921bfc87290ff03156e4099d6","51c052e627cd3348643d73db8ad8af1231ea99ec891d6dab6b2f168aaa39f6f0","e790463327c74049ce2299c5980947a46a7147ef689ca35cba7c14478e5b17e4","eed18d7ad4984bebcedf862137ea765f3491f2cc775e868f470c7ffa52de95c4","4589825c2d11f8145a0ea2c095579e41b4f5b00d98f913d44c804c9b20a788a7","453e6b02c363a868b809180ea8926b7539bc032046b1295236198cef02991f04","f7ced076d0a14e8f373cbc203606ad0983047910a866cb9e547f945ab0417859","9fc26b2c1ea8841d1aa0026162497d8988a6e4a9cf8fc0df2f49803a96316a2d","949a58ee27a80f6e4a4fff95f61cd785b27ef9a1ff62b597ef36cd6b0dee7adf",{"version":"e979944444b84b56bb5cd1f730ede2bc7e18f1f113399f7645024fffdf7930d8","signature":"489411a5368454282c2e9d8e5d4e3cdd1c53c4387f73ca36a7a5d052b97a57b2"},{"version":"ccb8e88ec274af601e4427fb0e6ee46d0ae3ebf00c7e2d4e757e4bbcc60420fe","signature":"2bfcdaa94744c61b64cccafa83c3d2c4d10742b54dce043bf64c66937d8c5b34"},{"version":"aec423c5b2ef873090fca6fc6cdca47d4c6c991f5460e5044d9d5261485e0ddf","signature":"cda05bbb30e2e0bd4902e62efaaa185d155abd76edcc6d975354ae9c42506b95"},{"version":"ae4ba6ad7aa8821e6656ddb68225d9c49e84d98fb7db72b83b1230731a3db94e","signature":"1b7598aefa931a13c4b24172ea57f97c62583679308fc8b141cc0284dc757439"},"c2aaabec950d5c8a1c234eb6fef25ba94b5dfea6340ffa834964d810a60dc26e",{"version":"6c7176368037af28cb72f2392010fa1cef295d6d6744bca8cfb54985f3a18c3e","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab41ef1f2cdafb8df48be20cd969d875602483859dc194e9c97c8a576892c052","affectsGlobalScope":true,"impliedFormat":1},{"version":"437e20f2ba32abaeb7985e0afe0002de1917bc74e949ba585e49feba65da6ca1","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"98cffbf06d6bab333473c70a893770dbe990783904002c4f1a960447b4b53dca","affectsGlobalScope":true,"impliedFormat":1},{"version":"3af97acf03cc97de58a3a4bc91f8f616408099bc4233f6d0852e72a8ffb91ac9","affectsGlobalScope":true,"impliedFormat":1},{"version":"808069bba06b6768b62fd22429b53362e7af342da4a236ed2d2e1c89fcca3b4a","affectsGlobalScope":true,"impliedFormat":1},{"version":"1db0b7dca579049ca4193d034d835f6bfe73096c73663e5ef9a0b5779939f3d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"9798340ffb0d067d69b1ae5b32faa17ab31b82466a3fc00d8f2f2df0c8554aaa","affectsGlobalScope":true,"impliedFormat":1},{"version":"f26b11d8d8e4b8028f1c7d618b22274c892e4b0ef5b3678a8ccbad85419aef43","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e9c23ba78aabc2e0a27033f18737a6df754067731e69dc5f52823957d60a4b6","impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"763fe0f42b3d79b440a9b6e51e9ba3f3f91352469c1e4b3b67bfa4ff6352f3f4","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"7f182617db458e98fc18dfb272d40aa2fff3a353c44a89b2c0ccb3937709bfb5","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"e61be3f894b41b7baa1fbd6a66893f2579bfad01d208b4ff61daef21493ef0a8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"615ba88d0128ed16bf83ef8ccbb6aff05c3ee2db1cc0f89ab50a4939bfc1943f","impliedFormat":1},{"version":"a4d551dbf8746780194d550c88f26cf937caf8d56f102969a110cfaed4b06656","impliedFormat":1},{"version":"8bd86b8e8f6a6aa6c49b71e14c4ffe1211a0e97c80f08d2c8cc98838006e4b88","impliedFormat":1},{"version":"317e63deeb21ac07f3992f5b50cdca8338f10acd4fbb7257ebf56735bf52ab00","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"b52476feb4a0cbcb25e5931b930fc73cb6643fb1a5060bf8a3dda0eeae5b4b68","affectsGlobalScope":true,"impliedFormat":1},{"version":"f9501cc13ce624c72b61f12b3963e84fad210fbdf0ffbc4590e08460a3f04eba","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7721c4f69f93c91360c26a0a84ee885997d748237ef78ef665b153e622b36c1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0fa06ada475b910e2106c98c68b10483dc8811d0c14a8a8dd36efb2672485b29","impliedFormat":1},{"version":"33e5e9aba62c3193d10d1d33ae1fa75c46a1171cf76fef750777377d53b0303f","impliedFormat":1},{"version":"2b06b93fd01bcd49d1a6bd1f9b65ddcae6480b9a86e9061634d6f8e354c1468f","impliedFormat":1},{"version":"6a0cd27e5dc2cfbe039e731cf879d12b0e2dded06d1b1dedad07f7712de0d7f4","affectsGlobalScope":true,"impliedFormat":1},{"version":"13f5c844119c43e51ce777c509267f14d6aaf31eafb2c2b002ca35584cd13b29","impliedFormat":1},{"version":"e60477649d6ad21542bd2dc7e3d9ff6853d0797ba9f689ba2f6653818999c264","impliedFormat":1},{"version":"c2510f124c0293ab80b1777c44d80f812b75612f297b9857406468c0f4dafe29","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"4c829ab315f57c5442c6667b53769975acbf92003a66aef19bce151987675bd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"b2ade7657e2db96d18315694789eff2ddd3d8aea7215b181f8a0b303277cc579","impliedFormat":1},{"version":"9855e02d837744303391e5623a531734443a5f8e6e8755e018c41d63ad797db2","impliedFormat":1},{"version":"4d631b81fa2f07a0e63a9a143d6a82c25c5f051298651a9b69176ba28930756d","impliedFormat":1},{"version":"836a356aae992ff3c28a0212e3eabcb76dd4b0cc06bcb9607aeef560661b860d","impliedFormat":1},{"version":"1e0d1f8b0adfa0b0330e028c7941b5a98c08b600efe7f14d2d2a00854fb2f393","impliedFormat":1},{"version":"41670ee38943d9cbb4924e436f56fc19ee94232bc96108562de1a734af20dc2c","affectsGlobalScope":true,"impliedFormat":1},{"version":"c906fb15bd2aabc9ed1e3f44eb6a8661199d6c320b3aa196b826121552cb3695","impliedFormat":1},{"version":"22295e8103f1d6d8ea4b5d6211e43421fe4564e34d0dd8e09e520e452d89e659","impliedFormat":1},{"version":"58647d85d0f722a1ce9de50955df60a7489f0593bf1a7015521efe901c06d770","impliedFormat":1},{"version":"6b4e081d55ac24fc8a4631d5dd77fe249fa25900abd7d046abb87d90e3b45645","impliedFormat":1},{"version":"a10f0e1854f3316d7ee437b79649e5a6ae3ae14ffe6322b02d4987071a95362e","impliedFormat":1},{"version":"e208f73ef6a980104304b0d2ca5f6bf1b85de6009d2c7e404028b875020fa8f2","impliedFormat":1},{"version":"d163b6bc2372b4f07260747cbc6c0a6405ab3fbcea3852305e98ac43ca59f5bc","impliedFormat":1},{"version":"e6fa9ad47c5f71ff733744a029d1dc472c618de53804eae08ffc243b936f87ff","affectsGlobalScope":true,"impliedFormat":1},{"version":"a6f137d651076822d4fe884287e68fd61785a0d3d1fdb250a5059b691fa897db","impliedFormat":1},{"version":"24826ed94a78d5c64bd857570fdbd96229ad41b5cb654c08d75a9845e3ab7dde","impliedFormat":1},{"version":"8b479a130ccb62e98f11f136d3ac80f2984fdc07616516d29881f3061f2dd472","impliedFormat":1},{"version":"928af3d90454bf656a52a48679f199f64c1435247d6189d1caf4c68f2eaf921f","affectsGlobalScope":true,"impliedFormat":1},{"version":"bceb58df66ab8fb00170df20cd813978c5ab84be1d285710c4eb005d8e9d8efb","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f16a7e4deafa527ed9995a772bb380eb7d3c2c0fd4ae178c5263ed18394db2c","impliedFormat":1},{"version":"933921f0bb0ec12ef45d1062a1fc0f27635318f4d294e4d99de9a5493e618ca2","impliedFormat":1},{"version":"71a0f3ad612c123b57239a7749770017ecfe6b66411488000aba83e4546fde25","impliedFormat":1},{"version":"77fbe5eecb6fac4b6242bbf6eebfc43e98ce5ccba8fa44e0ef6a95c945ff4d98","impliedFormat":1},{"version":"4f9d8ca0c417b67b69eeb54c7ca1bedd7b56034bb9bfd27c5d4f3bc4692daca7","impliedFormat":1},{"version":"814118df420c4e38fe5ae1b9a3bafb6e9c2aa40838e528cde908381867be6466","impliedFormat":1},{"version":"a3fc63c0d7b031693f665f5494412ba4b551fe644ededccc0ab5922401079c95","impliedFormat":1},{"version":"80523c00b8544a2000ae0143e4a90a00b47f99823eb7926c1e03c494216fc363","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"45650f47bfb376c8a8ed39d4bcda5902ab899a3150029684ee4c10676d9fbaee","impliedFormat":1},{"version":"746911b62b329587939560deb5c036aca48aece03147b021fa680223255d5183","affectsGlobalScope":true,"impliedFormat":1},{"version":"18fd40412d102c5564136f29735e5d1c3b455b8a37f920da79561f1fde068208","impliedFormat":1},{"version":"c8d3e5a18ba35629954e48c4cc8f11dc88224650067a172685c736b27a34a4dc","impliedFormat":1},{"version":"f0be1b8078cd549d91f37c30c222c2a187ac1cf981d994fb476a1adc61387b14","affectsGlobalScope":true,"impliedFormat":1},{"version":"0aaed1d72199b01234152f7a60046bc947f1f37d78d182e9ae09c4289e06a592","impliedFormat":1},{"version":"2b55d426ff2b9087485e52ac4bc7cfafe1dc420fc76dad926cd46526567c501a","impliedFormat":1},{"version":"66ba1b2c3e3a3644a1011cd530fb444a96b1b2dfe2f5e837a002d41a1a799e60","impliedFormat":1},{"version":"7e514f5b852fdbc166b539fdd1f4e9114f29911592a5eb10a94bb3a13ccac3c4","impliedFormat":1},{"version":"5b7aa3c4c1a5d81b411e8cb302b45507fea9358d3569196b27eb1a27ae3a90ef","affectsGlobalScope":true,"impliedFormat":1},{"version":"5987a903da92c7462e0b35704ce7da94d7fdc4b89a984871c0e2b87a8aae9e69","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea08a0345023ade2b47fbff5a76d0d0ed8bff10bc9d22b83f40858a8e941501c","impliedFormat":1},{"version":"47613031a5a31510831304405af561b0ffaedb734437c595256bb61a90f9311b","impliedFormat":1},{"version":"ae062ce7d9510060c5d7e7952ae379224fb3f8f2dd74e88959878af2057c143b","impliedFormat":1},{"version":"8a1a0d0a4a06a8d278947fcb66bf684f117bf147f89b06e50662d79a53be3e9f","affectsGlobalScope":true,"impliedFormat":1},{"version":"358765d5ea8afd285d4fd1532e78b88273f18cb3f87403a9b16fef61ac9fdcfe","impliedFormat":1},{"version":"9f55299850d4f0921e79b6bf344b47c420ce0f507b9dcf593e532b09ea7eeea1","impliedFormat":1}],"root":[[91,95]],"options":{"composite":true,"declaration":true,"declarationMap":true,"esModuleInterop":true,"exactOptionalPropertyTypes":false,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitOverride":true,"noUncheckedIndexedAccess":true,"outDir":"./","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":9,"tsBuildInfoFile":"./.tsbuildinfo","verbatimModuleSyntax":true},"referencedMap":[[147,1],[148,1],[149,2],[101,3],[150,4],[151,5],[152,6],[96,7],[99,8],[97,7],[98,7],[153,9],[154,10],[155,11],[156,12],[157,13],[158,14],[159,14],[160,15],[161,16],[162,17],[163,18],[102,7],[100,7],[164,19],[165,20],[166,21],[200,22],[167,23],[168,7],[169,24],[170,25],[171,26],[172,27],[173,28],[174,29],[175,30],[176,31],[177,32],[178,32],[179,33],[180,7],[181,34],[182,35],[184,36],[183,37],[185,38],[186,39],[187,40],[188,41],[189,42],[190,43],[191,44],[192,45],[193,46],[194,47],[195,48],[196,49],[197,50],[103,7],[104,7],[105,7],[144,51],[145,7],[146,7],[198,52],[199,53],[106,7],[56,7],[57,7],[11,7],[10,7],[2,7],[12,7],[13,7],[14,7],[15,7],[16,7],[17,7],[18,7],[19,7],[3,7],[20,7],[21,7],[4,7],[22,7],[26,7],[23,7],[24,7],[25,7],[27,7],[28,7],[29,7],[5,7],[30,7],[31,7],[32,7],[33,7],[6,7],[37,7],[34,7],[35,7],[36,7],[38,7],[7,7],[39,7],[44,7],[45,7],[40,7],[41,7],[42,7],[43,7],[8,7],[49,7],[46,7],[47,7],[48,7],[50,7],[9,7],[51,7],[52,7],[53,7],[55,7],[54,7],[1,7],[122,54],[132,55],[121,54],[142,56],[113,57],[112,58],[141,59],[135,60],[140,61],[115,62],[129,63],[114,64],[138,65],[110,66],[109,59],[139,67],[111,68],[116,69],[117,7],[120,69],[107,7],[143,70],[133,71],[124,72],[125,73],[127,74],[123,75],[126,76],[136,59],[118,77],[119,78],[128,79],[108,80],[131,71],[130,69],[134,7],[137,81],[77,82],[67,83],[69,84],[76,85],[71,7],[72,7],[70,86],[73,87],[64,7],[65,7],[66,82],[68,88],[74,7],[75,89],[91,90],[95,91],[92,7],[93,92],[94,90],[81,93],[60,7],[58,7],[82,94],[89,95],[63,96],[84,7],[83,97],[80,98],[90,99],[86,7],[62,7],[85,97],[88,7],[78,100],[79,7],[59,7],[61,7],[87,100]],"latestChangedDtsFile":"./index.d.ts","version":"5.9.3"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Evernote adapter — Phase 2 skeleton.
3
+ *
4
+ * Evernote uses OAuth 1.0a — request signing rather than the redirect+
5
+ * code-exchange flow used by Notion/Google. That's a known cost of
6
+ * this adapter; the OAuth 1.0a handshake is implemented in
7
+ * `completeAuth` (and a request_token bootstrap step in
8
+ * `buildAuthUrl`). Access tokens valid for 1 year, no refresh
9
+ * mechanism — the connection card will show a "Reconnect" banner
10
+ * within 30 days of expiry.
11
+ *
12
+ * Wire env vars:
13
+ * PAGELOOP_EVERNOTE_CONSUMER_KEY
14
+ * PAGELOOP_EVERNOTE_CONSUMER_SECRET
15
+ * PAGELOOP_EVERNOTE_ENV 'sandbox' during dev, 'production' once
16
+ * promoted by Evernote (~few business days)
17
+ *
18
+ * Concrete fetch methods are stubbed pending Phase 2 proper:
19
+ * - listAccessibleDocs: getSyncState + listNotebooks + getFilteredSyncChunk
20
+ * - fetchDoc: getNote(includeContent=true), ENML → Markdown convert
21
+ * - resources: getResource + media-asset pipeline for inline images
22
+ */
23
+ import type { ExternalIntegrationAdapter } from '@pageloop/shared';
24
+ export interface EvernoteAdapterConfig {
25
+ consumerKey: string;
26
+ consumerSecret: string;
27
+ /** 'sandbox' for dev, 'production' after Evernote promotes the key. */
28
+ env: 'sandbox' | 'production';
29
+ }
30
+ export declare function createEvernoteAdapter(config: EvernoteAdapterConfig): ExternalIntegrationAdapter;
31
+ //# sourceMappingURL=evernote.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evernote.d.ts","sourceRoot":"","sources":["../src/evernote.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAGX,0BAA0B,EAE1B,MAAM,kBAAkB,CAAC;AAE1B,MAAM,WAAW,qBAAqB;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,uEAAuE;IACvE,GAAG,EAAE,SAAS,GAAG,YAAY,CAAC;CAC9B;AAED,wBAAgB,qBAAqB,CACpC,MAAM,EAAE,qBAAqB,GAC3B,0BAA0B,CAE5B"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Evernote adapter — Phase 2 skeleton.
3
+ *
4
+ * Evernote uses OAuth 1.0a — request signing rather than the redirect+
5
+ * code-exchange flow used by Notion/Google. That's a known cost of
6
+ * this adapter; the OAuth 1.0a handshake is implemented in
7
+ * `completeAuth` (and a request_token bootstrap step in
8
+ * `buildAuthUrl`). Access tokens valid for 1 year, no refresh
9
+ * mechanism — the connection card will show a "Reconnect" banner
10
+ * within 30 days of expiry.
11
+ *
12
+ * Wire env vars:
13
+ * PAGELOOP_EVERNOTE_CONSUMER_KEY
14
+ * PAGELOOP_EVERNOTE_CONSUMER_SECRET
15
+ * PAGELOOP_EVERNOTE_ENV 'sandbox' during dev, 'production' once
16
+ * promoted by Evernote (~few business days)
17
+ *
18
+ * Concrete fetch methods are stubbed pending Phase 2 proper:
19
+ * - listAccessibleDocs: getSyncState + listNotebooks + getFilteredSyncChunk
20
+ * - fetchDoc: getNote(includeContent=true), ENML → Markdown convert
21
+ * - resources: getResource + media-asset pipeline for inline images
22
+ */
23
+ export function createEvernoteAdapter(config) {
24
+ return new EvernoteAdapter(config);
25
+ }
26
+ class EvernoteAdapter {
27
+ config;
28
+ provider = 'evernote';
29
+ mode = 'oauth-pull';
30
+ displayName = 'Evernote';
31
+ constructor(config) {
32
+ this.config = config;
33
+ }
34
+ get host() {
35
+ return this.config.env === 'sandbox'
36
+ ? 'https://sandbox.evernote.com'
37
+ : 'https://www.evernote.com';
38
+ }
39
+ // OAuth 1.0a request-token bootstrap is a 3-step dance:
40
+ // 1. POST /oauth — get a request_token
41
+ // 2. Redirect user to /OAuth.action?oauth_token=<request_token>
42
+ // 3. POST /oauth — exchange the now-user-authorized request_token
43
+ // for the access_token
44
+ // buildAuthUrl returns the URL for step 2; completeAuth handles step 3.
45
+ // Step 1 lives inline at start time — for the Phase 1 skeleton we
46
+ // throw so it's obvious this needs the full impl. The OAuthStateCache
47
+ // in IntegrationsHandler tracks the request_token alongside the
48
+ // state nonce.
49
+ buildAuthUrl(_opts) {
50
+ throw new Error('Evernote OAuth 1.0a request-token bootstrap not yet implemented — wire in Phase 2.');
51
+ }
52
+ async completeAuth(_opts) {
53
+ throw new Error('Evernote completeAuth not yet implemented — wire in Phase 2.');
54
+ }
55
+ async listAccessibleDocs() {
56
+ throw new Error('Evernote listAccessibleDocs not yet implemented.');
57
+ }
58
+ async fetchDoc() {
59
+ throw new Error('Evernote fetchDoc not yet implemented — ENML → Markdown converter lands with Phase 2.');
60
+ }
61
+ }
62
+ //# sourceMappingURL=evernote.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evernote.js","sourceRoot":"","sources":["../src/evernote.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAgBH,MAAM,UAAU,qBAAqB,CACpC,MAA6B;IAE7B,OAAO,IAAI,eAAe,CAAC,MAAM,CAAC,CAAC;AACpC,CAAC;AAED,MAAM,eAAe;IAKS;IAJpB,QAAQ,GAAG,UAAmB,CAAC;IAC/B,IAAI,GAAG,YAAqB,CAAC;IAC7B,WAAW,GAAG,UAAU,CAAC;IAElC,YAA6B,MAA6B;QAA7B,WAAM,GAAN,MAAM,CAAuB;IAAG,CAAC;IAE9D,IAAI,IAAI;QACP,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,KAAK,SAAS;YACnC,CAAC,CAAC,8BAA8B;YAChC,CAAC,CAAC,0BAA0B,CAAC;IAC/B,CAAC;IAED,wDAAwD;IACxD,yCAAyC;IACzC,kEAAkE;IAClE,oEAAoE;IACpE,4BAA4B;IAC5B,wEAAwE;IACxE,kEAAkE;IAClE,sEAAsE;IACtE,gEAAgE;IAChE,eAAe;IAEf,YAAY,CAAC,KAA6C;QACzD,MAAM,IAAI,KAAK,CACd,oFAAoF,CACpF,CAAC;IACH,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,KAA4C;QAC9D,MAAM,IAAI,KAAK,CAAC,8DAA8D,CAAC,CAAC;IACjF,CAAC;IAED,KAAK,CAAC,kBAAkB;QAIvB,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;IACrE,CAAC;IAED,KAAK,CAAC,QAAQ;QACb,MAAM,IAAI,KAAK,CACd,uFAAuF,CACvF,CAAC;IACH,CAAC;CACD"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * `@pageloop/external` — external-integration adapters (read content from
3
+ * third-party sources into PageLoop). Each provider is its own subpath:
4
+ *
5
+ * import { createNotionAdapter } from '@pageloop/external/notion';
6
+ * import { createEvernoteAdapter } from '@pageloop/external/evernote';
7
+ * import { createObsidianAdapter } from '@pageloop/external/obsidian';
8
+ *
9
+ * None of them pull a heavyweight SDK (they talk HTTP / parse files), so
10
+ * this convenience root just re-exports all three.
11
+ */
12
+ export * from './notion/index.js';
13
+ export * from './evernote.js';
14
+ export * from './obsidian.js';
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,15 @@
1
+ /**
2
+ * `@pageloop/external` — external-integration adapters (read content from
3
+ * third-party sources into PageLoop). Each provider is its own subpath:
4
+ *
5
+ * import { createNotionAdapter } from '@pageloop/external/notion';
6
+ * import { createEvernoteAdapter } from '@pageloop/external/evernote';
7
+ * import { createObsidianAdapter } from '@pageloop/external/obsidian';
8
+ *
9
+ * None of them pull a heavyweight SDK (they talk HTTP / parse files), so
10
+ * this convenience root just re-exports all three.
11
+ */
12
+ export * from './notion/index.js';
13
+ export * from './evernote.js';
14
+ export * from './obsidian.js';
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Notion block-tree → Markdown converter.
3
+ *
4
+ * Covers the ~12 block types that account for ~90% of real-world
5
+ * Notion content: paragraph, heading_1/2/3, bulleted_list_item,
6
+ * numbered_list_item, code, quote, divider, image, callout, to_do,
7
+ * toggle, bookmark. Unknown / unhandled block types render as a
8
+ * comment `<!-- notion:unknown-block-type:foo -->` so the imported
9
+ * page is still parseable while we know what's missing.
10
+ *
11
+ * Rich-text formatting: bold, italic, strikethrough, code, link.
12
+ * Underline + color are dropped (not representable in plain Markdown
13
+ * without HTML; we prefer roundtrip-safety over fidelity for v1).
14
+ *
15
+ * Recursion: child blocks are walked at indent +2 spaces per level
16
+ * for nested lists / toggles / quotes.
17
+ */
18
+ interface Block {
19
+ id: string;
20
+ type: string;
21
+ has_children: boolean;
22
+ children?: Block[];
23
+ [key: string]: unknown;
24
+ }
25
+ export declare function blocksToMarkdown(blocks: Block[], indent?: number): string;
26
+ export {};
27
+ //# sourceMappingURL=blocksToMarkdown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blocksToMarkdown.d.ts","sourceRoot":"","sources":["../../src/notion/blocksToMarkdown.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAiBH,UAAU,KAAK;IACd,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACvB;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,MAAM,SAAI,GAAG,MAAM,CAgBpE"}
@@ -0,0 +1,129 @@
1
+ /**
2
+ * Notion block-tree → Markdown converter.
3
+ *
4
+ * Covers the ~12 block types that account for ~90% of real-world
5
+ * Notion content: paragraph, heading_1/2/3, bulleted_list_item,
6
+ * numbered_list_item, code, quote, divider, image, callout, to_do,
7
+ * toggle, bookmark. Unknown / unhandled block types render as a
8
+ * comment `<!-- notion:unknown-block-type:foo -->` so the imported
9
+ * page is still parseable while we know what's missing.
10
+ *
11
+ * Rich-text formatting: bold, italic, strikethrough, code, link.
12
+ * Underline + color are dropped (not representable in plain Markdown
13
+ * without HTML; we prefer roundtrip-safety over fidelity for v1).
14
+ *
15
+ * Recursion: child blocks are walked at indent +2 spaces per level
16
+ * for nested lists / toggles / quotes.
17
+ */
18
+ export function blocksToMarkdown(blocks, indent = 0) {
19
+ const lines = [];
20
+ let numberedIndex = 0;
21
+ let prevWasNumbered = false;
22
+ for (const block of blocks) {
23
+ const isNumbered = block.type === 'numbered_list_item';
24
+ if (isNumbered) {
25
+ numberedIndex = prevWasNumbered ? numberedIndex + 1 : 1;
26
+ }
27
+ else {
28
+ numberedIndex = 0;
29
+ }
30
+ prevWasNumbered = isNumbered;
31
+ const line = renderBlock(block, indent, numberedIndex);
32
+ if (line)
33
+ lines.push(line);
34
+ }
35
+ return lines.join('\n\n').trim();
36
+ }
37
+ function renderBlock(block, indent, numberedIndex) {
38
+ const pad = ' '.repeat(indent);
39
+ const childMarkdown = block.children?.length
40
+ ? '\n' + blocksToMarkdown(block.children, indent + 2)
41
+ : '';
42
+ switch (block.type) {
43
+ case 'paragraph': {
44
+ const text = renderRichText(getRichText(block, 'paragraph'));
45
+ return text ? pad + text + childMarkdown : childMarkdown;
46
+ }
47
+ case 'heading_1':
48
+ return pad + '# ' + renderRichText(getRichText(block, 'heading_1'));
49
+ case 'heading_2':
50
+ return pad + '## ' + renderRichText(getRichText(block, 'heading_2'));
51
+ case 'heading_3':
52
+ return pad + '### ' + renderRichText(getRichText(block, 'heading_3'));
53
+ case 'bulleted_list_item':
54
+ return pad + '- ' + renderRichText(getRichText(block, 'bulleted_list_item')) + childMarkdown;
55
+ case 'numbered_list_item':
56
+ return pad + `${numberedIndex}. ` + renderRichText(getRichText(block, 'numbered_list_item')) + childMarkdown;
57
+ case 'to_do': {
58
+ const data = block.to_do;
59
+ const checkbox = data?.checked ? '[x]' : '[ ]';
60
+ return pad + `- ${checkbox} ` + renderRichText(data?.rich_text ?? []) + childMarkdown;
61
+ }
62
+ case 'quote':
63
+ return pad + '> ' + renderRichText(getRichText(block, 'quote')) + childMarkdown;
64
+ case 'callout': {
65
+ const data = block.callout;
66
+ const icon = data?.icon?.emoji ?? '💡';
67
+ return pad + `> ${icon} ` + renderRichText(data?.rich_text ?? []) + childMarkdown;
68
+ }
69
+ case 'code': {
70
+ const data = block.code;
71
+ const language = data?.language ?? '';
72
+ const body = data?.rich_text?.map((r) => r.plain_text).join('') ?? '';
73
+ return pad + '```' + language + '\n' + body + '\n' + pad + '```';
74
+ }
75
+ case 'divider':
76
+ return pad + '---';
77
+ case 'image': {
78
+ const data = block.image;
79
+ const url = data?.type === 'file' ? data.file?.url : data?.external?.url;
80
+ const caption = renderRichText(data?.caption ?? []);
81
+ return pad + `![${caption}](${url ?? ''})`;
82
+ }
83
+ case 'bookmark': {
84
+ const data = block.bookmark;
85
+ const caption = renderRichText(data?.caption ?? []) || data?.url || '';
86
+ return pad + `[${caption}](${data?.url ?? ''})`;
87
+ }
88
+ case 'toggle': {
89
+ const summary = renderRichText(getRichText(block, 'toggle'));
90
+ return pad + `<details><summary>${summary}</summary>\n${childMarkdown}\n${pad}</details>`;
91
+ }
92
+ case 'child_page': {
93
+ const data = block.child_page;
94
+ return pad + `📄 ${data?.title ?? 'Untitled'}`;
95
+ }
96
+ case 'child_database': {
97
+ const data = block.child_database;
98
+ return pad + `🗂️ ${data?.title ?? 'Untitled database'}`;
99
+ }
100
+ case 'unsupported':
101
+ return pad + '<!-- notion: unsupported block -->';
102
+ default:
103
+ return pad + `<!-- notion:unknown-block-type:${block.type} -->`;
104
+ }
105
+ }
106
+ function getRichText(block, key) {
107
+ const data = block[key];
108
+ return data?.rich_text ?? [];
109
+ }
110
+ function renderRichText(items) {
111
+ return items
112
+ .map((item) => {
113
+ let text = item.plain_text;
114
+ const a = item.annotations;
115
+ if (a.code)
116
+ text = '`' + text + '`';
117
+ if (a.bold)
118
+ text = '**' + text + '**';
119
+ if (a.italic)
120
+ text = '*' + text + '*';
121
+ if (a.strikethrough)
122
+ text = '~~' + text + '~~';
123
+ if (item.href)
124
+ text = `[${text}](${item.href})`;
125
+ return text;
126
+ })
127
+ .join('');
128
+ }
129
+ //# sourceMappingURL=blocksToMarkdown.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blocksToMarkdown.js","sourceRoot":"","sources":["../../src/notion/blocksToMarkdown.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAyBH,MAAM,UAAU,gBAAgB,CAAC,MAAe,EAAE,MAAM,GAAG,CAAC;IAC3D,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,IAAI,aAAa,GAAG,CAAC,CAAC;IACtB,IAAI,eAAe,GAAG,KAAK,CAAC;IAC5B,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC5B,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,KAAK,oBAAoB,CAAC;QACvD,IAAI,UAAU,EAAE,CAAC;YAChB,aAAa,GAAG,eAAe,CAAC,CAAC,CAAC,aAAa,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACzD,CAAC;aAAM,CAAC;YACP,aAAa,GAAG,CAAC,CAAC;QACnB,CAAC;QACD,eAAe,GAAG,UAAU,CAAC;QAC7B,MAAM,IAAI,GAAG,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC;QACvD,IAAI,IAAI;YAAE,KAAK,CAAC,IAAI,CAAC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AAO,IAAI,EAAE,KAAK,IAAI,mBAAmB,EAAE,CAAC;QAC1D,CAAC;QACD,KAAK,aAAa;YACjB,OAAO,GAAG,GAAG,oCAAoC,CAAC;QACnD;YACC,OAAO,GAAG,GAAG,kCAAkC,KAAK,CAAC,IAAI,MAAM,CAAC;IAClE,CAAC;AACF,CAAC;AAED,SAAS,WAAW,CAAC,KAAY,EAAE,GAAW;IAC7C,MAAM,IAAI,GAAI,KAAiC,CAAC,GAAG,CAEvC,CAAC;IACb,OAAO,IAAI,EAAE,SAAS,IAAI,EAAE,CAAC;AAC9B,CAAC;AAED,SAAS,cAAc,CAAC,KAAiB;IACxC,OAAO,KAAK;SACV,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACb,IAAI,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC;QAC3B,MAAM,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC;QAC3B,IAAI,CAAC,CAAC,IAAI;YAAE,IAAI,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,CAAC;QACpC,IAAI,CAAC,CAAC,IAAI;YAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;QACtC,IAAI,CAAC,CAAC,MAAM;YAAE,IAAI,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,CAAC;QACtC,IAAI,CAAC,CAAC,aAAa;YAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;QAC/C,IAAI,IAAI,CAAC,IAAI;YAAE,IAAI,GAAG,IAAI,IAAI,KAAK,IAAI,CAAC,IAAI,GAAG,CAAC;QAChD,OAAO,IAAI,CAAC;IACb,CAAC,CAAC;SACD,IAAI,CAAC,EAAE,CAAC,CAAC;AACZ,CAAC"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Notion adapter — Phase 2 skeleton.
3
+ *
4
+ * Implements the oauth-pull mode of ExternalIntegrationAdapter. Auth
5
+ * via OAuth 2.0 (notion.so/my-integrations); access tokens have no
6
+ * expiry, so no refresh flow.
7
+ *
8
+ * Wire env vars before the adapter does anything real:
9
+ * PAGELOOP_NOTION_CLIENT_ID
10
+ * PAGELOOP_NOTION_CLIENT_SECRET
11
+ * PAGELOOP_NOTION_REDIRECT_URI (defaults to baseUrl + /api/v1/integrations/oauth/callback)
12
+ *
13
+ * Concrete content-fetch methods are stubbed (NotImplementedError)
14
+ * pending the full Phase 2 implementation per the plan:
15
+ * - listAccessibleDocs: paginates /v1/search filtered to integration-
16
+ * shared pages
17
+ * - fetchDoc: walks /v1/blocks/{id}/children recursively, converts
18
+ * blocks → Markdown
19
+ * - subscribeWebhook: registers a workspace-level webhook
20
+ *
21
+ * Rate limit: 3 req/sec per integration (Notion-wide, not per user).
22
+ */
23
+ import type { ExternalIntegrationAdapter } from '@pageloop/shared';
24
+ export interface NotionAdapterConfig {
25
+ clientId: string;
26
+ clientSecret: string;
27
+ /** Override redirect URI; otherwise derived from the Application's
28
+ * baseUrl at OAuth-start time. */
29
+ redirectUri?: string;
30
+ }
31
+ export declare function createNotionAdapter(config: NotionAdapterConfig): ExternalIntegrationAdapter;
32
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/notion/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAGX,0BAA0B,EAE1B,MAAM,kBAAkB,CAAC;AAM1B,MAAM,WAAW,mBAAmB;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB;uCACmC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,mBAAmB,CAClC,MAAM,EAAE,mBAAmB,GACzB,0BAA0B,CAE5B"}
@@ -0,0 +1,218 @@
1
+ /**
2
+ * Notion adapter — Phase 2 skeleton.
3
+ *
4
+ * Implements the oauth-pull mode of ExternalIntegrationAdapter. Auth
5
+ * via OAuth 2.0 (notion.so/my-integrations); access tokens have no
6
+ * expiry, so no refresh flow.
7
+ *
8
+ * Wire env vars before the adapter does anything real:
9
+ * PAGELOOP_NOTION_CLIENT_ID
10
+ * PAGELOOP_NOTION_CLIENT_SECRET
11
+ * PAGELOOP_NOTION_REDIRECT_URI (defaults to baseUrl + /api/v1/integrations/oauth/callback)
12
+ *
13
+ * Concrete content-fetch methods are stubbed (NotImplementedError)
14
+ * pending the full Phase 2 implementation per the plan:
15
+ * - listAccessibleDocs: paginates /v1/search filtered to integration-
16
+ * shared pages
17
+ * - fetchDoc: walks /v1/blocks/{id}/children recursively, converts
18
+ * blocks → Markdown
19
+ * - subscribeWebhook: registers a workspace-level webhook
20
+ *
21
+ * Rate limit: 3 req/sec per integration (Notion-wide, not per user).
22
+ */
23
+ import { blocksToMarkdown } from './blocksToMarkdown.js';
24
+ const NOTION_VERSION = '2022-06-28';
25
+ const NOTION_API_BASE = 'https://api.notion.com/v1';
26
+ export function createNotionAdapter(config) {
27
+ return new NotionAdapter(config);
28
+ }
29
+ class NotionAdapter {
30
+ config;
31
+ provider = 'notion';
32
+ mode = 'oauth-pull';
33
+ displayName = 'Notion';
34
+ constructor(config) {
35
+ this.config = config;
36
+ }
37
+ buildAuthUrl(opts) {
38
+ const params = new URLSearchParams({
39
+ client_id: this.config.clientId,
40
+ redirect_uri: this.config.redirectUri ?? opts.redirectUri,
41
+ response_type: 'code',
42
+ owner: 'user',
43
+ state: opts.state,
44
+ });
45
+ return `https://api.notion.com/v1/oauth/authorize?${params.toString()}`;
46
+ }
47
+ /**
48
+ * Notion access tokens never expire and Notion's OAuth flow does not
49
+ * issue refresh tokens. Adapter advertises an explicit stub so
50
+ * `OAuthTokenManager.refresh` fails loudly + grep-ably if a future
51
+ * change ever populates `accessTokenExpiresAt` on a Notion row.
52
+ */
53
+ async refreshAccessToken(_refreshToken) {
54
+ throw new Error('Notion access tokens do not expire — refreshAccessToken should never be called');
55
+ }
56
+ async completeAuth(opts) {
57
+ const credentials = Buffer.from(`${this.config.clientId}:${this.config.clientSecret}`).toString('base64');
58
+ const res = await fetch('https://api.notion.com/v1/oauth/token', {
59
+ method: 'POST',
60
+ headers: {
61
+ Authorization: `Basic ${credentials}`,
62
+ 'Content-Type': 'application/json',
63
+ 'Notion-Version': '2022-06-28',
64
+ },
65
+ body: JSON.stringify({
66
+ grant_type: 'authorization_code',
67
+ code: opts.code,
68
+ redirect_uri: this.config.redirectUri ?? opts.redirectUri,
69
+ }),
70
+ });
71
+ if (!res.ok) {
72
+ const body = await res.text();
73
+ throw new Error(`Notion token exchange failed: ${res.status} ${body}`);
74
+ }
75
+ const data = (await res.json());
76
+ return {
77
+ accessToken: data.access_token,
78
+ // Notion access tokens never expire; no refresh token issued.
79
+ remoteAccountId: data.workspace_id,
80
+ displayLabel: data.workspace_name ?? 'Notion workspace',
81
+ scopes: [],
82
+ };
83
+ }
84
+ /**
85
+ * List pages this integration has access to. Notion's /v1/search
86
+ * filtered to `object=page` returns everything the user explicitly
87
+ * shared with the integration via Notion's page-picker.
88
+ *
89
+ * Pagination: 100 per request. We return a single page + nextCursor
90
+ * so the caller can iterate. UI typically renders all in one go
91
+ * for small workspaces; larger ones implement infinite scroll.
92
+ */
93
+ async listAccessibleDocs(opts) {
94
+ const res = await fetch(`${NOTION_API_BASE}/search`, {
95
+ method: 'POST',
96
+ headers: {
97
+ Authorization: `Bearer ${opts.token.accessToken}`,
98
+ 'Content-Type': 'application/json',
99
+ 'Notion-Version': NOTION_VERSION,
100
+ },
101
+ body: JSON.stringify({
102
+ filter: { value: 'page', property: 'object' },
103
+ page_size: 100,
104
+ start_cursor: opts.cursor,
105
+ }),
106
+ });
107
+ if (!res.ok) {
108
+ const body = await res.text();
109
+ throw new Error(`Notion search failed: ${res.status} ${body}`);
110
+ }
111
+ const data = (await res.json());
112
+ const items = data.results
113
+ .filter((page) => !page.archived)
114
+ .map((page) => ({
115
+ remoteId: page.id,
116
+ title: extractPageTitle(page.properties) || 'Untitled',
117
+ bodyKind: 'markdown',
118
+ modifiedAt: page.last_edited_time,
119
+ upstreamUrl: page.url,
120
+ iconUrl: page.icon?.external?.url ??
121
+ page.icon?.file?.url ??
122
+ (page.icon?.emoji ? undefined : undefined),
123
+ }));
124
+ return {
125
+ items,
126
+ nextCursor: data.has_more && data.next_cursor ? data.next_cursor : undefined,
127
+ };
128
+ }
129
+ /**
130
+ * Fetch a single page's full content. Walks the block tree
131
+ * recursively (children of children of children …) since Notion
132
+ * paginates each level independently, then runs it through the
133
+ * Markdown converter.
134
+ */
135
+ async fetchDoc(opts) {
136
+ // First grab page metadata for title + last-edited-time +
137
+ // upstream URL. /v1/pages/{id} returns the page itself
138
+ // (properties), not its content blocks.
139
+ const pageRes = await fetch(`${NOTION_API_BASE}/pages/${opts.remoteId}`, {
140
+ method: 'GET',
141
+ headers: {
142
+ Authorization: `Bearer ${opts.token.accessToken}`,
143
+ 'Notion-Version': NOTION_VERSION,
144
+ },
145
+ });
146
+ if (!pageRes.ok) {
147
+ const body = await pageRes.text();
148
+ throw new Error(`Notion page fetch failed: ${pageRes.status} ${body}`);
149
+ }
150
+ const page = (await pageRes.json());
151
+ const blocks = await this.fetchBlockChildren(opts.token, opts.remoteId);
152
+ const bodyMd = blocksToMarkdown(blocks);
153
+ const title = extractPageTitle(page.properties) || 'Untitled';
154
+ return {
155
+ remoteId: opts.remoteId,
156
+ title,
157
+ bodyKind: 'markdown',
158
+ modifiedAt: page.last_edited_time,
159
+ upstreamUrl: page.url,
160
+ bodyMd,
161
+ etag: page.last_edited_time,
162
+ raw: { page, blocks },
163
+ };
164
+ }
165
+ /**
166
+ * Recursive walk of a Notion block tree. Each level paginates
167
+ * independently; we resolve all pages of all levels before
168
+ * returning. Caller passes the page id as the root.
169
+ */
170
+ async fetchBlockChildren(token, blockId) {
171
+ let cursor;
172
+ const out = [];
173
+ do {
174
+ const url = `${NOTION_API_BASE}/blocks/${blockId}/children?page_size=100` +
175
+ (cursor ? `&start_cursor=${encodeURIComponent(cursor)}` : '');
176
+ const res = await fetch(url, {
177
+ method: 'GET',
178
+ headers: {
179
+ Authorization: `Bearer ${token.accessToken}`,
180
+ 'Notion-Version': NOTION_VERSION,
181
+ },
182
+ });
183
+ if (!res.ok) {
184
+ const body = await res.text();
185
+ throw new Error(`Notion block children failed: ${res.status} ${body}`);
186
+ }
187
+ const data = (await res.json());
188
+ for (const block of data.results) {
189
+ if (block.has_children) {
190
+ const children = await this.fetchBlockChildren(token, block.id);
191
+ out.push({ ...block, children });
192
+ }
193
+ else {
194
+ out.push(block);
195
+ }
196
+ }
197
+ cursor = data.has_more && data.next_cursor ? data.next_cursor : undefined;
198
+ } while (cursor);
199
+ return out;
200
+ }
201
+ }
202
+ /**
203
+ * Notion page titles live in the first `type: 'title'` property
204
+ * (regular pages) or under `Name`/`Title` for database pages. Walk
205
+ * properties looking for the title-typed one; return its plain_text.
206
+ */
207
+ function extractPageTitle(properties) {
208
+ if (!properties)
209
+ return '';
210
+ for (const value of Object.values(properties)) {
211
+ const prop = value;
212
+ if (prop?.type === 'title' && Array.isArray(prop.title)) {
213
+ return prop.title.map((t) => t.plain_text ?? '').join('').trim();
214
+ }
215
+ }
216
+ return '';
217
+ }
218
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/notion/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAQH,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,MAAM,cAAc,GAAG,YAAY,CAAC;AACpC,MAAM,eAAe,GAAG,2BAA2B,CAAC;AAUpD,MAAM,UAAU,mBAAmB,CAClC,MAA2B;IAE3B,OAAO,IAAI,aAAa,CAAC,MAAM,CAAC,CAAC;AAClC,CAAC;AAED,MAAM,aAAa;IAKW;IAJpB,QAAQ,GAAG,QAAiB,CAAC;IAC7B,IAAI,GAAG,YAAqB,CAAC;IAC7B,WAAW,GAAG,QAAQ,CAAC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AC,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;QAClE,CAAC;IACF,CAAC;IACD,OAAO,EAAE,CAAC;AACX,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Obsidian adapter — Phase 2 skeleton.
3
+ *
4
+ * Plugin-push mode: Obsidian has no cloud API; instead, a first-party
5
+ * PageLoop Sync plugin runs inside the user's vault and POSTs note
6
+ * changes to `/api/v1/integrations/push/obsidian` using a Personal
7
+ * Access Token the user generates in their PageLoop profile.
8
+ *
9
+ * No env vars required at the server — the universal
10
+ * PAGELOOP_INTEGRATION_KEY covers PAT encryption. The plugin itself
11
+ * (in `packages/integrations-obsidian-plugin/`) ships to the
12
+ * Obsidian community plugin registry; review takes ~1-2 weeks.
13
+ *
14
+ * `acceptPush` is the headline method — accepts the plugin's normalised
15
+ * note payload, upserts tracked_pages rows, returns counts. Stubbed
16
+ * for Phase 1 — concrete walking lands when the IntegrationsHandler
17
+ * grows the import flow.
18
+ */
19
+ import type { ExternalIntegrationAdapter } from '@pageloop/shared';
20
+ export declare function createObsidianAdapter(): ExternalIntegrationAdapter;
21
+ //# sourceMappingURL=obsidian.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"obsidian.d.ts","sourceRoot":"","sources":["../src/obsidian.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAEnE,wBAAgB,qBAAqB,IAAI,0BAA0B,CAElE"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Obsidian adapter — Phase 2 skeleton.
3
+ *
4
+ * Plugin-push mode: Obsidian has no cloud API; instead, a first-party
5
+ * PageLoop Sync plugin runs inside the user's vault and POSTs note
6
+ * changes to `/api/v1/integrations/push/obsidian` using a Personal
7
+ * Access Token the user generates in their PageLoop profile.
8
+ *
9
+ * No env vars required at the server — the universal
10
+ * PAGELOOP_INTEGRATION_KEY covers PAT encryption. The plugin itself
11
+ * (in `packages/integrations-obsidian-plugin/`) ships to the
12
+ * Obsidian community plugin registry; review takes ~1-2 weeks.
13
+ *
14
+ * `acceptPush` is the headline method — accepts the plugin's normalised
15
+ * note payload, upserts tracked_pages rows, returns counts. Stubbed
16
+ * for Phase 1 — concrete walking lands when the IntegrationsHandler
17
+ * grows the import flow.
18
+ */
19
+ export function createObsidianAdapter() {
20
+ return new ObsidianAdapter();
21
+ }
22
+ class ObsidianAdapter {
23
+ provider = 'obsidian';
24
+ mode = 'plugin-push';
25
+ displayName = 'Obsidian';
26
+ async acceptPush(_opts) {
27
+ // Phase 2: validate the PushPayload schema, walk notes, upsert
28
+ // tracked_pages rows keyed by `obsidian:<vault>:<relative-path>`.
29
+ // Inline attachments (embedded images) go through the
30
+ // media-asset pipeline.
31
+ throw new Error('Obsidian acceptPush not yet implemented — wire in Phase 2.');
32
+ }
33
+ }
34
+ //# sourceMappingURL=obsidian.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"obsidian.js","sourceRoot":"","sources":["../src/obsidian.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,MAAM,UAAU,qBAAqB;IACpC,OAAO,IAAI,eAAe,EAAE,CAAC;AAC9B,CAAC;AAED,MAAM,eAAe;IACX,QAAQ,GAAG,UAAmB,CAAC;IAC/B,IAAI,GAAG,aAAsB,CAAC;IAC9B,WAAW,GAAG,UAAU,CAAC;IAElC,KAAK,CAAC,UAAU,CAAC,KAGhB;QACA,+DAA+D;QAC/D,kEAAkE;QAClE,sDAAsD;QACtD,wBAAwB;QACxB,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;IAC/E,CAAC;CACD"}
package/package.json ADDED
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "@pageloop/external",
3
+ "version": "0.5.0",
4
+ "type": "module",
5
+ "main": "./dist/index.js",
6
+ "types": "./dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.js"
11
+ },
12
+ "./notion": {
13
+ "types": "./dist/notion/index.d.ts",
14
+ "import": "./dist/notion/index.js"
15
+ },
16
+ "./evernote": {
17
+ "types": "./dist/evernote.d.ts",
18
+ "import": "./dist/evernote.js"
19
+ },
20
+ "./obsidian": {
21
+ "types": "./dist/obsidian.d.ts",
22
+ "import": "./dist/obsidian.js"
23
+ }
24
+ },
25
+ "files": [
26
+ "dist"
27
+ ],
28
+ "dependencies": {
29
+ "@pageloop/shared": "0.5.0"
30
+ },
31
+ "devDependencies": {
32
+ "vitest": "^2.1.8"
33
+ },
34
+ "license": "SEE LICENSE IN LICENSE",
35
+ "author": {
36
+ "name": "Ryan Weiss",
37
+ "email": "rw3iss@gmail.com"
38
+ },
39
+ "repository": {
40
+ "type": "git",
41
+ "url": "git+https://github.com/rw3iss/pageloop.git",
42
+ "directory": "packages/server/adapters/external"
43
+ },
44
+ "homepage": "https://github.com/rw3iss/pageloop/tree/main/packages/server/adapters/external#readme",
45
+ "bugs": {
46
+ "url": "https://github.com/rw3iss/pageloop/issues"
47
+ },
48
+ "publishConfig": {
49
+ "access": "public"
50
+ },
51
+ "scripts": {
52
+ "build": "tsc -p tsconfig.json",
53
+ "typecheck": "tsc -p tsconfig.json --noEmit",
54
+ "test": "vitest run",
55
+ "clean": "rm -rf dist *.tsbuildinfo"
56
+ }
57
+ }