@proteos/sdk 0.45.0 → 0.47.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.
Files changed (41) hide show
  1. package/dist/{chunk-IGIAJVX6.js → chunk-5KEJKXO5.js} +220 -34
  2. package/dist/chunk-5KEJKXO5.js.map +1 -0
  3. package/dist/{chunk-33EULWIM.cjs → chunk-Z7LC3GGU.cjs} +224 -33
  4. package/dist/chunk-Z7LC3GGU.cjs.map +1 -0
  5. package/dist/index.cjs +437 -179
  6. package/dist/index.cjs.map +1 -1
  7. package/dist/index.d.cts +659 -18
  8. package/dist/index.d.ts +659 -18
  9. package/dist/index.js +339 -97
  10. package/dist/index.js.map +1 -1
  11. package/dist/meta/index.cjs +69 -53
  12. package/dist/meta/index.d.cts +1 -1
  13. package/dist/meta/index.d.ts +1 -1
  14. package/dist/meta/index.js +1 -1
  15. package/dist/{types-BTdBFq34.d.cts → types-oECz4xTQ.d.cts} +578 -32
  16. package/dist/{types-BTdBFq34.d.ts → types-oECz4xTQ.d.ts} +578 -32
  17. package/package.json +1 -1
  18. package/src/auth/index.ts +58 -1
  19. package/src/auth/me.ts +14 -1
  20. package/src/auth/platform-entities.ts +27 -0
  21. package/src/auth/roles.ts +3 -1
  22. package/src/auth/shares.ts +181 -0
  23. package/src/auth/teams.ts +135 -0
  24. package/src/auth/types.ts +192 -4
  25. package/src/auth/user-role-assignments.ts +65 -0
  26. package/src/functions/actions.ts +29 -0
  27. package/src/functions/types.ts +6 -4
  28. package/src/index.ts +36 -0
  29. package/src/knowledge/graph.ts +6 -2
  30. package/src/knowledge/index.ts +15 -0
  31. package/src/knowledge/nodes.ts +4 -1
  32. package/src/knowledge/spaces.ts +86 -0
  33. package/src/knowledge/types.ts +89 -0
  34. package/src/meta/index.ts +11 -0
  35. package/src/meta/layout/control-registry.json +154 -27
  36. package/src/meta/layout/elements.ts +86 -0
  37. package/src/meta/layout/index.ts +2 -0
  38. package/src/meta/types.ts +245 -17
  39. package/src/workflow/types.ts +20 -3
  40. package/dist/chunk-33EULWIM.cjs.map +0 -1
  41. package/dist/chunk-IGIAJVX6.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { A as AuditFields, L as ListOptions, a as Attribute, U as UserRef$2, P as PageIterator, b as ListResult, c as ProteosClient, F as FileRef, d as PublicAccessOperation } from './types-BTdBFq34.js';
2
- export { e as App, f as AppSchema, g as AppService, h as ArrayAttributeMeta, i as AttributeSchema, j as AttributeType, k as AuditFieldsSchema, C as ClientOptions, l as Column, m as ColumnSchema, n as ComparisonOperator, o as Component, p as ComponentSchema, q as ComponentService, r as CreateAppRequest, s as CreateComponentRequest, t as CreateDesignReferenceRequest, u as CreateEntityRequest, v as CreateListRequest, w as CreateListViewRequest, x as CreateMenuConfigurationRequest, y as CreatePageRequest, z as CreateVariableRequest, B as CurrencyAttributeMeta, D as CurrencyAttributeMetaSchema, E as CurrencySymbolSide, G as CurrencyValue, H as DEFAULT_OPTIONS, I as DEFAULT_PAGE_SIZE, J as DONE, K as DeployModuleRequest, M as DesignReference, N as DesignReferenceContent, O as DesignReferenceSchema, Q as DesignReferenceService, R as Done, S as Entity, T as EntitySchema, V as EntityService, W as EntityWithSchema, X as EntityWithSchemaSchema, Y as EnumAttributeMeta, Z as EnumValue, _ as FileAttributeMeta, $ as FileRefSchema, a0 as FilterElement, a1 as FilterElementSchema, a2 as FilterGroup, a3 as FilterGroupSchema, a4 as List, a5 as ListAppsOptions, a6 as ListComponentsOptions, a7 as ListDesignReferencesOptions, a8 as ListEntitiesOptions, a9 as ListFn, aa as ListListViewsOptions, ab as ListListsOptions, ac as ListMenuConfigurationsOptions, ad as ListModulesOptions, ae as ListPagesOptions, af as ListSchema, ag as ListService, ah as ListVariablesOptions, ai as ListView, aj as ListViewSchema, ak as ListViewService, al as LogicalOperator, am as MenuConfiguration, an as MenuConfigurationSchema, ao as MenuConfigurationService, ap as MenuItem, aq as MenuItemSchema, ar as MenuItemType, as as MetaClient, at as MetaListOptions, au as Module, av as ModuleSchema, aw as ModuleService, ax as ModuleStatus, ay as OnDeleteAction, az as OnDeleteActionSchema, aA as PLATFORM_ATTRIBUTE_NAMES, aB as PLATFORM_USER_ID, aC as Page, aD as PageAction, aE as PageActionSchema, aF as PageLayout, aG as PageLayoutSchema, aH as PageSchema, aI as PageService, aJ as PageType, aK as PublicPageComponent, aL as PublicPageResponse, aM as RelationAttributeMeta, aN as RelationAttributeMetaSchema, aO as RequestOptions, aP as ResolvedClientOptions, aQ as ResponseMeta, aR as ResponseMetaSchema, aS as SortConfig, aT as SortConfigSchema, aU as SortDirection, aV as Timestamps, aW as TokenProvider, aX as UpdateAppRequest, aY as UpdateComponentRequest, aZ as UpdateDesignReferenceRequest, a_ as UpdateEntityRequest, a$ as UpdateListRequest, b0 as UpdateListViewRequest, b1 as UpdateMenuConfigurationRequest, b2 as UpdatePageRequest, b3 as UpdateVariableRequest, b4 as UserRefSchema, b5 as UserType, b6 as Variable, b7 as VariableSchema, b8 as VariableService, b9 as allCurrencyCodes, ba as createIterator, bb as createListResultSchema, bc as currencyLabel, bd as currencySymbol, be as currencySymbolSide, bf as formatAmount, bg as formatMoney, bh as isPlatformAttributeName, bi as localeNumberSeparators, bj as parseAmount, bk as parseCurrencyMeta, bl as parseFileMeta, bm as parseRelationMeta, bn as platformAttributes, bo as resolveOptions } from './types-BTdBFq34.js';
1
+ import { A as AuditFields, L as ListOptions, a as Attribute, U as UserRef$2, P as PageIterator, b as ListResult, c as ProteosClient, F as FileRef, d as PrincipalRef, e as PublicAccessOperation } from './types-oECz4xTQ.js';
2
+ export { f as App, g as AppSchema, h as AppService, i as ArrayAttributeMeta, j as AttributeAccessRule, k as AttributeRestrictions, l as AttributeSchema, m as AttributeType, n as AuditFieldsSchema, C as CURRENT_USER_DEFAULT, o as ClientOptions, p as Column, q as ColumnSchema, r as ComparisonOperator, s as Component, t as ComponentSchema, u as ComponentService, v as CreateAppRequest, w as CreateComponentRequest, x as CreateDesignReferenceRequest, y as CreateEntityRequest, z as CreateListRequest, B as CreateListViewRequest, D as CreateMenuConfigurationRequest, E as CreatePageRequest, G as CreateVariableRequest, H as CurrencyAttributeMeta, I as CurrencyAttributeMetaSchema, J as CurrencySymbolSide, K as CurrencyValue, M as CurrentUserDefault, N as DEFAULT_OPTIONS, O as DEFAULT_PAGE_SIZE, Q as DONE, R as DeployModuleRequest, S as DesignReference, T as DesignReferenceContent, V as DesignReferenceSchema, W as DesignReferenceService, X as Done, Y as Entity, Z as EntitySchema, _ as EntityService, $ as EntityWithSchema, a0 as EntityWithSchemaSchema, a1 as EnumAttributeMeta, a2 as EnumValue, a3 as FileAttributeMeta, a4 as FileRefSchema, a5 as FilterElement, a6 as FilterElementSchema, a7 as FilterGroup, a8 as FilterGroupSchema, a9 as List, aa as ListAppsOptions, ab as ListComponentsOptions, ac as ListDesignReferencesOptions, ad as ListEntitiesOptions, ae as ListFn, af as ListListViewsOptions, ag as ListListsOptions, ah as ListMenuConfigurationsOptions, ai as ListModulesOptions, aj as ListPagesOptions, ak as ListSchema, al as ListService, am as ListVariablesOptions, an as ListView, ao as ListViewSchema, ap as ListViewService, aq as LogicalOperator, ar as MenuConfiguration, as as MenuConfigurationSchema, at as MenuConfigurationService, au as MenuItem, av as MenuItemSchema, aw as MenuItemType, ax as MetaClient, ay as MetaListOptions, az as Module, aA as ModuleSchema, aB as ModuleService, aC as ModuleStatus, aD as OnDeleteAction, aE as OnDeleteActionSchema, aF as PLATFORM_ATTRIBUTE_NAMES, aG as PLATFORM_USER_ID, aH as Page, aI as PageAction, aJ as PageActionKind, aK as PageActionSchema, aL as PageLayout, aM as PageLayoutSchema, aN as PageSchema, aO as PageService, aP as PageType, aQ as PublicPageComponent, aR as PublicPageResponse, aS as RelationAttributeMeta, aT as RelationAttributeMetaSchema, aU as RequestOptions, aV as ResolvedClientOptions, aW as ResponseMeta, aX as ResponseMetaSchema, aY as SortConfig, aZ as SortConfigSchema, a_ as SortDirection, a$ as Timestamps, b0 as TokenProvider, b1 as UpdateAppRequest, b2 as UpdateComponentRequest, b3 as UpdateDesignReferenceRequest, b4 as UpdateEntityRequest, b5 as UpdateListRequest, b6 as UpdateListViewRequest, b7 as UpdateMenuConfigurationRequest, b8 as UpdatePageRequest, b9 as UpdateVariableRequest, ba as UserRefSchema, bb as UserType, bc as Variable, bd as VariableSchema, be as VariableService, bf as acceptsCurrentUserDefault, bg as allCurrencyCodes, bh as createIterator, bi as createListResultSchema, bj as currencyLabel, bk as currencySymbol, bl as currencySymbolSide, bm as formatAmount, bn as formatMoney, bo as isCurrentUserDefault, bp as isPlatformAttributeName, bq as localeNumberSeparators, br as parseAmount, bs as parseCurrencyMeta, bt as parseFileMeta, bu as parseRelationMeta, bv as platformAttributes, bw as resolveOptions } from './types-oECz4xTQ.js';
3
3
  import { z } from 'zod';
4
4
 
5
5
  /**
@@ -1054,7 +1054,7 @@ interface AuthListOptions extends ListOptions {
1054
1054
  /**
1055
1055
  * Permission level for entity access.
1056
1056
  */
1057
- type Permission = 'read' | 'write' | 'delete';
1057
+ type Permission = 'read' | 'write' | 'delete' | 'read_scoped' | 'write_scoped' | 'delete_scoped';
1058
1058
  /**
1059
1059
  * Role entity permission - permission granted to a role for a specific entity.
1060
1060
  */
@@ -1092,7 +1092,7 @@ declare const RoleEntityPermissionSchema: z.ZodObject<{
1092
1092
  id: z.ZodString;
1093
1093
  role_slug: z.ZodString;
1094
1094
  entity_slug: z.ZodString;
1095
- permission: z.ZodEnum<["read", "write", "delete"]>;
1095
+ permission: z.ZodEnum<["read", "write", "delete", "read_scoped", "write_scoped", "delete_scoped"]>;
1096
1096
  }, "strip", z.ZodTypeAny, {
1097
1097
  id: string;
1098
1098
  created_at: string;
@@ -1107,7 +1107,7 @@ declare const RoleEntityPermissionSchema: z.ZodObject<{
1107
1107
  };
1108
1108
  entity_slug: string;
1109
1109
  role_slug: string;
1110
- permission: "read" | "write" | "delete";
1110
+ permission: "read" | "write" | "delete" | "read_scoped" | "write_scoped" | "delete_scoped";
1111
1111
  }, {
1112
1112
  id: string;
1113
1113
  created_at: string;
@@ -1122,7 +1122,7 @@ declare const RoleEntityPermissionSchema: z.ZodObject<{
1122
1122
  };
1123
1123
  entity_slug: string;
1124
1124
  role_slug: string;
1125
- permission: "read" | "write" | "delete";
1125
+ permission: "read" | "write" | "delete" | "read_scoped" | "write_scoped" | "delete_scoped";
1126
1126
  }>;
1127
1127
  /**
1128
1128
  * Request to assign a permission to a role.
@@ -1220,6 +1220,16 @@ interface ListUserRoleAssignmentsOptions extends AuthListOptions {
1220
1220
  id?: string;
1221
1221
  role_slug?: string;
1222
1222
  }
1223
+ /**
1224
+ * Options for the org-wide assignment listing (`GET /user-role-assignments`).
1225
+ * Unlike {@link ListUserRoleAssignmentsOptions} (which is bound to one user via
1226
+ * the path), this one may also filter by `user_id`.
1227
+ */
1228
+ interface ListOrgUserRoleAssignmentsOptions extends AuthListOptions {
1229
+ id?: string;
1230
+ user_id?: string;
1231
+ role_slug?: string;
1232
+ }
1223
1233
  /**
1224
1234
  * User in the system.
1225
1235
  */
@@ -1230,6 +1240,11 @@ interface User extends AuditFields {
1230
1240
  family_name: string;
1231
1241
  external_id: string;
1232
1242
  default_org_id: string;
1243
+ /**
1244
+ * Reference to the user's photo in the storage-service. Absent/null = no
1245
+ * photo (clients render initials).
1246
+ */
1247
+ profile_image?: FileRef | null;
1233
1248
  }
1234
1249
  declare const UserSchema: z.ZodObject<{
1235
1250
  created_at: z.ZodString;
@@ -1261,6 +1276,19 @@ declare const UserSchema: z.ZodObject<{
1261
1276
  family_name: z.ZodString;
1262
1277
  external_id: z.ZodString;
1263
1278
  default_org_id: z.ZodString;
1279
+ profile_image: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1280
+ id: z.ZodString;
1281
+ name: z.ZodString;
1282
+ content_type: z.ZodOptional<z.ZodString>;
1283
+ }, "strip", z.ZodTypeAny, {
1284
+ id: string;
1285
+ name: string;
1286
+ content_type?: string | undefined;
1287
+ }, {
1288
+ id: string;
1289
+ name: string;
1290
+ content_type?: string | undefined;
1291
+ }>>>;
1264
1292
  }, "strip", z.ZodTypeAny, {
1265
1293
  id: string;
1266
1294
  created_at: string;
@@ -1278,6 +1306,11 @@ declare const UserSchema: z.ZodObject<{
1278
1306
  family_name: string;
1279
1307
  external_id: string;
1280
1308
  default_org_id: string;
1309
+ profile_image?: {
1310
+ id: string;
1311
+ name: string;
1312
+ content_type?: string | undefined;
1313
+ } | null | undefined;
1281
1314
  }, {
1282
1315
  id: string;
1283
1316
  created_at: string;
@@ -1295,6 +1328,11 @@ declare const UserSchema: z.ZodObject<{
1295
1328
  family_name: string;
1296
1329
  external_id: string;
1297
1330
  default_org_id: string;
1331
+ profile_image?: {
1332
+ id: string;
1333
+ name: string;
1334
+ content_type?: string | undefined;
1335
+ } | null | undefined;
1298
1336
  }>;
1299
1337
  /**
1300
1338
  * Request to create a user.
@@ -1312,6 +1350,22 @@ interface UpdateUserRequest {
1312
1350
  given_name?: string;
1313
1351
  family_name?: string;
1314
1352
  default_org_id?: string;
1353
+ /**
1354
+ * Tri-state: omit = leave unchanged, `null` = remove the photo, a FileRef =
1355
+ * set it. Upload the file to the storage-service first and reference it here.
1356
+ */
1357
+ profile_image?: FileRef | null;
1358
+ }
1359
+ /**
1360
+ * Caller-scoped `PATCH /me` body. Deliberately narrower than
1361
+ * {@link UpdateUserRequest}: a user may edit their own name and photo, but not
1362
+ * re-home their account (no `default_org_id`).
1363
+ */
1364
+ interface UpdateMeRequest {
1365
+ given_name?: string;
1366
+ family_name?: string;
1367
+ /** Tri-state — see {@link UpdateUserRequest.profile_image}. */
1368
+ profile_image?: FileRef | null;
1315
1369
  }
1316
1370
  /**
1317
1371
  * Options for listing users.
@@ -1449,6 +1503,77 @@ interface ListRolesOptions extends AuthListOptions {
1449
1503
  name?: string;
1450
1504
  description?: string;
1451
1505
  }
1506
+ /**
1507
+ * A team — a node in the org's structure, and a principal that can hold access
1508
+ * anywhere a user can.
1509
+ *
1510
+ * Hierarchy rolls UP: a member of a child team counts as a member of every
1511
+ * ancestor **for grants made to that ancestor**. Granting `sales` reaches the
1512
+ * members of `sales-emea`; granting `sales-emea` never reaches someone who is
1513
+ * only in `sales`.
1514
+ *
1515
+ * The slug is immutable — it is half the primary key, and grants reference
1516
+ * `team:<orgId>/<slug>`.
1517
+ */
1518
+ interface Team extends AuditFields {
1519
+ slug: string;
1520
+ name: string;
1521
+ org_id: string;
1522
+ description: string;
1523
+ /** This team's parent within the same org; empty for a root team. */
1524
+ parent_team_slug: string;
1525
+ }
1526
+ /**
1527
+ * One user's DIRECT membership of one team. Membership of ancestor teams is
1528
+ * derived rather than stored, so it never appears as a row here.
1529
+ */
1530
+ interface TeamMember extends AuditFields {
1531
+ id: string;
1532
+ org_id: string;
1533
+ team_slug: string;
1534
+ user_id: string;
1535
+ }
1536
+ /**
1537
+ * Request to create a team.
1538
+ */
1539
+ interface CreateTeamRequest {
1540
+ org_id?: string;
1541
+ slug: string;
1542
+ name: string;
1543
+ description?: string;
1544
+ /** Nests the team under an existing one in the same org. Omit for a root. */
1545
+ parent_team_slug?: string;
1546
+ }
1547
+ /**
1548
+ * Request to update a team.
1549
+ *
1550
+ * `slug` is deliberately absent: it is half the primary key and is referenced by
1551
+ * every grant as `team:<orgId>/<slug>`, so renaming would orphan them.
1552
+ */
1553
+ interface UpdateTeamRequest {
1554
+ name?: string;
1555
+ description?: string;
1556
+ /** Re-parents the team; an explicit empty string promotes it to a root. */
1557
+ parent_team_slug?: string;
1558
+ }
1559
+ interface ListTeamsOptions extends AuthListOptions {
1560
+ org_id?: string;
1561
+ slug?: string;
1562
+ name?: string;
1563
+ description?: string;
1564
+ parent_team_slug?: string;
1565
+ }
1566
+ /**
1567
+ * Request to add a user to a team.
1568
+ */
1569
+ interface AddTeamMemberRequest {
1570
+ user_id: string;
1571
+ }
1572
+ interface ListTeamMembersOptions extends AuthListOptions {
1573
+ org_id?: string;
1574
+ team_slug?: string;
1575
+ user_id?: string;
1576
+ }
1452
1577
  /**
1453
1578
  * Organization in the system.
1454
1579
  */
@@ -1535,6 +1660,28 @@ interface ListOrganizationsOptions extends AuthListOptions {
1535
1660
  name?: string;
1536
1661
  description?: string;
1537
1662
  }
1663
+ /**
1664
+ * The verbs a share can grant. Only these three — a typo'd permission is
1665
+ * rejected rather than accepted as a grant that confers nothing.
1666
+ */
1667
+ type SharePermission = 'read' | 'write' | 'delete';
1668
+ /**
1669
+ * One stored share: a principal holding one verb on one record, with the
1670
+ * grantor as provenance. Every row is an explicit share — ownership and
1671
+ * granting attributes are evaluated live and never stored.
1672
+ */
1673
+ interface ShareRow {
1674
+ entity_slug: string;
1675
+ record_id: string;
1676
+ /** Rendered principal string: `user:<id>` | `team:<orgId>/<slug>` | `org:<orgId>`. */
1677
+ principal: string;
1678
+ permission: SharePermission;
1679
+ created_by?: {
1680
+ type: string;
1681
+ id: string;
1682
+ };
1683
+ created_at?: string;
1684
+ }
1538
1685
 
1539
1686
  /**
1540
1687
  * Service for caller-scoped queries — answers about the authenticated user
@@ -1549,6 +1696,14 @@ interface MeService {
1549
1696
  * @returns The calling user
1550
1697
  */
1551
1698
  get(): Promise<User>;
1699
+ /**
1700
+ * Updates the caller's own profile (name, photo). Requires a JWT session —
1701
+ * requests authenticated with an API key are rejected.
1702
+ *
1703
+ * @param request - Fields to update; `profile_image: null` removes the photo
1704
+ * @returns The updated user
1705
+ */
1706
+ update(request: UpdateMeRequest): Promise<User>;
1552
1707
  /**
1553
1708
  * Lists the organizations the caller can act in (all orgs for a platform
1554
1709
  * admin; otherwise the orgs they're a member of). Powers the org-switcher.
@@ -1708,7 +1863,9 @@ interface RoleService {
1708
1863
  * Deletes a role.
1709
1864
  *
1710
1865
  * @param slug - Role slug
1711
- * @throws {ProteosError} If role not found (404)
1866
+ * @throws {ProteosError} If role not found (404), or if the role still has
1867
+ * entity permissions attached (400 `role_deletion_not_allowed`) — remove
1868
+ * the grants first
1712
1869
  */
1713
1870
  delete(slug: string): Promise<void>;
1714
1871
  /**
@@ -1746,6 +1903,157 @@ interface RoleService {
1746
1903
  removePermission(roleSlug: string, permissionId: string): Promise<void>;
1747
1904
  }
1748
1905
 
1906
+ /**
1907
+ * Resolves the share endpoint for an entity slug.
1908
+ *
1909
+ * Exported for tests and for callers that want to check support before offering
1910
+ * a share affordance in a UI.
1911
+ */
1912
+ declare function shareRouteFor(entitySlug: string): string;
1913
+ /** True when `entitySlug` can be shared today. */
1914
+ declare function isShareable(entitySlug: string): boolean;
1915
+ /**
1916
+ * Sharing an individual resource with a principal — a person, an agent, an API
1917
+ * client, a team, or the whole organization.
1918
+ *
1919
+ * A share grants access to ONE resource, which is a different thing from a role:
1920
+ * a role grants a permission on an entity TYPE (every deal), a share grants it
1921
+ * on an INSTANCE (this deal). The two compose — a share gives nothing to someone
1922
+ * holding no grant on the entity type at all, which bounds its blast radius to a
1923
+ * population already authorized for that kind of resource.
1924
+ *
1925
+ * Callers name an ENTITY, never a service. Which service handles the write is
1926
+ * this module's problem.
1927
+ *
1928
+ * Who may share: the resource's owner, or someone holding the plain (unscoped)
1929
+ * permission on the entity. Notably NOT a share recipient — access held only
1930
+ * through a share cannot be passed on, and cannot be turned into ownership.
1931
+ */
1932
+ interface ShareService {
1933
+ /**
1934
+ * Grants a principal access to one resource.
1935
+ *
1936
+ * Granting `write` or `delete` implies `read`: a principal who cannot see a
1937
+ * resource must never be able to edit it, so the read is granted alongside.
1938
+ *
1939
+ * @throws {ProteosError} 403 `share_not_permitted` when the caller holds their
1940
+ * own access only through a share; 403 `principal_not_in_org` when the
1941
+ * recipient is outside the caller's organization (rejected outright rather
1942
+ * than written inert, which would become a live grant the moment they joined);
1943
+ * 404 when the resource does not exist or is not visible to the caller;
1944
+ * 501 `sharing_not_supported` when the owning service has no share endpoint.
1945
+ */
1946
+ share(entitySlug: string, recordId: string, principal: PrincipalRef, permission: SharePermission): Promise<void>;
1947
+ /**
1948
+ * Revokes a principal's access to one resource.
1949
+ *
1950
+ * Revoking `read` CASCADES to `write` and `delete` — an edit right on
1951
+ * something someone can no longer see would be incoherent.
1952
+ *
1953
+ * Revocation is deliberately wider than granting: the owner, anyone holding
1954
+ * the unscoped `write` permission, and platform admins may all revoke. Erring
1955
+ * permissive costs nothing here, while erring strict would strand grants
1956
+ * nobody could clean up.
1957
+ */
1958
+ unshare(entitySlug: string, recordId: string, principal: PrincipalRef, permission: SharePermission): Promise<void>;
1959
+ /**
1960
+ * Lists a resource's shares.
1961
+ *
1962
+ * Gated to the population that may REVOKE them — the owner, unscoped-write
1963
+ * holders, and platform admins. Record read is deliberately not enough: a
1964
+ * share list discloses org structure ("this deal is visible to team:legal").
1965
+ *
1966
+ * @throws {ProteosError} 403 `share_listing_not_permitted` otherwise.
1967
+ */
1968
+ listShares(entitySlug: string, recordId: string): Promise<ShareRow[]>;
1969
+ }
1970
+
1971
+ /**
1972
+ * Service for managing teams — the org's structure, and a principal that can
1973
+ * hold access anywhere a user can.
1974
+ *
1975
+ * Team hierarchy rolls UP: a member of a child team counts as a member of every
1976
+ * ancestor **for grants made to that ancestor**. Granting `sales` reaches the
1977
+ * members of `sales-emea`; granting `sales-emea` never reaches someone who is
1978
+ * only in `sales`. This is the direction people get backwards.
1979
+ */
1980
+ interface TeamService {
1981
+ /**
1982
+ * Lists teams with optional filtering.
1983
+ * Returns an async iterator that automatically handles pagination.
1984
+ */
1985
+ list(options?: ListTeamsOptions): PageIterator<Team, ListTeamsOptions>;
1986
+ /** Fetches a single page of teams. */
1987
+ listPage(options?: ListTeamsOptions): Promise<ListResult<Team>>;
1988
+ /**
1989
+ * Gets a single team by slug.
1990
+ * @throws {ProteosError} If the team is not found (404)
1991
+ */
1992
+ get(slug: string): Promise<Team>;
1993
+ /**
1994
+ * Creates a team, optionally nested under an existing one.
1995
+ * @throws {ProteosError} If the parent would create a cycle or exceed the
1996
+ * maximum depth (400 `team_hierarchy_invalid`)
1997
+ */
1998
+ create(request: CreateTeamRequest): Promise<Team>;
1999
+ /**
2000
+ * Updates a team's name, description or parent.
2001
+ *
2002
+ * The slug cannot be changed: it is half the primary key and every grant
2003
+ * references `team:<orgId>/<slug>`, so a rename would orphan them. Pass an
2004
+ * empty `parent_team_slug` to promote the team to a root.
2005
+ */
2006
+ update(slug: string, request: UpdateTeamRequest): Promise<Team>;
2007
+ /**
2008
+ * Deletes a team.
2009
+ * @throws {ProteosError} If the team still has members or child teams
2010
+ * (400 `team_deletion_not_allowed`)
2011
+ */
2012
+ delete(slug: string): Promise<void>;
2013
+ /**
2014
+ * Lists a team's DIRECT members. Membership of ancestor teams is derived, not
2015
+ * stored, so it does not appear here.
2016
+ */
2017
+ getMembers(slug: string, options?: ListTeamMembersOptions): PageIterator<TeamMember, ListTeamMembersOptions>;
2018
+ /** Adds a user to a team. */
2019
+ addMember(slug: string, request: AddTeamMemberRequest): Promise<TeamMember>;
2020
+ /** Removes a user from a team. */
2021
+ removeMember(slug: string, userId: string): Promise<void>;
2022
+ }
2023
+
2024
+ /**
2025
+ * Service for the org-wide user-role-assignment listing.
2026
+ *
2027
+ * One request answers "who holds which role" across the whole org — the admin
2028
+ * view joining users to their roles (role badges on a user list, a role's
2029
+ * member roster, member counts) without a per-user fan-out. Per-user reads and
2030
+ * writes stay on {@link UserService} (`users.getRoles` / `assignRole` /
2031
+ * `unassignRole`).
2032
+ */
2033
+ interface UserRoleAssignmentService {
2034
+ /**
2035
+ * Lists role assignments across all users of the caller's org.
2036
+ * Returns an async iterator that automatically handles pagination.
2037
+ *
2038
+ * @param options - Filter and pagination options (`role_slug`, `user_id`)
2039
+ * @returns Async iterator over user role assignments
2040
+ *
2041
+ * @example
2042
+ * ```ts
2043
+ * // Everyone holding the sales role
2044
+ * const sales = await service.list({ role_slug: 'sales' }).all();
2045
+ * ```
2046
+ */
2047
+ list(options?: ListOrgUserRoleAssignmentsOptions): PageIterator<UserRoleAssignment, ListOrgUserRoleAssignmentsOptions>;
2048
+ /**
2049
+ * Fetches a single page of role assignments.
2050
+ *
2051
+ * @param options - Filter and pagination options (including `page`)
2052
+ * @returns A single page of assignments with pagination metadata
2053
+ */
2054
+ listPage(options?: ListOrgUserRoleAssignmentsOptions): Promise<ListResult<UserRoleAssignment>>;
2055
+ }
2056
+
1749
2057
  /**
1750
2058
  * Service for managing users.
1751
2059
  * Handles user CRUD operations and role assignments.
@@ -1884,6 +2192,14 @@ interface PlatformEntity {
1884
2192
  declare const PLATFORM_ENTITIES: readonly PlatformEntity[];
1885
2193
  /** Just the platform entity slugs, in canonical order. */
1886
2194
  declare const PLATFORM_ENTITY_SLUGS: readonly string[];
2195
+ /**
2196
+ * Platform entities whose owning service actually enforces the `*_scoped`
2197
+ * permission verbs (record-level access grants). Granting `read_scoped` on any
2198
+ * other platform entity is legal on the wire but inert — no service narrows
2199
+ * by it — so permission UIs only offer the scoped column for these. Extend as
2200
+ * services adopt scoped enforcement.
2201
+ */
2202
+ declare const SCOPED_PLATFORM_ENTITY_SLUGS: readonly string[];
1887
2203
  /** True when `slug` belongs to a platform entity (reserved; can't be user-created). */
1888
2204
  declare function isPlatformEntity(slug: string): boolean;
1889
2205
 
@@ -1921,10 +2237,28 @@ declare class AccountClient {
1921
2237
  * Service for managing roles and their entity permissions.
1922
2238
  */
1923
2239
  readonly roles: RoleService;
2240
+ /**
2241
+ * Service for the org-wide user-role-assignment listing ("who holds which
2242
+ * role" in one request).
2243
+ */
2244
+ readonly userRoleAssignments: UserRoleAssignmentService;
1924
2245
  /**
1925
2246
  * Service for managing organizations.
1926
2247
  */
1927
2248
  readonly organizations: OrganizationService;
2249
+ /**
2250
+ * Service for managing teams and their membership.
2251
+ */
2252
+ readonly teams: TeamService;
2253
+ /**
2254
+ * Service for sharing individual resources with a principal.
2255
+ *
2256
+ * Lives here rather than on the owning resource's client because sharing is
2257
+ * ONE concept across every resource type — a deal, a conversation, a
2258
+ * knowledge space. Callers name an entity; which service handles the write is
2259
+ * the SDK's problem, so centralizing it server-side later moves no caller.
2260
+ */
2261
+ readonly shares: ShareService;
1928
2262
  /**
1929
2263
  * Creates a new AccountClient instance.
1930
2264
  *
@@ -4256,10 +4590,12 @@ interface TopicService {
4256
4590
 
4257
4591
  /**
4258
4592
  * Scope of an action. `entity`-scoped actions are invoked against a
4259
- * specific record; `global` actions take no record context.
4593
+ * specific record; `entity_batch` actions against a SET of records of one
4594
+ * entity (one invocation carrying every id, never one per record — they back
4595
+ * a list's toolbar buttons); `global` actions take no record context.
4260
4596
  */
4261
- type ActionScope = 'entity' | 'global';
4262
- declare const ActionScopeSchema: z.ZodEnum<["entity", "global"]>;
4597
+ type ActionScope = 'entity' | 'entity_batch' | 'global';
4598
+ declare const ActionScopeSchema: z.ZodEnum<["entity", "entity_batch", "global"]>;
4263
4599
  /**
4264
4600
  * Deployable, user-invokable operation. Mirrors `functionsmodel.Action`
4265
4601
  * in the Go SDK. `params` and `returns` reuse the same `Attribute` schema
@@ -4270,7 +4606,7 @@ interface Action extends AuditFields {
4270
4606
  org_id: string;
4271
4607
  module_slug: string;
4272
4608
  scope: ActionScope;
4273
- /** Present only when `scope === 'entity'`. */
4609
+ /** Present only when `scope` is `entity` or `entity_batch`. */
4274
4610
  entity?: string;
4275
4611
  name: string;
4276
4612
  is_active: boolean;
@@ -4311,7 +4647,7 @@ declare const ActionSchema: z.ZodObject<{
4311
4647
  slug: z.ZodString;
4312
4648
  org_id: z.ZodString;
4313
4649
  module_slug: z.ZodString;
4314
- scope: z.ZodEnum<["entity", "global"]>;
4650
+ scope: z.ZodEnum<["entity", "entity_batch", "global"]>;
4315
4651
  entity: z.ZodOptional<z.ZodString>;
4316
4652
  name: z.ZodString;
4317
4653
  is_active: z.ZodBoolean;
@@ -4325,6 +4661,46 @@ declare const ActionSchema: z.ZodObject<{
4325
4661
  is_nullable: z.ZodOptional<z.ZodBoolean>;
4326
4662
  is_unique: z.ZodBoolean;
4327
4663
  is_read_only: z.ZodOptional<z.ZodBoolean>;
4664
+ restrictions: z.ZodOptional<z.ZodObject<{
4665
+ read: z.ZodOptional<z.ZodObject<{
4666
+ roles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4667
+ teams: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4668
+ }, "strip", z.ZodTypeAny, {
4669
+ roles?: string[] | undefined;
4670
+ teams?: string[] | undefined;
4671
+ }, {
4672
+ roles?: string[] | undefined;
4673
+ teams?: string[] | undefined;
4674
+ }>>;
4675
+ write: z.ZodOptional<z.ZodObject<{
4676
+ roles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4677
+ teams: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4678
+ }, "strip", z.ZodTypeAny, {
4679
+ roles?: string[] | undefined;
4680
+ teams?: string[] | undefined;
4681
+ }, {
4682
+ roles?: string[] | undefined;
4683
+ teams?: string[] | undefined;
4684
+ }>>;
4685
+ }, "strip", z.ZodTypeAny, {
4686
+ read?: {
4687
+ roles?: string[] | undefined;
4688
+ teams?: string[] | undefined;
4689
+ } | undefined;
4690
+ write?: {
4691
+ roles?: string[] | undefined;
4692
+ teams?: string[] | undefined;
4693
+ } | undefined;
4694
+ }, {
4695
+ read?: {
4696
+ roles?: string[] | undefined;
4697
+ teams?: string[] | undefined;
4698
+ } | undefined;
4699
+ write?: {
4700
+ roles?: string[] | undefined;
4701
+ teams?: string[] | undefined;
4702
+ } | undefined;
4703
+ }>>;
4328
4704
  default_value: z.ZodOptional<z.ZodUnknown>;
4329
4705
  meta: z.ZodOptional<z.ZodUnknown>;
4330
4706
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -4339,6 +4715,16 @@ declare const ActionSchema: z.ZodObject<{
4339
4715
  description?: string | undefined;
4340
4716
  is_read_only?: boolean | undefined;
4341
4717
  is_nullable?: boolean | undefined;
4718
+ restrictions?: {
4719
+ read?: {
4720
+ roles?: string[] | undefined;
4721
+ teams?: string[] | undefined;
4722
+ } | undefined;
4723
+ write?: {
4724
+ roles?: string[] | undefined;
4725
+ teams?: string[] | undefined;
4726
+ } | undefined;
4727
+ } | undefined;
4342
4728
  default_value?: unknown;
4343
4729
  }, {
4344
4730
  type: string;
@@ -4351,6 +4737,16 @@ declare const ActionSchema: z.ZodObject<{
4351
4737
  description?: string | undefined;
4352
4738
  is_read_only?: boolean | undefined;
4353
4739
  is_nullable?: boolean | undefined;
4740
+ restrictions?: {
4741
+ read?: {
4742
+ roles?: string[] | undefined;
4743
+ teams?: string[] | undefined;
4744
+ } | undefined;
4745
+ write?: {
4746
+ roles?: string[] | undefined;
4747
+ teams?: string[] | undefined;
4748
+ } | undefined;
4749
+ } | undefined;
4354
4750
  default_value?: unknown;
4355
4751
  }>, "many">;
4356
4752
  returns: z.ZodArray<z.ZodObject<{
@@ -4362,6 +4758,46 @@ declare const ActionSchema: z.ZodObject<{
4362
4758
  is_nullable: z.ZodOptional<z.ZodBoolean>;
4363
4759
  is_unique: z.ZodBoolean;
4364
4760
  is_read_only: z.ZodOptional<z.ZodBoolean>;
4761
+ restrictions: z.ZodOptional<z.ZodObject<{
4762
+ read: z.ZodOptional<z.ZodObject<{
4763
+ roles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4764
+ teams: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4765
+ }, "strip", z.ZodTypeAny, {
4766
+ roles?: string[] | undefined;
4767
+ teams?: string[] | undefined;
4768
+ }, {
4769
+ roles?: string[] | undefined;
4770
+ teams?: string[] | undefined;
4771
+ }>>;
4772
+ write: z.ZodOptional<z.ZodObject<{
4773
+ roles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4774
+ teams: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4775
+ }, "strip", z.ZodTypeAny, {
4776
+ roles?: string[] | undefined;
4777
+ teams?: string[] | undefined;
4778
+ }, {
4779
+ roles?: string[] | undefined;
4780
+ teams?: string[] | undefined;
4781
+ }>>;
4782
+ }, "strip", z.ZodTypeAny, {
4783
+ read?: {
4784
+ roles?: string[] | undefined;
4785
+ teams?: string[] | undefined;
4786
+ } | undefined;
4787
+ write?: {
4788
+ roles?: string[] | undefined;
4789
+ teams?: string[] | undefined;
4790
+ } | undefined;
4791
+ }, {
4792
+ read?: {
4793
+ roles?: string[] | undefined;
4794
+ teams?: string[] | undefined;
4795
+ } | undefined;
4796
+ write?: {
4797
+ roles?: string[] | undefined;
4798
+ teams?: string[] | undefined;
4799
+ } | undefined;
4800
+ }>>;
4365
4801
  default_value: z.ZodOptional<z.ZodUnknown>;
4366
4802
  meta: z.ZodOptional<z.ZodUnknown>;
4367
4803
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -4376,6 +4812,16 @@ declare const ActionSchema: z.ZodObject<{
4376
4812
  description?: string | undefined;
4377
4813
  is_read_only?: boolean | undefined;
4378
4814
  is_nullable?: boolean | undefined;
4815
+ restrictions?: {
4816
+ read?: {
4817
+ roles?: string[] | undefined;
4818
+ teams?: string[] | undefined;
4819
+ } | undefined;
4820
+ write?: {
4821
+ roles?: string[] | undefined;
4822
+ teams?: string[] | undefined;
4823
+ } | undefined;
4824
+ } | undefined;
4379
4825
  default_value?: unknown;
4380
4826
  }, {
4381
4827
  type: string;
@@ -4388,6 +4834,16 @@ declare const ActionSchema: z.ZodObject<{
4388
4834
  description?: string | undefined;
4389
4835
  is_read_only?: boolean | undefined;
4390
4836
  is_nullable?: boolean | undefined;
4837
+ restrictions?: {
4838
+ read?: {
4839
+ roles?: string[] | undefined;
4840
+ teams?: string[] | undefined;
4841
+ } | undefined;
4842
+ write?: {
4843
+ roles?: string[] | undefined;
4844
+ teams?: string[] | undefined;
4845
+ } | undefined;
4846
+ } | undefined;
4391
4847
  default_value?: unknown;
4392
4848
  }>, "many">;
4393
4849
  }, "strip", z.ZodTypeAny, {
@@ -4402,6 +4858,16 @@ declare const ActionSchema: z.ZodObject<{
4402
4858
  description?: string | undefined;
4403
4859
  is_read_only?: boolean | undefined;
4404
4860
  is_nullable?: boolean | undefined;
4861
+ restrictions?: {
4862
+ read?: {
4863
+ roles?: string[] | undefined;
4864
+ teams?: string[] | undefined;
4865
+ } | undefined;
4866
+ write?: {
4867
+ roles?: string[] | undefined;
4868
+ teams?: string[] | undefined;
4869
+ } | undefined;
4870
+ } | undefined;
4405
4871
  default_value?: unknown;
4406
4872
  }[];
4407
4873
  name: string;
@@ -4419,7 +4885,7 @@ declare const ActionSchema: z.ZodObject<{
4419
4885
  module_slug: string;
4420
4886
  file_id: string;
4421
4887
  org_id: string;
4422
- scope: "entity" | "global";
4888
+ scope: "entity" | "entity_batch" | "global";
4423
4889
  is_active: boolean;
4424
4890
  returns: {
4425
4891
  type: string;
@@ -4432,6 +4898,16 @@ declare const ActionSchema: z.ZodObject<{
4432
4898
  description?: string | undefined;
4433
4899
  is_read_only?: boolean | undefined;
4434
4900
  is_nullable?: boolean | undefined;
4901
+ restrictions?: {
4902
+ read?: {
4903
+ roles?: string[] | undefined;
4904
+ teams?: string[] | undefined;
4905
+ } | undefined;
4906
+ write?: {
4907
+ roles?: string[] | undefined;
4908
+ teams?: string[] | undefined;
4909
+ } | undefined;
4910
+ } | undefined;
4435
4911
  default_value?: unknown;
4436
4912
  }[];
4437
4913
  entity?: string | undefined;
@@ -4447,6 +4923,16 @@ declare const ActionSchema: z.ZodObject<{
4447
4923
  description?: string | undefined;
4448
4924
  is_read_only?: boolean | undefined;
4449
4925
  is_nullable?: boolean | undefined;
4926
+ restrictions?: {
4927
+ read?: {
4928
+ roles?: string[] | undefined;
4929
+ teams?: string[] | undefined;
4930
+ } | undefined;
4931
+ write?: {
4932
+ roles?: string[] | undefined;
4933
+ teams?: string[] | undefined;
4934
+ } | undefined;
4935
+ } | undefined;
4450
4936
  default_value?: unknown;
4451
4937
  }[];
4452
4938
  name: string;
@@ -4464,7 +4950,7 @@ declare const ActionSchema: z.ZodObject<{
4464
4950
  module_slug: string;
4465
4951
  file_id: string;
4466
4952
  org_id: string;
4467
- scope: "entity" | "global";
4953
+ scope: "entity" | "entity_batch" | "global";
4468
4954
  is_active: boolean;
4469
4955
  returns: {
4470
4956
  type: string;
@@ -4477,6 +4963,16 @@ declare const ActionSchema: z.ZodObject<{
4477
4963
  description?: string | undefined;
4478
4964
  is_read_only?: boolean | undefined;
4479
4965
  is_nullable?: boolean | undefined;
4966
+ restrictions?: {
4967
+ read?: {
4968
+ roles?: string[] | undefined;
4969
+ teams?: string[] | undefined;
4970
+ } | undefined;
4971
+ write?: {
4972
+ roles?: string[] | undefined;
4973
+ teams?: string[] | undefined;
4974
+ } | undefined;
4975
+ } | undefined;
4480
4976
  default_value?: unknown;
4481
4977
  }[];
4482
4978
  entity?: string | undefined;
@@ -4547,6 +5043,13 @@ interface ActionService {
4547
5043
  * unwrapped `result` payload.
4548
5044
  */
4549
5045
  invokeEntity(entitySlug: string, recordId: string, slug: string, params: Record<string, unknown>): Promise<unknown>;
5046
+ /**
5047
+ * Invokes an `entity_batch` action against a SET of records. The whole id
5048
+ * array reaches the action in ONE invocation, so the result is a single
5049
+ * aggregate payload, not one per record. `recordIds` must be non-empty;
5050
+ * the server dedupes it, preserving order. Returns the unwrapped `result`.
5051
+ */
5052
+ invokeBatch(entitySlug: string, slug: string, recordIds: string[], params: Record<string, unknown>): Promise<unknown>;
4550
5053
  }
4551
5054
 
4552
5055
  /**
@@ -4639,6 +5142,12 @@ interface KnowledgeNodeMetadata extends AuditFields {
4639
5142
  /** Embedding provenance (null until ingestion runs). */
4640
5143
  embedding_model?: string | null;
4641
5144
  embedded_at?: string | null;
5145
+ /**
5146
+ * The space this node lives in, or null when UNASSIGNED. An unassigned node
5147
+ * is visible to anyone holding knowledge-nodes:read — the behaviour every
5148
+ * node had before spaces existed.
5149
+ */
5150
+ space_slug?: string | null;
4642
5151
  /** Source pointer for `file` nodes (storage-service file id). */
4643
5152
  file_id?: string | null;
4644
5153
  /** Source pointer for `url` nodes. */
@@ -4719,6 +5228,8 @@ interface CreateNodeRequest {
4719
5228
  type: NodeType;
4720
5229
  status: NodeStatus;
4721
5230
  content?: string;
5231
+ /** File the node into a space. Omitted = unassigned. */
5232
+ space_slug?: string;
4722
5233
  file_id?: string;
4723
5234
  url?: string;
4724
5235
  summary?: string;
@@ -4740,6 +5251,12 @@ interface UpdateNodeRequest {
4740
5251
  */
4741
5252
  valid_from?: string | null;
4742
5253
  valid_until?: string | null;
5254
+ /**
5255
+ * Move the node between spaces, tri-state like the validity window: omit to
5256
+ * leave it where it is, pass `null` to move it back to unassigned, or a slug
5257
+ * to file it into that space.
5258
+ */
5259
+ space_slug?: string | null;
4743
5260
  }
4744
5261
  /** Filters for listing nodes. */
4745
5262
  interface ListNodesOptions extends ListOptions {
@@ -4749,6 +5266,11 @@ interface ListNodesOptions extends ListOptions {
4749
5266
  'title[contains]'?: string;
4750
5267
  /** Keep only nodes carrying ANY of these labels (union). */
4751
5268
  label_ids?: string[];
5269
+ /**
5270
+ * Keep only nodes living in ANY of these spaces (union). Use
5271
+ * `UNASSIGNED_SPACE_SLUG` to ask for nodes belonging to no space.
5272
+ */
5273
+ space_slugs?: string[];
4752
5274
  /** Created on/after this RFC3339 timestamp (inclusive). */
4753
5275
  created_after?: string;
4754
5276
  /** Created on/before this RFC3339 timestamp (inclusive). */
@@ -4848,6 +5370,11 @@ interface SearchNodesRequest {
4848
5370
  status?: NodeStatus;
4849
5371
  /** Match nodes carrying ANY of these labels. */
4850
5372
  label_ids?: string[];
5373
+ /**
5374
+ * Match nodes living in ANY of these spaces (union). Use
5375
+ * `UNASSIGNED_SPACE_SLUG` for nodes belonging to no space.
5376
+ */
5377
+ space_slugs?: string[];
4851
5378
  /** Match nodes connected (either direction) to this node. */
4852
5379
  linked_to_id?: string;
4853
5380
  /**
@@ -4904,6 +5431,8 @@ interface KnowledgeGraphNode {
4904
5431
  type: NodeType;
4905
5432
  status: NodeStatus;
4906
5433
  label_ids: string[];
5434
+ /** The node's space, or null when unassigned. */
5435
+ space_slug?: string | null;
4907
5436
  degree: number;
4908
5437
  }
4909
5438
  /** A lean directed edge in the whole-graph payload. */
@@ -4923,6 +5452,12 @@ interface KnowledgeGraph {
4923
5452
  nodes: KnowledgeGraphNode[];
4924
5453
  links: KnowledgeGraphLink[];
4925
5454
  labels: KnowledgeLabel[];
5455
+ /**
5456
+ * The full org space set, sent once for the same reason as `labels`: the
5457
+ * client renders the space navigator and filters by space without a second
5458
+ * request, even when the graph is pruned to one space.
5459
+ */
5460
+ spaces: KnowledgeSpace[];
4926
5461
  total: number;
4927
5462
  }
4928
5463
  /**
@@ -4931,6 +5466,8 @@ interface KnowledgeGraph {
4931
5466
  */
4932
5467
  interface GetGraphOptions {
4933
5468
  label_ids?: string[];
5469
+ /** Prune to nodes in ANY of these spaces (union). */
5470
+ space_slugs?: string[];
4934
5471
  }
4935
5472
  interface CreateLinkRequest {
4936
5473
  from_id: string;
@@ -4965,6 +5502,52 @@ interface ListRecordLinksOptions extends ListOptions {
4965
5502
  entity_slug?: string;
4966
5503
  record_id?: string;
4967
5504
  }
5505
+ /**
5506
+ * A knowledge space: the container a node lives in. A node belongs to at most
5507
+ * one space; a node with no space is unassigned.
5508
+ *
5509
+ * A space is NOT a label. Labels are many-per-node, overlapping, non-security
5510
+ * tags; a space is the single place a node lives, and it is what instance-level
5511
+ * access is evaluated against.
5512
+ *
5513
+ * Keyed by `slug`, which is IMMUTABLE — it is half the primary key, node rows
5514
+ * reference it and access grants name it, so renaming would orphan both. There
5515
+ * is no id.
5516
+ */
5517
+ interface KnowledgeSpace extends AuditFields {
5518
+ org_id: string;
5519
+ slug: string;
5520
+ name: string;
5521
+ description?: string | null;
5522
+ color?: string | null;
5523
+ icon?: string | null;
5524
+ }
5525
+ /**
5526
+ * The reserved filter value meaning "nodes that belong to no space at all".
5527
+ * Deliberately not a legal slug (slugs are kebab-case), so it can never collide
5528
+ * with a space an org creates.
5529
+ */
5530
+ declare const UNASSIGNED_SPACE_SLUG = "__unassigned__";
5531
+ interface CreateSpaceRequest {
5532
+ /** Permanent — it is half the primary key and cannot be changed later. */
5533
+ slug: string;
5534
+ name: string;
5535
+ description?: string;
5536
+ color?: string;
5537
+ icon?: string;
5538
+ }
5539
+ /** Partial update. `slug` is absent because it is immutable. */
5540
+ interface UpdateSpaceRequest {
5541
+ name?: string;
5542
+ description?: string;
5543
+ color?: string;
5544
+ icon?: string;
5545
+ }
5546
+ interface ListSpacesOptions extends ListOptions {
5547
+ slug?: string;
5548
+ name?: string;
5549
+ 'name[contains]'?: string;
5550
+ }
4968
5551
  interface CreateLabelRequest {
4969
5552
  name: string;
4970
5553
  slug: string;
@@ -5521,7 +6104,8 @@ declare const NodeNeighborhoodSchema: z.ZodObject<{
5521
6104
  interface GraphService {
5522
6105
  /**
5523
6106
  * Reads the whole org graph in one payload. `options.label_ids` prunes to
5524
- * nodes carrying ANY of the given labels (union); omitted returns everything.
6107
+ * nodes carrying ANY of the given labels (union) and `options.space_slugs` to
6108
+ * nodes in ANY of the given spaces; omitted returns everything.
5525
6109
  */
5526
6110
  get(options?: GetGraphOptions): Promise<KnowledgeGraph>;
5527
6111
  }
@@ -5609,6 +6193,41 @@ interface NodeService {
5609
6193
  detachLabel(id: string, labelId: string): Promise<void>;
5610
6194
  }
5611
6195
 
6196
+ /**
6197
+ * Service for knowledge spaces — the containers nodes live in.
6198
+ *
6199
+ * Every method is keyed by SLUG rather than id: a space's slug is half its
6200
+ * primary key and is immutable, so there is no second identifier. To file a node
6201
+ * into a space, set `space_slug` on the node (see `NodeService`).
6202
+ *
6203
+ * Granting access to a space is NOT done here — it goes through the shared
6204
+ * `auth.shares` API, which routes `knowledge-spaces` to knowledge-service:
6205
+ *
6206
+ * ```ts
6207
+ * await auth.shares.share('knowledge-spaces', 'engineering', { type: 'team', id: 'platform' }, 'read')
6208
+ * ```
6209
+ */
6210
+ interface SpaceService {
6211
+ /** Lists spaces as an async iterator (pages are 0-indexed). */
6212
+ list(options?: ListSpacesOptions): PageIterator<KnowledgeSpace, ListSpacesOptions>;
6213
+ /** Fetches a single page of spaces. */
6214
+ listPage(options?: ListSpacesOptions): Promise<ListResult<KnowledgeSpace>>;
6215
+ /** Gets a single space by slug. */
6216
+ get(slug: string): Promise<KnowledgeSpace>;
6217
+ /** Creates a space. The slug is permanent. */
6218
+ create(request: CreateSpaceRequest): Promise<KnowledgeSpace>;
6219
+ /** Updates a space's presentation. The slug cannot be changed. */
6220
+ update(slug: string, request: UpdateSpaceRequest): Promise<KnowledgeSpace>;
6221
+ /**
6222
+ * Deletes a space and its access grants.
6223
+ *
6224
+ * Refused with 409 `knowledge_space_not_empty` while any node still lives in
6225
+ * it — deleting a space never deletes the knowledge inside it, and never
6226
+ * silently makes it org-visible by unfiling it. Move or delete the nodes first.
6227
+ */
6228
+ delete(slug: string): Promise<void>;
6229
+ }
6230
+
5612
6231
  /**
5613
6232
  * Service for node→record edges: links from a knowledge node to a business
5614
6233
  * record (data-service, identified by `entity_slug` + `record_id`). Immutable —
@@ -5646,6 +6265,11 @@ declare class KnowledgeClient {
5646
6265
  /** Node→record edges (links to data-service records): `knowledge.recordLinks`. */
5647
6266
  readonly recordLinks: RecordLinkService;
5648
6267
  readonly labels: LabelService;
6268
+ /**
6269
+ * Knowledge spaces — the containers nodes live in: `knowledge.spaces`.
6270
+ * Access to a space is granted through `auth.shares`, not here.
6271
+ */
6272
+ readonly spaces: SpaceService;
5649
6273
  /** Whole-org graph bulk read (radiant graph view): `knowledge.graph.get()`. */
5650
6274
  readonly graph: GraphService;
5651
6275
  constructor(client: ProteosClient);
@@ -6129,7 +6753,14 @@ interface CronTriggerParams {
6129
6753
  cron_expression: string;
6130
6754
  timezone: string;
6131
6755
  }
6132
- type ManualTriggerParams = Record<string, never>;
6756
+ /**
6757
+ * Manual trigger configuration. `input_schema` declares the typed inputs a
6758
+ * manual run may provide (validated on run; they become the trigger item,
6759
+ * addressable as `{{ $json.<name> }}`). Empty = the run takes no inputs.
6760
+ */
6761
+ interface ManualTriggerParams {
6762
+ input_schema?: Attribute[];
6763
+ }
6133
6764
  interface WebhookTriggerParams {
6134
6765
  token: string;
6135
6766
  }
@@ -6232,6 +6863,8 @@ interface UpdateWorkflowRequest {
6232
6863
  */
6233
6864
  interface RunWorkflowRequest {
6234
6865
  destination_node_id?: string;
6866
+ /** Values for the manual trigger's `input_schema`; seed the trigger item. */
6867
+ inputs?: Record<string, unknown>;
6235
6868
  }
6236
6869
  /** Where a standalone node test's input comes from. */
6237
6870
  type TestNodeInputSource = 'last_execution' | 'pinned';
@@ -6323,6 +6956,7 @@ interface ExecutionTriggerContext {
6323
6956
  kind: TriggerKind;
6324
6957
  scheduled_at?: string;
6325
6958
  actor?: UserRef$2;
6959
+ destination_node_id?: string;
6326
6960
  received_at?: string;
6327
6961
  topic?: string;
6328
6962
  event_type?: string;
@@ -6386,10 +7020,17 @@ interface ListExecutionsOptions extends ListOptions {
6386
7020
  workflow_key?: string;
6387
7021
  status?: ExecutionStatus;
6388
7022
  }
6389
- /** Execution detail: the header row plus its append-only node executions. */
7023
+ /**
7024
+ * Execution detail: the header row plus its append-only node executions.
7025
+ * `nodes_total` is the number of nodes the pinned graph schedules for THIS run
7026
+ * (reachable from the trigger, scoped to the destination path on a partial run;
7027
+ * dead-branch and disabled nodes end as `skipped` rows) — the progress
7028
+ * denominator.
7029
+ */
6390
7030
  interface GetExecutionDetailResponse {
6391
7031
  execution: WorkflowExecution;
6392
7032
  node_executions: NodeExecution[];
7033
+ nodes_total: number;
6393
7034
  }
6394
7035
  /** Windows into one node run's stored items on one port. */
6395
7036
  interface GetNodeExecutionItemsOptions {
@@ -6530,4 +7171,4 @@ declare class WorkflowClient {
6530
7171
  constructor(client: ProteosClient);
6531
7172
  }
6532
7173
 
6533
- export { type AcceptMistranscribedTermRequest, AccountClient, type Action, type ActionBinding, ActionSchema, type ActionScope, ActionScopeSchema, type ActionService, type AddressFilterConfig, type Agent, type AgentActionParams, type AgentArtifactsPayload, AgentClient, type AgentListener, type AgentListenerAcknowledgementConfig, type AgentListenerAcknowledgementType, type AgentListenerActingUserMode, type AgentListenerService, type AgentListenerTriggerType, type AgentMessagePayload, type AgentResourceListOptions, type AgentService, type AllFilterConfig, type ApiErrorResponse, type AppendEventRequest, type AssignPermissionRequest, type AssignRoleRequest, type AttachContactAddressRequest, type Attachment, Attribute, AuditFields, type AuthListOptions, type AutomatedFilterConfig, type AutomatedSignal, type BatchTransactionError, BatchTransactionErrorSchema, type BatchTransactionStatus, type BatchUpsertRecordsResponse, BatchUpsertRecordsResponseSchema, type BatchUpsertTransaction, type BatchUpsertTransactionResult, BatchUpsertTransactionResultSchema, BatchUpsertTransactionSchema, type BinaryRef, type BlockContactRequest, type Channel, type ClientEventType, type ClientToolSchema, type Connection, type ConnectionCredentials, type ConnectionEndpoint, type ConnectionScope, type ConnectionService, type ConnectionStatus, type ConnectionSyncRange, type ConnectionSyncStatus, type Connector, ConnectorClient, type ConnectorConnection, type ConnectionScope$1 as ConnectorConnectionScope, type ConnectionStatus$1 as ConnectorConnectionStatus, type ConnectionTokenResponse as ConnectorConnectionTokenResponse, type CredentialKind as ConnectorCredentialKind, type ConnectorKey, type ConnectorMethod, type ConnectorProvider, type ConsentStatus, type ConsumerGroup, type Contact, type ContactAddress, type ContactAddressKind, type ContactAddressSource, type ContactErasureRequest, type ContactGroup, type ContactGroupService, type ContactGroupSource, type ContactMergeProposal, type ContactRef, type ContactService, type ContactSource, type ContactStatus, type ContentBlock$1 as ContentBlock, type ContentMatch, type ContentResponse, type ContextCompactedPayload, type Conversation, ConversationClient, type ConversationFilter, type ConversationFilterAction, type ConversationFilterConfig, type ConversationFilterEvent, type ConversationFilterService, type ConversationFilterType, type ConversationParticipant, type ConversationService, type ConversationStatus, type ConversationSummaryStatus, type ConversationType, type ConversationTypeConfig, type ConversationTypeService, type CreateAgentListenerRequest, type CreateAgentRequest, type CreateConnectionRequest, type CreateConnectorConnectionRequest, type CreateContactGroupRequest, type CreateConversationFilterRequest, type CreateConversationTypeRequest, type CreateFileMetadata, type CreateGlossaryTermRequest, type CreateLabelRequest, type CreateLinkRequest, type CreateMcpServerRequest, type CreateNodeRequest, type CreateOrganizationRequest, type CreatePromptRequest, type CreateRecordLinkRequest, type CreateRoleRequest, type CreateSessionRequest, type CreateToneProfileSetupRequest, type CreateToolRequest, type CreateToolsetRequest, type CreateUserRequest, type CreateWorkflowRequest, type CredentialSpec, type CronTriggerParams, DEFAULT_PORT, DataClient, type DependentAgent, type DependentSyncResult, type DispatchMeetingBotRequest, type DisplayOptions, type DomainFilterConfig, ERROR_PORT, type EditContentRequest, type EditContentResponse, type EmptyPayload, type ErasureRequestStatus, ErrorCode, type ErrorCodeType, type ErrorPayload, type EventTriggerParams, type EventType, type EventVerb, EventsClient, type ExecutionError, type ExecutionStatus, type ExecutionTriggerContext, type FileBlock, FileRef, type FileService, type FileVersionContent, type FilterMatchOn, FunctionsClient, type GetExecutionDetailResponse, type GetGraphOptions, type GetNodeExecutionItemsOptions, type GetNodeExecutionItemsResponse, type GetNodeTypesResponse, type GlossaryTerm, type GlossaryTermService, type GraphService, type InlineLinkRequest, type InstallConnectionResponse, type InstallConnectorConnectionResponse, type InternalConversationsFilterConfig, type InvokeActionResponse, type InvokeNodeMethodRequest, type InvokeNodeMethodResponse, type Item, type KickoffSource, type KickoffType, KnowledgeClient, type KnowledgeGraph, type KnowledgeGraphLink, type KnowledgeGraphNode, type KnowledgeLabel, KnowledgeLabelSchema, type KnowledgeLink, KnowledgeLinkSchema, type KnowledgeNode, type KnowledgeNodeLabel, KnowledgeNodeLabelSchema, type KnowledgeNodeMetadata, KnowledgeNodeMetadataSchema, KnowledgeNodeSchema, type KnowledgeNodeSearchResult, KnowledgeNodeSearchResultSchema, type KnowledgeRecordLink, KnowledgeRecordLinkSchema, type LabelService, type LinkService, type LinkType, type ListActionsOptions, type ListAgentListenersQuery, type ListAgentsOptions, type ListConnectionsQuery, type ListConnectorConnectionsQuery, type ListConnectorsQuery, type ListContactAddressesQuery, type ListContactGroupsQuery, type ListContactMergeProposalsQuery, type ListContactsQuery, type ListConversationFilterEventsQuery, type ListConversationFiltersQuery, type ListConversationTypesQuery, type ListConversationsQuery, type ListEventsOptions, type ListExecutionsOptions, type ListGlossaryTermsQuery, type ListLabelsOptions, type ListLinksOptions, type ListMcpServersOptions, type ListMessagesQuery, type ListMistranscribedTermsQuery, type ListNodesOptions, ListOptions, type ListOrganizationsOptions, type ListPromptsOptions, type ListRecordLinksOptions, type ListRecordsOptions, type ListResponse, ListResult, type ListRolePermissionsOptions, type ListRolesOptions, type ListRoomsQuery, type ListSessionsOptions, type ListSkillsOptions, type ListToneProfileSetupsQuery, type ListToneProfilesQuery, type ListToolsOptions, type ListToolsetsOptions, type ListUserRoleAssignmentsOptions, type ListUsersOptions, type ListWorkflowsOptions, type ManualTriggerParams, type MatchMode, type McpBinding, type McpConnectionState, type McpConnectionStatus, type McpServer, type McpServerAuth, type McpServerOAuth, type McpServerService, type McpToolSummary, type MeService, type MeetingService, type MergeContactsRequest, type MergeProposalStatus, type Message, type ContentBlock as MessageContentBlock, type MessageDirection, type MessagePreview, type MessageRecipient, type MessageService, type MessageStatus, type MessageTriggerParams, type MistranscribedTerm, type MistranscribedTermService, type MistranscribedTermStatus, type MistranscriptionSuggestionSource, type ModelCallParams, type ModelConfig, type ModelRequestEndPayload, type ModelRequestStartPayload, type ModelUsage, type NeighborDirection, type NeighborEdge, type NeighborNode, type NeighborsOptions, type NodeContentMatches, type NodeDescriptor, type NodeExecution, type NodeGroup, type NodeMethodOption, type NodeNeighborhood, NodeNeighborhoodSchema, type NodeOutline, type NodePosition, type NodeProperty, type NodeRetryPolicy, type NodeRuntime, type NodeService, type NodeStatus, type NodeType, type NodeTypeKey, type NodeTypeService, type NodeTypeStatus, type OnErrorPolicy, type Organization, OrganizationSchema, type OrganizationService, type OutlineHeading, type OutlineRequest, type OutlineResponse, PLATFORM_ENTITIES, PLATFORM_ENTITY_SLUGS, PageIterator, type PairedItem, type ParseStatus, type Permission, type PermissionEventSource, type PermissionEventType, type PlatformBinding, type PlatformEntity, type PlatformEvent, type PortSpec, type Prompt, type PromptService, type PromptVersion, type PropertyOption, type PropertyType, ProteosClient, ProteosError, PublicAccessOperation, type PublishEventRequest, type QueryBinding, type QueryExecuteMeta, type QueryExecuteResponse, type QueryObject, type QueryRow, type QueryService, type QueryValidateMeta, type QueryValidateResponse, type QueryValue, type Reaction, type ReactionCapability, type ReactionOption, type ReactionSetKind, type ReasoningPayload, type RecipientKind, type RecipientRole, type RecordData, type RecordLinkService, type RecordPermissionEventRequest, type RecordService, type RedriveResult, type ResolveToneProfileQuery, type ResultBlock, type Role, type RoleBasedFilterConfig, type RoleEntityPermission, RoleEntityPermissionSchema, RoleSchema, type RoleService, type Room, type RunWorkflowRequest, type SearchContentRequest, type SearchContentResponse, type SearchNodesRequest, type SendMessageRequest, type SendRecipient, type Session, type SessionEvent, type SessionEventEnvelope, type SessionEventsOptions, type SessionIdlePayload, type SessionService, type SessionStatus, type SessionStreamOptions, type SessionUpdatedPayload, type Skill, type SkillBundle, type SkillService, type SkillVersion, type StartMcpOAuthResponse, type StopReason, StorageClient, type StorageFile, type StorageFileVersion, type SyncConnectionRequest, type SystemSource, type TailOptions, type TestNodeCandidate, type TestNodeInputSource, type TestNodeRequest, type TestNodeResponse, type TextBlock, type ToneProfile, type ToneProfileScope, type ToneProfileService, type ToneProfileSetup, type ToneProfileSetupStatus, type Tool, type ToolBinding, type ToolConfirmationPayload, type ToolKind, type ToolResultPayload, type ToolService, type ToolUsePayload, type Toolset, type ToolsetKind, type ToolsetService, type ToolsetToolSummary, type Topic, type TopicKind, type TopicService, type TranscribeStreamOptions, type TranscriptResult, type TranscriptTurn, type Transcription, type TranscriptionReviewStatus, type TranscriptionStatus, type TriggerKind, type Turn, type UnreadCounts, type UpdateAgentListenerRequest, type UpdateAgentRequest, type UpdateConnectionRequest, type UpdateConnectorConnectionRequest, type UpdateContactGroupRequest, type UpdateContactRequest, type UpdateConversationFilterRequest, type UpdateConversationTypeRequest, type UpdateDraftRequest, type UpdateFileMetadata, type UpdateGlossaryTermRequest, type UpdateLabelRequest, type UpdateLinkRequest, type UpdateMcpServerRequest, type UpdateNodeRequest, type UpdateOrganizationRequest, type UpdatePromptRequest, type UpdateRoleRequest, type UpdateToolRequest, type UpdateToolsetRequest, type UpdateUserRequest, type UpdateWorkflowRequest, type User, type UserMessagePayload, UserRef$2 as UserRef, type UserRoleAssignment, UserRoleAssignmentSchema, UserSchema, type UserService, type VoiceService, type VoiceTranscriptionStream, type WebhookTriggerParams, type Workflow, WorkflowClient, type WorkflowConnection, type WorkflowExecution, type WorkflowGraph, type WorkflowNode, type WorkflowNodeType, type WorkflowStatus, type WorkflowVersion, type WorkflowVersionAuthor, type WorkflowVersionSummary, type WriteContentResponse, type WriteCredentialsRequest, buildUrl, getDefaultErrorCode, isBadRequest, isConflict, isForbidden, isNotFound, isPlatformEntity, isProteosError, isUnauthorized, parseErrorResponse, toQueryParams, toQueryString };
7174
+ export { type AcceptMistranscribedTermRequest, AccountClient, type Action, type ActionBinding, ActionSchema, type ActionScope, ActionScopeSchema, type ActionService, type AddTeamMemberRequest, type AddressFilterConfig, type Agent, type AgentActionParams, type AgentArtifactsPayload, AgentClient, type AgentListener, type AgentListenerAcknowledgementConfig, type AgentListenerAcknowledgementType, type AgentListenerActingUserMode, type AgentListenerService, type AgentListenerTriggerType, type AgentMessagePayload, type AgentResourceListOptions, type AgentService, type AllFilterConfig, type ApiErrorResponse, type ApiKey, type AppendEventRequest, type AssignPermissionRequest, type AssignRoleRequest, type AttachContactAddressRequest, type Attachment, Attribute, AuditFields, type AuthListOptions, type AutomatedFilterConfig, type AutomatedSignal, type BatchTransactionError, BatchTransactionErrorSchema, type BatchTransactionStatus, type BatchUpsertRecordsResponse, BatchUpsertRecordsResponseSchema, type BatchUpsertTransaction, type BatchUpsertTransactionResult, BatchUpsertTransactionResultSchema, BatchUpsertTransactionSchema, type BinaryRef, type BlockContactRequest, type Channel, type ClientEventType, type ClientToolSchema, type Connection, type ConnectionCredentials, type ConnectionEndpoint, type ConnectionScope, type ConnectionService, type ConnectionStatus, type ConnectionSyncRange, type ConnectionSyncStatus, type Connector, ConnectorClient, type ConnectorConnection, type ConnectionScope$1 as ConnectorConnectionScope, type ConnectionStatus$1 as ConnectorConnectionStatus, type ConnectionTokenResponse as ConnectorConnectionTokenResponse, type CredentialKind as ConnectorCredentialKind, type ConnectorKey, type ConnectorMethod, type ConnectorProvider, type ConsentStatus, type ConsumerGroup, type Contact, type ContactAddress, type ContactAddressKind, type ContactAddressSource, type ContactErasureRequest, type ContactGroup, type ContactGroupService, type ContactGroupSource, type ContactMergeProposal, type ContactRef, type ContactService, type ContactSource, type ContactStatus, type ContentBlock$1 as ContentBlock, type ContentMatch, type ContentResponse, type ContextCompactedPayload, type Conversation, ConversationClient, type ConversationFilter, type ConversationFilterAction, type ConversationFilterConfig, type ConversationFilterEvent, type ConversationFilterService, type ConversationFilterType, type ConversationParticipant, type ConversationService, type ConversationStatus, type ConversationSummaryStatus, type ConversationType, type ConversationTypeConfig, type ConversationTypeService, type CreateAgentListenerRequest, type CreateAgentRequest, type CreateApiKeyRequest, type CreateConnectionRequest, type CreateConnectorConnectionRequest, type CreateContactGroupRequest, type CreateConversationFilterRequest, type CreateConversationTypeRequest, type CreateFileMetadata, type CreateGlossaryTermRequest, type CreateLabelRequest, type CreateLinkRequest, type CreateMcpServerRequest, type CreateNodeRequest, type CreateOrganizationRequest, type CreatePromptRequest, type CreateRecordLinkRequest, type CreateRoleRequest, type CreateSessionRequest, type CreateSpaceRequest, type CreateTeamRequest, type CreateToneProfileSetupRequest, type CreateToolRequest, type CreateToolsetRequest, type CreateUserRequest, type CreateWorkflowRequest, type CreatedApiKey, type CredentialSpec, type CronTriggerParams, DEFAULT_PORT, DataClient, type DependentAgent, type DependentSyncResult, type DispatchMeetingBotRequest, type DisplayOptions, type DomainFilterConfig, ERROR_PORT, type EditContentRequest, type EditContentResponse, type EmptyPayload, type ErasureRequestStatus, ErrorCode, type ErrorCodeType, type ErrorPayload, type EventTriggerParams, type EventType, type EventVerb, EventsClient, type ExecutionError, type ExecutionStatus, type ExecutionTriggerContext, type FileBlock, FileRef, type FileService, type FileVersionContent, type FilterMatchOn, FunctionsClient, type GetExecutionDetailResponse, type GetGraphOptions, type GetNodeExecutionItemsOptions, type GetNodeExecutionItemsResponse, type GetNodeTypesResponse, type GlossaryTerm, type GlossaryTermService, type GraphService, type InlineLinkRequest, type InstallConnectionResponse, type InstallConnectorConnectionResponse, type InternalConversationsFilterConfig, type InvokeActionResponse, type InvokeNodeMethodRequest, type InvokeNodeMethodResponse, type Item, type KickoffSource, type KickoffType, KnowledgeClient, type KnowledgeGraph, type KnowledgeGraphLink, type KnowledgeGraphNode, type KnowledgeLabel, KnowledgeLabelSchema, type KnowledgeLink, KnowledgeLinkSchema, type KnowledgeNode, type KnowledgeNodeLabel, KnowledgeNodeLabelSchema, type KnowledgeNodeMetadata, KnowledgeNodeMetadataSchema, KnowledgeNodeSchema, type KnowledgeNodeSearchResult, KnowledgeNodeSearchResultSchema, type KnowledgeRecordLink, KnowledgeRecordLinkSchema, type KnowledgeSpace, type LabelService, type LinkService, type LinkType, type ListActionsOptions, type ListAgentListenersQuery, type ListAgentsOptions, type ListConnectionsQuery, type ListConnectorConnectionsQuery, type ListConnectorsQuery, type ListContactAddressesQuery, type ListContactGroupsQuery, type ListContactMergeProposalsQuery, type ListContactsQuery, type ListConversationFilterEventsQuery, type ListConversationFiltersQuery, type ListConversationTypesQuery, type ListConversationsQuery, type ListEventsOptions, type ListExecutionsOptions, type ListGlossaryTermsQuery, type ListLabelsOptions, type ListLinksOptions, type ListMcpServersOptions, type ListMessagesQuery, type ListMistranscribedTermsQuery, type ListNodesOptions, ListOptions, type ListOrgUserRoleAssignmentsOptions, type ListOrganizationsOptions, type ListPromptsOptions, type ListRecordLinksOptions, type ListRecordsOptions, type ListResponse, ListResult, type ListRolePermissionsOptions, type ListRolesOptions, type ListRoomsQuery, type ListSessionsOptions, type ListSkillsOptions, type ListSpacesOptions, type ListTeamMembersOptions, type ListTeamsOptions, type ListToneProfileSetupsQuery, type ListToneProfilesQuery, type ListToolsOptions, type ListToolsetsOptions, type ListUserRoleAssignmentsOptions, type ListUsersOptions, type ListWorkflowsOptions, type ManualTriggerParams, type MatchMode, type McpBinding, type McpConnectionState, type McpConnectionStatus, type McpServer, type McpServerAuth, type McpServerOAuth, type McpServerService, type McpToolSummary, type MeService, type MeetingService, type MergeContactsRequest, type MergeProposalStatus, type Message, type ContentBlock as MessageContentBlock, type MessageDirection, type MessagePreview, type MessageRecipient, type MessageService, type MessageStatus, type MessageTriggerParams, type MistranscribedTerm, type MistranscribedTermService, type MistranscribedTermStatus, type MistranscriptionSuggestionSource, type ModelCallParams, type ModelConfig, type ModelRequestEndPayload, type ModelRequestStartPayload, type ModelUsage, type NeighborDirection, type NeighborEdge, type NeighborNode, type NeighborsOptions, type NodeContentMatches, type NodeDescriptor, type NodeExecution, type NodeGroup, type NodeMethodOption, type NodeNeighborhood, NodeNeighborhoodSchema, type NodeOutline, type NodePosition, type NodeProperty, type NodeRetryPolicy, type NodeRuntime, type NodeService, type NodeStatus, type NodeType, type NodeTypeKey, type NodeTypeService, type NodeTypeStatus, type OnErrorPolicy, type Organization, OrganizationSchema, type OrganizationService, type OutlineHeading, type OutlineRequest, type OutlineResponse, PLATFORM_ENTITIES, PLATFORM_ENTITY_SLUGS, PageIterator, type PairedItem, type ParseStatus, type Permission, type PermissionEventSource, type PermissionEventType, type PlatformBinding, type PlatformEntity, type PlatformEvent, type PortSpec, type Prompt, type PromptService, type PromptVersion, type PropertyOption, type PropertyType, ProteosClient, ProteosError, PublicAccessOperation, type PublishEventRequest, type QueryBinding, type QueryExecuteMeta, type QueryExecuteResponse, type QueryObject, type QueryRow, type QueryService, type QueryValidateMeta, type QueryValidateResponse, type QueryValue, type Reaction, type ReactionCapability, type ReactionOption, type ReactionSetKind, type ReasoningPayload, type RecipientKind, type RecipientRole, type RecordData, type RecordLinkService, type RecordPermissionEventRequest, type RecordService, type RedriveResult, type ResolveToneProfileQuery, type ResultBlock, type Role, type RoleBasedFilterConfig, type RoleEntityPermission, RoleEntityPermissionSchema, RoleSchema, type RoleService, type Room, type RunWorkflowRequest, SCOPED_PLATFORM_ENTITY_SLUGS, type SearchContentRequest, type SearchContentResponse, type SearchNodesRequest, type SendMessageRequest, type SendRecipient, type Session, type SessionEvent, type SessionEventEnvelope, type SessionEventsOptions, type SessionIdlePayload, type SessionService, type SessionStatus, type SessionStreamOptions, type SessionUpdatedPayload, type SharePermission, type ShareRow, type ShareService, type Skill, type SkillBundle, type SkillService, type SkillVersion, type SpaceService, type StartMcpOAuthResponse, type StopReason, StorageClient, type StorageFile, type StorageFileVersion, type SyncConnectionRequest, type SystemSource, type TailOptions, type Team, type TeamMember, type TeamService, type TestNodeCandidate, type TestNodeInputSource, type TestNodeRequest, type TestNodeResponse, type TextBlock, type ToneProfile, type ToneProfileScope, type ToneProfileService, type ToneProfileSetup, type ToneProfileSetupStatus, type Tool, type ToolBinding, type ToolConfirmationPayload, type ToolKind, type ToolResultPayload, type ToolService, type ToolUsePayload, type Toolset, type ToolsetKind, type ToolsetService, type ToolsetToolSummary, type Topic, type TopicKind, type TopicService, type TranscribeStreamOptions, type TranscriptResult, type TranscriptTurn, type Transcription, type TranscriptionReviewStatus, type TranscriptionStatus, type TriggerKind, type Turn, UNASSIGNED_SPACE_SLUG, type UnreadCounts, type UpdateAgentListenerRequest, type UpdateAgentRequest, type UpdateConnectionRequest, type UpdateConnectorConnectionRequest, type UpdateContactGroupRequest, type UpdateContactRequest, type UpdateConversationFilterRequest, type UpdateConversationTypeRequest, type UpdateDraftRequest, type UpdateFileMetadata, type UpdateGlossaryTermRequest, type UpdateLabelRequest, type UpdateLinkRequest, type UpdateMcpServerRequest, type UpdateMeRequest, type UpdateNodeRequest, type UpdateOrganizationRequest, type UpdatePromptRequest, type UpdateRoleRequest, type UpdateSpaceRequest, type UpdateTeamRequest, type UpdateToolRequest, type UpdateToolsetRequest, type UpdateUserRequest, type UpdateWorkflowRequest, type User, type UserMessagePayload, UserRef$2 as UserRef, type UserRoleAssignment, UserRoleAssignmentSchema, type UserRoleAssignmentService, UserSchema, type UserService, type VoiceService, type VoiceTranscriptionStream, type WebhookTriggerParams, type Workflow, WorkflowClient, type WorkflowConnection, type WorkflowExecution, type WorkflowGraph, type WorkflowNode, type WorkflowNodeType, type WorkflowStatus, type WorkflowVersion, type WorkflowVersionAuthor, type WorkflowVersionSummary, type WriteContentResponse, type WriteCredentialsRequest, buildUrl, getDefaultErrorCode, isBadRequest, isConflict, isForbidden, isNotFound, isPlatformEntity, isProteosError, isShareable, isUnauthorized, parseErrorResponse, shareRouteFor, toQueryParams, toQueryString };