skedyul 0.2.48 → 0.2.49
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 +14 -4
- package/dist/core/client.d.ts +56 -0
- package/dist/core/client.js +31 -0
- package/dist/index.d.ts +1 -1
- package/dist/schemas.d.ts +44 -38
- package/dist/schemas.js +16 -6
- package/package.json +1 -1
package/dist/.build-stamp
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
1769404387102
|
package/dist/config.d.ts
CHANGED
|
@@ -107,15 +107,25 @@ export interface RelationshipDefinition {
|
|
|
107
107
|
source: RelationshipLink;
|
|
108
108
|
target: RelationshipLink;
|
|
109
109
|
}
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
/** Standard capability types for communication channels */
|
|
111
|
+
export type ChannelCapabilityType = 'messaging' | 'voice' | 'video';
|
|
112
|
+
/** Capability definition with display info and handler references */
|
|
113
|
+
export interface ChannelCapability {
|
|
114
|
+
/** Display name: "SMS", "WhatsApp Messages" */
|
|
115
|
+
name: string;
|
|
116
|
+
/** Lucide icon name */
|
|
117
|
+
icon?: string;
|
|
118
|
+
/** Inbound webhook handler */
|
|
119
|
+
receive?: string;
|
|
120
|
+
/** Outbound tool handle */
|
|
121
|
+
send?: string;
|
|
112
122
|
}
|
|
113
123
|
export interface ChannelDefinition {
|
|
114
124
|
handle: string;
|
|
115
125
|
name: string;
|
|
116
126
|
icon?: string;
|
|
117
|
-
|
|
118
|
-
|
|
127
|
+
/** Capabilities keyed by standard type (messaging, voice, video) */
|
|
128
|
+
capabilities: Partial<Record<ChannelCapabilityType, ChannelCapability>>;
|
|
119
129
|
}
|
|
120
130
|
export interface WorkflowActionInput {
|
|
121
131
|
key: string;
|
package/dist/core/client.d.ts
CHANGED
|
@@ -99,7 +99,63 @@ export interface ReceiveMessageInput {
|
|
|
99
99
|
/** Optional remote/external message ID (e.g., Twilio MessageSid) */
|
|
100
100
|
remoteId?: string;
|
|
101
101
|
}
|
|
102
|
+
/**
|
|
103
|
+
* Parameters for creating a communication channel.
|
|
104
|
+
*/
|
|
105
|
+
export interface ChannelCreateParams {
|
|
106
|
+
/** Friendly name for the channel */
|
|
107
|
+
name: string;
|
|
108
|
+
/** Unique identifier for the channel (e.g., phone number, email address) */
|
|
109
|
+
identifierValue: string;
|
|
110
|
+
/** Optional: Link a SHARED model to user's model when creating the channel */
|
|
111
|
+
link?: {
|
|
112
|
+
/** SHARED model handle from provision config (e.g., 'contact') */
|
|
113
|
+
handle: string;
|
|
114
|
+
/** User's model ID to link to */
|
|
115
|
+
targetModelId: string;
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Result from creating a communication channel.
|
|
120
|
+
*/
|
|
121
|
+
export interface ChannelCreateResult {
|
|
122
|
+
/** Created channel ID */
|
|
123
|
+
id: string;
|
|
124
|
+
/** Channel name */
|
|
125
|
+
name: string;
|
|
126
|
+
/** Channel handle from config */
|
|
127
|
+
handle: string;
|
|
128
|
+
/** Channel identifier value */
|
|
129
|
+
identifierValue: string;
|
|
130
|
+
/** AppResourceInstance ID if link was provided */
|
|
131
|
+
resourceInstanceId?: string;
|
|
132
|
+
}
|
|
102
133
|
export declare const communicationChannel: {
|
|
134
|
+
/**
|
|
135
|
+
* Create a communication channel for an app installation.
|
|
136
|
+
*
|
|
137
|
+
* Creates a channel with the given handle from provision.config.ts.
|
|
138
|
+
* Optionally links a SHARED model to the user's model in a single operation.
|
|
139
|
+
*
|
|
140
|
+
* **Requires sk_wkp_ token** - channels are scoped to app installations.
|
|
141
|
+
*
|
|
142
|
+
* @param handle - Channel handle from provision.config.ts (e.g., "phone", "email")
|
|
143
|
+
* @param params - Channel creation parameters
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* ```ts
|
|
147
|
+
* // Create a phone channel and link the contact model
|
|
148
|
+
* const channel = await communicationChannel.create("phone", {
|
|
149
|
+
* name: "Sales Line",
|
|
150
|
+
* identifierValue: "+61400000000",
|
|
151
|
+
* link: {
|
|
152
|
+
* handle: "contact", // SHARED model from provision config
|
|
153
|
+
* targetModelId: modelId, // User's selected model
|
|
154
|
+
* },
|
|
155
|
+
* });
|
|
156
|
+
* ```
|
|
157
|
+
*/
|
|
158
|
+
create(handle: string, params: ChannelCreateParams): Promise<ChannelCreateResult>;
|
|
103
159
|
/**
|
|
104
160
|
* List communication channels with optional filters.
|
|
105
161
|
*
|
package/dist/core/client.js
CHANGED
|
@@ -139,6 +139,37 @@ exports.workplace = {
|
|
|
139
139
|
},
|
|
140
140
|
};
|
|
141
141
|
exports.communicationChannel = {
|
|
142
|
+
/**
|
|
143
|
+
* Create a communication channel for an app installation.
|
|
144
|
+
*
|
|
145
|
+
* Creates a channel with the given handle from provision.config.ts.
|
|
146
|
+
* Optionally links a SHARED model to the user's model in a single operation.
|
|
147
|
+
*
|
|
148
|
+
* **Requires sk_wkp_ token** - channels are scoped to app installations.
|
|
149
|
+
*
|
|
150
|
+
* @param handle - Channel handle from provision.config.ts (e.g., "phone", "email")
|
|
151
|
+
* @param params - Channel creation parameters
|
|
152
|
+
*
|
|
153
|
+
* @example
|
|
154
|
+
* ```ts
|
|
155
|
+
* // Create a phone channel and link the contact model
|
|
156
|
+
* const channel = await communicationChannel.create("phone", {
|
|
157
|
+
* name: "Sales Line",
|
|
158
|
+
* identifierValue: "+61400000000",
|
|
159
|
+
* link: {
|
|
160
|
+
* handle: "contact", // SHARED model from provision config
|
|
161
|
+
* targetModelId: modelId, // User's selected model
|
|
162
|
+
* },
|
|
163
|
+
* });
|
|
164
|
+
* ```
|
|
165
|
+
*/
|
|
166
|
+
async create(handle, params) {
|
|
167
|
+
const { data } = await callCore('communicationChannel.create', {
|
|
168
|
+
handle,
|
|
169
|
+
...params,
|
|
170
|
+
});
|
|
171
|
+
return data;
|
|
172
|
+
},
|
|
142
173
|
/**
|
|
143
174
|
* List communication channels with optional filters.
|
|
144
175
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -10,4 +10,4 @@ declare const _default: {
|
|
|
10
10
|
};
|
|
11
11
|
export default _default;
|
|
12
12
|
export { defineConfig, loadConfig, validateConfig, CONFIG_FILE_NAMES, getAllEnvKeys, getRequiredInstallEnvKeys, } from './config';
|
|
13
|
-
export type { SkedyulConfig, SerializableSkedyulConfig, EnvVariableDefinition, EnvSchema, EnvVisibility, ComputeLayerType, InstallHandlerContext, InstallHandlerResult, InstallHandler, ModelDefinition, ModelFieldDefinition, ResourceScope, FieldOwner, InternalFieldDataType, FieldOption, InlineFieldDefinition, AppFieldVisibility, RelationshipDefinition, RelationshipLink, RelationshipCardinality, OnDeleteBehavior, ChannelDefinition,
|
|
13
|
+
export type { SkedyulConfig, SerializableSkedyulConfig, EnvVariableDefinition, EnvSchema, EnvVisibility, ComputeLayerType, InstallHandlerContext, InstallHandlerResult, InstallHandler, ModelDefinition, ModelFieldDefinition, ResourceScope, FieldOwner, InternalFieldDataType, FieldOption, InlineFieldDefinition, AppFieldVisibility, RelationshipDefinition, RelationshipLink, RelationshipCardinality, OnDeleteBehavior, ChannelDefinition, ChannelCapability, ChannelCapabilityType, WorkflowDefinition, WorkflowAction, WorkflowActionInput, PageDefinition, PageBlockDefinition, PageFieldDefinition, PageActionDefinition, PageType, PageBlockType, PageFieldType, PageFieldSource, PageFormHeader, PageContextMode, PageContextItemDefinition, PageContextDefinition, PageInstanceFilter, NavigationItem, NavigationSection, NavigationSidebar, BreadcrumbItem, NavigationBreadcrumb, NavigationConfig, WebhookHttpMethod, WebhookRequest, WebhookHandlerContext, WebhookHandlerResponse, WebhookHandlerFn, WebhookHandlerDefinition, Webhooks, WebhookHandlerMetadata, ProvisionConfig, ModelDependency, ChannelDependency, WorkflowDependency, ResourceDependency, StructuredFilter, } from './config';
|
package/dist/schemas.d.ts
CHANGED
|
@@ -277,25 +277,33 @@ export declare const RelationshipDefinitionSchema: z.ZodObject<{
|
|
|
277
277
|
}>>;
|
|
278
278
|
}, z.core.$strip>;
|
|
279
279
|
}, z.core.$strip>;
|
|
280
|
-
|
|
281
|
-
|
|
280
|
+
/** Standard capability types for communication channels */
|
|
281
|
+
export declare const ChannelCapabilityTypeSchema: z.ZodEnum<{
|
|
282
|
+
messaging: "messaging";
|
|
283
|
+
voice: "voice";
|
|
284
|
+
video: "video";
|
|
285
|
+
}>;
|
|
286
|
+
/** Capability definition with display info and handler references */
|
|
287
|
+
export declare const ChannelCapabilitySchema: z.ZodObject<{
|
|
288
|
+
name: z.ZodString;
|
|
289
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
290
|
+
receive: z.ZodOptional<z.ZodString>;
|
|
291
|
+
send: z.ZodOptional<z.ZodString>;
|
|
282
292
|
}, z.core.$strip>;
|
|
283
293
|
export declare const ChannelDefinitionSchema: z.ZodObject<{
|
|
284
294
|
handle: z.ZodString;
|
|
285
295
|
name: z.ZodString;
|
|
286
296
|
icon: z.ZodOptional<z.ZodString>;
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
}, z.core.$strip
|
|
297
|
-
workflow: z.ZodString;
|
|
298
|
-
}, z.core.$strip>]>>>;
|
|
297
|
+
capabilities: z.ZodRecord<z.ZodEnum<{
|
|
298
|
+
messaging: "messaging";
|
|
299
|
+
voice: "voice";
|
|
300
|
+
video: "video";
|
|
301
|
+
}>, z.ZodObject<{
|
|
302
|
+
name: z.ZodString;
|
|
303
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
304
|
+
receive: z.ZodOptional<z.ZodString>;
|
|
305
|
+
send: z.ZodOptional<z.ZodString>;
|
|
306
|
+
}, z.core.$strip>>;
|
|
299
307
|
}, z.core.$strip>;
|
|
300
308
|
export declare const WorkflowActionInputSchema: z.ZodObject<{
|
|
301
309
|
key: z.ZodString;
|
|
@@ -2740,18 +2748,16 @@ export declare const ProvisionConfigSchema: z.ZodObject<{
|
|
|
2740
2748
|
handle: z.ZodString;
|
|
2741
2749
|
name: z.ZodString;
|
|
2742
2750
|
icon: z.ZodOptional<z.ZodString>;
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
}, z.core.$strip
|
|
2753
|
-
workflow: z.ZodString;
|
|
2754
|
-
}, z.core.$strip>]>>>;
|
|
2751
|
+
capabilities: z.ZodRecord<z.ZodEnum<{
|
|
2752
|
+
messaging: "messaging";
|
|
2753
|
+
voice: "voice";
|
|
2754
|
+
video: "video";
|
|
2755
|
+
}>, z.ZodObject<{
|
|
2756
|
+
name: z.ZodString;
|
|
2757
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
2758
|
+
receive: z.ZodOptional<z.ZodString>;
|
|
2759
|
+
send: z.ZodOptional<z.ZodString>;
|
|
2760
|
+
}, z.core.$strip>>;
|
|
2755
2761
|
}, z.core.$strip>>>;
|
|
2756
2762
|
workflows: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2757
2763
|
path: z.ZodString;
|
|
@@ -3340,18 +3346,16 @@ export declare const SkedyulConfigSchema: z.ZodObject<{
|
|
|
3340
3346
|
handle: z.ZodString;
|
|
3341
3347
|
name: z.ZodString;
|
|
3342
3348
|
icon: z.ZodOptional<z.ZodString>;
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
}, z.core.$strip
|
|
3353
|
-
workflow: z.ZodString;
|
|
3354
|
-
}, z.core.$strip>]>>>;
|
|
3349
|
+
capabilities: z.ZodRecord<z.ZodEnum<{
|
|
3350
|
+
messaging: "messaging";
|
|
3351
|
+
voice: "voice";
|
|
3352
|
+
video: "video";
|
|
3353
|
+
}>, z.ZodObject<{
|
|
3354
|
+
name: z.ZodString;
|
|
3355
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
3356
|
+
receive: z.ZodOptional<z.ZodString>;
|
|
3357
|
+
send: z.ZodOptional<z.ZodString>;
|
|
3358
|
+
}, z.core.$strip>>;
|
|
3355
3359
|
}, z.core.$strip>>>;
|
|
3356
3360
|
workflows: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3357
3361
|
path: z.ZodString;
|
|
@@ -3847,6 +3851,8 @@ export type WorkflowDependency = z.infer<typeof WorkflowDependencySchema>;
|
|
|
3847
3851
|
export type ResourceDependency = z.infer<typeof ResourceDependencySchema>;
|
|
3848
3852
|
export type ModelFieldDefinition = z.infer<typeof ModelFieldDefinitionSchema>;
|
|
3849
3853
|
export type ModelDefinition = z.infer<typeof ModelDefinitionSchema>;
|
|
3854
|
+
export type ChannelCapabilityType = z.infer<typeof ChannelCapabilityTypeSchema>;
|
|
3855
|
+
export type ChannelCapability = z.infer<typeof ChannelCapabilitySchema>;
|
|
3850
3856
|
export type ChannelDefinition = z.infer<typeof ChannelDefinitionSchema>;
|
|
3851
3857
|
export type WorkflowDefinition = z.infer<typeof WorkflowDefinitionSchema>;
|
|
3852
3858
|
export type WebhookHttpMethod = z.infer<typeof WebhookHttpMethodSchema>;
|
package/dist/schemas.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
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 = void 0;
|
|
3
|
+
exports.ListComponentDefinitionSchema = 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.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 = void 0;
|
|
5
5
|
exports.safeParseConfig = safeParseConfig;
|
|
6
6
|
exports.isModelDependency = isModelDependency;
|
|
7
7
|
exports.isChannelDependency = isChannelDependency;
|
|
@@ -132,15 +132,25 @@ exports.RelationshipDefinitionSchema = zod_1.z.object({
|
|
|
132
132
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
133
133
|
// Channel Schemas
|
|
134
134
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
/** Standard capability types for communication channels */
|
|
136
|
+
exports.ChannelCapabilityTypeSchema = zod_1.z.enum([
|
|
137
|
+
'messaging', // Text-based: SMS, WhatsApp, Messenger, DMs
|
|
138
|
+
'voice', // Audio calls: Phone, WhatsApp Voice, etc.
|
|
139
|
+
'video', // Video calls (future)
|
|
140
|
+
]);
|
|
141
|
+
/** Capability definition with display info and handler references */
|
|
142
|
+
exports.ChannelCapabilitySchema = zod_1.z.object({
|
|
143
|
+
name: zod_1.z.string(), // Display name: "SMS", "WhatsApp Messages"
|
|
144
|
+
icon: zod_1.z.string().optional(), // Lucide icon name
|
|
145
|
+
receive: zod_1.z.string().optional(), // Inbound webhook handler
|
|
146
|
+
send: zod_1.z.string().optional(), // Outbound tool handle
|
|
137
147
|
});
|
|
138
148
|
exports.ChannelDefinitionSchema = zod_1.z.object({
|
|
139
149
|
handle: zod_1.z.string(),
|
|
140
150
|
name: zod_1.z.string(),
|
|
141
151
|
icon: zod_1.z.string().optional(),
|
|
142
|
-
|
|
143
|
-
|
|
152
|
+
// Capabilities keyed by standard type (messaging, voice, video)
|
|
153
|
+
capabilities: zod_1.z.record(exports.ChannelCapabilityTypeSchema, exports.ChannelCapabilitySchema),
|
|
144
154
|
});
|
|
145
155
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
146
156
|
// Workflow Schemas
|