skedyul 1.7.15 → 1.7.17
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 +27 -9
- package/dist/index.js +28 -9
- package/dist/schemas/crm-schema.d.ts +3 -0
- package/dist/schemas.d.ts +51 -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
|
+
1786320274767
|
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"),
|
|
@@ -1335,6 +1340,14 @@ var EntityRelationshipDefinitionSchema = z8.object({
|
|
|
1335
1340
|
targetEntity: z8.string().optional(),
|
|
1336
1341
|
description: z8.string().optional()
|
|
1337
1342
|
});
|
|
1343
|
+
var EntityCrmMapDefaultsSchema = z8.object({
|
|
1344
|
+
modelHandle: z8.string(),
|
|
1345
|
+
matchFieldHandle: z8.string().optional(),
|
|
1346
|
+
matchRuleEntityPaths: z8.array(z8.string()).optional(),
|
|
1347
|
+
fieldHandles: z8.record(z8.string(), z8.string()),
|
|
1348
|
+
relationshipHandles: z8.record(z8.string(), z8.string()).optional(),
|
|
1349
|
+
valueAliases: z8.record(z8.string(), z8.record(z8.string(), z8.string())).optional()
|
|
1350
|
+
});
|
|
1338
1351
|
var EntityDefinitionSchema = z8.object({
|
|
1339
1352
|
handle: z8.string(),
|
|
1340
1353
|
label: z8.string(),
|
|
@@ -1342,7 +1355,8 @@ var EntityDefinitionSchema = z8.object({
|
|
|
1342
1355
|
description: z8.string().optional(),
|
|
1343
1356
|
fields: z8.array(EntityFieldDefinitionSchema),
|
|
1344
1357
|
contextFields: z8.array(EntityFieldDefinitionSchema).optional(),
|
|
1345
|
-
relationships: z8.array(EntityRelationshipDefinitionSchema).optional()
|
|
1358
|
+
relationships: z8.array(EntityRelationshipDefinitionSchema).optional(),
|
|
1359
|
+
crmMapDefaults: EntityCrmMapDefaultsSchema.optional()
|
|
1346
1360
|
});
|
|
1347
1361
|
var RelationshipCardinalitySchema = z8.enum([
|
|
1348
1362
|
"ONE_TO_ONE",
|
|
@@ -1655,7 +1669,7 @@ var EventWiringPanelComponentDefinitionSchema = FormV2StylePropsSchema.extend({
|
|
|
1655
1669
|
z8.object({
|
|
1656
1670
|
type: z8.string(),
|
|
1657
1671
|
label: z8.string(),
|
|
1658
|
-
|
|
1672
|
+
sourceType: z8.string().optional(),
|
|
1659
1673
|
description: z8.string().optional(),
|
|
1660
1674
|
icon: z8.string().optional()
|
|
1661
1675
|
})
|
|
@@ -1914,7 +1928,10 @@ var SetupStepDefinitionSchema = z8.object({
|
|
|
1914
1928
|
envKeys: z8.array(z8.string()).optional(),
|
|
1915
1929
|
listenToCrm: z8.boolean().optional(),
|
|
1916
1930
|
listenToEnv: z8.boolean().optional(),
|
|
1917
|
-
capabilities: z8.array(z8.string()).optional()
|
|
1931
|
+
capabilities: z8.array(z8.string()).optional(),
|
|
1932
|
+
actionTool: z8.string().optional(),
|
|
1933
|
+
actionLabel: z8.string().optional(),
|
|
1934
|
+
href: z8.string().optional()
|
|
1918
1935
|
});
|
|
1919
1936
|
var BatchPaginationSchema = z8.object({
|
|
1920
1937
|
hasMore: z8.boolean(),
|
|
@@ -2574,7 +2591,7 @@ var communicationChannel = {
|
|
|
2574
2591
|
* Receive an inbound message on a communication channel.
|
|
2575
2592
|
*
|
|
2576
2593
|
* This is typically called from webhook handlers to process incoming messages
|
|
2577
|
-
* (e.g., SMS
|
|
2594
|
+
* (e.g., SMS, email, or messaging-channel providers).
|
|
2578
2595
|
*
|
|
2579
2596
|
* @example
|
|
2580
2597
|
* ```ts
|
|
@@ -2583,7 +2600,7 @@ var communicationChannel = {
|
|
|
2583
2600
|
* communicationChannelId: channel.id,
|
|
2584
2601
|
* from: '+1234567890',
|
|
2585
2602
|
* message: 'Hello!',
|
|
2586
|
-
* remoteId: '
|
|
2603
|
+
* remoteId: 'provider-message-id-123',
|
|
2587
2604
|
* });
|
|
2588
2605
|
* ```
|
|
2589
2606
|
*/
|
|
@@ -3238,14 +3255,14 @@ var webhook = {
|
|
|
3238
3255
|
*
|
|
3239
3256
|
* @example
|
|
3240
3257
|
* ```ts
|
|
3241
|
-
* // Create a webhook for
|
|
3258
|
+
* // Create a webhook for provider compliance callbacks
|
|
3242
3259
|
* const { url, id } = await webhook.create('compliance_status', {
|
|
3243
3260
|
* bundleSid: bundle.sid,
|
|
3244
3261
|
* complianceRecordId: record.id,
|
|
3245
3262
|
* })
|
|
3246
3263
|
*
|
|
3247
|
-
* // Pass the URL to
|
|
3248
|
-
* await
|
|
3264
|
+
* // Pass the URL to the upstream provider
|
|
3265
|
+
* await providerClient.updateBundle(bundle.sid, {
|
|
3249
3266
|
* statusCallback: url,
|
|
3250
3267
|
* })
|
|
3251
3268
|
* ```
|
|
@@ -8829,6 +8846,7 @@ export {
|
|
|
8829
8846
|
DatePickerComponentDefinitionSchema,
|
|
8830
8847
|
DayOfWeekSchema,
|
|
8831
8848
|
EmptyFormComponentDefinitionSchema,
|
|
8849
|
+
EntityCrmMapDefaultsSchema,
|
|
8832
8850
|
EntityDefinitionSchema,
|
|
8833
8851
|
EntityFieldDefinitionSchema,
|
|
8834
8852
|
EntityRelationshipDefinitionSchema,
|
package/dist/index.js
CHANGED
|
@@ -88,6 +88,7 @@ __export(index_exports, {
|
|
|
88
88
|
DatePickerComponentDefinitionSchema: () => DatePickerComponentDefinitionSchema,
|
|
89
89
|
DayOfWeekSchema: () => DayOfWeekSchema,
|
|
90
90
|
EmptyFormComponentDefinitionSchema: () => EmptyFormComponentDefinitionSchema,
|
|
91
|
+
EntityCrmMapDefaultsSchema: () => EntityCrmMapDefaultsSchema,
|
|
91
92
|
EntityDefinitionSchema: () => EntityDefinitionSchema,
|
|
92
93
|
EntityFieldDefinitionSchema: () => EntityFieldDefinitionSchema,
|
|
93
94
|
EntityRelationshipDefinitionSchema: () => EntityRelationshipDefinitionSchema,
|
|
@@ -764,7 +765,12 @@ var CRMFieldSchemaZ = import_v43.z.object({
|
|
|
764
765
|
unique: import_v43.z.boolean().optional(),
|
|
765
766
|
list: import_v43.z.boolean().optional(),
|
|
766
767
|
default: import_v43.z.unknown().optional(),
|
|
767
|
-
definition: CRMFieldDefinitionSchema.optional()
|
|
768
|
+
definition: CRMFieldDefinitionSchema.optional(),
|
|
769
|
+
/**
|
|
770
|
+
* Workplace-scoped field section handle (visualization helper).
|
|
771
|
+
* Find-or-create on apply; display name is derived from the handle on create.
|
|
772
|
+
*/
|
|
773
|
+
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()
|
|
768
774
|
});
|
|
769
775
|
var CRMModelSchemaZ = import_v43.z.object({
|
|
770
776
|
handle: import_v43.z.string().regex(/^[a-z][a-z0-9_]*$/, "Handle must be lowercase alphanumeric with underscores, starting with a letter"),
|
|
@@ -1723,6 +1729,14 @@ var EntityRelationshipDefinitionSchema = import_v48.z.object({
|
|
|
1723
1729
|
targetEntity: import_v48.z.string().optional(),
|
|
1724
1730
|
description: import_v48.z.string().optional()
|
|
1725
1731
|
});
|
|
1732
|
+
var EntityCrmMapDefaultsSchema = import_v48.z.object({
|
|
1733
|
+
modelHandle: import_v48.z.string(),
|
|
1734
|
+
matchFieldHandle: import_v48.z.string().optional(),
|
|
1735
|
+
matchRuleEntityPaths: import_v48.z.array(import_v48.z.string()).optional(),
|
|
1736
|
+
fieldHandles: import_v48.z.record(import_v48.z.string(), import_v48.z.string()),
|
|
1737
|
+
relationshipHandles: import_v48.z.record(import_v48.z.string(), import_v48.z.string()).optional(),
|
|
1738
|
+
valueAliases: import_v48.z.record(import_v48.z.string(), import_v48.z.record(import_v48.z.string(), import_v48.z.string())).optional()
|
|
1739
|
+
});
|
|
1726
1740
|
var EntityDefinitionSchema = import_v48.z.object({
|
|
1727
1741
|
handle: import_v48.z.string(),
|
|
1728
1742
|
label: import_v48.z.string(),
|
|
@@ -1730,7 +1744,8 @@ var EntityDefinitionSchema = import_v48.z.object({
|
|
|
1730
1744
|
description: import_v48.z.string().optional(),
|
|
1731
1745
|
fields: import_v48.z.array(EntityFieldDefinitionSchema),
|
|
1732
1746
|
contextFields: import_v48.z.array(EntityFieldDefinitionSchema).optional(),
|
|
1733
|
-
relationships: import_v48.z.array(EntityRelationshipDefinitionSchema).optional()
|
|
1747
|
+
relationships: import_v48.z.array(EntityRelationshipDefinitionSchema).optional(),
|
|
1748
|
+
crmMapDefaults: EntityCrmMapDefaultsSchema.optional()
|
|
1734
1749
|
});
|
|
1735
1750
|
var RelationshipCardinalitySchema = import_v48.z.enum([
|
|
1736
1751
|
"ONE_TO_ONE",
|
|
@@ -2043,7 +2058,7 @@ var EventWiringPanelComponentDefinitionSchema = FormV2StylePropsSchema.extend({
|
|
|
2043
2058
|
import_v48.z.object({
|
|
2044
2059
|
type: import_v48.z.string(),
|
|
2045
2060
|
label: import_v48.z.string(),
|
|
2046
|
-
|
|
2061
|
+
sourceType: import_v48.z.string().optional(),
|
|
2047
2062
|
description: import_v48.z.string().optional(),
|
|
2048
2063
|
icon: import_v48.z.string().optional()
|
|
2049
2064
|
})
|
|
@@ -2302,7 +2317,10 @@ var SetupStepDefinitionSchema = import_v48.z.object({
|
|
|
2302
2317
|
envKeys: import_v48.z.array(import_v48.z.string()).optional(),
|
|
2303
2318
|
listenToCrm: import_v48.z.boolean().optional(),
|
|
2304
2319
|
listenToEnv: import_v48.z.boolean().optional(),
|
|
2305
|
-
capabilities: import_v48.z.array(import_v48.z.string()).optional()
|
|
2320
|
+
capabilities: import_v48.z.array(import_v48.z.string()).optional(),
|
|
2321
|
+
actionTool: import_v48.z.string().optional(),
|
|
2322
|
+
actionLabel: import_v48.z.string().optional(),
|
|
2323
|
+
href: import_v48.z.string().optional()
|
|
2306
2324
|
});
|
|
2307
2325
|
var BatchPaginationSchema = import_v48.z.object({
|
|
2308
2326
|
hasMore: import_v48.z.boolean(),
|
|
@@ -2962,7 +2980,7 @@ var communicationChannel = {
|
|
|
2962
2980
|
* Receive an inbound message on a communication channel.
|
|
2963
2981
|
*
|
|
2964
2982
|
* This is typically called from webhook handlers to process incoming messages
|
|
2965
|
-
* (e.g., SMS
|
|
2983
|
+
* (e.g., SMS, email, or messaging-channel providers).
|
|
2966
2984
|
*
|
|
2967
2985
|
* @example
|
|
2968
2986
|
* ```ts
|
|
@@ -2971,7 +2989,7 @@ var communicationChannel = {
|
|
|
2971
2989
|
* communicationChannelId: channel.id,
|
|
2972
2990
|
* from: '+1234567890',
|
|
2973
2991
|
* message: 'Hello!',
|
|
2974
|
-
* remoteId: '
|
|
2992
|
+
* remoteId: 'provider-message-id-123',
|
|
2975
2993
|
* });
|
|
2976
2994
|
* ```
|
|
2977
2995
|
*/
|
|
@@ -3626,14 +3644,14 @@ var webhook = {
|
|
|
3626
3644
|
*
|
|
3627
3645
|
* @example
|
|
3628
3646
|
* ```ts
|
|
3629
|
-
* // Create a webhook for
|
|
3647
|
+
* // Create a webhook for provider compliance callbacks
|
|
3630
3648
|
* const { url, id } = await webhook.create('compliance_status', {
|
|
3631
3649
|
* bundleSid: bundle.sid,
|
|
3632
3650
|
* complianceRecordId: record.id,
|
|
3633
3651
|
* })
|
|
3634
3652
|
*
|
|
3635
|
-
* // Pass the URL to
|
|
3636
|
-
* await
|
|
3653
|
+
* // Pass the URL to the upstream provider
|
|
3654
|
+
* await providerClient.updateBundle(bundle.sid, {
|
|
3637
3655
|
* statusCallback: url,
|
|
3638
3656
|
* })
|
|
3639
3657
|
* ```
|
|
@@ -9218,6 +9236,7 @@ var index_default = { z: import_v414.z };
|
|
|
9218
9236
|
DatePickerComponentDefinitionSchema,
|
|
9219
9237
|
DayOfWeekSchema,
|
|
9220
9238
|
EmptyFormComponentDefinitionSchema,
|
|
9239
|
+
EntityCrmMapDefaultsSchema,
|
|
9221
9240
|
EntityDefinitionSchema,
|
|
9222
9241
|
EntityFieldDefinitionSchema,
|
|
9223
9242
|
EntityRelationshipDefinitionSchema,
|
|
@@ -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
|
@@ -394,6 +394,15 @@ export declare const EntityRelationshipDefinitionSchema: z.ZodObject<{
|
|
|
394
394
|
targetEntity: z.ZodOptional<z.ZodString>;
|
|
395
395
|
description: z.ZodOptional<z.ZodString>;
|
|
396
396
|
}, z.core.$strip>;
|
|
397
|
+
/** Suggested CRM map defaults declared on an entity (consumed generically by core). */
|
|
398
|
+
export declare const EntityCrmMapDefaultsSchema: z.ZodObject<{
|
|
399
|
+
modelHandle: z.ZodString;
|
|
400
|
+
matchFieldHandle: z.ZodOptional<z.ZodString>;
|
|
401
|
+
matchRuleEntityPaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
402
|
+
fieldHandles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
403
|
+
relationshipHandles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
404
|
+
valueAliases: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
405
|
+
}, z.core.$strip>;
|
|
397
406
|
export declare const EntityDefinitionSchema: z.ZodObject<{
|
|
398
407
|
handle: z.ZodString;
|
|
399
408
|
label: z.ZodString;
|
|
@@ -447,6 +456,14 @@ export declare const EntityDefinitionSchema: z.ZodObject<{
|
|
|
447
456
|
targetEntity: z.ZodOptional<z.ZodString>;
|
|
448
457
|
description: z.ZodOptional<z.ZodString>;
|
|
449
458
|
}, z.core.$strip>>>;
|
|
459
|
+
crmMapDefaults: z.ZodOptional<z.ZodObject<{
|
|
460
|
+
modelHandle: z.ZodString;
|
|
461
|
+
matchFieldHandle: z.ZodOptional<z.ZodString>;
|
|
462
|
+
matchRuleEntityPaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
463
|
+
fieldHandles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
464
|
+
relationshipHandles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
465
|
+
valueAliases: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
466
|
+
}, z.core.$strip>>;
|
|
450
467
|
}, z.core.$strip>;
|
|
451
468
|
export declare const RelationshipCardinalitySchema: z.ZodEnum<{
|
|
452
469
|
ONE_TO_ONE: "ONE_TO_ONE";
|
|
@@ -1054,7 +1071,7 @@ export declare const EventWiringPanelComponentDefinitionSchema: z.ZodObject<{
|
|
|
1054
1071
|
eventTypes: z.ZodArray<z.ZodObject<{
|
|
1055
1072
|
type: z.ZodString;
|
|
1056
1073
|
label: z.ZodString;
|
|
1057
|
-
|
|
1074
|
+
sourceType: z.ZodOptional<z.ZodString>;
|
|
1058
1075
|
description: z.ZodOptional<z.ZodString>;
|
|
1059
1076
|
icon: z.ZodOptional<z.ZodString>;
|
|
1060
1077
|
}, z.core.$strip>>;
|
|
@@ -1419,7 +1436,7 @@ export declare const FormV2ComponentDefinitionSchema: z.ZodDiscriminatedUnion<[z
|
|
|
1419
1436
|
eventTypes: z.ZodArray<z.ZodObject<{
|
|
1420
1437
|
type: z.ZodString;
|
|
1421
1438
|
label: z.ZodString;
|
|
1422
|
-
|
|
1439
|
+
sourceType: z.ZodOptional<z.ZodString>;
|
|
1423
1440
|
description: z.ZodOptional<z.ZodString>;
|
|
1424
1441
|
icon: z.ZodOptional<z.ZodString>;
|
|
1425
1442
|
}, z.core.$strip>>;
|
|
@@ -1718,7 +1735,7 @@ export declare const FormV2PropsDefinitionSchema: z.ZodObject<{
|
|
|
1718
1735
|
eventTypes: z.ZodArray<z.ZodObject<{
|
|
1719
1736
|
type: z.ZodString;
|
|
1720
1737
|
label: z.ZodString;
|
|
1721
|
-
|
|
1738
|
+
sourceType: z.ZodOptional<z.ZodString>;
|
|
1722
1739
|
description: z.ZodOptional<z.ZodString>;
|
|
1723
1740
|
icon: z.ZodOptional<z.ZodString>;
|
|
1724
1741
|
}, z.core.$strip>>;
|
|
@@ -2058,7 +2075,7 @@ export declare const CardBlockDefinitionSchema: z.ZodObject<{
|
|
|
2058
2075
|
eventTypes: z.ZodArray<z.ZodObject<{
|
|
2059
2076
|
type: z.ZodString;
|
|
2060
2077
|
label: z.ZodString;
|
|
2061
|
-
|
|
2078
|
+
sourceType: z.ZodOptional<z.ZodString>;
|
|
2062
2079
|
description: z.ZodOptional<z.ZodString>;
|
|
2063
2080
|
icon: z.ZodOptional<z.ZodString>;
|
|
2064
2081
|
}, z.core.$strip>>;
|
|
@@ -2497,7 +2514,7 @@ export declare const PageBlockDefinitionSchema: z.ZodUnion<readonly [z.ZodObject
|
|
|
2497
2514
|
eventTypes: z.ZodArray<z.ZodObject<{
|
|
2498
2515
|
type: z.ZodString;
|
|
2499
2516
|
label: z.ZodString;
|
|
2500
|
-
|
|
2517
|
+
sourceType: z.ZodOptional<z.ZodString>;
|
|
2501
2518
|
description: z.ZodOptional<z.ZodString>;
|
|
2502
2519
|
icon: z.ZodOptional<z.ZodString>;
|
|
2503
2520
|
}, z.core.$strip>>;
|
|
@@ -3044,7 +3061,7 @@ export declare const PageDefinitionSchema: z.ZodObject<{
|
|
|
3044
3061
|
eventTypes: z.ZodArray<z.ZodObject<{
|
|
3045
3062
|
type: z.ZodString;
|
|
3046
3063
|
label: z.ZodString;
|
|
3047
|
-
|
|
3064
|
+
sourceType: z.ZodOptional<z.ZodString>;
|
|
3048
3065
|
description: z.ZodOptional<z.ZodString>;
|
|
3049
3066
|
icon: z.ZodOptional<z.ZodString>;
|
|
3050
3067
|
}, z.core.$strip>>;
|
|
@@ -3400,6 +3417,9 @@ export declare const SetupStepDefinitionSchema: z.ZodObject<{
|
|
|
3400
3417
|
listenToCrm: z.ZodOptional<z.ZodBoolean>;
|
|
3401
3418
|
listenToEnv: z.ZodOptional<z.ZodBoolean>;
|
|
3402
3419
|
capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3420
|
+
actionTool: z.ZodOptional<z.ZodString>;
|
|
3421
|
+
actionLabel: z.ZodOptional<z.ZodString>;
|
|
3422
|
+
href: z.ZodOptional<z.ZodString>;
|
|
3403
3423
|
}, z.core.$strip>;
|
|
3404
3424
|
export declare const BatchPaginationSchema: z.ZodObject<{
|
|
3405
3425
|
hasMore: z.ZodBoolean;
|
|
@@ -3632,6 +3652,14 @@ export declare const ProvisionConfigSchema: z.ZodObject<{
|
|
|
3632
3652
|
targetEntity: z.ZodOptional<z.ZodString>;
|
|
3633
3653
|
description: z.ZodOptional<z.ZodString>;
|
|
3634
3654
|
}, z.core.$strip>>>;
|
|
3655
|
+
crmMapDefaults: z.ZodOptional<z.ZodObject<{
|
|
3656
|
+
modelHandle: z.ZodString;
|
|
3657
|
+
matchFieldHandle: z.ZodOptional<z.ZodString>;
|
|
3658
|
+
matchRuleEntityPaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3659
|
+
fieldHandles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
3660
|
+
relationshipHandles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
3661
|
+
valueAliases: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
3662
|
+
}, z.core.$strip>>;
|
|
3635
3663
|
}, z.core.$strip>>>;
|
|
3636
3664
|
relationships: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3637
3665
|
source: z.ZodObject<{
|
|
@@ -4121,7 +4149,7 @@ export declare const ProvisionConfigSchema: z.ZodObject<{
|
|
|
4121
4149
|
eventTypes: z.ZodArray<z.ZodObject<{
|
|
4122
4150
|
type: z.ZodString;
|
|
4123
4151
|
label: z.ZodString;
|
|
4124
|
-
|
|
4152
|
+
sourceType: z.ZodOptional<z.ZodString>;
|
|
4125
4153
|
description: z.ZodOptional<z.ZodString>;
|
|
4126
4154
|
icon: z.ZodOptional<z.ZodString>;
|
|
4127
4155
|
}, z.core.$strip>>;
|
|
@@ -4270,6 +4298,9 @@ export declare const ProvisionConfigSchema: z.ZodObject<{
|
|
|
4270
4298
|
listenToCrm: z.ZodOptional<z.ZodBoolean>;
|
|
4271
4299
|
listenToEnv: z.ZodOptional<z.ZodBoolean>;
|
|
4272
4300
|
capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4301
|
+
actionTool: z.ZodOptional<z.ZodString>;
|
|
4302
|
+
actionLabel: z.ZodOptional<z.ZodString>;
|
|
4303
|
+
href: z.ZodOptional<z.ZodString>;
|
|
4273
4304
|
}, z.core.$strip>>>;
|
|
4274
4305
|
batchOperations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
4275
4306
|
handle: z.ZodString;
|
|
@@ -4481,6 +4512,14 @@ export declare const SkedyulConfigSchema: z.ZodObject<{
|
|
|
4481
4512
|
targetEntity: z.ZodOptional<z.ZodString>;
|
|
4482
4513
|
description: z.ZodOptional<z.ZodString>;
|
|
4483
4514
|
}, z.core.$strip>>>;
|
|
4515
|
+
crmMapDefaults: z.ZodOptional<z.ZodObject<{
|
|
4516
|
+
modelHandle: z.ZodString;
|
|
4517
|
+
matchFieldHandle: z.ZodOptional<z.ZodString>;
|
|
4518
|
+
matchRuleEntityPaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4519
|
+
fieldHandles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
4520
|
+
relationshipHandles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
4521
|
+
valueAliases: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
4522
|
+
}, z.core.$strip>>;
|
|
4484
4523
|
}, z.core.$strip>>>;
|
|
4485
4524
|
relationships: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
4486
4525
|
source: z.ZodObject<{
|
|
@@ -4970,7 +5009,7 @@ export declare const SkedyulConfigSchema: z.ZodObject<{
|
|
|
4970
5009
|
eventTypes: z.ZodArray<z.ZodObject<{
|
|
4971
5010
|
type: z.ZodString;
|
|
4972
5011
|
label: z.ZodString;
|
|
4973
|
-
|
|
5012
|
+
sourceType: z.ZodOptional<z.ZodString>;
|
|
4974
5013
|
description: z.ZodOptional<z.ZodString>;
|
|
4975
5014
|
icon: z.ZodOptional<z.ZodString>;
|
|
4976
5015
|
}, z.core.$strip>>;
|
|
@@ -5119,6 +5158,9 @@ export declare const SkedyulConfigSchema: z.ZodObject<{
|
|
|
5119
5158
|
listenToCrm: z.ZodOptional<z.ZodBoolean>;
|
|
5120
5159
|
listenToEnv: z.ZodOptional<z.ZodBoolean>;
|
|
5121
5160
|
capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5161
|
+
actionTool: z.ZodOptional<z.ZodString>;
|
|
5162
|
+
actionLabel: z.ZodOptional<z.ZodString>;
|
|
5163
|
+
href: z.ZodOptional<z.ZodString>;
|
|
5122
5164
|
}, z.core.$strip>>>;
|
|
5123
5165
|
batchOperations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5124
5166
|
handle: z.ZodString;
|
|
@@ -5188,6 +5230,7 @@ export type ModelFieldDefinition = z.infer<typeof ModelFieldDefinitionSchema>;
|
|
|
5188
5230
|
export type ModelDefinition = z.infer<typeof ModelDefinitionSchema>;
|
|
5189
5231
|
export type EntityFieldDefinition = z.infer<typeof EntityFieldDefinitionSchema>;
|
|
5190
5232
|
export type EntityRelationshipDefinition = z.infer<typeof EntityRelationshipDefinitionSchema>;
|
|
5233
|
+
export type EntityCrmMapDefaults = z.infer<typeof EntityCrmMapDefaultsSchema>;
|
|
5191
5234
|
export type EntityDefinition = z.infer<typeof EntityDefinitionSchema>;
|
|
5192
5235
|
export type ChannelCapabilityType = z.infer<typeof ChannelCapabilityTypeSchema>;
|
|
5193
5236
|
export type ChannelCapability = z.infer<typeof ChannelCapabilitySchema>;
|
|
@@ -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;
|