@uniformdev/mesh-sdk 20.50.2-alpha.1 → 20.50.2-alpha.109
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 +823 -46
- package/dist/index.d.ts +823 -46
- package/dist/index.esm.js +297 -50
- package/dist/index.js +299 -50
- package/dist/index.mjs +297 -50
- package/package.json +8 -8
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,279 @@
|
|
|
1
1
|
import { ApiClient, ClientOptions, ExceptProject } from '@uniformdev/context/api';
|
|
2
|
-
import { AssetParamValue, DataType, DataSource, DataSourceVariantsKeys,
|
|
2
|
+
import { AssetParamValue, DataType, DataSource, DataResourceVariables, DataSourceVariantsKeys, ComponentDefinition, RootComponentInstance, ComponentInstance, ComponentDefinitionParameter, DataVariableDefinition, Locale, EntryData, ComponentParameter, VisibilityCriteriaGroup } from '@uniformdev/canvas';
|
|
3
3
|
export { AssetParamValue, AssetParamValueItem } from '@uniformdev/canvas';
|
|
4
4
|
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: {
|
|
@@ -17,8 +286,11 @@ interface paths$1 {
|
|
|
17
286
|
get: {
|
|
18
287
|
parameters: {
|
|
19
288
|
query: {
|
|
289
|
+
/** @description The team ID */
|
|
20
290
|
teamId: string;
|
|
291
|
+
/** @description Whether to include Mesh apps that are shared publicly to all teams, or only custom apps registered on this team. */
|
|
21
292
|
includePublic?: boolean | null;
|
|
293
|
+
/** @description Whether to use team-specific integration types or team-agnostic types (for serialization across projects) */
|
|
22
294
|
teamSpecificType?: boolean | null;
|
|
23
295
|
};
|
|
24
296
|
header?: never;
|
|
@@ -43,6 +315,9 @@ interface paths$1 {
|
|
|
43
315
|
category?: "analytics" | "cdn" | "classic" | "commerce" | "content" | "comingSoon" | "data" | "deprecated" | "email" | "framework" | "search" | "starters" | "translation" | "uniform" | "ai" | "unknown";
|
|
44
316
|
public?: boolean;
|
|
45
317
|
scopes?: string[];
|
|
318
|
+
identityDelegation?: boolean;
|
|
319
|
+
/** Format: uuid */
|
|
320
|
+
integrationId?: string;
|
|
46
321
|
baseLocationUrl?: string;
|
|
47
322
|
locations: {
|
|
48
323
|
install?: {
|
|
@@ -118,6 +393,10 @@ interface paths$1 {
|
|
|
118
393
|
name: string;
|
|
119
394
|
url: string;
|
|
120
395
|
iconUrl?: string;
|
|
396
|
+
access?: {
|
|
397
|
+
/** @enum {boolean} */
|
|
398
|
+
teamAdminRequired?: true;
|
|
399
|
+
};
|
|
121
400
|
editorTypes?: ("composition" | "componentPattern" | "compositionDefaults" | "entry" | "entryPattern")[];
|
|
122
401
|
}[];
|
|
123
402
|
personalization?: {
|
|
@@ -174,6 +453,18 @@ interface paths$1 {
|
|
|
174
453
|
};
|
|
175
454
|
};
|
|
176
455
|
embeddedEditor?: string;
|
|
456
|
+
dataResourceSelectorUrl?: string;
|
|
457
|
+
dataResourceSelectorLocations?: {
|
|
458
|
+
[key: string]: {
|
|
459
|
+
url: string;
|
|
460
|
+
layout?: {
|
|
461
|
+
/** @enum {string} */
|
|
462
|
+
height?: "full-height";
|
|
463
|
+
/** @enum {string} */
|
|
464
|
+
width?: "wide";
|
|
465
|
+
};
|
|
466
|
+
};
|
|
467
|
+
};
|
|
177
468
|
};
|
|
178
469
|
};
|
|
179
470
|
badgeIconUrl?: string;
|
|
@@ -210,7 +501,6 @@ interface paths$1 {
|
|
|
210
501
|
generateUrl: string;
|
|
211
502
|
metadataUrl?: string;
|
|
212
503
|
prompts?: {
|
|
213
|
-
/** Format: uuid */
|
|
214
504
|
id: string;
|
|
215
505
|
name: string;
|
|
216
506
|
text: string;
|
|
@@ -254,22 +544,33 @@ interface paths$1 {
|
|
|
254
544
|
name: string;
|
|
255
545
|
url: string;
|
|
256
546
|
iconUrl?: string;
|
|
547
|
+
access?: {
|
|
548
|
+
/** @enum {boolean} */
|
|
549
|
+
teamAdminRequired?: true;
|
|
550
|
+
};
|
|
257
551
|
}[];
|
|
258
552
|
projectTools?: {
|
|
259
553
|
id: string;
|
|
260
554
|
name: string;
|
|
261
555
|
url: string;
|
|
262
556
|
iconUrl?: string;
|
|
557
|
+
access?: {
|
|
558
|
+
/** @enum {boolean} */
|
|
559
|
+
teamAdminRequired?: true;
|
|
560
|
+
};
|
|
263
561
|
}[];
|
|
264
562
|
dashboardTools?: {
|
|
265
563
|
id: string;
|
|
266
564
|
name: string;
|
|
267
565
|
url: string;
|
|
268
566
|
iconUrl?: string;
|
|
567
|
+
access?: {
|
|
568
|
+
/** @enum {boolean} */
|
|
569
|
+
teamAdminRequired?: true;
|
|
570
|
+
};
|
|
269
571
|
}[];
|
|
270
572
|
};
|
|
271
573
|
unstable_prompts?: {
|
|
272
|
-
/** Format: uuid */
|
|
273
574
|
id: string;
|
|
274
575
|
name: string;
|
|
275
576
|
text: string;
|
|
@@ -297,7 +598,7 @@ interface paths$1 {
|
|
|
297
598
|
500: components$1["responses"]["InternalServerError"];
|
|
298
599
|
};
|
|
299
600
|
};
|
|
300
|
-
/** @description Creates or updates a Mesh app definition on a team */
|
|
601
|
+
/** @description Creates or updates a Mesh app definition on a team. */
|
|
301
602
|
put: {
|
|
302
603
|
parameters: {
|
|
303
604
|
query?: never;
|
|
@@ -308,10 +609,7 @@ interface paths$1 {
|
|
|
308
609
|
requestBody: {
|
|
309
610
|
content: {
|
|
310
611
|
"application/json": {
|
|
311
|
-
/**
|
|
312
|
-
* Format: uuid
|
|
313
|
-
* @description The team ID
|
|
314
|
-
*/
|
|
612
|
+
/** @description The team ID */
|
|
315
613
|
teamId: string;
|
|
316
614
|
data: {
|
|
317
615
|
type: string;
|
|
@@ -321,6 +619,7 @@ interface paths$1 {
|
|
|
321
619
|
/** @enum {string} */
|
|
322
620
|
category?: "analytics" | "cdn" | "classic" | "commerce" | "content" | "comingSoon" | "data" | "deprecated" | "email" | "framework" | "search" | "starters" | "translation" | "uniform" | "ai" | "unknown";
|
|
323
621
|
scopes?: string[];
|
|
622
|
+
identityDelegation?: boolean;
|
|
324
623
|
baseLocationUrl?: string;
|
|
325
624
|
locations: {
|
|
326
625
|
install?: {
|
|
@@ -396,6 +695,10 @@ interface paths$1 {
|
|
|
396
695
|
name: string;
|
|
397
696
|
url: string;
|
|
398
697
|
iconUrl?: string;
|
|
698
|
+
access?: {
|
|
699
|
+
/** @enum {boolean} */
|
|
700
|
+
teamAdminRequired?: true;
|
|
701
|
+
};
|
|
399
702
|
editorTypes?: ("composition" | "componentPattern" | "compositionDefaults" | "entry" | "entryPattern")[];
|
|
400
703
|
}[];
|
|
401
704
|
personalization?: {
|
|
@@ -452,6 +755,18 @@ interface paths$1 {
|
|
|
452
755
|
};
|
|
453
756
|
};
|
|
454
757
|
embeddedEditor?: string;
|
|
758
|
+
dataResourceSelectorUrl?: string;
|
|
759
|
+
dataResourceSelectorLocations?: {
|
|
760
|
+
[key: string]: {
|
|
761
|
+
url: string;
|
|
762
|
+
layout?: {
|
|
763
|
+
/** @enum {string} */
|
|
764
|
+
height?: "full-height";
|
|
765
|
+
/** @enum {string} */
|
|
766
|
+
width?: "wide";
|
|
767
|
+
};
|
|
768
|
+
};
|
|
769
|
+
};
|
|
455
770
|
};
|
|
456
771
|
};
|
|
457
772
|
badgeIconUrl?: string;
|
|
@@ -488,7 +803,6 @@ interface paths$1 {
|
|
|
488
803
|
generateUrl: string;
|
|
489
804
|
metadataUrl?: string;
|
|
490
805
|
prompts?: {
|
|
491
|
-
/** Format: uuid */
|
|
492
806
|
id: string;
|
|
493
807
|
name: string;
|
|
494
808
|
text: string;
|
|
@@ -532,22 +846,33 @@ interface paths$1 {
|
|
|
532
846
|
name: string;
|
|
533
847
|
url: string;
|
|
534
848
|
iconUrl?: string;
|
|
849
|
+
access?: {
|
|
850
|
+
/** @enum {boolean} */
|
|
851
|
+
teamAdminRequired?: true;
|
|
852
|
+
};
|
|
535
853
|
}[];
|
|
536
854
|
projectTools?: {
|
|
537
855
|
id: string;
|
|
538
856
|
name: string;
|
|
539
857
|
url: string;
|
|
540
858
|
iconUrl?: string;
|
|
859
|
+
access?: {
|
|
860
|
+
/** @enum {boolean} */
|
|
861
|
+
teamAdminRequired?: true;
|
|
862
|
+
};
|
|
541
863
|
}[];
|
|
542
864
|
dashboardTools?: {
|
|
543
865
|
id: string;
|
|
544
866
|
name: string;
|
|
545
867
|
url: string;
|
|
546
868
|
iconUrl?: string;
|
|
869
|
+
access?: {
|
|
870
|
+
/** @enum {boolean} */
|
|
871
|
+
teamAdminRequired?: true;
|
|
872
|
+
};
|
|
547
873
|
}[];
|
|
548
874
|
};
|
|
549
875
|
unstable_prompts?: {
|
|
550
|
-
/** Format: uuid */
|
|
551
876
|
id: string;
|
|
552
877
|
name: string;
|
|
553
878
|
text: string;
|
|
@@ -584,6 +909,12 @@ interface paths$1 {
|
|
|
584
909
|
category?: "analytics" | "cdn" | "classic" | "commerce" | "content" | "comingSoon" | "data" | "deprecated" | "email" | "framework" | "search" | "starters" | "translation" | "uniform" | "ai" | "unknown";
|
|
585
910
|
public?: boolean;
|
|
586
911
|
scopes?: string[];
|
|
912
|
+
identityDelegation?: boolean;
|
|
913
|
+
/**
|
|
914
|
+
* Format: uuid
|
|
915
|
+
* @description Stable id for this integration definition. Required for identity delegation token exchange.
|
|
916
|
+
*/
|
|
917
|
+
integrationId: string;
|
|
587
918
|
baseLocationUrl?: string;
|
|
588
919
|
locations: {
|
|
589
920
|
install?: {
|
|
@@ -659,6 +990,10 @@ interface paths$1 {
|
|
|
659
990
|
name: string;
|
|
660
991
|
url: string;
|
|
661
992
|
iconUrl?: string;
|
|
993
|
+
access?: {
|
|
994
|
+
/** @enum {boolean} */
|
|
995
|
+
teamAdminRequired?: true;
|
|
996
|
+
};
|
|
662
997
|
editorTypes?: ("composition" | "componentPattern" | "compositionDefaults" | "entry" | "entryPattern")[];
|
|
663
998
|
}[];
|
|
664
999
|
personalization?: {
|
|
@@ -715,6 +1050,18 @@ interface paths$1 {
|
|
|
715
1050
|
};
|
|
716
1051
|
};
|
|
717
1052
|
embeddedEditor?: string;
|
|
1053
|
+
dataResourceSelectorUrl?: string;
|
|
1054
|
+
dataResourceSelectorLocations?: {
|
|
1055
|
+
[key: string]: {
|
|
1056
|
+
url: string;
|
|
1057
|
+
layout?: {
|
|
1058
|
+
/** @enum {string} */
|
|
1059
|
+
height?: "full-height";
|
|
1060
|
+
/** @enum {string} */
|
|
1061
|
+
width?: "wide";
|
|
1062
|
+
};
|
|
1063
|
+
};
|
|
1064
|
+
};
|
|
718
1065
|
};
|
|
719
1066
|
};
|
|
720
1067
|
badgeIconUrl?: string;
|
|
@@ -751,7 +1098,6 @@ interface paths$1 {
|
|
|
751
1098
|
generateUrl: string;
|
|
752
1099
|
metadataUrl?: string;
|
|
753
1100
|
prompts?: {
|
|
754
|
-
/** Format: uuid */
|
|
755
1101
|
id: string;
|
|
756
1102
|
name: string;
|
|
757
1103
|
text: string;
|
|
@@ -795,22 +1141,33 @@ interface paths$1 {
|
|
|
795
1141
|
name: string;
|
|
796
1142
|
url: string;
|
|
797
1143
|
iconUrl?: string;
|
|
1144
|
+
access?: {
|
|
1145
|
+
/** @enum {boolean} */
|
|
1146
|
+
teamAdminRequired?: true;
|
|
1147
|
+
};
|
|
798
1148
|
}[];
|
|
799
1149
|
projectTools?: {
|
|
800
1150
|
id: string;
|
|
801
1151
|
name: string;
|
|
802
1152
|
url: string;
|
|
803
1153
|
iconUrl?: string;
|
|
1154
|
+
access?: {
|
|
1155
|
+
/** @enum {boolean} */
|
|
1156
|
+
teamAdminRequired?: true;
|
|
1157
|
+
};
|
|
804
1158
|
}[];
|
|
805
1159
|
dashboardTools?: {
|
|
806
1160
|
id: string;
|
|
807
1161
|
name: string;
|
|
808
1162
|
url: string;
|
|
809
1163
|
iconUrl?: string;
|
|
1164
|
+
access?: {
|
|
1165
|
+
/** @enum {boolean} */
|
|
1166
|
+
teamAdminRequired?: true;
|
|
1167
|
+
};
|
|
810
1168
|
}[];
|
|
811
1169
|
};
|
|
812
1170
|
unstable_prompts?: {
|
|
813
|
-
/** Format: uuid */
|
|
814
1171
|
id: string;
|
|
815
1172
|
name: string;
|
|
816
1173
|
text: string;
|
|
@@ -849,10 +1206,7 @@ interface paths$1 {
|
|
|
849
1206
|
requestBody: {
|
|
850
1207
|
content: {
|
|
851
1208
|
"application/json": {
|
|
852
|
-
/**
|
|
853
|
-
* Format: uuid
|
|
854
|
-
* @description The team ID
|
|
855
|
-
*/
|
|
1209
|
+
/** @description The team ID */
|
|
856
1210
|
teamId: string;
|
|
857
1211
|
/** @description The integration type to remove */
|
|
858
1212
|
type: string;
|
|
@@ -973,9 +1327,13 @@ interface paths {
|
|
|
973
1327
|
get: {
|
|
974
1328
|
parameters: {
|
|
975
1329
|
query: {
|
|
1330
|
+
/** @description The project ID */
|
|
976
1331
|
projectId: string;
|
|
1332
|
+
/** @description Limit results to a single integration type */
|
|
977
1333
|
type?: string;
|
|
1334
|
+
/** @description Whether to match the passed type exactly or to treat the type as a prefix */
|
|
978
1335
|
exactType?: boolean | null;
|
|
1336
|
+
/** @description Whether to use team-specific integration types or team-agnostic types (for serialization across projects) */
|
|
979
1337
|
teamSpecificType?: boolean | null;
|
|
980
1338
|
};
|
|
981
1339
|
header?: never;
|
|
@@ -1018,11 +1376,9 @@ interface paths {
|
|
|
1018
1376
|
requestBody: {
|
|
1019
1377
|
content: {
|
|
1020
1378
|
"application/json": {
|
|
1021
|
-
/**
|
|
1022
|
-
* Format: uuid
|
|
1023
|
-
* @description The project ID
|
|
1024
|
-
*/
|
|
1379
|
+
/** @description The project ID */
|
|
1025
1380
|
projectId: string;
|
|
1381
|
+
/** @description Whether to match the passed type exactly or to treat the type as a prefix */
|
|
1026
1382
|
exactType?: boolean | null;
|
|
1027
1383
|
type: string;
|
|
1028
1384
|
data?: {
|
|
@@ -1058,13 +1414,11 @@ interface paths {
|
|
|
1058
1414
|
requestBody: {
|
|
1059
1415
|
content: {
|
|
1060
1416
|
"application/json": {
|
|
1061
|
-
/**
|
|
1062
|
-
* Format: uuid
|
|
1063
|
-
* @description The project ID
|
|
1064
|
-
*/
|
|
1417
|
+
/** @description The project ID */
|
|
1065
1418
|
projectId: string;
|
|
1066
1419
|
/** @description The integration type to remove */
|
|
1067
1420
|
type: string;
|
|
1421
|
+
/** @description Whether to match the passed type exactly or to treat the type as a prefix */
|
|
1068
1422
|
exactType?: boolean | null;
|
|
1069
1423
|
};
|
|
1070
1424
|
};
|
|
@@ -1173,6 +1527,7 @@ interface components {
|
|
|
1173
1527
|
|
|
1174
1528
|
type IntegrationDefinitionsApi = paths$1['/api/v1/integration-definitions'];
|
|
1175
1529
|
type IntegrationInstallationsApi = paths['/api/v1/integration-installations'];
|
|
1530
|
+
type IntegrationCredentialsApi = paths$2['/api/v1/integration-credentials'];
|
|
1176
1531
|
/** Query parameter options for GET /api/v1/integration-definitions */
|
|
1177
1532
|
type IntegrationDefinitionGetParameters = IntegrationDefinitionsApi['get']['parameters']['query'];
|
|
1178
1533
|
/** The GET response from /api/v1/integration-definitions */
|
|
@@ -1183,6 +1538,12 @@ type IntegrationDefinitionPutParameters = IntegrationDefinitionsApi['put']['requ
|
|
|
1183
1538
|
type IntegrationDefinitionPutResponse = IntegrationDefinitionsApi['put']['responses']['200']['content']['application/json'];
|
|
1184
1539
|
/** The DELETE body for /api/v1/integration-definitions */
|
|
1185
1540
|
type IntegrationDefinitionDeleteParameters = IntegrationDefinitionsApi['delete']['requestBody']['content']['application/json'];
|
|
1541
|
+
/** The POST body for /api/v1/integration-credentials (rotate or mint) */
|
|
1542
|
+
type IntegrationCredentialRotateParameters = IntegrationCredentialsApi['post']['requestBody']['content']['application/json'];
|
|
1543
|
+
/** The POST response for /api/v1/integration-credentials (returns the plaintext secret once) */
|
|
1544
|
+
type IntegrationCredentialRotateResponse = IntegrationCredentialsApi['post']['responses']['200']['content']['application/json'];
|
|
1545
|
+
/** The DELETE body for /api/v1/integration-credentials (revoke) */
|
|
1546
|
+
type IntegrationCredentialRevokeParameters = IntegrationCredentialsApi['delete']['requestBody']['content']['application/json'];
|
|
1186
1547
|
/** Query parameter options for GET /api/v1/integration-installations */
|
|
1187
1548
|
type IntegrationInstallationGetParameters = IntegrationInstallationsApi['get']['parameters']['query'];
|
|
1188
1549
|
/** The GET response from /api/v1/integration-installations */
|
|
@@ -1195,13 +1556,13 @@ type IntegrationInstallationDeleteParameters = IntegrationInstallationsApi['dele
|
|
|
1195
1556
|
type DefClientOptions = Omit<ClientOptions, 'apiKey' | 'projectId'> & {
|
|
1196
1557
|
teamId: string;
|
|
1197
1558
|
};
|
|
1198
|
-
/** API Client to manage the registration of custom Mesh applications */
|
|
1559
|
+
/** API Client to manage the registration of custom Mesh applications and their identity-delegation credentials. */
|
|
1199
1560
|
declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
|
|
1200
1561
|
#private;
|
|
1201
1562
|
constructor(options: DefClientOptions);
|
|
1202
1563
|
/** Fetches all mesh apps for a team (and optionally also those shared across teams) */
|
|
1203
1564
|
get(options?: Omit<IntegrationDefinitionGetParameters, 'teamId'>): Promise<IntegrationDefinitionGetResponse>;
|
|
1204
|
-
/** Creates or updates a mesh app definition on a team */
|
|
1565
|
+
/** Creates or updates a mesh app definition on a team. Identity-delegation credentials must be minted separately via {@link rotateCredential}. */
|
|
1205
1566
|
upsert(body: Omit<IntegrationDefinitionPutParameters, 'teamId'>): Promise<{
|
|
1206
1567
|
type: string;
|
|
1207
1568
|
displayName: string;
|
|
@@ -1210,6 +1571,8 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
|
|
|
1210
1571
|
category?: "analytics" | "cdn" | "classic" | "commerce" | "content" | "comingSoon" | "data" | "deprecated" | "email" | "framework" | "search" | "starters" | "translation" | "uniform" | "ai" | "unknown";
|
|
1211
1572
|
public?: boolean;
|
|
1212
1573
|
scopes?: string[];
|
|
1574
|
+
identityDelegation?: boolean;
|
|
1575
|
+
integrationId: string;
|
|
1213
1576
|
baseLocationUrl?: string;
|
|
1214
1577
|
locations: {
|
|
1215
1578
|
install?: {
|
|
@@ -1278,6 +1641,9 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
|
|
|
1278
1641
|
name: string;
|
|
1279
1642
|
url: string;
|
|
1280
1643
|
iconUrl?: string;
|
|
1644
|
+
access?: {
|
|
1645
|
+
teamAdminRequired?: true;
|
|
1646
|
+
};
|
|
1281
1647
|
editorTypes?: ("composition" | "componentPattern" | "compositionDefaults" | "entry" | "entryPattern")[];
|
|
1282
1648
|
}[];
|
|
1283
1649
|
personalization?: {
|
|
@@ -1328,6 +1694,16 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
|
|
|
1328
1694
|
};
|
|
1329
1695
|
};
|
|
1330
1696
|
embeddedEditor?: string;
|
|
1697
|
+
dataResourceSelectorUrl?: string;
|
|
1698
|
+
dataResourceSelectorLocations?: {
|
|
1699
|
+
[key: string]: {
|
|
1700
|
+
url: string;
|
|
1701
|
+
layout?: {
|
|
1702
|
+
height?: "full-height";
|
|
1703
|
+
width?: "wide";
|
|
1704
|
+
};
|
|
1705
|
+
};
|
|
1706
|
+
};
|
|
1331
1707
|
};
|
|
1332
1708
|
};
|
|
1333
1709
|
badgeIconUrl?: string;
|
|
@@ -1405,18 +1781,27 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
|
|
|
1405
1781
|
name: string;
|
|
1406
1782
|
url: string;
|
|
1407
1783
|
iconUrl?: string;
|
|
1784
|
+
access?: {
|
|
1785
|
+
teamAdminRequired?: true;
|
|
1786
|
+
};
|
|
1408
1787
|
}[];
|
|
1409
1788
|
projectTools?: {
|
|
1410
1789
|
id: string;
|
|
1411
1790
|
name: string;
|
|
1412
1791
|
url: string;
|
|
1413
1792
|
iconUrl?: string;
|
|
1793
|
+
access?: {
|
|
1794
|
+
teamAdminRequired?: true;
|
|
1795
|
+
};
|
|
1414
1796
|
}[];
|
|
1415
1797
|
dashboardTools?: {
|
|
1416
1798
|
id: string;
|
|
1417
1799
|
name: string;
|
|
1418
1800
|
url: string;
|
|
1419
1801
|
iconUrl?: string;
|
|
1802
|
+
access?: {
|
|
1803
|
+
teamAdminRequired?: true;
|
|
1804
|
+
};
|
|
1420
1805
|
}[];
|
|
1421
1806
|
};
|
|
1422
1807
|
unstable_prompts?: {
|
|
@@ -1439,6 +1824,19 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
|
|
|
1439
1824
|
}>;
|
|
1440
1825
|
/** Deletes a mesh app from a team */
|
|
1441
1826
|
remove(body: Omit<IntegrationDefinitionDeleteParameters, 'teamId'>): Promise<void>;
|
|
1827
|
+
/**
|
|
1828
|
+
* Mints or rotates an identity-delegation credential for an integration definition. The plaintext
|
|
1829
|
+
* `appSecret` is returned exactly once and is not retrievable afterwards — Uniform stores only
|
|
1830
|
+
* the hash. A successful response invalidates any previously-issued secret of the same kind.
|
|
1831
|
+
* Caller must be a team admin.
|
|
1832
|
+
*/
|
|
1833
|
+
rotateCredential(body: Omit<IntegrationCredentialRotateParameters, 'teamId'>): Promise<IntegrationCredentialRotateResponse>;
|
|
1834
|
+
/**
|
|
1835
|
+
* Revokes an identity-delegation credential. Future delegation grants and refreshes will fail
|
|
1836
|
+
* until a new credential is minted; in-flight delegation tokens remain valid until natural
|
|
1837
|
+
* expiry (up to ~15 minutes). Caller must be a team admin.
|
|
1838
|
+
*/
|
|
1839
|
+
revokeCredential(body: Omit<IntegrationCredentialRevokeParameters, 'teamId'>): Promise<void>;
|
|
1442
1840
|
}
|
|
1443
1841
|
|
|
1444
1842
|
/** API Client to manage the registration of custom Mesh applications */
|
|
@@ -1542,6 +1940,16 @@ type DataTypeLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetad
|
|
|
1542
1940
|
type DataTypeLocation = MeshLocationCore<DataTypeLocationValue, DataTypeLocationMetadata, DataTypeLocationValue, 'dataType'> & GetDataResourceLocation;
|
|
1543
1941
|
|
|
1544
1942
|
type DataResourceLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<{
|
|
1943
|
+
/**
|
|
1944
|
+
* The release ID of the currently edited entity.
|
|
1945
|
+
* This can be undefined when a release is active but the entity has not been copied to that release yet.
|
|
1946
|
+
*/
|
|
1947
|
+
releaseId?: string;
|
|
1948
|
+
/**
|
|
1949
|
+
* The currently active release ID from editor context.
|
|
1950
|
+
* This reflects release selection regardless of whether the edited entity exists in that release.
|
|
1951
|
+
*/
|
|
1952
|
+
activeReleaseId?: string;
|
|
1545
1953
|
dataType: DataType;
|
|
1546
1954
|
/** The data type's archetype value. */
|
|
1547
1955
|
archetype: string;
|
|
@@ -1558,6 +1966,45 @@ type DataResourceLocationMetadata<TIntegrationConfiguration = unknown> = CommonM
|
|
|
1558
1966
|
}, TIntegrationConfiguration>;
|
|
1559
1967
|
type DataResourceLocation = MeshLocationCore<DataResourceVariables, DataResourceLocationMetadata, DataResourceVariables, 'dataResource'> & GetDataResourceLocation;
|
|
1560
1968
|
|
|
1969
|
+
/**
|
|
1970
|
+
* Metadata for the dataResourceSelector location.
|
|
1971
|
+
* This location type allows custom UI for selecting JSON pointers within a data resource,
|
|
1972
|
+
* replacing the default JSON tree viewer in the dynamic token picker.
|
|
1973
|
+
* @deprecated This is experimental functionality and is subject to change without notice.
|
|
1974
|
+
*/
|
|
1975
|
+
type DataResourceSelectorLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<{
|
|
1976
|
+
/** The resolved data for the currently selected data resource */
|
|
1977
|
+
dataResourceValue: unknown;
|
|
1978
|
+
/** The name of the currently selected data resource */
|
|
1979
|
+
dataResourceName: string;
|
|
1980
|
+
/** The data type ID for the current data resource */
|
|
1981
|
+
dataTypeId: string;
|
|
1982
|
+
/** The data type's archetype value (useful for apps sharing a selector across archetypes) */
|
|
1983
|
+
archetype: string;
|
|
1984
|
+
/** Allowed bindable types for the parameter being connected */
|
|
1985
|
+
allowedTypes: BindableTypes[];
|
|
1986
|
+
/** Component definitions index, keyed by public id. */
|
|
1987
|
+
componentDefinitions: Record<string, ComponentDefinition | undefined>;
|
|
1988
|
+
}, TIntegrationConfiguration>;
|
|
1989
|
+
/**
|
|
1990
|
+
* Location for custom data resource selector UI.
|
|
1991
|
+
* Replaces the default JSON tree viewer when selecting dynamic tokens from a data resource.
|
|
1992
|
+
*
|
|
1993
|
+
* Value: The selected JSON pointer string (e.g., "/moves/0/move/name")
|
|
1994
|
+
* setValue: Call with a valid JSON pointer to select that path
|
|
1995
|
+
* getDataResource: Fetch data from the data connector using the current data source
|
|
1996
|
+
* editorState: Imperative API for inspecting/mutating the underlying composition / entry tree
|
|
1997
|
+
* @deprecated This is experimental functionality and is subject to change without notice.
|
|
1998
|
+
*/
|
|
1999
|
+
type DataResourceSelectorLocation = MeshLocationCore<string, DataResourceSelectorLocationMetadata, string, 'dataResourceSelector'> & GetDataResourceLocation & {
|
|
2000
|
+
/**
|
|
2001
|
+
* Imperative API for interacting with the composition/entry editor state.
|
|
2002
|
+
* Provides non-reactive access to read and modify the editor state.
|
|
2003
|
+
* @deprecated This is experimental functionality and is subject to change without notice.
|
|
2004
|
+
*/
|
|
2005
|
+
editorState: EditorStateApi;
|
|
2006
|
+
};
|
|
2007
|
+
|
|
1561
2008
|
type DataSourceLocationValue = Pick<DataSource, 'baseUrl' | 'custom' | 'customPublic' | 'headers' | 'parameters' | 'variables' | 'enableUnpublishedMode' | 'variants'>;
|
|
1562
2009
|
type DataSourceLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<{
|
|
1563
2010
|
/**
|
|
@@ -1569,6 +2016,7 @@ type DataSourceLocationMetadata<TIntegrationConfiguration = unknown> = CommonMet
|
|
|
1569
2016
|
type DataSourceLocation = MeshLocationCore<DataSourceLocationValue, DataSourceLocationMetadata, DataSourceLocationValue, 'dataSource'>;
|
|
1570
2017
|
|
|
1571
2018
|
type ParamTypeLocationMetadata<TParamConfiguration = unknown, TIntegrationConfiguration = unknown> = CommonMetadata<{
|
|
2019
|
+
/** editorState is an experimental replacement for rootNode. This may become deprecated in the future. */
|
|
1572
2020
|
rootNode: Omit<RootComponentInstance, 'slots' | '_data'> & {
|
|
1573
2021
|
_editionId?: string;
|
|
1574
2022
|
};
|
|
@@ -1597,6 +2045,11 @@ type ParamTypeLocationMetadata<TParamConfiguration = unknown, TIntegrationConfig
|
|
|
1597
2045
|
* Note that setValue() always sets the target language automatically.
|
|
1598
2046
|
*/
|
|
1599
2047
|
targetLocale: string | undefined;
|
|
2048
|
+
/**
|
|
2049
|
+
* The current locale selected in the editor UI.
|
|
2050
|
+
* Unlike targetLocale, this reflects the editor's global locale state.
|
|
2051
|
+
*/
|
|
2052
|
+
currentLocale: string | undefined;
|
|
1600
2053
|
/**
|
|
1601
2054
|
* When editing a conditional value, this is the index in the parent parameter of the conditional value.
|
|
1602
2055
|
* If this is -1, then the editor is not editing a conditional value.
|
|
@@ -1609,6 +2062,12 @@ type ParamTypeLocation<TParamValue = unknown, TParamConfiguration = unknown, TPa
|
|
|
1609
2062
|
* Returns the result of the dialog. Useful to build data-enabled parameter types.
|
|
1610
2063
|
*/
|
|
1611
2064
|
editConnectedData: Awaited<ReturnType<typeof connectToParent>>['parent']['editConnectedData'];
|
|
2065
|
+
/**
|
|
2066
|
+
* Imperative API for interacting with the composition/entry editor state.
|
|
2067
|
+
* Provides non-reactive access to read and modify the editor state.
|
|
2068
|
+
* @deprecated This is experimental functionality and is subject to change without notice.
|
|
2069
|
+
*/
|
|
2070
|
+
editorState: EditorStateApi;
|
|
1612
2071
|
};
|
|
1613
2072
|
|
|
1614
2073
|
type SettingsLocationMetadata = CommonMetadata;
|
|
@@ -1618,7 +2077,7 @@ type SettingsLocation<TSettingsType> = MeshLocationCore<TSettingsType, SettingsL
|
|
|
1618
2077
|
* Defines methods used for interacting with a Mesh location
|
|
1619
2078
|
* To receive useful typings, check the `type` property of the location to narrow the typing.
|
|
1620
2079
|
*/
|
|
1621
|
-
type MeshLocation<TValue = unknown, TSetValue = TValue> = ParamTypeLocation<TValue, unknown, TSetValue> | ParamTypeConfigLocation<TValue> | SettingsLocation<TValue> | AssetLibraryLocation | AssetParameterLocation | DataSourceLocation | DataTypeLocation | DataResourceLocation | CanvasEditorToolsLocation | EmbeddedEditorLocation | AIGenerateLocation<TValue> | AIPromptMetadataLocation | PersonalizationCriteriaLocation<TValue> | DashboardToolLocation<TValue> | ProjectToolLocation<TValue>;
|
|
2080
|
+
type MeshLocation<TValue = unknown, TSetValue = TValue> = ParamTypeLocation<TValue, unknown, TSetValue> | ParamTypeConfigLocation<TValue> | SettingsLocation<TValue> | AssetLibraryLocation | AssetParameterLocation | DataSourceLocation | DataTypeLocation | DataResourceLocation | DataResourceSelectorLocation | CanvasEditorToolsLocation | EmbeddedEditorLocation | AIGenerateLocation<TValue> | AIPromptMetadataLocation | PersonalizationCriteriaLocation<TValue> | DashboardToolLocation<TValue> | ProjectToolLocation<TValue>;
|
|
1622
2081
|
interface MeshContextData {
|
|
1623
2082
|
locationKey: string;
|
|
1624
2083
|
locationType: MeshLocationTypes;
|
|
@@ -1786,7 +2245,41 @@ type UniformUser = {
|
|
|
1786
2245
|
isAdmin: boolean;
|
|
1787
2246
|
};
|
|
1788
2247
|
|
|
1789
|
-
|
|
2248
|
+
/**
|
|
2249
|
+
* Methods the parent frame exposes to the Mesh SDK over the iframe bridge (`connectToParent().parent`).
|
|
2250
|
+
* The dashboard implements the same shape when wiring `setupIframeListeners` / mesh location hosts.
|
|
2251
|
+
*/
|
|
2252
|
+
interface MeshParentConnection {
|
|
2253
|
+
resize: ({ height }: {
|
|
2254
|
+
height: CSSHeight;
|
|
2255
|
+
}) => Promise<void>;
|
|
2256
|
+
setValue: (value: SetValueMessage) => Promise<void>;
|
|
2257
|
+
openDialog: (message: OpenDialogMessage) => Promise<Pick<DialogResponseData, 'value' | 'dialogId'> | undefined>;
|
|
2258
|
+
closeDialog: (message: CloseDialogMessage) => Promise<void>;
|
|
2259
|
+
getDataResource: <TExpectedResult>(message: GetDataResourceMessage) => Promise<TExpectedResult>;
|
|
2260
|
+
navigate: (message: NavigateMessage) => Promise<void>;
|
|
2261
|
+
reloadLocation: () => Promise<void>;
|
|
2262
|
+
editConnectedData: (message: EditConnectedDataMessage) => Promise<EditConnectedDataResponse>;
|
|
2263
|
+
/**
|
|
2264
|
+
* Returns a short-lived session token for identity delegation, or `undefined` when delegation
|
|
2265
|
+
* is not enabled for this integration.
|
|
2266
|
+
*
|
|
2267
|
+
* @deprecated This beta identity delegation API may change with breaking changes.
|
|
2268
|
+
*/
|
|
2269
|
+
getSessionToken: () => Promise<string | undefined>;
|
|
2270
|
+
/**
|
|
2271
|
+
* Provides imperative access to the composition/entry editor state.
|
|
2272
|
+
* This API provides imperative access to the composition/entry editor state.
|
|
2273
|
+
*/
|
|
2274
|
+
editorState: EditorStateApi;
|
|
2275
|
+
}
|
|
2276
|
+
type ConnectToParentResult = {
|
|
2277
|
+
initData: MeshContextData;
|
|
2278
|
+
parent: MeshParentConnection;
|
|
2279
|
+
};
|
|
2280
|
+
/** Shape of the handler object the mesh parent iframe must provide (includes `initialize` for the host side). */
|
|
2281
|
+
type MeshSDKEventInterface = MeshParentConnection & {
|
|
2282
|
+
/** Invoked by the child on startup; not part of `connectToParent().parent` but required on the host. */
|
|
1790
2283
|
initialize: () => Promise<MeshContextData>;
|
|
1791
2284
|
};
|
|
1792
2285
|
/**
|
|
@@ -1797,21 +2290,7 @@ declare function connectToParent({ dialogResponseHandlers, onMetadataUpdated, on
|
|
|
1797
2290
|
dialogResponseHandlers: DialogResponseHandlers;
|
|
1798
2291
|
onMetadataUpdated: (metadata: unknown) => void;
|
|
1799
2292
|
onValueExternallyUpdated: (value: unknown) => void;
|
|
1800
|
-
}): Promise<
|
|
1801
|
-
initData: MeshContextData;
|
|
1802
|
-
parent: {
|
|
1803
|
-
resize: ({ height }: {
|
|
1804
|
-
height: CSSHeight;
|
|
1805
|
-
}) => Promise<void>;
|
|
1806
|
-
setValue: (value: SetValueMessage) => Promise<void>;
|
|
1807
|
-
openDialog: (message: OpenDialogMessage) => Promise<Pick<DialogResponseData, "value" | "dialogId"> | undefined>;
|
|
1808
|
-
closeDialog: (message: CloseDialogMessage) => Promise<void>;
|
|
1809
|
-
getDataResource: <TExpectedResult>(message: GetDataResourceMessage) => Promise<TExpectedResult>;
|
|
1810
|
-
navigate: (message: NavigateMessage) => Promise<void>;
|
|
1811
|
-
reloadLocation: () => Promise<void>;
|
|
1812
|
-
editConnectedData: (message: EditConnectedDataMessage) => Promise<EditConnectedDataResponse>;
|
|
1813
|
-
};
|
|
1814
|
-
}>;
|
|
2293
|
+
}): Promise<ConnectToParentResult>;
|
|
1815
2294
|
|
|
1816
2295
|
type SetLocationFunction<TSetValue> = (value: TSetValue, options?: SetValueOptions) => Promise<void> | void;
|
|
1817
2296
|
/** Core shared generic for a mesh location context */
|
|
@@ -1943,6 +2422,12 @@ type MeshLocationUserPermissions =
|
|
|
1943
2422
|
| 'COMPOSITIONS_WRITE'
|
|
1944
2423
|
/** Uniform Canvas:Compositions:Delete */
|
|
1945
2424
|
| 'COMPOSITIONS_DELETE'
|
|
2425
|
+
/** Uniform Canvas:Labels:Create */
|
|
2426
|
+
| 'LABELS_CREATE'
|
|
2427
|
+
/** Uniform Canvas:Labels:Update */
|
|
2428
|
+
| 'LABELS_UPDATE'
|
|
2429
|
+
/** Uniform Canvas:Labels:Delete */
|
|
2430
|
+
| 'LABELS_DELETE'
|
|
1946
2431
|
/** Uniform Canvas:Compositions:Read Published */
|
|
1947
2432
|
| 'COMPOSITIONS_READ'
|
|
1948
2433
|
/** Uniform Canvas:Compositions:Publish */
|
|
@@ -1955,6 +2440,14 @@ type MeshLocationUserPermissions =
|
|
|
1955
2440
|
| 'ENTRIES_MANAGE_SCHEMA'
|
|
1956
2441
|
/** Uniform Canvas:AI Prompts:Manage|Create, update, and delete AI prompts */
|
|
1957
2442
|
| 'PROMPTS_MANAGE_SCHEMA'
|
|
2443
|
+
/** Uniform Canvas:Labels:Create */
|
|
2444
|
+
| 'LABELS_CREATE'
|
|
2445
|
+
/** Uniform Canvas:Labels:Update */
|
|
2446
|
+
| 'LABELS_UPDATE'
|
|
2447
|
+
/** Uniform Canvas:Labels:Delete */
|
|
2448
|
+
| 'LABELS_DELETE'
|
|
2449
|
+
/** Uniform Automations:Manage|Create, update, delete, and toggle automations. */
|
|
2450
|
+
| 'AUTOMATIONS_MANAGE'
|
|
1958
2451
|
/** UTM Mapper:Read|Read UTM mapper configuration */
|
|
1959
2452
|
| 'UTM_MAPPER_READ'
|
|
1960
2453
|
/** UTM Mapper:Read|Create, update and delete UTM mapper configuration */
|
|
@@ -1970,7 +2463,7 @@ type MeshLocationUserPermissions =
|
|
|
1970
2463
|
/**
|
|
1971
2464
|
* Known location types that can be passed to a mesh location
|
|
1972
2465
|
*/
|
|
1973
|
-
type MeshLocationTypes = 'paramType' | 'paramTypeConfig' | 'assetLibrary' | 'assetParameter' | 'settings' | 'dataSource' | 'dataType' | 'dataResource' | 'aiGenerate' | 'embeddedEditor' | 'canvasEditorTools' | 'aiMetadata' | 'personalizationCriteria' | 'dashboardTool' | 'projectTool';
|
|
2466
|
+
type MeshLocationTypes = 'paramType' | 'paramTypeConfig' | 'assetLibrary' | 'assetParameter' | 'settings' | 'dataSource' | 'dataType' | 'dataResource' | 'dataResourceSelector' | 'aiGenerate' | 'embeddedEditor' | 'canvasEditorTools' | 'aiMetadata' | 'personalizationCriteria' | 'dashboardTool' | 'projectTool';
|
|
1974
2467
|
type SetValueOptions = ValidationResult;
|
|
1975
2468
|
type SetValueMessage = {
|
|
1976
2469
|
uniformMeshLocationValue: unknown;
|
|
@@ -1995,6 +2488,262 @@ type DynamicInput = {
|
|
|
1995
2488
|
};
|
|
1996
2489
|
/** Record of dynamic inputs keyed by the input name */
|
|
1997
2490
|
type DynamicInputs = Record<string, DynamicInput>;
|
|
2491
|
+
/** Metadata about the composition (description, category, workflow, etc.) */
|
|
2492
|
+
type EditorRootMetadata = {
|
|
2493
|
+
description?: string;
|
|
2494
|
+
previewImageUrl?: string;
|
|
2495
|
+
categoryId?: string;
|
|
2496
|
+
workflowId?: string;
|
|
2497
|
+
workflowStageId?: string;
|
|
2498
|
+
editionName?: string;
|
|
2499
|
+
editionPriority?: number;
|
|
2500
|
+
};
|
|
2501
|
+
/** Root node metadata (name and slug) */
|
|
2502
|
+
type EditorRootNodeMetadata = {
|
|
2503
|
+
_name: string;
|
|
2504
|
+
_slug: string | null | undefined;
|
|
2505
|
+
};
|
|
2506
|
+
/** Options for exporting the tree */
|
|
2507
|
+
type EditorExportOptions = {
|
|
2508
|
+
/** If true, includes pattern descendant data in export */
|
|
2509
|
+
keepPatternData?: boolean;
|
|
2510
|
+
};
|
|
2511
|
+
/** A component instance without slots/params (indexed separately) */
|
|
2512
|
+
type EditorComponentInstance = Omit<ComponentInstance, 'slots' | 'parameters' | '_id'>;
|
|
2513
|
+
/** An indexed node within the editor state */
|
|
2514
|
+
type EditorNode = {
|
|
2515
|
+
nodeId: string;
|
|
2516
|
+
parentId?: string;
|
|
2517
|
+
isBlock?: boolean;
|
|
2518
|
+
value: EditorComponentInstance;
|
|
2519
|
+
/** If part of a pattern, the pattern ID */
|
|
2520
|
+
partOfPattern?: string;
|
|
2521
|
+
/** If part of a nested pattern */
|
|
2522
|
+
partOfNestedPattern?: string;
|
|
2523
|
+
/** UI expansion state */
|
|
2524
|
+
isExpandedInUI?: boolean;
|
|
2525
|
+
};
|
|
2526
|
+
/** Child node IDs indexed by slot name */
|
|
2527
|
+
type EditorNodeChildren = {
|
|
2528
|
+
[slotName: string]: string[];
|
|
2529
|
+
};
|
|
2530
|
+
/** A component parameter value */
|
|
2531
|
+
type EditorComponentParameter<T = unknown> = Omit<ComponentParameter<T>, 'connectedData'>;
|
|
2532
|
+
/** Parent info for a node */
|
|
2533
|
+
type EditorNodeParentInfo = {
|
|
2534
|
+
parentId: string;
|
|
2535
|
+
parentName: string;
|
|
2536
|
+
targetIndexInParent: number;
|
|
2537
|
+
value: EditorComponentInstance;
|
|
2538
|
+
parentChildIds: string[];
|
|
2539
|
+
parentType: 'slot' | 'block';
|
|
2540
|
+
};
|
|
2541
|
+
/** Options for updateNodeProperty */
|
|
2542
|
+
type UpdateNodePropertyOptions = {
|
|
2543
|
+
nodeId: string;
|
|
2544
|
+
property: string;
|
|
2545
|
+
/**
|
|
2546
|
+
* The new value to set. Pass the final value directly.
|
|
2547
|
+
* - `undefined` to soft-delete (remove current locale/condition value)
|
|
2548
|
+
* - `null` to hard-delete (remove entire parameter)
|
|
2549
|
+
* - any other value to set
|
|
2550
|
+
*
|
|
2551
|
+
* For read-modify-write, call getNodeProperty() first to get current value.
|
|
2552
|
+
*/
|
|
2553
|
+
value: unknown | undefined | null;
|
|
2554
|
+
/** Parameter type (required for new parameters) */
|
|
2555
|
+
type?: string;
|
|
2556
|
+
/** Target locale, or undefined for invariant value */
|
|
2557
|
+
locale: string | undefined;
|
|
2558
|
+
/** Condition index (-1 for base value, >= 0 for conditional) */
|
|
2559
|
+
conditionIndex: number;
|
|
2560
|
+
/** Condition definition (required when conditionIndex >= 0) */
|
|
2561
|
+
conditionDefinition?: VisibilityCriteriaGroup | null;
|
|
2562
|
+
};
|
|
2563
|
+
/** Options for insertNode */
|
|
2564
|
+
type InsertNodeOptions = {
|
|
2565
|
+
node: EditorComponentInstance;
|
|
2566
|
+
parentNodeId: string;
|
|
2567
|
+
parentSlot: string;
|
|
2568
|
+
targetIndexInSlot?: number;
|
|
2569
|
+
};
|
|
2570
|
+
/** Options for moveNode */
|
|
2571
|
+
type MoveNodeOptions = {
|
|
2572
|
+
movedNodeId: string;
|
|
2573
|
+
parentNodeId: string;
|
|
2574
|
+
parentSlot: string;
|
|
2575
|
+
targetIndexInSlot: number;
|
|
2576
|
+
};
|
|
2577
|
+
/** Options for deleteNode */
|
|
2578
|
+
type DeleteNodeOptions = {
|
|
2579
|
+
nodeId: string;
|
|
2580
|
+
/**
|
|
2581
|
+
* When true, deletes a block entry without slot-parent bookkeeping.
|
|
2582
|
+
* Pass this when removing nodes from a block parameter.
|
|
2583
|
+
*/
|
|
2584
|
+
isBlock?: boolean;
|
|
2585
|
+
};
|
|
2586
|
+
/**
|
|
2587
|
+
* Common fields for {@link EditorStateApi.setPropertyLocalizability}.
|
|
2588
|
+
*/
|
|
2589
|
+
interface SetPropertyLocalizabilityCommonParams {
|
|
2590
|
+
/** The node owning the parameter. */
|
|
2591
|
+
nodeId: string;
|
|
2592
|
+
/** The parameter id. */
|
|
2593
|
+
property: string;
|
|
2594
|
+
/**
|
|
2595
|
+
* The component-definition parameter for `(nodeId, property)`. Required: the bridge
|
|
2596
|
+
* uses this to enforce localizability business rules (refuses to localize a parameter
|
|
2597
|
+
* whose definition disallows it) and to resolve the parameter type for value fan-out.
|
|
2598
|
+
*
|
|
2599
|
+
* Mesh integrations must resolve this from the Uniform public API (using a service
|
|
2600
|
+
* account API key today, or identity delegation in the future) — the editor frame does
|
|
2601
|
+
* not expose component definitions to mesh apps.
|
|
2602
|
+
*/
|
|
2603
|
+
propertyDefinition: ComponentDefinitionParameter;
|
|
2604
|
+
}
|
|
2605
|
+
/**
|
|
2606
|
+
* Discriminated-union params for {@link EditorStateApi.setPropertyLocalizability}.
|
|
2607
|
+
*
|
|
2608
|
+
* - `isLocalized: true` (toggle ON): per-locale values are written to every enabled
|
|
2609
|
+
* locale of the composition.
|
|
2610
|
+
* - `isLocalized: false` (toggle OFF): per-locale values are collapsed back into a
|
|
2611
|
+
* single invariant value, copying from `copyFromLocale` (or the first defined locale).
|
|
2612
|
+
*/
|
|
2613
|
+
type SetPropertyLocalizabilityParams = (SetPropertyLocalizabilityCommonParams & {
|
|
2614
|
+
/** Toggle ON: convert the invariant value to per-locale values. */
|
|
2615
|
+
isLocalized: true;
|
|
2616
|
+
}) | (SetPropertyLocalizabilityCommonParams & {
|
|
2617
|
+
/** Toggle OFF: collapse per-locale values back to a single invariant value. */
|
|
2618
|
+
isLocalized: false;
|
|
2619
|
+
/**
|
|
2620
|
+
* The locale whose value becomes the new invariant value. Defaults to the first
|
|
2621
|
+
* locale with a defined value on the parameter.
|
|
2622
|
+
*/
|
|
2623
|
+
copyFromLocale?: string;
|
|
2624
|
+
});
|
|
2625
|
+
/** Options for insertPattern */
|
|
2626
|
+
type InsertPatternOptions = {
|
|
2627
|
+
pattern: RootComponentInstance;
|
|
2628
|
+
parentNodeId: string;
|
|
2629
|
+
parentSlot: string;
|
|
2630
|
+
targetIndexInSlot?: number;
|
|
2631
|
+
patternInstanceId?: string;
|
|
2632
|
+
};
|
|
2633
|
+
/** Options for updateRootNode */
|
|
2634
|
+
type UpdateRootNodeOptions = {
|
|
2635
|
+
update: Partial<EditorRootNodeMetadata>;
|
|
2636
|
+
};
|
|
2637
|
+
/**
|
|
2638
|
+
* Imperative API for interacting with the composition/entry editor state.
|
|
2639
|
+
* Available on `canvasEditorTools` and `paramType` locations.
|
|
2640
|
+
*
|
|
2641
|
+
* All methods use object parameters for consistency across client, wire format, and server.
|
|
2642
|
+
*/
|
|
2643
|
+
interface EditorStateApi {
|
|
2644
|
+
getRootNodeId(): Promise<string>;
|
|
2645
|
+
exportTree(params?: EditorExportOptions): Promise<RootComponentInstance | EntryData>;
|
|
2646
|
+
exportSubtree(params: {
|
|
2647
|
+
nodeId: string;
|
|
2648
|
+
options?: EditorExportOptions;
|
|
2649
|
+
}): Promise<ComponentInstance | EntryData>;
|
|
2650
|
+
exportMetadata(): Promise<EditorRootMetadata>;
|
|
2651
|
+
exportRootNodeMetadata(): Promise<EditorRootNodeMetadata>;
|
|
2652
|
+
getNodeById(params: {
|
|
2653
|
+
nodeId: string;
|
|
2654
|
+
}): Promise<EditorNode | undefined>;
|
|
2655
|
+
getNodeChildren(params: {
|
|
2656
|
+
nodeId: string;
|
|
2657
|
+
}): Promise<EditorNodeChildren | undefined>;
|
|
2658
|
+
getNodeProperty<T = unknown>(params: {
|
|
2659
|
+
nodeId: string;
|
|
2660
|
+
property: string;
|
|
2661
|
+
}): Promise<EditorComponentParameter<T> | undefined>;
|
|
2662
|
+
getNodeProperties(params: {
|
|
2663
|
+
nodeId: string;
|
|
2664
|
+
}): Promise<Record<string, EditorComponentParameter>>;
|
|
2665
|
+
getParentInfo(params: {
|
|
2666
|
+
nodeId: string;
|
|
2667
|
+
}): Promise<EditorNodeParentInfo | undefined>;
|
|
2668
|
+
getSelectedNodeId(): Promise<string | undefined>;
|
|
2669
|
+
setSelectedNodeId(params: {
|
|
2670
|
+
nodeId: string | undefined;
|
|
2671
|
+
}): Promise<void>;
|
|
2672
|
+
getSelectedParameterId(): Promise<string | undefined>;
|
|
2673
|
+
setSelectedParameterId(params: {
|
|
2674
|
+
parameterId: string | undefined;
|
|
2675
|
+
}): Promise<void>;
|
|
2676
|
+
getPristine(): Promise<boolean>;
|
|
2677
|
+
insertNode(params: InsertNodeOptions): Promise<string>;
|
|
2678
|
+
deleteNode(params: DeleteNodeOptions): Promise<void>;
|
|
2679
|
+
moveNode(params: MoveNodeOptions): Promise<void>;
|
|
2680
|
+
updateNodeProperty(params: UpdateNodePropertyOptions): Promise<void>;
|
|
2681
|
+
updateRootMetadata(params: {
|
|
2682
|
+
metadata: Partial<EditorRootMetadata>;
|
|
2683
|
+
}): Promise<void>;
|
|
2684
|
+
updateRootNode(params: UpdateRootNodeOptions): Promise<void>;
|
|
2685
|
+
insertPattern(params: InsertPatternOptions): Promise<string>;
|
|
2686
|
+
isPatternPropertyOverridden(params: {
|
|
2687
|
+
nodeId: string;
|
|
2688
|
+
property: string;
|
|
2689
|
+
locale?: string;
|
|
2690
|
+
}): Promise<boolean>;
|
|
2691
|
+
resetPatternPropertyOverride(params: {
|
|
2692
|
+
nodeId: string;
|
|
2693
|
+
property: string;
|
|
2694
|
+
locale: string | undefined;
|
|
2695
|
+
}): Promise<void>;
|
|
2696
|
+
/**
|
|
2697
|
+
* Toggles a parameter between "shared" (single invariant value) and "localized"
|
|
2698
|
+
* (per-locale values) — the same operation as the dashboard "Use locale-specific values"
|
|
2699
|
+
* switch on the parameter's locale drawer.
|
|
2700
|
+
*
|
|
2701
|
+
* - `isLocalized: true` copies the current invariant value (and its conditions) into
|
|
2702
|
+
* each locale enabled on the composition.
|
|
2703
|
+
* - `isLocalized: false` copies the value from `copyFromLocale` (or the first defined
|
|
2704
|
+
* locale, if omitted) back into the invariant slot and drops the per-locale values.
|
|
2705
|
+
*
|
|
2706
|
+
* The migration handles pattern parameter overrides, `contentReference` data resource
|
|
2707
|
+
* forking, and the per-node localizability metadata, so the resulting state matches
|
|
2708
|
+
* what the dashboard UI would produce for the same toggle. The whole migration is one
|
|
2709
|
+
* editor mutation, which keeps it as a single undo step for the user.
|
|
2710
|
+
*
|
|
2711
|
+
* The caller must supply `propertyDefinition` — the component-definition parameter for
|
|
2712
|
+
* `(nodeId, property)`. This is required so the bridge can enforce localizability
|
|
2713
|
+
* business rules (e.g. refusing to localize a parameter whose definition forbids it)
|
|
2714
|
+
* and resolve the parameter type for value fan-out. Resolve it from the Uniform public
|
|
2715
|
+
* API using your service account API key (or, in the future, identity delegation) and
|
|
2716
|
+
* cache it client-side as needed.
|
|
2717
|
+
*
|
|
2718
|
+
* No-ops if the parameter is already in the requested state; if the parameter does not
|
|
2719
|
+
* exist on the node; if (when localizing) no locales are enabled; or if (when
|
|
2720
|
+
* localizing) the supplied `propertyDefinition.localizable` is `false`.
|
|
2721
|
+
*
|
|
2722
|
+
* @beta This is beta functionality. It is intentionally exposed as `@deprecated` so
|
|
2723
|
+
* consumers do not depend on it from production integrations — the signature and
|
|
2724
|
+
* behaviour may change without notice.
|
|
2725
|
+
* @deprecated Beta. Subject to change without notice; do not rely on this API in
|
|
2726
|
+
* production integrations.
|
|
2727
|
+
*/
|
|
2728
|
+
setPropertyLocalizability(params: SetPropertyLocalizabilityParams): Promise<void>;
|
|
2729
|
+
enableLocale(params: {
|
|
2730
|
+
locale: string | string[];
|
|
2731
|
+
}): Promise<void>;
|
|
2732
|
+
disableLocale(params: {
|
|
2733
|
+
locale: string;
|
|
2734
|
+
}): Promise<void>;
|
|
2735
|
+
/** Sets the currently active locale in the editor UI */
|
|
2736
|
+
setCurrentLocale(params: {
|
|
2737
|
+
locale: string;
|
|
2738
|
+
}): Promise<void>;
|
|
2739
|
+
/**
|
|
2740
|
+
* Sets the current preview value for a dynamic input.
|
|
2741
|
+
*/
|
|
2742
|
+
setDynamicInputPreviewValue(params: {
|
|
2743
|
+
name: string;
|
|
2744
|
+
value: string;
|
|
2745
|
+
}): Promise<void>;
|
|
2746
|
+
}
|
|
1998
2747
|
|
|
1999
2748
|
type AIGenerateLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<{
|
|
2000
2749
|
prompt: string;
|
|
@@ -2021,6 +2770,15 @@ type CanvasEditorToolsLocationMetadata<TIntegrationConfiguration = unknown> = Co
|
|
|
2021
2770
|
*/
|
|
2022
2771
|
activeReleaseId?: string;
|
|
2023
2772
|
state?: number;
|
|
2773
|
+
/** The current locale selected in the editor UI */
|
|
2774
|
+
currentLocale: string | undefined;
|
|
2775
|
+
/**
|
|
2776
|
+
* Current dynamic inputs configured on the composition (if any).
|
|
2777
|
+
* Dynamic inputs come from project map nodes and represent path or query based dynamic values.
|
|
2778
|
+
*/
|
|
2779
|
+
dynamicInputs: DynamicInputs;
|
|
2780
|
+
/** Component definitions index, keyed by public id. */
|
|
2781
|
+
componentDefinitions: Record<string, ComponentDefinition | undefined>;
|
|
2024
2782
|
}, TIntegrationConfiguration>;
|
|
2025
2783
|
type CanvasEditorToolsReferenceData = {
|
|
2026
2784
|
name: string;
|
|
@@ -2031,13 +2789,22 @@ type CanvasEditorToolsData = {
|
|
|
2031
2789
|
entryNamesIndex?: Record<string, CanvasEditorToolsReferenceData>;
|
|
2032
2790
|
entityType: CanvasEditorEntityType;
|
|
2033
2791
|
} & ({
|
|
2792
|
+
/** editorState is an experimental replacement for rootEntity. This may become deprecated in the future. */
|
|
2034
2793
|
rootEntity: RootComponentInstance;
|
|
2035
2794
|
entityType: 'composition' | 'componentPattern' | 'compositionDefaults';
|
|
2036
2795
|
} | {
|
|
2796
|
+
/** editorState is an experimental replacement for rootEntity. This may become deprecated in the future. */
|
|
2037
2797
|
rootEntity: EntryData;
|
|
2038
2798
|
entityType: 'entry' | 'entryPattern';
|
|
2039
2799
|
});
|
|
2040
|
-
type CanvasEditorToolsLocation = MeshLocationCore<CanvasEditorToolsData, CanvasEditorToolsLocationMetadata, CanvasEditorToolsData, 'canvasEditorTools'> & GetDataResourceLocation
|
|
2800
|
+
type CanvasEditorToolsLocation = MeshLocationCore<CanvasEditorToolsData, CanvasEditorToolsLocationMetadata, CanvasEditorToolsData, 'canvasEditorTools'> & GetDataResourceLocation & {
|
|
2801
|
+
/**
|
|
2802
|
+
* Imperative API for interacting with the composition/entry editor state.
|
|
2803
|
+
* Provides non-reactive access to read and modify the editor state.
|
|
2804
|
+
* @deprecated This is experimental functionality and is subject to change without notice.
|
|
2805
|
+
*/
|
|
2806
|
+
editorState: EditorStateApi;
|
|
2807
|
+
};
|
|
2041
2808
|
|
|
2042
2809
|
/**
|
|
2043
2810
|
* @deprecated Alpha version of the Embedded Editor location. This location is not yet available for use in the Mesh SDK.
|
|
@@ -2185,6 +2952,16 @@ interface UniformMeshSDK {
|
|
|
2185
2952
|
}>['setValue']>[0]> | undefined>;
|
|
2186
2953
|
/** Explicitly close a location dialog. Called when rendering current location in the dialog. */
|
|
2187
2954
|
closeCurrentLocationDialog(): Promise<void>;
|
|
2955
|
+
/**
|
|
2956
|
+
* Requests a fresh short-lived session token for identity delegation.
|
|
2957
|
+
* Returns `undefined` when the integration does not have `identityDelegation` enabled.
|
|
2958
|
+
* Call this on demand — the token has a very short TTL (~10 s) and should be
|
|
2959
|
+
* consumed immediately by your backend to exchange for a delegation token
|
|
2960
|
+
* via `POST /api/v1/token` with `grant_type=delegation_token` or DelegationTokenClient.
|
|
2961
|
+
*
|
|
2962
|
+
* @deprecated This beta identity delegation API may change with breaking changes.
|
|
2963
|
+
*/
|
|
2964
|
+
getSessionToken(): Promise<string | undefined>;
|
|
2188
2965
|
}
|
|
2189
2966
|
declare global {
|
|
2190
2967
|
interface Window {
|
|
@@ -2205,4 +2982,4 @@ declare const hasPermissions: (permissions: MeshLocationUserPermissions | MeshLo
|
|
|
2205
2982
|
*/
|
|
2206
2983
|
declare const hasRole: (role: string, user: UniformUser) => boolean;
|
|
2207
2984
|
|
|
2208
|
-
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 };
|
|
2985
|
+
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 DataResourceSelectorLocation, type DataResourceSelectorLocationMetadata, type DataSourceLocation, type DataSourceLocationMetadata, type DataSourceLocationValue, type DataTypeLocation, type DataTypeLocationMetadata, type DataTypeLocationValue, DelegationTokenClient, type DelegationTokenClientOptions, DelegationTokenError, type DelegationTokenErrorKind, type DelegationTokenResponse, type DeleteNodeOptions, 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 EditorComponentInstance, type EditorComponentParameter, type EditorExportOptions, type EditorNode, type EditorNodeChildren, type EditorNodeParentInfo, type EditorRootMetadata, type EditorRootNodeMetadata, type EditorStateApi, type EmbeddedEditorLocation, type EmbeddedEditorLocationMetadata, type EmbeddedEditorLocationSetValue, type EmbeddedEditorLocationValue, type FunctionCallResponse, type FunctionCallSystemParameter, type GetDataResourceLocation, type GetDataResourceMessage, type InsertNodeOptions, type InsertPatternOptions, 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 MoveNodeOptions, 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 SetPropertyLocalizabilityCommonParams, type SetPropertyLocalizabilityParams, type SetValueMessage, type SetValueOptions, type SettingsLocation, type SettingsLocationMetadata, type UniformMeshSDK, type UniformMeshSDKEvents, type UniformUser, type UpdateNodePropertyOptions, type UpdateRootNodeOptions, type ValidationResult, functionCallSystemParameters, hasPermissions, hasRole, initializeUniformMeshSDK, parseFunctionCall };
|