skedyul 0.2.93 → 0.2.95

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 CHANGED
@@ -1 +1 @@
1
- 1769668369071
1
+ 1769669581137
package/dist/config.d.ts CHANGED
@@ -120,27 +120,21 @@ export interface ChannelCapability {
120
120
  /** Outbound tool handle */
121
121
  send?: string;
122
122
  }
123
- /**
124
- * Identifier field configuration for channels.
125
- * Used to specify how to filter/create identifier fields (e.g., phone, email).
126
- */
127
- export interface ChannelIdentifierField {
128
- handle: string;
129
- label: string;
130
- definition: {
131
- handle: string;
132
- };
133
- }
134
123
  export interface ChannelFieldPermissions {
135
124
  read?: boolean;
136
125
  write?: boolean;
137
126
  }
127
+ /**
128
+ * Field definition for channel field mappings.
129
+ * One field should have identifier: true to mark it as the channel identifier.
130
+ */
138
131
  export interface ChannelFieldDefinition {
139
132
  handle: string;
140
133
  label: string;
141
134
  definition: {
142
135
  handle: string;
143
136
  };
137
+ /** Marks this field as the identifier field for the channel */
144
138
  identifier?: boolean;
145
139
  required?: boolean;
146
140
  defaultValue?: {
@@ -153,12 +147,8 @@ export interface ChannelDefinition {
153
147
  handle: string;
154
148
  name: string;
155
149
  icon?: string;
156
- /** Structured identifier field config for filtering/creating identifier fields */
157
- identifierField?: ChannelIdentifierField;
158
- /** @deprecated Use identifierField instead. Kept for backward compatibility. */
159
- identifierType?: string;
160
- /** Field definitions for channel identifier + optional mappings */
161
- fields?: ChannelFieldDefinition[];
150
+ /** Field definitions for channel. One field must have identifier: true. */
151
+ fields: ChannelFieldDefinition[];
162
152
  /** Capabilities keyed by standard type (messaging, voice, video) */
163
153
  capabilities: Partial<Record<ChannelCapabilityType, ChannelCapability>>;
164
154
  }
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, InstallConfig, ModelDefinition, ModelFieldDefinition, ResourceScope, FieldOwner, InternalFieldDataType, FieldOption, InlineFieldDefinition, AppFieldVisibility, RelationshipDefinition, RelationshipLink, RelationshipCardinality, OnDeleteBehavior, ChannelDefinition, ChannelCapability, ChannelCapabilityType, ChannelIdentifierField, 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';
13
+ export type { SkedyulConfig, SerializableSkedyulConfig, EnvVariableDefinition, EnvSchema, EnvVisibility, ComputeLayerType, InstallHandlerContext, InstallHandlerResult, InstallHandler, InstallConfig, ModelDefinition, ModelFieldDefinition, ResourceScope, FieldOwner, InternalFieldDataType, FieldOption, InlineFieldDefinition, AppFieldVisibility, RelationshipDefinition, RelationshipLink, RelationshipCardinality, OnDeleteBehavior, ChannelDefinition, ChannelCapability, ChannelCapabilityType, ChannelFieldDefinition, 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
@@ -291,28 +291,56 @@ export declare const ChannelCapabilitySchema: z.ZodObject<{
291
291
  send: z.ZodOptional<z.ZodString>;
292
292
  }, z.core.$strip>;
293
293
  /**
294
- * Identifier field configuration for channels.
295
- * Used to specify how to filter/create identifier fields (e.g., phone, email).
294
+ * Field definition for channel field mappings.
295
+ * Defines fields that can be mapped when linking a channel to a model.
296
+ * One field should have identifier: true to mark it as the channel identifier.
296
297
  */
297
- export declare const ChannelIdentifierFieldSchema: z.ZodObject<{
298
+ export declare const ChannelFieldDefinitionSchema: z.ZodObject<{
298
299
  handle: z.ZodString;
299
300
  label: z.ZodString;
300
301
  definition: z.ZodObject<{
301
302
  handle: z.ZodString;
302
- }, z.core.$strip>;
303
- }, z.core.$strip>;
303
+ }, z.core.$loose>;
304
+ identifier: z.ZodOptional<z.ZodBoolean>;
305
+ required: z.ZodOptional<z.ZodBoolean>;
306
+ defaultValue: z.ZodOptional<z.ZodObject<{
307
+ value: z.ZodUnknown;
308
+ }, z.core.$loose>>;
309
+ visibility: z.ZodOptional<z.ZodObject<{
310
+ data: z.ZodOptional<z.ZodBoolean>;
311
+ list: z.ZodOptional<z.ZodBoolean>;
312
+ filters: z.ZodOptional<z.ZodBoolean>;
313
+ }, z.core.$loose>>;
314
+ permissions: z.ZodOptional<z.ZodObject<{
315
+ read: z.ZodOptional<z.ZodBoolean>;
316
+ write: z.ZodOptional<z.ZodBoolean>;
317
+ }, z.core.$loose>>;
318
+ }, z.core.$loose>;
304
319
  export declare const ChannelDefinitionSchema: z.ZodObject<{
305
320
  handle: z.ZodString;
306
321
  name: z.ZodString;
307
322
  icon: z.ZodOptional<z.ZodString>;
308
- identifierField: z.ZodOptional<z.ZodObject<{
323
+ fields: z.ZodArray<z.ZodObject<{
309
324
  handle: z.ZodString;
310
325
  label: z.ZodString;
311
326
  definition: z.ZodObject<{
312
327
  handle: z.ZodString;
313
- }, z.core.$strip>;
314
- }, z.core.$strip>>;
315
- identifierType: z.ZodOptional<z.ZodString>;
328
+ }, z.core.$loose>;
329
+ identifier: z.ZodOptional<z.ZodBoolean>;
330
+ required: z.ZodOptional<z.ZodBoolean>;
331
+ defaultValue: z.ZodOptional<z.ZodObject<{
332
+ value: z.ZodUnknown;
333
+ }, z.core.$loose>>;
334
+ visibility: z.ZodOptional<z.ZodObject<{
335
+ data: z.ZodOptional<z.ZodBoolean>;
336
+ list: z.ZodOptional<z.ZodBoolean>;
337
+ filters: z.ZodOptional<z.ZodBoolean>;
338
+ }, z.core.$loose>>;
339
+ permissions: z.ZodOptional<z.ZodObject<{
340
+ read: z.ZodOptional<z.ZodBoolean>;
341
+ write: z.ZodOptional<z.ZodBoolean>;
342
+ }, z.core.$loose>>;
343
+ }, z.core.$loose>>;
316
344
  capabilities: z.ZodRecord<z.ZodEnum<{
317
345
  messaging: "messaging";
318
346
  voice: "voice";
@@ -2831,14 +2859,27 @@ export declare const ProvisionConfigSchema: z.ZodObject<{
2831
2859
  handle: z.ZodString;
2832
2860
  name: z.ZodString;
2833
2861
  icon: z.ZodOptional<z.ZodString>;
2834
- identifierField: z.ZodOptional<z.ZodObject<{
2862
+ fields: z.ZodArray<z.ZodObject<{
2835
2863
  handle: z.ZodString;
2836
2864
  label: z.ZodString;
2837
2865
  definition: z.ZodObject<{
2838
2866
  handle: z.ZodString;
2839
- }, z.core.$strip>;
2840
- }, z.core.$strip>>;
2841
- identifierType: z.ZodOptional<z.ZodString>;
2867
+ }, z.core.$loose>;
2868
+ identifier: z.ZodOptional<z.ZodBoolean>;
2869
+ required: z.ZodOptional<z.ZodBoolean>;
2870
+ defaultValue: z.ZodOptional<z.ZodObject<{
2871
+ value: z.ZodUnknown;
2872
+ }, z.core.$loose>>;
2873
+ visibility: z.ZodOptional<z.ZodObject<{
2874
+ data: z.ZodOptional<z.ZodBoolean>;
2875
+ list: z.ZodOptional<z.ZodBoolean>;
2876
+ filters: z.ZodOptional<z.ZodBoolean>;
2877
+ }, z.core.$loose>>;
2878
+ permissions: z.ZodOptional<z.ZodObject<{
2879
+ read: z.ZodOptional<z.ZodBoolean>;
2880
+ write: z.ZodOptional<z.ZodBoolean>;
2881
+ }, z.core.$loose>>;
2882
+ }, z.core.$loose>>;
2842
2883
  capabilities: z.ZodRecord<z.ZodEnum<{
2843
2884
  messaging: "messaging";
2844
2885
  voice: "voice";
@@ -3450,14 +3491,27 @@ export declare const SkedyulConfigSchema: z.ZodObject<{
3450
3491
  handle: z.ZodString;
3451
3492
  name: z.ZodString;
3452
3493
  icon: z.ZodOptional<z.ZodString>;
3453
- identifierField: z.ZodOptional<z.ZodObject<{
3494
+ fields: z.ZodArray<z.ZodObject<{
3454
3495
  handle: z.ZodString;
3455
3496
  label: z.ZodString;
3456
3497
  definition: z.ZodObject<{
3457
3498
  handle: z.ZodString;
3458
- }, z.core.$strip>;
3459
- }, z.core.$strip>>;
3460
- identifierType: z.ZodOptional<z.ZodString>;
3499
+ }, z.core.$loose>;
3500
+ identifier: z.ZodOptional<z.ZodBoolean>;
3501
+ required: z.ZodOptional<z.ZodBoolean>;
3502
+ defaultValue: z.ZodOptional<z.ZodObject<{
3503
+ value: z.ZodUnknown;
3504
+ }, z.core.$loose>>;
3505
+ visibility: z.ZodOptional<z.ZodObject<{
3506
+ data: z.ZodOptional<z.ZodBoolean>;
3507
+ list: z.ZodOptional<z.ZodBoolean>;
3508
+ filters: z.ZodOptional<z.ZodBoolean>;
3509
+ }, z.core.$loose>>;
3510
+ permissions: z.ZodOptional<z.ZodObject<{
3511
+ read: z.ZodOptional<z.ZodBoolean>;
3512
+ write: z.ZodOptional<z.ZodBoolean>;
3513
+ }, z.core.$loose>>;
3514
+ }, z.core.$loose>>;
3461
3515
  capabilities: z.ZodRecord<z.ZodEnum<{
3462
3516
  messaging: "messaging";
3463
3517
  voice: "voice";
@@ -3978,7 +4032,7 @@ export type ModelFieldDefinition = z.infer<typeof ModelFieldDefinitionSchema>;
3978
4032
  export type ModelDefinition = z.infer<typeof ModelDefinitionSchema>;
3979
4033
  export type ChannelCapabilityType = z.infer<typeof ChannelCapabilityTypeSchema>;
3980
4034
  export type ChannelCapability = z.infer<typeof ChannelCapabilitySchema>;
3981
- export type ChannelIdentifierField = z.infer<typeof ChannelIdentifierFieldSchema>;
4035
+ export type ChannelFieldDefinition = z.infer<typeof ChannelFieldDefinitionSchema>;
3982
4036
  export type ChannelDefinition = z.infer<typeof ChannelDefinitionSchema>;
3983
4037
  export type WorkflowDefinition = z.infer<typeof WorkflowDefinitionSchema>;
3984
4038
  export type WebhookHttpMethod = z.infer<typeof WebhookHttpMethodSchema>;
package/dist/schemas.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
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;
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
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;
@@ -146,24 +146,40 @@ exports.ChannelCapabilitySchema = zod_1.z.object({
146
146
  send: zod_1.z.string().optional(), // Outbound tool handle
147
147
  });
148
148
  /**
149
- * Identifier field configuration for channels.
150
- * Used to specify how to filter/create identifier fields (e.g., phone, email).
149
+ * Field definition for channel field mappings.
150
+ * Defines fields that can be mapped when linking a channel to a model.
151
+ * One field should have identifier: true to mark it as the channel identifier.
151
152
  */
152
- exports.ChannelIdentifierFieldSchema = zod_1.z.object({
153
+ exports.ChannelFieldDefinitionSchema = zod_1.z.object({
153
154
  handle: zod_1.z.string(),
154
155
  label: zod_1.z.string(),
155
156
  definition: zod_1.z.object({
156
157
  handle: zod_1.z.string(),
157
- }),
158
- });
158
+ }).passthrough(),
159
+ /** Marks this field as the identifier field for the channel */
160
+ identifier: zod_1.z.boolean().optional(),
161
+ /** Whether this field is required */
162
+ required: zod_1.z.boolean().optional(),
163
+ /** Default value when creating a new field */
164
+ defaultValue: zod_1.z.object({ value: zod_1.z.unknown() }).passthrough().optional(),
165
+ /** Visibility settings for the field */
166
+ visibility: zod_1.z.object({
167
+ data: zod_1.z.boolean().optional(),
168
+ list: zod_1.z.boolean().optional(),
169
+ filters: zod_1.z.boolean().optional(),
170
+ }).passthrough().optional(),
171
+ /** Permission settings for the field */
172
+ permissions: zod_1.z.object({
173
+ read: zod_1.z.boolean().optional(),
174
+ write: zod_1.z.boolean().optional(),
175
+ }).passthrough().optional(),
176
+ }).passthrough();
159
177
  exports.ChannelDefinitionSchema = zod_1.z.object({
160
178
  handle: zod_1.z.string(),
161
179
  name: zod_1.z.string(),
162
180
  icon: zod_1.z.string().optional(),
163
- /** Structured identifier field config for filtering/creating identifier fields */
164
- identifierField: exports.ChannelIdentifierFieldSchema.optional(),
165
- /** @deprecated Use identifierField instead. Kept for backward compatibility. */
166
- identifierType: zod_1.z.string().optional(),
181
+ /** Array of field definitions for this channel. One field must have identifier: true. */
182
+ fields: zod_1.z.array(exports.ChannelFieldDefinitionSchema),
167
183
  // Capabilities keyed by standard type (messaging, voice, video)
168
184
  capabilities: zod_1.z.record(exports.ChannelCapabilityTypeSchema, exports.ChannelCapabilitySchema),
169
185
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skedyul",
3
- "version": "0.2.93",
3
+ "version": "0.2.95",
4
4
  "description": "The Skedyul SDK for Node.js",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",