@proteos/sdk 0.61.0 → 0.76.0
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/{chunk-OOOTPEJK.js → chunk-C5642XOH.js} +79 -11
- package/dist/chunk-C5642XOH.js.map +1 -0
- package/dist/{chunk-25PD6TYH.cjs → chunk-Z773P4RO.cjs} +85 -10
- package/dist/chunk-Z773P4RO.cjs.map +1 -0
- package/dist/index.cjs +387 -130
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +815 -81
- package/dist/index.d.ts +815 -81
- package/dist/index.js +250 -13
- package/dist/index.js.map +1 -1
- package/dist/meta/index.cjs +117 -89
- package/dist/meta/index.d.cts +1 -1
- package/dist/meta/index.d.ts +1 -1
- package/dist/meta/index.js +1 -1
- package/dist/{types-DQmqR_G8.d.cts → types-Bn5y5wHZ.d.cts} +744 -48
- package/dist/{types-DQmqR_G8.d.ts → types-Bn5y5wHZ.d.ts} +744 -48
- package/package.json +1 -1
- package/src/agent/session-types.ts +8 -1
- package/src/agent/sessions.ts +6 -4
- package/src/agent/types.ts +9 -0
- package/src/auth/platform-entities.ts +6 -0
- package/src/client.ts +28 -4
- package/src/conversation/index.ts +327 -15
- package/src/conversation/types.ts +596 -5
- package/src/data/entity-indexes.ts +54 -0
- package/src/data/index.ts +12 -0
- package/src/data/types.ts +66 -0
- package/src/errors.ts +5 -0
- package/src/index.ts +60 -0
- package/src/meta/components.ts +23 -3
- package/src/meta/index.ts +11 -0
- package/src/meta/layout/common-props.ts +9 -0
- package/src/meta/layout/elements.ts +57 -0
- package/src/meta/layout/index.ts +5 -0
- package/src/meta/layout/page-layout.ts +15 -3
- package/src/meta/types.ts +253 -21
- package/src/scheduling/types.ts +5 -1
- package/src/workflow/types.ts +10 -2
- package/dist/chunk-25PD6TYH.cjs.map +0 -1
- package/dist/chunk-OOOTPEJK.js.map +0 -1
package/src/meta/types.ts
CHANGED
|
@@ -657,6 +657,24 @@ export interface EntityContactBindingInput {
|
|
|
657
657
|
duplicate_policy?: ContactBindingDuplicatePolicy
|
|
658
658
|
}
|
|
659
659
|
|
|
660
|
+
/**
|
|
661
|
+
* A composite unique constraint: no two records may share the same values for
|
|
662
|
+
* `attributes` (2+). One-attribute constraints are `is_unique` on the
|
|
663
|
+
* attribute. Enforced as a unique index on the record table; a violating write
|
|
664
|
+
* fails with 409 `record_unique_violation` naming the constraint.
|
|
665
|
+
*/
|
|
666
|
+
export interface UniqueConstraint {
|
|
667
|
+
/** snake_case, unique within the entity. */
|
|
668
|
+
name: string
|
|
669
|
+
/** Attribute names or object paths (`address.city`); never platform columns. */
|
|
670
|
+
attributes: string[]
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
export const UniqueConstraintSchema = z.object({
|
|
674
|
+
name: z.string(),
|
|
675
|
+
attributes: z.array(z.string()),
|
|
676
|
+
})
|
|
677
|
+
|
|
660
678
|
export interface Entity extends AuditFields {
|
|
661
679
|
slug: string
|
|
662
680
|
name: string
|
|
@@ -689,6 +707,8 @@ export interface Entity extends AuditFields {
|
|
|
689
707
|
*/
|
|
690
708
|
title_template: string
|
|
691
709
|
attributes: Attribute[]
|
|
710
|
+
/** Composite unique constraints; absent when none are declared. */
|
|
711
|
+
unique_constraints?: UniqueConstraint[]
|
|
692
712
|
}
|
|
693
713
|
|
|
694
714
|
export const EntitySchema = AuditFieldsSchema.extend({
|
|
@@ -706,6 +726,7 @@ export const EntitySchema = AuditFieldsSchema.extend({
|
|
|
706
726
|
// the wire.
|
|
707
727
|
title_template: z.string().default(''),
|
|
708
728
|
attributes: z.array(AttributeSchema),
|
|
729
|
+
unique_constraints: z.array(UniqueConstraintSchema).optional(),
|
|
709
730
|
})
|
|
710
731
|
|
|
711
732
|
/**
|
|
@@ -753,6 +774,11 @@ export interface CreateEntityRequest {
|
|
|
753
774
|
description: string
|
|
754
775
|
title_template?: string
|
|
755
776
|
attributes: Attribute[]
|
|
777
|
+
/**
|
|
778
|
+
* Composite unique constraints. Full-replacement on upsert: omitted means
|
|
779
|
+
* none (the `is_unique` ones travel with their attributes).
|
|
780
|
+
*/
|
|
781
|
+
unique_constraints?: UniqueConstraint[]
|
|
756
782
|
}
|
|
757
783
|
|
|
758
784
|
/**
|
|
@@ -771,6 +797,8 @@ export interface UpdateEntityRequest {
|
|
|
771
797
|
description?: string
|
|
772
798
|
title_template?: string
|
|
773
799
|
attributes?: Attribute[]
|
|
800
|
+
/** Omitted leaves the stored list alone; a list (empty included) replaces it. */
|
|
801
|
+
unique_constraints?: UniqueConstraint[]
|
|
774
802
|
}
|
|
775
803
|
|
|
776
804
|
// ============================================================================
|
|
@@ -905,6 +933,14 @@ export interface Component extends AuditFields {
|
|
|
905
933
|
bundle_file_id: string
|
|
906
934
|
/** FK to a tar.gz of the component source directory in storage (provenance / rebuild). Empty until deployed. */
|
|
907
935
|
source_file_id: string
|
|
936
|
+
/**
|
|
937
|
+
* Content address of the compiled bundle, `sha256:<hex>`, stamped server-side
|
|
938
|
+
* at deploy. Lets `pro module deploy` skip an unchanged upload and lets the
|
|
939
|
+
* runtime fetch the bundle under an immutable URL
|
|
940
|
+
* ({@link ComponentService.bundleUrl}). Absent on rows deployed before
|
|
941
|
+
* checksum stamping.
|
|
942
|
+
*/
|
|
943
|
+
bundle_checksum?: string
|
|
908
944
|
/** The component's JSON Schema, driving the page-designer props editor + runtime validation. `null` until set. */
|
|
909
945
|
props_schema: Record<string, unknown> | null
|
|
910
946
|
/**
|
|
@@ -914,6 +950,13 @@ export interface Component extends AuditFields {
|
|
|
914
950
|
* `functions.actions.invokePublic`.
|
|
915
951
|
*/
|
|
916
952
|
is_public: boolean
|
|
953
|
+
/**
|
|
954
|
+
* Height in px the host reserves for a placement of this component before
|
|
955
|
+
* it has rendered — when the page element sets no `reserved_height` and no
|
|
956
|
+
* earlier visit is remembered. Declared in the component's manifest.
|
|
957
|
+
* Absent / 0 = undeclared, the host default applies.
|
|
958
|
+
*/
|
|
959
|
+
reserved_height?: number
|
|
917
960
|
}
|
|
918
961
|
|
|
919
962
|
export const ComponentSchema = AuditFieldsSchema.extend({
|
|
@@ -923,6 +966,8 @@ export const ComponentSchema = AuditFieldsSchema.extend({
|
|
|
923
966
|
module_slug: z.string(),
|
|
924
967
|
bundle_file_id: z.string(),
|
|
925
968
|
source_file_id: z.string(),
|
|
969
|
+
bundle_checksum: z.string().optional(),
|
|
970
|
+
reserved_height: z.number().int().nonnegative().optional(),
|
|
926
971
|
// default(false): rows serialized before the flag existed lack the field.
|
|
927
972
|
props_schema: z.record(z.unknown()).nullable(),
|
|
928
973
|
is_public: z.boolean().default(false),
|
|
@@ -950,6 +995,8 @@ export interface CreateComponentRequest {
|
|
|
950
995
|
props_schema?: Record<string, unknown>
|
|
951
996
|
/** See {@link Component.is_public}. Manifest-driven: omitting it sets false. */
|
|
952
997
|
is_public?: boolean
|
|
998
|
+
/** See {@link Component.reserved_height}. Manifest-driven: omitting it sets 0. */
|
|
999
|
+
reserved_height?: number
|
|
953
1000
|
}
|
|
954
1001
|
|
|
955
1002
|
/**
|
|
@@ -962,6 +1009,7 @@ export interface UpdateComponentRequest {
|
|
|
962
1009
|
source_file_id?: string
|
|
963
1010
|
props_schema?: Record<string, unknown>
|
|
964
1011
|
is_public?: boolean
|
|
1012
|
+
reserved_height?: number
|
|
965
1013
|
}
|
|
966
1014
|
|
|
967
1015
|
// ============================================================================
|
|
@@ -1036,20 +1084,84 @@ export {
|
|
|
1036
1084
|
// ============================================================================
|
|
1037
1085
|
|
|
1038
1086
|
/**
|
|
1039
|
-
* What
|
|
1087
|
+
* What an action button invokes. Absent normalizes to `action` (buttons
|
|
1040
1088
|
* persisted before `kind` existed).
|
|
1041
1089
|
*/
|
|
1042
|
-
export type PageActionKind = 'action' | 'workflow'
|
|
1090
|
+
export type PageActionKind = 'action' | 'workflow' | 'agent' | 'intent' | 'link'
|
|
1091
|
+
|
|
1092
|
+
export const PageActionKindSchema = z.enum(['action', 'workflow', 'agent', 'intent', 'link'])
|
|
1093
|
+
|
|
1094
|
+
/** What a `kind: intent` button has the model prepare — a record proposal
|
|
1095
|
+
* (`*_record`) or an action's / workflow's inputs (`invoke_*`). */
|
|
1096
|
+
export type PageActionIntent =
|
|
1097
|
+
| 'create_record'
|
|
1098
|
+
| 'update_record'
|
|
1099
|
+
| 'upsert_record'
|
|
1100
|
+
| 'invoke_action'
|
|
1101
|
+
| 'invoke_workflow'
|
|
1102
|
+
|
|
1103
|
+
/** Most candidates an `upsert_record` button hands the model. */
|
|
1104
|
+
export const PAGE_ACTION_MATCH_MAX_LIMIT = 25
|
|
1105
|
+
|
|
1106
|
+
/**
|
|
1107
|
+
* The list query an `upsert_record` button finds its candidate records with —
|
|
1108
|
+
* a page of `entity` records, fetched when the button is pressed. `filter`
|
|
1109
|
+
* has the list endpoint's `_filter` shape; every element's `value` is a
|
|
1110
|
+
* Liquid template, and a value that renders empty yields NO candidates (never
|
|
1111
|
+
* a wider query). `sort` is `field:asc|desc`; `limit` defaults to 10.
|
|
1112
|
+
*/
|
|
1113
|
+
export interface PageActionMatch {
|
|
1114
|
+
filter?: FilterGroup
|
|
1115
|
+
sort?: string
|
|
1116
|
+
limit?: number
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
export const PageActionMatchSchema = z.object({
|
|
1120
|
+
filter: FilterGroupSchema.optional(),
|
|
1121
|
+
sort: z.string().optional(),
|
|
1122
|
+
limit: z.number().int().min(1).max(PAGE_ACTION_MATCH_MAX_LIMIT).optional(),
|
|
1123
|
+
})
|
|
1043
1124
|
|
|
1044
1125
|
/**
|
|
1045
|
-
*
|
|
1046
|
-
*
|
|
1047
|
-
*
|
|
1048
|
-
*
|
|
1049
|
-
*
|
|
1050
|
-
* `
|
|
1051
|
-
*
|
|
1052
|
-
*
|
|
1126
|
+
* One action button — a page's or a list's toolbar button, or a conversation
|
|
1127
|
+
* type's action (the strip in the call or meeting surface's footer, during
|
|
1128
|
+
* and after the conversation).
|
|
1129
|
+
* Which target it invokes follows from `kind`:
|
|
1130
|
+
*
|
|
1131
|
+
* - `action` → `action` (slug) + `params`
|
|
1132
|
+
* - `workflow` → `workflow` (key) + `inputs`
|
|
1133
|
+
* - `agent` → `agent` (key) + `prompt` + `context`: opens an Ava chat with
|
|
1134
|
+
* that agent; `prompt` becomes the visible first message (the label when
|
|
1135
|
+
* empty), `context` is handed to the model alongside it and never shown.
|
|
1136
|
+
* - `intent` → `intent` + `entity` (+ `record` | `match`) + `prompt` + `context`:
|
|
1137
|
+
* prepares a record proposal (one model call), shows it as an editable
|
|
1138
|
+
* review and saves only what the person confirms. `update_record` targets
|
|
1139
|
+
* `record` when set, else the surface's linked record of `entity`.
|
|
1140
|
+
* `upsert_record` hands the model the records `match` finds and lets it
|
|
1141
|
+
* change one of them or prepare a new record — `prompt` says how to choose.
|
|
1142
|
+
* `field_scope` (any intent) lists the attributes the proposal may fill,
|
|
1143
|
+
* replacing the app's bound create / edit page.
|
|
1144
|
+
* `invoke_action` / `invoke_workflow` open the invoke dialog of `action` /
|
|
1145
|
+
* `workflow` with the model's values in the fields `params` / `inputs`
|
|
1146
|
+
* (Liquid, locked) left open — always reviewed, never run unseen; on a
|
|
1147
|
+
* call surface it opens as a workspace tab instead of a modal.
|
|
1148
|
+
* - `link` → `url`: opens the rendered address in a new browser tab
|
|
1149
|
+
* (http, https, mailto and tel only). Renders synchronously on the press,
|
|
1150
|
+
* so `| summarize` renders '' there.
|
|
1151
|
+
*
|
|
1152
|
+
* `params` / `inputs` map target field names to Liquid templates; `prompt`,
|
|
1153
|
+
* `context`, `entity`, `record` and `url` are Liquid templates too. Everything
|
|
1154
|
+
* renders client-side against the surface's scope (a page:
|
|
1155
|
+
* `{ record, entity, params, current_user }`; a conversation:
|
|
1156
|
+
* `{ conversation, contact, records, records_by_entity, tags,
|
|
1157
|
+
* tags_by_definition, brief, current_user }`, where `| summarize: "<lens>"`
|
|
1158
|
+
* on the conversation or a tag writes a focused summary of what was said when
|
|
1159
|
+
* the button is pressed). `prompt` is literal message TEXT, never a Prompt
|
|
1160
|
+
* resource key. `visible_when` hides the button unless the surface's subject
|
|
1161
|
+
* matches (the record on a page, the whole scope on a conversation — the
|
|
1162
|
+
* stage is `conversation.status eq active` / `in ended|archived`, a detected
|
|
1163
|
+
* tag `tags_by_definition.<key> not_empty`). `skip_confirmation` fires an
|
|
1164
|
+
* action/workflow immediately when every required field resolved.
|
|
1053
1165
|
*/
|
|
1054
1166
|
export interface PageAction {
|
|
1055
1167
|
label: string
|
|
@@ -1057,9 +1169,23 @@ export interface PageAction {
|
|
|
1057
1169
|
kind?: PageActionKind
|
|
1058
1170
|
action?: string
|
|
1059
1171
|
workflow?: string
|
|
1172
|
+
agent?: string
|
|
1173
|
+
intent?: PageActionIntent
|
|
1174
|
+
entity?: string
|
|
1175
|
+
record?: string
|
|
1176
|
+
/** `upsert_record` only: how the candidate records are found. */
|
|
1177
|
+
match?: PageActionMatch
|
|
1178
|
+
/** Intent only: the attribute names the proposal may fill (plain names).
|
|
1179
|
+
* Replaces the app's bound create / edit page as the scope; required
|
|
1180
|
+
* attributes without a default are always added. */
|
|
1181
|
+
field_scope?: string[]
|
|
1182
|
+
url?: string
|
|
1060
1183
|
params?: Record<string, string>
|
|
1061
1184
|
inputs?: Record<string, string>
|
|
1185
|
+
prompt?: string
|
|
1186
|
+
context?: string
|
|
1062
1187
|
skip_confirmation?: boolean
|
|
1188
|
+
visible_when?: FilterGroup
|
|
1063
1189
|
/** List-extension stamp on a toolbar action a list extension appended to its host list. */
|
|
1064
1190
|
extension_key?: string
|
|
1065
1191
|
}
|
|
@@ -1067,12 +1193,24 @@ export interface PageAction {
|
|
|
1067
1193
|
export const PageActionSchema = z.object({
|
|
1068
1194
|
label: z.string(),
|
|
1069
1195
|
icon: z.string(),
|
|
1070
|
-
kind:
|
|
1196
|
+
kind: PageActionKindSchema.optional(),
|
|
1071
1197
|
action: z.string().optional(),
|
|
1072
1198
|
workflow: z.string().optional(),
|
|
1199
|
+
agent: z.string().optional(),
|
|
1200
|
+
intent: z
|
|
1201
|
+
.enum(['create_record', 'update_record', 'upsert_record', 'invoke_action', 'invoke_workflow'])
|
|
1202
|
+
.optional(),
|
|
1203
|
+
entity: z.string().optional(),
|
|
1204
|
+
record: z.string().optional(),
|
|
1205
|
+
match: PageActionMatchSchema.optional(),
|
|
1206
|
+
field_scope: z.array(z.string()).optional(),
|
|
1207
|
+
url: z.string().optional(),
|
|
1073
1208
|
params: z.record(z.string()).optional(),
|
|
1074
1209
|
inputs: z.record(z.string()).optional(),
|
|
1210
|
+
prompt: z.string().optional(),
|
|
1211
|
+
context: z.string().optional(),
|
|
1075
1212
|
skip_confirmation: z.boolean().optional(),
|
|
1213
|
+
visible_when: FilterGroupSchema.optional(),
|
|
1076
1214
|
extension_key: z.string().optional(),
|
|
1077
1215
|
})
|
|
1078
1216
|
|
|
@@ -1255,10 +1393,46 @@ export interface UpdateListViewRequest {
|
|
|
1255
1393
|
* - `public`: standalone, NO app chrome (bare page at `/p/…`);
|
|
1256
1394
|
* UNAUTHENTICATED — the layout is world-readable and its components may only
|
|
1257
1395
|
* call `is_public` global actions.
|
|
1396
|
+
* - `trigger`: what the person sees when they trigger an action or a
|
|
1397
|
+
* workflow — rendered inside the invoke dialog. Bound by `kind` +
|
|
1398
|
+
* `reference` to ONE invocable; its `field` elements bind to that
|
|
1399
|
+
* invocable's params and returns instead of an entity's attributes. Which
|
|
1400
|
+
* dialog phase a trigger page renders in is the app configuration's binding
|
|
1401
|
+
* (`action_pages` / `workflow_pages`), like which record mode a record page
|
|
1402
|
+
* opens in (`record_pages`).
|
|
1258
1403
|
*/
|
|
1259
|
-
export type PageType = 'record' | 'platform' | 'kiosk' | 'public'
|
|
1404
|
+
export type PageType = 'record' | 'platform' | 'kiosk' | 'public' | 'trigger'
|
|
1260
1405
|
|
|
1261
|
-
export const PageTypeSchema = z.enum(['record', 'platform', 'kiosk', 'public'])
|
|
1406
|
+
export const PageTypeSchema = z.enum(['record', 'platform', 'kiosk', 'public', 'trigger'])
|
|
1407
|
+
|
|
1408
|
+
/**
|
|
1409
|
+
* How the viewer interacts with a record page — the `mode` the Liquid scope
|
|
1410
|
+
* and the component protocol carry (the same three words as `PageMode` in
|
|
1411
|
+
* `@proteos/component-sdk`). A record page serves every mode; which page a
|
|
1412
|
+
* mode opens in is the app configuration's `record_pages` binding.
|
|
1413
|
+
*
|
|
1414
|
+
* - `view`: a read-only record page.
|
|
1415
|
+
* - `create`: the form for a record that is not saved yet.
|
|
1416
|
+
* - `edit`: the form over a saved record.
|
|
1417
|
+
*/
|
|
1418
|
+
export type PageMode = 'view' | 'create' | 'edit'
|
|
1419
|
+
|
|
1420
|
+
/**
|
|
1421
|
+
* Where an invocation is in the invoke dialog's lifecycle — the `phase` the
|
|
1422
|
+
* dialog's Liquid scope and component protocol carry, and the key of a
|
|
1423
|
+
* `TriggerPageBinding`. Orthogonal to `PageMode`: the input phase renders in
|
|
1424
|
+
* `create` mode, running and result in `view` mode. A trigger page serves
|
|
1425
|
+
* every phase; which page a phase renders is the app configuration's binding.
|
|
1426
|
+
*
|
|
1427
|
+
* - `input`: the form (and the confirm step, rendered read-only) over the
|
|
1428
|
+
* params.
|
|
1429
|
+
* - `running`: while the invoke call runs; for a workflow, the "started" page
|
|
1430
|
+
* after the run was accepted. The params, read-only; the scope also carries
|
|
1431
|
+
* `execution` for workflows.
|
|
1432
|
+
* - `result`: once the action returned (the params plus its returns) or the
|
|
1433
|
+
* workflow run reached a terminal status (`execution` in scope).
|
|
1434
|
+
*/
|
|
1435
|
+
export type TriggerPhase = 'input' | 'running' | 'result'
|
|
1262
1436
|
|
|
1263
1437
|
/**
|
|
1264
1438
|
* Page configuration. A `record` page is the detail-page shape for a single
|
|
@@ -1273,8 +1447,13 @@ export interface Page extends AuditFields {
|
|
|
1273
1447
|
name: string
|
|
1274
1448
|
module_slug: string
|
|
1275
1449
|
type: PageType
|
|
1276
|
-
/** Required for `record` pages; absent on
|
|
1450
|
+
/** Required for `record` pages; absent on every other type. */
|
|
1277
1451
|
entity_slug?: string
|
|
1452
|
+
/** Trigger pages only: what the page opens for — `action` (an action slug)
|
|
1453
|
+
* or `workflow` (a workflow key). Absent = `action`. Immutable. */
|
|
1454
|
+
kind?: PageActionKind
|
|
1455
|
+
/** Trigger pages only: the action slug / workflow key. Immutable. */
|
|
1456
|
+
reference?: string
|
|
1278
1457
|
actions: PageAction[]
|
|
1279
1458
|
layout: PageLayout
|
|
1280
1459
|
}
|
|
@@ -1285,6 +1464,8 @@ export const PageSchema = AuditFieldsSchema.extend({
|
|
|
1285
1464
|
module_slug: z.string(),
|
|
1286
1465
|
type: PageTypeSchema,
|
|
1287
1466
|
entity_slug: z.string().optional(),
|
|
1467
|
+
kind: PageActionKindSchema.optional(),
|
|
1468
|
+
reference: z.string().optional(),
|
|
1288
1469
|
actions: z.array(PageActionSchema),
|
|
1289
1470
|
layout: PageLayoutSchema,
|
|
1290
1471
|
})
|
|
@@ -1297,6 +1478,10 @@ export const PageSchema = AuditFieldsSchema.extend({
|
|
|
1297
1478
|
export interface PublicPageComponent {
|
|
1298
1479
|
slug: string
|
|
1299
1480
|
props_schema?: Record<string, unknown>
|
|
1481
|
+
/** Content address of the compiled bundle (`sha256:<hex>`), for the immutable bundle URL. */
|
|
1482
|
+
bundle_checksum?: string
|
|
1483
|
+
/** See {@link Component.reserved_height}. */
|
|
1484
|
+
reserved_height?: number
|
|
1300
1485
|
}
|
|
1301
1486
|
|
|
1302
1487
|
/**
|
|
@@ -1318,12 +1503,16 @@ export interface ListPagesOptions extends MetaListOptions {
|
|
|
1318
1503
|
module_slug?: string
|
|
1319
1504
|
type?: PageType
|
|
1320
1505
|
entity_slug?: string
|
|
1506
|
+
/** The trigger pages of one invocable. */
|
|
1507
|
+
kind?: PageActionKind
|
|
1508
|
+
reference?: string
|
|
1321
1509
|
}
|
|
1322
1510
|
|
|
1323
1511
|
/**
|
|
1324
1512
|
* Request to create a page. `type` defaults to `record` when omitted.
|
|
1325
|
-
* `entity_slug` is required for record pages and must be absent for
|
|
1326
|
-
* pages
|
|
1513
|
+
* `entity_slug` is required for record pages and must be absent for every
|
|
1514
|
+
* other type. Trigger pages set `reference` (and `kind`, which defaults to
|
|
1515
|
+
* `action`); no other type may.
|
|
1327
1516
|
*/
|
|
1328
1517
|
export interface CreatePageRequest {
|
|
1329
1518
|
slug: string
|
|
@@ -1331,6 +1520,8 @@ export interface CreatePageRequest {
|
|
|
1331
1520
|
module_slug?: string
|
|
1332
1521
|
type?: PageType
|
|
1333
1522
|
entity_slug?: string
|
|
1523
|
+
kind?: PageActionKind
|
|
1524
|
+
reference?: string
|
|
1334
1525
|
actions: PageAction[]
|
|
1335
1526
|
layout: PageLayout
|
|
1336
1527
|
}
|
|
@@ -1832,6 +2023,37 @@ export const AppHomeSchema = z.object({
|
|
|
1832
2023
|
reference: z.string(),
|
|
1833
2024
|
})
|
|
1834
2025
|
|
|
2026
|
+
/**
|
|
2027
|
+
* The record pages one entity opens in, per mode (`PageMode`). Every key
|
|
2028
|
+
* optional; the web falls back create → edit → view → the entity's first
|
|
2029
|
+
* record page. Strict object on the wire — no string shorthand.
|
|
2030
|
+
*/
|
|
2031
|
+
export interface RecordPageBinding {
|
|
2032
|
+
view?: string
|
|
2033
|
+
create?: string
|
|
2034
|
+
edit?: string
|
|
2035
|
+
}
|
|
2036
|
+
|
|
2037
|
+
export const RecordPageBindingSchema = z
|
|
2038
|
+
.object({ view: z.string().optional(), create: z.string().optional(), edit: z.string().optional() })
|
|
2039
|
+
.strict()
|
|
2040
|
+
|
|
2041
|
+
/**
|
|
2042
|
+
* The trigger pages one action / workflow opens, per dialog phase
|
|
2043
|
+
* (`TriggerPhase`). Every key optional; an unbound phase falls back to the
|
|
2044
|
+
* invocable's first trigger page, then to the dialog's generated layout. One
|
|
2045
|
+
* page may serve every phase. Strict object on the wire.
|
|
2046
|
+
*/
|
|
2047
|
+
export interface TriggerPageBinding {
|
|
2048
|
+
input?: string
|
|
2049
|
+
running?: string
|
|
2050
|
+
result?: string
|
|
2051
|
+
}
|
|
2052
|
+
|
|
2053
|
+
export const TriggerPageBindingSchema = z
|
|
2054
|
+
.object({ input: z.string().optional(), running: z.string().optional(), result: z.string().optional() })
|
|
2055
|
+
.strict()
|
|
2056
|
+
|
|
1835
2057
|
/**
|
|
1836
2058
|
* AppConfiguration — a TYPED binding row: "how app X presents itself" to
|
|
1837
2059
|
* everyone (`profile_slug: ''` = the app's default configuration) or to one
|
|
@@ -1855,8 +2077,12 @@ export interface AppConfiguration extends AuditFields {
|
|
|
1855
2077
|
default_agent_key?: string
|
|
1856
2078
|
/** Agents offered in this app; empty = every org agent. */
|
|
1857
2079
|
agent_keys?: string[]
|
|
1858
|
-
/** entity_slug → record
|
|
1859
|
-
record_pages?: Record<string,
|
|
2080
|
+
/** entity_slug → the record pages opened from this app, per mode. */
|
|
2081
|
+
record_pages?: Record<string, RecordPageBinding>
|
|
2082
|
+
/** action slug → the trigger pages its invoke dialog renders, per phase. */
|
|
2083
|
+
action_pages?: Record<string, TriggerPageBinding>
|
|
2084
|
+
/** workflow key → the trigger pages its invoke dialog renders, per phase. */
|
|
2085
|
+
workflow_pages?: Record<string, TriggerPageBinding>
|
|
1860
2086
|
/** Entity slugs the command palette searches (by record title) inside
|
|
1861
2087
|
* this app; empty = no record search. */
|
|
1862
2088
|
searchable_entities?: string[]
|
|
@@ -1872,7 +2098,9 @@ export const AppConfigurationSchema = AuditFieldsSchema.extend({
|
|
|
1872
2098
|
menu_slug: z.string().optional(),
|
|
1873
2099
|
default_agent_key: z.string().optional(),
|
|
1874
2100
|
agent_keys: z.array(z.string()).optional(),
|
|
1875
|
-
record_pages: z.record(
|
|
2101
|
+
record_pages: z.record(RecordPageBindingSchema).optional(),
|
|
2102
|
+
action_pages: z.record(TriggerPageBindingSchema).optional(),
|
|
2103
|
+
workflow_pages: z.record(TriggerPageBindingSchema).optional(),
|
|
1876
2104
|
searchable_entities: z.array(z.string()).optional(),
|
|
1877
2105
|
})
|
|
1878
2106
|
|
|
@@ -1897,7 +2125,9 @@ export interface CreateAppConfigurationRequest {
|
|
|
1897
2125
|
menu_slug?: string
|
|
1898
2126
|
default_agent_key?: string
|
|
1899
2127
|
agent_keys?: string[]
|
|
1900
|
-
record_pages?: Record<string,
|
|
2128
|
+
record_pages?: Record<string, RecordPageBinding>
|
|
2129
|
+
action_pages?: Record<string, TriggerPageBinding>
|
|
2130
|
+
workflow_pages?: Record<string, TriggerPageBinding>
|
|
1901
2131
|
searchable_entities?: string[]
|
|
1902
2132
|
}
|
|
1903
2133
|
|
|
@@ -1911,7 +2141,9 @@ export interface UpdateAppConfigurationRequest {
|
|
|
1911
2141
|
menu_slug?: string
|
|
1912
2142
|
default_agent_key?: string
|
|
1913
2143
|
agent_keys?: string[]
|
|
1914
|
-
record_pages?: Record<string,
|
|
2144
|
+
record_pages?: Record<string, RecordPageBinding>
|
|
2145
|
+
action_pages?: Record<string, TriggerPageBinding>
|
|
2146
|
+
workflow_pages?: Record<string, TriggerPageBinding>
|
|
1915
2147
|
searchable_entities?: string[]
|
|
1916
2148
|
}
|
|
1917
2149
|
|
package/src/scheduling/types.ts
CHANGED
|
@@ -435,7 +435,7 @@ export interface SlotParameters {
|
|
|
435
435
|
}
|
|
436
436
|
|
|
437
437
|
/**
|
|
438
|
-
* Asks for the bookable starts of some hosts in [from, to) (≤
|
|
438
|
+
* Asks for the bookable starts of some hosts in [from, to) (≤ 42 days).
|
|
439
439
|
* Exactly one of type_key | link_key | parameters governs the rules;
|
|
440
440
|
* assignment picks union (single / round_robin) or intersection (collective).
|
|
441
441
|
* timezone is the requester's zone: slots are grouped by its local day.
|
|
@@ -528,6 +528,8 @@ export interface ListCalendarEventsQuery {
|
|
|
528
528
|
record_entity_slug?: string
|
|
529
529
|
record_id?: string
|
|
530
530
|
contact_id?: string
|
|
531
|
+
/** The instance(s) of one provider event, by iCalendar UID. */
|
|
532
|
+
ical_uid?: string
|
|
531
533
|
is_deleted_included?: boolean
|
|
532
534
|
}
|
|
533
535
|
|
|
@@ -658,6 +660,8 @@ export interface UpdateSchedulingLinkRequest {
|
|
|
658
660
|
export interface ListSchedulingLinksQuery {
|
|
659
661
|
/** Links offering this type. */
|
|
660
662
|
type_key?: string
|
|
663
|
+
/** Links listing this user among their hosts. */
|
|
664
|
+
host_user_id?: string
|
|
661
665
|
is_public?: boolean
|
|
662
666
|
is_enabled?: boolean
|
|
663
667
|
search?: string
|
package/src/workflow/types.ts
CHANGED
|
@@ -71,8 +71,11 @@ export interface WorkflowNode {
|
|
|
71
71
|
export const DEFAULT_PORT = 'main'
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
|
-
* The reserved output-port key
|
|
75
|
-
*
|
|
74
|
+
* The reserved output-port key every non-trigger node implicitly has. Under
|
|
75
|
+
* `on_error: continue_error_output` the engine emits one item per input item
|
|
76
|
+
* on it: the input's `json` plus an `error` object (`code`, `message`,
|
|
77
|
+
* `details`, `is_user_error`), paired to the input index. Descriptors never
|
|
78
|
+
* declare this port.
|
|
76
79
|
*/
|
|
77
80
|
export const ERROR_PORT = 'error'
|
|
78
81
|
|
|
@@ -265,6 +268,11 @@ export interface NodeDescriptor {
|
|
|
265
268
|
documentation_url?: string
|
|
266
269
|
/** Liquid over parameters, shown on the canvas node card. */
|
|
267
270
|
subtitle?: string
|
|
271
|
+
/**
|
|
272
|
+
* Retry policy a node of this type runs with when the graph node sets none.
|
|
273
|
+
* Non-idempotent types pin `max_attempts: 1`; absent = engine defaults.
|
|
274
|
+
*/
|
|
275
|
+
default_retry?: NodeRetryPolicy
|
|
268
276
|
}
|
|
269
277
|
|
|
270
278
|
/** Registry lifecycle of one (type, version) row. */
|