@noodleseed/one 0.175.1 → 0.177.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/dist/commands/knowledge.d.ts.map +1 -1
- package/dist/commands/knowledge.js +4 -7
- package/dist/commands/knowledge.js.map +1 -1
- package/dist/commands/solutions-conversations.d.ts +6 -0
- package/dist/commands/solutions-conversations.d.ts.map +1 -0
- package/dist/commands/solutions-conversations.js +137 -0
- package/dist/commands/solutions-conversations.js.map +1 -0
- package/dist/commands/solutions-ops.d.ts.map +1 -1
- package/dist/commands/solutions-ops.js +3 -0
- package/dist/commands/solutions-ops.js.map +1 -1
- package/dist/commands/whatsapp-ops.d.ts.map +1 -1
- package/dist/commands/whatsapp-ops.js +12 -2
- package/dist/commands/whatsapp-ops.js.map +1 -1
- package/dist/commands/whatsapp-output.d.ts.map +1 -1
- package/dist/commands/whatsapp-output.js +1 -0
- package/dist/commands/whatsapp-output.js.map +1 -1
- package/node_modules/@noodle-borg/assistant-gateway/dist/channel-coordinator.d.ts +14 -8
- package/node_modules/@noodle-borg/assistant-gateway/dist/channel-coordinator.js +11 -2
- package/node_modules/@noodle-borg/assistant-gateway/dist/channel-types.d.ts +14 -5
- package/node_modules/@noodle-borg/cli-catalog/dist/catalog-data-channels.js +5 -3
- package/node_modules/@noodle-borg/cli-catalog/dist/catalog-data-solution-conversations.js +97 -0
- package/node_modules/@noodle-borg/cli-catalog/dist/catalog-data-solutions.js +2 -0
- package/node_modules/@noodle-borg/knowledge-operations/dist/executor.d.ts +3 -5
- package/node_modules/@noodle-borg/knowledge-operations/dist/executor.js +2 -7
- package/node_modules/@noodle-borg/knowledge-operations/dist/portable.d.ts +1 -1
- package/node_modules/@noodle-borg/knowledge-operations/dist/portable.js +1 -1
- package/node_modules/@noodle-borg/knowledge-operations/dist/publication.d.ts +0 -1
- package/node_modules/@noodle-borg/knowledge-operations/dist/publication.js +1 -10
- package/node_modules/@noodle-borg/knowledge-operations/dist/routes.d.ts +0 -4
- package/node_modules/@noodle-borg/knowledge-operations/dist/routes.js +1 -17
- package/node_modules/@noodle-borg/knowledge-operations/dist/search-port.d.ts +1 -2
- package/node_modules/@noodle-borg/knowledge-operations/dist/search-port.js +1 -3
- package/node_modules/@noodle-borg/knowledge-operations/dist/service-wiring.d.ts +4 -4
- package/node_modules/@noodle-borg/knowledge-operations/dist/service-wiring.js +3 -8
- package/node_modules/@noodle-borg/knowledge-operations/dist/status-routes.d.ts +1 -2
- package/node_modules/@noodle-borg/knowledge-operations/dist/status-routes.js +0 -14
- package/node_modules/@noodle-borg/protocol/dist/knowledge-tool.js +3 -5
- package/node_modules/@noodle-borg/runtime/dist/execute.d.ts +2 -3
- package/node_modules/@noodle-borg/service/dist/assistant-composition.js +9 -0
- package/node_modules/@noodle-borg/service/dist/business-information/validation.js +1 -22
- package/node_modules/@noodle-borg/service/dist/channels/360dialog.js +41 -145
- package/node_modules/@noodle-borg/service/dist/channels/composition.js +1 -0
- package/node_modules/@noodle-borg/service/dist/channels/meta-cloud.js +102 -0
- package/node_modules/@noodle-borg/service/dist/channels/provider.js +187 -0
- package/node_modules/@noodle-borg/service/dist/channels/runtime.js +49 -21
- package/node_modules/@noodle-borg/service/dist/conversation-history/capture.js +99 -0
- package/node_modules/@noodle-borg/service/dist/conversation-history/contracts.js +17 -0
- package/node_modules/@noodle-borg/service/dist/conversation-history/operator.js +184 -0
- package/node_modules/@noodle-borg/service/dist/payment-card.js +34 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant-elevation.js +2 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant-interaction-stream.js +4 -2
- package/node_modules/@noodle-borg/service/dist/routes/assistant-interactions.js +15 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant-knowledge.js +1 -3
- package/node_modules/@noodle-borg/service/dist/routes/assistant.js +8 -6
- package/node_modules/@noodle-borg/service/dist/routes/business-information-conversations.js +65 -0
- package/node_modules/@noodle-borg/service/dist/routes/business-information-dispatch.js +3 -0
- package/node_modules/@noodle-borg/service/dist/routes/business-information-paths.js +16 -0
- package/node_modules/@noodle-borg/service/dist/routes/whatsapp-meta.js +130 -0
- package/node_modules/@noodle-borg/service/dist/routes/whatsapp.js +18 -9
- package/node_modules/@noodle-borg/service/dist/service-history-projections.js +24 -0
- package/node_modules/@noodle-borg/service/dist/service.js +3 -7
- package/node_modules/@noodle-borg/transport-http/dist/index.d.ts +1 -1
- package/node_modules/@noodle-borg/transport-http/dist/index.js +1 -1
- package/node_modules/@noodle-borg/transport-http/dist/request-body.d.ts +9 -0
- package/node_modules/@noodle-borg/transport-http/dist/request-body.js +2 -1
- package/node_modules/@noodle-borg/wire-contracts/dist/conversation-history.d.ts +347 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/conversation-history.js +120 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/index.d.ts +1 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/index.js +1 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/whatsapp.d.ts +31 -9
- package/node_modules/@noodle-borg/wire-contracts/dist/whatsapp.js +27 -4
- package/package.json +1 -1
|
@@ -27,6 +27,22 @@ export function parseSolutionInstallationPath(pathname) {
|
|
|
27
27
|
...(connectionAction === undefined ? {} : { connectionAction }),
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
+
const conversations = /^\/v1\/orgs\/([^/]+)\/solution-installations\/([^/]+)\/conversations(?:\/(export|forget|cv_[A-Za-z0-9_-]{8,64}))?$/.exec(pathname);
|
|
31
|
+
if (conversations !== null) {
|
|
32
|
+
const org = decoded(conversations, 1), installationId = decoded(conversations, 2), segment = conversations[3];
|
|
33
|
+
return org === undefined || installationId === undefined
|
|
34
|
+
? undefined
|
|
35
|
+
: {
|
|
36
|
+
org,
|
|
37
|
+
installationId,
|
|
38
|
+
action: 'conversations',
|
|
39
|
+
...(segment === undefined
|
|
40
|
+
? { conversationAction: 'list' }
|
|
41
|
+
: segment === 'export' || segment === 'forget'
|
|
42
|
+
? { conversationAction: segment }
|
|
43
|
+
: { conversationAction: 'show', conversationId: segment }),
|
|
44
|
+
};
|
|
45
|
+
}
|
|
30
46
|
const application = /^\/v1\/orgs\/([^/]+)\/solution-installations\/([^/]+)\/(activate|settings|notice|record-lifecycle|channels|operations\/coordination(?:\/resolve)?|activity(?:\/(?:settings|export|preview))?)$/.exec(pathname);
|
|
31
47
|
if (application !== null) {
|
|
32
48
|
const org = decoded(application, 1);
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { createHmac, timingSafeEqual } from 'node:crypto';
|
|
2
|
+
import { ChannelError, recordChannelDelivery } from '@noodle-borg/assistant-gateway/portable';
|
|
3
|
+
import { readBodyBuffer, sendJson } from '@noodle-borg/transport-http';
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
import { parseWhatsAppWebhook } from '../channels/360dialog.js';
|
|
6
|
+
/**
|
|
7
|
+
* Meta webhook endpoint contract, read 2026-09-22
|
|
8
|
+
* (https://developers.facebook.com/documentation/business-messaging/whatsapp/webhooks/create-webhook-endpoint):
|
|
9
|
+
* the GET handshake carries `hub.mode=subscribe`, `hub.challenge` and `hub.verify_token`, and a valid
|
|
10
|
+
* one is answered 200 with the challenge; every POST carries `X-Hub-Signature-256: sha256=<hex>`, an
|
|
11
|
+
* HMAC-SHA256 of the payload keyed by the app secret. Anything but 200 is retried for up to seven
|
|
12
|
+
* days (https://developers.facebook.com/docs/whatsapp/cloud-api/guides/set-up-webhooks), so after a
|
|
13
|
+
* valid signature only a retryable failure answers otherwise.
|
|
14
|
+
*/
|
|
15
|
+
const SIGNATURE_HEADER = 'x-hub-signature-256';
|
|
16
|
+
const RETRYABLE = new Set([
|
|
17
|
+
'ingress_capacity',
|
|
18
|
+
'channel_unavailable',
|
|
19
|
+
'history_policy_unavailable',
|
|
20
|
+
]);
|
|
21
|
+
const envelope = z.object({
|
|
22
|
+
object: z.literal('whatsapp_business_account'),
|
|
23
|
+
entry: z
|
|
24
|
+
.array(z.object({
|
|
25
|
+
id: z.string().max(64),
|
|
26
|
+
changes: z.array(z.object({ field: z.string().max(128), value: z.unknown() })).max(100),
|
|
27
|
+
}))
|
|
28
|
+
.max(100),
|
|
29
|
+
});
|
|
30
|
+
const routed = z.object({ metadata: z.object({ phone_number_id: z.string().min(1).max(512) }) });
|
|
31
|
+
function same(actual, expected) {
|
|
32
|
+
const left = Buffer.from(actual), right = Buffer.from(expected);
|
|
33
|
+
return left.length === right.length && timingSafeEqual(left, right);
|
|
34
|
+
}
|
|
35
|
+
export function verifyMetaSignature(raw, header, appSecret) {
|
|
36
|
+
if (typeof header !== 'string' || !/^sha256=[a-f0-9]{64}$/i.test(header))
|
|
37
|
+
return false;
|
|
38
|
+
const expected = createHmac('sha256', appSecret).update(raw).digest();
|
|
39
|
+
const actual = Buffer.from(header.slice(7), 'hex');
|
|
40
|
+
return actual.length === expected.length && timingSafeEqual(actual, expected);
|
|
41
|
+
}
|
|
42
|
+
function handshake(res, url, verifyToken) {
|
|
43
|
+
const token = url.searchParams.get('hub.verify_token');
|
|
44
|
+
const challenge = url.searchParams.get('hub.challenge');
|
|
45
|
+
if (url.searchParams.get('hub.mode') !== 'subscribe' ||
|
|
46
|
+
token === null ||
|
|
47
|
+
challenge === null ||
|
|
48
|
+
!/^[\x21-\x7e]{1,1024}$/.test(challenge) ||
|
|
49
|
+
!same(token, verifyToken)) {
|
|
50
|
+
sendJson(res, 403, { error: 'forbidden' });
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
res.writeHead(200, { 'content-type': 'text/plain; charset=utf-8' });
|
|
54
|
+
res.end(challenge);
|
|
55
|
+
}
|
|
56
|
+
export async function metaWebhook(req, res, url, runtime) {
|
|
57
|
+
const meta = runtime.options.meta;
|
|
58
|
+
if (!meta)
|
|
59
|
+
return sendJson(res, 404, { error: 'not_found' });
|
|
60
|
+
if (req.method === 'GET')
|
|
61
|
+
return handshake(res, url, meta.verifyToken);
|
|
62
|
+
if (req.method !== 'POST')
|
|
63
|
+
return sendJson(res, 405, { error: 'method_not_allowed' });
|
|
64
|
+
const body = await readBodyBuffer(req, 1 << 20);
|
|
65
|
+
if (!body.ok)
|
|
66
|
+
return sendJson(res, 413, { error: 'webhook_invalid' });
|
|
67
|
+
// The signature covers the exact bytes Meta sent; nothing is parsed before it verifies.
|
|
68
|
+
if (!verifyMetaSignature(body.buffer, req.headers[SIGNATURE_HEADER], meta.appSecret))
|
|
69
|
+
return sendJson(res, 401, { error: 'unauthorized' });
|
|
70
|
+
// Content-free: a code and never a header, body, phone number or asset id.
|
|
71
|
+
const skip = (code) => runtime.deps.logger?.warn('assistant.channel.webhook', { provider: 'meta', code });
|
|
72
|
+
let parsed;
|
|
73
|
+
try {
|
|
74
|
+
const result = envelope.safeParse(JSON.parse(body.buffer.toString('utf8')));
|
|
75
|
+
if (result.success)
|
|
76
|
+
parsed = result.data;
|
|
77
|
+
}
|
|
78
|
+
catch {
|
|
79
|
+
parsed = undefined;
|
|
80
|
+
}
|
|
81
|
+
if (!parsed) {
|
|
82
|
+
skip('webhook_invalid');
|
|
83
|
+
return sendJson(res, 200, { ok: true });
|
|
84
|
+
}
|
|
85
|
+
const groups = new Map();
|
|
86
|
+
let count = 0;
|
|
87
|
+
for (const entry of parsed.entry)
|
|
88
|
+
for (const change of entry.changes) {
|
|
89
|
+
// System notifications carry no phone number and take no part in conversations.
|
|
90
|
+
if (++count > 100 || change.field !== 'messages')
|
|
91
|
+
continue;
|
|
92
|
+
const target = routed.safeParse(change.value);
|
|
93
|
+
if (!target.success) {
|
|
94
|
+
skip('webhook_invalid');
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
const phone = target.data.metadata.phone_number_id;
|
|
98
|
+
groups.set(phone, [...(groups.get(phone) ?? []), { waba: entry.id, change }]);
|
|
99
|
+
}
|
|
100
|
+
if (count > 100)
|
|
101
|
+
skip('batch_too_large');
|
|
102
|
+
for (const [phoneNumberId, group] of groups) {
|
|
103
|
+
try {
|
|
104
|
+
const id = await runtime.channels.bindingForAsset(phoneNumberId);
|
|
105
|
+
if (!id)
|
|
106
|
+
throw new ChannelError('binding_unknown');
|
|
107
|
+
const binding = await runtime.channels.internal(id);
|
|
108
|
+
if (binding.provider !== 'meta')
|
|
109
|
+
throw new ChannelError('provider_mismatch');
|
|
110
|
+
// Defense in depth: the number must arrive under the WABA the operator bound it to.
|
|
111
|
+
const changes = group.filter((item) => item.waba === binding.wabaId);
|
|
112
|
+
if (changes.length !== group.length)
|
|
113
|
+
skip('waba_mismatch');
|
|
114
|
+
if (changes.length === 0)
|
|
115
|
+
continue;
|
|
116
|
+
const batch = parseWhatsAppWebhook({ object: parsed.object, entry: [{ changes: changes.map((item) => item.change) }] }, phoneNumberId);
|
|
117
|
+
await runtime.channels.receive(id, batch.messages, await runtime.retention(binding));
|
|
118
|
+
for (const status of batch.statuses)
|
|
119
|
+
await recordChannelDelivery(runtime.channels.store, id, status.providerMessageId, status.state, runtime.channels.now());
|
|
120
|
+
}
|
|
121
|
+
catch (error) {
|
|
122
|
+
if (!(error instanceof ChannelError) || RETRYABLE.has(error.code))
|
|
123
|
+
throw error;
|
|
124
|
+
skip(error.code);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
sendJson(res, 200, { ok: true });
|
|
128
|
+
runtime.options.worker.wake();
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=whatsapp-meta.js.map
|
|
@@ -2,7 +2,9 @@ import { ChannelError, channelParticipantId, recordChannelDelivery, } from '@noo
|
|
|
2
2
|
import { readJsonBody, sendJson } from '@noodle-borg/transport-http';
|
|
3
3
|
import * as wire from '@noodle-borg/wire-contracts';
|
|
4
4
|
import { parseWhatsAppWebhook, verifyWhatsAppWebhookSecret, WHATSAPP_CALLBACK_HEADER, } from '../channels/360dialog.js';
|
|
5
|
+
import { WHATSAPP_META_CALLBACK_PATH } from '../channels/meta-cloud.js';
|
|
5
6
|
import { authorizeTenantControl, developerGrantRouteAccess } from './control-plane.js';
|
|
7
|
+
import { metaWebhook } from './whatsapp-meta.js';
|
|
6
8
|
const participant = /^p_[a-f0-9]{64}$/;
|
|
7
9
|
const eventId = /^e_[0-9_]+$/;
|
|
8
10
|
function eventView(event) {
|
|
@@ -32,7 +34,8 @@ async function body(req, schema) {
|
|
|
32
34
|
export function dispatchWhatsAppRoutes(req, res, url, runtime, grants) {
|
|
33
35
|
const callback = /^\/v1\/channels\/whatsapp\/webhooks\/([a-z0-9-]+)$/.exec(url.pathname);
|
|
34
36
|
const operator = /^\/v1\/orgs\/([^/]+)\/apps\/([^/]+)\/envs\/([^/]+)\/channels\/whatsapp(?:\/(.*))?$/.exec(url.pathname);
|
|
35
|
-
|
|
37
|
+
const meta = url.pathname === WHATSAPP_META_CALLBACK_PATH;
|
|
38
|
+
if (!callback && !operator && !meta)
|
|
36
39
|
return false;
|
|
37
40
|
res.setHeader('Cache-Control', 'no-store');
|
|
38
41
|
if (!runtime) {
|
|
@@ -42,13 +45,15 @@ export function dispatchWhatsAppRoutes(req, res, url, runtime, grants) {
|
|
|
42
45
|
});
|
|
43
46
|
return true;
|
|
44
47
|
}
|
|
45
|
-
const run = Promise.resolve().then(() =>
|
|
46
|
-
?
|
|
47
|
-
:
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
const run = Promise.resolve().then(() => meta
|
|
49
|
+
? metaWebhook(req, res, url, runtime)
|
|
50
|
+
: callback
|
|
51
|
+
? webhook(req, res, callback[1], runtime)
|
|
52
|
+
: operate(req, res, url, {
|
|
53
|
+
org: decodeURIComponent(operator[1]),
|
|
54
|
+
app: decodeURIComponent(operator[2]),
|
|
55
|
+
env: decodeURIComponent(operator[3]),
|
|
56
|
+
}, operator[4] ?? '', runtime, grants));
|
|
52
57
|
void run.catch((error) => {
|
|
53
58
|
const code = error instanceof ChannelError ? error.code : 'channel_unavailable';
|
|
54
59
|
const status = code === 'channel_not_found'
|
|
@@ -73,8 +78,12 @@ async function webhook(req, res, id, runtime) {
|
|
|
73
78
|
if (req.method !== 'POST')
|
|
74
79
|
return sendJson(res, 405, { error: 'method_not_allowed' });
|
|
75
80
|
const binding = await runtime.channels.internal(id);
|
|
81
|
+
// Meta numbers share the signed app callback; only 360dialog has a per-binding address.
|
|
82
|
+
if (binding.provider !== '360dialog')
|
|
83
|
+
return sendJson(res, 404, { error: 'not_found' });
|
|
76
84
|
const { webhookSecret } = await runtime.provider(binding);
|
|
77
|
-
if (!
|
|
85
|
+
if (!webhookSecret ||
|
|
86
|
+
!verifyWhatsAppWebhookSecret(req.headers[WHATSAPP_CALLBACK_HEADER], webhookSecret))
|
|
78
87
|
return sendJson(res, 401, { error: 'unauthorized' });
|
|
79
88
|
const input = await readJsonBody(req, 1 << 20);
|
|
80
89
|
if (!input.ok)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { randomBytes } from 'node:crypto';
|
|
2
|
+
import { ApplicationActivity } from './application-activity.js';
|
|
3
|
+
import { ApplicationConversations } from './conversation-history/operator.js';
|
|
4
|
+
/** Installation history projections over the optional durable stores the service was given. */
|
|
5
|
+
export function createHistoryProjections(options, moduleHost) {
|
|
6
|
+
const activity = options.operationEvidence === undefined
|
|
7
|
+
? undefined
|
|
8
|
+
: new ApplicationActivity({
|
|
9
|
+
...options.operationEvidence,
|
|
10
|
+
allowance: async (org, request) => moduleHost.resolveActivityHistoryAllowance?.(org, request),
|
|
11
|
+
});
|
|
12
|
+
const history = options.conversationHistory;
|
|
13
|
+
const conversations = history === undefined
|
|
14
|
+
? undefined
|
|
15
|
+
: new ApplicationConversations({
|
|
16
|
+
store: history.store,
|
|
17
|
+
identityKey: history.identityKey ?? randomBytes(32).toString('hex'),
|
|
18
|
+
...(options.clock === undefined
|
|
19
|
+
? {}
|
|
20
|
+
: { now: () => options.clock?.().getTime() ?? Date.now() }),
|
|
21
|
+
});
|
|
22
|
+
return { activity, conversations };
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=service-history-projections.js.map
|
|
@@ -6,7 +6,6 @@ import { capabilityOperatorRoute } from '@noodle-borg/managed-capabilities';
|
|
|
6
6
|
import { OPENAI_APPS_CHALLENGE_PATH } from '@noodle-borg/module';
|
|
7
7
|
import { applySecurityHeaders, createMcpRouter, enforceHttps, noopLogger, sendJson, } from '@noodle-borg/transport-http';
|
|
8
8
|
import { AnonymousConsumerLimiter, createAdmissionGate } from './admission.js';
|
|
9
|
-
import { ApplicationActivity } from './application-activity.js';
|
|
10
9
|
import { createApplicationServingRuntime } from './application-runtime-target.js';
|
|
11
10
|
import { createArchivePreflight } from './archive-preflight.js';
|
|
12
11
|
import { ArchiveSweeper, resolveArchiveRetentionDays } from './archive-sweeper.js';
|
|
@@ -55,6 +54,7 @@ import { handleRollback } from './routes/rollback.js';
|
|
|
55
54
|
import { createServicePrincipalDispatcher } from './routes/service-principals-dispatch.js';
|
|
56
55
|
import { createServiceProbeDispatcher } from './routes/service-probes.js';
|
|
57
56
|
import { dispatchWhatsAppRoutes } from './routes/whatsapp.js';
|
|
57
|
+
import { createHistoryProjections } from './service-history-projections.js';
|
|
58
58
|
import { servicePrincipalDataPlaneHooks } from './service-principal-data-plane.js';
|
|
59
59
|
import { InMemoryAlertRuleStore } from './store/alert-rules.js';
|
|
60
60
|
import { StdoutAuditSink } from './store/audit.js';
|
|
@@ -95,12 +95,7 @@ export function createServiceHandler(registry, options = {}) {
|
|
|
95
95
|
activeAudit = audit;
|
|
96
96
|
const { publicTenantRouting } = mcp.mcpRoutingOptions(options, controlPlane);
|
|
97
97
|
const resolveEndpointOptions = (org) => mcp.endpointUrlOptionsForOrg(options, controlPlane, org);
|
|
98
|
-
const activity = options
|
|
99
|
-
? undefined
|
|
100
|
-
: new ApplicationActivity({
|
|
101
|
-
...options.operationEvidence,
|
|
102
|
-
allowance: async (org, request) => moduleHost.resolveActivityHistoryAllowance?.(org, request),
|
|
103
|
-
});
|
|
98
|
+
const { activity, conversations } = createHistoryProjections(options, moduleHost);
|
|
104
99
|
const withIntentMode = createIntentTargetResolver(intentSettings, intentPreviewOrgs);
|
|
105
100
|
const { activateInstallation, readInstallationActivation, resolveRuntimeTarget, businessOnboarding, } = createApplicationServingRuntime(registry, providerOptions, controlPlane, audit, activity);
|
|
106
101
|
const runtimeTarget = async (target) => target === undefined ? undefined : resolveRuntimeTarget(target);
|
|
@@ -314,6 +309,7 @@ export function createServiceHandler(registry, options = {}) {
|
|
|
314
309
|
activateInstallation,
|
|
315
310
|
readInstallationActivation,
|
|
316
311
|
...(activity === undefined ? {} : { activity }),
|
|
312
|
+
...(conversations === undefined ? {} : { conversations }),
|
|
317
313
|
...(options.connectionRuntime === undefined
|
|
318
314
|
? {}
|
|
319
315
|
: {
|
|
@@ -3,7 +3,7 @@ export { type AccessMode, type AdmissionCategory, type AdmissionContext, type Ad
|
|
|
3
3
|
export { bearerToken } from './identity-authorization.js';
|
|
4
4
|
export { createLogger, type LogFields, type Logger, type LoggerOptions, type LogLevel, type LogSink, noopLogger, stderrSink, stdoutSink, } from './logging.js';
|
|
5
5
|
export { resolveTrustedPublicOrg, resolveTrustedTenantMcpResource, type TrustedPublicOrg, type TrustedPublicRef, type TrustedPublicRouting, type TrustedTenantMcpResource, trustedPublicMcpRef, trustedPublicOrgWellKnownRef, } from './public-routing.js';
|
|
6
|
-
export { readBody, readDeployBody, readJsonBody } from './request-body.js';
|
|
6
|
+
export { readBody, readBodyBuffer, readDeployBody, readJsonBody } from './request-body.js';
|
|
7
7
|
export { sendJson } from './responses.js';
|
|
8
8
|
export { type RunningServer, type ServeOptions, serveHttp } from './serve.js';
|
|
9
9
|
export type { HostedToolAuthorizationObservation, HostedToolAuthorizationObserver, ServicePrincipalToolAuthorizationObservation, } from './service-principal-authorization.js';
|
|
@@ -3,7 +3,7 @@ export { createMcpHttpHandler, createMcpRouter, } from './handler.js';
|
|
|
3
3
|
export { bearerToken } from './identity-authorization.js';
|
|
4
4
|
export { createLogger, noopLogger, stderrSink, stdoutSink, } from './logging.js';
|
|
5
5
|
export { resolveTrustedPublicOrg, resolveTrustedTenantMcpResource, trustedPublicMcpRef, trustedPublicOrgWellKnownRef, } from './public-routing.js';
|
|
6
|
-
export { readBody, readDeployBody, readJsonBody } from './request-body.js';
|
|
6
|
+
export { readBody, readBodyBuffer, readDeployBody, readJsonBody } from './request-body.js';
|
|
7
7
|
export { sendJson } from './responses.js';
|
|
8
8
|
export { serveHttp } from './serve.js';
|
|
9
9
|
export { preflightServicePrincipalToolCall, sendServicePrincipalToolDenial, } from './service-principal-authorization.js';
|
|
@@ -7,6 +7,15 @@ export declare function readBody(req: IncomingMessage, max: number): Promise<{
|
|
|
7
7
|
receivedBytes: number;
|
|
8
8
|
maxBytes: number;
|
|
9
9
|
}>;
|
|
10
|
+
/** The exact request bytes, bounded; for callers that must verify a signature before parsing. */
|
|
11
|
+
export declare function readBodyBuffer(req: IncomingMessage, max: number): Promise<{
|
|
12
|
+
ok: true;
|
|
13
|
+
buffer: Buffer;
|
|
14
|
+
} | {
|
|
15
|
+
ok: false;
|
|
16
|
+
receivedBytes: number;
|
|
17
|
+
maxBytes: number;
|
|
18
|
+
}>;
|
|
10
19
|
export declare function readDeployBody(req: IncomingMessage, max: number): Promise<{
|
|
11
20
|
ok: true;
|
|
12
21
|
text: string;
|
|
@@ -3,7 +3,8 @@ export async function readBody(req, max) {
|
|
|
3
3
|
const body = await readBodyBuffer(req, max);
|
|
4
4
|
return body.ok ? { ok: true, text: body.buffer.toString('utf8') } : body;
|
|
5
5
|
}
|
|
6
|
-
|
|
6
|
+
/** The exact request bytes, bounded; for callers that must verify a signature before parsing. */
|
|
7
|
+
export async function readBodyBuffer(req, max) {
|
|
7
8
|
const chunks = [];
|
|
8
9
|
let size = 0;
|
|
9
10
|
for await (const chunk of req) {
|
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Staff projection of durable conversation history (ADR 0241). Server output is strict; the tolerant
|
|
4
|
+
* `*ClientResponseSchema` variants let older clients ignore additive fields.
|
|
5
|
+
*/
|
|
6
|
+
export declare const ConversationIdSchema: z.ZodString;
|
|
7
|
+
export declare const ConversationChannelSchema: z.ZodEnum<{
|
|
8
|
+
whatsapp: "whatsapp";
|
|
9
|
+
website: "website";
|
|
10
|
+
}>;
|
|
11
|
+
export declare const ConversationSummarySchema: z.ZodObject<{
|
|
12
|
+
id: z.ZodString;
|
|
13
|
+
channel: z.ZodEnum<{
|
|
14
|
+
whatsapp: "whatsapp";
|
|
15
|
+
website: "website";
|
|
16
|
+
}>;
|
|
17
|
+
subject: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
18
|
+
kind: z.ZodLiteral<"anonymous">;
|
|
19
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
20
|
+
kind: z.ZodLiteral<"customer">;
|
|
21
|
+
ref: z.ZodString;
|
|
22
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
23
|
+
kind: z.ZodLiteral<"participant">;
|
|
24
|
+
ref: z.ZodString;
|
|
25
|
+
}, z.core.$strict>], "kind">;
|
|
26
|
+
startedAt: z.ZodISODateTime;
|
|
27
|
+
lastMessageAt: z.ZodISODateTime;
|
|
28
|
+
itemCount: z.ZodNumber;
|
|
29
|
+
}, z.core.$strict>;
|
|
30
|
+
export declare const ConversationItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
31
|
+
kind: z.ZodLiteral<"message">;
|
|
32
|
+
role: z.ZodEnum<{
|
|
33
|
+
assistant: "assistant";
|
|
34
|
+
user: "user";
|
|
35
|
+
}>;
|
|
36
|
+
text: z.ZodString;
|
|
37
|
+
at: z.ZodISODateTime;
|
|
38
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
39
|
+
kind: z.ZodLiteral<"outcome">;
|
|
40
|
+
interactionId: z.ZodString;
|
|
41
|
+
tool: z.ZodString;
|
|
42
|
+
status: z.ZodEnum<{
|
|
43
|
+
failed: "failed";
|
|
44
|
+
succeeded: "succeeded";
|
|
45
|
+
declined: "declined";
|
|
46
|
+
cancelled: "cancelled";
|
|
47
|
+
}>;
|
|
48
|
+
at: z.ZodISODateTime;
|
|
49
|
+
}, z.core.$strict>], "kind">;
|
|
50
|
+
export declare const ConversationDetailSchema: z.ZodObject<{
|
|
51
|
+
items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
52
|
+
kind: z.ZodLiteral<"message">;
|
|
53
|
+
role: z.ZodEnum<{
|
|
54
|
+
assistant: "assistant";
|
|
55
|
+
user: "user";
|
|
56
|
+
}>;
|
|
57
|
+
text: z.ZodString;
|
|
58
|
+
at: z.ZodISODateTime;
|
|
59
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
60
|
+
kind: z.ZodLiteral<"outcome">;
|
|
61
|
+
interactionId: z.ZodString;
|
|
62
|
+
tool: z.ZodString;
|
|
63
|
+
status: z.ZodEnum<{
|
|
64
|
+
failed: "failed";
|
|
65
|
+
succeeded: "succeeded";
|
|
66
|
+
declined: "declined";
|
|
67
|
+
cancelled: "cancelled";
|
|
68
|
+
}>;
|
|
69
|
+
at: z.ZodISODateTime;
|
|
70
|
+
}, z.core.$strict>], "kind">>;
|
|
71
|
+
id: z.ZodString;
|
|
72
|
+
channel: z.ZodEnum<{
|
|
73
|
+
whatsapp: "whatsapp";
|
|
74
|
+
website: "website";
|
|
75
|
+
}>;
|
|
76
|
+
subject: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
77
|
+
kind: z.ZodLiteral<"anonymous">;
|
|
78
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
79
|
+
kind: z.ZodLiteral<"customer">;
|
|
80
|
+
ref: z.ZodString;
|
|
81
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
82
|
+
kind: z.ZodLiteral<"participant">;
|
|
83
|
+
ref: z.ZodString;
|
|
84
|
+
}, z.core.$strict>], "kind">;
|
|
85
|
+
startedAt: z.ZodISODateTime;
|
|
86
|
+
lastMessageAt: z.ZodISODateTime;
|
|
87
|
+
itemCount: z.ZodNumber;
|
|
88
|
+
}, z.core.$strict>;
|
|
89
|
+
export declare const ConversationListResponseSchema: z.ZodObject<{
|
|
90
|
+
ok: z.ZodLiteral<true>;
|
|
91
|
+
data: z.ZodObject<{
|
|
92
|
+
conversations: z.ZodArray<z.ZodObject<{
|
|
93
|
+
id: z.ZodString;
|
|
94
|
+
channel: z.ZodEnum<{
|
|
95
|
+
whatsapp: "whatsapp";
|
|
96
|
+
website: "website";
|
|
97
|
+
}>;
|
|
98
|
+
subject: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
99
|
+
kind: z.ZodLiteral<"anonymous">;
|
|
100
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
101
|
+
kind: z.ZodLiteral<"customer">;
|
|
102
|
+
ref: z.ZodString;
|
|
103
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
104
|
+
kind: z.ZodLiteral<"participant">;
|
|
105
|
+
ref: z.ZodString;
|
|
106
|
+
}, z.core.$strict>], "kind">;
|
|
107
|
+
startedAt: z.ZodISODateTime;
|
|
108
|
+
lastMessageAt: z.ZodISODateTime;
|
|
109
|
+
itemCount: z.ZodNumber;
|
|
110
|
+
}, z.core.$strict>>;
|
|
111
|
+
nextCursor: z.ZodOptional<z.ZodString>;
|
|
112
|
+
}, z.core.$strict>;
|
|
113
|
+
}, z.core.$strict>;
|
|
114
|
+
export declare const ConversationShowResponseSchema: z.ZodObject<{
|
|
115
|
+
ok: z.ZodLiteral<true>;
|
|
116
|
+
data: z.ZodObject<{
|
|
117
|
+
conversation: z.ZodObject<{
|
|
118
|
+
items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
119
|
+
kind: z.ZodLiteral<"message">;
|
|
120
|
+
role: z.ZodEnum<{
|
|
121
|
+
assistant: "assistant";
|
|
122
|
+
user: "user";
|
|
123
|
+
}>;
|
|
124
|
+
text: z.ZodString;
|
|
125
|
+
at: z.ZodISODateTime;
|
|
126
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
127
|
+
kind: z.ZodLiteral<"outcome">;
|
|
128
|
+
interactionId: z.ZodString;
|
|
129
|
+
tool: z.ZodString;
|
|
130
|
+
status: z.ZodEnum<{
|
|
131
|
+
failed: "failed";
|
|
132
|
+
succeeded: "succeeded";
|
|
133
|
+
declined: "declined";
|
|
134
|
+
cancelled: "cancelled";
|
|
135
|
+
}>;
|
|
136
|
+
at: z.ZodISODateTime;
|
|
137
|
+
}, z.core.$strict>], "kind">>;
|
|
138
|
+
id: z.ZodString;
|
|
139
|
+
channel: z.ZodEnum<{
|
|
140
|
+
whatsapp: "whatsapp";
|
|
141
|
+
website: "website";
|
|
142
|
+
}>;
|
|
143
|
+
subject: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
144
|
+
kind: z.ZodLiteral<"anonymous">;
|
|
145
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
146
|
+
kind: z.ZodLiteral<"customer">;
|
|
147
|
+
ref: z.ZodString;
|
|
148
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
149
|
+
kind: z.ZodLiteral<"participant">;
|
|
150
|
+
ref: z.ZodString;
|
|
151
|
+
}, z.core.$strict>], "kind">;
|
|
152
|
+
startedAt: z.ZodISODateTime;
|
|
153
|
+
lastMessageAt: z.ZodISODateTime;
|
|
154
|
+
itemCount: z.ZodNumber;
|
|
155
|
+
}, z.core.$strict>;
|
|
156
|
+
}, z.core.$strict>;
|
|
157
|
+
}, z.core.$strict>;
|
|
158
|
+
export declare const ConversationExportResponseSchema: z.ZodObject<{
|
|
159
|
+
ok: z.ZodLiteral<true>;
|
|
160
|
+
data: z.ZodObject<{
|
|
161
|
+
conversations: z.ZodArray<z.ZodObject<{
|
|
162
|
+
items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
163
|
+
kind: z.ZodLiteral<"message">;
|
|
164
|
+
role: z.ZodEnum<{
|
|
165
|
+
assistant: "assistant";
|
|
166
|
+
user: "user";
|
|
167
|
+
}>;
|
|
168
|
+
text: z.ZodString;
|
|
169
|
+
at: z.ZodISODateTime;
|
|
170
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
171
|
+
kind: z.ZodLiteral<"outcome">;
|
|
172
|
+
interactionId: z.ZodString;
|
|
173
|
+
tool: z.ZodString;
|
|
174
|
+
status: z.ZodEnum<{
|
|
175
|
+
failed: "failed";
|
|
176
|
+
succeeded: "succeeded";
|
|
177
|
+
declined: "declined";
|
|
178
|
+
cancelled: "cancelled";
|
|
179
|
+
}>;
|
|
180
|
+
at: z.ZodISODateTime;
|
|
181
|
+
}, z.core.$strict>], "kind">>;
|
|
182
|
+
id: z.ZodString;
|
|
183
|
+
channel: z.ZodEnum<{
|
|
184
|
+
whatsapp: "whatsapp";
|
|
185
|
+
website: "website";
|
|
186
|
+
}>;
|
|
187
|
+
subject: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
188
|
+
kind: z.ZodLiteral<"anonymous">;
|
|
189
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
190
|
+
kind: z.ZodLiteral<"customer">;
|
|
191
|
+
ref: z.ZodString;
|
|
192
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
193
|
+
kind: z.ZodLiteral<"participant">;
|
|
194
|
+
ref: z.ZodString;
|
|
195
|
+
}, z.core.$strict>], "kind">;
|
|
196
|
+
startedAt: z.ZodISODateTime;
|
|
197
|
+
lastMessageAt: z.ZodISODateTime;
|
|
198
|
+
itemCount: z.ZodNumber;
|
|
199
|
+
}, z.core.$strict>>;
|
|
200
|
+
nextCursor: z.ZodOptional<z.ZodString>;
|
|
201
|
+
}, z.core.$strict>;
|
|
202
|
+
}, z.core.$strict>;
|
|
203
|
+
export declare const ConversationForgetRequestSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
204
|
+
conversationId: z.ZodString;
|
|
205
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
206
|
+
subject: z.ZodObject<{
|
|
207
|
+
kind: z.ZodEnum<{
|
|
208
|
+
customer: "customer";
|
|
209
|
+
participant: "participant";
|
|
210
|
+
}>;
|
|
211
|
+
ref: z.ZodString;
|
|
212
|
+
}, z.core.$strict>;
|
|
213
|
+
}, z.core.$strict>]>;
|
|
214
|
+
export type ConversationForgetRequest = z.infer<typeof ConversationForgetRequestSchema>;
|
|
215
|
+
export declare const ConversationForgetResponseSchema: z.ZodObject<{
|
|
216
|
+
ok: z.ZodLiteral<true>;
|
|
217
|
+
data: z.ZodObject<{
|
|
218
|
+
forgotten: z.ZodObject<{
|
|
219
|
+
conversations: z.ZodNumber;
|
|
220
|
+
items: z.ZodNumber;
|
|
221
|
+
}, z.core.$strict>;
|
|
222
|
+
}, z.core.$strict>;
|
|
223
|
+
}, z.core.$strict>;
|
|
224
|
+
export declare const ConversationListClientResponseSchema: z.ZodObject<{
|
|
225
|
+
ok: z.ZodLiteral<true>;
|
|
226
|
+
data: z.ZodObject<{
|
|
227
|
+
conversations: z.ZodArray<z.ZodObject<{
|
|
228
|
+
subject: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
229
|
+
kind: z.ZodLiteral<"anonymous">;
|
|
230
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
231
|
+
kind: z.ZodLiteral<"customer">;
|
|
232
|
+
ref: z.ZodString;
|
|
233
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
234
|
+
kind: z.ZodLiteral<"participant">;
|
|
235
|
+
ref: z.ZodString;
|
|
236
|
+
}, z.core.$strip>], "kind">;
|
|
237
|
+
id: z.ZodString;
|
|
238
|
+
channel: z.ZodEnum<{
|
|
239
|
+
whatsapp: "whatsapp";
|
|
240
|
+
website: "website";
|
|
241
|
+
}>;
|
|
242
|
+
startedAt: z.ZodISODateTime;
|
|
243
|
+
lastMessageAt: z.ZodISODateTime;
|
|
244
|
+
itemCount: z.ZodNumber;
|
|
245
|
+
}, z.core.$strip>>;
|
|
246
|
+
nextCursor: z.ZodOptional<z.ZodString>;
|
|
247
|
+
}, z.core.$strip>;
|
|
248
|
+
}, z.core.$strip>;
|
|
249
|
+
export declare const ConversationShowClientResponseSchema: z.ZodObject<{
|
|
250
|
+
ok: z.ZodLiteral<true>;
|
|
251
|
+
data: z.ZodObject<{
|
|
252
|
+
conversation: z.ZodObject<{
|
|
253
|
+
items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
254
|
+
kind: z.ZodLiteral<"message">;
|
|
255
|
+
role: z.ZodEnum<{
|
|
256
|
+
assistant: "assistant";
|
|
257
|
+
user: "user";
|
|
258
|
+
}>;
|
|
259
|
+
text: z.ZodString;
|
|
260
|
+
at: z.ZodISODateTime;
|
|
261
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
262
|
+
kind: z.ZodLiteral<"outcome">;
|
|
263
|
+
interactionId: z.ZodString;
|
|
264
|
+
tool: z.ZodString;
|
|
265
|
+
status: z.ZodEnum<{
|
|
266
|
+
failed: "failed";
|
|
267
|
+
succeeded: "succeeded";
|
|
268
|
+
declined: "declined";
|
|
269
|
+
cancelled: "cancelled";
|
|
270
|
+
}>;
|
|
271
|
+
at: z.ZodISODateTime;
|
|
272
|
+
}, z.core.$strip>], "kind">>;
|
|
273
|
+
subject: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
274
|
+
kind: z.ZodLiteral<"anonymous">;
|
|
275
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
276
|
+
kind: z.ZodLiteral<"customer">;
|
|
277
|
+
ref: z.ZodString;
|
|
278
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
279
|
+
kind: z.ZodLiteral<"participant">;
|
|
280
|
+
ref: z.ZodString;
|
|
281
|
+
}, z.core.$strip>], "kind">;
|
|
282
|
+
id: z.ZodString;
|
|
283
|
+
channel: z.ZodEnum<{
|
|
284
|
+
whatsapp: "whatsapp";
|
|
285
|
+
website: "website";
|
|
286
|
+
}>;
|
|
287
|
+
startedAt: z.ZodISODateTime;
|
|
288
|
+
lastMessageAt: z.ZodISODateTime;
|
|
289
|
+
itemCount: z.ZodNumber;
|
|
290
|
+
}, z.core.$strip>;
|
|
291
|
+
}, z.core.$strip>;
|
|
292
|
+
}, z.core.$strip>;
|
|
293
|
+
export declare const ConversationExportClientResponseSchema: z.ZodObject<{
|
|
294
|
+
ok: z.ZodLiteral<true>;
|
|
295
|
+
data: z.ZodObject<{
|
|
296
|
+
conversations: z.ZodArray<z.ZodObject<{
|
|
297
|
+
items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
298
|
+
kind: z.ZodLiteral<"message">;
|
|
299
|
+
role: z.ZodEnum<{
|
|
300
|
+
assistant: "assistant";
|
|
301
|
+
user: "user";
|
|
302
|
+
}>;
|
|
303
|
+
text: z.ZodString;
|
|
304
|
+
at: z.ZodISODateTime;
|
|
305
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
306
|
+
kind: z.ZodLiteral<"outcome">;
|
|
307
|
+
interactionId: z.ZodString;
|
|
308
|
+
tool: z.ZodString;
|
|
309
|
+
status: z.ZodEnum<{
|
|
310
|
+
failed: "failed";
|
|
311
|
+
succeeded: "succeeded";
|
|
312
|
+
declined: "declined";
|
|
313
|
+
cancelled: "cancelled";
|
|
314
|
+
}>;
|
|
315
|
+
at: z.ZodISODateTime;
|
|
316
|
+
}, z.core.$strip>], "kind">>;
|
|
317
|
+
subject: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
318
|
+
kind: z.ZodLiteral<"anonymous">;
|
|
319
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
320
|
+
kind: z.ZodLiteral<"customer">;
|
|
321
|
+
ref: z.ZodString;
|
|
322
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
323
|
+
kind: z.ZodLiteral<"participant">;
|
|
324
|
+
ref: z.ZodString;
|
|
325
|
+
}, z.core.$strip>], "kind">;
|
|
326
|
+
id: z.ZodString;
|
|
327
|
+
channel: z.ZodEnum<{
|
|
328
|
+
whatsapp: "whatsapp";
|
|
329
|
+
website: "website";
|
|
330
|
+
}>;
|
|
331
|
+
startedAt: z.ZodISODateTime;
|
|
332
|
+
lastMessageAt: z.ZodISODateTime;
|
|
333
|
+
itemCount: z.ZodNumber;
|
|
334
|
+
}, z.core.$strip>>;
|
|
335
|
+
nextCursor: z.ZodOptional<z.ZodString>;
|
|
336
|
+
}, z.core.$strip>;
|
|
337
|
+
}, z.core.$strip>;
|
|
338
|
+
export declare const ConversationForgetClientResponseSchema: z.ZodObject<{
|
|
339
|
+
ok: z.ZodLiteral<true>;
|
|
340
|
+
data: z.ZodObject<{
|
|
341
|
+
forgotten: z.ZodObject<{
|
|
342
|
+
conversations: z.ZodNumber;
|
|
343
|
+
items: z.ZodNumber;
|
|
344
|
+
}, z.core.$strip>;
|
|
345
|
+
}, z.core.$strip>;
|
|
346
|
+
}, z.core.$strip>;
|
|
347
|
+
//# sourceMappingURL=conversation-history.d.ts.map
|