skedyul 0.2.97 → 0.2.99
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/config.d.ts +12 -2
- package/dist/schemas.d.ts +78 -10
- package/dist/schemas.js +45 -2
- package/dist/types.d.ts +18 -1
- package/package.json +1 -1
package/dist/.build-stamp
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
1769738081259
|
package/dist/config.d.ts
CHANGED
|
@@ -648,6 +648,16 @@ export interface InstallConfig {
|
|
|
648
648
|
/** Tool name to invoke when app is uninstalled */
|
|
649
649
|
onUninstall?: string;
|
|
650
650
|
}
|
|
651
|
+
/**
|
|
652
|
+
* Configuration for a single webhook's provisioning lifecycle.
|
|
653
|
+
* Defines tools to invoke when the webhook is provisioned/deprovisioned.
|
|
654
|
+
*/
|
|
655
|
+
export interface WebhookProvisionConfig {
|
|
656
|
+
/** Tool name to invoke when webhook is provisioned */
|
|
657
|
+
onProvision?: string;
|
|
658
|
+
/** Tool name to invoke when webhook is deprovisioned */
|
|
659
|
+
onDeprovision?: string;
|
|
660
|
+
}
|
|
651
661
|
/** Provision-level configuration - auto-synced when app version is deployed */
|
|
652
662
|
export interface ProvisionConfig {
|
|
653
663
|
/** Global environment variables (developer-level, shared across all installs) */
|
|
@@ -664,8 +674,8 @@ export interface ProvisionConfig {
|
|
|
664
674
|
navigation?: NavigationConfig;
|
|
665
675
|
/** Page definitions for app UI */
|
|
666
676
|
pages?: PageDefinition[];
|
|
667
|
-
/** Webhook handler
|
|
668
|
-
webhooks?: string
|
|
677
|
+
/** Webhook handler configs to auto-register at provision level */
|
|
678
|
+
webhooks?: Record<string, WebhookProvisionConfig>;
|
|
669
679
|
}
|
|
670
680
|
export interface SkedyulConfig {
|
|
671
681
|
/** App name */
|
package/dist/schemas.d.ts
CHANGED
|
@@ -524,9 +524,9 @@ export declare const InputComponentDefinitionSchema: z.ZodObject<{
|
|
|
524
524
|
helpText: z.ZodOptional<z.ZodString>;
|
|
525
525
|
type: z.ZodOptional<z.ZodEnum<{
|
|
526
526
|
number: "number";
|
|
527
|
-
email: "email";
|
|
528
527
|
hidden: "hidden";
|
|
529
528
|
text: "text";
|
|
529
|
+
email: "email";
|
|
530
530
|
password: "password";
|
|
531
531
|
tel: "tel";
|
|
532
532
|
url: "url";
|
|
@@ -839,9 +839,9 @@ export declare const FormV2ComponentDefinitionSchema: z.ZodDiscriminatedUnion<[z
|
|
|
839
839
|
helpText: z.ZodOptional<z.ZodString>;
|
|
840
840
|
type: z.ZodOptional<z.ZodEnum<{
|
|
841
841
|
number: "number";
|
|
842
|
-
email: "email";
|
|
843
842
|
hidden: "hidden";
|
|
844
843
|
text: "text";
|
|
844
|
+
email: "email";
|
|
845
845
|
password: "password";
|
|
846
846
|
tel: "tel";
|
|
847
847
|
url: "url";
|
|
@@ -1115,9 +1115,9 @@ export declare const FormV2PropsDefinitionSchema: z.ZodObject<{
|
|
|
1115
1115
|
helpText: z.ZodOptional<z.ZodString>;
|
|
1116
1116
|
type: z.ZodOptional<z.ZodEnum<{
|
|
1117
1117
|
number: "number";
|
|
1118
|
-
email: "email";
|
|
1119
1118
|
hidden: "hidden";
|
|
1120
1119
|
text: "text";
|
|
1120
|
+
email: "email";
|
|
1121
1121
|
password: "password";
|
|
1122
1122
|
tel: "tel";
|
|
1123
1123
|
url: "url";
|
|
@@ -1430,9 +1430,9 @@ export declare const CardBlockDefinitionSchema: z.ZodObject<{
|
|
|
1430
1430
|
helpText: z.ZodOptional<z.ZodString>;
|
|
1431
1431
|
type: z.ZodOptional<z.ZodEnum<{
|
|
1432
1432
|
number: "number";
|
|
1433
|
-
email: "email";
|
|
1434
1433
|
hidden: "hidden";
|
|
1435
1434
|
text: "text";
|
|
1435
|
+
email: "email";
|
|
1436
1436
|
password: "password";
|
|
1437
1437
|
tel: "tel";
|
|
1438
1438
|
url: "url";
|
|
@@ -1838,9 +1838,9 @@ export declare const PageBlockDefinitionSchema: z.ZodUnion<readonly [z.ZodObject
|
|
|
1838
1838
|
helpText: z.ZodOptional<z.ZodString>;
|
|
1839
1839
|
type: z.ZodOptional<z.ZodEnum<{
|
|
1840
1840
|
number: "number";
|
|
1841
|
-
email: "email";
|
|
1842
1841
|
hidden: "hidden";
|
|
1843
1842
|
text: "text";
|
|
1843
|
+
email: "email";
|
|
1844
1844
|
password: "password";
|
|
1845
1845
|
tel: "tel";
|
|
1846
1846
|
url: "url";
|
|
@@ -2327,9 +2327,9 @@ export declare const PageDefinitionSchema: z.ZodObject<{
|
|
|
2327
2327
|
helpText: z.ZodOptional<z.ZodString>;
|
|
2328
2328
|
type: z.ZodOptional<z.ZodEnum<{
|
|
2329
2329
|
number: "number";
|
|
2330
|
-
email: "email";
|
|
2331
2330
|
hidden: "hidden";
|
|
2332
2331
|
text: "text";
|
|
2332
|
+
email: "email";
|
|
2333
2333
|
password: "password";
|
|
2334
2334
|
tel: "tel";
|
|
2335
2335
|
url: "url";
|
|
@@ -2739,6 +2739,14 @@ export declare const WebhooksSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
2739
2739
|
}>>;
|
|
2740
2740
|
handler: z.ZodUnknown;
|
|
2741
2741
|
}, z.core.$strip>>;
|
|
2742
|
+
/**
|
|
2743
|
+
* Configuration for a single webhook's provisioning lifecycle.
|
|
2744
|
+
* Defines tools to invoke when the webhook is provisioned/deprovisioned.
|
|
2745
|
+
*/
|
|
2746
|
+
export declare const WebhookProvisionConfigSchema: z.ZodObject<{
|
|
2747
|
+
onProvision: z.ZodOptional<z.ZodString>;
|
|
2748
|
+
onDeprovision: z.ZodOptional<z.ZodString>;
|
|
2749
|
+
}, z.core.$strip>;
|
|
2742
2750
|
export declare const ProvisionConfigSchema: z.ZodObject<{
|
|
2743
2751
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
2744
2752
|
label: z.ZodString;
|
|
@@ -2988,9 +2996,9 @@ export declare const ProvisionConfigSchema: z.ZodObject<{
|
|
|
2988
2996
|
helpText: z.ZodOptional<z.ZodString>;
|
|
2989
2997
|
type: z.ZodOptional<z.ZodEnum<{
|
|
2990
2998
|
number: "number";
|
|
2991
|
-
email: "email";
|
|
2992
2999
|
hidden: "hidden";
|
|
2993
3000
|
text: "text";
|
|
3001
|
+
email: "email";
|
|
2994
3002
|
password: "password";
|
|
2995
3003
|
tel: "tel";
|
|
2996
3004
|
url: "url";
|
|
@@ -3359,7 +3367,10 @@ export declare const ProvisionConfigSchema: z.ZodObject<{
|
|
|
3359
3367
|
where: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3360
3368
|
}, z.core.$strip>>;
|
|
3361
3369
|
}, z.core.$strip>>>;
|
|
3362
|
-
webhooks: z.ZodOptional<z.
|
|
3370
|
+
webhooks: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
3371
|
+
onProvision: z.ZodOptional<z.ZodString>;
|
|
3372
|
+
onDeprovision: z.ZodOptional<z.ZodString>;
|
|
3373
|
+
}, z.core.$strip>>>;
|
|
3363
3374
|
}, z.core.$strip>;
|
|
3364
3375
|
export declare const SkedyulConfigSchema: z.ZodObject<{
|
|
3365
3376
|
name: z.ZodString;
|
|
@@ -3620,9 +3631,9 @@ export declare const SkedyulConfigSchema: z.ZodObject<{
|
|
|
3620
3631
|
helpText: z.ZodOptional<z.ZodString>;
|
|
3621
3632
|
type: z.ZodOptional<z.ZodEnum<{
|
|
3622
3633
|
number: "number";
|
|
3623
|
-
email: "email";
|
|
3624
3634
|
hidden: "hidden";
|
|
3625
3635
|
text: "text";
|
|
3636
|
+
email: "email";
|
|
3626
3637
|
password: "password";
|
|
3627
3638
|
tel: "tel";
|
|
3628
3639
|
url: "url";
|
|
@@ -3991,7 +4002,10 @@ export declare const SkedyulConfigSchema: z.ZodObject<{
|
|
|
3991
4002
|
where: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3992
4003
|
}, z.core.$strip>>;
|
|
3993
4004
|
}, z.core.$strip>>>;
|
|
3994
|
-
webhooks: z.ZodOptional<z.
|
|
4005
|
+
webhooks: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
4006
|
+
onProvision: z.ZodOptional<z.ZodString>;
|
|
4007
|
+
onDeprovision: z.ZodOptional<z.ZodString>;
|
|
4008
|
+
}, z.core.$strip>>>;
|
|
3995
4009
|
}, z.core.$strip>, z.ZodUnknown]>>;
|
|
3996
4010
|
}, z.core.$strip>;
|
|
3997
4011
|
export type ParsedSkedyulConfig = z.infer<typeof SkedyulConfigSchema>;
|
|
@@ -4051,6 +4065,60 @@ export type CardBlockHeader = z.infer<typeof CardBlockHeaderSchema>;
|
|
|
4051
4065
|
export type CardBlockDefinition = z.infer<typeof CardBlockDefinitionSchema>;
|
|
4052
4066
|
export type LegacyFormBlockDefinition = z.infer<typeof LegacyFormBlockDefinitionSchema>;
|
|
4053
4067
|
export type ListBlockDefinition = z.infer<typeof ListBlockDefinitionSchema>;
|
|
4068
|
+
export declare const MessageSendChannelSchema: z.ZodObject<{
|
|
4069
|
+
id: z.ZodString;
|
|
4070
|
+
handle: z.ZodString;
|
|
4071
|
+
identifierValue: z.ZodString;
|
|
4072
|
+
}, z.core.$strip>;
|
|
4073
|
+
export declare const MessageSendSubscriptionSchema: z.ZodObject<{
|
|
4074
|
+
id: z.ZodString;
|
|
4075
|
+
identifierValue: z.ZodString;
|
|
4076
|
+
}, z.core.$strip>;
|
|
4077
|
+
export declare const MessageSendContactSchema: z.ZodObject<{
|
|
4078
|
+
id: z.ZodString;
|
|
4079
|
+
name: z.ZodOptional<z.ZodString>;
|
|
4080
|
+
}, z.core.$strip>;
|
|
4081
|
+
export declare const MessageSendMessageSchema: z.ZodObject<{
|
|
4082
|
+
id: z.ZodString;
|
|
4083
|
+
content: z.ZodString;
|
|
4084
|
+
contentRaw: z.ZodOptional<z.ZodString>;
|
|
4085
|
+
title: z.ZodOptional<z.ZodString>;
|
|
4086
|
+
}, z.core.$strip>;
|
|
4087
|
+
export declare const MessageSendInputSchema: z.ZodObject<{
|
|
4088
|
+
channel: z.ZodObject<{
|
|
4089
|
+
id: z.ZodString;
|
|
4090
|
+
handle: z.ZodString;
|
|
4091
|
+
identifierValue: z.ZodString;
|
|
4092
|
+
}, z.core.$strip>;
|
|
4093
|
+
subscription: z.ZodObject<{
|
|
4094
|
+
id: z.ZodString;
|
|
4095
|
+
identifierValue: z.ZodString;
|
|
4096
|
+
}, z.core.$strip>;
|
|
4097
|
+
contact: z.ZodObject<{
|
|
4098
|
+
id: z.ZodString;
|
|
4099
|
+
name: z.ZodOptional<z.ZodString>;
|
|
4100
|
+
}, z.core.$strip>;
|
|
4101
|
+
message: z.ZodObject<{
|
|
4102
|
+
id: z.ZodString;
|
|
4103
|
+
content: z.ZodString;
|
|
4104
|
+
contentRaw: z.ZodOptional<z.ZodString>;
|
|
4105
|
+
title: z.ZodOptional<z.ZodString>;
|
|
4106
|
+
}, z.core.$strip>;
|
|
4107
|
+
}, z.core.$strip>;
|
|
4108
|
+
export declare const MessageSendOutputSchema: z.ZodObject<{
|
|
4109
|
+
status: z.ZodEnum<{
|
|
4110
|
+
sent: "sent";
|
|
4111
|
+
queued: "queued";
|
|
4112
|
+
failed: "failed";
|
|
4113
|
+
}>;
|
|
4114
|
+
remoteId: z.ZodOptional<z.ZodString>;
|
|
4115
|
+
}, z.core.$strip>;
|
|
4116
|
+
export type MessageSendChannel = z.infer<typeof MessageSendChannelSchema>;
|
|
4117
|
+
export type MessageSendSubscription = z.infer<typeof MessageSendSubscriptionSchema>;
|
|
4118
|
+
export type MessageSendContact = z.infer<typeof MessageSendContactSchema>;
|
|
4119
|
+
export type MessageSendMessage = z.infer<typeof MessageSendMessageSchema>;
|
|
4120
|
+
export type MessageSendInput = z.infer<typeof MessageSendInputSchema>;
|
|
4121
|
+
export type MessageSendOutput = z.infer<typeof MessageSendOutputSchema>;
|
|
4054
4122
|
export declare function isModelDependency(dep: ResourceDependency): dep is ModelDependency;
|
|
4055
4123
|
export declare function isChannelDependency(dep: ResourceDependency): dep is ChannelDependency;
|
|
4056
4124
|
export declare function isWorkflowDependency(dep: ResourceDependency): dep is WorkflowDependency;
|
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.ChannelFieldDefinitionSchema = 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.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;
|
|
4
|
+
exports.MessageSendOutputSchema = exports.MessageSendInputSchema = exports.MessageSendMessageSchema = exports.MessageSendContactSchema = exports.MessageSendSubscriptionSchema = exports.MessageSendChannelSchema = exports.SkedyulConfigSchema = exports.ProvisionConfigSchema = exports.WebhookProvisionConfigSchema = 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;
|
|
@@ -652,6 +652,16 @@ exports.WebhooksSchema = zod_1.z.record(zod_1.z.string(), exports.WebhookHandler
|
|
|
652
652
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
653
653
|
// Provision Config Schema
|
|
654
654
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
655
|
+
/**
|
|
656
|
+
* Configuration for a single webhook's provisioning lifecycle.
|
|
657
|
+
* Defines tools to invoke when the webhook is provisioned/deprovisioned.
|
|
658
|
+
*/
|
|
659
|
+
exports.WebhookProvisionConfigSchema = zod_1.z.object({
|
|
660
|
+
/** Tool name to invoke when webhook is provisioned */
|
|
661
|
+
onProvision: zod_1.z.string().optional(),
|
|
662
|
+
/** Tool name to invoke when webhook is deprovisioned */
|
|
663
|
+
onDeprovision: zod_1.z.string().optional(),
|
|
664
|
+
});
|
|
655
665
|
exports.ProvisionConfigSchema = zod_1.z.object({
|
|
656
666
|
env: exports.EnvSchemaSchema.optional(),
|
|
657
667
|
models: zod_1.z.array(exports.ModelDefinitionSchema).optional(),
|
|
@@ -661,7 +671,8 @@ exports.ProvisionConfigSchema = zod_1.z.object({
|
|
|
661
671
|
/** Base navigation configuration for all pages (can be overridden per page) */
|
|
662
672
|
navigation: exports.NavigationConfigSchema.optional(),
|
|
663
673
|
pages: zod_1.z.array(exports.PageDefinitionSchema).optional(),
|
|
664
|
-
|
|
674
|
+
/** Webhook handler configs to auto-register at provision level */
|
|
675
|
+
webhooks: zod_1.z.record(zod_1.z.string(), exports.WebhookProvisionConfigSchema).optional(),
|
|
665
676
|
});
|
|
666
677
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
667
678
|
// Main Config Schema
|
|
@@ -680,6 +691,38 @@ function safeParseConfig(data) {
|
|
|
680
691
|
return result.success ? result.data : null;
|
|
681
692
|
}
|
|
682
693
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
694
|
+
// Messaging Tool Schemas
|
|
695
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
696
|
+
exports.MessageSendChannelSchema = zod_1.z.object({
|
|
697
|
+
id: zod_1.z.string(),
|
|
698
|
+
handle: zod_1.z.string(),
|
|
699
|
+
identifierValue: zod_1.z.string(),
|
|
700
|
+
});
|
|
701
|
+
exports.MessageSendSubscriptionSchema = zod_1.z.object({
|
|
702
|
+
id: zod_1.z.string(),
|
|
703
|
+
identifierValue: zod_1.z.string(),
|
|
704
|
+
});
|
|
705
|
+
exports.MessageSendContactSchema = zod_1.z.object({
|
|
706
|
+
id: zod_1.z.string(),
|
|
707
|
+
name: zod_1.z.string().optional(),
|
|
708
|
+
});
|
|
709
|
+
exports.MessageSendMessageSchema = zod_1.z.object({
|
|
710
|
+
id: zod_1.z.string(),
|
|
711
|
+
content: zod_1.z.string(),
|
|
712
|
+
contentRaw: zod_1.z.string().optional(),
|
|
713
|
+
title: zod_1.z.string().optional(),
|
|
714
|
+
});
|
|
715
|
+
exports.MessageSendInputSchema = zod_1.z.object({
|
|
716
|
+
channel: exports.MessageSendChannelSchema,
|
|
717
|
+
subscription: exports.MessageSendSubscriptionSchema,
|
|
718
|
+
contact: exports.MessageSendContactSchema,
|
|
719
|
+
message: exports.MessageSendMessageSchema,
|
|
720
|
+
});
|
|
721
|
+
exports.MessageSendOutputSchema = zod_1.z.object({
|
|
722
|
+
status: zod_1.z.enum(['sent', 'queued', 'failed']),
|
|
723
|
+
remoteId: zod_1.z.string().optional(),
|
|
724
|
+
});
|
|
725
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
683
726
|
// Type Guards
|
|
684
727
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
685
728
|
function isModelDependency(dep) {
|
package/dist/types.d.ts
CHANGED
|
@@ -57,7 +57,7 @@ export interface ToolParams<Input, Output> {
|
|
|
57
57
|
context: ToolContext;
|
|
58
58
|
}
|
|
59
59
|
/** Trigger types for tool execution */
|
|
60
|
-
export type ToolTrigger = 'field_change' | 'page_action' | 'agent' | 'workflow' | 'form_submit';
|
|
60
|
+
export type ToolTrigger = 'field_change' | 'page_action' | 'agent' | 'workflow' | 'form_submit' | 'provision';
|
|
61
61
|
/** Field info when tool is triggered by a field change */
|
|
62
62
|
export interface ToolFieldContext {
|
|
63
63
|
/** Field handle from page definition */
|
|
@@ -92,6 +92,23 @@ export interface ToolExecutionContext {
|
|
|
92
92
|
/** Execution mode - 'estimate' returns billing info without side effects */
|
|
93
93
|
mode: 'execute' | 'estimate';
|
|
94
94
|
}
|
|
95
|
+
/**
|
|
96
|
+
* Input type for Provision lifecycle tools (onProvision, onDeprovision).
|
|
97
|
+
* These tools receive no user input - all data comes from context.
|
|
98
|
+
*/
|
|
99
|
+
export type ProvisionToolInput = Record<string, never>;
|
|
100
|
+
/**
|
|
101
|
+
* Context type for Provision lifecycle tools.
|
|
102
|
+
* Extends ToolExecutionContext with provision-specific fields.
|
|
103
|
+
*/
|
|
104
|
+
export interface ProvisionToolContext extends ToolExecutionContext {
|
|
105
|
+
/** The webhook name being provisioned (e.g., 'receive_email') */
|
|
106
|
+
webhookName: string;
|
|
107
|
+
/** App version ID being provisioned */
|
|
108
|
+
appVersionId: string;
|
|
109
|
+
/** Trigger is always 'provision' for these tools */
|
|
110
|
+
trigger: 'provision';
|
|
111
|
+
}
|
|
95
112
|
export interface BillingInfo {
|
|
96
113
|
credits: number;
|
|
97
114
|
}
|