@dxos/plugin-jmap 0.10.0 → 0.12.0-next-2800d0376abcc62d5544afdd744b16b2b960434e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/JmapOperation.mjs +59 -0
- package/dist/lib/JmapOperation.mjs.map +1 -0
- package/dist/lib/JmapOperationHandlerSet.mjs +15 -0
- package/dist/lib/JmapOperationHandlerSet.mjs.map +1 -0
- package/dist/lib/JmapPlugin.mjs +11 -11
- package/dist/lib/JmapPlugin.mjs.map +1 -1
- package/dist/lib/apis.mjs +655 -1
- package/dist/lib/apis.mjs.map +1 -0
- package/dist/lib/capabilities.mjs +4 -2
- package/dist/lib/capabilities.mjs.map +1 -1
- package/dist/lib/capabilities.node.mjs +19 -0
- package/dist/lib/capabilities.node.mjs.map +1 -0
- package/dist/lib/capabilities.workerd.mjs +19 -0
- package/dist/lib/capabilities.workerd.mjs.map +1 -0
- package/dist/lib/chunk-connector.mjs +15 -16
- package/dist/lib/chunk-connector.mjs.map +1 -1
- package/dist/lib/chunk-handler.mjs +4 -4
- package/dist/lib/chunk-handler.mjs.map +1 -1
- package/dist/lib/chunk-jmap-credentials.mjs +59 -0
- package/dist/lib/chunk-jmap-credentials.mjs.map +1 -0
- package/dist/lib/chunk-jmap-fixtures.mjs.map +1 -1
- package/dist/lib/chunk-mail-send.mjs +3 -3
- package/dist/lib/chunk-mail-send.mjs.map +1 -1
- package/dist/lib/chunk-operation-handler.mjs +2 -2
- package/dist/lib/chunk-operation-handler.mjs.map +1 -1
- package/dist/lib/chunk-rolldown-runtime.mjs +13 -0
- package/dist/lib/chunk-send.mjs +13 -13
- package/dist/lib/chunk-send.mjs.map +1 -1
- package/dist/lib/chunk-sync-provider.mjs +32 -26
- package/dist/lib/chunk-sync-provider.mjs.map +1 -1
- package/dist/lib/chunk-sync.mjs +11 -27
- package/dist/lib/chunk-sync.mjs.map +1 -1
- package/dist/lib/index.mjs +4 -2
- package/dist/lib/meta.mjs +36 -1
- package/dist/lib/meta.mjs.map +1 -0
- package/dist/lib/operations.mjs +2 -13
- package/dist/lib/plugin.mjs +9 -4
- package/dist/lib/plugin.mjs.map +1 -1
- package/dist/lib/services.mjs +13 -12
- package/dist/lib/services.mjs.map +1 -1
- package/dist/lib/testing.mjs +13 -4
- package/dist/lib/testing.mjs.map +1 -1
- package/dist/lib/types.mjs +2 -0
- package/dist/types/src/JmapPlugin.d.ts +35 -7
- package/dist/types/src/JmapPlugin.d.ts.map +1 -1
- package/dist/types/src/apis/Jmap/api.d.ts +3 -3
- package/dist/types/src/apis/Jmap/api.d.ts.map +1 -1
- package/dist/types/src/apis/Jmap/types.d.ts +12 -12
- package/dist/types/src/apis/Jmap/types.d.ts.map +1 -1
- package/dist/types/src/apis/JmapMail/api.d.ts +1 -1
- package/dist/types/src/apis/JmapMail/api.d.ts.map +1 -1
- package/dist/types/src/apis/JmapMail/types.d.ts +194 -194
- package/dist/types/src/apis/JmapMail/types.d.ts.map +1 -1
- package/dist/types/src/capabilities/credential-form.d.ts +5 -6
- package/dist/types/src/capabilities/credential-form.d.ts.map +1 -1
- package/dist/types/src/capabilities/gen/node.d.ts +6 -0
- package/dist/types/src/capabilities/gen/node.d.ts.map +1 -0
- package/dist/types/src/capabilities/gen/workerd.d.ts +6 -0
- package/dist/types/src/capabilities/gen/workerd.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +1 -0
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/mail-send.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +3 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/operations/JmapOperationHandlerSet.d.ts +3 -0
- package/dist/types/src/operations/JmapOperationHandlerSet.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +1 -2
- package/dist/types/src/operations/index.d.ts.map +1 -1
- package/dist/types/src/operations/mail/mapper.d.ts +1 -1
- package/dist/types/src/operations/mail/mapper.d.ts.map +1 -1
- package/dist/types/src/operations/mail/materialize/handler.d.ts +2 -2
- package/dist/types/src/operations/mail/materialize/handler.d.ts.map +1 -1
- package/dist/types/src/operations/mail/sync/handler.d.ts.map +1 -1
- package/dist/types/src/operations/mail/sync/sync-provider.d.ts +1 -1
- package/dist/types/src/operations/mail/sync/sync-provider.d.ts.map +1 -1
- package/dist/types/src/plugin.d.ts +6 -1
- package/dist/types/src/plugin.d.ts.map +1 -1
- package/dist/types/src/services/jmap-credentials.d.ts +4 -5
- package/dist/types/src/services/jmap-credentials.d.ts.map +1 -1
- package/dist/types/src/services/jmap-mail-api.d.ts +3 -3
- package/dist/types/src/services/jmap-mail-api.d.ts.map +1 -1
- package/dist/types/src/testing/index.d.ts +2 -2
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/jmap-fixtures.d.ts +1 -1
- package/dist/types/src/testing/jmap-fixtures.d.ts.map +1 -1
- package/dist/types/src/testing/node.d.ts +2 -2
- package/dist/types/src/testing/node.d.ts.map +1 -1
- package/dist/types/src/testing/sync-fixture.d.ts +13 -8
- package/dist/types/src/testing/sync-fixture.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +2 -1
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/JmapOperation.d.ts +44 -0
- package/dist/types/src/types/JmapOperation.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +2 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +56 -37
- package/src/JmapPlugin.ts +7 -17
- package/src/apis/Jmap/api.ts +15 -11
- package/src/apis/Jmap/types.ts +4 -4
- package/src/apis/JmapMail/api.ts +2 -2
- package/src/apis/JmapMail/query.ts +3 -3
- package/src/apis/JmapMail/types.ts +25 -27
- package/src/apis/jmap-api.test.ts +4 -3
- package/src/capabilities/connector.ts +4 -3
- package/src/capabilities/credential-form.test.ts +2 -1
- package/src/capabilities/credential-form.ts +8 -8
- package/src/capabilities/gen/node.ts +32 -0
- package/src/capabilities/gen/workerd.ts +32 -0
- package/src/capabilities/index.ts +3 -0
- package/src/capabilities/mail-send.ts +3 -2
- package/src/capabilities/operation-handler.ts +1 -1
- package/src/index.ts +3 -1
- package/src/operations/JmapOperationHandlerSet.ts +14 -0
- package/src/operations/index.ts +1 -9
- package/src/operations/mail/mapper.ts +2 -1
- package/src/operations/mail/materialize/handler.ts +4 -3
- package/src/operations/mail/send/handler.ts +6 -5
- package/src/operations/mail/sync/handler.ts +28 -32
- package/src/operations/mail/sync/mapper.test.ts +2 -1
- package/src/operations/mail/sync/sync-e2e.test.ts +5 -4
- package/src/operations/mail/sync/sync-provider.ts +40 -27
- package/src/operations/mail/sync/sync.test.ts +95 -48
- package/src/plugin.ts +15 -3
- package/src/services/jmap-credentials.ts +2 -3
- package/src/services/jmap-mail-api.ts +5 -4
- package/src/testing/index.ts +2 -2
- package/src/testing/jmap-fixtures.test.ts +3 -2
- package/src/testing/jmap-fixtures.ts +2 -2
- package/src/testing/node.ts +2 -2
- package/src/testing/sync-fixture.ts +29 -11
- package/src/types/JmapOperation.ts +65 -0
- package/src/types/index.ts +5 -0
- package/dist/lib/chunk-apis.mjs +0 -756
- package/dist/lib/chunk-apis.mjs.map +0 -1
- package/dist/lib/chunk-meta.mjs +0 -37
- package/dist/lib/chunk-meta.mjs.map +0 -1
- package/dist/lib/operations.mjs.map +0 -1
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
|
|
2
|
+
import * as Capability from "@dxos/app-framework/Capability";
|
|
3
|
+
import * as ConnectorSpec from "@dxos/plugin-connector/ConnectorSpec";
|
|
4
|
+
import * as Operation from "@dxos/compute/Operation";
|
|
5
|
+
import * as Schema from "effect/Schema";
|
|
6
|
+
import * as Trace from "@dxos/compute/Trace";
|
|
7
|
+
import { DXN, Database } from "@dxos/echo";
|
|
8
|
+
import * as MailSend from "@dxos/plugin-inbox/MailSend";
|
|
9
|
+
//#region src/types/JmapOperation.ts
|
|
10
|
+
var JmapOperation_exports = /* @__PURE__ */ __exportAll({
|
|
11
|
+
JmapSend: () => JmapSend,
|
|
12
|
+
JmapSync: () => JmapSync,
|
|
13
|
+
MaterializeJmapTarget: () => MaterializeJmapTarget
|
|
14
|
+
});
|
|
15
|
+
/**
|
|
16
|
+
* This provider's operations.
|
|
17
|
+
*
|
|
18
|
+
* Defined here rather than in plugin-inbox so a deployment without this connector never sees them:
|
|
19
|
+
* plugin-inbox owns the mail domain, each provider owns its own wire protocol.
|
|
20
|
+
*/
|
|
21
|
+
var JmapSync = Operation.make({
|
|
22
|
+
meta: {
|
|
23
|
+
key: DXN.make("org.dxos.operation.jmap.sync"),
|
|
24
|
+
name: "Sync JMAP",
|
|
25
|
+
description: "Sync emails from a JMAP server (e.g. Fastmail) to the mailbox feed.",
|
|
26
|
+
icon: "ph--arrows-clockwise--regular"
|
|
27
|
+
},
|
|
28
|
+
input: ConnectorSpec.SyncInput,
|
|
29
|
+
output: Schema.Struct({ newMessages: Schema.Number }),
|
|
30
|
+
services: [
|
|
31
|
+
Capability.Service,
|
|
32
|
+
Database.Service,
|
|
33
|
+
Trace.TraceService
|
|
34
|
+
]
|
|
35
|
+
}).pipe(Operation.visible, Operation.idempotent);
|
|
36
|
+
var MaterializeJmapTarget = Operation.make({
|
|
37
|
+
meta: {
|
|
38
|
+
key: DXN.make("org.dxos.operation.jmap.materializeTarget"),
|
|
39
|
+
name: "Materialize JMAP Target",
|
|
40
|
+
description: "Create the local Mailbox bound to a JMAP connection.",
|
|
41
|
+
icon: "ph--envelope--regular"
|
|
42
|
+
},
|
|
43
|
+
input: ConnectorSpec.MaterializeTargetInput,
|
|
44
|
+
output: ConnectorSpec.MaterializeTargetOutput
|
|
45
|
+
});
|
|
46
|
+
var JmapSend = Operation.make({
|
|
47
|
+
meta: {
|
|
48
|
+
key: DXN.make("org.dxos.operation.jmap.send"),
|
|
49
|
+
name: "Send JMAP",
|
|
50
|
+
description: "Send an email via a JMAP server.",
|
|
51
|
+
icon: "ph--paper-plane-tilt--regular"
|
|
52
|
+
},
|
|
53
|
+
input: MailSend.Input,
|
|
54
|
+
output: MailSend.Output
|
|
55
|
+
}).pipe(Operation.visible);
|
|
56
|
+
//#endregion
|
|
57
|
+
export { JmapSend, JmapSync, MaterializeJmapTarget, JmapOperation_exports as t };
|
|
58
|
+
|
|
59
|
+
//# sourceMappingURL=JmapOperation.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JmapOperation.mjs","names":[],"sources":["../../src/types/JmapOperation.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Schema from 'effect/Schema';\n\nimport * as Capability from '@dxos/app-framework/Capability';\nimport * as Operation from '@dxos/compute/Operation';\nimport * as Trace from '@dxos/compute/Trace';\nimport { Database, DXN } from '@dxos/echo';\n// Referenced in the emitted .d.ts of the operations (via `ConnectorSpec`'s schemas); importing it\n// lets TypeScript name it (TS2883).\n// eslint-disable-next-line unused-imports/no-unused-imports\nimport { Connection } from '@dxos/link';\nimport * as ConnectorSpec from '@dxos/plugin-connector/ConnectorSpec';\nimport * as MailSend from '@dxos/plugin-inbox/MailSend';\n// eslint-disable-next-line unused-imports/no-unused-imports\nimport { type Message } from '@dxos/types';\n\n/**\n * This provider's operations.\n *\n * Defined here rather than in plugin-inbox so a deployment without this connector never sees them:\n * plugin-inbox owns the mail domain, each provider owns its own wire protocol.\n */\n\nexport const JmapSync = Operation.make({\n meta: {\n key: DXN.make('org.dxos.operation.jmap.sync'),\n name: 'Sync JMAP',\n description: 'Sync emails from a JMAP server (e.g. Fastmail) to the mailbox feed.',\n icon: 'ph--arrows-clockwise--regular',\n },\n input: ConnectorSpec.SyncInput,\n output: Schema.Struct({\n newMessages: Schema.Number,\n }),\n // Capability (on-arrival extractors), Database (feed I/O), Trace (status) — provided by the invoker;\n // HTTP client and JMAP credentials are provided by the handler from the connection.\n services: [Capability.Service, Database.Service, Trace.TraceService],\n}).pipe(Operation.visible, Operation.idempotent);\n\nexport const MaterializeJmapTarget = Operation.make({\n meta: {\n key: DXN.make('org.dxos.operation.jmap.materializeTarget'),\n name: 'Materialize JMAP Target',\n description: 'Create the local Mailbox bound to a JMAP connection.',\n icon: 'ph--envelope--regular',\n },\n input: ConnectorSpec.MaterializeTargetInput,\n output: ConnectorSpec.MaterializeTargetOutput,\n});\n\nexport const JmapSend = Operation.make({\n meta: {\n key: DXN.make('org.dxos.operation.jmap.send'),\n name: 'Send JMAP',\n description: 'Send an email via a JMAP server.',\n icon: 'ph--paper-plane-tilt--regular',\n },\n input: MailSend.Input,\n output: MailSend.Output,\n}).pipe(Operation.visible);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA4BA,IAAa,WAAW,UAAU,KAAK;CACrC,MAAM;EACJ,KAAK,IAAI,KAAK,8BAA8B;EAC5C,MAAM;EACN,aAAa;EACb,MAAM;CACR;CACA,OAAO,cAAc;CACrB,QAAQ,OAAO,OAAO,EACpB,aAAa,OAAO,OACtB,CAAC;CAGD,UAAU;EAAC,WAAW;EAAS,SAAS;EAAS,MAAM;CAAY;AACrE,CAAC,CAAC,CAAC,KAAK,UAAU,SAAS,UAAU,UAAU;AAE/C,IAAa,wBAAwB,UAAU,KAAK;CAClD,MAAM;EACJ,KAAK,IAAI,KAAK,2CAA2C;EACzD,MAAM;EACN,aAAa;EACb,MAAM;CACR;CACA,OAAO,cAAc;CACrB,QAAQ,cAAc;AACxB,CAAC;AAED,IAAa,WAAW,UAAU,KAAK;CACrC,MAAM;EACJ,KAAK,IAAI,KAAK,8BAA8B;EAC5C,MAAM;EACN,aAAa;EACb,MAAM;CACR;CACA,OAAO,SAAS;CAChB,QAAQ,SAAS;AACnB,CAAC,CAAC,CAAC,KAAK,UAAU,OAAO"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
|
|
2
|
+
import * as Operation from "@dxos/compute/Operation";
|
|
3
|
+
import * as OperationHandlerSet from "@dxos/compute/OperationHandlerSet";
|
|
4
|
+
import { JmapOperation } from "#types";
|
|
5
|
+
//#region src/operations/JmapOperationHandlerSet.ts
|
|
6
|
+
var JmapOperationHandlerSet_exports = /* @__PURE__ */ __exportAll({ handlers: () => handlers });
|
|
7
|
+
var handlers = OperationHandlerSet.lazy([
|
|
8
|
+
JmapOperation.MaterializeJmapTarget.pipe(Operation.lazyHandler(() => import("./chunk-handler.mjs"))),
|
|
9
|
+
JmapOperation.JmapSend.pipe(Operation.lazyHandler(() => import("./chunk-send.mjs"))),
|
|
10
|
+
JmapOperation.JmapSync.pipe(Operation.lazyHandler(() => import("./chunk-sync.mjs")))
|
|
11
|
+
]);
|
|
12
|
+
//#endregion
|
|
13
|
+
export { handlers, JmapOperationHandlerSet_exports as t };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=JmapOperationHandlerSet.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JmapOperationHandlerSet.mjs","names":[],"sources":["../../src/operations/JmapOperationHandlerSet.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Operation from '@dxos/compute/Operation';\nimport * as OperationHandlerSet from '@dxos/compute/OperationHandlerSet';\n\nimport { JmapOperation } from '#types';\n\nexport const handlers = OperationHandlerSet.lazy([\n JmapOperation.MaterializeJmapTarget.pipe(Operation.lazyHandler(() => import('./mail/materialize/handler'))),\n JmapOperation.JmapSend.pipe(Operation.lazyHandler(() => import('./mail/send'))),\n JmapOperation.JmapSync.pipe(Operation.lazyHandler(() => import('./mail/sync'))),\n]);\n"],"mappings":";;;;;;AASA,IAAa,WAAW,oBAAoB,KAAK;CAC/C,cAAc,sBAAsB,KAAK,UAAU,kBAAkB,OAAO,sBAA6B,CAAC;CAC1G,cAAc,SAAS,KAAK,UAAU,kBAAkB,OAAO,mBAAc,CAAC;CAC9E,cAAc,SAAS,KAAK,UAAU,kBAAkB,OAAO,mBAAc,CAAC;AAChF,CAAC"}
|
package/dist/lib/JmapPlugin.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
+
import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
|
|
1
2
|
import * as Plugin from "@dxos/app-framework/Plugin";
|
|
2
|
-
import
|
|
3
|
-
import { Connector, MailSend, OperationHandler } from "#capabilities";
|
|
4
|
-
import { meta } from "#meta";
|
|
5
|
-
import { translations } from "#translations";
|
|
3
|
+
import { meta as meta$1 } from "#meta";
|
|
6
4
|
//#region src/JmapPlugin.ts
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
*/
|
|
12
|
-
var
|
|
5
|
+
var JmapPlugin_exports = /* @__PURE__ */ __exportAll({
|
|
6
|
+
make: () => make,
|
|
7
|
+
meta: () => meta
|
|
8
|
+
});
|
|
9
|
+
/** Plugin metadata, available without loading the plugin body. */
|
|
10
|
+
var meta = meta$1;
|
|
11
|
+
/** Constructs the plugin; the body loads on first enable. */
|
|
12
|
+
var make = Plugin.lazy(meta, () => import("#plugin"));
|
|
13
13
|
//#endregion
|
|
14
|
-
export {
|
|
14
|
+
export { make, meta, JmapPlugin_exports as t };
|
|
15
15
|
|
|
16
16
|
//# sourceMappingURL=JmapPlugin.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JmapPlugin.mjs","names":[],"sources":["../../src/JmapPlugin.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Plugin from '@dxos/app-framework/Plugin';\
|
|
1
|
+
{"version":3,"file":"JmapPlugin.mjs","names":[],"sources":["../../src/JmapPlugin.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Plugin from '@dxos/app-framework/Plugin';\n\nimport { meta as pluginMeta } from '#meta';\n\n/** Plugin metadata, available without loading the plugin body. */\nexport const meta = pluginMeta;\n\n/** Constructs the plugin; the body loads on first enable. */\nexport const make = Plugin.lazy(meta, () => import('#plugin'));\n"],"mappings":";;;;;;;;;AAWA,IAAa,OAAO;;AAGpB,IAAa,OAAO,OAAO,KAAK,YAAY,OAAO,UAAU"}
|