skedyul 1.2.21 → 1.2.23

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.
@@ -1,19 +1,12 @@
1
1
  import type { WebhookRequest } from './webhook';
2
2
  import type { InvocationContext } from './invocation';
3
+ import type { AppInfoWithHandles, AppInfo, WorkplaceInfo } from './shared';
3
4
  import type { ContextLogger } from '../server/logger';
4
5
  export interface InstallHandlerContext {
5
6
  env: Record<string, string>;
6
- workplace: {
7
- id: string;
8
- subdomain: string;
9
- };
7
+ workplace: WorkplaceInfo;
10
8
  appInstallationId: string;
11
- app: {
12
- id: string;
13
- versionId: string;
14
- handle: string;
15
- versionHandle: string;
16
- };
9
+ app: AppInfoWithHandles;
17
10
  /** Invocation context for log traceability */
18
11
  invocation?: InvocationContext;
19
12
  /** Context-aware logger that automatically includes invocation context */
@@ -34,17 +27,9 @@ export type InstallHandlerResult<Hooks extends ServerHooks = ServerHooks> = HasO
34
27
  export type InstallHandler<Hooks extends ServerHooks = ServerHooks> = (ctx: InstallHandlerContext) => Promise<InstallHandlerResult<Hooks>>;
35
28
  export interface UninstallHandlerContext {
36
29
  env: Record<string, string>;
37
- workplace: {
38
- id: string;
39
- subdomain: string;
40
- };
30
+ workplace: WorkplaceInfo;
41
31
  appInstallationId: string;
42
- app: {
43
- id: string;
44
- versionId: string;
45
- handle: string;
46
- versionHandle: string;
47
- };
32
+ app: AppInfoWithHandles;
48
33
  /** Invocation context for log traceability */
49
34
  invocation?: InvocationContext;
50
35
  /** Context-aware logger that automatically includes invocation context */
@@ -69,10 +54,7 @@ export interface OAuthCallbackResult {
69
54
  export type OAuthCallbackHandler = (ctx: OAuthCallbackContext) => Promise<OAuthCallbackResult>;
70
55
  export interface ProvisionHandlerContext {
71
56
  env: Record<string, string>;
72
- app: {
73
- id: string;
74
- versionId: string;
75
- };
57
+ app: AppInfo;
76
58
  /** Invocation context for log traceability */
77
59
  invocation?: InvocationContext;
78
60
  /** Context-aware logger that automatically includes invocation context */
@@ -4,16 +4,16 @@
4
4
  * This maintains backward compatibility while organizing types
5
5
  * into smaller, focused modules.
6
6
  */
7
- export type { AppInfo, WorkplaceInfo, RequestInfo } from './shared';
7
+ export type { AppInfo, AppInfoWithHandles, WorkplaceInfo, RequestInfo } from './shared';
8
8
  export type { InvocationType, ServerHookHandle, InvocationContext, } from './invocation';
9
9
  export { createToolCallContext, createServerHookContext, createWebhookContext, createWorkflowStepContext, } from './invocation';
10
10
  export type { ToolTrigger, ProvisionToolContext, FieldChangeToolContext, PageActionToolContext, FormSubmitToolContext, AgentToolContext, WorkflowToolContext, ToolExecutionContext, } from './tool-context';
11
11
  export { isProvisionContext, isRuntimeContext } from './tool-context';
12
- export type { ProvisionToolInput, BillingInfo, ToolResponseMeta, ToolEffect, ToolError, ToolExecutionResult, ToolSchemaWithJson, ToolSchema, ToolHandler, ToolDefinition, ToolRegistryEntry, ToolRegistry, ToolName, ToolMetadata, ToolCallResponse, } from './tool';
12
+ export type { BillingInfo, ToolResponseMeta, ToolEffect, ToolError, ToolExecutionResult, ToolSchemaWithJson, ToolSchema, ToolHandler, ToolDefinition, ToolRegistryEntry, ToolRegistry, ToolName, ToolMetadata, ToolCallResponse, } from './tool';
13
13
  export { ToolResponseMetaSchema } from './tool';
14
14
  export type { HealthStatus, ComputeLayer, DedicatedServerInstance, ServerlessServerInstance, SkedyulServerInstance, } from './server';
15
15
  export type { InstallHandlerContext, InstallHandlerResponseOAuth, InstallHandlerResponseStandard, HasOAuthCallback, InstallHandlerResult, InstallHandler, UninstallHandlerContext, UninstallHandlerResult, UninstallHandler, OAuthCallbackContext, OAuthCallbackResult, OAuthCallbackHandler, ProvisionHandlerContext, ProvisionHandlerResult, ProvisionHandler, ServerHooksWithOAuth, ServerHooksWithoutOAuth, ServerHooks, } from './handlers';
16
16
  export type { APIGatewayProxyEvent, APIGatewayProxyResult } from './aws';
17
- export type { HandlerRawRequest, WebhookRequest, WebhookResponse, ProvisionWebhookContext, RuntimeWebhookContext, WebhookContext, WebhookHandler, WebhookLifecycleContext, CommunicationChannelLifecycleContext, WebhookLifecycleResult, WebhookLifecycleHook, WebhookType, WebhookDefinition, WebhookRegistry, WebhookName, WebhookMetadata, } from './webhook';
17
+ export type { WebhookWireRequest, HandlerRawRequest, WebhookRequest, WebhookResponse, ProvisionWebhookContext, RuntimeWebhookContext, WebhookContext, WebhookHandler, WebhookLifecycleContext, CommunicationChannelLifecycleContext, WebhookLifecycleResult, WebhookLifecycleHook, WebhookInvocationMode, WebhookType, WebhookDefinition, WebhookRegistry, WebhookName, WebhookMetadata, } from './webhook';
18
18
  export { isRuntimeWebhookContext } from './webhook';
19
19
  export type { MCPError, MCPContentItem, MCPResult, MCPResponse, MCPRequest, } from './mcp-protocol';
@@ -1,5 +1,5 @@
1
1
  import type { APIGatewayProxyEvent, APIGatewayProxyResult } from './aws';
2
- import type { ComputeLayer } from '../config/types/compute';
2
+ import type { ComputeLayer } from '../config/types/base';
3
3
  export interface HealthStatus {
4
4
  status: 'running';
5
5
  requests: number;
@@ -3,6 +3,11 @@ export interface AppInfo {
3
3
  id: string;
4
4
  versionId: string;
5
5
  }
6
+ /** Extended app info with handles - present in install/uninstall contexts */
7
+ export interface AppInfoWithHandles extends AppInfo {
8
+ handle: string;
9
+ versionHandle: string;
10
+ }
6
11
  /** Workplace info - present in runtime contexts */
7
12
  export interface WorkplaceInfo {
8
13
  id: string;
@@ -91,10 +91,8 @@ export interface ToolMetadata {
91
91
  /** Maximum retry attempts. Defaults to 1 (no retries) if not specified. */
92
92
  retries?: number;
93
93
  }
94
- export interface ToolCallResponse {
95
- output: unknown | null;
96
- billing: BillingInfo;
97
- meta: ToolResponseMeta;
98
- error?: ToolError | null;
99
- effect?: ToolEffect;
100
- }
94
+ /**
95
+ * Response from a tool call.
96
+ * Alias for ToolExecutionResult<unknown> for backwards compatibility.
97
+ */
98
+ export type ToolCallResponse = ToolExecutionResult<unknown>;
@@ -6,7 +6,7 @@ import type { ContextLogger } from '../server/logger';
6
6
  * This is the wire format used by both webhooks and OAuth callbacks.
7
7
  * It gets converted to the rich WebhookRequest type at parse time.
8
8
  */
9
- export interface HandlerRawRequest {
9
+ export interface WebhookWireRequest {
10
10
  method: string;
11
11
  url: string;
12
12
  path: string;
@@ -14,6 +14,10 @@ export interface HandlerRawRequest {
14
14
  query: Record<string, string>;
15
15
  body: string;
16
16
  }
17
+ /**
18
+ * @deprecated Use WebhookWireRequest instead.
19
+ */
20
+ export type HandlerRawRequest = WebhookWireRequest;
17
21
  /** Raw HTTP request received by webhooks */
18
22
  export interface WebhookRequest {
19
23
  method: string;
@@ -87,21 +91,25 @@ export interface WebhookLifecycleResult {
87
91
  */
88
92
  export type WebhookLifecycleHook<TContext = WebhookLifecycleContext> = (context: TContext) => Promise<WebhookLifecycleResult | null | undefined> | WebhookLifecycleResult | null | undefined;
89
93
  /**
90
- * Webhook invocation type - determines how responses are handled.
94
+ * Webhook invocation mode - determines how responses are handled.
91
95
  * - WEBHOOK: Fire-and-forget. Returns 200 immediately, processes asynchronously.
92
96
  * - CALLBACK: Waits for handler response and returns it to the caller (e.g., Twilio TwiML).
93
97
  */
94
- export type WebhookType = 'WEBHOOK' | 'CALLBACK';
98
+ export type WebhookInvocationMode = 'WEBHOOK' | 'CALLBACK';
99
+ /**
100
+ * @deprecated Use WebhookInvocationMode instead.
101
+ */
102
+ export type WebhookType = WebhookInvocationMode;
95
103
  export interface WebhookDefinition {
96
104
  name: string;
97
105
  description: string;
98
106
  /** HTTP methods this webhook accepts. Defaults to ['POST'] */
99
107
  methods?: ('GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH')[];
100
108
  /**
101
- * Invocation type. Defaults to 'WEBHOOK' (fire-and-forget).
109
+ * Invocation mode. Defaults to 'WEBHOOK' (fire-and-forget).
102
110
  * Use 'CALLBACK' when the caller expects the handler's response (e.g., Twilio TwiML).
103
111
  */
104
- type?: WebhookType;
112
+ type?: WebhookInvocationMode;
105
113
  handler: WebhookHandler;
106
114
  onAppInstalled?: WebhookLifecycleHook;
107
115
  onAppUninstalled?: WebhookLifecycleHook;
@@ -117,6 +125,6 @@ export interface WebhookMetadata {
117
125
  name: string;
118
126
  description: string;
119
127
  methods: string[];
120
- type: WebhookType;
128
+ type: WebhookInvocationMode;
121
129
  }
122
130
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skedyul",
3
- "version": "1.2.21",
3
+ "version": "1.2.23",
4
4
  "description": "The Skedyul SDK for Node.js",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,9 +0,0 @@
1
- /**
2
- * Compute layer types.
3
- *
4
- * Re-exports ComputeLayer from base for backwards compatibility.
5
- */
6
- import type { ComputeLayer } from './base';
7
- export type { ComputeLayer };
8
- export type Serverless = 'serverless';
9
- export type Dedicated = 'dedicated';