@sentry/junior 0.146.0 → 0.148.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/{agent-hooks-SLJADYE5.js → agent-hooks-VAUYT6PD.js} +10 -10
- package/dist/api/conversations/access.d.ts +2 -1
- package/dist/api/conversations/archive.d.ts +3 -5
- package/dist/api/conversations/create.d.ts +6 -0
- package/dist/api/conversations/detail.d.ts +2 -295
- package/dist/api/conversations/event-list.d.ts +2 -192
- package/dist/api/conversations/list.d.ts +4 -66
- package/dist/api/conversations/routes.d.ts +1 -1
- package/dist/api/conversations/stats.d.ts +0 -54
- package/dist/api/http.d.ts +2 -6
- package/dist/api/locations/detail.d.ts +3 -111
- package/dist/api/locations/list.d.ts +0 -45
- package/dist/api/locations/query.d.ts +2 -1
- package/dist/api/locations/routes.d.ts +1 -1
- package/dist/api/people/list.d.ts +0 -29
- package/dist/api/people/profile.d.ts +2 -106
- package/dist/api/people/profile.query.d.ts +2 -1
- package/dist/api/people/routes.d.ts +1 -1
- package/dist/api/people/shared.d.ts +1 -1
- package/dist/api/people/spend.d.ts +3 -4
- package/dist/api/personal-tokens/routes.d.ts +2 -2
- package/dist/api/route.d.ts +8 -14
- package/dist/api/schema/conversation.d.ts +64 -29
- package/dist/api/schema/location.d.ts +4 -0
- package/dist/api/schema/person.d.ts +7 -3
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +7 -1
- package/dist/api/stats.d.ts +0 -13
- package/dist/api/validation.d.ts +7 -0
- package/dist/api/viewer.d.ts +3 -0
- package/dist/api.d.ts +2 -1
- package/dist/api.js +630 -564
- package/dist/app.js +369 -309
- package/dist/{catalog-runtime-RQIMSDPR.js → catalog-runtime-WADOZVTB.js} +5 -5
- package/dist/chat/actor.d.ts +4 -1
- package/dist/chat/agent/prompt.d.ts +0 -2
- package/dist/chat/agent/request.d.ts +4 -5
- package/dist/chat/agent/resume.d.ts +1 -0
- package/dist/chat/agent/sandbox.d.ts +2 -2
- package/dist/chat/agent/tools.d.ts +0 -2
- package/dist/chat/agent-dispatch/context.d.ts +2 -2
- package/dist/chat/agent-dispatch/types.d.ts +2 -2
- package/dist/chat/agent-invocations/types.d.ts +52 -0
- package/dist/chat/api-turns/work.d.ts +103 -0
- package/dist/chat/capabilities/jr-rpc-command.d.ts +2 -2
- package/dist/chat/configuration/service.d.ts +5 -2
- package/dist/chat/configuration/sql.d.ts +9 -0
- package/dist/chat/configuration/types.d.ts +17 -13
- package/dist/chat/conversations/history.d.ts +63 -0
- package/dist/chat/conversations/projection.d.ts +10 -0
- package/dist/chat/conversations/provenance.d.ts +6 -0
- package/dist/chat/conversations/sql/actor-identity.d.ts +19 -0
- package/dist/chat/conversations/store.d.ts +1 -1
- package/dist/chat/credentials/unlink-provider.d.ts +2 -1
- package/dist/chat/credentials/user-token-store.d.ts +2 -0
- package/dist/chat/event-tasks/tool-support.d.ts +2 -0
- package/dist/chat/identities/sql.d.ts +8 -0
- package/dist/chat/logging.d.ts +2 -0
- package/dist/chat/mcp/auth-store.d.ts +0 -2
- package/dist/chat/mcp/oauth.d.ts +0 -2
- package/dist/chat/oauth-flow.d.ts +3 -1
- package/dist/chat/pi/client.d.ts +2 -0
- package/dist/chat/plugins/credential-hooks.d.ts +2 -0
- package/dist/chat/prompt.d.ts +0 -2
- package/dist/chat/resource-events/notification.d.ts +2 -1
- package/dist/chat/resource-events/store.d.ts +1 -1
- package/dist/chat/runtime/delivered-turn-state.d.ts +1 -4
- package/dist/chat/runtime/reply-executor.d.ts +1 -1
- package/dist/chat/runtime/slack-runtime.d.ts +2 -1
- package/dist/chat/runtime/thread-state.d.ts +8 -11
- package/dist/chat/runtime/turn-input.d.ts +4 -2
- package/dist/chat/runtime/turn-preparation.d.ts +11 -4
- package/dist/chat/sandbox/command-result.d.ts +2 -0
- package/dist/chat/sandbox/egress/schemas.d.ts +6 -0
- package/dist/chat/scheduled-tasks/tool-support.d.ts +7 -5
- package/dist/chat/scheduled-tasks/tools/create.d.ts +4 -2
- package/dist/chat/scheduled-tasks/tools/delete.d.ts +4 -2
- package/dist/chat/scheduled-tasks/tools/list.d.ts +4 -2
- package/dist/chat/scheduled-tasks/tools/run-now.d.ts +4 -2
- package/dist/chat/scheduled-tasks/tools/update.d.ts +4 -2
- package/dist/chat/services/mcp-auth-orchestration.d.ts +0 -3
- package/dist/chat/services/plugin-auth-orchestration.d.ts +2 -1
- package/dist/chat/services/provider-default-config.d.ts +2 -2
- package/dist/chat/services/subscribed-decision.d.ts +3 -0
- package/dist/chat/services/subscribed-reply-policy.d.ts +1 -0
- package/dist/chat/services/turn-result.d.ts +0 -3
- package/dist/chat/services/turn-router.d.ts +3 -0
- package/dist/chat/slack/assistant-thread/lifecycle.d.ts +0 -1
- package/dist/chat/slack/assistant-thread/title.d.ts +0 -3
- package/dist/chat/slack/channel.d.ts +26 -0
- package/dist/chat/slack/dispatch-turn.d.ts +2 -1
- package/dist/chat/slack/timestamp-param.d.ts +0 -2
- package/dist/chat/slack/{tools → tool-support}/canvas/api.d.ts +1 -1
- package/dist/chat/slack/tool-support/canvas/context.d.ts +11 -0
- package/dist/chat/slack/tool-support/channel-access.d.ts +42 -0
- package/dist/chat/slack/tool-support/channel-target.d.ts +27 -0
- package/dist/chat/slack/{tools → tool-support}/list/api.d.ts +8 -1
- package/dist/chat/slack/tool-support/list/params.d.ts +5 -0
- package/dist/chat/slack/tools/canvas/create.d.ts +3 -1
- package/dist/chat/slack/tools/canvas/edit.d.ts +2 -0
- package/dist/chat/slack/tools/canvas/read.d.ts +2 -0
- package/dist/chat/slack/tools/canvas/write.d.ts +2 -0
- package/dist/chat/slack/tools/{user-lookup.d.ts → channel-join.d.ts} +6 -5
- package/dist/chat/slack/tools/channel-list-messages.d.ts +5 -2
- package/dist/chat/slack/tools/conversation-message-search.d.ts +4 -8
- package/dist/chat/slack/tools/list/add-items.d.ts +4 -1
- package/dist/chat/slack/tools/list/create.d.ts +2 -0
- package/dist/chat/slack/tools/list/get-items.d.ts +5 -3
- package/dist/chat/slack/tools/list/update-item.d.ts +5 -1
- package/dist/chat/slack/tools/message-add-reaction.d.ts +3 -1
- package/dist/chat/slack/tools/public-search.d.ts +65 -2
- package/dist/chat/slack/tools/send-files.d.ts +3 -1
- package/dist/chat/slack/tools/thread-read.d.ts +4 -5
- package/dist/chat/slack/vision-cache.d.ts +5 -0
- package/dist/chat/source.d.ts +2 -0
- package/dist/chat/state/conversation.d.ts +4 -5
- package/dist/chat/task-execution/checkpoint.d.ts +1 -0
- package/dist/chat/task-execution/state.d.ts +9 -4
- package/dist/chat/task-execution/store.d.ts +3 -2
- package/dist/chat/task-execution/turn-cursor.d.ts +2 -0
- package/dist/chat/task-execution/worker.d.ts +2 -0
- package/dist/chat/tasks/read.d.ts +1 -1
- package/dist/chat/tool-support/structured-result.d.ts +1 -0
- package/dist/chat/tool-support/timed-out-tool-result.d.ts +11 -0
- package/dist/chat/tools/create-event-task.d.ts +2 -0
- package/dist/chat/tools/delete-event-task.d.ts +2 -0
- package/dist/chat/tools/handoff/tool.d.ts +2 -0
- package/dist/chat/tools/list-event-tasks.d.ts +2 -0
- package/dist/chat/tools/list-resource-event-subscriptions.d.ts +2 -0
- package/dist/chat/tools/runtime/report-progress.d.ts +2 -0
- package/dist/chat/tools/runtime/spawn-agent.d.ts +2 -0
- package/dist/chat/tools/search-conversation-events.d.ts +3 -1
- package/dist/chat/tools/search-resource-event-types.d.ts +2 -0
- package/dist/chat/tools/search-tools.d.ts +2 -0
- package/dist/chat/tools/skill/load-skill.d.ts +2 -0
- package/dist/chat/tools/skill/search-mcp-tools.d.ts +2 -0
- package/dist/chat/tools/stop-watching-resources.d.ts +2 -0
- package/dist/chat/tools/system-time.d.ts +2 -0
- package/dist/chat/tools/types.d.ts +11 -10
- package/dist/chat/tools/update-event-task.d.ts +2 -0
- package/dist/chat/tools/user-lookup.d.ts +29 -0
- package/dist/chat/tools/watch-resource-events.d.ts +4 -2
- package/dist/chat/tools/web/fetch-tool.d.ts +2 -0
- package/dist/chat/tools/web/image-generate.d.ts +2 -0
- package/dist/chat/tools/web/search.d.ts +2 -0
- package/dist/{chunk-GYEKOX7N.js → chunk-2B3PT3V2.js} +1 -1
- package/dist/{chunk-JLMVCNXL.js → chunk-45LOR4PU.js} +22 -4
- package/dist/{chunk-FGHADGIC.js → chunk-4AQZYNHM.js} +2 -2
- package/dist/{chunk-W65V465O.js → chunk-4EA2SFK2.js} +66 -4
- package/dist/{chunk-MKRIZ4VG.js → chunk-4GXJUYJV.js} +4 -2
- package/dist/{chunk-F7REGDKO.js → chunk-55F4QU2V.js} +2 -1
- package/dist/{chunk-M6ZWP4RI.js → chunk-7OEIXFC3.js} +2 -2
- package/dist/{chunk-MCFIXAV5.js → chunk-D3WPMGEX.js} +55 -37
- package/dist/{chunk-AISNSNDV.js → chunk-D6YX4NNN.js} +22 -10
- package/dist/chunk-DUY5CDAM.js +36 -0
- package/dist/{chunk-B63BF443.js → chunk-EAI67NTM.js} +9 -1
- package/dist/{chunk-FEKQHPVA.js → chunk-EINWQFXI.js} +9 -8
- package/dist/chunk-GDFF3BQG.js +136 -0
- package/dist/{chunk-X22KCSCO.js → chunk-GXYDVZKM.js} +7 -5
- package/dist/{chunk-X2WMBTS3.js → chunk-HLPLT3NY.js} +8 -5
- package/dist/{chunk-PB222GIA.js → chunk-HWQGBIH7.js} +1 -1
- package/dist/chunk-IL4EDBMV.js +566 -0
- package/dist/{chunk-HQE6EJS5.js → chunk-LAZGHEYU.js} +1 -1
- package/dist/{chunk-QG7OOKIN.js → chunk-LE5H7LMT.js} +1 -1
- package/dist/chunk-LNVEIJ2L.js +48 -0
- package/dist/{chunk-JUA6VU2Z.js → chunk-OJCP3C3J.js} +12 -23
- package/dist/{chunk-37JJDS4H.js → chunk-POSZWRGL.js} +1 -1
- package/dist/{chunk-TCEJ7XXM.js → chunk-QOWHHM3F.js} +1 -1
- package/dist/{chunk-H6U2U3EP.js → chunk-RRJV5UR5.js} +304 -65
- package/dist/{chunk-OFPYOC3M.js → chunk-ULAU5ZGU.js} +127 -120
- package/dist/{chunk-V6SRLKUB.js → chunk-V2FXMOEA.js} +2 -2
- package/dist/{chunk-GDQEU4I7.js → chunk-VCYSOXON.js} +296 -526
- package/dist/{chunk-BLETMLRX.js → chunk-VMNRXKAH.js} +1374 -989
- package/dist/{chunk-37EVZP66.js → chunk-VRHTNBA6.js} +167 -92
- package/dist/{chunk-FXDDDSPL.js → chunk-VY6W3T43.js} +4 -4
- package/dist/{chunk-ZDGHGY74.js → chunk-WCN4YSH7.js} +13 -6
- package/dist/{chunk-PH4Q3A6W.js → chunk-WOONT5ZP.js} +1 -1
- package/dist/{chunk-47OSH2ZO.js → chunk-XJ42NBP5.js} +395 -206
- package/dist/{chunk-SCGVWUZX.js → chunk-ZCHIC2GM.js} +92 -75
- package/dist/chunk-ZPL2RR7F.js +798 -0
- package/dist/cli/chat.js +33 -35
- package/dist/cli/check.js +6 -6
- package/dist/cli/plugins.js +13 -13
- package/dist/cli/snapshot-create.js +9 -9
- package/dist/cli/upgrade.js +7 -7
- package/dist/db/schema/agent-invocations.d.ts +20 -0
- package/dist/db/schema/conversation-annotations.d.ts +2 -2
- package/dist/db/schema/location-configurations.d.ts +127 -0
- package/dist/db/schema.d.ts +150 -3
- package/dist/{db-WWOMXWTT.js → db-XUKZRFFK.js} +7 -7
- package/dist/instrumentation.js +4 -4
- package/dist/nitro.js +2 -2
- package/dist/{oauth-callback-server-A6ZZX74U.js → oauth-callback-server-LPZMMGFI.js} +25 -26
- package/dist/{runner-KSGB2UAV.js → runner-DGKUTMPX.js} +22 -41
- package/dist/{skills-26QPWKVS.js → skills-P7YUFSXM.js} +6 -6
- package/dist/spawn-DSK3ZEVD.js +38 -0
- package/dist/{validation-OPSRGFGH.js → validation-S7U5M5NR.js} +6 -6
- package/dist/version.js +1 -1
- package/dist/{work-VMSW7STJ.js → work-GAA7TVAD.js} +18 -19
- package/dist/{worker-2JNFB7C7.js → worker-JXPJH3QB.js} +11 -10
- package/migrations/0024_misty_typhoid_mary.sql +12 -0
- package/migrations/meta/0024_snapshot.json +2275 -0
- package/migrations/meta/_journal.json +7 -0
- package/package.json +6 -5
- package/dist/api/health.d.ts +0 -7
- package/dist/api/personal-tokens/create.d.ts +0 -11
- package/dist/api/personal-tokens/list.d.ts +0 -12
- package/dist/api/personal-tokens/revoke.d.ts +0 -5
- package/dist/api/plugin-reports.d.ts +0 -63
- package/dist/api/plugins.d.ts +0 -8
- package/dist/api/runtime.d.ts +0 -24
- package/dist/api/skills.d.ts +0 -6
- package/dist/chat/slack/tools/canvas/context.d.ts +0 -18
- package/dist/chat/slack/tools/channel-access.d.ts +0 -30
- package/dist/chat/state/artifacts.d.ts +0 -30
- package/dist/chat/tool-support/turn-deadline-result.d.ts +0 -3
- package/dist/chunk-HLXXQI5Q.js +0 -238
- package/dist/chunk-LVW7BLLT.js +0 -115
- package/dist/chunk-Q6QZTTLS.js +0 -55
- package/dist/chunk-QSXZ42KX.js +0 -285
- package/dist/chunk-R776HKPK.js +0 -81
- package/dist/chunk-T5GXFFLA.js +0 -67
- package/dist/spawn-5LAJXZ2P.js +0 -39
- /package/dist/chat/slack/{tools → tool-support}/canvas/markdown.d.ts +0 -0
- /package/dist/chat/slack/{tools → tool-support}/channel-capabilities.d.ts +0 -0
- /package/dist/chat/slack/{tools → tool-support}/context.d.ts +0 -0
- /package/dist/chat/slack/{tools → tool-support}/slack-message-url.d.ts +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { User } from "@sentry/junior-plugin-api";
|
|
1
2
|
import type { Conversation } from "@/chat/conversations/store";
|
|
2
3
|
import type { JuniorDatabase } from "@/db/db";
|
|
3
4
|
import type { ConversationFeed } from "../schema/conversation";
|
|
@@ -115,7 +116,7 @@ export declare function readConversationRecordFromSql(conversationId: string): P
|
|
|
115
116
|
export declare function readConversationFeedFromSql(options?: {
|
|
116
117
|
actorEmail?: string;
|
|
117
118
|
limit?: number;
|
|
118
|
-
|
|
119
|
+
viewer?: User;
|
|
119
120
|
}): Promise<ConversationFeed>;
|
|
120
121
|
/**
|
|
121
122
|
* Load a bounded feed with an optional normalized actor-email presentation
|
|
@@ -123,69 +124,6 @@ export declare function readConversationFeedFromSql(options?: {
|
|
|
123
124
|
*/
|
|
124
125
|
export declare function readConversationFeed(options?: {
|
|
125
126
|
actorEmail?: string;
|
|
126
|
-
|
|
127
|
+
viewer?: User;
|
|
127
128
|
}): Promise<ConversationFeed>;
|
|
128
|
-
|
|
129
|
-
declare const _default: import("../route").ApiRoute<import("zod").ZodObject<{
|
|
130
|
-
conversations: import("zod").ZodArray<import("zod").ZodObject<{
|
|
131
|
-
displayTitle: import("zod").ZodString;
|
|
132
|
-
cumulativeDurationMs: import("zod").ZodNumber;
|
|
133
|
-
cumulativeUsage: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
134
|
-
inputTokens: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
135
|
-
outputTokens: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
136
|
-
cachedInputTokens: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
137
|
-
cacheCreationTokens: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
138
|
-
reasoningTokens: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
139
|
-
totalTokens: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
140
|
-
cost: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
141
|
-
input: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
142
|
-
output: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
143
|
-
cacheRead: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
144
|
-
cacheWrite: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
145
|
-
total: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
146
|
-
}, import("zod/v4/core").$strict>>;
|
|
147
|
-
}, import("zod/v4/core").$strict>>;
|
|
148
|
-
auxiliaryCosts: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
149
|
-
costUsd: import("zod").ZodNumber;
|
|
150
|
-
operations: import("zod").ZodArray<import("zod").ZodObject<{
|
|
151
|
-
costUsd: import("zod").ZodNumber;
|
|
152
|
-
events: import("zod").ZodNumber;
|
|
153
|
-
name: import("zod").ZodString;
|
|
154
|
-
namespace: import("zod").ZodString;
|
|
155
|
-
}, import("zod/v4/core").$strict>>;
|
|
156
|
-
}, import("zod/v4/core").$strict>>;
|
|
157
|
-
conversationId: import("zod").ZodString;
|
|
158
|
-
isParticipant: import("zod").ZodBoolean;
|
|
159
|
-
status: import("zod").ZodEnum<{
|
|
160
|
-
completed: "completed";
|
|
161
|
-
failed: "failed";
|
|
162
|
-
active: "active";
|
|
163
|
-
}>;
|
|
164
|
-
startedAt: import("zod").ZodString;
|
|
165
|
-
lastSeenAt: import("zod").ZodString;
|
|
166
|
-
lastProgressAt: import("zod").ZodString;
|
|
167
|
-
surface: import("zod").ZodEnum<{
|
|
168
|
-
slack: "slack";
|
|
169
|
-
api: "api";
|
|
170
|
-
internal: "internal";
|
|
171
|
-
scheduler: "scheduler";
|
|
172
|
-
}>;
|
|
173
|
-
actorIdentity: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
174
|
-
email: import("zod").ZodOptional<import("zod").ZodString>;
|
|
175
|
-
fullName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
176
|
-
slackUserId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
177
|
-
slackUserName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
178
|
-
}, import("zod/v4/core").$strict>>;
|
|
179
|
-
archivedAt: import("zod").ZodOptional<import("zod").ZodString>;
|
|
180
|
-
channel: import("zod").ZodOptional<import("zod").ZodString>;
|
|
181
|
-
channelName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
182
|
-
channelNameRedacted: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
183
|
-
locationId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
184
|
-
sentryTraceUrl: import("zod").ZodOptional<import("zod").ZodString>;
|
|
185
|
-
sourceUrl: import("zod").ZodOptional<import("zod").ZodString>;
|
|
186
|
-
traceId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
187
|
-
}, import("zod/v4/core").$strict>>;
|
|
188
|
-
source: import("zod").ZodLiteral<"conversation_index">;
|
|
189
|
-
generatedAt: import("zod").ZodString;
|
|
190
|
-
}, import("zod/v4/core").$strict>>;
|
|
191
|
-
export default _default;
|
|
129
|
+
export {};
|
|
@@ -1,57 +1,3 @@
|
|
|
1
1
|
import type { ConversationStatsReport } from "../schema/conversation";
|
|
2
2
|
/** Load aggregate conversation stats directly from durable SQL records. */
|
|
3
3
|
export declare function readConversationStats(): Promise<ConversationStatsReport>;
|
|
4
|
-
/** Serve aggregate conversation stats. */
|
|
5
|
-
declare const _default: import("../route").ApiRoute<import("zod").ZodObject<{
|
|
6
|
-
active: import("zod").ZodNumber;
|
|
7
|
-
conversations: import("zod").ZodNumber;
|
|
8
|
-
durationMs: import("zod").ZodNumber;
|
|
9
|
-
failed: import("zod").ZodNumber;
|
|
10
|
-
generatedAt: import("zod").ZodString;
|
|
11
|
-
guardian: import("zod").ZodObject<{
|
|
12
|
-
allow: import("zod").ZodNumber;
|
|
13
|
-
ask: import("zod").ZodNumber;
|
|
14
|
-
costUsd: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
15
|
-
deny: import("zod").ZodNumber;
|
|
16
|
-
metricDays: import("zod").ZodArray<import("zod").ZodObject<{
|
|
17
|
-
allow: import("zod").ZodNumber;
|
|
18
|
-
ask: import("zod").ZodNumber;
|
|
19
|
-
costUsd: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
20
|
-
date: import("zod").ZodString;
|
|
21
|
-
deny: import("zod").ZodNumber;
|
|
22
|
-
requests: import("zod").ZodNumber;
|
|
23
|
-
}, import("zod/v4/core").$strict>>;
|
|
24
|
-
requests: import("zod").ZodNumber;
|
|
25
|
-
}, import("zod/v4/core").$strict>;
|
|
26
|
-
metricDays: import("zod").ZodArray<import("zod").ZodObject<{
|
|
27
|
-
conversations: import("zod").ZodNumber;
|
|
28
|
-
costUsd: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
29
|
-
date: import("zod").ZodString;
|
|
30
|
-
durationMs: import("zod").ZodNumber;
|
|
31
|
-
tokens: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
32
|
-
}, import("zod/v4/core").$strict>>;
|
|
33
|
-
locations: import("zod").ZodArray<import("zod").ZodObject<{
|
|
34
|
-
active: import("zod").ZodNumber;
|
|
35
|
-
conversations: import("zod").ZodNumber;
|
|
36
|
-
durationMs: import("zod").ZodNumber;
|
|
37
|
-
failed: import("zod").ZodNumber;
|
|
38
|
-
label: import("zod").ZodString;
|
|
39
|
-
costUsd: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
40
|
-
tokens: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
41
|
-
}, import("zod/v4/core").$strict>>;
|
|
42
|
-
actors: import("zod").ZodArray<import("zod").ZodObject<{
|
|
43
|
-
active: import("zod").ZodNumber;
|
|
44
|
-
conversations: import("zod").ZodNumber;
|
|
45
|
-
durationMs: import("zod").ZodNumber;
|
|
46
|
-
failed: import("zod").ZodNumber;
|
|
47
|
-
label: import("zod").ZodString;
|
|
48
|
-
costUsd: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
49
|
-
tokens: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
50
|
-
}, import("zod/v4/core").$strict>>;
|
|
51
|
-
source: import("zod").ZodLiteral<"conversation_index">;
|
|
52
|
-
costUsd: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
53
|
-
tokens: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
54
|
-
windowEnd: import("zod").ZodString;
|
|
55
|
-
windowStart: import("zod").ZodString;
|
|
56
|
-
}, import("zod/v4/core").$strict>>;
|
|
57
|
-
export default _default;
|
package/dist/api/http.d.ts
CHANGED
|
@@ -2,11 +2,7 @@ import type { ContentfulStatusCode } from "hono/utils/http-status";
|
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
/** Serialize a REST response only after it satisfies its declared schema. */
|
|
4
4
|
export declare function jsonResponse<TSchema extends z.ZodType>(schema: TSchema, value: z.input<TSchema>, init?: ResponseInit): Response;
|
|
5
|
+
/** Return an empty personalized API response with no-store caching. */
|
|
6
|
+
export declare function emptyResponse(status?: 204 | 200): Response;
|
|
5
7
|
/** Stop a request with Junior's stable JSON error contract. */
|
|
6
8
|
export declare function throwApiError(status: ContentfulStatusCode, message: string, cause?: unknown): never;
|
|
7
|
-
/** Parse route parameters and return a 400 response contract for invalid input. */
|
|
8
|
-
export declare function parseParams<TSchema extends z.ZodType>(schema: TSchema, params: Record<string, string>): z.infer<TSchema>;
|
|
9
|
-
/** Parse an HTTP query and return a 400 response contract for invalid input. */
|
|
10
|
-
export declare function parseQuery<TSchema extends z.ZodType>(schema: TSchema, query: unknown): z.infer<TSchema>;
|
|
11
|
-
/** Parse a JSON request body and return a 400 response contract on failure. */
|
|
12
|
-
export declare function parseBody<TSchema extends z.ZodType>(schema: TSchema, body: unknown): z.infer<TSchema>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { User } from "@sentry/junior-plugin-api";
|
|
1
2
|
/** Expose operational detail for one persisted public conversation location. */
|
|
2
3
|
export declare function readLocationDetail(locationId: string, options?: {
|
|
3
|
-
|
|
4
|
+
viewer?: User;
|
|
4
5
|
}): Promise<{
|
|
5
6
|
active: number;
|
|
6
7
|
conversations: number;
|
|
@@ -72,6 +73,7 @@ export declare function readLocationDetail(locationId: string, options?: {
|
|
|
72
73
|
namespace: string;
|
|
73
74
|
}[];
|
|
74
75
|
} | undefined;
|
|
76
|
+
visibility?: "public" | "private" | undefined;
|
|
75
77
|
actorIdentity?: {
|
|
76
78
|
email?: string | undefined;
|
|
77
79
|
fullName?: string | undefined;
|
|
@@ -93,113 +95,3 @@ export declare function readLocationDetail(locationId: string, options?: {
|
|
|
93
95
|
costUsd?: number | undefined;
|
|
94
96
|
tokens?: number | undefined;
|
|
95
97
|
} | undefined>;
|
|
96
|
-
/** Serve one public location detail endpoint. */
|
|
97
|
-
declare const _default: import("../route").ApiRoute<import("zod").ZodObject<{
|
|
98
|
-
active: import("zod").ZodNumber;
|
|
99
|
-
conversations: import("zod").ZodNumber;
|
|
100
|
-
durationMs: import("zod").ZodNumber;
|
|
101
|
-
failed: import("zod").ZodNumber;
|
|
102
|
-
label: import("zod").ZodString;
|
|
103
|
-
costUsd: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
104
|
-
tokens: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
105
|
-
id: import("zod").ZodString;
|
|
106
|
-
firstSeenAt: import("zod").ZodString;
|
|
107
|
-
kind: import("zod").ZodEnum<{
|
|
108
|
-
channel: "channel";
|
|
109
|
-
dm: "dm";
|
|
110
|
-
group: "group";
|
|
111
|
-
local_conversation: "local_conversation";
|
|
112
|
-
thread: "thread";
|
|
113
|
-
web_session: "web_session";
|
|
114
|
-
}>;
|
|
115
|
-
lastSeenAt: import("zod").ZodString;
|
|
116
|
-
provider: import("zod").ZodString;
|
|
117
|
-
providerDestinationId: import("zod").ZodString;
|
|
118
|
-
visibility: import("zod").ZodLiteral<"public">;
|
|
119
|
-
activityDays: import("zod").ZodArray<import("zod").ZodObject<{
|
|
120
|
-
active: import("zod").ZodNumber;
|
|
121
|
-
conversations: import("zod").ZodNumber;
|
|
122
|
-
date: import("zod").ZodString;
|
|
123
|
-
durationMs: import("zod").ZodNumber;
|
|
124
|
-
failed: import("zod").ZodNumber;
|
|
125
|
-
tokens: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
126
|
-
}, import("zod/v4/core").$strict>>;
|
|
127
|
-
actors: import("zod").ZodArray<import("zod").ZodObject<{
|
|
128
|
-
active: import("zod").ZodNumber;
|
|
129
|
-
conversations: import("zod").ZodNumber;
|
|
130
|
-
durationMs: import("zod").ZodNumber;
|
|
131
|
-
failed: import("zod").ZodNumber;
|
|
132
|
-
label: import("zod").ZodString;
|
|
133
|
-
costUsd: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
134
|
-
tokens: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
135
|
-
actor: import("zod").ZodObject<{
|
|
136
|
-
email: import("zod").ZodOptional<import("zod").ZodString>;
|
|
137
|
-
fullName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
138
|
-
slackUserId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
139
|
-
slackUserName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
140
|
-
}, import("zod/v4/core").$strict>;
|
|
141
|
-
}, import("zod/v4/core").$strict>>;
|
|
142
|
-
generatedAt: import("zod").ZodString;
|
|
143
|
-
recentConversations: import("zod").ZodArray<import("zod").ZodObject<{
|
|
144
|
-
displayTitle: import("zod").ZodString;
|
|
145
|
-
cumulativeDurationMs: import("zod").ZodNumber;
|
|
146
|
-
cumulativeUsage: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
147
|
-
inputTokens: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
148
|
-
outputTokens: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
149
|
-
cachedInputTokens: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
150
|
-
cacheCreationTokens: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
151
|
-
reasoningTokens: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
152
|
-
totalTokens: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
153
|
-
cost: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
154
|
-
input: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
155
|
-
output: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
156
|
-
cacheRead: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
157
|
-
cacheWrite: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
158
|
-
total: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
159
|
-
}, import("zod/v4/core").$strict>>;
|
|
160
|
-
}, import("zod/v4/core").$strict>>;
|
|
161
|
-
auxiliaryCosts: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
162
|
-
costUsd: import("zod").ZodNumber;
|
|
163
|
-
operations: import("zod").ZodArray<import("zod").ZodObject<{
|
|
164
|
-
costUsd: import("zod").ZodNumber;
|
|
165
|
-
events: import("zod").ZodNumber;
|
|
166
|
-
name: import("zod").ZodString;
|
|
167
|
-
namespace: import("zod").ZodString;
|
|
168
|
-
}, import("zod/v4/core").$strict>>;
|
|
169
|
-
}, import("zod/v4/core").$strict>>;
|
|
170
|
-
conversationId: import("zod").ZodString;
|
|
171
|
-
isParticipant: import("zod").ZodBoolean;
|
|
172
|
-
status: import("zod").ZodEnum<{
|
|
173
|
-
completed: "completed";
|
|
174
|
-
failed: "failed";
|
|
175
|
-
active: "active";
|
|
176
|
-
}>;
|
|
177
|
-
startedAt: import("zod").ZodString;
|
|
178
|
-
lastSeenAt: import("zod").ZodString;
|
|
179
|
-
lastProgressAt: import("zod").ZodString;
|
|
180
|
-
surface: import("zod").ZodEnum<{
|
|
181
|
-
slack: "slack";
|
|
182
|
-
api: "api";
|
|
183
|
-
internal: "internal";
|
|
184
|
-
scheduler: "scheduler";
|
|
185
|
-
}>;
|
|
186
|
-
actorIdentity: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
187
|
-
email: import("zod").ZodOptional<import("zod").ZodString>;
|
|
188
|
-
fullName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
189
|
-
slackUserId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
190
|
-
slackUserName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
191
|
-
}, import("zod/v4/core").$strict>>;
|
|
192
|
-
archivedAt: import("zod").ZodOptional<import("zod").ZodString>;
|
|
193
|
-
channel: import("zod").ZodOptional<import("zod").ZodString>;
|
|
194
|
-
channelName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
195
|
-
channelNameRedacted: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
196
|
-
locationId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
197
|
-
sentryTraceUrl: import("zod").ZodOptional<import("zod").ZodString>;
|
|
198
|
-
sourceUrl: import("zod").ZodOptional<import("zod").ZodString>;
|
|
199
|
-
traceId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
200
|
-
}, import("zod/v4/core").$strict>>;
|
|
201
|
-
source: import("zod").ZodLiteral<"conversation_index">;
|
|
202
|
-
windowEnd: import("zod").ZodString;
|
|
203
|
-
windowStart: import("zod").ZodString;
|
|
204
|
-
}, import("zod/v4/core").$strict>>;
|
|
205
|
-
export default _default;
|
|
@@ -35,48 +35,3 @@ export declare function readLocationDirectory(): Promise<{
|
|
|
35
35
|
windowEnd: string;
|
|
36
36
|
windowStart: string;
|
|
37
37
|
}>;
|
|
38
|
-
/** Serve the public location directory endpoint. */
|
|
39
|
-
declare const _default: import("../route").ApiRoute<import("zod").ZodObject<{
|
|
40
|
-
activityDays: import("zod").ZodArray<import("zod").ZodObject<{
|
|
41
|
-
date: import("zod").ZodString;
|
|
42
|
-
privateConversations: import("zod").ZodNumber;
|
|
43
|
-
publicConversations: import("zod").ZodNumber;
|
|
44
|
-
}, import("zod/v4/core").$strict>>;
|
|
45
|
-
generatedAt: import("zod").ZodString;
|
|
46
|
-
locations: import("zod").ZodArray<import("zod").ZodObject<{
|
|
47
|
-
active: import("zod").ZodNumber;
|
|
48
|
-
conversations: import("zod").ZodNumber;
|
|
49
|
-
durationMs: import("zod").ZodNumber;
|
|
50
|
-
failed: import("zod").ZodNumber;
|
|
51
|
-
label: import("zod").ZodString;
|
|
52
|
-
costUsd: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
53
|
-
tokens: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
54
|
-
id: import("zod").ZodString;
|
|
55
|
-
firstSeenAt: import("zod").ZodString;
|
|
56
|
-
kind: import("zod").ZodEnum<{
|
|
57
|
-
channel: "channel";
|
|
58
|
-
dm: "dm";
|
|
59
|
-
group: "group";
|
|
60
|
-
local_conversation: "local_conversation";
|
|
61
|
-
thread: "thread";
|
|
62
|
-
web_session: "web_session";
|
|
63
|
-
}>;
|
|
64
|
-
lastSeenAt: import("zod").ZodString;
|
|
65
|
-
provider: import("zod").ZodString;
|
|
66
|
-
providerDestinationId: import("zod").ZodString;
|
|
67
|
-
visibility: import("zod").ZodLiteral<"public">;
|
|
68
|
-
}, import("zod/v4/core").$strict>>;
|
|
69
|
-
privateActivity: import("zod").ZodObject<{
|
|
70
|
-
active: import("zod").ZodNumber;
|
|
71
|
-
conversations: import("zod").ZodNumber;
|
|
72
|
-
durationMs: import("zod").ZodNumber;
|
|
73
|
-
failed: import("zod").ZodNumber;
|
|
74
|
-
label: import("zod").ZodString;
|
|
75
|
-
costUsd: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
76
|
-
tokens: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
77
|
-
}, import("zod/v4/core").$strict>;
|
|
78
|
-
source: import("zod").ZodLiteral<"conversation_index">;
|
|
79
|
-
windowEnd: import("zod").ZodString;
|
|
80
|
-
windowStart: import("zod").ZodString;
|
|
81
|
-
}, import("zod/v4/core").$strict>>;
|
|
82
|
-
export default _default;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { User } from "@sentry/junior-plugin-api";
|
|
1
2
|
import type { LocationDetailReport, LocationDirectoryReport } from "../schema/location";
|
|
2
3
|
/** Load public locations plus one complete privacy-safe aggregate for non-public activity. */
|
|
3
4
|
export declare function readLocationDirectoryFromSql(): Promise<LocationDirectoryReport>;
|
|
4
5
|
/** Load one public location's complete activity while bounding only recent conversations. */
|
|
5
6
|
export declare function readLocationDetailFromSql(locationId: string, options?: {
|
|
6
|
-
|
|
7
|
+
viewer?: User;
|
|
7
8
|
}): Promise<LocationDetailReport | undefined>;
|
|
@@ -1,32 +1,3 @@
|
|
|
1
1
|
import type { ActorDirectoryReport } from "../schema/person";
|
|
2
2
|
/** Load the people list from verified user identities in SQL. */
|
|
3
3
|
export declare function readPeopleList(): Promise<ActorDirectoryReport>;
|
|
4
|
-
/** Serve the People directory endpoint. */
|
|
5
|
-
declare const _default: import("../route").ApiRoute<import("zod").ZodObject<{
|
|
6
|
-
activityDays: import("zod").ZodArray<import("zod").ZodObject<{
|
|
7
|
-
activePeople: import("zod").ZodNumber;
|
|
8
|
-
conversations: import("zod").ZodNumber;
|
|
9
|
-
date: import("zod").ZodString;
|
|
10
|
-
}, import("zod/v4/core").$strict>>;
|
|
11
|
-
generatedAt: import("zod").ZodString;
|
|
12
|
-
people: import("zod").ZodArray<import("zod").ZodObject<{
|
|
13
|
-
active: import("zod").ZodNumber;
|
|
14
|
-
activeDays: import("zod").ZodNumber;
|
|
15
|
-
conversations: import("zod").ZodNumber;
|
|
16
|
-
durationMs: import("zod").ZodNumber;
|
|
17
|
-
failed: import("zod").ZodNumber;
|
|
18
|
-
tokens: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
19
|
-
firstSeenAt: import("zod").ZodString;
|
|
20
|
-
lastSeenAt: import("zod").ZodString;
|
|
21
|
-
actor: import("zod").ZodObject<{
|
|
22
|
-
fullName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
23
|
-
slackUserId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
24
|
-
slackUserName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
25
|
-
email: import("zod").ZodString;
|
|
26
|
-
}, import("zod/v4/core").$strict>;
|
|
27
|
-
}, import("zod/v4/core").$strict>>;
|
|
28
|
-
source: import("zod").ZodLiteral<"conversation_index">;
|
|
29
|
-
windowEnd: import("zod").ZodString;
|
|
30
|
-
windowStart: import("zod").ZodString;
|
|
31
|
-
}, import("zod/v4/core").$strict>>;
|
|
32
|
-
export default _default;
|
|
@@ -1,110 +1,6 @@
|
|
|
1
|
+
import type { User } from "@sentry/junior-plugin-api";
|
|
1
2
|
import type { ActorProfileReport } from "../schema/person";
|
|
2
3
|
/** Load one person profile from verified user identities in SQL. */
|
|
3
4
|
export declare function readPeopleProfile(email: string, options?: {
|
|
4
|
-
|
|
5
|
+
viewer?: User;
|
|
5
6
|
}): Promise<ActorProfileReport>;
|
|
6
|
-
/** Serve one People profile endpoint. */
|
|
7
|
-
declare const _default: import("../route").ApiRoute<import("zod").ZodObject<{
|
|
8
|
-
activityDays: import("zod").ZodArray<import("zod").ZodObject<{
|
|
9
|
-
active: import("zod").ZodNumber;
|
|
10
|
-
conversations: import("zod").ZodNumber;
|
|
11
|
-
costUsd: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
12
|
-
date: import("zod").ZodString;
|
|
13
|
-
durationMs: import("zod").ZodNumber;
|
|
14
|
-
failed: import("zod").ZodNumber;
|
|
15
|
-
tokens: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
16
|
-
}, import("zod/v4/core").$strict>>;
|
|
17
|
-
generatedAt: import("zod").ZodString;
|
|
18
|
-
locations: import("zod").ZodArray<import("zod").ZodObject<{
|
|
19
|
-
label: import("zod").ZodString;
|
|
20
|
-
failed: import("zod").ZodNumber;
|
|
21
|
-
durationMs: import("zod").ZodNumber;
|
|
22
|
-
active: import("zod").ZodNumber;
|
|
23
|
-
conversations: import("zod").ZodNumber;
|
|
24
|
-
tokens: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
25
|
-
}, import("zod/v4/core").$strict>>;
|
|
26
|
-
recentConversations: import("zod").ZodArray<import("zod").ZodObject<{
|
|
27
|
-
displayTitle: import("zod").ZodString;
|
|
28
|
-
cumulativeDurationMs: import("zod").ZodNumber;
|
|
29
|
-
cumulativeUsage: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
30
|
-
inputTokens: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
31
|
-
outputTokens: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
32
|
-
cachedInputTokens: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
33
|
-
cacheCreationTokens: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
34
|
-
reasoningTokens: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
35
|
-
totalTokens: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
36
|
-
cost: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
37
|
-
input: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
38
|
-
output: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
39
|
-
cacheRead: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
40
|
-
cacheWrite: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
41
|
-
total: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
42
|
-
}, import("zod/v4/core").$strict>>;
|
|
43
|
-
}, import("zod/v4/core").$strict>>;
|
|
44
|
-
auxiliaryCosts: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
45
|
-
costUsd: import("zod").ZodNumber;
|
|
46
|
-
operations: import("zod").ZodArray<import("zod").ZodObject<{
|
|
47
|
-
costUsd: import("zod").ZodNumber;
|
|
48
|
-
events: import("zod").ZodNumber;
|
|
49
|
-
name: import("zod").ZodString;
|
|
50
|
-
namespace: import("zod").ZodString;
|
|
51
|
-
}, import("zod/v4/core").$strict>>;
|
|
52
|
-
}, import("zod/v4/core").$strict>>;
|
|
53
|
-
conversationId: import("zod").ZodString;
|
|
54
|
-
isParticipant: import("zod").ZodBoolean;
|
|
55
|
-
status: import("zod").ZodEnum<{
|
|
56
|
-
completed: "completed";
|
|
57
|
-
failed: "failed";
|
|
58
|
-
active: "active";
|
|
59
|
-
}>;
|
|
60
|
-
startedAt: import("zod").ZodString;
|
|
61
|
-
lastSeenAt: import("zod").ZodString;
|
|
62
|
-
lastProgressAt: import("zod").ZodString;
|
|
63
|
-
surface: import("zod").ZodEnum<{
|
|
64
|
-
slack: "slack";
|
|
65
|
-
api: "api";
|
|
66
|
-
internal: "internal";
|
|
67
|
-
scheduler: "scheduler";
|
|
68
|
-
}>;
|
|
69
|
-
actorIdentity: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
70
|
-
email: import("zod").ZodOptional<import("zod").ZodString>;
|
|
71
|
-
fullName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
72
|
-
slackUserId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
73
|
-
slackUserName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
74
|
-
}, import("zod/v4/core").$strict>>;
|
|
75
|
-
archivedAt: import("zod").ZodOptional<import("zod").ZodString>;
|
|
76
|
-
channel: import("zod").ZodOptional<import("zod").ZodString>;
|
|
77
|
-
channelName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
78
|
-
channelNameRedacted: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
79
|
-
locationId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
80
|
-
sentryTraceUrl: import("zod").ZodOptional<import("zod").ZodString>;
|
|
81
|
-
sourceUrl: import("zod").ZodOptional<import("zod").ZodString>;
|
|
82
|
-
traceId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
83
|
-
}, import("zod/v4/core").$strict>>;
|
|
84
|
-
actor: import("zod").ZodObject<{
|
|
85
|
-
fullName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
86
|
-
slackUserId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
87
|
-
slackUserName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
88
|
-
email: import("zod").ZodString;
|
|
89
|
-
}, import("zod/v4/core").$strict>;
|
|
90
|
-
source: import("zod").ZodLiteral<"conversation_index">;
|
|
91
|
-
surfaces: import("zod").ZodArray<import("zod").ZodObject<{
|
|
92
|
-
label: import("zod").ZodString;
|
|
93
|
-
failed: import("zod").ZodNumber;
|
|
94
|
-
durationMs: import("zod").ZodNumber;
|
|
95
|
-
active: import("zod").ZodNumber;
|
|
96
|
-
conversations: import("zod").ZodNumber;
|
|
97
|
-
tokens: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
98
|
-
}, import("zod/v4/core").$strict>>;
|
|
99
|
-
totals: import("zod").ZodObject<{
|
|
100
|
-
active: import("zod").ZodNumber;
|
|
101
|
-
activeDays: import("zod").ZodNumber;
|
|
102
|
-
conversations: import("zod").ZodNumber;
|
|
103
|
-
durationMs: import("zod").ZodNumber;
|
|
104
|
-
failed: import("zod").ZodNumber;
|
|
105
|
-
tokens: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
106
|
-
}, import("zod/v4/core").$strict>;
|
|
107
|
-
windowEnd: import("zod").ZodString;
|
|
108
|
-
windowStart: import("zod").ZodString;
|
|
109
|
-
}, import("zod/v4/core").$strict>>;
|
|
110
|
-
export default _default;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { User } from "@sentry/junior-plugin-api";
|
|
1
2
|
import type { ActorProfileReport } from "../schema/person";
|
|
2
3
|
/** Load one complete person profile while bounding only its recent-conversation list. */
|
|
3
4
|
export declare function readPeopleProfileFromSql(email: string, options?: {
|
|
4
|
-
|
|
5
|
+
viewer?: User;
|
|
5
6
|
}): Promise<ActorProfileReport>;
|
|
@@ -1267,9 +1267,9 @@ export declare function activityDays(days: Map<string, ActorActivityDayReport>,
|
|
|
1267
1267
|
export declare function statsItems(map: Map<string, ConversationStatsItem>): {
|
|
1268
1268
|
label: string;
|
|
1269
1269
|
failed: number;
|
|
1270
|
-
durationMs: number;
|
|
1271
1270
|
active: number;
|
|
1272
1271
|
conversations: number;
|
|
1272
|
+
durationMs: number;
|
|
1273
1273
|
tokens?: number | undefined;
|
|
1274
1274
|
}[];
|
|
1275
1275
|
/** Build the verified Slack actor predicate shared by People aggregate and recent-row queries. */
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare function createPersonalSpendRoute(): ApiRoute<typeof personalSpendReportSchema>;
|
|
1
|
+
import type { PersonalSpendReport } from "../schema/person";
|
|
2
|
+
/** Create an app-scoped personal-spend reader with a five-minute cache. */
|
|
3
|
+
export declare function createPersonalSpendReader(): (email: string) => Promise<PersonalSpendReport>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Hono } from "hono";
|
|
2
|
-
import {
|
|
3
|
-
/** Create
|
|
2
|
+
import type { JuniorApiEnv } from "../route";
|
|
3
|
+
/** Create authenticated native personal-token list and action routes. */
|
|
4
4
|
export declare function createPersonalTokenRoutes(): Hono<JuniorApiEnv>;
|
package/dist/api/route.d.ts
CHANGED
|
@@ -1,21 +1,15 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import { z } from "zod";
|
|
1
|
+
import type { User } from "@sentry/junior-plugin-api";
|
|
3
2
|
/** Authenticated viewer fields made available to Junior API route handlers. */
|
|
4
3
|
export type JuniorApiVariables = {
|
|
5
|
-
|
|
4
|
+
viewer?: User;
|
|
6
5
|
};
|
|
7
|
-
/** Carry
|
|
6
|
+
/** Carry optional viewer state through Junior REST route handlers. */
|
|
8
7
|
export type JuniorApiEnv = {
|
|
9
8
|
Variables: JuniorApiVariables;
|
|
10
9
|
};
|
|
11
|
-
/**
|
|
12
|
-
export type
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
responseSchema: TResponseSchema;
|
|
10
|
+
/** Give authenticated route handlers a required canonical viewer. */
|
|
11
|
+
export type AuthenticatedApiEnv = {
|
|
12
|
+
Variables: Omit<JuniorApiVariables, "viewer"> & {
|
|
13
|
+
viewer: User;
|
|
14
|
+
};
|
|
17
15
|
};
|
|
18
|
-
/** Define a REST endpoint while preserving its response-schema type. */
|
|
19
|
-
export declare function defineApiRoute<TResponseSchema extends z.ZodType>(route: ApiRoute<TResponseSchema>): ApiRoute<TResponseSchema>;
|
|
20
|
-
/** Register schema-owned routes on one Hono application. */
|
|
21
|
-
export declare function registerApiRoutes(app: Hono<JuniorApiEnv>, routes: readonly ApiRoute[]): void;
|