skedyul 0.2.76 → 0.2.78
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/.build-stamp +1 -1
- package/dist/schemas.d.ts +12 -0
- package/dist/schemas.js +4 -1
- package/dist/server.js +2 -0
- package/dist/types.d.ts +13 -0
- package/package.json +1 -1
package/dist/.build-stamp
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
1769647968803
|
package/dist/schemas.d.ts
CHANGED
|
@@ -2677,6 +2677,10 @@ export declare const WebhookHttpMethodSchema: z.ZodEnum<{
|
|
|
2677
2677
|
DELETE: "DELETE";
|
|
2678
2678
|
PATCH: "PATCH";
|
|
2679
2679
|
}>;
|
|
2680
|
+
export declare const WebhookTypeSchema: z.ZodEnum<{
|
|
2681
|
+
WEBHOOK: "WEBHOOK";
|
|
2682
|
+
CALLBACK: "CALLBACK";
|
|
2683
|
+
}>;
|
|
2680
2684
|
export declare const WebhookHandlerDefinitionSchema: z.ZodObject<{
|
|
2681
2685
|
description: z.ZodOptional<z.ZodString>;
|
|
2682
2686
|
methods: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
@@ -2686,6 +2690,10 @@ export declare const WebhookHandlerDefinitionSchema: z.ZodObject<{
|
|
|
2686
2690
|
DELETE: "DELETE";
|
|
2687
2691
|
PATCH: "PATCH";
|
|
2688
2692
|
}>>>;
|
|
2693
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
2694
|
+
WEBHOOK: "WEBHOOK";
|
|
2695
|
+
CALLBACK: "CALLBACK";
|
|
2696
|
+
}>>;
|
|
2689
2697
|
handler: z.ZodUnknown;
|
|
2690
2698
|
}, z.core.$strip>;
|
|
2691
2699
|
export declare const WebhooksSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
@@ -2697,6 +2705,10 @@ export declare const WebhooksSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
2697
2705
|
DELETE: "DELETE";
|
|
2698
2706
|
PATCH: "PATCH";
|
|
2699
2707
|
}>>>;
|
|
2708
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
2709
|
+
WEBHOOK: "WEBHOOK";
|
|
2710
|
+
CALLBACK: "CALLBACK";
|
|
2711
|
+
}>>;
|
|
2700
2712
|
handler: z.ZodUnknown;
|
|
2701
2713
|
}, z.core.$strip>>;
|
|
2702
2714
|
export declare const ProvisionConfigSchema: z.ZodObject<{
|
package/dist/schemas.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ListItemTemplateSchema = exports.FileSettingComponentDefinitionSchema = exports.ImageSettingComponentDefinitionSchema = exports.TimePickerComponentDefinitionSchema = exports.DatePickerComponentDefinitionSchema = exports.CheckboxComponentDefinitionSchema = exports.ComboboxComponentDefinitionSchema = exports.SelectComponentDefinitionSchema = exports.TextareaComponentDefinitionSchema = exports.InputComponentDefinitionSchema = exports.FormLayoutConfigDefinitionSchema = exports.FormLayoutRowDefinitionSchema = exports.FormLayoutColumnDefinitionSchema = exports.RelationshipExtensionSchema = exports.FieldSettingButtonPropsSchema = exports.FormV2StylePropsSchema = exports.PageActionDefinitionSchema = exports.PageFormHeaderSchema = exports.PageFieldSourceSchema = exports.PageFieldTypeSchema = exports.PageBlockTypeSchema = exports.PageTypeSchema = exports.WorkflowDefinitionSchema = exports.WorkflowActionSchema = exports.WorkflowActionInputSchema = exports.ChannelDefinitionSchema = exports.ChannelIdentifierFieldSchema = exports.ChannelCapabilitySchema = exports.ChannelCapabilityTypeSchema = exports.RelationshipDefinitionSchema = exports.RelationshipLinkSchema = exports.OnDeleteBehaviorSchema = exports.RelationshipCardinalitySchema = exports.ModelDefinitionSchema = exports.ModelFieldDefinitionSchema = exports.AppFieldVisibilitySchema = exports.InlineFieldDefinitionSchema = exports.FieldOptionSchema = exports.FieldDataTypeSchema = exports.ResourceDependencySchema = exports.WorkflowDependencySchema = exports.ChannelDependencySchema = exports.ModelDependencySchema = exports.StructuredFilterSchema = exports.FieldOwnerSchema = exports.ResourceScopeSchema = exports.ComputeLayerTypeSchema = exports.EnvSchemaSchema = exports.EnvVariableDefinitionSchema = exports.EnvVisibilitySchema = void 0;
|
|
4
|
-
exports.SkedyulConfigSchema = exports.ProvisionConfigSchema = exports.WebhooksSchema = exports.WebhookHandlerDefinitionSchema = exports.WebhookHttpMethodSchema = exports.PageDefinitionSchema = exports.NavigationConfigSchema = exports.NavigationBreadcrumbSchema = exports.BreadcrumbItemSchema = exports.NavigationSidebarSchema = exports.NavigationSectionSchema = exports.NavigationItemSchema = exports.PageInstanceFilterSchema = exports.PageContextDefinitionSchema = exports.PageContextItemDefinitionSchema = exports.PageContextFiltersSchema = exports.PageContextModeSchema = exports.PageBlockDefinitionSchema = exports.ListBlockDefinitionSchema = exports.LegacyFormBlockDefinitionSchema = exports.PageFieldDefinitionSchema = exports.CardBlockDefinitionSchema = exports.CardBlockHeaderSchema = exports.FormV2PropsDefinitionSchema = exports.FormV2ComponentDefinitionSchema = exports.FieldSettingComponentDefinitionSchema = exports.ModalFormDefinitionSchema = exports.AlertComponentDefinitionSchema = exports.EmptyFormComponentDefinitionSchema = exports.ListComponentDefinitionSchema = void 0;
|
|
4
|
+
exports.SkedyulConfigSchema = exports.ProvisionConfigSchema = exports.WebhooksSchema = exports.WebhookHandlerDefinitionSchema = exports.WebhookTypeSchema = exports.WebhookHttpMethodSchema = exports.PageDefinitionSchema = exports.NavigationConfigSchema = exports.NavigationBreadcrumbSchema = exports.BreadcrumbItemSchema = exports.NavigationSidebarSchema = exports.NavigationSectionSchema = exports.NavigationItemSchema = exports.PageInstanceFilterSchema = exports.PageContextDefinitionSchema = exports.PageContextItemDefinitionSchema = exports.PageContextFiltersSchema = exports.PageContextModeSchema = exports.PageBlockDefinitionSchema = exports.ListBlockDefinitionSchema = exports.LegacyFormBlockDefinitionSchema = exports.PageFieldDefinitionSchema = exports.CardBlockDefinitionSchema = exports.CardBlockHeaderSchema = exports.FormV2PropsDefinitionSchema = exports.FormV2ComponentDefinitionSchema = exports.FieldSettingComponentDefinitionSchema = exports.ModalFormDefinitionSchema = exports.AlertComponentDefinitionSchema = exports.EmptyFormComponentDefinitionSchema = exports.ListComponentDefinitionSchema = void 0;
|
|
5
5
|
exports.safeParseConfig = safeParseConfig;
|
|
6
6
|
exports.isModelDependency = isModelDependency;
|
|
7
7
|
exports.isChannelDependency = isChannelDependency;
|
|
@@ -624,9 +624,12 @@ exports.PageDefinitionSchema = zod_1.z.object({
|
|
|
624
624
|
// Webhook Schemas
|
|
625
625
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
626
626
|
exports.WebhookHttpMethodSchema = zod_1.z.enum(['GET', 'POST', 'PUT', 'DELETE', 'PATCH']);
|
|
627
|
+
exports.WebhookTypeSchema = zod_1.z.enum(['WEBHOOK', 'CALLBACK']);
|
|
627
628
|
exports.WebhookHandlerDefinitionSchema = zod_1.z.object({
|
|
628
629
|
description: zod_1.z.string().optional(),
|
|
629
630
|
methods: zod_1.z.array(exports.WebhookHttpMethodSchema).optional(),
|
|
631
|
+
/** Invocation type: WEBHOOK (fire-and-forget) or CALLBACK (waits for response). Defaults to WEBHOOK. */
|
|
632
|
+
type: exports.WebhookTypeSchema.optional(),
|
|
630
633
|
handler: zod_1.z.unknown(),
|
|
631
634
|
});
|
|
632
635
|
exports.WebhooksSchema = zod_1.z.record(zod_1.z.string(), exports.WebhookHandlerDefinitionSchema);
|
package/dist/server.js
CHANGED
|
@@ -897,6 +897,7 @@ function createDedicatedServerInstance(config, tools, callTool, state, mcpServer
|
|
|
897
897
|
name: w.name,
|
|
898
898
|
description: w.description,
|
|
899
899
|
methods: w.methods ?? ['POST'],
|
|
900
|
+
type: w.type ?? 'WEBHOOK',
|
|
900
901
|
}))
|
|
901
902
|
: [];
|
|
902
903
|
sendJSON(res, 200, {
|
|
@@ -1352,6 +1353,7 @@ function createServerlessInstance(config, tools, callTool, state, mcpServer, reg
|
|
|
1352
1353
|
name: w.name,
|
|
1353
1354
|
description: w.description,
|
|
1354
1355
|
methods: w.methods ?? ['POST'],
|
|
1356
|
+
type: w.type ?? 'WEBHOOK',
|
|
1355
1357
|
}))
|
|
1356
1358
|
: [];
|
|
1357
1359
|
result = { webhooks };
|
package/dist/types.d.ts
CHANGED
|
@@ -273,11 +273,22 @@ export interface WebhookLifecycleResult {
|
|
|
273
273
|
* (user must configure manually).
|
|
274
274
|
*/
|
|
275
275
|
export type WebhookLifecycleHook<TContext = WebhookLifecycleContext> = (context: TContext) => Promise<WebhookLifecycleResult | null | undefined> | WebhookLifecycleResult | null | undefined;
|
|
276
|
+
/**
|
|
277
|
+
* Webhook invocation type - determines how responses are handled.
|
|
278
|
+
* - WEBHOOK: Fire-and-forget. Returns 200 immediately, processes asynchronously.
|
|
279
|
+
* - CALLBACK: Waits for handler response and returns it to the caller (e.g., Twilio TwiML).
|
|
280
|
+
*/
|
|
281
|
+
export type WebhookType = 'WEBHOOK' | 'CALLBACK';
|
|
276
282
|
export interface WebhookDefinition {
|
|
277
283
|
name: string;
|
|
278
284
|
description: string;
|
|
279
285
|
/** HTTP methods this webhook accepts. Defaults to ['POST'] */
|
|
280
286
|
methods?: ('GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH')[];
|
|
287
|
+
/**
|
|
288
|
+
* Invocation type. Defaults to 'WEBHOOK' (fire-and-forget).
|
|
289
|
+
* Use 'CALLBACK' when the caller expects the handler's response (e.g., Twilio TwiML).
|
|
290
|
+
*/
|
|
291
|
+
type?: WebhookType;
|
|
281
292
|
handler: WebhookHandler;
|
|
282
293
|
/** Called when the app is installed to a workplace. Return null if manual setup required. */
|
|
283
294
|
onAppInstalled?: WebhookLifecycleHook;
|
|
@@ -300,4 +311,6 @@ export interface WebhookMetadata {
|
|
|
300
311
|
name: string;
|
|
301
312
|
description: string;
|
|
302
313
|
methods: string[];
|
|
314
|
+
/** Invocation type: WEBHOOK (fire-and-forget) or CALLBACK (waits for response). */
|
|
315
|
+
type: WebhookType;
|
|
303
316
|
}
|