skedyul 1.7.14 → 1.7.16
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/cli/index.js +7 -2
- package/dist/config/define.d.ts +8 -8
- package/dist/config/types/app-event.d.ts +3 -3
- package/dist/config/types/batch-operation.d.ts +3 -3
- package/dist/config/types/entity.d.ts +29 -3
- package/dist/config/types/model.d.ts +5 -0
- package/dist/config/types/setup.d.ts +12 -0
- package/dist/core/client.d.ts +13 -13
- package/dist/esm/index.mjs +49 -7
- package/dist/index.d.ts +2 -2
- package/dist/index.js +55 -7
- package/dist/schemas/crm-schema.d.ts +3 -0
- package/dist/schemas.d.ts +8 -8
- package/dist/types/data-blocks.d.ts +4 -0
- package/dist/types/webhook.d.ts +3 -3
- package/package.json +1 -1
package/dist/.build-stamp
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
1786319639134
|
package/dist/cli/index.js
CHANGED
|
@@ -1206,7 +1206,7 @@ function parseInstallConfigFromSource(content) {
|
|
|
1206
1206
|
return parseEnvConfigFromSource(content);
|
|
1207
1207
|
}
|
|
1208
1208
|
var INSTALL_HANDLER_PATHS = [
|
|
1209
|
-
// Standard integration layout (used by
|
|
1209
|
+
// Standard integration layout (used by public/private integration apps)
|
|
1210
1210
|
"src/server/hooks/install.ts",
|
|
1211
1211
|
"src/server/hooks/install.js",
|
|
1212
1212
|
"dist/server/hooks/install.js",
|
|
@@ -6403,7 +6403,12 @@ var CRMFieldSchemaZ = import_v42.z.object({
|
|
|
6403
6403
|
unique: import_v42.z.boolean().optional(),
|
|
6404
6404
|
list: import_v42.z.boolean().optional(),
|
|
6405
6405
|
default: import_v42.z.unknown().optional(),
|
|
6406
|
-
definition: CRMFieldDefinitionSchema.optional()
|
|
6406
|
+
definition: CRMFieldDefinitionSchema.optional(),
|
|
6407
|
+
/**
|
|
6408
|
+
* Workplace-scoped field section handle (visualization helper).
|
|
6409
|
+
* Find-or-create on apply; display name is derived from the handle on create.
|
|
6410
|
+
*/
|
|
6411
|
+
section: import_v42.z.string().regex(/^[a-z][a-z0-9_-]*$/, "Section handle must be lowercase alphanumeric with underscores/hyphens, starting with a letter").optional()
|
|
6407
6412
|
});
|
|
6408
6413
|
var CRMModelSchemaZ = import_v42.z.object({
|
|
6409
6414
|
handle: import_v42.z.string().regex(/^[a-z][a-z0-9_]*$/, "Handle must be lowercase alphanumeric with underscores, starting with a letter"),
|
package/dist/config/define.d.ts
CHANGED
|
@@ -45,14 +45,14 @@ export declare function defineModel(model: ModelDefinition): ModelDefinition;
|
|
|
45
45
|
*
|
|
46
46
|
* Entities describe external payload shapes that workplaces map to CRM at
|
|
47
47
|
* install time. They are not shared models — workflows apply maps via Liquid
|
|
48
|
-
* filters named after the app handle (e.g. `|
|
|
48
|
+
* filters named after the app handle (e.g. `| acme: "format", "member"`).
|
|
49
49
|
*
|
|
50
50
|
* @example
|
|
51
51
|
* export default defineEntity({
|
|
52
52
|
* handle: 'member',
|
|
53
|
-
* label: '
|
|
53
|
+
* label: 'Member',
|
|
54
54
|
* fields: [
|
|
55
|
-
* { handle: '
|
|
55
|
+
* { handle: 'external_id', label: 'External ID', matchCandidate: true, required: true },
|
|
56
56
|
* { handle: 'first_name', label: 'First Name' },
|
|
57
57
|
* ],
|
|
58
58
|
* contextFields: [
|
|
@@ -120,8 +120,8 @@ export declare function defineAgent(agent: AgentDefinition): AgentDefinition;
|
|
|
120
120
|
*
|
|
121
121
|
* @example
|
|
122
122
|
* export default defineEnv({
|
|
123
|
-
*
|
|
124
|
-
* label: '
|
|
123
|
+
* ACME_API_KEY: {
|
|
124
|
+
* label: 'Acme API Key',
|
|
125
125
|
* scope: 'provision',
|
|
126
126
|
* required: true,
|
|
127
127
|
* visibility: 'encrypted'
|
|
@@ -179,12 +179,12 @@ export declare function defineSetupStep(step: SetupStepDefinition): SetupStepDef
|
|
|
179
179
|
* label: 'Import Members',
|
|
180
180
|
* entity: 'member',
|
|
181
181
|
* setup: async (ctx) => {
|
|
182
|
-
* const count = await
|
|
182
|
+
* const count = await acmeApi.getMemberCount()
|
|
183
183
|
* return { total: count }
|
|
184
184
|
* },
|
|
185
185
|
* iterate: async (ctx) => {
|
|
186
|
-
* const apiKey = ctx.env.
|
|
187
|
-
* const { data, pagination } = await
|
|
186
|
+
* const apiKey = ctx.env.ACME_API_KEY
|
|
187
|
+
* const { data, pagination } = await acmeApi.getMembers({
|
|
188
188
|
* apiKey,
|
|
189
189
|
* limit: ctx.limit,
|
|
190
190
|
* offset: ctx.cursor ?? 0,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* App event definition for integration executable config.
|
|
3
3
|
*
|
|
4
4
|
* Events are emitted via event.create and subscribed to as
|
|
5
|
-
* `app.{appHandle}.{name}` (e.g. app.
|
|
5
|
+
* `app.{appHandle}.{name}` (e.g. app.acme.member.updated).
|
|
6
6
|
*/
|
|
7
7
|
export interface AppEventDefinition {
|
|
8
8
|
/** Event suffix after app handle, e.g. member.created */
|
|
@@ -16,7 +16,7 @@ export interface AppEventDefinition {
|
|
|
16
16
|
/** Optional Lucide icon name for pickers */
|
|
17
17
|
icon?: string;
|
|
18
18
|
/**
|
|
19
|
-
* Example flat domain payload for liquid context reference (e.g.
|
|
19
|
+
* Example flat domain payload for liquid context reference (e.g. external_id, phone, …).
|
|
20
20
|
* Not the full emit payload — studio/branch metadata is added at emit time.
|
|
21
21
|
*/
|
|
22
22
|
examplePayload?: Record<string, unknown>;
|
|
@@ -26,7 +26,7 @@ export interface AppEventDefinition {
|
|
|
26
26
|
*/
|
|
27
27
|
contextFields?: AppEventContextField[];
|
|
28
28
|
/**
|
|
29
|
-
* Workflow input type for app-event payloads, e.g. @app/
|
|
29
|
+
* Workflow input type for app-event payloads, e.g. @app/acme/member/updated.
|
|
30
30
|
* Workflows declare this on inputs.data and subscribe with {{ data }}.
|
|
31
31
|
*/
|
|
32
32
|
workflowInputType?: string;
|
|
@@ -157,12 +157,12 @@ export type BatchOperationIterateFn = (ctx: BatchOperationContext & {
|
|
|
157
157
|
* label: 'Import Members',
|
|
158
158
|
* entity: 'member',
|
|
159
159
|
* setup: async (ctx) => {
|
|
160
|
-
* const count = await
|
|
160
|
+
* const count = await acmeApi.getMemberCount()
|
|
161
161
|
* return { total: count }
|
|
162
162
|
* },
|
|
163
163
|
* iterate: async (ctx) => {
|
|
164
|
-
* const apiKey = ctx.env.
|
|
165
|
-
* const { data, pagination } = await
|
|
164
|
+
* const apiKey = ctx.env.ACME_API_KEY
|
|
165
|
+
* const { data, pagination } = await acmeApi.getMembers({
|
|
166
166
|
* apiKey,
|
|
167
167
|
* limit: ctx.limit,
|
|
168
168
|
* offset: ctx.cursor ?? 0,
|
|
@@ -1,11 +1,32 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* App entity definition types.
|
|
3
3
|
*
|
|
4
|
-
* Entities describe external/logical payload shapes
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Entities describe external/logical payload shapes that workplaces map to CRM
|
|
5
|
+
* via install-time CRM maps. They are NOT shared models — the app does not own
|
|
6
|
+
* CRM writes; workflows/agents apply maps.
|
|
7
7
|
*/
|
|
8
8
|
import type { BaseDefinition, FieldOption } from './base';
|
|
9
|
+
/**
|
|
10
|
+
* Suggested CRM map defaults for an entity when a workplace has matching models.
|
|
11
|
+
* Declared by the app (industry-specific); consumed generically by core install UI.
|
|
12
|
+
*/
|
|
13
|
+
export interface EntityCrmMapDefaults {
|
|
14
|
+
/** Workplace model handle to prefer */
|
|
15
|
+
modelHandle: string;
|
|
16
|
+
/** Prefer this field as match when present on the model */
|
|
17
|
+
matchFieldHandle?: string;
|
|
18
|
+
/** Ordered entity paths for match fallbacks (maps to same-named CRM fields) */
|
|
19
|
+
matchRuleEntityPaths?: string[];
|
|
20
|
+
/** entityPath → workplace field handle */
|
|
21
|
+
fieldHandles: Record<string, string>;
|
|
22
|
+
/** entity relationship handle → workplace field handle */
|
|
23
|
+
relationshipHandles?: Record<string, string>;
|
|
24
|
+
/**
|
|
25
|
+
* Optional enum remaps per entity path when suggesting valueMaps
|
|
26
|
+
* (e.g. membership_status: { trial_member: 'visiting_member' }).
|
|
27
|
+
*/
|
|
28
|
+
valueAliases?: Record<string, Record<string, string>>;
|
|
29
|
+
}
|
|
9
30
|
/**
|
|
10
31
|
* Field on an app entity contract (maps to a path on tool/event payloads).
|
|
11
32
|
*/
|
|
@@ -64,4 +85,9 @@ export interface EntityDefinition extends BaseDefinition {
|
|
|
64
85
|
contextFields?: EntityFieldDefinition[];
|
|
65
86
|
/** Relationship handles that can be mapped to CRM relationship fields */
|
|
66
87
|
relationships?: EntityRelationshipDefinition[];
|
|
88
|
+
/**
|
|
89
|
+
* Optional suggested CRM map when the workplace has a matching model schema.
|
|
90
|
+
* Used by install suggest/analyze — not applied automatically.
|
|
91
|
+
*/
|
|
92
|
+
crmMapDefaults?: EntityCrmMapDefaults;
|
|
67
93
|
}
|
|
@@ -139,6 +139,11 @@ export interface FieldDefinition {
|
|
|
139
139
|
owner?: FieldOwner;
|
|
140
140
|
/** AI-specific metadata for agent interactions */
|
|
141
141
|
aiMeta?: FieldAIMeta;
|
|
142
|
+
/**
|
|
143
|
+
* Workplace-scoped field section handle (visualization helper).
|
|
144
|
+
* Find-or-create on provision/schema apply.
|
|
145
|
+
*/
|
|
146
|
+
section?: string;
|
|
142
147
|
}
|
|
143
148
|
/**
|
|
144
149
|
* Model definition.
|
|
@@ -34,4 +34,16 @@ export interface SetupStepDefinition {
|
|
|
34
34
|
listenToEnv?: boolean;
|
|
35
35
|
/** Capability keys unlocked when this step is READY */
|
|
36
36
|
capabilities?: string[];
|
|
37
|
+
/**
|
|
38
|
+
* Optional tool handle for an APP-step CTA (invoked as page_action with no form).
|
|
39
|
+
* Declared by the app — platform UI must not hardcode app/tool names.
|
|
40
|
+
*/
|
|
41
|
+
actionTool?: string;
|
|
42
|
+
/** Optional label for the APP-step CTA button */
|
|
43
|
+
actionLabel?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Optional install-relative path for post-setup navigation
|
|
46
|
+
* (e.g. `/leads`). Prefer entity pages over industry-specific defaults.
|
|
47
|
+
*/
|
|
48
|
+
href?: string;
|
|
37
49
|
}
|
package/dist/core/client.d.ts
CHANGED
|
@@ -98,7 +98,7 @@ export interface ReceiveMessageInput {
|
|
|
98
98
|
message: CreateMessageType;
|
|
99
99
|
/** Optional contact metadata to associate the message */
|
|
100
100
|
contact?: ReceiveMessageContact;
|
|
101
|
-
/** Optional remote/external message ID (
|
|
101
|
+
/** Optional remote/external message ID (provider message id) */
|
|
102
102
|
remoteId?: string;
|
|
103
103
|
}
|
|
104
104
|
/**
|
|
@@ -176,7 +176,7 @@ export declare const communicationChannel: {
|
|
|
176
176
|
* Receive an inbound message on a communication channel.
|
|
177
177
|
*
|
|
178
178
|
* This is typically called from webhook handlers to process incoming messages
|
|
179
|
-
* (e.g., SMS
|
|
179
|
+
* (e.g., SMS, email, or messaging-channel providers).
|
|
180
180
|
*
|
|
181
181
|
* @example
|
|
182
182
|
* ```ts
|
|
@@ -185,7 +185,7 @@ export declare const communicationChannel: {
|
|
|
185
185
|
* communicationChannelId: channel.id,
|
|
186
186
|
* from: '+1234567890',
|
|
187
187
|
* message: 'Hello!',
|
|
188
|
-
* remoteId: '
|
|
188
|
+
* remoteId: 'provider-message-id-123',
|
|
189
189
|
* });
|
|
190
190
|
* ```
|
|
191
191
|
*/
|
|
@@ -617,14 +617,14 @@ export declare const webhook: {
|
|
|
617
617
|
*
|
|
618
618
|
* @example
|
|
619
619
|
* ```ts
|
|
620
|
-
* // Create a webhook for
|
|
620
|
+
* // Create a webhook for provider compliance callbacks
|
|
621
621
|
* const { url, id } = await webhook.create('compliance_status', {
|
|
622
622
|
* bundleSid: bundle.sid,
|
|
623
623
|
* complianceRecordId: record.id,
|
|
624
624
|
* })
|
|
625
625
|
*
|
|
626
|
-
* // Pass the URL to
|
|
627
|
-
* await
|
|
626
|
+
* // Pass the URL to the upstream provider
|
|
627
|
+
* await providerClient.updateBundle(bundle.sid, {
|
|
628
628
|
* statusCallback: url,
|
|
629
629
|
* })
|
|
630
630
|
* ```
|
|
@@ -1022,18 +1022,18 @@ export declare const ai: {
|
|
|
1022
1022
|
generateObject<S extends z.ZodTypeAny>(options: GenerateObjectOptions<S>): Promise<z.infer<S>>;
|
|
1023
1023
|
};
|
|
1024
1024
|
export interface CallStartParams {
|
|
1025
|
-
/** Communication channel (
|
|
1025
|
+
/** Communication channel (voice number) this call belongs to */
|
|
1026
1026
|
communicationChannelId: string;
|
|
1027
1027
|
/** Caller number in E.164 */
|
|
1028
1028
|
fromNumber: string;
|
|
1029
|
-
/** The dialed number (our
|
|
1029
|
+
/** The dialed number (our channel number) in E.164 */
|
|
1030
1030
|
toNumber: string;
|
|
1031
1031
|
/** Number the call is forwarded/dialed to (the human agent leg) */
|
|
1032
1032
|
forwardedToNumber?: string | null;
|
|
1033
1033
|
direction?: 'INBOUND' | 'OUTBOUND';
|
|
1034
|
-
/** Provider call id (
|
|
1034
|
+
/** Provider call id (opaque) */
|
|
1035
1035
|
externalId?: string | null;
|
|
1036
|
-
/** Raw provider status string (
|
|
1036
|
+
/** Raw provider status string (opaque; not interpreted by the platform) */
|
|
1037
1037
|
externalStatus?: string | null;
|
|
1038
1038
|
/** Transcription provider/engine name (e.g. "deepgram", "google") */
|
|
1039
1039
|
transcriptionEngine?: string | null;
|
|
@@ -1075,10 +1075,10 @@ export interface CallSummarizeResult {
|
|
|
1075
1075
|
/**
|
|
1076
1076
|
* Call client - manage a voice call session and its real-time transcript.
|
|
1077
1077
|
*
|
|
1078
|
-
*
|
|
1078
|
+
* Typical phone-integration flow:
|
|
1079
1079
|
* - `start` when the inbound call arrives (creates the CallSession + thread + CALL block)
|
|
1080
|
-
* - `appendTranscript` for each
|
|
1081
|
-
* - `end` on call completion
|
|
1080
|
+
* - `appendTranscript` for each transcription event (stored as a tagged ThreadMessage)
|
|
1081
|
+
* - `end` on call completion (pass an explicit platform `status`)
|
|
1082
1082
|
* - `summarize` to generate and persist an end-of-call summary
|
|
1083
1083
|
*
|
|
1084
1084
|
* **Requires sk_wkp_ or sk_app_ token.**
|
package/dist/esm/index.mjs
CHANGED
|
@@ -376,7 +376,12 @@ var CRMFieldSchemaZ = z3.object({
|
|
|
376
376
|
unique: z3.boolean().optional(),
|
|
377
377
|
list: z3.boolean().optional(),
|
|
378
378
|
default: z3.unknown().optional(),
|
|
379
|
-
definition: CRMFieldDefinitionSchema.optional()
|
|
379
|
+
definition: CRMFieldDefinitionSchema.optional(),
|
|
380
|
+
/**
|
|
381
|
+
* Workplace-scoped field section handle (visualization helper).
|
|
382
|
+
* Find-or-create on apply; display name is derived from the handle on create.
|
|
383
|
+
*/
|
|
384
|
+
section: z3.string().regex(/^[a-z][a-z0-9_-]*$/, "Section handle must be lowercase alphanumeric with underscores/hyphens, starting with a letter").optional()
|
|
380
385
|
});
|
|
381
386
|
var CRMModelSchemaZ = z3.object({
|
|
382
387
|
handle: z3.string().regex(/^[a-z][a-z0-9_]*$/, "Handle must be lowercase alphanumeric with underscores, starting with a letter"),
|
|
@@ -1655,7 +1660,7 @@ var EventWiringPanelComponentDefinitionSchema = FormV2StylePropsSchema.extend({
|
|
|
1655
1660
|
z8.object({
|
|
1656
1661
|
type: z8.string(),
|
|
1657
1662
|
label: z8.string(),
|
|
1658
|
-
|
|
1663
|
+
sourceType: z8.string().optional(),
|
|
1659
1664
|
description: z8.string().optional(),
|
|
1660
1665
|
icon: z8.string().optional()
|
|
1661
1666
|
})
|
|
@@ -2574,7 +2579,7 @@ var communicationChannel = {
|
|
|
2574
2579
|
* Receive an inbound message on a communication channel.
|
|
2575
2580
|
*
|
|
2576
2581
|
* This is typically called from webhook handlers to process incoming messages
|
|
2577
|
-
* (e.g., SMS
|
|
2582
|
+
* (e.g., SMS, email, or messaging-channel providers).
|
|
2578
2583
|
*
|
|
2579
2584
|
* @example
|
|
2580
2585
|
* ```ts
|
|
@@ -2583,7 +2588,7 @@ var communicationChannel = {
|
|
|
2583
2588
|
* communicationChannelId: channel.id,
|
|
2584
2589
|
* from: '+1234567890',
|
|
2585
2590
|
* message: 'Hello!',
|
|
2586
|
-
* remoteId: '
|
|
2591
|
+
* remoteId: 'provider-message-id-123',
|
|
2587
2592
|
* });
|
|
2588
2593
|
* ```
|
|
2589
2594
|
*/
|
|
@@ -3238,14 +3243,14 @@ var webhook = {
|
|
|
3238
3243
|
*
|
|
3239
3244
|
* @example
|
|
3240
3245
|
* ```ts
|
|
3241
|
-
* // Create a webhook for
|
|
3246
|
+
* // Create a webhook for provider compliance callbacks
|
|
3242
3247
|
* const { url, id } = await webhook.create('compliance_status', {
|
|
3243
3248
|
* bundleSid: bundle.sid,
|
|
3244
3249
|
* complianceRecordId: record.id,
|
|
3245
3250
|
* })
|
|
3246
3251
|
*
|
|
3247
|
-
* // Pass the URL to
|
|
3248
|
-
* await
|
|
3252
|
+
* // Pass the URL to the upstream provider
|
|
3253
|
+
* await providerClient.updateBundle(bundle.sid, {
|
|
3249
3254
|
* statusCallback: url,
|
|
3250
3255
|
* })
|
|
3251
3256
|
* ```
|
|
@@ -6317,6 +6322,37 @@ function resolveInstallPhase(def) {
|
|
|
6317
6322
|
function isPreInstallEnvVar(def) {
|
|
6318
6323
|
return resolveInstallPhase(def) === "pre_install";
|
|
6319
6324
|
}
|
|
6325
|
+
function isPostInstallEnvVar(def) {
|
|
6326
|
+
return resolveInstallPhase(def) === "post_install";
|
|
6327
|
+
}
|
|
6328
|
+
function filterEnvSchemaByInstallPhase(env, phase) {
|
|
6329
|
+
if (!env) {
|
|
6330
|
+
return {};
|
|
6331
|
+
}
|
|
6332
|
+
return Object.fromEntries(
|
|
6333
|
+
Object.entries(env).filter(([, def]) => resolveInstallPhase(def) === phase)
|
|
6334
|
+
);
|
|
6335
|
+
}
|
|
6336
|
+
function splitProvisionEnvSchema(env) {
|
|
6337
|
+
const global = {};
|
|
6338
|
+
const preInstall = {};
|
|
6339
|
+
const postInstall = {};
|
|
6340
|
+
if (!env) {
|
|
6341
|
+
return { global, preInstall, postInstall };
|
|
6342
|
+
}
|
|
6343
|
+
for (const [key, def] of Object.entries(env)) {
|
|
6344
|
+
if (def.scope === "install") {
|
|
6345
|
+
if (isPostInstallEnvVar(def)) {
|
|
6346
|
+
postInstall[key] = def;
|
|
6347
|
+
} else {
|
|
6348
|
+
preInstall[key] = def;
|
|
6349
|
+
}
|
|
6350
|
+
continue;
|
|
6351
|
+
}
|
|
6352
|
+
global[key] = def;
|
|
6353
|
+
}
|
|
6354
|
+
return { global, preInstall, postInstall };
|
|
6355
|
+
}
|
|
6320
6356
|
|
|
6321
6357
|
// src/config/utils.ts
|
|
6322
6358
|
function getAllEnvKeys(config) {
|
|
@@ -8794,6 +8830,7 @@ export {
|
|
|
8794
8830
|
CustomEventPayloadSchema,
|
|
8795
8831
|
CustomEventTypeSchema,
|
|
8796
8832
|
DEFAULT_DOCKERFILE,
|
|
8833
|
+
DEFAULT_INSTALL_PHASE,
|
|
8797
8834
|
DatePickerComponentDefinitionSchema,
|
|
8798
8835
|
DayOfWeekSchema,
|
|
8799
8836
|
EmptyFormComponentDefinitionSchema,
|
|
@@ -9029,6 +9066,7 @@ export {
|
|
|
9029
9066
|
evaluateTemplate,
|
|
9030
9067
|
event,
|
|
9031
9068
|
file,
|
|
9069
|
+
filterEnvSchemaByInstallPhase,
|
|
9032
9070
|
formatContextForPrompt,
|
|
9033
9071
|
formatMoneyMinorEstimate,
|
|
9034
9072
|
formatMoneyMinorRange,
|
|
@@ -9049,6 +9087,8 @@ export {
|
|
|
9049
9087
|
isDeveloperContext,
|
|
9050
9088
|
isFailure,
|
|
9051
9089
|
isModelDependency,
|
|
9090
|
+
isPostInstallEnvVar,
|
|
9091
|
+
isPreInstallEnvVar,
|
|
9052
9092
|
isProvisionContext,
|
|
9053
9093
|
isRetryable,
|
|
9054
9094
|
isRuntimeContext,
|
|
@@ -9070,6 +9110,7 @@ export {
|
|
|
9070
9110
|
requeue,
|
|
9071
9111
|
resetSequencerBackendForTests,
|
|
9072
9112
|
resolveInputMappings,
|
|
9113
|
+
resolveInstallPhase,
|
|
9073
9114
|
resolveQueue,
|
|
9074
9115
|
resolveSequencer,
|
|
9075
9116
|
resource,
|
|
@@ -9083,6 +9124,7 @@ export {
|
|
|
9083
9124
|
release as sequencerRelease,
|
|
9084
9125
|
server,
|
|
9085
9126
|
setup,
|
|
9127
|
+
splitProvisionEnvSchema,
|
|
9086
9128
|
toGsm7,
|
|
9087
9129
|
token,
|
|
9088
9130
|
validateCRMSchema,
|
package/dist/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ declare const _default: {
|
|
|
16
16
|
z: typeof z;
|
|
17
17
|
};
|
|
18
18
|
export default _default;
|
|
19
|
-
export { defineConfig, defineModel, defineEntity, defineChannel, definePage, defineWorkflow, defineAgent, defineEnv, defineNavigation, defineSetupStep, defineBatchOperation, getAllEnvKeys, getRequiredInstallEnvKeys, } from './config';
|
|
19
|
+
export { defineConfig, defineModel, defineEntity, defineChannel, definePage, defineWorkflow, defineAgent, defineEnv, defineNavigation, defineSetupStep, defineBatchOperation, getAllEnvKeys, getRequiredInstallEnvKeys, DEFAULT_INSTALL_PHASE, resolveInstallPhase, isPreInstallEnvVar, isPostInstallEnvVar, filterEnvSchemaByInstallPhase, splitProvisionEnvSchema, } from './config';
|
|
20
20
|
export { queuedFetch, requeue, resolveQueue, createQueueHandle, queuedFetchResponse, registerQueueConfig, runWithRateLimitExecutionContext, getRateLimitExecutionContext, defaultShouldRetry, QueueContextError, QueueNotFoundError, QueuedFetchExhaustedError, RequeueOutsideContextError, RateLimitBackendError, RateLimitExceededError, } from './ratelimit';
|
|
21
21
|
export type { QueueInput, QueueSelector, Lease, QueueLimits, ResolvedQueue, RateLimitExecutionContext, RateLimitBackend, QueueScope, QueueConfig, SerializableQueueConfig, QueueRegistry, } from './ratelimit';
|
|
22
22
|
export { sequencer, allow as sequencerAllow, acquire as sequencerAcquire, release as sequencerRelease, resolveSequencer, createSequencerHandle, registerSequencerConfig, clearRegisteredSequencerConfig, getSequencerConfig, getSequencerDefinitions, resetSequencerBackendForTests, memorySequencerBackend, platformSequencerBackend, SequencerContextError, SequencerNotFoundError, SequencerBackendError, SequencerLockError, } from './sequencer';
|
|
@@ -35,7 +35,7 @@ export type { CRMContext, SenderContext, ThreadContextItem, ThreadInfo, SandboxC
|
|
|
35
35
|
export { MemoryEntryTypeSchema, MemoryEntrySchema, WorkingMemoryConfigSchema, SemanticMemoryConfigSchema, ExternalMemoryConfigSchema, MemoryConfigSchema, MemoryScopeSchema, MemoryQueryOptionsSchema, ConversationSummarySchema, AgentObservationSchema, ExternalDataCacheSchema, MemoryService, InMemoryStore, createInMemoryService, } from './memory';
|
|
36
36
|
export type { MemoryEntryType, MemoryEntry, WorkingMemoryConfig as MemoryWorkingConfig, SemanticMemoryConfig as MemorySemanticConfig, ExternalMemoryConfig as MemoryExternalConfig, MemoryConfig, MemoryScope, MemoryQueryOptions, ConversationSummary, AgentObservation, ExternalDataCache, MemoryStore, } from './memory';
|
|
37
37
|
export type { CRMFieldType, CRMFieldRequirement, CRMFieldOption, CRMFieldDefinition, CRMFieldSchema, CRMModelSchema, CRMCardinality, CRMOnDelete, CRMRelationshipLink, CRMRelationshipSchema, CRMSchema, CRMSchemaValidationResult, } from './schemas';
|
|
38
|
-
export type { SkedyulConfig, SerializableSkedyulConfig, InstallConfig, ProvisionConfig, BaseDefinition, Scope, FieldOwner, Visibility, ComputeLayer, StructuredFilter, FilterOperator, FilterCondition, FieldOption, EnvVariable, EnvSchema, FieldType, Cardinality, OnDelete, InlineFieldDefinition, FieldVisibility, FieldDefinition, ModelDefinition, RelationshipLink, RelationshipDefinition, CapabilityType, ChannelCapability, ChannelBatchCapability, ChannelFieldPermissions, ChannelField, ChannelDefinition, WorkflowActionInput, WorkflowAction, WorkflowDefinition, AgentDefinition, NavigationItem, NavigationSection, NavigationSidebar, BreadcrumbItem, NavigationBreadcrumb, NavigationConfig, ContextMode, ContextItemModel, ContextItemTool, ContextItem, ContextDefinition, FormStyleProps, ButtonVariant, ButtonSize, ButtonProps, RelationshipExtension, FormHeader, FormActionDefinition, 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, BlockDefinition, SetupStepDefinition, SetupStepKind, BatchCascadePhase, BatchOperationDefinition, BatchOperationContext, BatchOperationIterateResult, BatchOperationSetupResult, PageType, PageDefinition, HttpMethod, WebhookRequest, WebhookHandlerContext, WebhookHandlerResponse, WebhookHandlerFn, WebhookHandlerDefinition, Webhooks, WebhookHandlerMetadata, ModelDependency, ChannelDependency, WorkflowDependency, ResourceDependency, } from './config';
|
|
38
|
+
export type { SkedyulConfig, SerializableSkedyulConfig, InstallConfig, ProvisionConfig, BaseDefinition, Scope, FieldOwner, Visibility, ComputeLayer, StructuredFilter, FilterOperator, FilterCondition, FieldOption, EnvVariable, EnvSchema, InstallPhase, FieldType, Cardinality, OnDelete, InlineFieldDefinition, FieldVisibility, FieldDefinition, ModelDefinition, RelationshipLink, RelationshipDefinition, CapabilityType, ChannelCapability, ChannelBatchCapability, ChannelFieldPermissions, ChannelField, ChannelDefinition, WorkflowActionInput, WorkflowAction, WorkflowDefinition, AgentDefinition, NavigationItem, NavigationSection, NavigationSidebar, BreadcrumbItem, NavigationBreadcrumb, NavigationConfig, ContextMode, ContextItemModel, ContextItemTool, ContextItem, ContextDefinition, FormStyleProps, ButtonVariant, ButtonSize, ButtonProps, RelationshipExtension, FormHeader, FormActionDefinition, 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, BlockDefinition, SetupStepDefinition, SetupStepKind, BatchCascadePhase, BatchOperationDefinition, BatchOperationContext, BatchOperationIterateResult, BatchOperationSetupResult, PageType, PageDefinition, HttpMethod, WebhookRequest, WebhookHandlerContext, WebhookHandlerResponse, WebhookHandlerFn, WebhookHandlerDefinition, Webhooks, WebhookHandlerMetadata, ModelDependency, ChannelDependency, WorkflowDependency, ResourceDependency, } from './config';
|
|
39
39
|
export { compileAgent, compileWorkflow } from './compiler';
|
|
40
40
|
export type { ValidationError, ValidationWarning, ResolvedPersona, ResolvedTool, EventConfig as CompilerEventConfig, IRMemoryConfig, PolicyConfig, IRRuntimeConfig, AgentIR, WorkflowStepIR, WorkflowIR, CompilationResult, } from './compiler';
|
|
41
41
|
export { TimeStampSchema, DayOfWeekSchema, TimeWindowSlotSchema, WaitUnitSchema, WaitInputRelativeSchema, WaitInputAbsoluteSchema, WaitInputSchema, } from './scheduling/types';
|
package/dist/index.js
CHANGED
|
@@ -84,6 +84,7 @@ __export(index_exports, {
|
|
|
84
84
|
CustomEventPayloadSchema: () => CustomEventPayloadSchema,
|
|
85
85
|
CustomEventTypeSchema: () => CustomEventTypeSchema,
|
|
86
86
|
DEFAULT_DOCKERFILE: () => DEFAULT_DOCKERFILE,
|
|
87
|
+
DEFAULT_INSTALL_PHASE: () => DEFAULT_INSTALL_PHASE,
|
|
87
88
|
DatePickerComponentDefinitionSchema: () => DatePickerComponentDefinitionSchema,
|
|
88
89
|
DayOfWeekSchema: () => DayOfWeekSchema,
|
|
89
90
|
EmptyFormComponentDefinitionSchema: () => EmptyFormComponentDefinitionSchema,
|
|
@@ -319,6 +320,7 @@ __export(index_exports, {
|
|
|
319
320
|
evaluateTemplate: () => evaluateTemplate,
|
|
320
321
|
event: () => event,
|
|
321
322
|
file: () => file,
|
|
323
|
+
filterEnvSchemaByInstallPhase: () => filterEnvSchemaByInstallPhase,
|
|
322
324
|
formatContextForPrompt: () => formatContextForPrompt,
|
|
323
325
|
formatMoneyMinorEstimate: () => formatMoneyMinorEstimate,
|
|
324
326
|
formatMoneyMinorRange: () => formatMoneyMinorRange,
|
|
@@ -339,6 +341,8 @@ __export(index_exports, {
|
|
|
339
341
|
isDeveloperContext: () => isDeveloperContext,
|
|
340
342
|
isFailure: () => isFailure,
|
|
341
343
|
isModelDependency: () => isModelDependency,
|
|
344
|
+
isPostInstallEnvVar: () => isPostInstallEnvVar,
|
|
345
|
+
isPreInstallEnvVar: () => isPreInstallEnvVar,
|
|
342
346
|
isProvisionContext: () => isProvisionContext,
|
|
343
347
|
isRetryable: () => isRetryable,
|
|
344
348
|
isRuntimeContext: () => isRuntimeContext,
|
|
@@ -360,6 +364,7 @@ __export(index_exports, {
|
|
|
360
364
|
requeue: () => requeue,
|
|
361
365
|
resetSequencerBackendForTests: () => resetSequencerBackendForTests,
|
|
362
366
|
resolveInputMappings: () => resolveInputMappings,
|
|
367
|
+
resolveInstallPhase: () => resolveInstallPhase,
|
|
363
368
|
resolveQueue: () => resolveQueue,
|
|
364
369
|
resolveSequencer: () => resolveSequencer,
|
|
365
370
|
resource: () => resource,
|
|
@@ -373,6 +378,7 @@ __export(index_exports, {
|
|
|
373
378
|
sequencerRelease: () => release,
|
|
374
379
|
server: () => server,
|
|
375
380
|
setup: () => setup,
|
|
381
|
+
splitProvisionEnvSchema: () => splitProvisionEnvSchema,
|
|
376
382
|
toGsm7: () => toGsm7,
|
|
377
383
|
token: () => token,
|
|
378
384
|
validateCRMSchema: () => validateCRMSchema,
|
|
@@ -758,7 +764,12 @@ var CRMFieldSchemaZ = import_v43.z.object({
|
|
|
758
764
|
unique: import_v43.z.boolean().optional(),
|
|
759
765
|
list: import_v43.z.boolean().optional(),
|
|
760
766
|
default: import_v43.z.unknown().optional(),
|
|
761
|
-
definition: CRMFieldDefinitionSchema.optional()
|
|
767
|
+
definition: CRMFieldDefinitionSchema.optional(),
|
|
768
|
+
/**
|
|
769
|
+
* Workplace-scoped field section handle (visualization helper).
|
|
770
|
+
* Find-or-create on apply; display name is derived from the handle on create.
|
|
771
|
+
*/
|
|
772
|
+
section: import_v43.z.string().regex(/^[a-z][a-z0-9_-]*$/, "Section handle must be lowercase alphanumeric with underscores/hyphens, starting with a letter").optional()
|
|
762
773
|
});
|
|
763
774
|
var CRMModelSchemaZ = import_v43.z.object({
|
|
764
775
|
handle: import_v43.z.string().regex(/^[a-z][a-z0-9_]*$/, "Handle must be lowercase alphanumeric with underscores, starting with a letter"),
|
|
@@ -2037,7 +2048,7 @@ var EventWiringPanelComponentDefinitionSchema = FormV2StylePropsSchema.extend({
|
|
|
2037
2048
|
import_v48.z.object({
|
|
2038
2049
|
type: import_v48.z.string(),
|
|
2039
2050
|
label: import_v48.z.string(),
|
|
2040
|
-
|
|
2051
|
+
sourceType: import_v48.z.string().optional(),
|
|
2041
2052
|
description: import_v48.z.string().optional(),
|
|
2042
2053
|
icon: import_v48.z.string().optional()
|
|
2043
2054
|
})
|
|
@@ -2956,7 +2967,7 @@ var communicationChannel = {
|
|
|
2956
2967
|
* Receive an inbound message on a communication channel.
|
|
2957
2968
|
*
|
|
2958
2969
|
* This is typically called from webhook handlers to process incoming messages
|
|
2959
|
-
* (e.g., SMS
|
|
2970
|
+
* (e.g., SMS, email, or messaging-channel providers).
|
|
2960
2971
|
*
|
|
2961
2972
|
* @example
|
|
2962
2973
|
* ```ts
|
|
@@ -2965,7 +2976,7 @@ var communicationChannel = {
|
|
|
2965
2976
|
* communicationChannelId: channel.id,
|
|
2966
2977
|
* from: '+1234567890',
|
|
2967
2978
|
* message: 'Hello!',
|
|
2968
|
-
* remoteId: '
|
|
2979
|
+
* remoteId: 'provider-message-id-123',
|
|
2969
2980
|
* });
|
|
2970
2981
|
* ```
|
|
2971
2982
|
*/
|
|
@@ -3620,14 +3631,14 @@ var webhook = {
|
|
|
3620
3631
|
*
|
|
3621
3632
|
* @example
|
|
3622
3633
|
* ```ts
|
|
3623
|
-
* // Create a webhook for
|
|
3634
|
+
* // Create a webhook for provider compliance callbacks
|
|
3624
3635
|
* const { url, id } = await webhook.create('compliance_status', {
|
|
3625
3636
|
* bundleSid: bundle.sid,
|
|
3626
3637
|
* complianceRecordId: record.id,
|
|
3627
3638
|
* })
|
|
3628
3639
|
*
|
|
3629
|
-
* // Pass the URL to
|
|
3630
|
-
* await
|
|
3640
|
+
* // Pass the URL to the upstream provider
|
|
3641
|
+
* await providerClient.updateBundle(bundle.sid, {
|
|
3631
3642
|
* statusCallback: url,
|
|
3632
3643
|
* })
|
|
3633
3644
|
* ```
|
|
@@ -6699,6 +6710,37 @@ function resolveInstallPhase(def) {
|
|
|
6699
6710
|
function isPreInstallEnvVar(def) {
|
|
6700
6711
|
return resolveInstallPhase(def) === "pre_install";
|
|
6701
6712
|
}
|
|
6713
|
+
function isPostInstallEnvVar(def) {
|
|
6714
|
+
return resolveInstallPhase(def) === "post_install";
|
|
6715
|
+
}
|
|
6716
|
+
function filterEnvSchemaByInstallPhase(env, phase) {
|
|
6717
|
+
if (!env) {
|
|
6718
|
+
return {};
|
|
6719
|
+
}
|
|
6720
|
+
return Object.fromEntries(
|
|
6721
|
+
Object.entries(env).filter(([, def]) => resolveInstallPhase(def) === phase)
|
|
6722
|
+
);
|
|
6723
|
+
}
|
|
6724
|
+
function splitProvisionEnvSchema(env) {
|
|
6725
|
+
const global = {};
|
|
6726
|
+
const preInstall = {};
|
|
6727
|
+
const postInstall = {};
|
|
6728
|
+
if (!env) {
|
|
6729
|
+
return { global, preInstall, postInstall };
|
|
6730
|
+
}
|
|
6731
|
+
for (const [key, def] of Object.entries(env)) {
|
|
6732
|
+
if (def.scope === "install") {
|
|
6733
|
+
if (isPostInstallEnvVar(def)) {
|
|
6734
|
+
postInstall[key] = def;
|
|
6735
|
+
} else {
|
|
6736
|
+
preInstall[key] = def;
|
|
6737
|
+
}
|
|
6738
|
+
continue;
|
|
6739
|
+
}
|
|
6740
|
+
global[key] = def;
|
|
6741
|
+
}
|
|
6742
|
+
return { global, preInstall, postInstall };
|
|
6743
|
+
}
|
|
6702
6744
|
|
|
6703
6745
|
// src/config/utils.ts
|
|
6704
6746
|
function getAllEnvKeys(config) {
|
|
@@ -9177,6 +9219,7 @@ var index_default = { z: import_v414.z };
|
|
|
9177
9219
|
CustomEventPayloadSchema,
|
|
9178
9220
|
CustomEventTypeSchema,
|
|
9179
9221
|
DEFAULT_DOCKERFILE,
|
|
9222
|
+
DEFAULT_INSTALL_PHASE,
|
|
9180
9223
|
DatePickerComponentDefinitionSchema,
|
|
9181
9224
|
DayOfWeekSchema,
|
|
9182
9225
|
EmptyFormComponentDefinitionSchema,
|
|
@@ -9411,6 +9454,7 @@ var index_default = { z: import_v414.z };
|
|
|
9411
9454
|
evaluateTemplate,
|
|
9412
9455
|
event,
|
|
9413
9456
|
file,
|
|
9457
|
+
filterEnvSchemaByInstallPhase,
|
|
9414
9458
|
formatContextForPrompt,
|
|
9415
9459
|
formatMoneyMinorEstimate,
|
|
9416
9460
|
formatMoneyMinorRange,
|
|
@@ -9431,6 +9475,8 @@ var index_default = { z: import_v414.z };
|
|
|
9431
9475
|
isDeveloperContext,
|
|
9432
9476
|
isFailure,
|
|
9433
9477
|
isModelDependency,
|
|
9478
|
+
isPostInstallEnvVar,
|
|
9479
|
+
isPreInstallEnvVar,
|
|
9434
9480
|
isProvisionContext,
|
|
9435
9481
|
isRetryable,
|
|
9436
9482
|
isRuntimeContext,
|
|
@@ -9452,6 +9498,7 @@ var index_default = { z: import_v414.z };
|
|
|
9452
9498
|
requeue,
|
|
9453
9499
|
resetSequencerBackendForTests,
|
|
9454
9500
|
resolveInputMappings,
|
|
9501
|
+
resolveInstallPhase,
|
|
9455
9502
|
resolveQueue,
|
|
9456
9503
|
resolveSequencer,
|
|
9457
9504
|
resource,
|
|
@@ -9465,6 +9512,7 @@ var index_default = { z: import_v414.z };
|
|
|
9465
9512
|
sequencerRelease,
|
|
9466
9513
|
server,
|
|
9467
9514
|
setup,
|
|
9515
|
+
splitProvisionEnvSchema,
|
|
9468
9516
|
toGsm7,
|
|
9469
9517
|
token,
|
|
9470
9518
|
validateCRMSchema,
|
|
@@ -123,6 +123,7 @@ export declare const CRMFieldSchemaZ: z.ZodObject<{
|
|
|
123
123
|
max: z.ZodOptional<z.ZodNumber>;
|
|
124
124
|
pattern: z.ZodOptional<z.ZodString>;
|
|
125
125
|
}, z.core.$strip>]>>;
|
|
126
|
+
section: z.ZodOptional<z.ZodString>;
|
|
126
127
|
}, z.core.$strip>;
|
|
127
128
|
export type CRMFieldSchema = z.infer<typeof CRMFieldSchemaZ>;
|
|
128
129
|
/**
|
|
@@ -178,6 +179,7 @@ export declare const CRMModelSchemaZ: z.ZodObject<{
|
|
|
178
179
|
max: z.ZodOptional<z.ZodNumber>;
|
|
179
180
|
pattern: z.ZodOptional<z.ZodString>;
|
|
180
181
|
}, z.core.$strip>]>>;
|
|
182
|
+
section: z.ZodOptional<z.ZodString>;
|
|
181
183
|
}, z.core.$strip>>;
|
|
182
184
|
}, z.core.$strip>;
|
|
183
185
|
export type CRMModelSchema = z.infer<typeof CRMModelSchemaZ>;
|
|
@@ -378,6 +380,7 @@ export declare const CRMSchemaZ: z.ZodObject<{
|
|
|
378
380
|
max: z.ZodOptional<z.ZodNumber>;
|
|
379
381
|
pattern: z.ZodOptional<z.ZodString>;
|
|
380
382
|
}, z.core.$strip>]>>;
|
|
383
|
+
section: z.ZodOptional<z.ZodString>;
|
|
381
384
|
}, z.core.$strip>>;
|
|
382
385
|
}, z.core.$strip>>;
|
|
383
386
|
relationships: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
package/dist/schemas.d.ts
CHANGED
|
@@ -1054,7 +1054,7 @@ export declare const EventWiringPanelComponentDefinitionSchema: z.ZodObject<{
|
|
|
1054
1054
|
eventTypes: z.ZodArray<z.ZodObject<{
|
|
1055
1055
|
type: z.ZodString;
|
|
1056
1056
|
label: z.ZodString;
|
|
1057
|
-
|
|
1057
|
+
sourceType: z.ZodOptional<z.ZodString>;
|
|
1058
1058
|
description: z.ZodOptional<z.ZodString>;
|
|
1059
1059
|
icon: z.ZodOptional<z.ZodString>;
|
|
1060
1060
|
}, z.core.$strip>>;
|
|
@@ -1419,7 +1419,7 @@ export declare const FormV2ComponentDefinitionSchema: z.ZodDiscriminatedUnion<[z
|
|
|
1419
1419
|
eventTypes: z.ZodArray<z.ZodObject<{
|
|
1420
1420
|
type: z.ZodString;
|
|
1421
1421
|
label: z.ZodString;
|
|
1422
|
-
|
|
1422
|
+
sourceType: z.ZodOptional<z.ZodString>;
|
|
1423
1423
|
description: z.ZodOptional<z.ZodString>;
|
|
1424
1424
|
icon: z.ZodOptional<z.ZodString>;
|
|
1425
1425
|
}, z.core.$strip>>;
|
|
@@ -1718,7 +1718,7 @@ export declare const FormV2PropsDefinitionSchema: z.ZodObject<{
|
|
|
1718
1718
|
eventTypes: z.ZodArray<z.ZodObject<{
|
|
1719
1719
|
type: z.ZodString;
|
|
1720
1720
|
label: z.ZodString;
|
|
1721
|
-
|
|
1721
|
+
sourceType: z.ZodOptional<z.ZodString>;
|
|
1722
1722
|
description: z.ZodOptional<z.ZodString>;
|
|
1723
1723
|
icon: z.ZodOptional<z.ZodString>;
|
|
1724
1724
|
}, z.core.$strip>>;
|
|
@@ -2058,7 +2058,7 @@ export declare const CardBlockDefinitionSchema: z.ZodObject<{
|
|
|
2058
2058
|
eventTypes: z.ZodArray<z.ZodObject<{
|
|
2059
2059
|
type: z.ZodString;
|
|
2060
2060
|
label: z.ZodString;
|
|
2061
|
-
|
|
2061
|
+
sourceType: z.ZodOptional<z.ZodString>;
|
|
2062
2062
|
description: z.ZodOptional<z.ZodString>;
|
|
2063
2063
|
icon: z.ZodOptional<z.ZodString>;
|
|
2064
2064
|
}, z.core.$strip>>;
|
|
@@ -2497,7 +2497,7 @@ export declare const PageBlockDefinitionSchema: z.ZodUnion<readonly [z.ZodObject
|
|
|
2497
2497
|
eventTypes: z.ZodArray<z.ZodObject<{
|
|
2498
2498
|
type: z.ZodString;
|
|
2499
2499
|
label: z.ZodString;
|
|
2500
|
-
|
|
2500
|
+
sourceType: z.ZodOptional<z.ZodString>;
|
|
2501
2501
|
description: z.ZodOptional<z.ZodString>;
|
|
2502
2502
|
icon: z.ZodOptional<z.ZodString>;
|
|
2503
2503
|
}, z.core.$strip>>;
|
|
@@ -3044,7 +3044,7 @@ export declare const PageDefinitionSchema: z.ZodObject<{
|
|
|
3044
3044
|
eventTypes: z.ZodArray<z.ZodObject<{
|
|
3045
3045
|
type: z.ZodString;
|
|
3046
3046
|
label: z.ZodString;
|
|
3047
|
-
|
|
3047
|
+
sourceType: z.ZodOptional<z.ZodString>;
|
|
3048
3048
|
description: z.ZodOptional<z.ZodString>;
|
|
3049
3049
|
icon: z.ZodOptional<z.ZodString>;
|
|
3050
3050
|
}, z.core.$strip>>;
|
|
@@ -4121,7 +4121,7 @@ export declare const ProvisionConfigSchema: z.ZodObject<{
|
|
|
4121
4121
|
eventTypes: z.ZodArray<z.ZodObject<{
|
|
4122
4122
|
type: z.ZodString;
|
|
4123
4123
|
label: z.ZodString;
|
|
4124
|
-
|
|
4124
|
+
sourceType: z.ZodOptional<z.ZodString>;
|
|
4125
4125
|
description: z.ZodOptional<z.ZodString>;
|
|
4126
4126
|
icon: z.ZodOptional<z.ZodString>;
|
|
4127
4127
|
}, z.core.$strip>>;
|
|
@@ -4970,7 +4970,7 @@ export declare const SkedyulConfigSchema: z.ZodObject<{
|
|
|
4970
4970
|
eventTypes: z.ZodArray<z.ZodObject<{
|
|
4971
4971
|
type: z.ZodString;
|
|
4972
4972
|
label: z.ZodString;
|
|
4973
|
-
|
|
4973
|
+
sourceType: z.ZodOptional<z.ZodString>;
|
|
4974
4974
|
description: z.ZodOptional<z.ZodString>;
|
|
4975
4975
|
icon: z.ZodOptional<z.ZodString>;
|
|
4976
4976
|
}, z.core.$strip>>;
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
* Link structure for navigating to CRM views or external URLs.
|
|
8
8
|
*/
|
|
9
9
|
export interface DataBlockLink {
|
|
10
|
+
/** App CRM entity handle (e.g. "class", "booking") for UI map gating */
|
|
11
|
+
entityHandle?: string;
|
|
10
12
|
modelHandle?: string;
|
|
11
13
|
modelHandlePlural?: string;
|
|
12
14
|
modelLabel?: string;
|
|
@@ -49,6 +51,8 @@ export interface ProfileAvatar {
|
|
|
49
51
|
export interface ProfileField {
|
|
50
52
|
label: string;
|
|
51
53
|
value: string;
|
|
54
|
+
/** Optional CRM navigation for this field value */
|
|
55
|
+
link?: DataBlockLink;
|
|
52
56
|
}
|
|
53
57
|
/**
|
|
54
58
|
* Profile block - entity card with key fields.
|
package/dist/types/webhook.d.ts
CHANGED
|
@@ -78,7 +78,7 @@ export interface CommunicationChannelLifecycleContext extends WebhookLifecycleCo
|
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
80
|
export interface WebhookLifecycleResult {
|
|
81
|
-
/** External ID from the provider (e.g.,
|
|
81
|
+
/** External ID from the provider (e.g., phone number SID) */
|
|
82
82
|
externalId: string;
|
|
83
83
|
/** Optional message describing what was configured */
|
|
84
84
|
message?: string;
|
|
@@ -93,7 +93,7 @@ export type WebhookLifecycleHook<TContext = WebhookLifecycleContext> = (context:
|
|
|
93
93
|
/**
|
|
94
94
|
* Webhook invocation mode - determines how responses are handled.
|
|
95
95
|
* - WEBHOOK: Fire-and-forget. Returns 200 immediately, processes asynchronously.
|
|
96
|
-
* - CALLBACK: Waits for handler response and returns it to the caller (e.g.,
|
|
96
|
+
* - CALLBACK: Waits for handler response and returns it to the caller (e.g., voice XML).
|
|
97
97
|
*/
|
|
98
98
|
export type WebhookInvocationMode = 'WEBHOOK' | 'CALLBACK';
|
|
99
99
|
/**
|
|
@@ -107,7 +107,7 @@ export interface WebhookDefinition {
|
|
|
107
107
|
methods?: ('GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH')[];
|
|
108
108
|
/**
|
|
109
109
|
* Invocation mode. Defaults to 'WEBHOOK' (fire-and-forget).
|
|
110
|
-
* Use 'CALLBACK' when the caller expects the handler's response (e.g.,
|
|
110
|
+
* Use 'CALLBACK' when the caller expects the handler's response (e.g., voice XML).
|
|
111
111
|
*/
|
|
112
112
|
type?: WebhookInvocationMode;
|
|
113
113
|
handler: WebhookHandler;
|