skedyul 1.0.8 → 1.0.10

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
- 1772517901674
1
+ 1772582242133
@@ -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
@@ -5,7 +5,7 @@
5
5
  * that an app can use to interact with users.
6
6
  */
7
7
  import type { BaseDefinition, FieldOwner } from './base';
8
- import type { FieldVisibility } from './model';
8
+ import type { FieldVisibility, InlineFieldDefinition } from './model';
9
9
  /**
10
10
  * Channel capability types.
11
11
  * - 'messaging': Text-based messaging (SMS, chat, etc.)
@@ -41,8 +41,12 @@ export interface ChannelField {
41
41
  handle: string;
42
42
  /** Human-readable display name */
43
43
  label: string;
44
- /** Reference to a field definition by handle */
45
- definitionHandle: string;
44
+ /**
45
+ * Field definition reference or inline definition.
46
+ * - String: References global definition (e.g., 'phone', 'email', 'system/opt_in')
47
+ * - Object: Inline definition with options
48
+ */
49
+ definition?: InlineFieldDefinition | string;
46
50
  /** Marks this field as the identifier field for the channel */
47
51
  identifier?: boolean;
48
52
  /** Whether this field is required */
@@ -72,10 +72,13 @@ export interface FieldDefinition {
72
72
  label: string;
73
73
  /** Field data type */
74
74
  type?: FieldType;
75
- /** Reference to a shared field definition by handle */
76
- definitionHandle?: string;
77
- /** Inline definition with options and constraints */
78
- definition?: InlineFieldDefinition;
75
+ /**
76
+ * Inline definition with options/constraints, OR string reference to global definition.
77
+ * - String: References global definition (e.g., 'phone', 'email')
78
+ * - Object: Inline definition with options
79
+ * - Omitted: Auto-creates workplace definition as <subdomain>/<model>/<field>
80
+ */
81
+ definition?: InlineFieldDefinition | string;
79
82
  /** Whether this field is required */
80
83
  required?: boolean;
81
84
  /** Whether this field must be unique across all records */
@@ -90,7 +93,7 @@ export interface FieldDefinition {
90
93
  description?: string;
91
94
  /** Visibility settings */
92
95
  visibility?: FieldVisibility;
93
- /** Who can modify this field */
96
+ /** Who controls the field definition: 'app' or 'shared' */
94
97
  owner?: FieldOwner;
95
98
  }
96
99
  /**
@@ -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: {
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<{
@@ -108,8 +107,7 @@ export declare const ModelFieldDefinitionSchema: z.ZodObject<{
108
107
  RELATION: "RELATION";
109
108
  OBJECT: "OBJECT";
110
109
  }>>;
111
- definitionHandle: z.ZodOptional<z.ZodString>;
112
- definition: z.ZodOptional<z.ZodObject<{
110
+ definition: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
113
111
  limitChoices: z.ZodOptional<z.ZodNumber>;
114
112
  options: z.ZodOptional<z.ZodArray<z.ZodObject<{
115
113
  label: z.ZodString;
@@ -122,7 +120,7 @@ export declare const ModelFieldDefinitionSchema: z.ZodObject<{
122
120
  max: z.ZodOptional<z.ZodNumber>;
123
121
  relatedModel: z.ZodOptional<z.ZodString>;
124
122
  pattern: z.ZodOptional<z.ZodString>;
125
- }, z.core.$strip>>;
123
+ }, z.core.$strip>, z.ZodString]>>;
126
124
  required: z.ZodOptional<z.ZodBoolean>;
127
125
  unique: z.ZodOptional<z.ZodBoolean>;
128
126
  system: z.ZodOptional<z.ZodBoolean>;
@@ -138,8 +136,7 @@ export declare const ModelFieldDefinitionSchema: z.ZodObject<{
138
136
  }, z.core.$strip>>;
139
137
  owner: z.ZodOptional<z.ZodEnum<{
140
138
  APP: "APP";
141
- WORKPLACE: "WORKPLACE";
142
- BOTH: "BOTH";
139
+ SHARED: "SHARED";
143
140
  }>>;
144
141
  }, z.core.$strip>;
145
142
  export declare const ModelDefinitionSchema: z.ZodObject<{
@@ -164,8 +161,7 @@ export declare const ModelDefinitionSchema: z.ZodObject<{
164
161
  RELATION: "RELATION";
165
162
  OBJECT: "OBJECT";
166
163
  }>>;
167
- definitionHandle: z.ZodOptional<z.ZodString>;
168
- definition: z.ZodOptional<z.ZodObject<{
164
+ definition: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
169
165
  limitChoices: z.ZodOptional<z.ZodNumber>;
170
166
  options: z.ZodOptional<z.ZodArray<z.ZodObject<{
171
167
  label: z.ZodString;
@@ -178,7 +174,7 @@ export declare const ModelDefinitionSchema: z.ZodObject<{
178
174
  max: z.ZodOptional<z.ZodNumber>;
179
175
  relatedModel: z.ZodOptional<z.ZodString>;
180
176
  pattern: z.ZodOptional<z.ZodString>;
181
- }, z.core.$strip>>;
177
+ }, z.core.$strip>, z.ZodString]>>;
182
178
  required: z.ZodOptional<z.ZodBoolean>;
183
179
  unique: z.ZodOptional<z.ZodBoolean>;
184
180
  system: z.ZodOptional<z.ZodBoolean>;
@@ -194,8 +190,7 @@ export declare const ModelDefinitionSchema: z.ZodObject<{
194
190
  }, z.core.$strip>>;
195
191
  owner: z.ZodOptional<z.ZodEnum<{
196
192
  APP: "APP";
197
- WORKPLACE: "WORKPLACE";
198
- BOTH: "BOTH";
193
+ SHARED: "SHARED";
199
194
  }>>;
200
195
  }, z.core.$strip>>;
201
196
  requires: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
@@ -266,9 +261,20 @@ export declare const ChannelCapabilitySchema: z.ZodObject<{
266
261
  export declare const ChannelFieldDefinitionSchema: z.ZodObject<{
267
262
  handle: z.ZodString;
268
263
  label: z.ZodString;
269
- definition: z.ZodObject<{
270
- handle: z.ZodString;
271
- }, z.core.$loose>;
264
+ definition: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
265
+ limitChoices: z.ZodOptional<z.ZodNumber>;
266
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
267
+ label: z.ZodString;
268
+ value: z.ZodString;
269
+ color: z.ZodOptional<z.ZodString>;
270
+ }, z.core.$strip>>>;
271
+ minLength: z.ZodOptional<z.ZodNumber>;
272
+ maxLength: z.ZodOptional<z.ZodNumber>;
273
+ min: z.ZodOptional<z.ZodNumber>;
274
+ max: z.ZodOptional<z.ZodNumber>;
275
+ relatedModel: z.ZodOptional<z.ZodString>;
276
+ pattern: z.ZodOptional<z.ZodString>;
277
+ }, z.core.$strip>, z.ZodString]>>;
272
278
  identifier: z.ZodOptional<z.ZodBoolean>;
273
279
  required: z.ZodOptional<z.ZodBoolean>;
274
280
  defaultValue: z.ZodOptional<z.ZodObject<{
@@ -291,9 +297,20 @@ export declare const ChannelDefinitionSchema: z.ZodObject<{
291
297
  fields: z.ZodArray<z.ZodObject<{
292
298
  handle: z.ZodString;
293
299
  label: z.ZodString;
294
- definition: z.ZodObject<{
295
- handle: z.ZodString;
296
- }, z.core.$loose>;
300
+ definition: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
301
+ limitChoices: z.ZodOptional<z.ZodNumber>;
302
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
303
+ label: z.ZodString;
304
+ value: z.ZodString;
305
+ color: z.ZodOptional<z.ZodString>;
306
+ }, z.core.$strip>>>;
307
+ minLength: z.ZodOptional<z.ZodNumber>;
308
+ maxLength: z.ZodOptional<z.ZodNumber>;
309
+ min: z.ZodOptional<z.ZodNumber>;
310
+ max: z.ZodOptional<z.ZodNumber>;
311
+ relatedModel: z.ZodOptional<z.ZodString>;
312
+ pattern: z.ZodOptional<z.ZodString>;
313
+ }, z.core.$strip>, z.ZodString]>>;
297
314
  identifier: z.ZodOptional<z.ZodBoolean>;
298
315
  required: z.ZodOptional<z.ZodBoolean>;
299
316
  defaultValue: z.ZodOptional<z.ZodObject<{
@@ -2808,8 +2825,7 @@ export declare const InstallConfigSchema: z.ZodObject<{
2808
2825
  RELATION: "RELATION";
2809
2826
  OBJECT: "OBJECT";
2810
2827
  }>>;
2811
- definitionHandle: z.ZodOptional<z.ZodString>;
2812
- definition: z.ZodOptional<z.ZodObject<{
2828
+ definition: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2813
2829
  limitChoices: z.ZodOptional<z.ZodNumber>;
2814
2830
  options: z.ZodOptional<z.ZodArray<z.ZodObject<{
2815
2831
  label: z.ZodString;
@@ -2822,7 +2838,7 @@ export declare const InstallConfigSchema: z.ZodObject<{
2822
2838
  max: z.ZodOptional<z.ZodNumber>;
2823
2839
  relatedModel: z.ZodOptional<z.ZodString>;
2824
2840
  pattern: z.ZodOptional<z.ZodString>;
2825
- }, z.core.$strip>>;
2841
+ }, z.core.$strip>, z.ZodString]>>;
2826
2842
  required: z.ZodOptional<z.ZodBoolean>;
2827
2843
  unique: z.ZodOptional<z.ZodBoolean>;
2828
2844
  system: z.ZodOptional<z.ZodBoolean>;
@@ -2838,8 +2854,7 @@ export declare const InstallConfigSchema: z.ZodObject<{
2838
2854
  }, z.core.$strip>>;
2839
2855
  owner: z.ZodOptional<z.ZodEnum<{
2840
2856
  APP: "APP";
2841
- WORKPLACE: "WORKPLACE";
2842
- BOTH: "BOTH";
2857
+ SHARED: "SHARED";
2843
2858
  }>>;
2844
2859
  }, z.core.$strip>>;
2845
2860
  requires: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
@@ -2910,8 +2925,7 @@ export declare const ProvisionConfigSchema: z.ZodObject<{
2910
2925
  RELATION: "RELATION";
2911
2926
  OBJECT: "OBJECT";
2912
2927
  }>>;
2913
- definitionHandle: z.ZodOptional<z.ZodString>;
2914
- definition: z.ZodOptional<z.ZodObject<{
2928
+ definition: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2915
2929
  limitChoices: z.ZodOptional<z.ZodNumber>;
2916
2930
  options: z.ZodOptional<z.ZodArray<z.ZodObject<{
2917
2931
  label: z.ZodString;
@@ -2924,7 +2938,7 @@ export declare const ProvisionConfigSchema: z.ZodObject<{
2924
2938
  max: z.ZodOptional<z.ZodNumber>;
2925
2939
  relatedModel: z.ZodOptional<z.ZodString>;
2926
2940
  pattern: z.ZodOptional<z.ZodString>;
2927
- }, z.core.$strip>>;
2941
+ }, z.core.$strip>, z.ZodString]>>;
2928
2942
  required: z.ZodOptional<z.ZodBoolean>;
2929
2943
  unique: z.ZodOptional<z.ZodBoolean>;
2930
2944
  system: z.ZodOptional<z.ZodBoolean>;
@@ -2940,8 +2954,7 @@ export declare const ProvisionConfigSchema: z.ZodObject<{
2940
2954
  }, z.core.$strip>>;
2941
2955
  owner: z.ZodOptional<z.ZodEnum<{
2942
2956
  APP: "APP";
2943
- WORKPLACE: "WORKPLACE";
2944
- BOTH: "BOTH";
2957
+ SHARED: "SHARED";
2945
2958
  }>>;
2946
2959
  }, z.core.$strip>>;
2947
2960
  requires: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
@@ -2984,9 +2997,20 @@ export declare const ProvisionConfigSchema: z.ZodObject<{
2984
2997
  fields: z.ZodArray<z.ZodObject<{
2985
2998
  handle: z.ZodString;
2986
2999
  label: z.ZodString;
2987
- definition: z.ZodObject<{
2988
- handle: z.ZodString;
2989
- }, z.core.$loose>;
3000
+ definition: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
3001
+ limitChoices: z.ZodOptional<z.ZodNumber>;
3002
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
3003
+ label: z.ZodString;
3004
+ value: z.ZodString;
3005
+ color: z.ZodOptional<z.ZodString>;
3006
+ }, z.core.$strip>>>;
3007
+ minLength: z.ZodOptional<z.ZodNumber>;
3008
+ maxLength: z.ZodOptional<z.ZodNumber>;
3009
+ min: z.ZodOptional<z.ZodNumber>;
3010
+ max: z.ZodOptional<z.ZodNumber>;
3011
+ relatedModel: z.ZodOptional<z.ZodString>;
3012
+ pattern: z.ZodOptional<z.ZodString>;
3013
+ }, z.core.$strip>, z.ZodString]>>;
2990
3014
  identifier: z.ZodOptional<z.ZodBoolean>;
2991
3015
  required: z.ZodOptional<z.ZodBoolean>;
2992
3016
  defaultValue: z.ZodOptional<z.ZodObject<{
@@ -3537,8 +3561,7 @@ export declare const SkedyulConfigSchema: z.ZodObject<{
3537
3561
  RELATION: "RELATION";
3538
3562
  OBJECT: "OBJECT";
3539
3563
  }>>;
3540
- definitionHandle: z.ZodOptional<z.ZodString>;
3541
- definition: z.ZodOptional<z.ZodObject<{
3564
+ definition: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
3542
3565
  limitChoices: z.ZodOptional<z.ZodNumber>;
3543
3566
  options: z.ZodOptional<z.ZodArray<z.ZodObject<{
3544
3567
  label: z.ZodString;
@@ -3551,7 +3574,7 @@ export declare const SkedyulConfigSchema: z.ZodObject<{
3551
3574
  max: z.ZodOptional<z.ZodNumber>;
3552
3575
  relatedModel: z.ZodOptional<z.ZodString>;
3553
3576
  pattern: z.ZodOptional<z.ZodString>;
3554
- }, z.core.$strip>>;
3577
+ }, z.core.$strip>, z.ZodString]>>;
3555
3578
  required: z.ZodOptional<z.ZodBoolean>;
3556
3579
  unique: z.ZodOptional<z.ZodBoolean>;
3557
3580
  system: z.ZodOptional<z.ZodBoolean>;
@@ -3567,8 +3590,7 @@ export declare const SkedyulConfigSchema: z.ZodObject<{
3567
3590
  }, z.core.$strip>>;
3568
3591
  owner: z.ZodOptional<z.ZodEnum<{
3569
3592
  APP: "APP";
3570
- WORKPLACE: "WORKPLACE";
3571
- BOTH: "BOTH";
3593
+ SHARED: "SHARED";
3572
3594
  }>>;
3573
3595
  }, z.core.$strip>>;
3574
3596
  requires: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
@@ -3611,9 +3633,20 @@ export declare const SkedyulConfigSchema: z.ZodObject<{
3611
3633
  fields: z.ZodArray<z.ZodObject<{
3612
3634
  handle: z.ZodString;
3613
3635
  label: z.ZodString;
3614
- definition: z.ZodObject<{
3615
- handle: z.ZodString;
3616
- }, z.core.$loose>;
3636
+ definition: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
3637
+ limitChoices: z.ZodOptional<z.ZodNumber>;
3638
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
3639
+ label: z.ZodString;
3640
+ value: z.ZodString;
3641
+ color: z.ZodOptional<z.ZodString>;
3642
+ }, z.core.$strip>>>;
3643
+ minLength: z.ZodOptional<z.ZodNumber>;
3644
+ maxLength: z.ZodOptional<z.ZodNumber>;
3645
+ min: z.ZodOptional<z.ZodNumber>;
3646
+ max: z.ZodOptional<z.ZodNumber>;
3647
+ relatedModel: z.ZodOptional<z.ZodString>;
3648
+ pattern: z.ZodOptional<z.ZodString>;
3649
+ }, z.core.$strip>, z.ZodString]>>;
3617
3650
  identifier: z.ZodOptional<z.ZodBoolean>;
3618
3651
  required: z.ZodOptional<z.ZodBoolean>;
3619
3652
  defaultValue: z.ZodOptional<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({
@@ -86,8 +86,7 @@ exports.ModelFieldDefinitionSchema = v4_1.z.object({
86
86
  handle: v4_1.z.string(),
87
87
  label: v4_1.z.string(),
88
88
  type: exports.FieldDataTypeSchema.optional(),
89
- definitionHandle: v4_1.z.string().optional(),
90
- definition: exports.InlineFieldDefinitionSchema.optional(),
89
+ definition: v4_1.z.union([exports.InlineFieldDefinitionSchema, v4_1.z.string()]).optional(),
91
90
  required: v4_1.z.boolean().optional(),
92
91
  unique: v4_1.z.boolean().optional(),
93
92
  system: v4_1.z.boolean().optional(),
@@ -151,9 +150,8 @@ exports.ChannelCapabilitySchema = v4_1.z.object({
151
150
  exports.ChannelFieldDefinitionSchema = v4_1.z.object({
152
151
  handle: v4_1.z.string(),
153
152
  label: v4_1.z.string(),
154
- definition: v4_1.z.object({
155
- handle: v4_1.z.string(),
156
- }).passthrough(),
153
+ /** Field definition reference or inline definition */
154
+ definition: v4_1.z.union([exports.InlineFieldDefinitionSchema, v4_1.z.string()]).optional(),
157
155
  /** Marks this field as the identifier field for the channel */
158
156
  identifier: v4_1.z.boolean().optional(),
159
157
  /** Whether this field is required */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skedyul",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "The Skedyul SDK for Node.js",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",