@uniformdev/mesh-sdk 20.50.2-alpha.2 → 20.50.2-alpha.77

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -5,6 +5,275 @@ import { ProjectMapNode } from '@uniformdev/project-map';
5
5
  import { AssetDefinitionType } from '@uniformdev/assets';
6
6
  import { Emitter } from 'mitt';
7
7
 
8
+ /** @deprecated This beta identity delegation API may change with breaking changes. */
9
+ interface DelegationTokenClientOptions {
10
+ /** Uniform API host (e.g. 'https://uniform.app'). */
11
+ apiHost: string;
12
+ /** UUID of the integration definition. */
13
+ integrationId: string;
14
+ /** Plaintext app secret for this integration. */
15
+ integrationSecret: string;
16
+ }
17
+ /** @deprecated This beta identity delegation API may change with breaking changes. */
18
+ interface DelegationTokenResponse {
19
+ /** Bearer access token that can be used to call Uniform APIs on behalf of the user. */
20
+ accessToken: string;
21
+ /** Refresh token for obtaining a new access token when the current one expires. Absent when the session was minted with `allowRefresh: false`. */
22
+ refreshToken?: string;
23
+ /** Always 'Bearer'. */
24
+ tokenType: 'Bearer';
25
+ /** Token lifetime in seconds. */
26
+ expiresIn: number;
27
+ }
28
+ /**
29
+ * Stable, low-detail kinds of token-exchange failures. Callers branch on these
30
+ * instead of parsing arbitrary upstream message text, and integrators surface a
31
+ * sanitised public message rather than whatever the server happened to return.
32
+ */
33
+ type DelegationTokenErrorKind = 'bad_request' | 'unauthenticated' | 'forbidden' | 'not_found' | 'rate_limited' | 'server_error' | 'unknown';
34
+ /** @deprecated This beta identity delegation API may change with breaking changes. */
35
+ declare class DelegationTokenError extends Error {
36
+ readonly status: number;
37
+ readonly kind: DelegationTokenErrorKind;
38
+ constructor(status: number, kind: DelegationTokenErrorKind, publicMessage: string);
39
+ }
40
+ /**
41
+ * Server-side client for the Uniform token exchange endpoint.
42
+ * Use this in your integration's backend to exchange a session token (obtained from the
43
+ * Mesh SDK iframe context) for a delegation token, or to refresh an existing delegation token.
44
+ *
45
+ * @deprecated This beta identity delegation API may change with breaking changes.
46
+ */
47
+ declare class DelegationTokenClient {
48
+ #private;
49
+ constructor(options: DelegationTokenClientOptions);
50
+ /**
51
+ * Exchanges a short-lived session token for a delegation token and refresh token.
52
+ * The session token is obtained by the integration's frontend via `sdk.getSessionToken()`.
53
+ *
54
+ * @deprecated This beta identity delegation API may change with breaking changes.
55
+ */
56
+ exchangeSessionToken(sessionToken: string): Promise<DelegationTokenResponse>;
57
+ /**
58
+ * Exchanges a refresh token for a new delegation token and a new refresh token.
59
+ *
60
+ * Replay posture: refresh tokens are bearer credentials that are valid until
61
+ * their server-side expiry. They are NOT single-use — a captured refresh token can be
62
+ * replayed by an attacker that also has the integration secret until it expires.
63
+ * Single-use enforcement (refresh-token storage, family/jti tracking, replay revocation)
64
+ * is tracked in `UNI-9279`.
65
+ *
66
+ * @deprecated This beta identity delegation API may change with breaking changes.
67
+ */
68
+ refreshDelegationToken(refreshToken: string): Promise<DelegationTokenResponse>;
69
+ }
70
+
71
+ interface paths$2 {
72
+ "/api/v1/integration-credentials": {
73
+ parameters: {
74
+ query?: never;
75
+ header?: never;
76
+ path?: never;
77
+ cookie?: never;
78
+ };
79
+ get?: never;
80
+ put?: never;
81
+ /** @description Mints or rotates the credential for an integration definition. Atomic: a successful response invalidates any previously-issued secret of the same kind. The plaintext secret is returned in the response body and must be persisted by the caller — Uniform stores only a hash. Response is `Cache-Control: no-store`. */
82
+ post: {
83
+ parameters: {
84
+ query?: never;
85
+ header?: never;
86
+ path?: never;
87
+ cookie?: never;
88
+ };
89
+ requestBody: {
90
+ content: {
91
+ "application/json": {
92
+ /**
93
+ * Format: uuid
94
+ * @description The team ID that owns the integration
95
+ */
96
+ teamId: string;
97
+ /**
98
+ * Format: uuid
99
+ * @description The integration definition ID to mint or revoke credentials for
100
+ */
101
+ integrationDefinitionId: string;
102
+ /**
103
+ * @description Kind of credential to rotate or revoke. Currently only `app_secret` is supported.
104
+ * @enum {string}
105
+ */
106
+ kind: "app_secret";
107
+ };
108
+ };
109
+ };
110
+ responses: {
111
+ /** @description Credential minted or rotated. Plaintext secret is returned exactly once. */
112
+ 200: {
113
+ headers: {
114
+ [name: string]: unknown;
115
+ };
116
+ content: {
117
+ "application/json": {
118
+ /**
119
+ * @description Kind of credential to rotate or revoke. Currently only `app_secret` is supported.
120
+ * @enum {string}
121
+ */
122
+ kind: "app_secret";
123
+ /** Format: uuid */
124
+ integrationDefinitionId: string;
125
+ /** @description Plaintext app secret. Only returned on this response; cannot be retrieved later. */
126
+ appSecret: string;
127
+ /** @description ISO timestamp when the secret became effective. */
128
+ createdAt: string;
129
+ };
130
+ };
131
+ };
132
+ 400: components$2["responses"]["BadRequestError"];
133
+ 401: components$2["responses"]["UnauthorizedError"];
134
+ 403: components$2["responses"]["ForbiddenError"];
135
+ /** @description Integration definition not found in this team */
136
+ 404: {
137
+ headers: {
138
+ [name: string]: unknown;
139
+ };
140
+ content?: never;
141
+ };
142
+ 429: components$2["responses"]["RateLimitError"];
143
+ 500: components$2["responses"]["InternalServerError"];
144
+ };
145
+ };
146
+ /** @description Revokes the credential for an integration definition. Future grants and refreshes will fail until a new credential is minted. In-flight delegation tokens remain valid until natural expiry. */
147
+ delete: {
148
+ parameters: {
149
+ query?: never;
150
+ header?: never;
151
+ path?: never;
152
+ cookie?: never;
153
+ };
154
+ requestBody: {
155
+ content: {
156
+ "application/json": {
157
+ /**
158
+ * Format: uuid
159
+ * @description The team ID that owns the integration
160
+ */
161
+ teamId: string;
162
+ /**
163
+ * Format: uuid
164
+ * @description The integration definition ID to mint or revoke credentials for
165
+ */
166
+ integrationDefinitionId: string;
167
+ /**
168
+ * @description Kind of credential to rotate or revoke. Currently only `app_secret` is supported.
169
+ * @enum {string}
170
+ */
171
+ kind: "app_secret";
172
+ };
173
+ };
174
+ };
175
+ responses: {
176
+ /** @description Credential revoked */
177
+ 204: {
178
+ headers: {
179
+ [name: string]: unknown;
180
+ };
181
+ content?: never;
182
+ };
183
+ 400: components$2["responses"]["BadRequestError"];
184
+ 401: components$2["responses"]["UnauthorizedError"];
185
+ 403: components$2["responses"]["ForbiddenError"];
186
+ /** @description Integration definition not found in this team, or no credential of the given kind is configured */
187
+ 404: {
188
+ headers: {
189
+ [name: string]: unknown;
190
+ };
191
+ content?: never;
192
+ };
193
+ 429: components$2["responses"]["RateLimitError"];
194
+ 500: components$2["responses"]["InternalServerError"];
195
+ };
196
+ };
197
+ /** @description Handles preflight requests. This endpoint allows CORS. */
198
+ options: {
199
+ parameters: {
200
+ query?: never;
201
+ header?: never;
202
+ path?: never;
203
+ cookie?: never;
204
+ };
205
+ requestBody?: never;
206
+ responses: {
207
+ /** @description ok */
208
+ 204: {
209
+ headers: {
210
+ [name: string]: unknown;
211
+ };
212
+ content?: never;
213
+ };
214
+ };
215
+ };
216
+ head?: never;
217
+ patch?: never;
218
+ trace?: never;
219
+ };
220
+ }
221
+ interface components$2 {
222
+ schemas: {
223
+ Error: {
224
+ /** @description Error message(s) that occurred while processing the request */
225
+ errorMessage?: string[] | string;
226
+ };
227
+ };
228
+ responses: {
229
+ /** @description Request input validation failed */
230
+ BadRequestError: {
231
+ headers: {
232
+ [name: string]: unknown;
233
+ };
234
+ content: {
235
+ "application/json": components$2["schemas"]["Error"];
236
+ };
237
+ };
238
+ /** @description API key or token was not valid */
239
+ UnauthorizedError: {
240
+ headers: {
241
+ [name: string]: unknown;
242
+ };
243
+ content: {
244
+ "application/json": components$2["schemas"]["Error"];
245
+ };
246
+ };
247
+ /** @description Permission was denied */
248
+ ForbiddenError: {
249
+ headers: {
250
+ [name: string]: unknown;
251
+ };
252
+ content: {
253
+ "application/json": components$2["schemas"]["Error"];
254
+ };
255
+ };
256
+ /** @description Too many requests in allowed time period */
257
+ RateLimitError: {
258
+ headers: {
259
+ [name: string]: unknown;
260
+ };
261
+ content?: never;
262
+ };
263
+ /** @description Execution error occurred */
264
+ InternalServerError: {
265
+ headers: {
266
+ [name: string]: unknown;
267
+ };
268
+ content?: never;
269
+ };
270
+ };
271
+ parameters: never;
272
+ requestBodies: never;
273
+ headers: never;
274
+ pathItems: never;
275
+ }
276
+
8
277
  interface paths$1 {
9
278
  "/api/v1/integration-definitions": {
10
279
  parameters: {
@@ -43,6 +312,9 @@ interface paths$1 {
43
312
  category?: "analytics" | "cdn" | "classic" | "commerce" | "content" | "comingSoon" | "data" | "deprecated" | "email" | "framework" | "search" | "starters" | "translation" | "uniform" | "ai" | "unknown";
44
313
  public?: boolean;
45
314
  scopes?: string[];
315
+ identityDelegation?: boolean;
316
+ /** Format: uuid */
317
+ integrationId?: string;
46
318
  baseLocationUrl?: string;
47
319
  locations: {
48
320
  install?: {
@@ -118,6 +390,10 @@ interface paths$1 {
118
390
  name: string;
119
391
  url: string;
120
392
  iconUrl?: string;
393
+ access?: {
394
+ /** @enum {boolean} */
395
+ teamAdminRequired?: true;
396
+ };
121
397
  editorTypes?: ("composition" | "componentPattern" | "compositionDefaults" | "entry" | "entryPattern")[];
122
398
  }[];
123
399
  personalization?: {
@@ -254,18 +530,30 @@ interface paths$1 {
254
530
  name: string;
255
531
  url: string;
256
532
  iconUrl?: string;
533
+ access?: {
534
+ /** @enum {boolean} */
535
+ teamAdminRequired?: true;
536
+ };
257
537
  }[];
258
538
  projectTools?: {
259
539
  id: string;
260
540
  name: string;
261
541
  url: string;
262
542
  iconUrl?: string;
543
+ access?: {
544
+ /** @enum {boolean} */
545
+ teamAdminRequired?: true;
546
+ };
263
547
  }[];
264
548
  dashboardTools?: {
265
549
  id: string;
266
550
  name: string;
267
551
  url: string;
268
552
  iconUrl?: string;
553
+ access?: {
554
+ /** @enum {boolean} */
555
+ teamAdminRequired?: true;
556
+ };
269
557
  }[];
270
558
  };
271
559
  unstable_prompts?: {
@@ -297,7 +585,7 @@ interface paths$1 {
297
585
  500: components$1["responses"]["InternalServerError"];
298
586
  };
299
587
  };
300
- /** @description Creates or updates a Mesh app definition on a team */
588
+ /** @description Creates or updates a Mesh app definition on a team. */
301
589
  put: {
302
590
  parameters: {
303
591
  query?: never;
@@ -321,6 +609,7 @@ interface paths$1 {
321
609
  /** @enum {string} */
322
610
  category?: "analytics" | "cdn" | "classic" | "commerce" | "content" | "comingSoon" | "data" | "deprecated" | "email" | "framework" | "search" | "starters" | "translation" | "uniform" | "ai" | "unknown";
323
611
  scopes?: string[];
612
+ identityDelegation?: boolean;
324
613
  baseLocationUrl?: string;
325
614
  locations: {
326
615
  install?: {
@@ -396,6 +685,10 @@ interface paths$1 {
396
685
  name: string;
397
686
  url: string;
398
687
  iconUrl?: string;
688
+ access?: {
689
+ /** @enum {boolean} */
690
+ teamAdminRequired?: true;
691
+ };
399
692
  editorTypes?: ("composition" | "componentPattern" | "compositionDefaults" | "entry" | "entryPattern")[];
400
693
  }[];
401
694
  personalization?: {
@@ -532,18 +825,30 @@ interface paths$1 {
532
825
  name: string;
533
826
  url: string;
534
827
  iconUrl?: string;
828
+ access?: {
829
+ /** @enum {boolean} */
830
+ teamAdminRequired?: true;
831
+ };
535
832
  }[];
536
833
  projectTools?: {
537
834
  id: string;
538
835
  name: string;
539
836
  url: string;
540
837
  iconUrl?: string;
838
+ access?: {
839
+ /** @enum {boolean} */
840
+ teamAdminRequired?: true;
841
+ };
541
842
  }[];
542
843
  dashboardTools?: {
543
844
  id: string;
544
845
  name: string;
545
846
  url: string;
546
847
  iconUrl?: string;
848
+ access?: {
849
+ /** @enum {boolean} */
850
+ teamAdminRequired?: true;
851
+ };
547
852
  }[];
548
853
  };
549
854
  unstable_prompts?: {
@@ -584,6 +889,12 @@ interface paths$1 {
584
889
  category?: "analytics" | "cdn" | "classic" | "commerce" | "content" | "comingSoon" | "data" | "deprecated" | "email" | "framework" | "search" | "starters" | "translation" | "uniform" | "ai" | "unknown";
585
890
  public?: boolean;
586
891
  scopes?: string[];
892
+ identityDelegation?: boolean;
893
+ /**
894
+ * Format: uuid
895
+ * @description Stable id for this integration definition. Required for identity delegation token exchange.
896
+ */
897
+ integrationId: string;
587
898
  baseLocationUrl?: string;
588
899
  locations: {
589
900
  install?: {
@@ -659,6 +970,10 @@ interface paths$1 {
659
970
  name: string;
660
971
  url: string;
661
972
  iconUrl?: string;
973
+ access?: {
974
+ /** @enum {boolean} */
975
+ teamAdminRequired?: true;
976
+ };
662
977
  editorTypes?: ("composition" | "componentPattern" | "compositionDefaults" | "entry" | "entryPattern")[];
663
978
  }[];
664
979
  personalization?: {
@@ -795,18 +1110,30 @@ interface paths$1 {
795
1110
  name: string;
796
1111
  url: string;
797
1112
  iconUrl?: string;
1113
+ access?: {
1114
+ /** @enum {boolean} */
1115
+ teamAdminRequired?: true;
1116
+ };
798
1117
  }[];
799
1118
  projectTools?: {
800
1119
  id: string;
801
1120
  name: string;
802
1121
  url: string;
803
1122
  iconUrl?: string;
1123
+ access?: {
1124
+ /** @enum {boolean} */
1125
+ teamAdminRequired?: true;
1126
+ };
804
1127
  }[];
805
1128
  dashboardTools?: {
806
1129
  id: string;
807
1130
  name: string;
808
1131
  url: string;
809
1132
  iconUrl?: string;
1133
+ access?: {
1134
+ /** @enum {boolean} */
1135
+ teamAdminRequired?: true;
1136
+ };
810
1137
  }[];
811
1138
  };
812
1139
  unstable_prompts?: {
@@ -1173,6 +1500,7 @@ interface components {
1173
1500
 
1174
1501
  type IntegrationDefinitionsApi = paths$1['/api/v1/integration-definitions'];
1175
1502
  type IntegrationInstallationsApi = paths['/api/v1/integration-installations'];
1503
+ type IntegrationCredentialsApi = paths$2['/api/v1/integration-credentials'];
1176
1504
  /** Query parameter options for GET /api/v1/integration-definitions */
1177
1505
  type IntegrationDefinitionGetParameters = IntegrationDefinitionsApi['get']['parameters']['query'];
1178
1506
  /** The GET response from /api/v1/integration-definitions */
@@ -1183,6 +1511,12 @@ type IntegrationDefinitionPutParameters = IntegrationDefinitionsApi['put']['requ
1183
1511
  type IntegrationDefinitionPutResponse = IntegrationDefinitionsApi['put']['responses']['200']['content']['application/json'];
1184
1512
  /** The DELETE body for /api/v1/integration-definitions */
1185
1513
  type IntegrationDefinitionDeleteParameters = IntegrationDefinitionsApi['delete']['requestBody']['content']['application/json'];
1514
+ /** The POST body for /api/v1/integration-credentials (rotate or mint) */
1515
+ type IntegrationCredentialRotateParameters = IntegrationCredentialsApi['post']['requestBody']['content']['application/json'];
1516
+ /** The POST response for /api/v1/integration-credentials (returns the plaintext secret once) */
1517
+ type IntegrationCredentialRotateResponse = IntegrationCredentialsApi['post']['responses']['200']['content']['application/json'];
1518
+ /** The DELETE body for /api/v1/integration-credentials (revoke) */
1519
+ type IntegrationCredentialRevokeParameters = IntegrationCredentialsApi['delete']['requestBody']['content']['application/json'];
1186
1520
  /** Query parameter options for GET /api/v1/integration-installations */
1187
1521
  type IntegrationInstallationGetParameters = IntegrationInstallationsApi['get']['parameters']['query'];
1188
1522
  /** The GET response from /api/v1/integration-installations */
@@ -1195,13 +1529,13 @@ type IntegrationInstallationDeleteParameters = IntegrationInstallationsApi['dele
1195
1529
  type DefClientOptions = Omit<ClientOptions, 'apiKey' | 'projectId'> & {
1196
1530
  teamId: string;
1197
1531
  };
1198
- /** API Client to manage the registration of custom Mesh applications */
1532
+ /** API Client to manage the registration of custom Mesh applications and their identity-delegation credentials. */
1199
1533
  declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
1200
1534
  #private;
1201
1535
  constructor(options: DefClientOptions);
1202
1536
  /** Fetches all mesh apps for a team (and optionally also those shared across teams) */
1203
1537
  get(options?: Omit<IntegrationDefinitionGetParameters, 'teamId'>): Promise<IntegrationDefinitionGetResponse>;
1204
- /** Creates or updates a mesh app definition on a team */
1538
+ /** Creates or updates a mesh app definition on a team. Identity-delegation credentials must be minted separately via {@link rotateCredential}. */
1205
1539
  upsert(body: Omit<IntegrationDefinitionPutParameters, 'teamId'>): Promise<{
1206
1540
  type: string;
1207
1541
  displayName: string;
@@ -1210,6 +1544,8 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
1210
1544
  category?: "analytics" | "cdn" | "classic" | "commerce" | "content" | "comingSoon" | "data" | "deprecated" | "email" | "framework" | "search" | "starters" | "translation" | "uniform" | "ai" | "unknown";
1211
1545
  public?: boolean;
1212
1546
  scopes?: string[];
1547
+ identityDelegation?: boolean;
1548
+ integrationId: string;
1213
1549
  baseLocationUrl?: string;
1214
1550
  locations: {
1215
1551
  install?: {
@@ -1278,6 +1614,9 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
1278
1614
  name: string;
1279
1615
  url: string;
1280
1616
  iconUrl?: string;
1617
+ access?: {
1618
+ teamAdminRequired?: true;
1619
+ };
1281
1620
  editorTypes?: ("composition" | "componentPattern" | "compositionDefaults" | "entry" | "entryPattern")[];
1282
1621
  }[];
1283
1622
  personalization?: {
@@ -1405,18 +1744,27 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
1405
1744
  name: string;
1406
1745
  url: string;
1407
1746
  iconUrl?: string;
1747
+ access?: {
1748
+ teamAdminRequired?: true;
1749
+ };
1408
1750
  }[];
1409
1751
  projectTools?: {
1410
1752
  id: string;
1411
1753
  name: string;
1412
1754
  url: string;
1413
1755
  iconUrl?: string;
1756
+ access?: {
1757
+ teamAdminRequired?: true;
1758
+ };
1414
1759
  }[];
1415
1760
  dashboardTools?: {
1416
1761
  id: string;
1417
1762
  name: string;
1418
1763
  url: string;
1419
1764
  iconUrl?: string;
1765
+ access?: {
1766
+ teamAdminRequired?: true;
1767
+ };
1420
1768
  }[];
1421
1769
  };
1422
1770
  unstable_prompts?: {
@@ -1439,6 +1787,19 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
1439
1787
  }>;
1440
1788
  /** Deletes a mesh app from a team */
1441
1789
  remove(body: Omit<IntegrationDefinitionDeleteParameters, 'teamId'>): Promise<void>;
1790
+ /**
1791
+ * Mints or rotates an identity-delegation credential for an integration definition. The plaintext
1792
+ * `appSecret` is returned exactly once and is not retrievable afterwards — Uniform stores only
1793
+ * the hash. A successful response invalidates any previously-issued secret of the same kind.
1794
+ * Caller must be a team admin.
1795
+ */
1796
+ rotateCredential(body: Omit<IntegrationCredentialRotateParameters, 'teamId'>): Promise<IntegrationCredentialRotateResponse>;
1797
+ /**
1798
+ * Revokes an identity-delegation credential. Future delegation grants and refreshes will fail
1799
+ * until a new credential is minted; in-flight delegation tokens remain valid until natural
1800
+ * expiry (up to ~15 minutes). Caller must be a team admin.
1801
+ */
1802
+ revokeCredential(body: Omit<IntegrationCredentialRevokeParameters, 'teamId'>): Promise<void>;
1442
1803
  }
1443
1804
 
1444
1805
  /** API Client to manage the registration of custom Mesh applications */
@@ -1796,7 +2157,36 @@ type UniformUser = {
1796
2157
  isAdmin: boolean;
1797
2158
  };
1798
2159
 
1799
- type MeshSDKEventInterface = Awaited<ReturnType<typeof connectToParent>>['parent'] & {
2160
+ /**
2161
+ * Methods the parent frame exposes to the Mesh SDK over the iframe bridge (`connectToParent().parent`).
2162
+ * The dashboard implements the same shape when wiring `setupIframeListeners` / mesh location hosts.
2163
+ */
2164
+ interface MeshParentConnection {
2165
+ resize: ({ height }: {
2166
+ height: CSSHeight;
2167
+ }) => Promise<void>;
2168
+ setValue: (value: SetValueMessage) => Promise<void>;
2169
+ openDialog: (message: OpenDialogMessage) => Promise<Pick<DialogResponseData, 'value' | 'dialogId'> | undefined>;
2170
+ closeDialog: (message: CloseDialogMessage) => Promise<void>;
2171
+ getDataResource: <TExpectedResult>(message: GetDataResourceMessage) => Promise<TExpectedResult>;
2172
+ navigate: (message: NavigateMessage) => Promise<void>;
2173
+ reloadLocation: () => Promise<void>;
2174
+ editConnectedData: (message: EditConnectedDataMessage) => Promise<EditConnectedDataResponse>;
2175
+ /**
2176
+ * Returns a short-lived session token for identity delegation, or `undefined` when delegation
2177
+ * is not enabled for this integration.
2178
+ *
2179
+ * @deprecated This beta identity delegation API may change with breaking changes.
2180
+ */
2181
+ getSessionToken: () => Promise<string | undefined>;
2182
+ }
2183
+ type ConnectToParentResult = {
2184
+ initData: MeshContextData;
2185
+ parent: MeshParentConnection;
2186
+ };
2187
+ /** Shape of the handler object the mesh parent iframe must provide (includes `initialize` for the host side). */
2188
+ type MeshSDKEventInterface = MeshParentConnection & {
2189
+ /** Invoked by the child on startup; not part of `connectToParent().parent` but required on the host. */
1800
2190
  initialize: () => Promise<MeshContextData>;
1801
2191
  };
1802
2192
  /**
@@ -1807,21 +2197,7 @@ declare function connectToParent({ dialogResponseHandlers, onMetadataUpdated, on
1807
2197
  dialogResponseHandlers: DialogResponseHandlers;
1808
2198
  onMetadataUpdated: (metadata: unknown) => void;
1809
2199
  onValueExternallyUpdated: (value: unknown) => void;
1810
- }): Promise<{
1811
- initData: MeshContextData;
1812
- parent: {
1813
- resize: ({ height }: {
1814
- height: CSSHeight;
1815
- }) => Promise<void>;
1816
- setValue: (value: SetValueMessage) => Promise<void>;
1817
- openDialog: (message: OpenDialogMessage) => Promise<Pick<DialogResponseData, "value" | "dialogId"> | undefined>;
1818
- closeDialog: (message: CloseDialogMessage) => Promise<void>;
1819
- getDataResource: <TExpectedResult>(message: GetDataResourceMessage) => Promise<TExpectedResult>;
1820
- navigate: (message: NavigateMessage) => Promise<void>;
1821
- reloadLocation: () => Promise<void>;
1822
- editConnectedData: (message: EditConnectedDataMessage) => Promise<EditConnectedDataResponse>;
1823
- };
1824
- }>;
2200
+ }): Promise<ConnectToParentResult>;
1825
2201
 
1826
2202
  type SetLocationFunction<TSetValue> = (value: TSetValue, options?: SetValueOptions) => Promise<void> | void;
1827
2203
  /** Core shared generic for a mesh location context */
@@ -1953,6 +2329,12 @@ type MeshLocationUserPermissions =
1953
2329
  | 'COMPOSITIONS_WRITE'
1954
2330
  /** Uniform Canvas:Compositions:Delete */
1955
2331
  | 'COMPOSITIONS_DELETE'
2332
+ /** Uniform Canvas:Labels:Create */
2333
+ | 'LABELS_CREATE'
2334
+ /** Uniform Canvas:Labels:Update */
2335
+ | 'LABELS_UPDATE'
2336
+ /** Uniform Canvas:Labels:Delete */
2337
+ | 'LABELS_DELETE'
1956
2338
  /** Uniform Canvas:Compositions:Read Published */
1957
2339
  | 'COMPOSITIONS_READ'
1958
2340
  /** Uniform Canvas:Compositions:Publish */
@@ -2195,6 +2577,16 @@ interface UniformMeshSDK {
2195
2577
  }>['setValue']>[0]> | undefined>;
2196
2578
  /** Explicitly close a location dialog. Called when rendering current location in the dialog. */
2197
2579
  closeCurrentLocationDialog(): Promise<void>;
2580
+ /**
2581
+ * Requests a fresh short-lived session token for identity delegation.
2582
+ * Returns `undefined` when the integration does not have `identityDelegation` enabled.
2583
+ * Call this on demand — the token has a very short TTL (~10 s) and should be
2584
+ * consumed immediately by your backend to exchange for a delegation token
2585
+ * via `POST /api/v1/token` with `grant_type=delegation_token` or DelegationTokenClient.
2586
+ *
2587
+ * @deprecated This beta identity delegation API may change with breaking changes.
2588
+ */
2589
+ getSessionToken(): Promise<string | undefined>;
2198
2590
  }
2199
2591
  declare global {
2200
2592
  interface Window {
@@ -2215,4 +2607,4 @@ declare const hasPermissions: (permissions: MeshLocationUserPermissions | MeshLo
2215
2607
  */
2216
2608
  declare const hasRole: (role: string, user: UniformUser) => boolean;
2217
2609
 
2218
- export { type AIGenerateLocation, type AIGenerateLocationMetadata, type AIPromptMetadataLocation, type AssetLibraryLocation, type AssetLibraryLocationMetadata, type AssetParameterLocation, type AssetParameterLocationMetadata, type BindableTypes, type CSSHeight, type CanvasEditorEntityType, type CanvasEditorToolsData, type CanvasEditorToolsLocation, type CanvasEditorToolsLocationMetadata, type CloseDialogMessage, type CloseLocationDialogOptions, type CommonMetadata, type DashboardToolLocation, type DashboardToolLocationMetadata, type DataConnectorInfo, type DataResourceLocation, type DataResourceLocationMetadata, type DataSourceLocation, type DataSourceLocationMetadata, type DataSourceLocationValue, type DataTypeLocation, type DataTypeLocationMetadata, type DataTypeLocationValue, type DialogContext, type DialogOptions, type DialogParamValue, type DialogParams, type DialogResponseData, type DialogResponseHandler, type DialogResponseHandlers, type DialogType, type DynamicInput, type DynamicInputs, type EditConnectedDataMessage, type EditConnectedDataResponse, type EditConnectedDataResponseCancellationContext, type EmbeddedEditorLocation, type EmbeddedEditorLocationMetadata, type EmbeddedEditorLocationSetValue, type EmbeddedEditorLocationValue, type FunctionCallResponse, type FunctionCallSystemParameter, type GetDataResourceLocation, type GetDataResourceMessage, IntegrationDefinitionClient, type IntegrationDefinitionDeleteParameters, type IntegrationDefinitionGetParameters, type IntegrationDefinitionGetResponse, type IntegrationDefinitionPutParameters, type IntegrationDefinitionPutResponse, IntegrationInstallationClient, type IntegrationInstallationDeleteParameters, type IntegrationInstallationGetParameters, type IntegrationInstallationGetResponse, type IntegrationInstallationPutParameters, type LocationDialogResponse, type MeshContextData, type MeshLocation, type MeshLocationCore, type MeshLocationTypes, type MeshLocationUserPermissions, type MeshRouter, type MeshSDKEventInterface, type NavigateMessage, type OpenConfirmationDialogOptions, type OpenConfirmationDialogResult, type OpenDialogMessage, type OpenDialogResult, type OpenLocationDialogOptions, type ParamTypeConfigLocation, type ParamTypeConfigLocationMetadata, type ParamTypeLocation, type ParamTypeLocationMetadata, type PersonalizationCriteriaLocation, type PersonalizationCriteriaLocationMetadata, type ProjectToolLocation, type ProjectToolLocationMetadata, type PromptSettingsLocationMetadata, type SdkWindow, type SetLocationFunction, type SetValueMessage, type SetValueOptions, type SettingsLocation, type SettingsLocationMetadata, type UniformMeshSDK, type UniformMeshSDKEvents, type UniformUser, type ValidationResult, functionCallSystemParameters, hasPermissions, hasRole, initializeUniformMeshSDK, parseFunctionCall };
2610
+ export { type AIGenerateLocation, type AIGenerateLocationMetadata, type AIPromptMetadataLocation, type AssetLibraryLocation, type AssetLibraryLocationMetadata, type AssetParameterLocation, type AssetParameterLocationMetadata, type BindableTypes, type CSSHeight, type CanvasEditorEntityType, type CanvasEditorToolsData, type CanvasEditorToolsLocation, type CanvasEditorToolsLocationMetadata, type CloseDialogMessage, type CloseLocationDialogOptions, type CommonMetadata, type ConnectToParentResult, type DashboardToolLocation, type DashboardToolLocationMetadata, type DataConnectorInfo, type DataResourceLocation, type DataResourceLocationMetadata, type DataSourceLocation, type DataSourceLocationMetadata, type DataSourceLocationValue, type DataTypeLocation, type DataTypeLocationMetadata, type DataTypeLocationValue, DelegationTokenClient, type DelegationTokenClientOptions, DelegationTokenError, type DelegationTokenErrorKind, type DelegationTokenResponse, type DialogContext, type DialogOptions, type DialogParamValue, type DialogParams, type DialogResponseData, type DialogResponseHandler, type DialogResponseHandlers, type DialogType, type DynamicInput, type DynamicInputs, type EditConnectedDataMessage, type EditConnectedDataResponse, type EditConnectedDataResponseCancellationContext, type EmbeddedEditorLocation, type EmbeddedEditorLocationMetadata, type EmbeddedEditorLocationSetValue, type EmbeddedEditorLocationValue, type FunctionCallResponse, type FunctionCallSystemParameter, type GetDataResourceLocation, type GetDataResourceMessage, type IntegrationCredentialRevokeParameters, type IntegrationCredentialRotateParameters, type IntegrationCredentialRotateResponse, IntegrationDefinitionClient, type IntegrationDefinitionDeleteParameters, type IntegrationDefinitionGetParameters, type IntegrationDefinitionGetResponse, type IntegrationDefinitionPutParameters, type IntegrationDefinitionPutResponse, IntegrationInstallationClient, type IntegrationInstallationDeleteParameters, type IntegrationInstallationGetParameters, type IntegrationInstallationGetResponse, type IntegrationInstallationPutParameters, type LocationDialogResponse, type MeshContextData, type MeshLocation, type MeshLocationCore, type MeshLocationTypes, type MeshLocationUserPermissions, type MeshParentConnection, type MeshRouter, type MeshSDKEventInterface, type NavigateMessage, type OpenConfirmationDialogOptions, type OpenConfirmationDialogResult, type OpenDialogMessage, type OpenDialogResult, type OpenLocationDialogOptions, type ParamTypeConfigLocation, type ParamTypeConfigLocationMetadata, type ParamTypeLocation, type ParamTypeLocationMetadata, type PersonalizationCriteriaLocation, type PersonalizationCriteriaLocationMetadata, type ProjectToolLocation, type ProjectToolLocationMetadata, type PromptSettingsLocationMetadata, type SdkWindow, type SetLocationFunction, type SetValueMessage, type SetValueOptions, type SettingsLocation, type SettingsLocationMetadata, type UniformMeshSDK, type UniformMeshSDKEvents, type UniformUser, type ValidationResult, functionCallSystemParameters, hasPermissions, hasRole, initializeUniformMeshSDK, parseFunctionCall };