@salesforce/platform-sdk 12.6.3 → 12.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -3
- package/dist/chat/index.js +12 -10
- package/dist/core/extension-attach.d.ts.map +1 -1
- package/dist/core/extension-types.d.ts.map +1 -1
- package/dist/data/index.d.ts +8 -1
- package/dist/data/index.d.ts.map +1 -1
- package/dist/data/index.js +283 -256
- package/dist/data/mosaic/fetch.d.ts +21 -17
- package/dist/data/mosaic/fetch.d.ts.map +1 -1
- package/dist/data/mosaic/index.d.ts +11 -0
- package/dist/data/mosaic/index.d.ts.map +1 -1
- package/dist/data/shared/graphql/cache/invoker.d.ts.map +1 -1
- package/dist/lightning/index.js +5 -4
- package/dist/telemetry/uploader/interfaces.d.ts.map +1 -1
- package/dist/view/index.js +55 -53
- package/dist/view/utils.d.ts.map +1 -1
- package/docs/data/01-grounding-and-precedence.md +2 -0
- package/docs/data/06-extensions.md +147 -0
- package/package.json +3 -3
package/dist/data/index.js
CHANGED
|
@@ -1,135 +1,149 @@
|
|
|
1
|
-
import { g as
|
|
2
|
-
import { w as
|
|
3
|
-
import { buildServiceDescriptor as
|
|
4
|
-
import { resolvedPromiseLike as l, ok as x, err as
|
|
5
|
-
import { print as
|
|
6
|
-
import { RetryPolicy as
|
|
7
|
-
import { buildServiceDescriptor as
|
|
8
|
-
import { buildServiceDescriptor as
|
|
9
|
-
import { buildInMemoryCacheInclusionPolicyService as
|
|
10
|
-
import { buildServiceDescriptor as
|
|
11
|
-
import { HttpCacheControlCommand as
|
|
12
|
-
const
|
|
13
|
-
function
|
|
14
|
-
const [, r, n] =
|
|
15
|
-
return Number(r) - Number(
|
|
16
|
-
}
|
|
17
|
-
function
|
|
1
|
+
import { g as K, S as b } from "../surface-Dd2tqrPi.js";
|
|
2
|
+
import { w as z } from "../sdk-promise-D0sy7OW1.js";
|
|
3
|
+
import { buildServiceDescriptor as V, setHeader as y } from "@conduit-client/service-fetch-network/v1";
|
|
4
|
+
import { resolvedPromiseLike as l, ok as x, err as O, stableJSONStringify as J, DataNotFoundError as W, UserVisibleError as B, deepFreeze as w, isUserVisibleError as X } from "@conduit-client/utils";
|
|
5
|
+
import { print as $, parse as Y } from "@conduit-client/onestore-graphql-parser/v1";
|
|
6
|
+
import { RetryPolicy as Z, buildServiceDescriptor as ee } from "@conduit-client/service-retry/v1";
|
|
7
|
+
import { buildServiceDescriptor as te } from "@conduit-client/service-cache/v1";
|
|
8
|
+
import { buildServiceDescriptor as re } from "@conduit-client/service-cache-control/v1";
|
|
9
|
+
import { buildInMemoryCacheInclusionPolicyService as ne } from "@conduit-client/service-cache-inclusion-policy/v1";
|
|
10
|
+
import { buildServiceDescriptor as se } from "@conduit-client/service-pubsub/v1";
|
|
11
|
+
import { HttpCacheControlCommand as ae } from "@conduit-client/command-http-cache-control/v1";
|
|
12
|
+
const g = /^(0|[1-9]\d*)\.(0|[1-9]\d*)$/;
|
|
13
|
+
function oe(t, e) {
|
|
14
|
+
const [, r, n] = g.exec(t), [, a, s] = g.exec(e);
|
|
15
|
+
return Number(r) - Number(a) || Number(n) - Number(s);
|
|
16
|
+
}
|
|
17
|
+
function ie(t, e) {
|
|
18
18
|
for (const r of t) {
|
|
19
|
-
const n = r.extension, { label:
|
|
20
|
-
if (
|
|
21
|
-
if (typeof
|
|
19
|
+
const n = r.extension, { label: a } = r, s = n.minApiVersion;
|
|
20
|
+
if (s !== void 0) {
|
|
21
|
+
if (typeof s != "string" || !g.test(s))
|
|
22
22
|
throw new TypeError(
|
|
23
|
-
`Extension ${
|
|
23
|
+
`Extension ${a} declares invalid minApiVersion ${JSON.stringify(s)}; expected a Salesforce API version such as "64.0".`
|
|
24
24
|
);
|
|
25
25
|
if (e.apiVersion !== void 0) {
|
|
26
|
-
if (!
|
|
26
|
+
if (!g.test(e.apiVersion))
|
|
27
27
|
throw new Error(
|
|
28
|
-
`Extension ${
|
|
28
|
+
`Extension ${a} requires Salesforce API version ${s} or later, but the Data SDK exposes invalid apiVersion ${JSON.stringify(e.apiVersion)}.`
|
|
29
29
|
);
|
|
30
|
-
if (
|
|
30
|
+
if (oe(e.apiVersion, s) < 0)
|
|
31
31
|
throw new Error(
|
|
32
|
-
`Extension ${
|
|
32
|
+
`Extension ${a} requires Salesforce API version ${s} or later, but the Data SDK uses version ${e.apiVersion}.`
|
|
33
33
|
);
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
const ce = "X-Salesforce-First-Party";
|
|
39
|
+
function ue(t, e) {
|
|
40
|
+
if (!t) return !1;
|
|
41
|
+
const r = e.toLowerCase();
|
|
42
|
+
return t instanceof Headers ? t.has(e) : Array.isArray(t) ? t.some(([n]) => n.toLowerCase() === r) : Object.keys(t).some((n) => n.toLowerCase() === r);
|
|
43
|
+
}
|
|
44
|
+
function he(t, e, r) {
|
|
45
|
+
return !e || !r ? !1 : ue(t?.headers, ce);
|
|
46
|
+
}
|
|
47
|
+
function S(t, e, r) {
|
|
48
|
+
return e ? r ? y("Cookie", `sid=${e}`, t) : y("Authorization", `Bearer ${e}`, t) : t;
|
|
49
|
+
}
|
|
50
|
+
function le({
|
|
51
|
+
baseUrl: t,
|
|
52
|
+
accessToken: e,
|
|
53
|
+
lightningDomain: r,
|
|
54
|
+
isInternal: n = !1
|
|
55
|
+
}) {
|
|
56
|
+
return (a) => {
|
|
57
|
+
const [s, o] = a;
|
|
58
|
+
if (typeof s == "string" && !s.startsWith("http") && t) {
|
|
59
|
+
const i = s.startsWith("/") ? s : `/${s}`;
|
|
60
|
+
return he(o, n, r) ? l(
|
|
61
|
+
S([`${r}${i}`, o], e, !0)
|
|
62
|
+
) : l(S([`${t}${i}`, o], e, !1));
|
|
44
63
|
}
|
|
45
|
-
return l(e);
|
|
64
|
+
return l(S(a, e, !1));
|
|
46
65
|
};
|
|
47
66
|
}
|
|
48
|
-
function
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
function ce(t, e) {
|
|
52
|
-
const r = [];
|
|
53
|
-
return t && r.push(oe(t)), e && r.push(ie(e)), M({
|
|
54
|
-
request: r
|
|
55
|
-
}).service;
|
|
67
|
+
function de(t) {
|
|
68
|
+
const e = t.baseUrl || t.accessToken ? [le(t)] : [];
|
|
69
|
+
return V({ request: e }).service;
|
|
56
70
|
}
|
|
57
|
-
const
|
|
71
|
+
const pe = {
|
|
58
72
|
"Content-Type": "application/json",
|
|
59
73
|
Accept: "application/json",
|
|
60
74
|
"X-Chatter-Entity-Encoding": "false"
|
|
61
75
|
};
|
|
62
|
-
function
|
|
76
|
+
function fe(t) {
|
|
63
77
|
if (t instanceof Headers) {
|
|
64
78
|
const e = [];
|
|
65
79
|
return t.forEach((r, n) => e.push([n, r])), e;
|
|
66
80
|
}
|
|
67
81
|
return Array.isArray(t) ? t.map(([e, r]) => [e, r]) : Object.entries(t);
|
|
68
82
|
}
|
|
69
|
-
function
|
|
83
|
+
function I(t, e) {
|
|
70
84
|
if (e === void 0) return { ...t };
|
|
71
85
|
const r = { ...t }, n = /* @__PURE__ */ new Map();
|
|
72
|
-
for (const
|
|
73
|
-
const
|
|
74
|
-
for (const [
|
|
75
|
-
const i =
|
|
76
|
-
c === void 0 ? (r[
|
|
86
|
+
for (const s of Object.keys(r)) n.set(s.toLowerCase(), s);
|
|
87
|
+
const a = /* @__PURE__ */ new Set();
|
|
88
|
+
for (const [s, o] of fe(e)) {
|
|
89
|
+
const i = s.toLowerCase(), c = n.get(i);
|
|
90
|
+
c === void 0 ? (r[s] = o, n.set(i, s), a.add(i)) : a.has(i) ? r[c] = `${r[c]}, ${o}` : (r[c] = o, a.add(i));
|
|
77
91
|
}
|
|
78
92
|
return r;
|
|
79
93
|
}
|
|
80
|
-
function
|
|
81
|
-
return
|
|
94
|
+
function H(t) {
|
|
95
|
+
return I(pe, t);
|
|
82
96
|
}
|
|
83
|
-
function
|
|
97
|
+
function me(t) {
|
|
84
98
|
if (t === void 0) return;
|
|
85
99
|
const e = {};
|
|
86
100
|
return new Headers(t).forEach((r, n) => {
|
|
87
101
|
e[n] = r;
|
|
88
102
|
}), Object.keys(e).length > 0 ? e : void 0;
|
|
89
103
|
}
|
|
90
|
-
const
|
|
91
|
-
function
|
|
104
|
+
const ye = 512;
|
|
105
|
+
function be(t) {
|
|
92
106
|
return t.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
93
107
|
}
|
|
94
|
-
class
|
|
108
|
+
class _ extends Error {
|
|
95
109
|
status;
|
|
96
110
|
url;
|
|
97
111
|
constructor(e) {
|
|
98
|
-
const r = e.body.length === 0 ? "empty response body" : "unparseable response body", n = e.body.length === 0 ? "" : ` (starts with: ${JSON.stringify(
|
|
112
|
+
const r = e.body.length === 0 ? "empty response body" : "unparseable response body", n = e.body.length === 0 ? "" : ` (starts with: ${JSON.stringify(be(e.body.slice(0, ye)))})`;
|
|
99
113
|
super(
|
|
100
114
|
`${e.surface} GraphQL request to ${e.url} returned HTTP ${e.status} with an ${r}${n}. Expected a JSON GraphQL response; the transport (proxy/gateway/auth) likely did not return one.`
|
|
101
115
|
), this.name = "GraphQLTransportError", this.status = e.status, this.url = e.url, this.cause = e.cause;
|
|
102
116
|
}
|
|
103
117
|
}
|
|
104
|
-
async function
|
|
118
|
+
async function G(t, e, r) {
|
|
105
119
|
const n = await t.text();
|
|
106
|
-
let
|
|
120
|
+
let a;
|
|
107
121
|
try {
|
|
108
|
-
|
|
109
|
-
} catch (
|
|
110
|
-
throw new
|
|
122
|
+
a = JSON.parse(n);
|
|
123
|
+
} catch (s) {
|
|
124
|
+
throw new _({ surface: e, url: r, status: t.status, body: n, cause: s });
|
|
111
125
|
}
|
|
112
|
-
if (
|
|
113
|
-
throw new
|
|
126
|
+
if (a === null || typeof a != "object")
|
|
127
|
+
throw new _({
|
|
114
128
|
surface: e,
|
|
115
129
|
url: r,
|
|
116
130
|
status: t.status,
|
|
117
131
|
body: n,
|
|
118
132
|
cause: new Error("Parsed GraphQL response body was not a JSON object")
|
|
119
133
|
});
|
|
120
|
-
return
|
|
134
|
+
return a;
|
|
121
135
|
}
|
|
122
|
-
const
|
|
123
|
-
},
|
|
136
|
+
const v = () => {
|
|
137
|
+
}, N = async () => {
|
|
124
138
|
};
|
|
125
|
-
function
|
|
139
|
+
function A(t) {
|
|
126
140
|
try {
|
|
127
|
-
return x(
|
|
141
|
+
return x(Y(t));
|
|
128
142
|
} catch (e) {
|
|
129
|
-
return
|
|
143
|
+
return O(m(e));
|
|
130
144
|
}
|
|
131
145
|
}
|
|
132
|
-
function
|
|
146
|
+
function P(t, e) {
|
|
133
147
|
const r = t.definitions.filter(
|
|
134
148
|
(n) => n.kind === "OperationDefinition"
|
|
135
149
|
);
|
|
@@ -143,10 +157,10 @@ function m(t) {
|
|
|
143
157
|
}
|
|
144
158
|
return t instanceof Error ? [{ message: t.message }] : typeof t == "string" ? [{ message: t }] : [{ message: "Unknown error" }];
|
|
145
159
|
}
|
|
146
|
-
async function
|
|
147
|
-
const
|
|
148
|
-
if (
|
|
149
|
-
const o =
|
|
160
|
+
async function F(t, { mutation: e, variables: r, operationName: n, headers: a }) {
|
|
161
|
+
const s = A(e);
|
|
162
|
+
if (s.isErr()) return { data: void 0, errors: s.error };
|
|
163
|
+
const o = s.value, i = P(o, n);
|
|
150
164
|
if (i !== "mutation")
|
|
151
165
|
return {
|
|
152
166
|
data: void 0,
|
|
@@ -158,10 +172,10 @@ async function G(t, { mutation: e, variables: r, operationName: n, headers: s })
|
|
|
158
172
|
};
|
|
159
173
|
try {
|
|
160
174
|
const c = await t({
|
|
161
|
-
query:
|
|
175
|
+
query: $(o),
|
|
162
176
|
variables: r,
|
|
163
177
|
operationName: n,
|
|
164
|
-
headers:
|
|
178
|
+
headers: a
|
|
165
179
|
});
|
|
166
180
|
return {
|
|
167
181
|
data: c.data ?? void 0,
|
|
@@ -171,12 +185,12 @@ async function G(t, { mutation: e, variables: r, operationName: n, headers: s })
|
|
|
171
185
|
return { data: void 0, errors: m(c) };
|
|
172
186
|
}
|
|
173
187
|
}
|
|
174
|
-
function
|
|
175
|
-
function e(n,
|
|
188
|
+
function U(t) {
|
|
189
|
+
function e(n, a, s, o) {
|
|
176
190
|
return t({
|
|
177
|
-
query:
|
|
178
|
-
variables:
|
|
179
|
-
operationName:
|
|
191
|
+
query: $(n),
|
|
192
|
+
variables: a,
|
|
193
|
+
operationName: s,
|
|
180
194
|
headers: o
|
|
181
195
|
}).then(
|
|
182
196
|
(i) => ({
|
|
@@ -188,19 +202,19 @@ function H(t) {
|
|
|
188
202
|
}
|
|
189
203
|
async function r({
|
|
190
204
|
query: n,
|
|
191
|
-
variables:
|
|
192
|
-
operationName:
|
|
205
|
+
variables: a,
|
|
206
|
+
operationName: s,
|
|
193
207
|
headers: o
|
|
194
208
|
}) {
|
|
195
|
-
const i =
|
|
209
|
+
const i = A(n);
|
|
196
210
|
if (i.isErr())
|
|
197
211
|
return {
|
|
198
212
|
data: void 0,
|
|
199
213
|
errors: i.error,
|
|
200
|
-
subscribe: () =>
|
|
201
|
-
refresh:
|
|
214
|
+
subscribe: () => v,
|
|
215
|
+
refresh: N
|
|
202
216
|
};
|
|
203
|
-
const c = i.value, h =
|
|
217
|
+
const c = i.value, h = P(c, s);
|
|
204
218
|
if (h !== "query")
|
|
205
219
|
return {
|
|
206
220
|
data: void 0,
|
|
@@ -209,78 +223,87 @@ function H(t) {
|
|
|
209
223
|
message: `DataSDK.graphql.query() requires a GraphQL query, received ${h}.`
|
|
210
224
|
}
|
|
211
225
|
],
|
|
212
|
-
subscribe: () =>
|
|
213
|
-
refresh:
|
|
226
|
+
subscribe: () => v,
|
|
227
|
+
refresh: N
|
|
214
228
|
};
|
|
215
|
-
const u = /* @__PURE__ */ new Set(),
|
|
229
|
+
const u = /* @__PURE__ */ new Set(), p = a, f = await e(c, p, s, o);
|
|
216
230
|
return {
|
|
217
231
|
data: f.data,
|
|
218
232
|
errors: f.errors,
|
|
219
|
-
subscribe(
|
|
220
|
-
return u.add(
|
|
221
|
-
u.delete(
|
|
233
|
+
subscribe(d) {
|
|
234
|
+
return u.add(d), () => {
|
|
235
|
+
u.delete(d);
|
|
222
236
|
};
|
|
223
237
|
},
|
|
224
238
|
async refresh() {
|
|
225
|
-
const
|
|
226
|
-
for (const E of u) E(
|
|
239
|
+
const d = await e(c, p, s, o);
|
|
240
|
+
for (const E of u) E(d);
|
|
227
241
|
}
|
|
228
242
|
};
|
|
229
243
|
}
|
|
230
244
|
return {
|
|
231
245
|
query: r,
|
|
232
|
-
mutate: (n) =>
|
|
246
|
+
mutate: (n) => F(t, n)
|
|
233
247
|
};
|
|
234
248
|
}
|
|
235
|
-
const
|
|
236
|
-
function
|
|
249
|
+
const q = typeof __SF_API_VERSION__ < "u" ? __SF_API_VERSION__ : "65.0";
|
|
250
|
+
function j(t = q) {
|
|
237
251
|
return `/services/data/v${t}`;
|
|
238
252
|
}
|
|
239
|
-
const
|
|
253
|
+
const we = {
|
|
240
254
|
"Content-Type": "application/json",
|
|
241
255
|
Accept: "application/json"
|
|
242
256
|
};
|
|
243
|
-
class
|
|
257
|
+
class ge {
|
|
244
258
|
clientFetch;
|
|
245
259
|
pathData;
|
|
246
260
|
apiVersion;
|
|
247
261
|
graphql;
|
|
248
262
|
constructor(e) {
|
|
249
|
-
const r =
|
|
250
|
-
|
|
263
|
+
const r = ve(), n = k(e?.instanceUrl ?? r.instanceUrl), a = e?.accessToken ?? r.accessToken, s = k(
|
|
264
|
+
e?.lightningDomain ?? r.lightningDomain
|
|
265
|
+
), o = e?.isInternal ?? r.isInternal ?? !1;
|
|
266
|
+
this.apiVersion = e?.apiVersion ?? r.apiVersion ?? q, this.pathData = j(this.apiVersion), this.clientFetch = de({
|
|
267
|
+
baseUrl: n || void 0,
|
|
268
|
+
accessToken: a,
|
|
269
|
+
lightningDomain: s || void 0,
|
|
270
|
+
isInternal: o
|
|
271
|
+
}), this.graphql = U(this.executeRawGraphQL.bind(this));
|
|
251
272
|
}
|
|
252
273
|
async executeRawGraphQL({
|
|
253
274
|
query: e,
|
|
254
275
|
variables: r,
|
|
255
276
|
operationName: n,
|
|
256
|
-
headers:
|
|
277
|
+
headers: a
|
|
257
278
|
}) {
|
|
258
|
-
const
|
|
279
|
+
const s = `${this.pathData}/graphql`, o = await this.clientFetch(s, {
|
|
259
280
|
method: "POST",
|
|
260
281
|
body: JSON.stringify({ query: e, variables: r, operationName: n }),
|
|
261
|
-
headers:
|
|
282
|
+
headers: I(we, a)
|
|
262
283
|
});
|
|
263
|
-
return
|
|
284
|
+
return G(o, "Mosaic", s);
|
|
264
285
|
}
|
|
265
286
|
}
|
|
266
|
-
function
|
|
287
|
+
function ve() {
|
|
267
288
|
const t = globalThis.MOSAIC_ENV;
|
|
268
289
|
return {
|
|
269
290
|
instanceUrl: t?.instanceUrl,
|
|
270
291
|
accessToken: t?.accessToken,
|
|
271
|
-
apiVersion: t?.apiVersion
|
|
292
|
+
apiVersion: t?.apiVersion,
|
|
293
|
+
lightningDomain: t?.lightningDomain,
|
|
294
|
+
isInternal: t?.isInternal
|
|
272
295
|
};
|
|
273
296
|
}
|
|
274
|
-
function
|
|
297
|
+
function k(t) {
|
|
275
298
|
if (!t || t === "/") return "";
|
|
276
299
|
let e = t;
|
|
277
300
|
return !e.startsWith("/") && !e.startsWith("http") && (e = `/${e}`), e.endsWith("/") && (e = e.slice(0, -1)), e;
|
|
278
301
|
}
|
|
279
|
-
const
|
|
280
|
-
class
|
|
302
|
+
const Ee = "graphqlQuery";
|
|
303
|
+
class Se {
|
|
281
304
|
graphql;
|
|
282
305
|
constructor() {
|
|
283
|
-
this.graphql =
|
|
306
|
+
this.graphql = U(this.executeRawGraphQL.bind(this));
|
|
284
307
|
}
|
|
285
308
|
/**
|
|
286
309
|
* The `headers` request option is intentionally not forwarded: this surface
|
|
@@ -292,60 +315,61 @@ class ve {
|
|
|
292
315
|
variables: r,
|
|
293
316
|
operationName: n
|
|
294
317
|
}) {
|
|
295
|
-
return (await window.openai.callTool(
|
|
318
|
+
return (await window.openai.callTool(Ee, {
|
|
296
319
|
query: e,
|
|
297
320
|
...r != null ? { variables: r } : {},
|
|
298
321
|
...n != null ? { operationName: n } : {}
|
|
299
322
|
})).structuredContent;
|
|
300
323
|
}
|
|
301
324
|
}
|
|
302
|
-
const
|
|
325
|
+
const C = "Accept-Language", Ce = (t) => {
|
|
303
326
|
const e = globalThis.SFDC_ENV?.language;
|
|
304
327
|
if (!e)
|
|
305
328
|
return l(t);
|
|
306
329
|
const [r, n] = t;
|
|
307
|
-
return (r instanceof Request && !n?.headers ? r.headers.has(
|
|
308
|
-
},
|
|
309
|
-
let e =
|
|
310
|
-
return e =
|
|
311
|
-
},
|
|
312
|
-
function
|
|
330
|
+
return (r instanceof Request && !n?.headers ? r.headers.has(C) : new Headers(n?.headers).has(C)) ? l(t) : l(y(C, e, t));
|
|
331
|
+
}, De = "X-SFDC-Client-Name", xe = "X-SFDC-Client-Version", Oe = "@salesforce/platform-sdk", Ne = "12.7.0", $e = (t) => {
|
|
332
|
+
let e = y(De, Oe, t);
|
|
333
|
+
return e = y(xe, Ne, e), l(e);
|
|
334
|
+
}, Ae = "X-CSRF-Token";
|
|
335
|
+
function Pe(t, e = {}) {
|
|
313
336
|
const { protectedUrls: r = [], alwaysProtectedUrls: n = [] } = e;
|
|
314
|
-
return async (
|
|
315
|
-
const [
|
|
316
|
-
if (
|
|
337
|
+
return async (a) => {
|
|
338
|
+
const [s, o] = a, i = s instanceof Request ? s.url : s instanceof URL ? s.href : s, c = o?.method ?? (s instanceof Request ? s.method : void 0) ?? "GET";
|
|
339
|
+
if (T(n, i) || qe(c) && T(r, i)) {
|
|
317
340
|
const u = await t.getToken();
|
|
318
|
-
|
|
341
|
+
a = y(Ae, u, a);
|
|
319
342
|
}
|
|
320
|
-
return l(
|
|
343
|
+
return l(a);
|
|
321
344
|
};
|
|
322
345
|
}
|
|
323
|
-
function
|
|
346
|
+
function qe(t) {
|
|
324
347
|
const e = t.toLowerCase();
|
|
325
348
|
return e === "post" || e === "put" || e === "patch" || e === "delete";
|
|
326
349
|
}
|
|
327
|
-
function
|
|
350
|
+
function T(t, e) {
|
|
328
351
|
const r = new URL(e, globalThis.location?.href ?? "http://localhost");
|
|
329
352
|
return t.some((n) => r.pathname.includes(n));
|
|
330
353
|
}
|
|
331
|
-
function
|
|
332
|
-
const r =
|
|
333
|
-
async function n(
|
|
334
|
-
const
|
|
335
|
-
return fetch(
|
|
354
|
+
function _e(t, e = {}) {
|
|
355
|
+
const r = Pe(t, e);
|
|
356
|
+
async function n(a) {
|
|
357
|
+
const s = await r(a);
|
|
358
|
+
return fetch(s[0], s[1]);
|
|
336
359
|
}
|
|
337
|
-
return (
|
|
360
|
+
return (a, s) => s ? s.applyRetry(async () => n(a)) : n(a);
|
|
338
361
|
}
|
|
339
|
-
const
|
|
340
|
-
class
|
|
362
|
+
const ke = [400, 401, 403];
|
|
363
|
+
class Te extends Z {
|
|
341
364
|
constructor(e) {
|
|
342
365
|
super(e), this.csrfTokenManager = e;
|
|
343
366
|
}
|
|
367
|
+
csrfTokenManager;
|
|
344
368
|
/**
|
|
345
369
|
* Determines if a failed request should be retried due to CSRF token issues.
|
|
346
370
|
*/
|
|
347
371
|
async shouldRetry(e, r) {
|
|
348
|
-
return r.attempt >= 1 ? !1 :
|
|
372
|
+
return r.attempt >= 1 ? !1 : ke.includes(e.status);
|
|
349
373
|
}
|
|
350
374
|
/**
|
|
351
375
|
* CSRF token refresh should happen immediately with no delay.
|
|
@@ -363,10 +387,12 @@ class Pe extends X {
|
|
|
363
387
|
await this.csrfTokenManager.refreshToken();
|
|
364
388
|
}
|
|
365
389
|
}
|
|
366
|
-
class
|
|
390
|
+
class Re {
|
|
367
391
|
constructor(e, r) {
|
|
368
392
|
this.endpoint = e, this.cacheName = r, this.tokenPromise = this.obtainToken();
|
|
369
393
|
}
|
|
394
|
+
endpoint;
|
|
395
|
+
cacheName;
|
|
370
396
|
tokenPromise;
|
|
371
397
|
refreshPromise;
|
|
372
398
|
/**
|
|
@@ -392,10 +418,10 @@ class _e {
|
|
|
392
418
|
* @returns Promise that resolves to the CSRF token string
|
|
393
419
|
*/
|
|
394
420
|
async obtainToken() {
|
|
395
|
-
let e = await this.withCache((
|
|
421
|
+
let e = await this.withCache((a) => a.match(this.endpoint)), r = !1;
|
|
396
422
|
e || (e = await fetch(this.endpoint, { method: "get" }), r = !0);
|
|
397
423
|
const n = (await e.clone().json()).csrfToken;
|
|
398
|
-
return r && await this.withCache((
|
|
424
|
+
return r && await this.withCache((a) => a.put(this.endpoint, e)), n;
|
|
399
425
|
}
|
|
400
426
|
/**
|
|
401
427
|
* Provides a safe way to interact with the Cache API with fallback for unsupported environments.
|
|
@@ -411,29 +437,29 @@ class _e {
|
|
|
411
437
|
return;
|
|
412
438
|
}
|
|
413
439
|
}
|
|
414
|
-
const
|
|
415
|
-
function
|
|
440
|
+
const R = /* @__PURE__ */ new Map();
|
|
441
|
+
function Me(t) {
|
|
416
442
|
const { endpoint: e, cacheName: r, ...n } = t.csrf;
|
|
417
|
-
let
|
|
418
|
-
return
|
|
443
|
+
let a = R.get(e);
|
|
444
|
+
return a || (a = new Re(e, r), R.set(e, a)), V(
|
|
419
445
|
{
|
|
420
|
-
retry:
|
|
421
|
-
request: [
|
|
446
|
+
retry: _e(a, n),
|
|
447
|
+
request: [$e, Ce]
|
|
422
448
|
},
|
|
423
|
-
|
|
449
|
+
ee(new Te(a)).service
|
|
424
450
|
).service;
|
|
425
451
|
}
|
|
426
|
-
const
|
|
427
|
-
function
|
|
428
|
-
let e =
|
|
452
|
+
const M = /* @__PURE__ */ new Map();
|
|
453
|
+
function Le(t) {
|
|
454
|
+
let e = M.get(t);
|
|
429
455
|
if (!e) {
|
|
430
|
-
const r =
|
|
431
|
-
e = { cache: r, cacheController:
|
|
456
|
+
const r = te().service, n = ne(r).service, a = re(r, n).service, s = se().service;
|
|
457
|
+
e = { cache: r, cacheController: a, pubSub: s }, M.set(t, e);
|
|
432
458
|
}
|
|
433
459
|
return e;
|
|
434
460
|
}
|
|
435
|
-
function
|
|
436
|
-
const r =
|
|
461
|
+
function Ve(t, e) {
|
|
462
|
+
const r = Le(t);
|
|
437
463
|
return {
|
|
438
464
|
shared: r,
|
|
439
465
|
services: {
|
|
@@ -443,31 +469,32 @@ function Re(t, e) {
|
|
|
443
469
|
}
|
|
444
470
|
};
|
|
445
471
|
}
|
|
446
|
-
const
|
|
447
|
-
function
|
|
472
|
+
const L = 300;
|
|
473
|
+
function Ie(t, e) {
|
|
448
474
|
try {
|
|
449
475
|
return JSON.parse(JSON.stringify(t));
|
|
450
476
|
} catch (r) {
|
|
451
|
-
const n = e || "(anonymous)",
|
|
477
|
+
const n = e || "(anonymous)", a = new TypeError(
|
|
452
478
|
`HttpGraphQLResourceCacheControlCommand: variables for operation "${n}" must be JSON-serializable. ${r.message}`
|
|
453
479
|
);
|
|
454
|
-
throw
|
|
480
|
+
throw a.cause = r, a;
|
|
455
481
|
}
|
|
456
482
|
}
|
|
457
|
-
function
|
|
483
|
+
function He(t) {
|
|
458
484
|
if (typeof t == "object" && t.type === "max-age") {
|
|
459
485
|
const e = t.maxAge;
|
|
460
|
-
return Number.isFinite(e) && e >= 0 ? e :
|
|
486
|
+
return Number.isFinite(e) && e >= 0 ? e : L;
|
|
461
487
|
}
|
|
462
|
-
return
|
|
488
|
+
return L;
|
|
463
489
|
}
|
|
464
|
-
class
|
|
490
|
+
class Ge extends ae {
|
|
465
491
|
constructor(e, r, n) {
|
|
466
|
-
super(r), this.url = n, this.query = e.query, this.normalizedOperationName = e.operationName ?? "", this.normalizedVariables =
|
|
492
|
+
super(r), this.url = n, this.query = e.query, this.normalizedOperationName = e.operationName ?? "", this.normalizedVariables = Ie(
|
|
467
493
|
e.variables ?? {},
|
|
468
494
|
this.normalizedOperationName
|
|
469
|
-
), this.cacheControl = e.cacheControl, this.resolvedMaxAge =
|
|
495
|
+
), this.cacheControl = e.cacheControl, this.resolvedMaxAge = He(e.cacheControl), this.headers = e.headers, this.headersKey = me(e.headers);
|
|
470
496
|
}
|
|
497
|
+
url;
|
|
471
498
|
query;
|
|
472
499
|
normalizedVariables;
|
|
473
500
|
normalizedOperationName;
|
|
@@ -480,7 +507,7 @@ class Le extends ne {
|
|
|
480
507
|
this.url,
|
|
481
508
|
{
|
|
482
509
|
method: "POST",
|
|
483
|
-
headers:
|
|
510
|
+
headers: H(this.headers),
|
|
484
511
|
body: JSON.stringify({
|
|
485
512
|
query: this.query,
|
|
486
513
|
variables: this.normalizedVariables,
|
|
@@ -495,7 +522,7 @@ class Le extends ne {
|
|
|
495
522
|
variables: this.normalizedVariables,
|
|
496
523
|
operationName: this.normalizedOperationName
|
|
497
524
|
};
|
|
498
|
-
return this.headersKey !== void 0 && (e.headers = this.headersKey),
|
|
525
|
+
return this.headersKey !== void 0 && (e.headers = this.headersKey), J(e);
|
|
499
526
|
}
|
|
500
527
|
/**
|
|
501
528
|
* Reads from the cache and returns the cache result or error
|
|
@@ -513,7 +540,7 @@ class Le extends ne {
|
|
|
513
540
|
readFromCache(e) {
|
|
514
541
|
const r = this.buildKey(), n = e.get(r)?.value;
|
|
515
542
|
return n === void 0 ? l(
|
|
516
|
-
|
|
543
|
+
O(new W("No cached entry found for this query."))
|
|
517
544
|
) : l(x(n));
|
|
518
545
|
}
|
|
519
546
|
writeToCache(e, r) {
|
|
@@ -544,90 +571,90 @@ class Le extends ne {
|
|
|
544
571
|
return e.errors && e.errors.length > 0;
|
|
545
572
|
}
|
|
546
573
|
processFetchReturnValue(e) {
|
|
547
|
-
return this.responseHasErrors(e) ?
|
|
574
|
+
return this.responseHasErrors(e) ? O(new B(e)) : x(e);
|
|
548
575
|
}
|
|
549
576
|
}
|
|
550
|
-
const
|
|
551
|
-
function
|
|
577
|
+
const Fe = "CACHE_MISS";
|
|
578
|
+
function Ue() {
|
|
552
579
|
return [
|
|
553
580
|
{
|
|
554
581
|
message: "No cached entry found for this query (cacheControl: 'only-if-cached').",
|
|
555
|
-
extensions: { code:
|
|
582
|
+
extensions: { code: Fe }
|
|
556
583
|
}
|
|
557
584
|
];
|
|
558
585
|
}
|
|
559
|
-
function
|
|
560
|
-
if (
|
|
586
|
+
function Q(t) {
|
|
587
|
+
if (X(t) && t.data && typeof t.data == "object") {
|
|
561
588
|
const e = t.data;
|
|
562
589
|
if (e.data != null)
|
|
563
590
|
return e.data;
|
|
564
591
|
}
|
|
565
592
|
}
|
|
566
|
-
function
|
|
593
|
+
function je(t) {
|
|
567
594
|
return (e) => {
|
|
568
595
|
if (e.isOk()) {
|
|
569
596
|
const r = e.value;
|
|
570
597
|
w(r), t({ data: r, errors: void 0 });
|
|
571
598
|
} else {
|
|
572
|
-
const r =
|
|
599
|
+
const r = Q(e.error);
|
|
573
600
|
r && w(r), t({ data: r, errors: m(e.error) });
|
|
574
601
|
}
|
|
575
602
|
};
|
|
576
603
|
}
|
|
577
|
-
async function
|
|
578
|
-
let r, n,
|
|
604
|
+
async function Qe(t, e = !1) {
|
|
605
|
+
let r, n, a;
|
|
579
606
|
try {
|
|
580
|
-
const
|
|
581
|
-
|
|
582
|
-
} catch (
|
|
583
|
-
n = m(
|
|
607
|
+
const s = await t.execute();
|
|
608
|
+
s.isOk() ? (r = s.value.data, w(r), a = (o) => s.value.subscribe(o)) : (r = Q(s.error.failure), r && w(r), n = e && r === void 0 ? Ue() : m(s.error.failure), a = (o) => s.error.subscribe(o));
|
|
609
|
+
} catch (s) {
|
|
610
|
+
n = m(s);
|
|
584
611
|
}
|
|
585
612
|
return {
|
|
586
613
|
data: r,
|
|
587
614
|
errors: n,
|
|
588
|
-
subscribe(
|
|
589
|
-
return
|
|
615
|
+
subscribe(s) {
|
|
616
|
+
return a ? a(je(s)) : v;
|
|
590
617
|
},
|
|
591
618
|
async refresh() {
|
|
592
619
|
await t.refresh();
|
|
593
620
|
}
|
|
594
621
|
};
|
|
595
622
|
}
|
|
596
|
-
function
|
|
623
|
+
function D(t) {
|
|
597
624
|
return {
|
|
598
625
|
data: void 0,
|
|
599
626
|
errors: t,
|
|
600
|
-
subscribe: () =>
|
|
601
|
-
refresh:
|
|
627
|
+
subscribe: () => v,
|
|
628
|
+
refresh: N
|
|
602
629
|
};
|
|
603
630
|
}
|
|
604
|
-
function
|
|
631
|
+
function Ke({
|
|
605
632
|
bundle: t,
|
|
606
633
|
url: e,
|
|
607
634
|
executeRaw: r
|
|
608
635
|
}) {
|
|
609
636
|
const { services: n } = t;
|
|
610
|
-
async function
|
|
611
|
-
query:
|
|
637
|
+
async function a({
|
|
638
|
+
query: s,
|
|
612
639
|
variables: o,
|
|
613
640
|
operationName: i,
|
|
614
641
|
cacheControl: c,
|
|
615
642
|
headers: h
|
|
616
643
|
}) {
|
|
617
|
-
const u =
|
|
618
|
-
if (u.isErr()) return
|
|
619
|
-
const
|
|
644
|
+
const u = A(s);
|
|
645
|
+
if (u.isErr()) return D(u.error);
|
|
646
|
+
const p = u.value, f = P(p, i);
|
|
620
647
|
if (f !== "query")
|
|
621
|
-
return
|
|
648
|
+
return D([
|
|
622
649
|
{
|
|
623
650
|
message: `DataSDK.graphql.query() requires a GraphQL query, received ${f}.`
|
|
624
651
|
}
|
|
625
652
|
]);
|
|
626
|
-
let
|
|
653
|
+
let d;
|
|
627
654
|
try {
|
|
628
|
-
|
|
655
|
+
d = new Ge(
|
|
629
656
|
{
|
|
630
|
-
query:
|
|
657
|
+
query: $(p),
|
|
631
658
|
variables: o,
|
|
632
659
|
operationName: i,
|
|
633
660
|
cacheControl: c,
|
|
@@ -637,17 +664,17 @@ function Fe({
|
|
|
637
664
|
e
|
|
638
665
|
);
|
|
639
666
|
} catch (E) {
|
|
640
|
-
return
|
|
667
|
+
return D(m(E));
|
|
641
668
|
}
|
|
642
|
-
return
|
|
669
|
+
return Qe(d, c === "only-if-cached");
|
|
643
670
|
}
|
|
644
671
|
return {
|
|
645
|
-
query:
|
|
646
|
-
mutate: (
|
|
672
|
+
query: a,
|
|
673
|
+
mutate: (s) => F(r, s)
|
|
647
674
|
};
|
|
648
675
|
}
|
|
649
|
-
const
|
|
650
|
-
class
|
|
676
|
+
const ze = 1, Je = `@salesforce/platform-sdk-data_v${ze}`;
|
|
677
|
+
class We {
|
|
651
678
|
baseUrl;
|
|
652
679
|
pathData;
|
|
653
680
|
clientFetch;
|
|
@@ -655,27 +682,27 @@ class Ke {
|
|
|
655
682
|
apiVersion;
|
|
656
683
|
graphql;
|
|
657
684
|
constructor(e) {
|
|
658
|
-
const r =
|
|
659
|
-
this.baseUrl =
|
|
660
|
-
const n = `${this.pathData}/ui-api`,
|
|
661
|
-
this.onStatus = e?.onStatus ?? {}, this.clientFetch =
|
|
685
|
+
const r = Be();
|
|
686
|
+
this.baseUrl = Xe(e?.basePath ?? r.apiPath), this.apiVersion = e?.apiVersion ?? q, this.pathData = j(this.apiVersion);
|
|
687
|
+
const n = `${this.pathData}/ui-api`, a = `${this.pathData}/graphql`;
|
|
688
|
+
this.onStatus = e?.onStatus ?? {}, this.clientFetch = Me({
|
|
662
689
|
csrf: {
|
|
663
690
|
endpoint: `${this.baseUrl}${n}/session/csrf`,
|
|
664
|
-
cacheName:
|
|
691
|
+
cacheName: Je,
|
|
665
692
|
protectedUrls: ["services/data/v", "services/apexrest"],
|
|
666
693
|
alwaysProtectedUrls: ["services/apexrest"]
|
|
667
694
|
}
|
|
668
695
|
});
|
|
669
|
-
const
|
|
670
|
-
this.graphql =
|
|
696
|
+
const s = (i, c) => this.fetch(i, c), o = Ve(`${this.baseUrl}${this.pathData}`, s);
|
|
697
|
+
this.graphql = Ke({
|
|
671
698
|
bundle: o,
|
|
672
|
-
url:
|
|
699
|
+
url: a,
|
|
673
700
|
executeRaw: this.executeRawGraphQL.bind(this)
|
|
674
701
|
});
|
|
675
702
|
}
|
|
676
703
|
async fetch(e, r) {
|
|
677
|
-
const n = this.applySalesforceBase(e),
|
|
678
|
-
return await this.onStatus[
|
|
704
|
+
const n = this.applySalesforceBase(e), a = await this.clientFetch(n, r);
|
|
705
|
+
return await this.onStatus[a.status]?.(), a;
|
|
679
706
|
}
|
|
680
707
|
/**
|
|
681
708
|
* Raw GraphQL POST. On the WebApp surface this is the mutate-only path:
|
|
@@ -687,14 +714,14 @@ class Ke {
|
|
|
687
714
|
query: e,
|
|
688
715
|
variables: r,
|
|
689
716
|
operationName: n,
|
|
690
|
-
headers:
|
|
717
|
+
headers: a
|
|
691
718
|
}) {
|
|
692
|
-
const
|
|
719
|
+
const s = `${this.pathData}/graphql`, o = await this.fetch(s, {
|
|
693
720
|
method: "POST",
|
|
694
721
|
body: JSON.stringify({ query: e, variables: r, operationName: n }),
|
|
695
|
-
headers:
|
|
722
|
+
headers: H(a)
|
|
696
723
|
});
|
|
697
|
-
return
|
|
724
|
+
return G(o, "WebApp", s);
|
|
698
725
|
}
|
|
699
726
|
/**
|
|
700
727
|
* If the url is relative, convert to it to an absolute Salesforce URL. This is due to the way Code
|
|
@@ -710,44 +737,44 @@ class Ke {
|
|
|
710
737
|
return e;
|
|
711
738
|
}
|
|
712
739
|
}
|
|
713
|
-
function
|
|
740
|
+
function Be() {
|
|
714
741
|
return {
|
|
715
742
|
apiPath: globalThis.SFDC_ENV?.apiPath
|
|
716
743
|
};
|
|
717
744
|
}
|
|
718
|
-
function
|
|
745
|
+
function Xe(t) {
|
|
719
746
|
if (!t || t === "/") return "";
|
|
720
747
|
let e = t;
|
|
721
748
|
return e.startsWith("/") || (e = `/${e}`), e.endsWith("/") && (e = e.slice(0, -1)), e;
|
|
722
749
|
}
|
|
723
|
-
function
|
|
724
|
-
const e = t, r = typeof e == "object" && e !== null ? e : void 0, n = r !== void 0 && "setup" in r,
|
|
725
|
-
if (typeof
|
|
750
|
+
function Ye(t) {
|
|
751
|
+
const e = t, r = typeof e == "object" && e !== null ? e : void 0, n = r !== void 0 && "setup" in r, a = n ? r : r?.extension, s = n ? a?.name : r?.as;
|
|
752
|
+
if (typeof a?.setup != "function")
|
|
726
753
|
throw new Error("Extension entry cannot attach: it is missing a setup function.");
|
|
727
|
-
if (typeof
|
|
754
|
+
if (typeof s != "string" || s.length === 0)
|
|
728
755
|
throw new Error(
|
|
729
756
|
n ? 'Extension entry cannot attach: "name" must be a non-empty string.' : 'Extension entry cannot attach: alias "as" must be a non-empty string.'
|
|
730
757
|
);
|
|
731
758
|
return {
|
|
732
|
-
extension:
|
|
733
|
-
mountName:
|
|
734
|
-
label:
|
|
759
|
+
extension: a,
|
|
760
|
+
mountName: s,
|
|
761
|
+
label: s === a.name ? `"${a.name}"` : `"${a.name}" (aliased as "${s}")`
|
|
735
762
|
};
|
|
736
763
|
}
|
|
737
|
-
async function
|
|
764
|
+
async function Ze(t, e, r) {
|
|
738
765
|
if (e.length === 0)
|
|
739
766
|
return t;
|
|
740
767
|
if ("ext" in t)
|
|
741
768
|
throw new Error(
|
|
742
769
|
'Cannot attach extensions: the base SDK already declares an "ext" member, which the extension container reserves.'
|
|
743
770
|
);
|
|
744
|
-
const n = e.map(
|
|
771
|
+
const n = e.map(Ye);
|
|
745
772
|
r?.preflight?.(n, t);
|
|
746
|
-
const
|
|
773
|
+
const a = Object.create(t), s = /* @__PURE__ */ Object.create(null), o = (h) => {
|
|
747
774
|
throw new Error(`Cannot write "ext.${String(h)}" — ext is immutable once attached.`);
|
|
748
775
|
}, i = (h) => {
|
|
749
776
|
throw new Error(`Cannot ${h} "ext" — ext is immutable once attached.`);
|
|
750
|
-
}, c = new Proxy(
|
|
777
|
+
}, c = new Proxy(s, {
|
|
751
778
|
set(h, u) {
|
|
752
779
|
return o(u);
|
|
753
780
|
},
|
|
@@ -768,52 +795,52 @@ async function Be(t, e, r) {
|
|
|
768
795
|
return i("change the prototype of");
|
|
769
796
|
}
|
|
770
797
|
});
|
|
771
|
-
Object.defineProperty(
|
|
798
|
+
Object.defineProperty(a, "ext", {
|
|
772
799
|
value: c,
|
|
773
800
|
enumerable: !0,
|
|
774
801
|
writable: !1,
|
|
775
802
|
configurable: !1
|
|
776
803
|
});
|
|
777
|
-
for (const { extension: h, mountName: u, label:
|
|
778
|
-
if (Object.hasOwn(
|
|
804
|
+
for (const { extension: h, mountName: u, label: p } of n) {
|
|
805
|
+
if (Object.hasOwn(s, u))
|
|
779
806
|
throw new Error(
|
|
780
|
-
`Extension ${
|
|
807
|
+
`Extension ${p} cannot attach: "${u}" is already defined by another extension.`
|
|
781
808
|
);
|
|
782
809
|
let f;
|
|
783
810
|
try {
|
|
784
|
-
f = await h.setup(
|
|
785
|
-
} catch (
|
|
786
|
-
throw new Error(`Extension ${
|
|
811
|
+
f = await h.setup(a);
|
|
812
|
+
} catch (d) {
|
|
813
|
+
throw new Error(`Extension ${p} failed during setup.`, { cause: d });
|
|
787
814
|
}
|
|
788
|
-
Object.defineProperty(
|
|
815
|
+
Object.defineProperty(s, u, {
|
|
789
816
|
value: f,
|
|
790
817
|
enumerable: !0,
|
|
791
818
|
writable: !1,
|
|
792
819
|
configurable: !1
|
|
793
820
|
});
|
|
794
821
|
}
|
|
795
|
-
return Object.freeze(
|
|
822
|
+
return Object.freeze(s), a;
|
|
796
823
|
}
|
|
797
|
-
function
|
|
824
|
+
function dt(t, ...e) {
|
|
798
825
|
let r = t[0] ?? "";
|
|
799
826
|
for (let n = 0; n < e.length; n += 1)
|
|
800
827
|
r += String(e[n]) + (t[n + 1] ?? "");
|
|
801
828
|
return r;
|
|
802
829
|
}
|
|
803
|
-
function
|
|
830
|
+
function pt(t) {
|
|
804
831
|
return t;
|
|
805
832
|
}
|
|
806
|
-
async function
|
|
833
|
+
async function et(t) {
|
|
807
834
|
try {
|
|
808
|
-
switch (await
|
|
809
|
-
case
|
|
810
|
-
return new
|
|
811
|
-
case
|
|
812
|
-
case
|
|
813
|
-
return new
|
|
814
|
-
case
|
|
815
|
-
return new
|
|
816
|
-
case
|
|
835
|
+
switch (await K(t?.surface)) {
|
|
836
|
+
case b.OpenAI:
|
|
837
|
+
return new Se();
|
|
838
|
+
case b.WebApp:
|
|
839
|
+
case b.MicroFrontend:
|
|
840
|
+
return new We(t?.webapp);
|
|
841
|
+
case b.Mosaic:
|
|
842
|
+
return new ge(t?.mosaic);
|
|
843
|
+
case b.MCPApps:
|
|
817
844
|
return {};
|
|
818
845
|
default:
|
|
819
846
|
return {};
|
|
@@ -822,19 +849,19 @@ async function Xe(t) {
|
|
|
822
849
|
return {};
|
|
823
850
|
}
|
|
824
851
|
}
|
|
825
|
-
function
|
|
826
|
-
return
|
|
852
|
+
function ft(t) {
|
|
853
|
+
return z(
|
|
827
854
|
(async () => {
|
|
828
|
-
const e = await
|
|
829
|
-
return
|
|
830
|
-
preflight:
|
|
855
|
+
const e = await et(t);
|
|
856
|
+
return Ze(e, t?.extensions ?? [], {
|
|
857
|
+
preflight: ie
|
|
831
858
|
});
|
|
832
859
|
})(),
|
|
833
860
|
"createDataSDK"
|
|
834
861
|
);
|
|
835
862
|
}
|
|
836
863
|
export {
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
864
|
+
ft as createDataSDK,
|
|
865
|
+
pt as defineDataExtension,
|
|
866
|
+
dt as gql
|
|
840
867
|
};
|