skedyul 1.0.6 → 1.0.9

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
- 1772514228755
1
+ 1772576645071
@@ -62,12 +62,11 @@ export interface BaseDefinition {
62
62
  */
63
63
  export type Scope = 'internal' | 'shared';
64
64
  /**
65
- * Field owner determines who can modify a field's value.
66
- * - 'app': Only the app can modify (via tools/webhooks)
67
- * - 'workplace': Only the user can modify (via UI)
68
- * - 'both': Either can modify
65
+ * Field owner determines who controls the field definition.
66
+ * - 'app': App controls the definition (options, validation). Creates app-scoped definitions.
67
+ * - 'shared': Workplace controls the definition. Field can be shared across apps.
69
68
  */
70
- export type FieldOwner = 'app' | 'workplace' | 'both';
69
+ export type FieldOwner = 'app' | 'shared';
71
70
  /**
72
71
  * Visibility setting for environment variables.
73
72
  * - 'visible': Value is shown in UI
@@ -31,10 +31,9 @@ export type FieldType = 'string' | 'long_string' | 'text' | 'number' | 'boolean'
31
31
  */
32
32
  export type OnDelete = 'none' | 'cascade' | 'restrict';
33
33
  /**
34
- * Inline field definition for constraints and options.
35
- * @deprecated Use InlineFieldDefinition instead
34
+ * Inline field definition for options and validation constraints.
36
35
  */
37
- export interface FieldConstraints {
36
+ export interface InlineFieldDefinition {
38
37
  /** Limit number of selections for select fields */
39
38
  limitChoices?: number;
40
39
  /** Options for select/dropdown fields */
@@ -52,11 +51,6 @@ export interface FieldConstraints {
52
51
  /** Regex pattern for validation */
53
52
  pattern?: string;
54
53
  }
55
- /**
56
- * Inline field definition for options and validation constraints.
57
- * This is the preferred name - aligns with Zod schema and skedyul-core.
58
- */
59
- export type InlineFieldDefinition = FieldConstraints;
60
54
  /**
61
55
  * Field visibility settings in the UI.
62
56
  */
@@ -80,10 +74,13 @@ export interface FieldDefinition {
80
74
  type?: FieldType;
81
75
  /** Reference to a shared field definition by handle */
82
76
  definitionHandle?: string;
83
- /** Inline definition with options and constraints (preferred name) */
84
- definition?: InlineFieldDefinition;
85
- /** @deprecated Use 'definition' instead. Inline constraints and options */
86
- constraints?: FieldConstraints;
77
+ /**
78
+ * Inline definition with options/constraints, OR string reference to global definition.
79
+ * - String: References global definition (e.g., 'phone', 'email')
80
+ * - Object: Inline definition with options
81
+ * - Omitted: Auto-creates workplace definition as <subdomain>/<model>/<field>
82
+ */
83
+ definition?: InlineFieldDefinition | string;
87
84
  /** Whether this field is required */
88
85
  required?: boolean;
89
86
  /** Whether this field must be unique across all records */
@@ -98,7 +95,7 @@ export interface FieldDefinition {
98
95
  description?: string;
99
96
  /** Visibility settings */
100
97
  visibility?: FieldVisibility;
101
- /** Who can modify this field */
98
+ /** Who controls the field definition: 'app' or 'shared' */
102
99
  owner?: FieldOwner;
103
100
  }
104
101
  /**
@@ -652,65 +652,6 @@ export declare const resource: {
652
652
  */
653
653
  link(params: ResourceLinkParams): Promise<ResourceLinkResult>;
654
654
  };
655
- /**
656
- * Parameters for creating a contact association link.
657
- */
658
- export interface ContactAssociationLinkCreateParams {
659
- /** Communication channel ID to link */
660
- communicationChannelId: string;
661
- /** Model ID to associate contacts with */
662
- modelId: string;
663
- /** Field ID providing the identifier (phone/email) */
664
- identifierFieldId: string;
665
- }
666
- /**
667
- * Result from contactAssociationLink.create
668
- */
669
- export interface ContactAssociationLinkCreateResult {
670
- /** Created ContactAssociationLink ID */
671
- id: string;
672
- /** Model name for display */
673
- modelName: string;
674
- /** Field label for display */
675
- identifierFieldLabel: string;
676
- }
677
- export declare const contactAssociationLink: {
678
- /**
679
- * Create a contact association link between a channel and a model.
680
- *
681
- * Links a CommunicationChannel to a Model, specifying which field
682
- * provides the identifier value (phone/email) for contact association.
683
- *
684
- * The API token determines the context (app installation is embedded in sk_wkp_ tokens).
685
- *
686
- * @param params - Link creation parameters
687
- *
688
- * @example
689
- * ```ts
690
- * // Link a phone channel to the Clients model using the phone field
691
- * const link = await contactAssociationLink.create({
692
- * communicationChannelId: channel.id,
693
- * modelId: clientsModelId,
694
- * identifierFieldId: phoneFieldId,
695
- * })
696
- * ```
697
- */
698
- create(params: ContactAssociationLinkCreateParams): Promise<ContactAssociationLinkCreateResult>;
699
- /**
700
- * List contact association links for a channel.
701
- *
702
- * @param communicationChannelId - Channel to list links for
703
- */
704
- list(communicationChannelId: string): Promise<ContactAssociationLinkCreateResult[]>;
705
- /**
706
- * Delete a contact association link.
707
- *
708
- * @param id - ContactAssociationLink ID to delete
709
- */
710
- delete(id: string): Promise<{
711
- success: boolean;
712
- }>;
713
- };
714
655
  /**
715
656
  * Text content part for multimodal messages.
716
657
  */
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ai = exports.contactAssociationLink = exports.resource = exports.webhook = exports.file = exports.token = exports.instance = exports.communicationChannel = exports.workplace = void 0;
3
+ exports.ai = exports.resource = exports.webhook = exports.file = exports.token = exports.instance = exports.communicationChannel = exports.workplace = void 0;
4
4
  exports.runWithConfig = runWithConfig;
5
5
  exports.configure = configure;
6
6
  exports.getConfig = getConfig;
@@ -619,50 +619,6 @@ exports.resource = {
619
619
  return data;
620
620
  },
621
621
  };
622
- exports.contactAssociationLink = {
623
- /**
624
- * Create a contact association link between a channel and a model.
625
- *
626
- * Links a CommunicationChannel to a Model, specifying which field
627
- * provides the identifier value (phone/email) for contact association.
628
- *
629
- * The API token determines the context (app installation is embedded in sk_wkp_ tokens).
630
- *
631
- * @param params - Link creation parameters
632
- *
633
- * @example
634
- * ```ts
635
- * // Link a phone channel to the Clients model using the phone field
636
- * const link = await contactAssociationLink.create({
637
- * communicationChannelId: channel.id,
638
- * modelId: clientsModelId,
639
- * identifierFieldId: phoneFieldId,
640
- * })
641
- * ```
642
- */
643
- async create(params) {
644
- const { data } = await callCore('contactAssociationLink.create', { ...params });
645
- return data;
646
- },
647
- /**
648
- * List contact association links for a channel.
649
- *
650
- * @param communicationChannelId - Channel to list links for
651
- */
652
- async list(communicationChannelId) {
653
- const { data } = await callCore('contactAssociationLink.list', { communicationChannelId });
654
- return data;
655
- },
656
- /**
657
- * Delete a contact association link.
658
- *
659
- * @param id - ContactAssociationLink ID to delete
660
- */
661
- async delete(id) {
662
- const { data } = await callCore('contactAssociationLink.delete', { id });
663
- return data;
664
- },
665
- };
666
622
  /**
667
623
  * Convert a Zod schema to JSON Schema format for transport using Zod's built-in conversion.
668
624
  * Uses z.toJSONSchema() from Zod 4 for accurate schema conversion.
package/dist/index.d.ts CHANGED
@@ -7,8 +7,8 @@ export { DEFAULT_DOCKERFILE } from './dockerfile';
7
7
  export { InstallError, MissingRequiredFieldError, AuthenticationError, InvalidConfigurationError, ConnectionError, AppAuthInvalidError, } from './errors';
8
8
  export type { InstallErrorCode } from './errors';
9
9
  export { z };
10
- export { workplace, communicationChannel, instance, token, file, webhook, resource, contactAssociationLink, ai, configure, getConfig, runWithConfig, } from './core/client';
11
- export type { InstanceContext, InstanceData, InstanceMeta, InstancePagination, InstanceListResult, InstanceListArgs, FileInfo, FileUrlResponse, FileUploadParams, FileUploadResult, WebhookCreateResult, WebhookListItem, WebhookDeleteByNameOptions, WebhookListOptions, ResourceLinkParams, ResourceLinkResult, ContactAssociationLinkCreateParams, ContactAssociationLinkCreateResult, AITextContent, AIFileContent, AIImageContent, AIMessageContent, AIMessage, GenerateObjectOptions, GenerateObjectResult, } from './core/client';
10
+ export { workplace, communicationChannel, instance, token, file, webhook, resource, ai, configure, getConfig, runWithConfig, } from './core/client';
11
+ export type { InstanceContext, InstanceData, InstanceMeta, InstancePagination, InstanceListResult, InstanceListArgs, FileInfo, FileUrlResponse, FileUploadParams, FileUploadResult, WebhookCreateResult, WebhookListItem, WebhookDeleteByNameOptions, WebhookListOptions, ResourceLinkParams, ResourceLinkResult, AITextContent, AIFileContent, AIImageContent, AIMessageContent, AIMessage, GenerateObjectOptions, GenerateObjectResult, } from './core/client';
12
12
  export { createContextLogger } from './server/logger';
13
13
  export type { ContextLogger } from './server/logger';
14
14
  declare const _default: {
@@ -16,4 +16,4 @@ declare const _default: {
16
16
  };
17
17
  export default _default;
18
18
  export { defineConfig, defineModel, defineChannel, definePage, defineWorkflow, defineAgent, defineEnv, defineNavigation, loadConfig, validateConfig, CONFIG_FILE_NAMES, getAllEnvKeys, getRequiredInstallEnvKeys, } from './config';
19
- export type { SkedyulConfig, SerializableSkedyulConfig, InstallConfig, ProvisionConfig, BaseDefinition, Scope, FieldOwner, Visibility, ComputeLayer, StructuredFilter, FieldOption, EnvVariable, EnvSchema, FieldType, Cardinality, OnDelete, FieldConstraints, FieldVisibility, FieldDefinition, ModelDefinition, RelationshipLink, RelationshipDefinition, CapabilityType, ChannelCapability, ChannelFieldPermissions, ChannelField, ChannelDefinition, WorkflowActionInput, WorkflowAction, WorkflowDefinition, AgentDefinition, NavigationItem, NavigationSection, NavigationSidebar, BreadcrumbItem, NavigationBreadcrumb, NavigationConfig, ContextMode, ContextItemModel, ContextItemTool, ContextItem, ContextDefinition, FormStyleProps, ButtonVariant, ButtonSize, ButtonProps, RelationshipExtension, FormHeader, ActionDefinition, ModalFormDefinition, InputComponent, TextareaComponent, SelectComponent, ComboboxComponent, CheckboxComponent, DatePickerComponent, TimePickerComponent, StatusIndicator, FieldSettingComponent, ImageSettingComponent, FileSettingComponent, ListItemTemplate, ListComponent, EmptyFormComponent, AlertComponent, FormComponent, FormLayoutColumn, FormLayoutRow, FormLayoutConfig, FormProps, CardHeader, CardBlock, ListBlock, ModelMapperBlock, BlockDefinition, PageType, PageDefinition, HttpMethod, WebhookRequest, WebhookHandlerContext, WebhookHandlerResponse, WebhookHandlerFn, WebhookHandlerDefinition, Webhooks, WebhookHandlerMetadata, ModelDependency, ChannelDependency, WorkflowDependency, ResourceDependency, } from './config';
19
+ export type { SkedyulConfig, SerializableSkedyulConfig, InstallConfig, ProvisionConfig, BaseDefinition, Scope, FieldOwner, Visibility, ComputeLayer, StructuredFilter, FieldOption, EnvVariable, EnvSchema, FieldType, Cardinality, OnDelete, InlineFieldDefinition, FieldVisibility, FieldDefinition, ModelDefinition, RelationshipLink, RelationshipDefinition, CapabilityType, ChannelCapability, ChannelFieldPermissions, ChannelField, ChannelDefinition, WorkflowActionInput, WorkflowAction, WorkflowDefinition, AgentDefinition, NavigationItem, NavigationSection, NavigationSidebar, BreadcrumbItem, NavigationBreadcrumb, NavigationConfig, ContextMode, ContextItemModel, ContextItemTool, ContextItem, ContextDefinition, FormStyleProps, ButtonVariant, ButtonSize, ButtonProps, RelationshipExtension, FormHeader, ActionDefinition, ModalFormDefinition, InputComponent, TextareaComponent, SelectComponent, ComboboxComponent, CheckboxComponent, DatePickerComponent, TimePickerComponent, StatusIndicator, FieldSettingComponent, ImageSettingComponent, FileSettingComponent, ListItemTemplate, ListComponent, EmptyFormComponent, AlertComponent, FormComponent, FormLayoutColumn, FormLayoutRow, FormLayoutConfig, FormProps, CardHeader, CardBlock, ListBlock, ModelMapperBlock, BlockDefinition, PageType, PageDefinition, HttpMethod, WebhookRequest, WebhookHandlerContext, WebhookHandlerResponse, WebhookHandlerFn, WebhookHandlerDefinition, Webhooks, WebhookHandlerMetadata, ModelDependency, ChannelDependency, WorkflowDependency, ResourceDependency, } from './config';
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.getRequiredInstallEnvKeys = exports.getAllEnvKeys = exports.CONFIG_FILE_NAMES = exports.validateConfig = exports.loadConfig = exports.defineNavigation = exports.defineEnv = exports.defineAgent = exports.defineWorkflow = exports.definePage = exports.defineChannel = exports.defineModel = exports.defineConfig = exports.createContextLogger = exports.runWithConfig = exports.getConfig = exports.configure = exports.ai = exports.contactAssociationLink = exports.resource = exports.webhook = exports.file = exports.token = exports.instance = exports.communicationChannel = exports.workplace = exports.z = exports.AppAuthInvalidError = exports.ConnectionError = exports.InvalidConfigurationError = exports.AuthenticationError = exports.MissingRequiredFieldError = exports.InstallError = exports.DEFAULT_DOCKERFILE = exports.server = exports.ToolResponseMetaSchema = void 0;
17
+ exports.getRequiredInstallEnvKeys = exports.getAllEnvKeys = exports.CONFIG_FILE_NAMES = exports.validateConfig = exports.loadConfig = exports.defineNavigation = exports.defineEnv = exports.defineAgent = exports.defineWorkflow = exports.definePage = exports.defineChannel = exports.defineModel = exports.defineConfig = exports.createContextLogger = exports.runWithConfig = exports.getConfig = exports.configure = exports.ai = exports.resource = exports.webhook = exports.file = exports.token = exports.instance = exports.communicationChannel = exports.workplace = exports.z = exports.AppAuthInvalidError = exports.ConnectionError = exports.InvalidConfigurationError = exports.AuthenticationError = exports.MissingRequiredFieldError = exports.InstallError = exports.DEFAULT_DOCKERFILE = exports.server = exports.ToolResponseMetaSchema = void 0;
18
18
  const v4_1 = require("zod/v4");
19
19
  Object.defineProperty(exports, "z", { enumerable: true, get: function () { return v4_1.z; } });
20
20
  __exportStar(require("./types"), exports);
@@ -41,7 +41,6 @@ Object.defineProperty(exports, "token", { enumerable: true, get: function () { r
41
41
  Object.defineProperty(exports, "file", { enumerable: true, get: function () { return client_1.file; } });
42
42
  Object.defineProperty(exports, "webhook", { enumerable: true, get: function () { return client_1.webhook; } });
43
43
  Object.defineProperty(exports, "resource", { enumerable: true, get: function () { return client_1.resource; } });
44
- Object.defineProperty(exports, "contactAssociationLink", { enumerable: true, get: function () { return client_1.contactAssociationLink; } });
45
44
  Object.defineProperty(exports, "ai", { enumerable: true, get: function () { return client_1.ai; } });
46
45
  Object.defineProperty(exports, "configure", { enumerable: true, get: function () { return client_1.configure; } });
47
46
  Object.defineProperty(exports, "getConfig", { enumerable: true, get: function () { return client_1.getConfig; } });
package/dist/schemas.d.ts CHANGED
@@ -31,8 +31,7 @@ export declare const ComputeLayerTypeSchema: z.ZodEnum<{
31
31
  }>;
32
32
  export declare const FieldOwnerSchema: z.ZodEnum<{
33
33
  APP: "APP";
34
- WORKPLACE: "WORKPLACE";
35
- BOTH: "BOTH";
34
+ SHARED: "SHARED";
36
35
  }>;
37
36
  export declare const StructuredFilterSchema: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>>>;
38
37
  export declare const ModelDependencySchema: z.ZodObject<{
@@ -109,7 +108,7 @@ export declare const ModelFieldDefinitionSchema: z.ZodObject<{
109
108
  OBJECT: "OBJECT";
110
109
  }>>;
111
110
  definitionHandle: z.ZodOptional<z.ZodString>;
112
- definition: z.ZodOptional<z.ZodObject<{
111
+ definition: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
113
112
  limitChoices: z.ZodOptional<z.ZodNumber>;
114
113
  options: z.ZodOptional<z.ZodArray<z.ZodObject<{
115
114
  label: z.ZodString;
@@ -122,21 +121,7 @@ export declare const ModelFieldDefinitionSchema: z.ZodObject<{
122
121
  max: z.ZodOptional<z.ZodNumber>;
123
122
  relatedModel: z.ZodOptional<z.ZodString>;
124
123
  pattern: z.ZodOptional<z.ZodString>;
125
- }, z.core.$strip>>;
126
- constraints: z.ZodOptional<z.ZodObject<{
127
- limitChoices: z.ZodOptional<z.ZodNumber>;
128
- options: z.ZodOptional<z.ZodArray<z.ZodObject<{
129
- label: z.ZodString;
130
- value: z.ZodString;
131
- color: z.ZodOptional<z.ZodString>;
132
- }, z.core.$strip>>>;
133
- minLength: z.ZodOptional<z.ZodNumber>;
134
- maxLength: z.ZodOptional<z.ZodNumber>;
135
- min: z.ZodOptional<z.ZodNumber>;
136
- max: z.ZodOptional<z.ZodNumber>;
137
- relatedModel: z.ZodOptional<z.ZodString>;
138
- pattern: z.ZodOptional<z.ZodString>;
139
- }, z.core.$strip>>;
124
+ }, z.core.$strip>, z.ZodString]>>;
140
125
  required: z.ZodOptional<z.ZodBoolean>;
141
126
  unique: z.ZodOptional<z.ZodBoolean>;
142
127
  system: z.ZodOptional<z.ZodBoolean>;
@@ -152,8 +137,7 @@ export declare const ModelFieldDefinitionSchema: z.ZodObject<{
152
137
  }, z.core.$strip>>;
153
138
  owner: z.ZodOptional<z.ZodEnum<{
154
139
  APP: "APP";
155
- WORKPLACE: "WORKPLACE";
156
- BOTH: "BOTH";
140
+ SHARED: "SHARED";
157
141
  }>>;
158
142
  }, z.core.$strip>;
159
143
  export declare const ModelDefinitionSchema: z.ZodObject<{
@@ -179,7 +163,7 @@ export declare const ModelDefinitionSchema: z.ZodObject<{
179
163
  OBJECT: "OBJECT";
180
164
  }>>;
181
165
  definitionHandle: z.ZodOptional<z.ZodString>;
182
- definition: z.ZodOptional<z.ZodObject<{
166
+ definition: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
183
167
  limitChoices: z.ZodOptional<z.ZodNumber>;
184
168
  options: z.ZodOptional<z.ZodArray<z.ZodObject<{
185
169
  label: z.ZodString;
@@ -192,21 +176,7 @@ export declare const ModelDefinitionSchema: z.ZodObject<{
192
176
  max: z.ZodOptional<z.ZodNumber>;
193
177
  relatedModel: z.ZodOptional<z.ZodString>;
194
178
  pattern: z.ZodOptional<z.ZodString>;
195
- }, z.core.$strip>>;
196
- constraints: z.ZodOptional<z.ZodObject<{
197
- limitChoices: z.ZodOptional<z.ZodNumber>;
198
- options: z.ZodOptional<z.ZodArray<z.ZodObject<{
199
- label: z.ZodString;
200
- value: z.ZodString;
201
- color: z.ZodOptional<z.ZodString>;
202
- }, z.core.$strip>>>;
203
- minLength: z.ZodOptional<z.ZodNumber>;
204
- maxLength: z.ZodOptional<z.ZodNumber>;
205
- min: z.ZodOptional<z.ZodNumber>;
206
- max: z.ZodOptional<z.ZodNumber>;
207
- relatedModel: z.ZodOptional<z.ZodString>;
208
- pattern: z.ZodOptional<z.ZodString>;
209
- }, z.core.$strip>>;
179
+ }, z.core.$strip>, z.ZodString]>>;
210
180
  required: z.ZodOptional<z.ZodBoolean>;
211
181
  unique: z.ZodOptional<z.ZodBoolean>;
212
182
  system: z.ZodOptional<z.ZodBoolean>;
@@ -222,8 +192,7 @@ export declare const ModelDefinitionSchema: z.ZodObject<{
222
192
  }, z.core.$strip>>;
223
193
  owner: z.ZodOptional<z.ZodEnum<{
224
194
  APP: "APP";
225
- WORKPLACE: "WORKPLACE";
226
- BOTH: "BOTH";
195
+ SHARED: "SHARED";
227
196
  }>>;
228
197
  }, z.core.$strip>>;
229
198
  requires: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
@@ -2837,21 +2806,7 @@ export declare const InstallConfigSchema: z.ZodObject<{
2837
2806
  OBJECT: "OBJECT";
2838
2807
  }>>;
2839
2808
  definitionHandle: z.ZodOptional<z.ZodString>;
2840
- definition: z.ZodOptional<z.ZodObject<{
2841
- limitChoices: z.ZodOptional<z.ZodNumber>;
2842
- options: z.ZodOptional<z.ZodArray<z.ZodObject<{
2843
- label: z.ZodString;
2844
- value: z.ZodString;
2845
- color: z.ZodOptional<z.ZodString>;
2846
- }, z.core.$strip>>>;
2847
- minLength: z.ZodOptional<z.ZodNumber>;
2848
- maxLength: z.ZodOptional<z.ZodNumber>;
2849
- min: z.ZodOptional<z.ZodNumber>;
2850
- max: z.ZodOptional<z.ZodNumber>;
2851
- relatedModel: z.ZodOptional<z.ZodString>;
2852
- pattern: z.ZodOptional<z.ZodString>;
2853
- }, z.core.$strip>>;
2854
- constraints: z.ZodOptional<z.ZodObject<{
2809
+ definition: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2855
2810
  limitChoices: z.ZodOptional<z.ZodNumber>;
2856
2811
  options: z.ZodOptional<z.ZodArray<z.ZodObject<{
2857
2812
  label: z.ZodString;
@@ -2864,7 +2819,7 @@ export declare const InstallConfigSchema: z.ZodObject<{
2864
2819
  max: z.ZodOptional<z.ZodNumber>;
2865
2820
  relatedModel: z.ZodOptional<z.ZodString>;
2866
2821
  pattern: z.ZodOptional<z.ZodString>;
2867
- }, z.core.$strip>>;
2822
+ }, z.core.$strip>, z.ZodString]>>;
2868
2823
  required: z.ZodOptional<z.ZodBoolean>;
2869
2824
  unique: z.ZodOptional<z.ZodBoolean>;
2870
2825
  system: z.ZodOptional<z.ZodBoolean>;
@@ -2880,8 +2835,7 @@ export declare const InstallConfigSchema: z.ZodObject<{
2880
2835
  }, z.core.$strip>>;
2881
2836
  owner: z.ZodOptional<z.ZodEnum<{
2882
2837
  APP: "APP";
2883
- WORKPLACE: "WORKPLACE";
2884
- BOTH: "BOTH";
2838
+ SHARED: "SHARED";
2885
2839
  }>>;
2886
2840
  }, z.core.$strip>>;
2887
2841
  requires: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
@@ -2953,7 +2907,7 @@ export declare const ProvisionConfigSchema: z.ZodObject<{
2953
2907
  OBJECT: "OBJECT";
2954
2908
  }>>;
2955
2909
  definitionHandle: z.ZodOptional<z.ZodString>;
2956
- definition: z.ZodOptional<z.ZodObject<{
2910
+ definition: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2957
2911
  limitChoices: z.ZodOptional<z.ZodNumber>;
2958
2912
  options: z.ZodOptional<z.ZodArray<z.ZodObject<{
2959
2913
  label: z.ZodString;
@@ -2966,21 +2920,7 @@ export declare const ProvisionConfigSchema: z.ZodObject<{
2966
2920
  max: z.ZodOptional<z.ZodNumber>;
2967
2921
  relatedModel: z.ZodOptional<z.ZodString>;
2968
2922
  pattern: z.ZodOptional<z.ZodString>;
2969
- }, z.core.$strip>>;
2970
- constraints: z.ZodOptional<z.ZodObject<{
2971
- limitChoices: z.ZodOptional<z.ZodNumber>;
2972
- options: z.ZodOptional<z.ZodArray<z.ZodObject<{
2973
- label: z.ZodString;
2974
- value: z.ZodString;
2975
- color: z.ZodOptional<z.ZodString>;
2976
- }, z.core.$strip>>>;
2977
- minLength: z.ZodOptional<z.ZodNumber>;
2978
- maxLength: z.ZodOptional<z.ZodNumber>;
2979
- min: z.ZodOptional<z.ZodNumber>;
2980
- max: z.ZodOptional<z.ZodNumber>;
2981
- relatedModel: z.ZodOptional<z.ZodString>;
2982
- pattern: z.ZodOptional<z.ZodString>;
2983
- }, z.core.$strip>>;
2923
+ }, z.core.$strip>, z.ZodString]>>;
2984
2924
  required: z.ZodOptional<z.ZodBoolean>;
2985
2925
  unique: z.ZodOptional<z.ZodBoolean>;
2986
2926
  system: z.ZodOptional<z.ZodBoolean>;
@@ -2996,8 +2936,7 @@ export declare const ProvisionConfigSchema: z.ZodObject<{
2996
2936
  }, z.core.$strip>>;
2997
2937
  owner: z.ZodOptional<z.ZodEnum<{
2998
2938
  APP: "APP";
2999
- WORKPLACE: "WORKPLACE";
3000
- BOTH: "BOTH";
2939
+ SHARED: "SHARED";
3001
2940
  }>>;
3002
2941
  }, z.core.$strip>>;
3003
2942
  requires: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
@@ -3594,7 +3533,7 @@ export declare const SkedyulConfigSchema: z.ZodObject<{
3594
3533
  OBJECT: "OBJECT";
3595
3534
  }>>;
3596
3535
  definitionHandle: z.ZodOptional<z.ZodString>;
3597
- definition: z.ZodOptional<z.ZodObject<{
3536
+ definition: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
3598
3537
  limitChoices: z.ZodOptional<z.ZodNumber>;
3599
3538
  options: z.ZodOptional<z.ZodArray<z.ZodObject<{
3600
3539
  label: z.ZodString;
@@ -3607,21 +3546,7 @@ export declare const SkedyulConfigSchema: z.ZodObject<{
3607
3546
  max: z.ZodOptional<z.ZodNumber>;
3608
3547
  relatedModel: z.ZodOptional<z.ZodString>;
3609
3548
  pattern: z.ZodOptional<z.ZodString>;
3610
- }, z.core.$strip>>;
3611
- constraints: z.ZodOptional<z.ZodObject<{
3612
- limitChoices: z.ZodOptional<z.ZodNumber>;
3613
- options: z.ZodOptional<z.ZodArray<z.ZodObject<{
3614
- label: z.ZodString;
3615
- value: z.ZodString;
3616
- color: z.ZodOptional<z.ZodString>;
3617
- }, z.core.$strip>>>;
3618
- minLength: z.ZodOptional<z.ZodNumber>;
3619
- maxLength: z.ZodOptional<z.ZodNumber>;
3620
- min: z.ZodOptional<z.ZodNumber>;
3621
- max: z.ZodOptional<z.ZodNumber>;
3622
- relatedModel: z.ZodOptional<z.ZodString>;
3623
- pattern: z.ZodOptional<z.ZodString>;
3624
- }, z.core.$strip>>;
3549
+ }, z.core.$strip>, z.ZodString]>>;
3625
3550
  required: z.ZodOptional<z.ZodBoolean>;
3626
3551
  unique: z.ZodOptional<z.ZodBoolean>;
3627
3552
  system: z.ZodOptional<z.ZodBoolean>;
@@ -3637,8 +3562,7 @@ export declare const SkedyulConfigSchema: z.ZodObject<{
3637
3562
  }, z.core.$strip>>;
3638
3563
  owner: z.ZodOptional<z.ZodEnum<{
3639
3564
  APP: "APP";
3640
- WORKPLACE: "WORKPLACE";
3641
- BOTH: "BOTH";
3565
+ SHARED: "SHARED";
3642
3566
  }>>;
3643
3567
  }, z.core.$strip>>;
3644
3568
  requires: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
package/dist/schemas.js CHANGED
@@ -27,7 +27,7 @@ exports.ComputeLayerTypeSchema = v4_1.z.enum(['serverless', 'dedicated']);
27
27
  // ─────────────────────────────────────────────────────────────────────────────
28
28
  // Resource Dependencies
29
29
  // ─────────────────────────────────────────────────────────────────────────────
30
- exports.FieldOwnerSchema = v4_1.z.enum(['APP', 'WORKPLACE', 'BOTH']);
30
+ exports.FieldOwnerSchema = v4_1.z.enum(['APP', 'SHARED']);
31
31
  const PrimitiveSchema = v4_1.z.union([v4_1.z.string(), v4_1.z.number(), v4_1.z.boolean()]);
32
32
  exports.StructuredFilterSchema = v4_1.z.record(v4_1.z.string(), v4_1.z.record(v4_1.z.string(), v4_1.z.union([PrimitiveSchema, v4_1.z.array(PrimitiveSchema)])));
33
33
  exports.ModelDependencySchema = v4_1.z.object({
@@ -87,8 +87,7 @@ exports.ModelFieldDefinitionSchema = v4_1.z.object({
87
87
  label: v4_1.z.string(),
88
88
  type: exports.FieldDataTypeSchema.optional(),
89
89
  definitionHandle: v4_1.z.string().optional(),
90
- definition: exports.InlineFieldDefinitionSchema.optional(),
91
- constraints: exports.InlineFieldDefinitionSchema.optional(), // Legacy alias for definition
90
+ definition: v4_1.z.union([exports.InlineFieldDefinitionSchema, v4_1.z.string()]).optional(),
92
91
  required: v4_1.z.boolean().optional(),
93
92
  unique: v4_1.z.boolean().optional(),
94
93
  system: v4_1.z.boolean().optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skedyul",
3
- "version": "1.0.6",
3
+ "version": "1.0.9",
4
4
  "description": "The Skedyul SDK for Node.js",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",