@proteos/sdk 0.44.0 → 0.46.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 (39) hide show
  1. package/dist/{chunk-33EULWIM.cjs → chunk-F5DHWOGW.cjs} +195 -27
  2. package/dist/chunk-F5DHWOGW.cjs.map +1 -0
  3. package/dist/{chunk-IGIAJVX6.js → chunk-Y4CEHIRX.js} +191 -28
  4. package/dist/chunk-Y4CEHIRX.js.map +1 -0
  5. package/dist/index.cjs +453 -178
  6. package/dist/index.cjs.map +1 -1
  7. package/dist/index.d.cts +686 -13
  8. package/dist/index.d.ts +686 -13
  9. package/dist/index.js +355 -96
  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-D1PRIsSO.d.cts} +406 -14
  16. package/dist/{types-BTdBFq34.d.ts → types-D1PRIsSO.d.ts} +406 -14
  17. package/package.json +3 -3
  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/conversation/index.ts +42 -0
  27. package/src/conversation/types.ts +37 -0
  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 +151 -26
  36. package/src/meta/types.ts +186 -4
  37. package/src/workflow/types.ts +20 -3
  38. package/dist/chunk-33EULWIM.cjs.map +0 -1
  39. package/dist/chunk-IGIAJVX6.js.map +0 -1
package/dist/index.d.cts 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.cjs';
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.cjs';
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-D1PRIsSO.cjs';
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-D1PRIsSO.cjs';
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
  *
@@ -3219,12 +3553,45 @@ interface UpdateContactRequest {
3219
3553
  */
3220
3554
  group_key?: string;
3221
3555
  }
3556
+ /**
3557
+ * Manually mints a contact with at least one address. Addresses are
3558
+ * canonicalized server-side; any address already owned by another contact
3559
+ * rejects the create with 409 contact_address_taken.
3560
+ */
3561
+ interface CreateContactRequest {
3562
+ name: string;
3563
+ addresses: AttachContactAddressRequest[];
3564
+ }
3222
3565
  interface AttachContactAddressRequest {
3223
3566
  kind: ContactAddressKind;
3224
3567
  scope?: string;
3225
3568
  value: string;
3226
3569
  name?: string;
3227
3570
  }
3571
+ /**
3572
+ * A directed edge from a contact to a business record (entity_slug +
3573
+ * record_id). Bare — no role; the relationship's semantics come from the
3574
+ * target entity. Immutable once created.
3575
+ */
3576
+ interface ContactRecordLink {
3577
+ id: string;
3578
+ org_id: string;
3579
+ contact_id: string;
3580
+ entity_slug: string;
3581
+ record_id: string;
3582
+ created_at: string;
3583
+ created_by: UserRef;
3584
+ }
3585
+ interface CreateContactRecordLinkRequest {
3586
+ contact_id: string;
3587
+ entity_slug: string;
3588
+ record_id: string;
3589
+ }
3590
+ interface ListContactRecordLinksQuery extends PaginationQuery {
3591
+ contact_id?: string;
3592
+ entity_slug?: string;
3593
+ record_id?: string;
3594
+ }
3228
3595
  interface MergeContactsRequest {
3229
3596
  source_contact_id: string;
3230
3597
  }
@@ -3569,9 +3936,17 @@ interface ConnectionService {
3569
3936
  interface ContactService {
3570
3937
  list(query?: ListContactsQuery): Promise<ListResponse<Contact>>;
3571
3938
  get(id: string): Promise<Contact>;
3939
+ /** Manually mint a contact (sync dedup — 409 contact_address_taken on any owned address). */
3940
+ create(request: CreateContactRequest): Promise<Contact>;
3572
3941
  update(id: string, request: UpdateContactRequest): Promise<Contact>;
3573
3942
  attachAddress(contactId: string, request: AttachContactAddressRequest): Promise<Contact>;
3574
3943
  detachAddress(contactId: string, addressId: string): Promise<Contact>;
3944
+ /** Link the contact to a business record (bare edge; 409 contact_record_link_exists on duplicates). */
3945
+ linkRecord(request: CreateContactRecordLinkRequest): Promise<ContactRecordLink>;
3946
+ /** Page contact→record edges by contact_id, or by entity_slug + record_id. */
3947
+ listRecordLinks(query?: ListContactRecordLinksQuery): Promise<ListResponse<ContactRecordLink>>;
3948
+ getRecordLink(linkId: string): Promise<ContactRecordLink>;
3949
+ unlinkRecord(linkId: string): Promise<void>;
3575
3950
  /** Fold source_contact_id into contactId (contactId wins). */
3576
3951
  merge(contactId: string, request: MergeContactsRequest): Promise<Contact>;
3577
3952
  recordPermissionEvent(contactId: string, request: RecordPermissionEventRequest): Promise<Contact>;
@@ -4284,6 +4659,46 @@ declare const ActionSchema: z.ZodObject<{
4284
4659
  is_nullable: z.ZodOptional<z.ZodBoolean>;
4285
4660
  is_unique: z.ZodBoolean;
4286
4661
  is_read_only: z.ZodOptional<z.ZodBoolean>;
4662
+ restrictions: z.ZodOptional<z.ZodObject<{
4663
+ read: z.ZodOptional<z.ZodObject<{
4664
+ roles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4665
+ teams: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4666
+ }, "strip", z.ZodTypeAny, {
4667
+ roles?: string[] | undefined;
4668
+ teams?: string[] | undefined;
4669
+ }, {
4670
+ roles?: string[] | undefined;
4671
+ teams?: string[] | undefined;
4672
+ }>>;
4673
+ write: z.ZodOptional<z.ZodObject<{
4674
+ roles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4675
+ teams: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4676
+ }, "strip", z.ZodTypeAny, {
4677
+ roles?: string[] | undefined;
4678
+ teams?: string[] | undefined;
4679
+ }, {
4680
+ roles?: string[] | undefined;
4681
+ teams?: string[] | undefined;
4682
+ }>>;
4683
+ }, "strip", z.ZodTypeAny, {
4684
+ read?: {
4685
+ roles?: string[] | undefined;
4686
+ teams?: string[] | undefined;
4687
+ } | undefined;
4688
+ write?: {
4689
+ roles?: string[] | undefined;
4690
+ teams?: string[] | undefined;
4691
+ } | undefined;
4692
+ }, {
4693
+ read?: {
4694
+ roles?: string[] | undefined;
4695
+ teams?: string[] | undefined;
4696
+ } | undefined;
4697
+ write?: {
4698
+ roles?: string[] | undefined;
4699
+ teams?: string[] | undefined;
4700
+ } | undefined;
4701
+ }>>;
4287
4702
  default_value: z.ZodOptional<z.ZodUnknown>;
4288
4703
  meta: z.ZodOptional<z.ZodUnknown>;
4289
4704
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -4298,6 +4713,16 @@ declare const ActionSchema: z.ZodObject<{
4298
4713
  description?: string | undefined;
4299
4714
  is_read_only?: boolean | undefined;
4300
4715
  is_nullable?: boolean | undefined;
4716
+ restrictions?: {
4717
+ read?: {
4718
+ roles?: string[] | undefined;
4719
+ teams?: string[] | undefined;
4720
+ } | undefined;
4721
+ write?: {
4722
+ roles?: string[] | undefined;
4723
+ teams?: string[] | undefined;
4724
+ } | undefined;
4725
+ } | undefined;
4301
4726
  default_value?: unknown;
4302
4727
  }, {
4303
4728
  type: string;
@@ -4310,6 +4735,16 @@ declare const ActionSchema: z.ZodObject<{
4310
4735
  description?: string | undefined;
4311
4736
  is_read_only?: boolean | undefined;
4312
4737
  is_nullable?: boolean | undefined;
4738
+ restrictions?: {
4739
+ read?: {
4740
+ roles?: string[] | undefined;
4741
+ teams?: string[] | undefined;
4742
+ } | undefined;
4743
+ write?: {
4744
+ roles?: string[] | undefined;
4745
+ teams?: string[] | undefined;
4746
+ } | undefined;
4747
+ } | undefined;
4313
4748
  default_value?: unknown;
4314
4749
  }>, "many">;
4315
4750
  returns: z.ZodArray<z.ZodObject<{
@@ -4321,6 +4756,46 @@ declare const ActionSchema: z.ZodObject<{
4321
4756
  is_nullable: z.ZodOptional<z.ZodBoolean>;
4322
4757
  is_unique: z.ZodBoolean;
4323
4758
  is_read_only: z.ZodOptional<z.ZodBoolean>;
4759
+ restrictions: z.ZodOptional<z.ZodObject<{
4760
+ read: z.ZodOptional<z.ZodObject<{
4761
+ roles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4762
+ teams: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4763
+ }, "strip", z.ZodTypeAny, {
4764
+ roles?: string[] | undefined;
4765
+ teams?: string[] | undefined;
4766
+ }, {
4767
+ roles?: string[] | undefined;
4768
+ teams?: string[] | undefined;
4769
+ }>>;
4770
+ write: z.ZodOptional<z.ZodObject<{
4771
+ roles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4772
+ teams: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4773
+ }, "strip", z.ZodTypeAny, {
4774
+ roles?: string[] | undefined;
4775
+ teams?: string[] | undefined;
4776
+ }, {
4777
+ roles?: string[] | undefined;
4778
+ teams?: string[] | undefined;
4779
+ }>>;
4780
+ }, "strip", z.ZodTypeAny, {
4781
+ read?: {
4782
+ roles?: string[] | undefined;
4783
+ teams?: string[] | undefined;
4784
+ } | undefined;
4785
+ write?: {
4786
+ roles?: string[] | undefined;
4787
+ teams?: string[] | undefined;
4788
+ } | undefined;
4789
+ }, {
4790
+ read?: {
4791
+ roles?: string[] | undefined;
4792
+ teams?: string[] | undefined;
4793
+ } | undefined;
4794
+ write?: {
4795
+ roles?: string[] | undefined;
4796
+ teams?: string[] | undefined;
4797
+ } | undefined;
4798
+ }>>;
4324
4799
  default_value: z.ZodOptional<z.ZodUnknown>;
4325
4800
  meta: z.ZodOptional<z.ZodUnknown>;
4326
4801
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -4335,6 +4810,16 @@ declare const ActionSchema: z.ZodObject<{
4335
4810
  description?: string | undefined;
4336
4811
  is_read_only?: boolean | undefined;
4337
4812
  is_nullable?: boolean | undefined;
4813
+ restrictions?: {
4814
+ read?: {
4815
+ roles?: string[] | undefined;
4816
+ teams?: string[] | undefined;
4817
+ } | undefined;
4818
+ write?: {
4819
+ roles?: string[] | undefined;
4820
+ teams?: string[] | undefined;
4821
+ } | undefined;
4822
+ } | undefined;
4338
4823
  default_value?: unknown;
4339
4824
  }, {
4340
4825
  type: string;
@@ -4347,6 +4832,16 @@ declare const ActionSchema: z.ZodObject<{
4347
4832
  description?: string | undefined;
4348
4833
  is_read_only?: boolean | undefined;
4349
4834
  is_nullable?: boolean | undefined;
4835
+ restrictions?: {
4836
+ read?: {
4837
+ roles?: string[] | undefined;
4838
+ teams?: string[] | undefined;
4839
+ } | undefined;
4840
+ write?: {
4841
+ roles?: string[] | undefined;
4842
+ teams?: string[] | undefined;
4843
+ } | undefined;
4844
+ } | undefined;
4350
4845
  default_value?: unknown;
4351
4846
  }>, "many">;
4352
4847
  }, "strip", z.ZodTypeAny, {
@@ -4361,6 +4856,16 @@ declare const ActionSchema: z.ZodObject<{
4361
4856
  description?: string | undefined;
4362
4857
  is_read_only?: boolean | undefined;
4363
4858
  is_nullable?: boolean | undefined;
4859
+ restrictions?: {
4860
+ read?: {
4861
+ roles?: string[] | undefined;
4862
+ teams?: string[] | undefined;
4863
+ } | undefined;
4864
+ write?: {
4865
+ roles?: string[] | undefined;
4866
+ teams?: string[] | undefined;
4867
+ } | undefined;
4868
+ } | undefined;
4364
4869
  default_value?: unknown;
4365
4870
  }[];
4366
4871
  name: string;
@@ -4391,6 +4896,16 @@ declare const ActionSchema: z.ZodObject<{
4391
4896
  description?: string | undefined;
4392
4897
  is_read_only?: boolean | undefined;
4393
4898
  is_nullable?: boolean | undefined;
4899
+ restrictions?: {
4900
+ read?: {
4901
+ roles?: string[] | undefined;
4902
+ teams?: string[] | undefined;
4903
+ } | undefined;
4904
+ write?: {
4905
+ roles?: string[] | undefined;
4906
+ teams?: string[] | undefined;
4907
+ } | undefined;
4908
+ } | undefined;
4394
4909
  default_value?: unknown;
4395
4910
  }[];
4396
4911
  entity?: string | undefined;
@@ -4406,6 +4921,16 @@ declare const ActionSchema: z.ZodObject<{
4406
4921
  description?: string | undefined;
4407
4922
  is_read_only?: boolean | undefined;
4408
4923
  is_nullable?: boolean | undefined;
4924
+ restrictions?: {
4925
+ read?: {
4926
+ roles?: string[] | undefined;
4927
+ teams?: string[] | undefined;
4928
+ } | undefined;
4929
+ write?: {
4930
+ roles?: string[] | undefined;
4931
+ teams?: string[] | undefined;
4932
+ } | undefined;
4933
+ } | undefined;
4409
4934
  default_value?: unknown;
4410
4935
  }[];
4411
4936
  name: string;
@@ -4436,6 +4961,16 @@ declare const ActionSchema: z.ZodObject<{
4436
4961
  description?: string | undefined;
4437
4962
  is_read_only?: boolean | undefined;
4438
4963
  is_nullable?: boolean | undefined;
4964
+ restrictions?: {
4965
+ read?: {
4966
+ roles?: string[] | undefined;
4967
+ teams?: string[] | undefined;
4968
+ } | undefined;
4969
+ write?: {
4970
+ roles?: string[] | undefined;
4971
+ teams?: string[] | undefined;
4972
+ } | undefined;
4973
+ } | undefined;
4439
4974
  default_value?: unknown;
4440
4975
  }[];
4441
4976
  entity?: string | undefined;
@@ -4598,6 +5133,12 @@ interface KnowledgeNodeMetadata extends AuditFields {
4598
5133
  /** Embedding provenance (null until ingestion runs). */
4599
5134
  embedding_model?: string | null;
4600
5135
  embedded_at?: string | null;
5136
+ /**
5137
+ * The space this node lives in, or null when UNASSIGNED. An unassigned node
5138
+ * is visible to anyone holding knowledge-nodes:read — the behaviour every
5139
+ * node had before spaces existed.
5140
+ */
5141
+ space_slug?: string | null;
4601
5142
  /** Source pointer for `file` nodes (storage-service file id). */
4602
5143
  file_id?: string | null;
4603
5144
  /** Source pointer for `url` nodes. */
@@ -4678,6 +5219,8 @@ interface CreateNodeRequest {
4678
5219
  type: NodeType;
4679
5220
  status: NodeStatus;
4680
5221
  content?: string;
5222
+ /** File the node into a space. Omitted = unassigned. */
5223
+ space_slug?: string;
4681
5224
  file_id?: string;
4682
5225
  url?: string;
4683
5226
  summary?: string;
@@ -4699,6 +5242,12 @@ interface UpdateNodeRequest {
4699
5242
  */
4700
5243
  valid_from?: string | null;
4701
5244
  valid_until?: string | null;
5245
+ /**
5246
+ * Move the node between spaces, tri-state like the validity window: omit to
5247
+ * leave it where it is, pass `null` to move it back to unassigned, or a slug
5248
+ * to file it into that space.
5249
+ */
5250
+ space_slug?: string | null;
4702
5251
  }
4703
5252
  /** Filters for listing nodes. */
4704
5253
  interface ListNodesOptions extends ListOptions {
@@ -4708,6 +5257,11 @@ interface ListNodesOptions extends ListOptions {
4708
5257
  'title[contains]'?: string;
4709
5258
  /** Keep only nodes carrying ANY of these labels (union). */
4710
5259
  label_ids?: string[];
5260
+ /**
5261
+ * Keep only nodes living in ANY of these spaces (union). Use
5262
+ * `UNASSIGNED_SPACE_SLUG` to ask for nodes belonging to no space.
5263
+ */
5264
+ space_slugs?: string[];
4711
5265
  /** Created on/after this RFC3339 timestamp (inclusive). */
4712
5266
  created_after?: string;
4713
5267
  /** Created on/before this RFC3339 timestamp (inclusive). */
@@ -4807,6 +5361,11 @@ interface SearchNodesRequest {
4807
5361
  status?: NodeStatus;
4808
5362
  /** Match nodes carrying ANY of these labels. */
4809
5363
  label_ids?: string[];
5364
+ /**
5365
+ * Match nodes living in ANY of these spaces (union). Use
5366
+ * `UNASSIGNED_SPACE_SLUG` for nodes belonging to no space.
5367
+ */
5368
+ space_slugs?: string[];
4810
5369
  /** Match nodes connected (either direction) to this node. */
4811
5370
  linked_to_id?: string;
4812
5371
  /**
@@ -4863,6 +5422,8 @@ interface KnowledgeGraphNode {
4863
5422
  type: NodeType;
4864
5423
  status: NodeStatus;
4865
5424
  label_ids: string[];
5425
+ /** The node's space, or null when unassigned. */
5426
+ space_slug?: string | null;
4866
5427
  degree: number;
4867
5428
  }
4868
5429
  /** A lean directed edge in the whole-graph payload. */
@@ -4882,6 +5443,12 @@ interface KnowledgeGraph {
4882
5443
  nodes: KnowledgeGraphNode[];
4883
5444
  links: KnowledgeGraphLink[];
4884
5445
  labels: KnowledgeLabel[];
5446
+ /**
5447
+ * The full org space set, sent once for the same reason as `labels`: the
5448
+ * client renders the space navigator and filters by space without a second
5449
+ * request, even when the graph is pruned to one space.
5450
+ */
5451
+ spaces: KnowledgeSpace[];
4885
5452
  total: number;
4886
5453
  }
4887
5454
  /**
@@ -4890,6 +5457,8 @@ interface KnowledgeGraph {
4890
5457
  */
4891
5458
  interface GetGraphOptions {
4892
5459
  label_ids?: string[];
5460
+ /** Prune to nodes in ANY of these spaces (union). */
5461
+ space_slugs?: string[];
4893
5462
  }
4894
5463
  interface CreateLinkRequest {
4895
5464
  from_id: string;
@@ -4924,6 +5493,52 @@ interface ListRecordLinksOptions extends ListOptions {
4924
5493
  entity_slug?: string;
4925
5494
  record_id?: string;
4926
5495
  }
5496
+ /**
5497
+ * A knowledge space: the container a node lives in. A node belongs to at most
5498
+ * one space; a node with no space is unassigned.
5499
+ *
5500
+ * A space is NOT a label. Labels are many-per-node, overlapping, non-security
5501
+ * tags; a space is the single place a node lives, and it is what instance-level
5502
+ * access is evaluated against.
5503
+ *
5504
+ * Keyed by `slug`, which is IMMUTABLE — it is half the primary key, node rows
5505
+ * reference it and access grants name it, so renaming would orphan both. There
5506
+ * is no id.
5507
+ */
5508
+ interface KnowledgeSpace extends AuditFields {
5509
+ org_id: string;
5510
+ slug: string;
5511
+ name: string;
5512
+ description?: string | null;
5513
+ color?: string | null;
5514
+ icon?: string | null;
5515
+ }
5516
+ /**
5517
+ * The reserved filter value meaning "nodes that belong to no space at all".
5518
+ * Deliberately not a legal slug (slugs are kebab-case), so it can never collide
5519
+ * with a space an org creates.
5520
+ */
5521
+ declare const UNASSIGNED_SPACE_SLUG = "__unassigned__";
5522
+ interface CreateSpaceRequest {
5523
+ /** Permanent — it is half the primary key and cannot be changed later. */
5524
+ slug: string;
5525
+ name: string;
5526
+ description?: string;
5527
+ color?: string;
5528
+ icon?: string;
5529
+ }
5530
+ /** Partial update. `slug` is absent because it is immutable. */
5531
+ interface UpdateSpaceRequest {
5532
+ name?: string;
5533
+ description?: string;
5534
+ color?: string;
5535
+ icon?: string;
5536
+ }
5537
+ interface ListSpacesOptions extends ListOptions {
5538
+ slug?: string;
5539
+ name?: string;
5540
+ 'name[contains]'?: string;
5541
+ }
4927
5542
  interface CreateLabelRequest {
4928
5543
  name: string;
4929
5544
  slug: string;
@@ -5290,8 +5905,8 @@ declare const KnowledgeRecordLinkSchema: z.ZodObject<{
5290
5905
  };
5291
5906
  entity_slug: string;
5292
5907
  org_id: string;
5293
- node_id: string;
5294
5908
  record_id: string;
5909
+ node_id: string;
5295
5910
  }, {
5296
5911
  id: string;
5297
5912
  created_at: string;
@@ -5301,8 +5916,8 @@ declare const KnowledgeRecordLinkSchema: z.ZodObject<{
5301
5916
  };
5302
5917
  entity_slug: string;
5303
5918
  org_id: string;
5304
- node_id: string;
5305
5919
  record_id: string;
5920
+ node_id: string;
5306
5921
  }>;
5307
5922
  declare const KnowledgeLabelSchema: z.ZodObject<{
5308
5923
  id: z.ZodString;
@@ -5480,7 +6095,8 @@ declare const NodeNeighborhoodSchema: z.ZodObject<{
5480
6095
  interface GraphService {
5481
6096
  /**
5482
6097
  * Reads the whole org graph in one payload. `options.label_ids` prunes to
5483
- * nodes carrying ANY of the given labels (union); omitted returns everything.
6098
+ * nodes carrying ANY of the given labels (union) and `options.space_slugs` to
6099
+ * nodes in ANY of the given spaces; omitted returns everything.
5484
6100
  */
5485
6101
  get(options?: GetGraphOptions): Promise<KnowledgeGraph>;
5486
6102
  }
@@ -5568,6 +6184,41 @@ interface NodeService {
5568
6184
  detachLabel(id: string, labelId: string): Promise<void>;
5569
6185
  }
5570
6186
 
6187
+ /**
6188
+ * Service for knowledge spaces — the containers nodes live in.
6189
+ *
6190
+ * Every method is keyed by SLUG rather than id: a space's slug is half its
6191
+ * primary key and is immutable, so there is no second identifier. To file a node
6192
+ * into a space, set `space_slug` on the node (see `NodeService`).
6193
+ *
6194
+ * Granting access to a space is NOT done here — it goes through the shared
6195
+ * `auth.shares` API, which routes `knowledge-spaces` to knowledge-service:
6196
+ *
6197
+ * ```ts
6198
+ * await auth.shares.share('knowledge-spaces', 'engineering', { type: 'team', id: 'platform' }, 'read')
6199
+ * ```
6200
+ */
6201
+ interface SpaceService {
6202
+ /** Lists spaces as an async iterator (pages are 0-indexed). */
6203
+ list(options?: ListSpacesOptions): PageIterator<KnowledgeSpace, ListSpacesOptions>;
6204
+ /** Fetches a single page of spaces. */
6205
+ listPage(options?: ListSpacesOptions): Promise<ListResult<KnowledgeSpace>>;
6206
+ /** Gets a single space by slug. */
6207
+ get(slug: string): Promise<KnowledgeSpace>;
6208
+ /** Creates a space. The slug is permanent. */
6209
+ create(request: CreateSpaceRequest): Promise<KnowledgeSpace>;
6210
+ /** Updates a space's presentation. The slug cannot be changed. */
6211
+ update(slug: string, request: UpdateSpaceRequest): Promise<KnowledgeSpace>;
6212
+ /**
6213
+ * Deletes a space and its access grants.
6214
+ *
6215
+ * Refused with 409 `knowledge_space_not_empty` while any node still lives in
6216
+ * it — deleting a space never deletes the knowledge inside it, and never
6217
+ * silently makes it org-visible by unfiling it. Move or delete the nodes first.
6218
+ */
6219
+ delete(slug: string): Promise<void>;
6220
+ }
6221
+
5571
6222
  /**
5572
6223
  * Service for node→record edges: links from a knowledge node to a business
5573
6224
  * record (data-service, identified by `entity_slug` + `record_id`). Immutable —
@@ -5605,6 +6256,11 @@ declare class KnowledgeClient {
5605
6256
  /** Node→record edges (links to data-service records): `knowledge.recordLinks`. */
5606
6257
  readonly recordLinks: RecordLinkService;
5607
6258
  readonly labels: LabelService;
6259
+ /**
6260
+ * Knowledge spaces — the containers nodes live in: `knowledge.spaces`.
6261
+ * Access to a space is granted through `auth.shares`, not here.
6262
+ */
6263
+ readonly spaces: SpaceService;
5608
6264
  /** Whole-org graph bulk read (radiant graph view): `knowledge.graph.get()`. */
5609
6265
  readonly graph: GraphService;
5610
6266
  constructor(client: ProteosClient);
@@ -6088,7 +6744,14 @@ interface CronTriggerParams {
6088
6744
  cron_expression: string;
6089
6745
  timezone: string;
6090
6746
  }
6091
- type ManualTriggerParams = Record<string, never>;
6747
+ /**
6748
+ * Manual trigger configuration. `input_schema` declares the typed inputs a
6749
+ * manual run may provide (validated on run; they become the trigger item,
6750
+ * addressable as `{{ $json.<name> }}`). Empty = the run takes no inputs.
6751
+ */
6752
+ interface ManualTriggerParams {
6753
+ input_schema?: Attribute[];
6754
+ }
6092
6755
  interface WebhookTriggerParams {
6093
6756
  token: string;
6094
6757
  }
@@ -6191,6 +6854,8 @@ interface UpdateWorkflowRequest {
6191
6854
  */
6192
6855
  interface RunWorkflowRequest {
6193
6856
  destination_node_id?: string;
6857
+ /** Values for the manual trigger's `input_schema`; seed the trigger item. */
6858
+ inputs?: Record<string, unknown>;
6194
6859
  }
6195
6860
  /** Where a standalone node test's input comes from. */
6196
6861
  type TestNodeInputSource = 'last_execution' | 'pinned';
@@ -6282,6 +6947,7 @@ interface ExecutionTriggerContext {
6282
6947
  kind: TriggerKind;
6283
6948
  scheduled_at?: string;
6284
6949
  actor?: UserRef$2;
6950
+ destination_node_id?: string;
6285
6951
  received_at?: string;
6286
6952
  topic?: string;
6287
6953
  event_type?: string;
@@ -6345,10 +7011,17 @@ interface ListExecutionsOptions extends ListOptions {
6345
7011
  workflow_key?: string;
6346
7012
  status?: ExecutionStatus;
6347
7013
  }
6348
- /** Execution detail: the header row plus its append-only node executions. */
7014
+ /**
7015
+ * Execution detail: the header row plus its append-only node executions.
7016
+ * `nodes_total` is the number of nodes the pinned graph schedules for THIS run
7017
+ * (reachable from the trigger, scoped to the destination path on a partial run;
7018
+ * dead-branch and disabled nodes end as `skipped` rows) — the progress
7019
+ * denominator.
7020
+ */
6349
7021
  interface GetExecutionDetailResponse {
6350
7022
  execution: WorkflowExecution;
6351
7023
  node_executions: NodeExecution[];
7024
+ nodes_total: number;
6352
7025
  }
6353
7026
  /** Windows into one node run's stored items on one port. */
6354
7027
  interface GetNodeExecutionItemsOptions {
@@ -6489,4 +7162,4 @@ declare class WorkflowClient {
6489
7162
  constructor(client: ProteosClient);
6490
7163
  }
6491
7164
 
6492
- 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 };
7165
+ 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 };