@sentry/junior-plugin-api 0.77.0 → 0.79.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/hooks.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { EgressHookContext, EgressResponseHookContext, IssueCredentialHookContext, PluginCredentialResult, PluginGrant, PluginProviderAccount, ResolveOAuthAccountHookContext } from "./credentials";
2
- import type { HeartbeatHookContext, HeartbeatResult, OperationalReportHookContext, PluginOperationalReportContent, PluginRoute, RouteRegistrationHookContext, SlackConversationLink, SlackConversationLinkHookContext, StorageMigrationContext, StorageMigrationResult } from "./operations";
2
+ import type { HeartbeatHookContext, HeartbeatResult, OperationalReportHookContext, DashboardRouteRegistrationHookContext, PluginOperationalReportContent, PluginRoute, PluginRouteApp, RouteRegistrationHookContext, SlackConversationLink, SlackConversationLinkHookContext, StorageMigrationContext, StorageMigrationResult } from "./operations";
3
3
  import type { BeforeToolExecuteHookContext, PluginToolDefinition, SandboxPrepareHookContext, ToolRegistrationHookContext } from "./tools";
4
4
  import type { PromptMessage, SystemPromptContext, UserPromptContext } from "./prompt";
5
5
  export interface PluginHooks {
@@ -11,6 +11,7 @@ export interface PluginHooks {
11
11
  issueCredential?(ctx: IssueCredentialHookContext): Promise<PluginCredentialResult> | PluginCredentialResult;
12
12
  onEgressResponse?(ctx: EgressResponseHookContext): Promise<void> | void;
13
13
  operationalReport?(ctx: OperationalReportHookContext): Promise<PluginOperationalReportContent | undefined> | PluginOperationalReportContent | undefined;
14
+ dashboardRoutes?(ctx: DashboardRouteRegistrationHookContext): PluginRouteApp | undefined;
14
15
  resolveOAuthAccount?(ctx: ResolveOAuthAccountHookContext): Promise<PluginProviderAccount | undefined> | PluginProviderAccount | undefined;
15
16
  routes?(ctx: RouteRegistrationHookContext): PluginRoute[];
16
17
  sandboxPrepare?(ctx: SandboxPrepareHookContext): Promise<void> | void;
@@ -81,8 +81,13 @@ export interface PluginRoute {
81
81
  method?: PluginRouteMethod | PluginRouteMethod[];
82
82
  path: string;
83
83
  }
84
+ export type PluginRouteApp = {
85
+ fetch(request: Request): Promise<Response> | Response;
86
+ };
84
87
  export interface RouteRegistrationHookContext extends PluginContext {
85
88
  }
89
+ export interface DashboardRouteRegistrationHookContext extends PluginContext {
90
+ }
86
91
  export interface SlackConversationLink {
87
92
  url: string;
88
93
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/junior-plugin-api",
3
- "version": "0.77.0",
3
+ "version": "0.79.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
package/src/hooks.ts CHANGED
@@ -11,8 +11,10 @@ import type {
11
11
  HeartbeatHookContext,
12
12
  HeartbeatResult,
13
13
  OperationalReportHookContext,
14
+ DashboardRouteRegistrationHookContext,
14
15
  PluginOperationalReportContent,
15
16
  PluginRoute,
17
+ PluginRouteApp,
16
18
  RouteRegistrationHookContext,
17
19
  SlackConversationLink,
18
20
  SlackConversationLinkHookContext,
@@ -55,6 +57,9 @@ export interface PluginHooks {
55
57
  | Promise<PluginOperationalReportContent | undefined>
56
58
  | PluginOperationalReportContent
57
59
  | undefined;
60
+ dashboardRoutes?(
61
+ ctx: DashboardRouteRegistrationHookContext,
62
+ ): PluginRouteApp | undefined;
58
63
  resolveOAuthAccount?(
59
64
  ctx: ResolveOAuthAccountHookContext,
60
65
  ):
package/src/operations.ts CHANGED
@@ -113,8 +113,14 @@ export interface PluginRoute {
113
113
  path: string;
114
114
  }
115
115
 
116
+ export type PluginRouteApp = {
117
+ fetch(request: Request): Promise<Response> | Response;
118
+ };
119
+
116
120
  export interface RouteRegistrationHookContext extends PluginContext {}
117
121
 
122
+ export interface DashboardRouteRegistrationHookContext extends PluginContext {}
123
+
118
124
  export interface SlackConversationLink {
119
125
  url: string;
120
126
  }