@proteos/sdk 0.51.1 → 0.53.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-IRFFXJMB.js → chunk-HEUXXELG.js} +311 -17
- package/dist/chunk-HEUXXELG.js.map +1 -0
- package/dist/{chunk-RKFXHDVU.cjs → chunk-SWCPI6SL.cjs} +326 -16
- package/dist/chunk-SWCPI6SL.cjs.map +1 -0
- package/dist/index.cjs +209 -102
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +213 -12
- package/dist/index.d.ts +213 -12
- package/dist/index.js +49 -2
- package/dist/index.js.map +1 -1
- package/dist/meta/index.cjs +123 -59
- 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-C9flkAj-.d.cts → types-D5P6yk1L.d.cts} +1288 -69
- package/dist/{types-C9flkAj-.d.ts → types-D5P6yk1L.d.ts} +1288 -69
- package/package.json +3 -3
- package/src/conversation/index.ts +39 -0
- package/src/conversation/types.ts +108 -4
- package/src/data/index.ts +15 -2
- package/src/data/records.ts +63 -0
- package/src/data/types.ts +52 -0
- package/src/index.ts +60 -1
- package/src/meta/entity-extensions.ts +98 -0
- package/src/meta/index.ts +84 -1
- package/src/meta/layout/common-props.ts +8 -0
- package/src/meta/layout/control-registry.json +10 -2
- package/src/meta/layout/elements.ts +15 -10
- package/src/meta/layout/index.ts +1 -0
- package/src/meta/list-extensions.ts +98 -0
- package/src/meta/menu-configuration-extensions.ts +132 -0
- package/src/meta/page-extensions.ts +98 -0
- package/src/meta/types.ts +470 -0
- package/dist/chunk-IRFFXJMB.js.map +0 -1
- package/dist/chunk-RKFXHDVU.cjs.map +0 -1
package/src/index.ts
CHANGED
|
@@ -238,6 +238,7 @@ export type {
|
|
|
238
238
|
AttachContactAddressRequest,
|
|
239
239
|
AttachConversationBriefRequest,
|
|
240
240
|
Attachment,
|
|
241
|
+
AuthoredTranscriptTurn,
|
|
241
242
|
AutomatedFilterConfig,
|
|
242
243
|
AutomatedSignal,
|
|
243
244
|
BlockContactRequest,
|
|
@@ -270,6 +271,7 @@ export type {
|
|
|
270
271
|
ConsentStatus,
|
|
271
272
|
Contact,
|
|
272
273
|
ContactAddress,
|
|
274
|
+
ContactAddressKey,
|
|
273
275
|
ContactAddressKind,
|
|
274
276
|
ContactAddressSource,
|
|
275
277
|
ContactErasureRequest,
|
|
@@ -277,6 +279,8 @@ export type {
|
|
|
277
279
|
ContactGroupService,
|
|
278
280
|
ContactGroupSource,
|
|
279
281
|
ContactMergeProposal,
|
|
282
|
+
ContactRecordLink,
|
|
283
|
+
ContactRecordLinkSource,
|
|
280
284
|
ContactRef,
|
|
281
285
|
ContactService,
|
|
282
286
|
ContactSource,
|
|
@@ -303,6 +307,7 @@ export type {
|
|
|
303
307
|
CreateAgentListenerRequest,
|
|
304
308
|
CreateConnectionRequest,
|
|
305
309
|
CreateContactGroupRequest,
|
|
310
|
+
CreateContactRecordLinkRequest,
|
|
306
311
|
CreateContactRequest,
|
|
307
312
|
CreateConversationBriefRequest,
|
|
308
313
|
CreateConversationFilterRequest,
|
|
@@ -310,6 +315,7 @@ export type {
|
|
|
310
315
|
CreateGlossaryTermRequest,
|
|
311
316
|
CreateSendingRuleRequest,
|
|
312
317
|
CreateToneProfileSetupRequest,
|
|
318
|
+
CreateTranscriptionFromTextRequest,
|
|
313
319
|
DispatchMeetingBotRequest,
|
|
314
320
|
DomainFilterConfig,
|
|
315
321
|
EmailDnsRecord,
|
|
@@ -343,6 +349,7 @@ export type {
|
|
|
343
349
|
ListContactAddressesQuery,
|
|
344
350
|
ListContactGroupsQuery,
|
|
345
351
|
ListContactMergeProposalsQuery,
|
|
352
|
+
ListContactRecordLinksQuery,
|
|
346
353
|
ListContactsQuery,
|
|
347
354
|
ListConversationBriefsQuery,
|
|
348
355
|
ListConversationFilterEventsQuery,
|
|
@@ -412,6 +419,7 @@ export type {
|
|
|
412
419
|
ToneProfileService,
|
|
413
420
|
ToneProfileSetup,
|
|
414
421
|
ToneProfileSetupStatus,
|
|
422
|
+
ToneProfileSource,
|
|
415
423
|
TranscribeStreamOptions,
|
|
416
424
|
Transcription,
|
|
417
425
|
TranscriptionReviewStatus,
|
|
@@ -430,6 +438,7 @@ export type {
|
|
|
430
438
|
UpdateGlossaryTermRequest,
|
|
431
439
|
UpdatePhoneNumberRequest,
|
|
432
440
|
UpdateSendingRuleRequest,
|
|
441
|
+
UpsertToneProfileRequest,
|
|
433
442
|
VoiceService,
|
|
434
443
|
VoiceTranscriptionStream,
|
|
435
444
|
WarmupRuleConfig,
|
|
@@ -445,7 +454,9 @@ export type {
|
|
|
445
454
|
BatchUpsertRecordsResponse,
|
|
446
455
|
BatchUpsertTransaction,
|
|
447
456
|
BatchUpsertTransactionResult,
|
|
457
|
+
ListRecordDuplicatesQuery,
|
|
448
458
|
ListRecordsOptions,
|
|
459
|
+
PublishContactObservationsResponse,
|
|
449
460
|
QueryExecuteMeta,
|
|
450
461
|
QueryExecuteResponse,
|
|
451
462
|
QueryRow,
|
|
@@ -453,6 +464,10 @@ export type {
|
|
|
453
464
|
QueryValidateMeta,
|
|
454
465
|
QueryValidateResponse,
|
|
455
466
|
RecordData,
|
|
467
|
+
RecordDuplicate,
|
|
468
|
+
RecordDuplicateService,
|
|
469
|
+
RecordDuplicateSource,
|
|
470
|
+
RecordDuplicateStatus,
|
|
456
471
|
RecordService,
|
|
457
472
|
} from './data/index.js'
|
|
458
473
|
// Data client (data-service)
|
|
@@ -598,17 +613,24 @@ export type {
|
|
|
598
613
|
// Component types
|
|
599
614
|
Component,
|
|
600
615
|
ComponentService,
|
|
616
|
+
// Currency attribute meta + value
|
|
617
|
+
ContactAddressAttributeKind,
|
|
618
|
+
ContactAddressAttributeMeta,
|
|
619
|
+
ContactBindingDuplicatePolicy,
|
|
601
620
|
CreateAppConfigurationRequest,
|
|
602
621
|
CreateAppRequest,
|
|
603
622
|
CreateComponentRequest,
|
|
604
623
|
CreateDesignReferenceRequest,
|
|
624
|
+
CreateEntityExtensionRequest,
|
|
605
625
|
CreateEntityRequest,
|
|
626
|
+
CreateListExtensionRequest,
|
|
606
627
|
CreateListRequest,
|
|
607
628
|
CreateListViewRequest,
|
|
629
|
+
CreateMenuConfigurationExtensionRequest,
|
|
608
630
|
CreateMenuConfigurationRequest,
|
|
631
|
+
CreatePageExtensionRequest,
|
|
609
632
|
CreatePageRequest,
|
|
610
633
|
CreateVariableRequest,
|
|
611
|
-
// Currency attribute meta + value
|
|
612
634
|
CurrencyAttributeMeta,
|
|
613
635
|
CurrencySymbolSide,
|
|
614
636
|
CurrencyValue,
|
|
@@ -620,10 +642,14 @@ export type {
|
|
|
620
642
|
DesignReferenceService,
|
|
621
643
|
// Entity types
|
|
622
644
|
Entity,
|
|
645
|
+
EntityContactBinding,
|
|
646
|
+
EntityExtension,
|
|
647
|
+
EntityExtensionService,
|
|
623
648
|
EntityService,
|
|
624
649
|
EntityWithSchema,
|
|
625
650
|
EnumAttributeMeta,
|
|
626
651
|
EnumValue,
|
|
652
|
+
ExtensionPosition,
|
|
627
653
|
// File attribute meta
|
|
628
654
|
FileAttributeMeta,
|
|
629
655
|
FilterElement,
|
|
@@ -635,10 +661,17 @@ export type {
|
|
|
635
661
|
ListComponentsOptions,
|
|
636
662
|
ListDesignReferencesOptions,
|
|
637
663
|
ListEntitiesOptions,
|
|
664
|
+
ListEntityExtensionsOptions,
|
|
665
|
+
ListExtension,
|
|
666
|
+
ListExtensionColumnPlacement,
|
|
667
|
+
ListExtensionService,
|
|
668
|
+
ListListExtensionsOptions,
|
|
638
669
|
ListListsOptions,
|
|
639
670
|
ListListViewsOptions,
|
|
671
|
+
ListMenuConfigurationExtensionsOptions,
|
|
640
672
|
ListMenuConfigurationsOptions,
|
|
641
673
|
ListModulesOptions,
|
|
674
|
+
ListPageExtensionsOptions,
|
|
642
675
|
ListPagesOptions,
|
|
643
676
|
ListService,
|
|
644
677
|
ListVariablesOptions,
|
|
@@ -648,6 +681,10 @@ export type {
|
|
|
648
681
|
LogicalOperator,
|
|
649
682
|
// MenuConfiguration types
|
|
650
683
|
MenuConfiguration,
|
|
684
|
+
MenuConfigurationExtension,
|
|
685
|
+
MenuConfigurationExtensionPlacement,
|
|
686
|
+
MenuConfigurationExtensionPosition,
|
|
687
|
+
MenuConfigurationExtensionService,
|
|
651
688
|
MenuConfigurationService,
|
|
652
689
|
MenuItem,
|
|
653
690
|
// Shared meta types
|
|
@@ -661,6 +698,9 @@ export type {
|
|
|
661
698
|
Page,
|
|
662
699
|
PageAction,
|
|
663
700
|
PageActionKind,
|
|
701
|
+
PageExtension,
|
|
702
|
+
PageExtensionPlacement,
|
|
703
|
+
PageExtensionService,
|
|
664
704
|
PageLayout,
|
|
665
705
|
PageService,
|
|
666
706
|
PageType,
|
|
@@ -675,10 +715,14 @@ export type {
|
|
|
675
715
|
UpdateAppRequest,
|
|
676
716
|
UpdateComponentRequest,
|
|
677
717
|
UpdateDesignReferenceRequest,
|
|
718
|
+
UpdateEntityExtensionRequest,
|
|
678
719
|
UpdateEntityRequest,
|
|
720
|
+
UpdateListExtensionRequest,
|
|
679
721
|
UpdateListRequest,
|
|
680
722
|
UpdateListViewRequest,
|
|
723
|
+
UpdateMenuConfigurationExtensionRequest,
|
|
681
724
|
UpdateMenuConfigurationRequest,
|
|
725
|
+
UpdatePageExtensionRequest,
|
|
682
726
|
UpdatePageRequest,
|
|
683
727
|
UpdateVariableRequest,
|
|
684
728
|
// Variable types
|
|
@@ -697,34 +741,49 @@ export {
|
|
|
697
741
|
allCurrencyCodes,
|
|
698
742
|
ColumnSchema,
|
|
699
743
|
ComponentSchema,
|
|
744
|
+
ContactAddressAttributeMetaSchema,
|
|
700
745
|
CURRENT_USER_DEFAULT,
|
|
701
746
|
CurrencyAttributeMetaSchema,
|
|
702
747
|
currencyLabel,
|
|
703
748
|
currencySymbol,
|
|
704
749
|
currencySymbolSide,
|
|
705
750
|
DesignReferenceSchema,
|
|
751
|
+
EntityContactBindingSchema,
|
|
752
|
+
EntityExtensionSchema,
|
|
706
753
|
EntitySchema,
|
|
707
754
|
EntityWithSchemaSchema,
|
|
755
|
+
ExtensionPositionSchema,
|
|
708
756
|
FilterElementSchema,
|
|
709
757
|
FilterGroupSchema,
|
|
710
758
|
formatAmount,
|
|
711
759
|
formatMoney,
|
|
712
760
|
isCurrentUserDefault,
|
|
713
761
|
isPlatformAttributeName,
|
|
762
|
+
ListExtensionColumnPlacementSchema,
|
|
763
|
+
ListExtensionSchema,
|
|
714
764
|
ListSchema,
|
|
715
765
|
ListViewSchema,
|
|
716
766
|
localeNumberSeparators,
|
|
767
|
+
MENU_CONFIGURATION_EXTENSION_ANCHOR_ITEMS,
|
|
768
|
+
MenuConfigurationExtensionPlacementSchema,
|
|
769
|
+
MenuConfigurationExtensionPositionSchema,
|
|
770
|
+
MenuConfigurationExtensionSchema,
|
|
717
771
|
MenuConfigurationSchema,
|
|
718
772
|
MenuItemSchema,
|
|
719
773
|
MenuItemType,
|
|
720
774
|
MetaClient,
|
|
721
775
|
ModuleSchema,
|
|
722
776
|
OnDeleteActionSchema,
|
|
777
|
+
PAGE_EXTENSION_ANCHOR_MAIN,
|
|
778
|
+
PAGE_EXTENSION_ANCHOR_SIDE_PANEL,
|
|
723
779
|
PageActionSchema,
|
|
780
|
+
PageExtensionPlacementSchema,
|
|
781
|
+
PageExtensionSchema,
|
|
724
782
|
PageLayoutSchema,
|
|
725
783
|
PageSchema,
|
|
726
784
|
PLATFORM_ATTRIBUTE_NAMES,
|
|
727
785
|
parseAmount,
|
|
786
|
+
parseContactAddressMeta,
|
|
728
787
|
parseCurrencyMeta,
|
|
729
788
|
parseFileMeta,
|
|
730
789
|
parseRelationMeta,
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import type { ProteosClient } from '../client.js'
|
|
2
|
+
import { PageIterator } from '../iterator.js'
|
|
3
|
+
import type { ListResult } from '../types/common.js'
|
|
4
|
+
import type {
|
|
5
|
+
CreateEntityExtensionRequest,
|
|
6
|
+
EntityExtension,
|
|
7
|
+
ListEntityExtensionsOptions,
|
|
8
|
+
UpdateEntityExtensionRequest,
|
|
9
|
+
} from './types.js'
|
|
10
|
+
|
|
11
|
+
const ENTITY_EXTENSIONS_BASE_PATH = '/meta/v1/entity-extensions'
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Service for entity extensions — attributes contributed to an EXISTING host
|
|
15
|
+
* entity by a resource that does not own it (typically a second module). The
|
|
16
|
+
* host's `attributes` are the materialized merge: its own attributes plus every
|
|
17
|
+
* extension's, each stamped with `extension_key`. Every write here
|
|
18
|
+
* re-materializes the host; an attribute name shared with the host or another
|
|
19
|
+
* extension is refused (`entity_extension_attribute_collision`).
|
|
20
|
+
*/
|
|
21
|
+
export interface EntityExtensionService {
|
|
22
|
+
/** Lists entity extensions (auto-paginating iterator). */
|
|
23
|
+
list(
|
|
24
|
+
options?: ListEntityExtensionsOptions,
|
|
25
|
+
): PageIterator<EntityExtension, ListEntityExtensionsOptions>
|
|
26
|
+
|
|
27
|
+
/** Fetches a single page of entity extensions. */
|
|
28
|
+
listPage(options?: ListEntityExtensionsOptions): Promise<ListResult<EntityExtension>>
|
|
29
|
+
|
|
30
|
+
/** Gets an entity extension by key (404 when unknown). */
|
|
31
|
+
get(key: string): Promise<EntityExtension>
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Creates an entity extension and merges its attributes into the host.
|
|
35
|
+
* @throws {ProteosError} 409 `entity_extension_already_exists` when the key
|
|
36
|
+
* is taken; 400 `entity_extension_entity_not_found` when the host does
|
|
37
|
+
* not exist; 400 `entity_extension_attribute_collision` on a name clash.
|
|
38
|
+
*/
|
|
39
|
+
create(request: CreateEntityExtensionRequest): Promise<EntityExtension>
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Creates or replaces an entity extension idempotently by key
|
|
43
|
+
* (`PUT /meta/v1/entity-extensions/:key`). Replaces the whole definition;
|
|
44
|
+
* the host binding (`entity_slug`) of an existing key is immutable.
|
|
45
|
+
*/
|
|
46
|
+
upsert(key: string, request: CreateEntityExtensionRequest): Promise<EntityExtension>
|
|
47
|
+
|
|
48
|
+
/** Partially updates an entity extension (`attributes` replaces the whole list). */
|
|
49
|
+
update(key: string, request: UpdateEntityExtensionRequest): Promise<EntityExtension>
|
|
50
|
+
|
|
51
|
+
/** Deletes an entity extension and removes its attributes from the host. */
|
|
52
|
+
delete(key: string): Promise<void>
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export class EntityExtensionServiceImpl implements EntityExtensionService {
|
|
56
|
+
constructor(private readonly client: ProteosClient) {}
|
|
57
|
+
|
|
58
|
+
list(
|
|
59
|
+
options: ListEntityExtensionsOptions = {},
|
|
60
|
+
): PageIterator<EntityExtension, ListEntityExtensionsOptions> {
|
|
61
|
+
return new PageIterator((opts) => this.listPage(opts), options)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
async listPage(options: ListEntityExtensionsOptions = {}): Promise<ListResult<EntityExtension>> {
|
|
65
|
+
return this.client.requestWithQuery<ListResult<EntityExtension>>(
|
|
66
|
+
'GET',
|
|
67
|
+
ENTITY_EXTENSIONS_BASE_PATH,
|
|
68
|
+
options,
|
|
69
|
+
)
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
async get(key: string): Promise<EntityExtension> {
|
|
73
|
+
return this.client.request<EntityExtension>('GET', `${ENTITY_EXTENSIONS_BASE_PATH}/${key}`)
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
async create(request: CreateEntityExtensionRequest): Promise<EntityExtension> {
|
|
77
|
+
return this.client.request<EntityExtension>('POST', ENTITY_EXTENSIONS_BASE_PATH, request)
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
async upsert(key: string, request: CreateEntityExtensionRequest): Promise<EntityExtension> {
|
|
81
|
+
return this.client.request<EntityExtension>('PUT', `${ENTITY_EXTENSIONS_BASE_PATH}/${key}`, {
|
|
82
|
+
...request,
|
|
83
|
+
key,
|
|
84
|
+
})
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
async update(key: string, request: UpdateEntityExtensionRequest): Promise<EntityExtension> {
|
|
88
|
+
return this.client.request<EntityExtension>(
|
|
89
|
+
'PATCH',
|
|
90
|
+
`${ENTITY_EXTENSIONS_BASE_PATH}/${key}`,
|
|
91
|
+
request,
|
|
92
|
+
)
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
async delete(key: string): Promise<void> {
|
|
96
|
+
await this.client.request<void>('DELETE', `${ENTITY_EXTENSIONS_BASE_PATH}/${key}`)
|
|
97
|
+
}
|
|
98
|
+
}
|
package/src/meta/index.ts
CHANGED
|
@@ -4,13 +4,20 @@ import { type AppService, AppServiceImpl } from './apps.js'
|
|
|
4
4
|
import { type ComponentService, ComponentServiceImpl } from './components.js'
|
|
5
5
|
import { type DesignReferenceService, DesignReferenceServiceImpl } from './design-references.js'
|
|
6
6
|
import { type EntityService, EntityServiceImpl } from './entities.js'
|
|
7
|
+
import { type EntityExtensionService, EntityExtensionServiceImpl } from './entity-extensions.js'
|
|
8
|
+
import { type ListExtensionService, ListExtensionServiceImpl } from './list-extensions.js'
|
|
7
9
|
import { type ListViewService, ListViewServiceImpl } from './list-views.js'
|
|
8
10
|
import { type ListService, ListServiceImpl } from './lists.js'
|
|
11
|
+
import {
|
|
12
|
+
type MenuConfigurationExtensionService,
|
|
13
|
+
MenuConfigurationExtensionServiceImpl,
|
|
14
|
+
} from './menu-configuration-extensions.js'
|
|
9
15
|
import {
|
|
10
16
|
type MenuConfigurationService,
|
|
11
17
|
MenuConfigurationServiceImpl,
|
|
12
18
|
} from './menu-configurations.js'
|
|
13
19
|
import { type ModuleService, ModuleServiceImpl } from './modules.js'
|
|
20
|
+
import { type PageExtensionService, PageExtensionServiceImpl } from './page-extensions.js'
|
|
14
21
|
import { type PageService, PageServiceImpl } from './pages.js'
|
|
15
22
|
import { type VariableService, VariableServiceImpl } from './variables.js'
|
|
16
23
|
|
|
@@ -40,6 +47,30 @@ export class MetaClient {
|
|
|
40
47
|
*/
|
|
41
48
|
readonly entities: EntityService
|
|
42
49
|
|
|
50
|
+
/**
|
|
51
|
+
* Service for managing entity extensions — attributes contributed to a host
|
|
52
|
+
* entity by a resource that does not own it.
|
|
53
|
+
*/
|
|
54
|
+
readonly entityExtensions: EntityExtensionService
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Service for managing page extensions — anchored layout blocks contributed
|
|
58
|
+
* to a host page by a resource that does not own it.
|
|
59
|
+
*/
|
|
60
|
+
readonly pageExtensions: PageExtensionService
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Service for managing list extensions — columns and toolbar actions
|
|
64
|
+
* contributed to a host list by a resource that does not own it.
|
|
65
|
+
*/
|
|
66
|
+
readonly listExtensions: ListExtensionService
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Service for managing menu-configuration extensions — items contributed
|
|
70
|
+
* to a host menu by another module or resource.
|
|
71
|
+
*/
|
|
72
|
+
readonly menuConfigurationExtensions: MenuConfigurationExtensionService
|
|
73
|
+
|
|
43
74
|
/**
|
|
44
75
|
* Service for managing WebAssembly modules.
|
|
45
76
|
*/
|
|
@@ -98,6 +129,10 @@ export class MetaClient {
|
|
|
98
129
|
*/
|
|
99
130
|
constructor(client: ProteosClient) {
|
|
100
131
|
this.entities = new EntityServiceImpl(client)
|
|
132
|
+
this.entityExtensions = new EntityExtensionServiceImpl(client)
|
|
133
|
+
this.pageExtensions = new PageExtensionServiceImpl(client)
|
|
134
|
+
this.listExtensions = new ListExtensionServiceImpl(client)
|
|
135
|
+
this.menuConfigurationExtensions = new MenuConfigurationExtensionServiceImpl(client)
|
|
101
136
|
this.modules = new ModuleServiceImpl(client)
|
|
102
137
|
this.variables = new VariableServiceImpl(client)
|
|
103
138
|
this.components = new ComponentServiceImpl(client)
|
|
@@ -118,12 +153,16 @@ export * from './currency/index.js'
|
|
|
118
153
|
export type { DesignReferenceService } from './design-references.js'
|
|
119
154
|
// Re-export service interfaces
|
|
120
155
|
export type { EntityService } from './entities.js'
|
|
156
|
+
export type { EntityExtensionService } from './entity-extensions.js'
|
|
121
157
|
// Re-export the layout module (PageLayout types + Zod schemas + control registry)
|
|
122
158
|
export * from './layout/index.js'
|
|
159
|
+
export type { ListExtensionService } from './list-extensions.js'
|
|
123
160
|
export type { ListViewService } from './list-views.js'
|
|
124
161
|
export type { ListService } from './lists.js'
|
|
162
|
+
export type { MenuConfigurationExtensionService } from './menu-configuration-extensions.js'
|
|
125
163
|
export type { MenuConfigurationService } from './menu-configurations.js'
|
|
126
164
|
export type { ModuleService } from './modules.js'
|
|
165
|
+
export type { PageExtensionService } from './page-extensions.js'
|
|
127
166
|
export type { PageService } from './pages.js'
|
|
128
167
|
// Re-export types
|
|
129
168
|
export type {
|
|
@@ -143,17 +182,24 @@ export type {
|
|
|
143
182
|
ComparisonOperator,
|
|
144
183
|
// Component types
|
|
145
184
|
Component,
|
|
185
|
+
// Currency attribute meta + value
|
|
186
|
+
ContactAddressAttributeKind,
|
|
187
|
+
ContactAddressAttributeMeta,
|
|
188
|
+
ContactBindingDuplicatePolicy,
|
|
146
189
|
CreateAppConfigurationRequest,
|
|
147
190
|
CreateAppRequest,
|
|
148
191
|
CreateComponentRequest,
|
|
149
192
|
CreateDesignReferenceRequest,
|
|
193
|
+
CreateEntityExtensionRequest,
|
|
150
194
|
CreateEntityRequest,
|
|
195
|
+
CreateListExtensionRequest,
|
|
151
196
|
CreateListRequest,
|
|
152
197
|
CreateListViewRequest,
|
|
198
|
+
CreateMenuConfigurationExtensionRequest,
|
|
153
199
|
CreateMenuConfigurationRequest,
|
|
200
|
+
CreatePageExtensionRequest,
|
|
154
201
|
CreatePageRequest,
|
|
155
202
|
CreateVariableRequest,
|
|
156
|
-
// Currency attribute meta + value
|
|
157
203
|
CurrencyAttributeMeta,
|
|
158
204
|
CurrencyValue,
|
|
159
205
|
CurrentUserDefault,
|
|
@@ -165,9 +211,13 @@ export type {
|
|
|
165
211
|
DesignReferenceContent,
|
|
166
212
|
// Entity types
|
|
167
213
|
Entity,
|
|
214
|
+
EntityContactBinding,
|
|
215
|
+
// EntityExtension types
|
|
216
|
+
EntityExtension,
|
|
168
217
|
EntityWithSchema,
|
|
169
218
|
EnumAttributeMeta,
|
|
170
219
|
EnumValue,
|
|
220
|
+
ExtensionPosition,
|
|
171
221
|
// File attribute meta
|
|
172
222
|
FileAttributeMeta,
|
|
173
223
|
FilterElement,
|
|
@@ -179,10 +229,17 @@ export type {
|
|
|
179
229
|
ListComponentsOptions,
|
|
180
230
|
ListDesignReferencesOptions,
|
|
181
231
|
ListEntitiesOptions,
|
|
232
|
+
ListEntityExtensionsOptions,
|
|
233
|
+
// ListExtension types
|
|
234
|
+
ListExtension,
|
|
235
|
+
ListExtensionColumnPlacement,
|
|
236
|
+
ListListExtensionsOptions,
|
|
182
237
|
ListListsOptions,
|
|
183
238
|
ListListViewsOptions,
|
|
239
|
+
ListMenuConfigurationExtensionsOptions,
|
|
184
240
|
ListMenuConfigurationsOptions,
|
|
185
241
|
ListModulesOptions,
|
|
242
|
+
ListPageExtensionsOptions,
|
|
186
243
|
ListPagesOptions,
|
|
187
244
|
ListVariablesOptions,
|
|
188
245
|
// ListView types
|
|
@@ -190,6 +247,10 @@ export type {
|
|
|
190
247
|
LogicalOperator,
|
|
191
248
|
// MenuConfiguration types
|
|
192
249
|
MenuConfiguration,
|
|
250
|
+
// MenuConfigurationExtension types
|
|
251
|
+
MenuConfigurationExtension,
|
|
252
|
+
MenuConfigurationExtensionPlacement,
|
|
253
|
+
MenuConfigurationExtensionPosition,
|
|
193
254
|
MenuItem,
|
|
194
255
|
// Shared types
|
|
195
256
|
MetaListOptions,
|
|
@@ -203,6 +264,9 @@ export type {
|
|
|
203
264
|
Page,
|
|
204
265
|
PageAction,
|
|
205
266
|
PageActionKind,
|
|
267
|
+
// PageExtension types
|
|
268
|
+
PageExtension,
|
|
269
|
+
PageExtensionPlacement,
|
|
206
270
|
PageType,
|
|
207
271
|
// User attribute meta
|
|
208
272
|
PrincipalAttributeMeta,
|
|
@@ -221,10 +285,14 @@ export type {
|
|
|
221
285
|
UpdateAppRequest,
|
|
222
286
|
UpdateComponentRequest,
|
|
223
287
|
UpdateDesignReferenceRequest,
|
|
288
|
+
UpdateEntityExtensionRequest,
|
|
224
289
|
UpdateEntityRequest,
|
|
290
|
+
UpdateListExtensionRequest,
|
|
225
291
|
UpdateListRequest,
|
|
226
292
|
UpdateListViewRequest,
|
|
293
|
+
UpdateMenuConfigurationExtensionRequest,
|
|
227
294
|
UpdateMenuConfigurationRequest,
|
|
295
|
+
UpdatePageExtensionRequest,
|
|
228
296
|
UpdatePageRequest,
|
|
229
297
|
UpdateVariableRequest,
|
|
230
298
|
UserAttributeMeta,
|
|
@@ -241,26 +309,41 @@ export {
|
|
|
241
309
|
acceptsCurrentUserDefault,
|
|
242
310
|
ColumnSchema,
|
|
243
311
|
ComponentSchema,
|
|
312
|
+
ContactAddressAttributeMetaSchema,
|
|
244
313
|
CURRENT_USER_DEFAULT,
|
|
245
314
|
CurrencyAttributeMetaSchema,
|
|
246
315
|
DesignReferenceSchema,
|
|
316
|
+
EntityContactBindingSchema,
|
|
317
|
+
EntityExtensionSchema,
|
|
247
318
|
EntitySchema,
|
|
248
319
|
EntityWithSchemaSchema,
|
|
320
|
+
ExtensionPositionSchema,
|
|
249
321
|
FileAttributeMetaSchema,
|
|
250
322
|
FilterElementSchema,
|
|
251
323
|
FilterGroupSchema,
|
|
252
324
|
isCurrentUserDefault,
|
|
253
325
|
isPlatformAttributeName,
|
|
326
|
+
ListExtensionColumnPlacementSchema,
|
|
327
|
+
ListExtensionSchema,
|
|
254
328
|
ListSchema,
|
|
255
329
|
ListViewSchema,
|
|
330
|
+
MENU_CONFIGURATION_EXTENSION_ANCHOR_ITEMS,
|
|
331
|
+
MenuConfigurationExtensionPlacementSchema,
|
|
332
|
+
MenuConfigurationExtensionPositionSchema,
|
|
333
|
+
MenuConfigurationExtensionSchema,
|
|
256
334
|
MenuConfigurationSchema,
|
|
257
335
|
MenuItemSchema,
|
|
258
336
|
MenuItemType,
|
|
259
337
|
ModuleSchema,
|
|
260
338
|
OnDeleteActionSchema,
|
|
339
|
+
PAGE_EXTENSION_ANCHOR_MAIN,
|
|
340
|
+
PAGE_EXTENSION_ANCHOR_SIDE_PANEL,
|
|
261
341
|
PageActionSchema,
|
|
342
|
+
PageExtensionPlacementSchema,
|
|
343
|
+
PageExtensionSchema,
|
|
262
344
|
PageSchema,
|
|
263
345
|
PLATFORM_ATTRIBUTE_NAMES,
|
|
346
|
+
parseContactAddressMeta,
|
|
264
347
|
parseCurrencyMeta,
|
|
265
348
|
parseFileMeta,
|
|
266
349
|
parsePrincipalMeta,
|
|
@@ -62,6 +62,13 @@ const ResponsiveSizingSchema = z.object({
|
|
|
62
62
|
*/
|
|
63
63
|
export interface CommonProps {
|
|
64
64
|
id?: string
|
|
65
|
+
/**
|
|
66
|
+
* Server-stamped back-reference to the page extension that contributes this
|
|
67
|
+
* element to its host page. Present only on a host's merged layout; ignored
|
|
68
|
+
* (stripped and re-derived) on writes. Mirrors `ExtensionKey` in the Go
|
|
69
|
+
* `metamodel.CommonProps`.
|
|
70
|
+
*/
|
|
71
|
+
extension_key?: string
|
|
65
72
|
visible_when?: FilterGroup
|
|
66
73
|
read_only_when?: FilterGroup
|
|
67
74
|
width?: SizeValue
|
|
@@ -78,6 +85,7 @@ export interface CommonProps {
|
|
|
78
85
|
*/
|
|
79
86
|
export const commonPropsShape = {
|
|
80
87
|
id: z.string().optional(),
|
|
88
|
+
extension_key: z.string().optional(),
|
|
81
89
|
visible_when: FilterGroupSchema.optional(),
|
|
82
90
|
read_only_when: FilterGroupSchema.optional(),
|
|
83
91
|
width: SizeValueSchema.optional(),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_comment": "SOURCE OF TRUTH for the page-layout control registry. Each entry under `controls` declares the primary control slug and the full compatible list for one (type[+format|+items.type]) combination. Renderer dispatches off `primary`; inspector picker dispatches off `compatible`. Edit this file then run `go run ./scripts/codegen/page-layout-registry` from the repo root to regenerate packages/go/model/page_layout_registry_gen.go.",
|
|
3
|
-
"_attributeTypes": "Top-level keys MUST match the Go canonical AttributeType union in packages/go/model/meta/attribute.go (string \u00b7 number \u00b7 integer \u00b7 boolean \u00b7 array \u00b7 object \u00b7 datetime \u00b7 enum \u00b7 relation \u00b7 user \u00b7 currency \u00b7 knowledge-text \u00b7 file). `byFormat` keys for `string` MUST match StringFormat (email \u00b7 uri \u00b7 uuid \u00b7 hostname \u00b7 ipv4 \u00b7 ipv6). `byFormat` keys for `datetime` MUST match DatetimeFormat (date-time \u00b7 date \u00b7 time \u00b7 duration). `byItemsType` for `array` keys on the item Attribute's type. A null `primary` with empty `compatible` means \"render-only fallback\" \u2014 see plan \u00a73.2.5.",
|
|
3
|
+
"_attributeTypes": "Top-level keys MUST match the Go canonical AttributeType union in packages/go/model/meta/attribute.go (string \u00b7 number \u00b7 integer \u00b7 boolean \u00b7 array \u00b7 object \u00b7 datetime \u00b7 enum \u00b7 relation \u00b7 user \u00b7 principal \u00b7 currency \u00b7 knowledge-text \u00b7 file \u00b7 contact-address). `byFormat` keys for `string` MUST match StringFormat (email \u00b7 uri \u00b7 uuid \u00b7 hostname \u00b7 ipv4 \u00b7 ipv6). `byFormat` keys for `datetime` MUST match DatetimeFormat (date-time \u00b7 date \u00b7 time \u00b7 duration). `byItemsType` for `array` keys on the item Attribute's type. A null `primary` with empty `compatible` means \"render-only fallback\" \u2014 see plan \u00a73.2.5.",
|
|
4
4
|
"_slugRoster": "v1 ships only lib-backed slugs. Slugs without a backing @proteos/ui component (markdown \u00b7 json-editor \u00b7 slider \u00b7 stepper \u00b7 percent \u00b7 user-card) are intentionally omitted; they return when the matching lib primitive ships. See plan \u00a73.2.4 / \u00a77.3. The `user-picker` slug is backed by the web client's UserCombobox (account/user-service people picker). The `currency` slug is backed by the web client's currency control (CurrencyInput: decimal amount + ISO-4217 picker).",
|
|
5
5
|
"builtInControls": [
|
|
6
6
|
"text",
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
"knowledge-text",
|
|
27
27
|
"file",
|
|
28
28
|
"file-viewer",
|
|
29
|
-
"record-filter"
|
|
29
|
+
"record-filter",
|
|
30
|
+
"contact-address"
|
|
30
31
|
],
|
|
31
32
|
"controls": {
|
|
32
33
|
"string": {
|
|
@@ -175,6 +176,13 @@
|
|
|
175
176
|
"currency"
|
|
176
177
|
]
|
|
177
178
|
},
|
|
179
|
+
"contact-address": {
|
|
180
|
+
"primary": "contact-address",
|
|
181
|
+
"compatible": [
|
|
182
|
+
"contact-address",
|
|
183
|
+
"text"
|
|
184
|
+
]
|
|
185
|
+
},
|
|
178
186
|
"knowledge-text": {
|
|
179
187
|
"primary": "knowledge-text",
|
|
180
188
|
"compatible": [
|
|
@@ -78,6 +78,8 @@ export type CardElement = CommonProps & {
|
|
|
78
78
|
*/
|
|
79
79
|
export type LayoutTab = {
|
|
80
80
|
id: string
|
|
81
|
+
/** Page-extension stamp for a contributed tab — same contract as `CommonProps.extension_key`. */
|
|
82
|
+
extension_key?: string
|
|
81
83
|
label: string
|
|
82
84
|
icon?: string
|
|
83
85
|
visible_when?: FilterGroup
|
|
@@ -281,6 +283,18 @@ export type LayoutElement =
|
|
|
281
283
|
|
|
282
284
|
// ──────────────────────────────────────────────────────────── Schemas ──
|
|
283
285
|
|
|
286
|
+
export const LayoutTabSchema: z.ZodType<LayoutTab> = z.lazy(() =>
|
|
287
|
+
z.object({
|
|
288
|
+
id: z.string().min(1),
|
|
289
|
+
extension_key: z.string().optional(),
|
|
290
|
+
label: z.string().min(1),
|
|
291
|
+
icon: z.string().optional(),
|
|
292
|
+
visible_when: FilterGroupSchema.optional(),
|
|
293
|
+
default_when: FilterGroupSchema.optional(),
|
|
294
|
+
content: LayoutElementSchema,
|
|
295
|
+
}),
|
|
296
|
+
)
|
|
297
|
+
|
|
284
298
|
export const LayoutElementSchema: z.ZodType<LayoutElement> = z.lazy(() =>
|
|
285
299
|
z.discriminatedUnion('type', [
|
|
286
300
|
z.object({
|
|
@@ -321,16 +335,7 @@ export const LayoutElementSchema: z.ZodType<LayoutElement> = z.lazy(() =>
|
|
|
321
335
|
z.object({
|
|
322
336
|
type: z.literal('tabs'),
|
|
323
337
|
...commonPropsShape,
|
|
324
|
-
tabs: z.array(
|
|
325
|
-
z.object({
|
|
326
|
-
id: z.string().min(1),
|
|
327
|
-
label: z.string().min(1),
|
|
328
|
-
icon: z.string().optional(),
|
|
329
|
-
visible_when: FilterGroupSchema.optional(),
|
|
330
|
-
default_when: FilterGroupSchema.optional(),
|
|
331
|
-
content: LayoutElementSchema,
|
|
332
|
-
}),
|
|
333
|
-
),
|
|
338
|
+
tabs: z.array(LayoutTabSchema),
|
|
334
339
|
default_tab_id: z.string().optional(),
|
|
335
340
|
}),
|
|
336
341
|
z.object({
|