@proteos/sdk 0.50.1 → 0.51.1
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-TDG5QFZ5.js → chunk-IRFFXJMB.js} +66 -4
- package/dist/chunk-IRFFXJMB.js.map +1 -0
- package/dist/{chunk-OD7GPJAW.cjs → chunk-RKFXHDVU.cjs} +67 -3
- package/dist/chunk-RKFXHDVU.cjs.map +1 -0
- package/dist/index.cjs +345 -96
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +714 -12
- package/dist/index.d.ts +714 -12
- package/dist/index.js +242 -3
- package/dist/index.js.map +1 -1
- package/dist/meta/index.cjs +65 -57
- 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-COxVBT4w.d.cts → types-C9flkAj-.d.cts} +208 -7
- package/dist/{types-COxVBT4w.d.ts → types-C9flkAj-.d.ts} +208 -7
- package/package.json +1 -1
- package/src/auth/index.ts +40 -11
- package/src/auth/me.ts +13 -1
- package/src/auth/platform-entities.ts +11 -0
- package/src/auth/profiles.ts +82 -0
- package/src/auth/types.ts +87 -0
- package/src/auth/user-profile-assignments.ts +41 -0
- package/src/auth/users.ts +37 -0
- package/src/conversation/index.ts +240 -1
- package/src/conversation/types.ts +444 -6
- package/src/index.ts +55 -0
- package/src/meta/app-configurations.ts +100 -0
- package/src/meta/index.ts +28 -10
- package/src/meta/types.ts +94 -4
- package/src/workflow/types.ts +11 -0
- package/dist/chunk-OD7GPJAW.cjs.map +0 -1
- package/dist/chunk-TDG5QFZ5.js.map +0 -1
|
@@ -554,6 +554,40 @@ declare class PageIterator<T, O extends ListOptions> implements AsyncIterable<T>
|
|
|
554
554
|
*/
|
|
555
555
|
declare function createIterator<T, O extends ListOptions>(listFn: ListFn<T, O>, options: O): PageIterator<T, O>;
|
|
556
556
|
|
|
557
|
+
/**
|
|
558
|
+
* Service for app configurations — the typed (app × profile) binding rows
|
|
559
|
+
* that say how an app presents itself: home, menu, agents, record pages.
|
|
560
|
+
* `profile_slug: ''` is the app's base configuration for everyone; a row with
|
|
561
|
+
* a profile is that profile's override (merged field-wise over the base).
|
|
562
|
+
*/
|
|
563
|
+
interface AppConfigurationService {
|
|
564
|
+
/** Lists app configurations (auto-paginating iterator). */
|
|
565
|
+
list(options?: ListAppConfigurationsOptions): PageIterator<AppConfiguration, ListAppConfigurationsOptions>;
|
|
566
|
+
/** Fetches a single page of app configurations. */
|
|
567
|
+
listPage(options?: ListAppConfigurationsOptions): Promise<ListResult<AppConfiguration>>;
|
|
568
|
+
/** Gets an app configuration by slug (404 when unknown). */
|
|
569
|
+
get(slug: string): Promise<AppConfiguration>;
|
|
570
|
+
/**
|
|
571
|
+
* Creates an app configuration. Every reference (app, home list/page, menu,
|
|
572
|
+
* record pages) must exist; `profile_slug` and agent keys are other
|
|
573
|
+
* services' and are not validated.
|
|
574
|
+
* @throws {ProteosError} 409 `app_configuration_already_exists` when the
|
|
575
|
+
* (app_slug, profile_slug) pair is already bound.
|
|
576
|
+
*/
|
|
577
|
+
create(request: CreateAppConfigurationRequest): Promise<AppConfiguration>;
|
|
578
|
+
/**
|
|
579
|
+
* Creates or replaces an app configuration idempotently by slug
|
|
580
|
+
* (`PUT /meta/v1/app-configurations/:slug`). Replaces the whole
|
|
581
|
+
* configuration; the (app_slug, profile_slug) binding of an existing slug
|
|
582
|
+
* is immutable.
|
|
583
|
+
*/
|
|
584
|
+
upsert(slug: string, request: CreateAppConfigurationRequest): Promise<AppConfiguration>;
|
|
585
|
+
/** Partially updates an app configuration (`home: null` clears the home). */
|
|
586
|
+
update(slug: string, request: UpdateAppConfigurationRequest): Promise<AppConfiguration>;
|
|
587
|
+
/** Deletes an app configuration. */
|
|
588
|
+
delete(slug: string): Promise<void>;
|
|
589
|
+
}
|
|
590
|
+
|
|
557
591
|
/**
|
|
558
592
|
* Service for managing apps.
|
|
559
593
|
* Apps group menu configurations and other org-scoped metadata under a
|
|
@@ -1851,6 +1885,11 @@ declare class MetaClient {
|
|
|
1851
1885
|
* Service for managing apps.
|
|
1852
1886
|
*/
|
|
1853
1887
|
readonly apps: AppService;
|
|
1888
|
+
/**
|
|
1889
|
+
* Service for managing app configurations — the typed (app × profile)
|
|
1890
|
+
* bindings: home, menu, agents, record pages.
|
|
1891
|
+
*/
|
|
1892
|
+
readonly appConfigurations: AppConfigurationService;
|
|
1854
1893
|
/**
|
|
1855
1894
|
* Service for managing design references (stored DESIGN.md documents).
|
|
1856
1895
|
*/
|
|
@@ -3264,7 +3303,6 @@ interface List extends AuditFields {
|
|
|
3264
3303
|
/** Row-selection affordance; absent normalizes to `on_demand`. */
|
|
3265
3304
|
selection_mode?: SelectionMode;
|
|
3266
3305
|
/** Record page to open from this list; empty/absent = org default for the entity. */
|
|
3267
|
-
default_page_slug?: string;
|
|
3268
3306
|
sorting: SortConfig[];
|
|
3269
3307
|
filters: FilterGroup[];
|
|
3270
3308
|
}
|
|
@@ -3361,7 +3399,6 @@ declare const ListSchema: z.ZodObject<{
|
|
|
3361
3399
|
kind?: "workflow" | "action" | undefined;
|
|
3362
3400
|
}>, "many">>;
|
|
3363
3401
|
selection_mode: z.ZodOptional<z.ZodEnum<["on_demand", "always", "off"]>>;
|
|
3364
|
-
default_page_slug: z.ZodOptional<z.ZodString>;
|
|
3365
3402
|
sorting: z.ZodArray<z.ZodObject<{
|
|
3366
3403
|
attribute: z.ZodString;
|
|
3367
3404
|
direction: z.ZodEnum<["asc", "desc"]>;
|
|
@@ -3409,7 +3446,6 @@ declare const ListSchema: z.ZodObject<{
|
|
|
3409
3446
|
kind?: "workflow" | "action" | undefined;
|
|
3410
3447
|
}[] | undefined;
|
|
3411
3448
|
selection_mode?: "on_demand" | "always" | "off" | undefined;
|
|
3412
|
-
default_page_slug?: string | undefined;
|
|
3413
3449
|
}, {
|
|
3414
3450
|
name: string;
|
|
3415
3451
|
created_at: string;
|
|
@@ -3446,7 +3482,6 @@ declare const ListSchema: z.ZodObject<{
|
|
|
3446
3482
|
kind?: "workflow" | "action" | undefined;
|
|
3447
3483
|
}[] | undefined;
|
|
3448
3484
|
selection_mode?: "on_demand" | "always" | "off" | undefined;
|
|
3449
|
-
default_page_slug?: string | undefined;
|
|
3450
3485
|
}>;
|
|
3451
3486
|
/**
|
|
3452
3487
|
* Options for listing lists.
|
|
@@ -3468,7 +3503,6 @@ interface CreateListRequest {
|
|
|
3468
3503
|
columns: Column[];
|
|
3469
3504
|
actions?: PageAction[];
|
|
3470
3505
|
selection_mode?: SelectionMode;
|
|
3471
|
-
default_page_slug?: string;
|
|
3472
3506
|
sorting: SortConfig[];
|
|
3473
3507
|
filters: FilterGroup[];
|
|
3474
3508
|
}
|
|
@@ -3482,7 +3516,6 @@ interface UpdateListRequest {
|
|
|
3482
3516
|
actions?: PageAction[];
|
|
3483
3517
|
selection_mode?: SelectionMode;
|
|
3484
3518
|
/** Set to '' to clear back to the org default. */
|
|
3485
|
-
default_page_slug?: string;
|
|
3486
3519
|
sorting?: SortConfig[];
|
|
3487
3520
|
filters?: FilterGroup[];
|
|
3488
3521
|
}
|
|
@@ -4049,6 +4082,174 @@ interface UpdateMenuConfigurationRequest {
|
|
|
4049
4082
|
items?: MenuItem[];
|
|
4050
4083
|
is_default?: boolean;
|
|
4051
4084
|
}
|
|
4085
|
+
/** What an app opens on: a list (records table) or a platform page. */
|
|
4086
|
+
type AppHomeType = 'list' | 'page';
|
|
4087
|
+
interface AppHome {
|
|
4088
|
+
type: AppHomeType;
|
|
4089
|
+
reference: string;
|
|
4090
|
+
}
|
|
4091
|
+
declare const AppHomeSchema: z.ZodObject<{
|
|
4092
|
+
type: z.ZodEnum<["list", "page"]>;
|
|
4093
|
+
reference: z.ZodString;
|
|
4094
|
+
}, "strip", z.ZodTypeAny, {
|
|
4095
|
+
type: "page" | "list";
|
|
4096
|
+
reference: string;
|
|
4097
|
+
}, {
|
|
4098
|
+
type: "page" | "list";
|
|
4099
|
+
reference: string;
|
|
4100
|
+
}>;
|
|
4101
|
+
/**
|
|
4102
|
+
* AppConfiguration — a TYPED binding row: "how app X presents itself" to
|
|
4103
|
+
* everyone (`profile_slug: ''` = the app's default configuration) or to one
|
|
4104
|
+
* profile (an override). One row per (app, profile). The web merges
|
|
4105
|
+
* override ⊕ default field-wise and falls through to structural defaults (menu
|
|
4106
|
+
* `is_default`, first menu leaf, org-default agent, first page) for anything
|
|
4107
|
+
* still unset.
|
|
4108
|
+
*/
|
|
4109
|
+
interface AppConfiguration extends AuditFields {
|
|
4110
|
+
slug: string;
|
|
4111
|
+
org_id: string;
|
|
4112
|
+
module_slug: string;
|
|
4113
|
+
app_slug: string;
|
|
4114
|
+
/** Bound profile; `''` = the default configuration for everyone. */
|
|
4115
|
+
profile_slug: string;
|
|
4116
|
+
/** Home; absent = the first list/page leaf of the resolved menu. */
|
|
4117
|
+
home?: AppHome | null;
|
|
4118
|
+
/** Menu to show; `''` = the app's `is_default` menu. */
|
|
4119
|
+
menu_slug?: string;
|
|
4120
|
+
/** Agent Ask Proteos preselects in this app; `''` = the org default. */
|
|
4121
|
+
default_agent_key?: string;
|
|
4122
|
+
/** Agents offered in this app; empty = every org agent. */
|
|
4123
|
+
agent_keys?: string[];
|
|
4124
|
+
/** entity_slug → record page slug opened from this app. */
|
|
4125
|
+
record_pages?: Record<string, string>;
|
|
4126
|
+
}
|
|
4127
|
+
declare const AppConfigurationSchema: z.ZodObject<{
|
|
4128
|
+
created_at: z.ZodString;
|
|
4129
|
+
updated_at: z.ZodString;
|
|
4130
|
+
created_by: z.ZodObject<{
|
|
4131
|
+
type: z.ZodEnum<["person", "agent", "api"]>;
|
|
4132
|
+
id: z.ZodString;
|
|
4133
|
+
}, "strip", z.ZodTypeAny, {
|
|
4134
|
+
type: "person" | "agent" | "api";
|
|
4135
|
+
id: string;
|
|
4136
|
+
}, {
|
|
4137
|
+
type: "person" | "agent" | "api";
|
|
4138
|
+
id: string;
|
|
4139
|
+
}>;
|
|
4140
|
+
updated_by: z.ZodObject<{
|
|
4141
|
+
type: z.ZodEnum<["person", "agent", "api"]>;
|
|
4142
|
+
id: z.ZodString;
|
|
4143
|
+
}, "strip", z.ZodTypeAny, {
|
|
4144
|
+
type: "person" | "agent" | "api";
|
|
4145
|
+
id: string;
|
|
4146
|
+
}, {
|
|
4147
|
+
type: "person" | "agent" | "api";
|
|
4148
|
+
id: string;
|
|
4149
|
+
}>;
|
|
4150
|
+
} & {
|
|
4151
|
+
slug: z.ZodString;
|
|
4152
|
+
org_id: z.ZodString;
|
|
4153
|
+
module_slug: z.ZodString;
|
|
4154
|
+
app_slug: z.ZodString;
|
|
4155
|
+
profile_slug: z.ZodString;
|
|
4156
|
+
home: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
4157
|
+
type: z.ZodEnum<["list", "page"]>;
|
|
4158
|
+
reference: z.ZodString;
|
|
4159
|
+
}, "strip", z.ZodTypeAny, {
|
|
4160
|
+
type: "page" | "list";
|
|
4161
|
+
reference: string;
|
|
4162
|
+
}, {
|
|
4163
|
+
type: "page" | "list";
|
|
4164
|
+
reference: string;
|
|
4165
|
+
}>>>;
|
|
4166
|
+
menu_slug: z.ZodOptional<z.ZodString>;
|
|
4167
|
+
default_agent_key: z.ZodOptional<z.ZodString>;
|
|
4168
|
+
agent_keys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
4169
|
+
record_pages: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
4170
|
+
}, "strip", z.ZodTypeAny, {
|
|
4171
|
+
created_at: string;
|
|
4172
|
+
updated_at: string;
|
|
4173
|
+
created_by: {
|
|
4174
|
+
type: "person" | "agent" | "api";
|
|
4175
|
+
id: string;
|
|
4176
|
+
};
|
|
4177
|
+
updated_by: {
|
|
4178
|
+
type: "person" | "agent" | "api";
|
|
4179
|
+
id: string;
|
|
4180
|
+
};
|
|
4181
|
+
slug: string;
|
|
4182
|
+
module_slug: string;
|
|
4183
|
+
app_slug: string;
|
|
4184
|
+
org_id: string;
|
|
4185
|
+
profile_slug: string;
|
|
4186
|
+
home?: {
|
|
4187
|
+
type: "page" | "list";
|
|
4188
|
+
reference: string;
|
|
4189
|
+
} | null | undefined;
|
|
4190
|
+
menu_slug?: string | undefined;
|
|
4191
|
+
default_agent_key?: string | undefined;
|
|
4192
|
+
agent_keys?: string[] | undefined;
|
|
4193
|
+
record_pages?: Record<string, string> | undefined;
|
|
4194
|
+
}, {
|
|
4195
|
+
created_at: string;
|
|
4196
|
+
updated_at: string;
|
|
4197
|
+
created_by: {
|
|
4198
|
+
type: "person" | "agent" | "api";
|
|
4199
|
+
id: string;
|
|
4200
|
+
};
|
|
4201
|
+
updated_by: {
|
|
4202
|
+
type: "person" | "agent" | "api";
|
|
4203
|
+
id: string;
|
|
4204
|
+
};
|
|
4205
|
+
slug: string;
|
|
4206
|
+
module_slug: string;
|
|
4207
|
+
app_slug: string;
|
|
4208
|
+
org_id: string;
|
|
4209
|
+
profile_slug: string;
|
|
4210
|
+
home?: {
|
|
4211
|
+
type: "page" | "list";
|
|
4212
|
+
reference: string;
|
|
4213
|
+
} | null | undefined;
|
|
4214
|
+
menu_slug?: string | undefined;
|
|
4215
|
+
default_agent_key?: string | undefined;
|
|
4216
|
+
agent_keys?: string[] | undefined;
|
|
4217
|
+
record_pages?: Record<string, string> | undefined;
|
|
4218
|
+
}>;
|
|
4219
|
+
interface ListAppConfigurationsOptions extends MetaListOptions {
|
|
4220
|
+
slug?: string;
|
|
4221
|
+
module_slug?: string;
|
|
4222
|
+
app_slug?: string;
|
|
4223
|
+
profile_slug?: string;
|
|
4224
|
+
/** `true` = only default rows (no profile), `false` = only profile overrides.
|
|
4225
|
+
* An empty `profile_slug` is never sent, so this is how default rows are
|
|
4226
|
+
* selected. */
|
|
4227
|
+
is_default?: boolean;
|
|
4228
|
+
menu_slug?: string;
|
|
4229
|
+
}
|
|
4230
|
+
interface CreateAppConfigurationRequest {
|
|
4231
|
+
slug: string;
|
|
4232
|
+
module_slug?: string;
|
|
4233
|
+
app_slug: string;
|
|
4234
|
+
profile_slug?: string;
|
|
4235
|
+
home?: AppHome | null;
|
|
4236
|
+
menu_slug?: string;
|
|
4237
|
+
default_agent_key?: string;
|
|
4238
|
+
agent_keys?: string[];
|
|
4239
|
+
record_pages?: Record<string, string>;
|
|
4240
|
+
}
|
|
4241
|
+
/**
|
|
4242
|
+
* Partial update. `home` is tri-state: absent = unchanged, `null` = clear,
|
|
4243
|
+
* object = set. The (app_slug, profile_slug) binding is immutable.
|
|
4244
|
+
*/
|
|
4245
|
+
interface UpdateAppConfigurationRequest {
|
|
4246
|
+
module_slug?: string;
|
|
4247
|
+
home?: AppHome | null;
|
|
4248
|
+
menu_slug?: string;
|
|
4249
|
+
default_agent_key?: string;
|
|
4250
|
+
agent_keys?: string[];
|
|
4251
|
+
record_pages?: Record<string, string>;
|
|
4252
|
+
}
|
|
4052
4253
|
/**
|
|
4053
4254
|
* App definition. Apps group menu configurations and other org-scoped
|
|
4054
4255
|
* metadata under a stable slug. Slug is unique per org (composite key
|
|
@@ -4286,4 +4487,4 @@ declare function isCurrentUserDefault(value: unknown): value is CurrentUserDefau
|
|
|
4286
4487
|
/** Only the identity-valued attribute types can carry the sentinel. */
|
|
4287
4488
|
declare function acceptsCurrentUserDefault(type: AttributeType): boolean;
|
|
4288
4489
|
|
|
4289
|
-
export { type
|
|
4490
|
+
export { type DesignReferenceContent as $, type AuditFields as A, type ComponentService as B, CURRENT_USER_DEFAULT as C, type CreateAppConfigurationRequest as D, type CreateAppRequest as E, type FileRef as F, type CreateComponentRequest as G, type CreateDesignReferenceRequest as H, type CreateEntityRequest as I, type CreateListRequest as J, type CreateListViewRequest as K, type ListOptions as L, type CreateMenuConfigurationRequest as M, type CreatePageRequest as N, type CreateVariableRequest as O, PageIterator as P, type CurrencyAttributeMeta as Q, CurrencyAttributeMetaSchema as R, type CurrencySymbolSide as S, type CurrencyValue as T, type UserRef as U, type CurrentUserDefault as V, DEFAULT_OPTIONS as W, DEFAULT_PAGE_SIZE as X, DONE as Y, type DeployModuleRequest as Z, type DesignReference as _, type Attribute as a, RelationAttributeMetaSchema as a$, DesignReferenceSchema as a0, type DesignReferenceService as a1, type Done as a2, type Entity as a3, EntitySchema as a4, type EntityService as a5, type EntityWithSchema as a6, EntityWithSchemaSchema as a7, type EnumAttributeMeta as a8, type EnumValue as a9, MenuConfigurationSchema as aA, type MenuConfigurationService as aB, type MenuItem as aC, MenuItemSchema as aD, MenuItemType as aE, MetaClient as aF, type MetaListOptions as aG, type Module as aH, ModuleSchema as aI, type ModuleService as aJ, type ModuleStatus as aK, type OnDeleteAction as aL, OnDeleteActionSchema as aM, PLATFORM_ATTRIBUTE_NAMES as aN, PLATFORM_USER_ID as aO, type Page as aP, type PageAction as aQ, type PageActionKind as aR, PageActionSchema as aS, type PageLayout as aT, PageLayoutSchema as aU, PageSchema as aV, type PageService as aW, type PageType as aX, type PublicPageComponent as aY, type PublicPageResponse as aZ, type RelationAttributeMeta as a_, type FileAttributeMeta as aa, FileRefSchema as ab, type FilterElement as ac, FilterElementSchema as ad, type FilterGroup as ae, FilterGroupSchema as af, type List as ag, type ListAppConfigurationsOptions as ah, type ListAppsOptions as ai, type ListComponentsOptions as aj, type ListDesignReferencesOptions as ak, type ListEntitiesOptions as al, type ListFn as am, type ListListViewsOptions as an, type ListListsOptions as ao, type ListMenuConfigurationsOptions as ap, type ListModulesOptions as aq, type ListPagesOptions as ar, ListSchema as as, type ListService as at, type ListVariablesOptions as au, type ListView as av, ListViewSchema as aw, type ListViewService as ax, type LogicalOperator as ay, type MenuConfiguration as az, type ListResult as b, type ListElement as b$, type RequestOptions as b0, type ResolvedClientOptions as b1, type ResponseMeta as b2, ResponseMetaSchema as b3, type SortConfig as b4, SortConfigSchema as b5, type SortDirection as b6, type Timestamps as b7, type TokenProvider as b8, type UpdateAppConfigurationRequest as b9, parseAmount as bA, parseCurrencyMeta as bB, parseFileMeta as bC, parseRelationMeta as bD, platformAttributes as bE, resolveOptions as bF, type AttributeForLookup as bG, type AttributeMeta as bH, BUILT_IN_CONTROLS as bI, type BuiltInControlSlug as bJ, type CardElement as bK, type ColumnElement as bL, type CommonProps as bM, type ComponentElement as bN, type ControlBucket as bO, type DatetimeAttributeMeta as bP, type DatetimeFormat as bQ, type DividerElement as bR, type FieldElement as bS, FileAttributeMetaSchema as bT, type LayoutAlign as bU, type LayoutElement as bV, LayoutElementSchema as bW, LayoutElementType as bX, type LayoutGap as bY, type LayoutJustify as bZ, type LayoutTab as b_, type UpdateAppRequest as ba, type UpdateComponentRequest as bb, type UpdateDesignReferenceRequest as bc, type UpdateEntityRequest as bd, type UpdateListRequest as be, type UpdateListViewRequest as bf, type UpdateMenuConfigurationRequest as bg, type UpdatePageRequest as bh, type UpdateVariableRequest as bi, UserRefSchema as bj, type UserType as bk, type Variable as bl, VariableSchema as bm, type VariableService as bn, acceptsCurrentUserDefault as bo, allCurrencyCodes as bp, createIterator as bq, createListResultSchema as br, currencyLabel as bs, currencySymbol as bt, currencySymbolSide as bu, formatAmount as bv, formatMoney as bw, isCurrentUserDefault as bx, isPlatformAttributeName as by, localeNumberSeparators as bz, ProteosClient as c, type NumberAttributeMeta as c0, type ObjectAttributeMeta as c1, PAGE_BACKGROUND_TOKENS as c2, type PageBackgroundToken as c3, type PageLayoutSidePanel as c4, PageLayoutSidePanelSchema as c5, type PageStyle as c6, PageStyleSchema as c7, type PrincipalAttributeMeta as c8, type PrincipalType as c9, type RecordFilterElement as ca, type RelatedListElement as cb, type RelatedRecordElement as cc, type ResponsiveSizing as cd, type RowElement as ce, type SectionElement as cf, type SizeValue as cg, SizeValueSchema as ch, type SizingProps as ci, type StringAttributeMeta as cj, type StringFormat as ck, type TabsElement as cl, type TextElement as cm, type TextVariant as cn, type UserAttributeMeta as co, UserAttributeMetaSchema as cp, type WorkflowTriggerElement as cq, isBuiltInControl as cr, lookupCompatibleControls as cs, lookupControls as ct, lookupPrimaryControl as cu, parsePrincipalMeta as cv, parseUserMeta as cw, type PrincipalRef as d, type PublicAccessOperation as e, type App as f, type AppConfiguration as g, AppConfigurationSchema as h, type AppConfigurationService as i, type AppHome as j, AppHomeSchema as k, type AppHomeType as l, AppSchema as m, type AppService as n, type ArrayAttributeMeta as o, type AttributeAccessRule as p, type AttributeRestrictions as q, AttributeSchema as r, type AttributeType as s, AuditFieldsSchema as t, type ClientOptions as u, type Column as v, ColumnSchema as w, type ComparisonOperator as x, type Component as y, ComponentSchema as z };
|
|
@@ -554,6 +554,40 @@ declare class PageIterator<T, O extends ListOptions> implements AsyncIterable<T>
|
|
|
554
554
|
*/
|
|
555
555
|
declare function createIterator<T, O extends ListOptions>(listFn: ListFn<T, O>, options: O): PageIterator<T, O>;
|
|
556
556
|
|
|
557
|
+
/**
|
|
558
|
+
* Service for app configurations — the typed (app × profile) binding rows
|
|
559
|
+
* that say how an app presents itself: home, menu, agents, record pages.
|
|
560
|
+
* `profile_slug: ''` is the app's base configuration for everyone; a row with
|
|
561
|
+
* a profile is that profile's override (merged field-wise over the base).
|
|
562
|
+
*/
|
|
563
|
+
interface AppConfigurationService {
|
|
564
|
+
/** Lists app configurations (auto-paginating iterator). */
|
|
565
|
+
list(options?: ListAppConfigurationsOptions): PageIterator<AppConfiguration, ListAppConfigurationsOptions>;
|
|
566
|
+
/** Fetches a single page of app configurations. */
|
|
567
|
+
listPage(options?: ListAppConfigurationsOptions): Promise<ListResult<AppConfiguration>>;
|
|
568
|
+
/** Gets an app configuration by slug (404 when unknown). */
|
|
569
|
+
get(slug: string): Promise<AppConfiguration>;
|
|
570
|
+
/**
|
|
571
|
+
* Creates an app configuration. Every reference (app, home list/page, menu,
|
|
572
|
+
* record pages) must exist; `profile_slug` and agent keys are other
|
|
573
|
+
* services' and are not validated.
|
|
574
|
+
* @throws {ProteosError} 409 `app_configuration_already_exists` when the
|
|
575
|
+
* (app_slug, profile_slug) pair is already bound.
|
|
576
|
+
*/
|
|
577
|
+
create(request: CreateAppConfigurationRequest): Promise<AppConfiguration>;
|
|
578
|
+
/**
|
|
579
|
+
* Creates or replaces an app configuration idempotently by slug
|
|
580
|
+
* (`PUT /meta/v1/app-configurations/:slug`). Replaces the whole
|
|
581
|
+
* configuration; the (app_slug, profile_slug) binding of an existing slug
|
|
582
|
+
* is immutable.
|
|
583
|
+
*/
|
|
584
|
+
upsert(slug: string, request: CreateAppConfigurationRequest): Promise<AppConfiguration>;
|
|
585
|
+
/** Partially updates an app configuration (`home: null` clears the home). */
|
|
586
|
+
update(slug: string, request: UpdateAppConfigurationRequest): Promise<AppConfiguration>;
|
|
587
|
+
/** Deletes an app configuration. */
|
|
588
|
+
delete(slug: string): Promise<void>;
|
|
589
|
+
}
|
|
590
|
+
|
|
557
591
|
/**
|
|
558
592
|
* Service for managing apps.
|
|
559
593
|
* Apps group menu configurations and other org-scoped metadata under a
|
|
@@ -1851,6 +1885,11 @@ declare class MetaClient {
|
|
|
1851
1885
|
* Service for managing apps.
|
|
1852
1886
|
*/
|
|
1853
1887
|
readonly apps: AppService;
|
|
1888
|
+
/**
|
|
1889
|
+
* Service for managing app configurations — the typed (app × profile)
|
|
1890
|
+
* bindings: home, menu, agents, record pages.
|
|
1891
|
+
*/
|
|
1892
|
+
readonly appConfigurations: AppConfigurationService;
|
|
1854
1893
|
/**
|
|
1855
1894
|
* Service for managing design references (stored DESIGN.md documents).
|
|
1856
1895
|
*/
|
|
@@ -3264,7 +3303,6 @@ interface List extends AuditFields {
|
|
|
3264
3303
|
/** Row-selection affordance; absent normalizes to `on_demand`. */
|
|
3265
3304
|
selection_mode?: SelectionMode;
|
|
3266
3305
|
/** Record page to open from this list; empty/absent = org default for the entity. */
|
|
3267
|
-
default_page_slug?: string;
|
|
3268
3306
|
sorting: SortConfig[];
|
|
3269
3307
|
filters: FilterGroup[];
|
|
3270
3308
|
}
|
|
@@ -3361,7 +3399,6 @@ declare const ListSchema: z.ZodObject<{
|
|
|
3361
3399
|
kind?: "workflow" | "action" | undefined;
|
|
3362
3400
|
}>, "many">>;
|
|
3363
3401
|
selection_mode: z.ZodOptional<z.ZodEnum<["on_demand", "always", "off"]>>;
|
|
3364
|
-
default_page_slug: z.ZodOptional<z.ZodString>;
|
|
3365
3402
|
sorting: z.ZodArray<z.ZodObject<{
|
|
3366
3403
|
attribute: z.ZodString;
|
|
3367
3404
|
direction: z.ZodEnum<["asc", "desc"]>;
|
|
@@ -3409,7 +3446,6 @@ declare const ListSchema: z.ZodObject<{
|
|
|
3409
3446
|
kind?: "workflow" | "action" | undefined;
|
|
3410
3447
|
}[] | undefined;
|
|
3411
3448
|
selection_mode?: "on_demand" | "always" | "off" | undefined;
|
|
3412
|
-
default_page_slug?: string | undefined;
|
|
3413
3449
|
}, {
|
|
3414
3450
|
name: string;
|
|
3415
3451
|
created_at: string;
|
|
@@ -3446,7 +3482,6 @@ declare const ListSchema: z.ZodObject<{
|
|
|
3446
3482
|
kind?: "workflow" | "action" | undefined;
|
|
3447
3483
|
}[] | undefined;
|
|
3448
3484
|
selection_mode?: "on_demand" | "always" | "off" | undefined;
|
|
3449
|
-
default_page_slug?: string | undefined;
|
|
3450
3485
|
}>;
|
|
3451
3486
|
/**
|
|
3452
3487
|
* Options for listing lists.
|
|
@@ -3468,7 +3503,6 @@ interface CreateListRequest {
|
|
|
3468
3503
|
columns: Column[];
|
|
3469
3504
|
actions?: PageAction[];
|
|
3470
3505
|
selection_mode?: SelectionMode;
|
|
3471
|
-
default_page_slug?: string;
|
|
3472
3506
|
sorting: SortConfig[];
|
|
3473
3507
|
filters: FilterGroup[];
|
|
3474
3508
|
}
|
|
@@ -3482,7 +3516,6 @@ interface UpdateListRequest {
|
|
|
3482
3516
|
actions?: PageAction[];
|
|
3483
3517
|
selection_mode?: SelectionMode;
|
|
3484
3518
|
/** Set to '' to clear back to the org default. */
|
|
3485
|
-
default_page_slug?: string;
|
|
3486
3519
|
sorting?: SortConfig[];
|
|
3487
3520
|
filters?: FilterGroup[];
|
|
3488
3521
|
}
|
|
@@ -4049,6 +4082,174 @@ interface UpdateMenuConfigurationRequest {
|
|
|
4049
4082
|
items?: MenuItem[];
|
|
4050
4083
|
is_default?: boolean;
|
|
4051
4084
|
}
|
|
4085
|
+
/** What an app opens on: a list (records table) or a platform page. */
|
|
4086
|
+
type AppHomeType = 'list' | 'page';
|
|
4087
|
+
interface AppHome {
|
|
4088
|
+
type: AppHomeType;
|
|
4089
|
+
reference: string;
|
|
4090
|
+
}
|
|
4091
|
+
declare const AppHomeSchema: z.ZodObject<{
|
|
4092
|
+
type: z.ZodEnum<["list", "page"]>;
|
|
4093
|
+
reference: z.ZodString;
|
|
4094
|
+
}, "strip", z.ZodTypeAny, {
|
|
4095
|
+
type: "page" | "list";
|
|
4096
|
+
reference: string;
|
|
4097
|
+
}, {
|
|
4098
|
+
type: "page" | "list";
|
|
4099
|
+
reference: string;
|
|
4100
|
+
}>;
|
|
4101
|
+
/**
|
|
4102
|
+
* AppConfiguration — a TYPED binding row: "how app X presents itself" to
|
|
4103
|
+
* everyone (`profile_slug: ''` = the app's default configuration) or to one
|
|
4104
|
+
* profile (an override). One row per (app, profile). The web merges
|
|
4105
|
+
* override ⊕ default field-wise and falls through to structural defaults (menu
|
|
4106
|
+
* `is_default`, first menu leaf, org-default agent, first page) for anything
|
|
4107
|
+
* still unset.
|
|
4108
|
+
*/
|
|
4109
|
+
interface AppConfiguration extends AuditFields {
|
|
4110
|
+
slug: string;
|
|
4111
|
+
org_id: string;
|
|
4112
|
+
module_slug: string;
|
|
4113
|
+
app_slug: string;
|
|
4114
|
+
/** Bound profile; `''` = the default configuration for everyone. */
|
|
4115
|
+
profile_slug: string;
|
|
4116
|
+
/** Home; absent = the first list/page leaf of the resolved menu. */
|
|
4117
|
+
home?: AppHome | null;
|
|
4118
|
+
/** Menu to show; `''` = the app's `is_default` menu. */
|
|
4119
|
+
menu_slug?: string;
|
|
4120
|
+
/** Agent Ask Proteos preselects in this app; `''` = the org default. */
|
|
4121
|
+
default_agent_key?: string;
|
|
4122
|
+
/** Agents offered in this app; empty = every org agent. */
|
|
4123
|
+
agent_keys?: string[];
|
|
4124
|
+
/** entity_slug → record page slug opened from this app. */
|
|
4125
|
+
record_pages?: Record<string, string>;
|
|
4126
|
+
}
|
|
4127
|
+
declare const AppConfigurationSchema: z.ZodObject<{
|
|
4128
|
+
created_at: z.ZodString;
|
|
4129
|
+
updated_at: z.ZodString;
|
|
4130
|
+
created_by: z.ZodObject<{
|
|
4131
|
+
type: z.ZodEnum<["person", "agent", "api"]>;
|
|
4132
|
+
id: z.ZodString;
|
|
4133
|
+
}, "strip", z.ZodTypeAny, {
|
|
4134
|
+
type: "person" | "agent" | "api";
|
|
4135
|
+
id: string;
|
|
4136
|
+
}, {
|
|
4137
|
+
type: "person" | "agent" | "api";
|
|
4138
|
+
id: string;
|
|
4139
|
+
}>;
|
|
4140
|
+
updated_by: z.ZodObject<{
|
|
4141
|
+
type: z.ZodEnum<["person", "agent", "api"]>;
|
|
4142
|
+
id: z.ZodString;
|
|
4143
|
+
}, "strip", z.ZodTypeAny, {
|
|
4144
|
+
type: "person" | "agent" | "api";
|
|
4145
|
+
id: string;
|
|
4146
|
+
}, {
|
|
4147
|
+
type: "person" | "agent" | "api";
|
|
4148
|
+
id: string;
|
|
4149
|
+
}>;
|
|
4150
|
+
} & {
|
|
4151
|
+
slug: z.ZodString;
|
|
4152
|
+
org_id: z.ZodString;
|
|
4153
|
+
module_slug: z.ZodString;
|
|
4154
|
+
app_slug: z.ZodString;
|
|
4155
|
+
profile_slug: z.ZodString;
|
|
4156
|
+
home: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
4157
|
+
type: z.ZodEnum<["list", "page"]>;
|
|
4158
|
+
reference: z.ZodString;
|
|
4159
|
+
}, "strip", z.ZodTypeAny, {
|
|
4160
|
+
type: "page" | "list";
|
|
4161
|
+
reference: string;
|
|
4162
|
+
}, {
|
|
4163
|
+
type: "page" | "list";
|
|
4164
|
+
reference: string;
|
|
4165
|
+
}>>>;
|
|
4166
|
+
menu_slug: z.ZodOptional<z.ZodString>;
|
|
4167
|
+
default_agent_key: z.ZodOptional<z.ZodString>;
|
|
4168
|
+
agent_keys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
4169
|
+
record_pages: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
4170
|
+
}, "strip", z.ZodTypeAny, {
|
|
4171
|
+
created_at: string;
|
|
4172
|
+
updated_at: string;
|
|
4173
|
+
created_by: {
|
|
4174
|
+
type: "person" | "agent" | "api";
|
|
4175
|
+
id: string;
|
|
4176
|
+
};
|
|
4177
|
+
updated_by: {
|
|
4178
|
+
type: "person" | "agent" | "api";
|
|
4179
|
+
id: string;
|
|
4180
|
+
};
|
|
4181
|
+
slug: string;
|
|
4182
|
+
module_slug: string;
|
|
4183
|
+
app_slug: string;
|
|
4184
|
+
org_id: string;
|
|
4185
|
+
profile_slug: string;
|
|
4186
|
+
home?: {
|
|
4187
|
+
type: "page" | "list";
|
|
4188
|
+
reference: string;
|
|
4189
|
+
} | null | undefined;
|
|
4190
|
+
menu_slug?: string | undefined;
|
|
4191
|
+
default_agent_key?: string | undefined;
|
|
4192
|
+
agent_keys?: string[] | undefined;
|
|
4193
|
+
record_pages?: Record<string, string> | undefined;
|
|
4194
|
+
}, {
|
|
4195
|
+
created_at: string;
|
|
4196
|
+
updated_at: string;
|
|
4197
|
+
created_by: {
|
|
4198
|
+
type: "person" | "agent" | "api";
|
|
4199
|
+
id: string;
|
|
4200
|
+
};
|
|
4201
|
+
updated_by: {
|
|
4202
|
+
type: "person" | "agent" | "api";
|
|
4203
|
+
id: string;
|
|
4204
|
+
};
|
|
4205
|
+
slug: string;
|
|
4206
|
+
module_slug: string;
|
|
4207
|
+
app_slug: string;
|
|
4208
|
+
org_id: string;
|
|
4209
|
+
profile_slug: string;
|
|
4210
|
+
home?: {
|
|
4211
|
+
type: "page" | "list";
|
|
4212
|
+
reference: string;
|
|
4213
|
+
} | null | undefined;
|
|
4214
|
+
menu_slug?: string | undefined;
|
|
4215
|
+
default_agent_key?: string | undefined;
|
|
4216
|
+
agent_keys?: string[] | undefined;
|
|
4217
|
+
record_pages?: Record<string, string> | undefined;
|
|
4218
|
+
}>;
|
|
4219
|
+
interface ListAppConfigurationsOptions extends MetaListOptions {
|
|
4220
|
+
slug?: string;
|
|
4221
|
+
module_slug?: string;
|
|
4222
|
+
app_slug?: string;
|
|
4223
|
+
profile_slug?: string;
|
|
4224
|
+
/** `true` = only default rows (no profile), `false` = only profile overrides.
|
|
4225
|
+
* An empty `profile_slug` is never sent, so this is how default rows are
|
|
4226
|
+
* selected. */
|
|
4227
|
+
is_default?: boolean;
|
|
4228
|
+
menu_slug?: string;
|
|
4229
|
+
}
|
|
4230
|
+
interface CreateAppConfigurationRequest {
|
|
4231
|
+
slug: string;
|
|
4232
|
+
module_slug?: string;
|
|
4233
|
+
app_slug: string;
|
|
4234
|
+
profile_slug?: string;
|
|
4235
|
+
home?: AppHome | null;
|
|
4236
|
+
menu_slug?: string;
|
|
4237
|
+
default_agent_key?: string;
|
|
4238
|
+
agent_keys?: string[];
|
|
4239
|
+
record_pages?: Record<string, string>;
|
|
4240
|
+
}
|
|
4241
|
+
/**
|
|
4242
|
+
* Partial update. `home` is tri-state: absent = unchanged, `null` = clear,
|
|
4243
|
+
* object = set. The (app_slug, profile_slug) binding is immutable.
|
|
4244
|
+
*/
|
|
4245
|
+
interface UpdateAppConfigurationRequest {
|
|
4246
|
+
module_slug?: string;
|
|
4247
|
+
home?: AppHome | null;
|
|
4248
|
+
menu_slug?: string;
|
|
4249
|
+
default_agent_key?: string;
|
|
4250
|
+
agent_keys?: string[];
|
|
4251
|
+
record_pages?: Record<string, string>;
|
|
4252
|
+
}
|
|
4052
4253
|
/**
|
|
4053
4254
|
* App definition. Apps group menu configurations and other org-scoped
|
|
4054
4255
|
* metadata under a stable slug. Slug is unique per org (composite key
|
|
@@ -4286,4 +4487,4 @@ declare function isCurrentUserDefault(value: unknown): value is CurrentUserDefau
|
|
|
4286
4487
|
/** Only the identity-valued attribute types can carry the sentinel. */
|
|
4287
4488
|
declare function acceptsCurrentUserDefault(type: AttributeType): boolean;
|
|
4288
4489
|
|
|
4289
|
-
export { type
|
|
4490
|
+
export { type DesignReferenceContent as $, type AuditFields as A, type ComponentService as B, CURRENT_USER_DEFAULT as C, type CreateAppConfigurationRequest as D, type CreateAppRequest as E, type FileRef as F, type CreateComponentRequest as G, type CreateDesignReferenceRequest as H, type CreateEntityRequest as I, type CreateListRequest as J, type CreateListViewRequest as K, type ListOptions as L, type CreateMenuConfigurationRequest as M, type CreatePageRequest as N, type CreateVariableRequest as O, PageIterator as P, type CurrencyAttributeMeta as Q, CurrencyAttributeMetaSchema as R, type CurrencySymbolSide as S, type CurrencyValue as T, type UserRef as U, type CurrentUserDefault as V, DEFAULT_OPTIONS as W, DEFAULT_PAGE_SIZE as X, DONE as Y, type DeployModuleRequest as Z, type DesignReference as _, type Attribute as a, RelationAttributeMetaSchema as a$, DesignReferenceSchema as a0, type DesignReferenceService as a1, type Done as a2, type Entity as a3, EntitySchema as a4, type EntityService as a5, type EntityWithSchema as a6, EntityWithSchemaSchema as a7, type EnumAttributeMeta as a8, type EnumValue as a9, MenuConfigurationSchema as aA, type MenuConfigurationService as aB, type MenuItem as aC, MenuItemSchema as aD, MenuItemType as aE, MetaClient as aF, type MetaListOptions as aG, type Module as aH, ModuleSchema as aI, type ModuleService as aJ, type ModuleStatus as aK, type OnDeleteAction as aL, OnDeleteActionSchema as aM, PLATFORM_ATTRIBUTE_NAMES as aN, PLATFORM_USER_ID as aO, type Page as aP, type PageAction as aQ, type PageActionKind as aR, PageActionSchema as aS, type PageLayout as aT, PageLayoutSchema as aU, PageSchema as aV, type PageService as aW, type PageType as aX, type PublicPageComponent as aY, type PublicPageResponse as aZ, type RelationAttributeMeta as a_, type FileAttributeMeta as aa, FileRefSchema as ab, type FilterElement as ac, FilterElementSchema as ad, type FilterGroup as ae, FilterGroupSchema as af, type List as ag, type ListAppConfigurationsOptions as ah, type ListAppsOptions as ai, type ListComponentsOptions as aj, type ListDesignReferencesOptions as ak, type ListEntitiesOptions as al, type ListFn as am, type ListListViewsOptions as an, type ListListsOptions as ao, type ListMenuConfigurationsOptions as ap, type ListModulesOptions as aq, type ListPagesOptions as ar, ListSchema as as, type ListService as at, type ListVariablesOptions as au, type ListView as av, ListViewSchema as aw, type ListViewService as ax, type LogicalOperator as ay, type MenuConfiguration as az, type ListResult as b, type ListElement as b$, type RequestOptions as b0, type ResolvedClientOptions as b1, type ResponseMeta as b2, ResponseMetaSchema as b3, type SortConfig as b4, SortConfigSchema as b5, type SortDirection as b6, type Timestamps as b7, type TokenProvider as b8, type UpdateAppConfigurationRequest as b9, parseAmount as bA, parseCurrencyMeta as bB, parseFileMeta as bC, parseRelationMeta as bD, platformAttributes as bE, resolveOptions as bF, type AttributeForLookup as bG, type AttributeMeta as bH, BUILT_IN_CONTROLS as bI, type BuiltInControlSlug as bJ, type CardElement as bK, type ColumnElement as bL, type CommonProps as bM, type ComponentElement as bN, type ControlBucket as bO, type DatetimeAttributeMeta as bP, type DatetimeFormat as bQ, type DividerElement as bR, type FieldElement as bS, FileAttributeMetaSchema as bT, type LayoutAlign as bU, type LayoutElement as bV, LayoutElementSchema as bW, LayoutElementType as bX, type LayoutGap as bY, type LayoutJustify as bZ, type LayoutTab as b_, type UpdateAppRequest as ba, type UpdateComponentRequest as bb, type UpdateDesignReferenceRequest as bc, type UpdateEntityRequest as bd, type UpdateListRequest as be, type UpdateListViewRequest as bf, type UpdateMenuConfigurationRequest as bg, type UpdatePageRequest as bh, type UpdateVariableRequest as bi, UserRefSchema as bj, type UserType as bk, type Variable as bl, VariableSchema as bm, type VariableService as bn, acceptsCurrentUserDefault as bo, allCurrencyCodes as bp, createIterator as bq, createListResultSchema as br, currencyLabel as bs, currencySymbol as bt, currencySymbolSide as bu, formatAmount as bv, formatMoney as bw, isCurrentUserDefault as bx, isPlatformAttributeName as by, localeNumberSeparators as bz, ProteosClient as c, type NumberAttributeMeta as c0, type ObjectAttributeMeta as c1, PAGE_BACKGROUND_TOKENS as c2, type PageBackgroundToken as c3, type PageLayoutSidePanel as c4, PageLayoutSidePanelSchema as c5, type PageStyle as c6, PageStyleSchema as c7, type PrincipalAttributeMeta as c8, type PrincipalType as c9, type RecordFilterElement as ca, type RelatedListElement as cb, type RelatedRecordElement as cc, type ResponsiveSizing as cd, type RowElement as ce, type SectionElement as cf, type SizeValue as cg, SizeValueSchema as ch, type SizingProps as ci, type StringAttributeMeta as cj, type StringFormat as ck, type TabsElement as cl, type TextElement as cm, type TextVariant as cn, type UserAttributeMeta as co, UserAttributeMetaSchema as cp, type WorkflowTriggerElement as cq, isBuiltInControl as cr, lookupCompatibleControls as cs, lookupControls as ct, lookupPrimaryControl as cu, parsePrincipalMeta as cv, parseUserMeta as cw, type PrincipalRef as d, type PublicAccessOperation as e, type App as f, type AppConfiguration as g, AppConfigurationSchema as h, type AppConfigurationService as i, type AppHome as j, AppHomeSchema as k, type AppHomeType as l, AppSchema as m, type AppService as n, type ArrayAttributeMeta as o, type AttributeAccessRule as p, type AttributeRestrictions as q, AttributeSchema as r, type AttributeType as s, AuditFieldsSchema as t, type ClientOptions as u, type Column as v, ColumnSchema as w, type ComparisonOperator as x, type Component as y, ComponentSchema as z };
|