twenty-sdk 2.13.0 → 2.14.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/CHANGELOG.md +17 -0
- package/dist/{AllIcons-BwIoyggb-DpmEuQAR.mjs → AllIcons-BwIoyggb-BCMFgulw.mjs} +1 -1
- package/dist/{AllIcons-BwIoyggb-Ck9DmOFs.js → AllIcons-BwIoyggb-Pq3paugc.js} +1 -1
- package/dist/{catalog-sync-BfaTQFam.mjs → catalog-sync-CXDxoJ8O.mjs} +1 -1
- package/dist/{catalog-sync-MvJJHh7v.js → catalog-sync-sANH0f3Y.js} +1 -1
- package/dist/cli.cjs +3 -3
- package/dist/cli.mjs +4 -4
- package/dist/define/index.cjs +2 -2
- package/dist/define/index.cjs.map +1 -1
- package/dist/define/index.d.ts +9 -3
- package/dist/define/index.mjs +133 -140
- package/dist/define/index.mjs.map +1 -1
- package/dist/{display-Co0K-nTB-CPdyKmin.js → display-Co0K-nTB-CGtaWbMi.js} +15 -15
- package/dist/{display-Co0K-nTB-DIalVNdw.mjs → display-Co0K-nTB-DAirZFT6.mjs} +3776 -3796
- package/dist/front-component/index.cjs +1 -1
- package/dist/front-component/index.cjs.map +1 -1
- package/dist/front-component/index.d.ts +5 -1
- package/dist/front-component/index.mjs +5 -5
- package/dist/front-component/index.mjs.map +1 -1
- package/dist/front-component-renderer.cjs +1 -1
- package/dist/{get-function-input-schema-NI9y_bIk-LH_O2OgF.mjs → get-function-input-schema-NI9y_bIk-Cdh2RIb9.mjs} +1 -1
- package/dist/{get-function-input-schema-NI9y_bIk-BZ2G7LIj.js → get-function-input-schema-NI9y_bIk-CqUY25sG.js} +1 -1
- package/dist/{login-oauth-DN2eTP67.js → login-oauth-0T8eWvyh.js} +10 -10
- package/dist/{login-oauth-BMTHndmD.mjs → login-oauth-BRpqOH2x.mjs} +393 -395
- package/dist/operations.cjs +1 -1
- package/dist/operations.mjs +1 -1
- package/dist/ui/index.cjs +1 -1
- package/dist/ui/index.mjs +1 -1
- package/package.json +2 -2
|
@@ -28460,7 +28460,7 @@ function PA() {
|
|
|
28460
28460
|
return uA(AA, arguments);
|
|
28461
28461
|
}
|
|
28462
28462
|
//#endregion
|
|
28463
|
-
//#region ../twenty-shared/dist/utils-
|
|
28463
|
+
//#region ../twenty-shared/dist/utils-BABg2N6J.mjs
|
|
28464
28464
|
var FA = /* @__PURE__ */ Pe(uk(), 1), IA = /* @__PURE__ */ Pe(dk(), 1);
|
|
28465
28465
|
fk(), iA(), U.TEXT, U.FULL_NAME, U.EMAILS, U.ADDRESS, U.LINKS, U.PHONES, U.RICH_TEXT, U.UUID;
|
|
28466
28466
|
var LA = (e) => /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e);
|
|
@@ -28890,21 +28890,12 @@ var oj = (e) => jm.filter((t) => +t.split("_")[1] >= e), sj = (e) => jm.filter((
|
|
|
28890
28890
|
W.IS_NOT,
|
|
28891
28891
|
W.IS_EMPTY,
|
|
28892
28892
|
W.IS_NOT_EMPTY
|
|
28893
|
-
], _j = ({ filterType: e, subFieldName: t }) => e === "CURRENCY" ? t === "currencyCode" ? fj.CURRENCY.currencyCode : fj.CURRENCY.amountMicros : e === "ACTOR" && (t === "source" || t === "workspaceMemberId") ? gj : hj[e], vj = (e, t, n) => Object.values(km[e]).includes(t) && t === n;
|
|
28894
|
-
|
|
28895
|
-
|
|
28896
|
-
return yj = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
28897
|
-
return typeof e;
|
|
28898
|
-
} : function(e) {
|
|
28899
|
-
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
28900
|
-
}, yj(e);
|
|
28901
|
-
}
|
|
28902
|
-
var bj = 365.2425, xj = 3600 * 24;
|
|
28903
|
-
xj * 7, xj * bj / 12 * 3;
|
|
28904
|
-
var Sj = Su().transform((e) => e === "" ? [] : tM(e) ? [e] : JSON.parse(e)).refine((e) => Array.isArray(e) && e.every((e) => typeof e == "string"), { error: "Expected an array of strings" }), Cj = dp((e) => {
|
|
28893
|
+
], _j = ({ filterType: e, subFieldName: t }) => e === "CURRENCY" ? t === "currencyCode" ? fj.CURRENCY.currencyCode : fj.CURRENCY.amountMicros : e === "ACTOR" && (t === "source" || t === "workspaceMemberId") ? gj : hj[e], vj = (e, t, n) => Object.values(km[e]).includes(t) && t === n, yj = 365.2425, bj = 3600 * 24;
|
|
28894
|
+
bj * 7, bj * yj / 12 * 3;
|
|
28895
|
+
var xj = Su().transform((e) => e === "" ? [] : eM(e) ? [e] : JSON.parse(e)).refine((e) => Array.isArray(e) && e.every((e) => typeof e == "string"), { error: "Expected an array of strings" }), Sj = dp((e) => {
|
|
28905
28896
|
try {
|
|
28906
28897
|
if (typeof e == "string") {
|
|
28907
|
-
if (
|
|
28898
|
+
if (eM(e)) return [e];
|
|
28908
28899
|
try {
|
|
28909
28900
|
let t = JSON.parse(e);
|
|
28910
28901
|
return Array.isArray(t) ? t : [t];
|
|
@@ -28916,11 +28907,11 @@ var Sj = Su().transform((e) => e === "" ? [] : tM(e) ? [e] : JSON.parse(e)).refi
|
|
|
28916
28907
|
} catch {
|
|
28917
28908
|
return [];
|
|
28918
28909
|
}
|
|
28919
|
-
}, Yd(Su().refine((e) => LA(e) ||
|
|
28910
|
+
}, Yd(Su().refine((e) => LA(e) || eM(e), "Must be a valid UUID or a variable with {{ }} syntax"))).catch([]), Cj = Qd({
|
|
28920
28911
|
isCurrentWorkspaceMemberSelected: Ed().optional(),
|
|
28921
28912
|
isCurrentRecordSelected: Ed().optional(),
|
|
28922
28913
|
selectedRecordIds: Yd(Su())
|
|
28923
|
-
}),
|
|
28914
|
+
}), wj = Su().transform((e, t) => {
|
|
28924
28915
|
try {
|
|
28925
28916
|
return JSON.parse(e);
|
|
28926
28917
|
} catch (e) {
|
|
@@ -28929,13 +28920,13 @@ var Sj = Su().transform((e) => e === "" ? [] : tM(e) ? [e] : JSON.parse(e)).refi
|
|
|
28929
28920
|
message: e.message
|
|
28930
28921
|
}), Re;
|
|
28931
28922
|
}
|
|
28932
|
-
}).pipe(
|
|
28923
|
+
}).pipe(Cj), Tj = ({ recordFilter: e, fieldMetadataItemById: t, filterValueDependencies: n }) => {
|
|
28933
28924
|
let r = t.get(e.fieldMetadataId);
|
|
28934
28925
|
if (G(r) && aj(e)) {
|
|
28935
28926
|
if (r.type === U.RELATION && G(e.relationTargetFieldMetadataId)) {
|
|
28936
28927
|
let i = t.get(e.relationTargetFieldMetadataId);
|
|
28937
28928
|
if (!G(i)) return;
|
|
28938
|
-
let a =
|
|
28929
|
+
let a = Ej({
|
|
28939
28930
|
recordFilter: {
|
|
28940
28931
|
...e,
|
|
28941
28932
|
fieldMetadataId: i.id,
|
|
@@ -28946,13 +28937,13 @@ var Sj = Su().transform((e) => e === "" ? [] : tM(e) ? [e] : JSON.parse(e)).refi
|
|
|
28946
28937
|
});
|
|
28947
28938
|
return G(a) ? { [r.name]: a } : void 0;
|
|
28948
28939
|
}
|
|
28949
|
-
return
|
|
28940
|
+
return Ej({
|
|
28950
28941
|
recordFilter: e,
|
|
28951
28942
|
fieldMetadataItem: r,
|
|
28952
28943
|
filterValueDependencies: n
|
|
28953
28944
|
});
|
|
28954
28945
|
}
|
|
28955
|
-
},
|
|
28946
|
+
}, Ej = ({ recordFilter: e, fieldMetadataItem: t, filterValueDependencies: n }) => {
|
|
28956
28947
|
if ($A({
|
|
28957
28948
|
recordFilterOperand: e.operand,
|
|
28958
28949
|
correspondingFieldMetadataItem: t
|
|
@@ -28984,7 +28975,7 @@ var Sj = Su().transform((e) => e === "" ? [] : tM(e) ? [e] : JSON.parse(e)).refi
|
|
|
28984
28975
|
}
|
|
28985
28976
|
case "DATE":
|
|
28986
28977
|
if (e.operand === W.IS_RELATIVE) {
|
|
28987
|
-
let n =
|
|
28978
|
+
let n = Vj(e.value), r = Hj({
|
|
28988
28979
|
value: "PAST_1_DAY",
|
|
28989
28980
|
operand: W.IS_RELATIVE
|
|
28990
28981
|
});
|
|
@@ -29010,9 +29001,9 @@ var Sj = Su().transform((e) => e === "" ? [] : tM(e) ? [e] : JSON.parse(e)).refi
|
|
|
29010
29001
|
throw Error(`Unknown operand ${e.operand} for ${a} filter`);
|
|
29011
29002
|
case "DATE_TIME":
|
|
29012
29003
|
if (e.operand === W.IS_RELATIVE) {
|
|
29013
|
-
let r =
|
|
29004
|
+
let r = Gj(e), i = G(r) && typeof r == "object" ? r : null;
|
|
29014
29005
|
if (!G(i)) throw Error(`Cannot parse relative date filter : "${e.value}"`);
|
|
29015
|
-
let a =
|
|
29006
|
+
let a = Gj({
|
|
29016
29007
|
value: `PAST_1_DAY;;${n.timeZone}`,
|
|
29017
29008
|
operand: W.IS_RELATIVE
|
|
29018
29009
|
});
|
|
@@ -29025,7 +29016,7 @@ var Sj = Su().transform((e) => e === "" ? [] : tM(e) ? [e] : JSON.parse(e)).refi
|
|
|
29025
29016
|
switch (e.operand) {
|
|
29026
29017
|
case W.IS_IN_PAST: return { [t.name]: { lt: r.toInstant().round("minute").toString() } };
|
|
29027
29018
|
case W.IS_IN_FUTURE: return { [t.name]: { gt: r.toInstant().round("minute").toString() } };
|
|
29028
|
-
case W.IS_TODAY: return { and: [{ [t.name]: { gte:
|
|
29019
|
+
case W.IS_TODAY: return { and: [{ [t.name]: { gte: jj(r, "DAY").toInstant().toString() } }, { [t.name]: { lt: Mj(r, "DAY").toInstant().toString() } }] };
|
|
29029
29020
|
}
|
|
29030
29021
|
} else {
|
|
29031
29022
|
if (!D(e.value)) throw Error("Date filter is empty");
|
|
@@ -29061,10 +29052,10 @@ var Sj = Su().transform((e) => e === "" ? [] : tM(e) ? [e] : JSON.parse(e)).refi
|
|
|
29061
29052
|
default: throw Error(`Unknown operand ${e.operand} for ${a} filter`);
|
|
29062
29053
|
}
|
|
29063
29054
|
case "RELATION": {
|
|
29064
|
-
let { isCurrentWorkspaceMemberSelected: r, isCurrentRecordSelected: i, selectedRecordIds: o } =
|
|
29055
|
+
let { isCurrentWorkspaceMemberSelected: r, isCurrentRecordSelected: i, selectedRecordIds: o } = wj.catch({
|
|
29065
29056
|
isCurrentWorkspaceMemberSelected: !1,
|
|
29066
29057
|
isCurrentRecordSelected: !1,
|
|
29067
|
-
selectedRecordIds:
|
|
29058
|
+
selectedRecordIds: Sj.parse(e.value)
|
|
29068
29059
|
}).parse(e.value), s = [
|
|
29069
29060
|
...o,
|
|
29070
29061
|
...r ? [n?.currentWorkspaceMemberId] : [],
|
|
@@ -29078,7 +29069,7 @@ var Sj = Su().transform((e) => e === "" ? [] : tM(e) ? [e] : JSON.parse(e)).refi
|
|
|
29078
29069
|
}
|
|
29079
29070
|
}
|
|
29080
29071
|
case "CURRENCY": if (vj(U.CURRENCY, "currencyCode", r)) {
|
|
29081
|
-
let n =
|
|
29072
|
+
let n = xj.parse(e.value);
|
|
29082
29073
|
if (n.length === 0) return;
|
|
29083
29074
|
let i = { [t.name]: { currencyCode: { in: n } } };
|
|
29084
29075
|
switch (e.operand) {
|
|
@@ -29110,7 +29101,7 @@ var Sj = Su().transform((e) => e === "" ? [] : tM(e) ? [e] : JSON.parse(e)).refi
|
|
|
29110
29101
|
case "ADDRESS": switch (e.operand) {
|
|
29111
29102
|
case W.CONTAINS: if (i) {
|
|
29112
29103
|
if (r === "addressCountry") {
|
|
29113
|
-
let n =
|
|
29104
|
+
let n = xj.parse(e.value);
|
|
29114
29105
|
return n.length === 0 ? {} : { [t.name]: { [r]: { in: n } } };
|
|
29115
29106
|
}
|
|
29116
29107
|
return { [t.name]: { [r]: { ilike: `%${e.value}%` } } };
|
|
@@ -29139,7 +29130,7 @@ var Sj = Su().transform((e) => e === "" ? [] : tM(e) ? [e] : JSON.parse(e)).refi
|
|
|
29139
29130
|
default: throw Error(`Unknown operand ${e.operand} for ${a} filter`);
|
|
29140
29131
|
}
|
|
29141
29132
|
case "MULTI_SELECT": {
|
|
29142
|
-
let n =
|
|
29133
|
+
let n = xj.parse(e.value);
|
|
29143
29134
|
if (n.length === 0) return;
|
|
29144
29135
|
let r = n.filter((e) => e === ""), i = n.filter((e) => e !== "");
|
|
29145
29136
|
switch (e.operand) {
|
|
@@ -29156,7 +29147,7 @@ var Sj = Su().transform((e) => e === "" ? [] : tM(e) ? [e] : JSON.parse(e)).refi
|
|
|
29156
29147
|
}
|
|
29157
29148
|
}
|
|
29158
29149
|
case "SELECT": {
|
|
29159
|
-
let n =
|
|
29150
|
+
let n = xj.parse(e.value);
|
|
29160
29151
|
if (n.length === 0) return;
|
|
29161
29152
|
let r = n.filter((e) => e === ""), i = n.filter((e) => e !== "");
|
|
29162
29153
|
switch (e.operand) {
|
|
@@ -29191,9 +29182,9 @@ var Sj = Su().transform((e) => e === "" ? [] : tM(e) ? [e] : JSON.parse(e)).refi
|
|
|
29191
29182
|
default: throw Error(`Unknown operand ${e.operand} for ${t.label} filter`);
|
|
29192
29183
|
}
|
|
29193
29184
|
if (r === "workspaceMemberId") {
|
|
29194
|
-
let { isCurrentWorkspaceMemberSelected: r, selectedRecordIds: i } =
|
|
29185
|
+
let { isCurrentWorkspaceMemberSelected: r, selectedRecordIds: i } = wj.catch({
|
|
29195
29186
|
isCurrentWorkspaceMemberSelected: !1,
|
|
29196
|
-
selectedRecordIds:
|
|
29187
|
+
selectedRecordIds: Sj.parse(e.value)
|
|
29197
29188
|
}).parse(e.value), a = r ? [...i, n?.currentWorkspaceMemberId].filter(G) : i;
|
|
29198
29189
|
if (!G(a) || a.length === 0) return;
|
|
29199
29190
|
switch (e.operand) {
|
|
@@ -29254,7 +29245,7 @@ var Sj = Su().transform((e) => e === "" ? [] : tM(e) ? [e] : JSON.parse(e)).refi
|
|
|
29254
29245
|
}
|
|
29255
29246
|
case "BOOLEAN": return { [t.name]: { eq: e.value === "true" } };
|
|
29256
29247
|
case "UUID": {
|
|
29257
|
-
let n =
|
|
29248
|
+
let n = Sj.parse(e.value), r = G(n) && n.length > 0 ? n : ["00000000-0000-4000-8000-000000000000"];
|
|
29258
29249
|
switch (e.operand) {
|
|
29259
29250
|
case W.IS: return { [t.name]: { in: r } };
|
|
29260
29251
|
case W.IS_NOT: return { not: { [t.name]: { in: r } } };
|
|
@@ -29263,14 +29254,14 @@ var Sj = Su().transform((e) => e === "" ? [] : tM(e) ? [e] : JSON.parse(e)).refi
|
|
|
29263
29254
|
}
|
|
29264
29255
|
default: throw Error("Unknown filter type");
|
|
29265
29256
|
}
|
|
29266
|
-
},
|
|
29257
|
+
}, Dj = ({ filterValueDependencies: e, filters: t, fieldMetadataItemById: n, recordFilterGroups: r, currentRecordFilterGroupId: i }) => {
|
|
29267
29258
|
let a = r.find((e) => e.id === i);
|
|
29268
29259
|
if (!G(a)) return;
|
|
29269
|
-
let o = t.filter((e) => e.recordFilterGroupId === i).map((t) =>
|
|
29260
|
+
let o = t.filter((e) => e.recordFilterGroupId === i).map((t) => Tj({
|
|
29270
29261
|
filterValueDependencies: e,
|
|
29271
29262
|
recordFilter: t,
|
|
29272
29263
|
fieldMetadataItemById: n
|
|
29273
|
-
})).filter(G), s = r.filter((e) => e.parentRecordFilterGroupId === i).map((i) =>
|
|
29264
|
+
})).filter(G), s = r.filter((e) => e.parentRecordFilterGroupId === i).map((i) => Dj({
|
|
29274
29265
|
filterValueDependencies: e,
|
|
29275
29266
|
filters: t,
|
|
29276
29267
|
fieldMetadataItemById: n,
|
|
@@ -29280,7 +29271,7 @@ var Sj = Su().transform((e) => e === "" ? [] : tM(e) ? [e] : JSON.parse(e)).refi
|
|
|
29280
29271
|
if (a.logicalOperator === tm.AND) return { and: [...o, ...s] };
|
|
29281
29272
|
if (a.logicalOperator === tm.OR) return { or: [...o, ...s] };
|
|
29282
29273
|
throw Error(`Unknown logical operator ${a.logicalOperator}`);
|
|
29283
|
-
},
|
|
29274
|
+
}, Oj = (e, t, n) => {
|
|
29284
29275
|
switch (t) {
|
|
29285
29276
|
case "DAY": return e.add({ days: n });
|
|
29286
29277
|
case "WEEK": return e.add({ weeks: n });
|
|
@@ -29292,22 +29283,22 @@ var Sj = Su().transform((e) => e === "" ? [] : tM(e) ? [e] : JSON.parse(e)).refi
|
|
|
29292
29283
|
case "HOUR": return e.add({ hours: n });
|
|
29293
29284
|
default: return zA(t);
|
|
29294
29285
|
}
|
|
29295
|
-
},
|
|
29286
|
+
}, kj = Cp.enum([
|
|
29296
29287
|
Xp.MONDAY,
|
|
29297
29288
|
Xp.SATURDAY,
|
|
29298
29289
|
Xp.SUNDAY
|
|
29299
|
-
]),
|
|
29290
|
+
]), Aj = (e) => {
|
|
29300
29291
|
switch (e) {
|
|
29301
29292
|
case Xp.MONDAY: return 1;
|
|
29302
29293
|
case Xp.SATURDAY: return 6;
|
|
29303
29294
|
case Xp.SUNDAY: return 7;
|
|
29304
29295
|
default: return zA(e);
|
|
29305
29296
|
}
|
|
29306
|
-
},
|
|
29297
|
+
}, jj = (e, t, n) => {
|
|
29307
29298
|
switch (t) {
|
|
29308
29299
|
case "DAY": return e.startOfDay();
|
|
29309
29300
|
case "WEEK": {
|
|
29310
|
-
let t = G(n) ?
|
|
29301
|
+
let t = G(n) ? Aj(n) : 1, r = (e.dayOfWeek - t + 7) % 7;
|
|
29311
29302
|
return e.startOfDay().subtract({ days: r });
|
|
29312
29303
|
}
|
|
29313
29304
|
case "QUARTER": {
|
|
@@ -29342,23 +29333,23 @@ var Sj = Su().transform((e) => e === "" ? [] : tM(e) ? [e] : JSON.parse(e)).refi
|
|
|
29342
29333
|
});
|
|
29343
29334
|
default: return zA(t);
|
|
29344
29335
|
}
|
|
29345
|
-
},
|
|
29336
|
+
}, Mj = (e, t, n) => {
|
|
29346
29337
|
switch (t) {
|
|
29347
|
-
case "DAY": return
|
|
29348
|
-
case "WEEK": return
|
|
29349
|
-
case "MONTH": return
|
|
29350
|
-
case "QUARTER": return
|
|
29351
|
-
case "YEAR": return
|
|
29352
|
-
case "SECOND": return
|
|
29353
|
-
case "MINUTE": return
|
|
29354
|
-
case "HOUR": return
|
|
29338
|
+
case "DAY": return jj(e, "DAY").add({ days: 1 });
|
|
29339
|
+
case "WEEK": return jj(e, "WEEK", n).add({ weeks: 1 });
|
|
29340
|
+
case "MONTH": return jj(e, "MONTH", n).add({ months: 1 });
|
|
29341
|
+
case "QUARTER": return jj(e, "QUARTER", n).add({ months: 3 });
|
|
29342
|
+
case "YEAR": return jj(e, "YEAR", n).add({ years: 1 });
|
|
29343
|
+
case "SECOND": return jj(e, "SECOND").add({ seconds: 1 });
|
|
29344
|
+
case "MINUTE": return jj(e, "MINUTE").add({ minutes: 1 });
|
|
29345
|
+
case "HOUR": return jj(e, "HOUR").add({ hours: 1 });
|
|
29355
29346
|
default: return zA(t);
|
|
29356
29347
|
}
|
|
29357
|
-
},
|
|
29348
|
+
}, Nj = Cp.union([Cp.coerce.number().int().positive(), Cp.literal("undefined")]).transform((e) => e === "undefined" ? void 0 : e), Pj = Cp.enum([
|
|
29358
29349
|
"NEXT",
|
|
29359
29350
|
"THIS",
|
|
29360
29351
|
"PAST"
|
|
29361
|
-
]),
|
|
29352
|
+
]), Fj = Cp.enum([
|
|
29362
29353
|
"SECOND",
|
|
29363
29354
|
"MINUTE",
|
|
29364
29355
|
"HOUR",
|
|
@@ -29367,24 +29358,24 @@ var Sj = Su().transform((e) => e === "" ? [] : tM(e) ? [e] : JSON.parse(e)).refi
|
|
|
29367
29358
|
"MONTH",
|
|
29368
29359
|
"QUARTER",
|
|
29369
29360
|
"YEAR"
|
|
29370
|
-
]),
|
|
29371
|
-
direction:
|
|
29372
|
-
amount:
|
|
29373
|
-
unit:
|
|
29361
|
+
]), Ij = Cp.object({
|
|
29362
|
+
direction: Pj,
|
|
29363
|
+
amount: Nj.nullish(),
|
|
29364
|
+
unit: Fj,
|
|
29374
29365
|
timezone: Cp.string().nullish(),
|
|
29375
|
-
firstDayOfTheWeek:
|
|
29376
|
-
}).refine((e) => !(e.amount === void 0 && e.direction !== "THIS"), { error: "Amount cannot be 'undefined' unless direction is 'THIS'" }),
|
|
29377
|
-
let n = new RegExp(
|
|
29366
|
+
firstDayOfTheWeek: kj.nullish()
|
|
29367
|
+
}).refine((e) => !(e.amount === void 0 && e.direction !== "THIS"), { error: "Amount cannot be 'undefined' unless direction is 'THIS'" }), Lj = /((?:THIS)|(?:PAST)|(?:NEXT))_(\d*)_(DAY|MONTH|YEAR|WEEK|QUARTER|HOUR|MINUTE|SECOND)(?:(?:;;([^;;]*);;)?(?:(MONDAY|SUNDAY|SATURDAY);;)?)?/, Rj = Cp.string().transform((e, t) => {
|
|
29368
|
+
let n = new RegExp(Lj).exec(e);
|
|
29378
29369
|
if (!te(n)) return t.addIssue(`Cannot parse stringified inline relative date filter, value : "${e}"`), Cp.NEVER;
|
|
29379
29370
|
let [r, i, a, o, s, c] = n;
|
|
29380
|
-
return
|
|
29371
|
+
return Ij.parse({
|
|
29381
29372
|
direction: i,
|
|
29382
29373
|
amount: a,
|
|
29383
29374
|
unit: o,
|
|
29384
29375
|
timezone: s,
|
|
29385
29376
|
firstDayOfTheWeek: c
|
|
29386
29377
|
});
|
|
29387
|
-
}),
|
|
29378
|
+
}), zj = (e, t, n) => {
|
|
29388
29379
|
switch (t) {
|
|
29389
29380
|
case "DAY": return e.subtract({ days: n });
|
|
29390
29381
|
case "WEEK": return e.subtract({ weeks: n });
|
|
@@ -29396,20 +29387,20 @@ var Sj = Su().transform((e) => e === "" ? [] : tM(e) ? [e] : JSON.parse(e)).refi
|
|
|
29396
29387
|
case "HOUR": return e.subtract({ hours: n });
|
|
29397
29388
|
default: return zA(t);
|
|
29398
29389
|
}
|
|
29399
|
-
},
|
|
29390
|
+
}, Bj = (e, t) => {
|
|
29400
29391
|
let { direction: n, amount: r, unit: i, firstDayOfTheWeek: a } = e;
|
|
29401
29392
|
switch (n) {
|
|
29402
29393
|
case "NEXT": {
|
|
29403
29394
|
if (!Pp(r)) throw Error("Amount is required");
|
|
29404
29395
|
if (i === "QUARTER") {
|
|
29405
|
-
let n =
|
|
29396
|
+
let n = Oj(jj(t, "QUARTER", a), "QUARTER", 1), i = Oj(n, "QUARTER", r), o = n.toPlainDate().toString(), s = i.toPlainDate().toString();
|
|
29406
29397
|
return {
|
|
29407
29398
|
...e,
|
|
29408
29399
|
start: o,
|
|
29409
29400
|
end: s
|
|
29410
29401
|
};
|
|
29411
29402
|
}
|
|
29412
|
-
let n = t.startOfDay().add({ days: 1 }), o =
|
|
29403
|
+
let n = t.startOfDay().add({ days: 1 }), o = Oj(n, i, r), s = n.toPlainDate().toString(), c = o?.toPlainDate().toString();
|
|
29413
29404
|
return {
|
|
29414
29405
|
...e,
|
|
29415
29406
|
start: s,
|
|
@@ -29419,14 +29410,14 @@ var Sj = Su().transform((e) => e === "" ? [] : tM(e) ? [e] : JSON.parse(e)).refi
|
|
|
29419
29410
|
case "PAST": {
|
|
29420
29411
|
if (!Pp(r)) throw Error("Amount is required");
|
|
29421
29412
|
if (i === "QUARTER") {
|
|
29422
|
-
let n =
|
|
29413
|
+
let n = jj(t, "QUARTER", a), i = zj(n, "QUARTER", r).toPlainDate().toString(), o = n.toPlainDate().toString();
|
|
29423
29414
|
return {
|
|
29424
29415
|
...e,
|
|
29425
29416
|
start: i,
|
|
29426
29417
|
end: o
|
|
29427
29418
|
};
|
|
29428
29419
|
}
|
|
29429
|
-
let n = t.startOfDay(), o =
|
|
29420
|
+
let n = t.startOfDay(), o = zj(n, i, r)?.toPlainDate().toString(), s = n.toPlainDate().toString();
|
|
29430
29421
|
return {
|
|
29431
29422
|
...e,
|
|
29432
29423
|
start: o,
|
|
@@ -29434,7 +29425,7 @@ var Sj = Su().transform((e) => e === "" ? [] : tM(e) ? [e] : JSON.parse(e)).refi
|
|
|
29434
29425
|
};
|
|
29435
29426
|
}
|
|
29436
29427
|
case "THIS": {
|
|
29437
|
-
let n =
|
|
29428
|
+
let n = jj(t, i, a), r = Mj(t, i, a), o = n?.toPlainDate().toString(), s = r?.toPlainDate().toString();
|
|
29438
29429
|
return {
|
|
29439
29430
|
...e,
|
|
29440
29431
|
start: o,
|
|
@@ -29442,13 +29433,13 @@ var Sj = Su().transform((e) => e === "" ? [] : tM(e) ? [e] : JSON.parse(e)).refi
|
|
|
29442
29433
|
};
|
|
29443
29434
|
}
|
|
29444
29435
|
}
|
|
29445
|
-
},
|
|
29436
|
+
}, Vj = (e) => {
|
|
29446
29437
|
if (!D(e)) return null;
|
|
29447
|
-
let t =
|
|
29438
|
+
let t = Rj.safeParse(e);
|
|
29448
29439
|
if (!t.success) return null;
|
|
29449
29440
|
let n = t.data;
|
|
29450
|
-
return
|
|
29451
|
-
},
|
|
29441
|
+
return Bj(n, Pp(n.timezone) ? xO.Now.zonedDateTimeISO(n.timezone) : xO.Now.zonedDateTimeISO());
|
|
29442
|
+
}, Hj = (e) => e.value ? e.operand === W.IS_RELATIVE ? Vj(e.value) : e.value : null, Uj = (e, t) => {
|
|
29452
29443
|
let { direction: n, amount: r, unit: i, firstDayOfTheWeek: a } = e, o = [
|
|
29453
29444
|
"SECOND",
|
|
29454
29445
|
"MINUTE",
|
|
@@ -29458,78 +29449,78 @@ var Sj = Su().transform((e) => e === "" ? [] : tM(e) ? [e] : JSON.parse(e)).refi
|
|
|
29458
29449
|
case "NEXT":
|
|
29459
29450
|
if (!G(r)) throw Error("Amount is required");
|
|
29460
29451
|
if (i === "QUARTER") {
|
|
29461
|
-
let n =
|
|
29452
|
+
let n = Mj(t, "QUARTER");
|
|
29462
29453
|
return {
|
|
29463
29454
|
...e,
|
|
29464
29455
|
start: n,
|
|
29465
|
-
end:
|
|
29456
|
+
end: Oj(n, i, r)
|
|
29466
29457
|
};
|
|
29467
29458
|
}
|
|
29468
29459
|
if (o) return {
|
|
29469
29460
|
...e,
|
|
29470
29461
|
start: t,
|
|
29471
|
-
end:
|
|
29462
|
+
end: Oj(t, i, r)
|
|
29472
29463
|
};
|
|
29473
29464
|
{
|
|
29474
29465
|
let n = t.startOfDay().add({ days: 1 });
|
|
29475
29466
|
return {
|
|
29476
29467
|
...e,
|
|
29477
29468
|
start: n,
|
|
29478
|
-
end:
|
|
29469
|
+
end: Oj(n, i, r)
|
|
29479
29470
|
};
|
|
29480
29471
|
}
|
|
29481
29472
|
case "PAST":
|
|
29482
29473
|
if (!G(r)) throw Error("Amount is required");
|
|
29483
29474
|
if (i === "QUARTER") {
|
|
29484
|
-
let n =
|
|
29475
|
+
let n = jj(t, "QUARTER");
|
|
29485
29476
|
return {
|
|
29486
29477
|
...e,
|
|
29487
|
-
start:
|
|
29478
|
+
start: zj(n, i, r),
|
|
29488
29479
|
end: n
|
|
29489
29480
|
};
|
|
29490
29481
|
}
|
|
29491
29482
|
if (o) return {
|
|
29492
29483
|
...e,
|
|
29493
|
-
start:
|
|
29484
|
+
start: zj(t, i, r),
|
|
29494
29485
|
end: t
|
|
29495
29486
|
};
|
|
29496
29487
|
{
|
|
29497
29488
|
let n = t.startOfDay();
|
|
29498
29489
|
return {
|
|
29499
29490
|
...e,
|
|
29500
|
-
start:
|
|
29491
|
+
start: zj(n, i, r),
|
|
29501
29492
|
end: n
|
|
29502
29493
|
};
|
|
29503
29494
|
}
|
|
29504
29495
|
case "THIS": return {
|
|
29505
29496
|
...e,
|
|
29506
|
-
start:
|
|
29507
|
-
end:
|
|
29497
|
+
start: jj(t, i, a),
|
|
29498
|
+
end: Mj(t, i, a)
|
|
29508
29499
|
};
|
|
29509
29500
|
}
|
|
29510
|
-
},
|
|
29501
|
+
}, Wj = (e) => {
|
|
29511
29502
|
if (!D(e)) return null;
|
|
29512
|
-
let t =
|
|
29503
|
+
let t = Rj.safeParse(e);
|
|
29513
29504
|
if (t.success) {
|
|
29514
29505
|
let e = t.data;
|
|
29515
|
-
return
|
|
29506
|
+
return Uj(e, (Pp(e.timezone) ? xO.Now.zonedDateTimeISO(e.timezone) : xO.Now.zonedDateTimeISO()).round({ smallestUnit: "second" }));
|
|
29516
29507
|
} else return null;
|
|
29517
|
-
},
|
|
29508
|
+
}, Gj = (e) => e.value ? e.operand === W.IS_RELATIVE ? Wj(e.value) : e.value : null;
|
|
29518
29509
|
om.Is, W.IS, om.IsNotNull, W.IS_NOT_NULL, om.IsNot, W.IS_NOT, om.LessThanOrEqual, W.LESS_THAN_OR_EQUAL, om.GreaterThanOrEqual, W.GREATER_THAN_OR_EQUAL, om.IsBefore, W.IS_BEFORE, om.IsAfter, W.IS_AFTER, om.Contains, W.CONTAINS, om.DoesNotContain, W.DOES_NOT_CONTAIN, om.IsEmpty, W.IS_EMPTY, om.IsNotEmpty, W.IS_NOT_EMPTY, om.IsRelative, W.IS_RELATIVE, om.IsInPast, W.IS_IN_PAST, om.IsInFuture, W.IS_IN_FUTURE, om.IsToday, W.IS_TODAY, W.IS, W.IS, W.IS_NOT_NULL, W.IS_NOT_NULL, W.IS_NOT, W.IS_NOT, W.LESS_THAN_OR_EQUAL, W.LESS_THAN_OR_EQUAL, W.GREATER_THAN_OR_EQUAL, W.GREATER_THAN_OR_EQUAL, W.IS_BEFORE, W.IS_BEFORE, W.IS_AFTER, W.IS_AFTER, W.CONTAINS, W.CONTAINS, W.DOES_NOT_CONTAIN, W.DOES_NOT_CONTAIN, W.IS_EMPTY, W.IS_EMPTY, W.IS_NOT_EMPTY, W.IS_NOT_EMPTY, W.IS_RELATIVE, W.IS_RELATIVE, W.IS_IN_PAST, W.IS_IN_PAST, W.IS_IN_FUTURE, W.IS_IN_FUTURE, W.IS_TODAY, W.IS_TODAY, W.VECTOR_SEARCH, W.VECTOR_SEARCH;
|
|
29519
|
-
var
|
|
29510
|
+
var Kj = (e) => {
|
|
29520
29511
|
try {
|
|
29521
29512
|
return new URL(e);
|
|
29522
29513
|
} catch {
|
|
29523
29514
|
return null;
|
|
29524
29515
|
}
|
|
29525
|
-
},
|
|
29516
|
+
}, qj = (e) => e === void 0 || typeof e != "object" || !e ? e : Array.isArray(e) ? e.map((e) => qj(e)).filter((e) => !k(e)) : Object.entries(e).reduce((e, [t, n]) => {
|
|
29526
29517
|
if (k(n)) return e;
|
|
29527
29518
|
if (n === null || n instanceof Date) return {
|
|
29528
29519
|
...e,
|
|
29529
29520
|
[t]: n
|
|
29530
29521
|
};
|
|
29531
29522
|
if (typeof n == "object") {
|
|
29532
|
-
let r =
|
|
29523
|
+
let r = qj(n);
|
|
29533
29524
|
return !k(r) && Object.keys(r).length > 0 ? {
|
|
29534
29525
|
...e,
|
|
29535
29526
|
[t]: r
|
|
@@ -29539,29 +29530,29 @@ var qj = (e) => {
|
|
|
29539
29530
|
...e,
|
|
29540
29531
|
[t]: n
|
|
29541
29532
|
};
|
|
29542
|
-
}, {}),
|
|
29533
|
+
}, {}), Jj = {
|
|
29543
29534
|
BOLD: "bold",
|
|
29544
29535
|
ITALIC: "italic",
|
|
29545
29536
|
UNDERLINE: "underline",
|
|
29546
29537
|
STRIKE: "strike",
|
|
29547
29538
|
LINK: "link"
|
|
29548
29539
|
};
|
|
29549
|
-
|
|
29550
|
-
var
|
|
29540
|
+
Jj.UNDERLINE, Jj.BOLD, Jj.ITALIC, Jj.STRIKE, Jj.LINK;
|
|
29541
|
+
var Yj = (e) => typeof e == "object" && !!e && !Array.isArray(e), Xj = (e) => {
|
|
29551
29542
|
let t = e.trim();
|
|
29552
29543
|
return t.startsWith("http://") || t.startsWith("https://") || t.startsWith("HTTPS://") || t.startsWith("HTTP://") ? t : `https://${t}`;
|
|
29553
|
-
},
|
|
29544
|
+
}, Zj = (e, t) => {
|
|
29554
29545
|
let n = t?.allowIp ?? !0, r = t?.allowLocalhost ?? !0, i = /^(((?!-))(xn--|_)?[a-z0-9-]{0,61}[a-z0-9]{1,1}\.){1,10}(xn--)?([a-z0-9][a-z0-9-]{0,60}|[a-z0-9-]{1,30}\.[a-z]{2,})$/.test(e), a = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(e), o = e === "localhost" || e === "127.0.0.1";
|
|
29555
29546
|
return o && !r || a && !n ? !1 : i || o || a;
|
|
29556
29547
|
};
|
|
29557
29548
|
Su().transform((e, t) => {
|
|
29558
|
-
let n =
|
|
29549
|
+
let n = Xj(e.trim()), r = n.replace("https://", "").replace("http://", "").replace("HTTPS://", "").replace("HTTP://", "");
|
|
29559
29550
|
if (/^\d+(?:\/[a-zA-Z]*)?$/.test(r)) return t.addIssue({
|
|
29560
29551
|
code: "custom",
|
|
29561
29552
|
message: "domain is not a valid url"
|
|
29562
29553
|
}), Re;
|
|
29563
29554
|
try {
|
|
29564
|
-
return
|
|
29555
|
+
return Zj(new URL(n).hostname) ? n : (t.addIssue({
|
|
29565
29556
|
code: "custom",
|
|
29566
29557
|
message: "domain is not a valid url"
|
|
29567
29558
|
}), Re);
|
|
@@ -29572,80 +29563,80 @@ Su().transform((e, t) => {
|
|
|
29572
29563
|
}), Re;
|
|
29573
29564
|
}
|
|
29574
29565
|
});
|
|
29575
|
-
var
|
|
29576
|
-
let t =
|
|
29566
|
+
var Qj = (e) => {
|
|
29567
|
+
let t = Kj(e);
|
|
29577
29568
|
return G(t) ? (t.origin + t.pathname + t.search + t.hash).replace(/\/$/, "") : e;
|
|
29578
|
-
},
|
|
29569
|
+
}, $j = (e) => {
|
|
29579
29570
|
let t = e.trim();
|
|
29580
|
-
return t === "" ? t :
|
|
29581
|
-
},
|
|
29571
|
+
return t === "" ? t : Qj(Xj(t));
|
|
29572
|
+
}, eM = (e) => /^{{[^{}]+}}$/.test(e), tM = /* @__PURE__ */ new Map();
|
|
29582
29573
|
for (let e of NA()) {
|
|
29583
|
-
let t = PA(e), n =
|
|
29584
|
-
n ? n.push(e) :
|
|
29574
|
+
let t = PA(e), n = tM.get(t);
|
|
29575
|
+
n ? n.push(e) : tM.set(t, [e]);
|
|
29585
29576
|
}
|
|
29586
29577
|
new Set(NA());
|
|
29587
|
-
var
|
|
29578
|
+
var nM = (e) => typeof e == "string", rM = RegExp("\\{\\{([^{}]+)\\}\\}", "g"), iM = (e, t) => G(e) ? nM(e) ? sM(e, t) : Array.isArray(e) ? aM(e, t) : typeof e == "object" && e ? oM(e, t) : e : e, aM = (e, t) => {
|
|
29588
29579
|
let n = e;
|
|
29589
|
-
for (let r = 0; r < e.length; ++r) n[r] =
|
|
29580
|
+
for (let r = 0; r < e.length; ++r) n[r] = iM(e[r], t);
|
|
29590
29581
|
return n;
|
|
29591
|
-
},
|
|
29592
|
-
let i =
|
|
29593
|
-
return e[typeof i == "string" ? i : String(i)] =
|
|
29594
|
-
}, {}),
|
|
29595
|
-
let n = e.match(
|
|
29596
|
-
return !n || n.length === 0 ? e : n.length === 1 && n[0] === e ? YA(e, t) : e.replace(
|
|
29597
|
-
},
|
|
29582
|
+
}, oM = (e, t) => Object.entries(e).reduce((e, [n, r]) => {
|
|
29583
|
+
let i = iM(n, t);
|
|
29584
|
+
return e[typeof i == "string" ? i : String(i)] = iM(r, t), e;
|
|
29585
|
+
}, {}), sM = (e, t) => {
|
|
29586
|
+
let n = e.match(rM);
|
|
29587
|
+
return !n || n.length === 0 ? e : n.length === 1 && n[0] === e ? YA(e, t) : e.replace(rM, (e, n) => YA(e, t));
|
|
29588
|
+
}, cM = (e) => e.length >= 2 && e.startsWith("'") && e.endsWith("'"), lM = (e) => Object.values(Gp).includes(e), uM = (e) => {
|
|
29598
29589
|
let { defaultValue: t, type: n } = e;
|
|
29599
|
-
return G(t) ? ie(t) ?
|
|
29600
|
-
},
|
|
29601
|
-
let t =
|
|
29590
|
+
return G(t) ? ie(t) ? cM(t) || lM(t) ? [] : [t] : Array.isArray(t) && (n === U.MULTI_SELECT || n === U.ARRAY) ? t.filter((e) => typeof e == "string" && !cM(e)) : n in km && Yj(t) ? Object.values(t).filter((e) => typeof e == "string" && !cM(e)) : [] : [];
|
|
29591
|
+
}, dM = (e) => G(e) ? e.flatMap((e) => {
|
|
29592
|
+
let t = uM(e);
|
|
29602
29593
|
if (t.length === 0) return [];
|
|
29603
29594
|
let n = t[0];
|
|
29604
29595
|
return [`Field "${e.label}" has string defaultValue(s) without surrounding single quotes: ${t.map((e) => `"${e}"`).join(", ")}. Unquoted strings are reserved for computed defaults ('uuid', 'now'). To define a literal string default, wrap it in single quotes: "'${n}'" instead of "${n}".`];
|
|
29605
|
-
}) : [],
|
|
29596
|
+
}) : [], fM = (e) => {
|
|
29606
29597
|
if (!e) return [];
|
|
29607
29598
|
let t = [];
|
|
29608
29599
|
for (let n of e) D(n.label) || t.push("Field must have a label"), D(n.name) || t.push(`Field "${n.label}" must have a name`), D(n.universalIdentifier) || t.push(`Field "${n.label}" must have a universalIdentifier`), (n.type === U.SELECT || n.type === U.MULTI_SELECT) && (!Array.isArray(n.options) || n.options.length === 0) && t.push(`Field "${n.label}" is a SELECT/MULTI_SELECT type and must have options`), n.isUnique === !0 && (n.type === U.RELATION || n.type === U.MORPH_RELATION || n.type === U.FILES) && t.push(`Field "${n.label}" of type ${n.type} cannot be unique`);
|
|
29609
29600
|
return t;
|
|
29610
|
-
},
|
|
29601
|
+
}, pM = (e) => {
|
|
29611
29602
|
let t = [];
|
|
29612
29603
|
e.objectUniversalIdentifier || t.push("Field must have an objectUniversalIdentifier");
|
|
29613
|
-
let n =
|
|
29604
|
+
let n = fM([e]);
|
|
29614
29605
|
return t.push(...n), Em({
|
|
29615
29606
|
config: e,
|
|
29616
29607
|
errors: t,
|
|
29617
|
-
warnings:
|
|
29608
|
+
warnings: dM([e])
|
|
29618
29609
|
});
|
|
29619
|
-
},
|
|
29610
|
+
}, mM = (e) => {
|
|
29620
29611
|
let t = [], n = [];
|
|
29621
29612
|
return e.universalIdentifier || t.push("CommandMenuItem must have a universalIdentifier"), e.label || t.push("CommandMenuItem must have a label"), e.frontComponentUniversalIdentifier || t.push("CommandMenuItem must have a frontComponentUniversalIdentifier (the universalIdentifier of the front component this command opens)"), e.icon && n.push("CommandMenuItem icon will be ignored in favor of application icon, you should remove it"), Em({
|
|
29622
29613
|
config: e,
|
|
29623
29614
|
errors: t,
|
|
29624
29615
|
warnings: n
|
|
29625
29616
|
});
|
|
29626
|
-
},
|
|
29617
|
+
}, hM = (e) => e === "then", gM = (e) => typeof e == "symbol", Q = (e) => {
|
|
29627
29618
|
let t = () => {
|
|
29628
29619
|
throw Error(`"${e}" from twenty-sdk can only be used inside a command's conditionalAvailabilityExpression, not at runtime.`);
|
|
29629
29620
|
};
|
|
29630
29621
|
return new Proxy(function() {}, {
|
|
29631
29622
|
get: (e, n) => {
|
|
29632
|
-
if (!(
|
|
29623
|
+
if (!(hM(n) || gM(n))) return t();
|
|
29633
29624
|
},
|
|
29634
29625
|
apply: t,
|
|
29635
29626
|
construct: t,
|
|
29636
29627
|
has: t
|
|
29637
29628
|
});
|
|
29638
|
-
},
|
|
29629
|
+
}, _M = Q("pageType"), vM = Q("isInSidePanel"), yM = Q("isDashboardPageLayoutInEditMode"), bM = Q("isLayoutCustomizationModeEnabled"), xM = Q("favoriteRecordIds"), SM = Q("isSelectAll"), CM = Q("hasAnySoftDeleteFilterOnView"), wM = Q("numberOfSelectedRecords"), TM = Q("objectPermissions"), EM = Q("selectedRecords"), DM = Q("featureFlags"), OM = Q("targetObjectReadPermissions"), kM = Q("targetObjectWritePermissions"), AM = Q("canImpersonate"), jM = Q("canAccessFullAdminPanel"), MM = Q("objectMetadataItem"), NM = Q("objectMetadataLabel"), PM = Q("isDefined"), FM = Q("isNonEmptyString"), IM = Q("includes"), LM = Q("every"), RM = Q("everyDefined"), zM = Q("everyEquals"), BM = Q("some"), VM = Q("someDefined"), HM = Q("someEquals"), UM = Q("none"), WM = Q("noneDefined"), GM = Q("noneEquals"), KM = Q("someNonEmptyString"), qM = Q("includesEvery"), JM = (e) => {
|
|
29639
29630
|
let t = [];
|
|
29640
29631
|
return e.universalIdentifier || t.push("Front component must have a universalIdentifier"), e.component || t.push("Front component must have a component"), typeof e.component != "function" && t.push("Front component component must be a React component"), Em({
|
|
29641
29632
|
config: e,
|
|
29642
29633
|
errors: t
|
|
29643
29634
|
});
|
|
29644
|
-
},
|
|
29635
|
+
}, YM = (e) => typeof e == "string" && e.trim().length > 0, XM = (e) => {
|
|
29645
29636
|
let t = [];
|
|
29646
|
-
if (
|
|
29637
|
+
if (YM(e.universalIdentifier) || t.push("Index must have a universalIdentifier"), YM(e.objectUniversalIdentifier) || t.push("Index must reference an objectUniversalIdentifier"), !RA(e.fields)) t.push("Index must have at least one field");
|
|
29647
29638
|
else {
|
|
29648
|
-
for (let n of e.fields)
|
|
29639
|
+
for (let n of e.fields) YM(n.universalIdentifier) || t.push("IndexField must have a universalIdentifier"), YM(n.fieldUniversalIdentifier) || t.push("IndexField must reference a fieldUniversalIdentifier");
|
|
29649
29640
|
let n = e.fields.map((e) => `${e.fieldUniversalIdentifier}::${e.subFieldName ?? ""}`);
|
|
29650
29641
|
new Set(n).size !== n.length && t.push("Index lists the same column twice");
|
|
29651
29642
|
}
|
|
@@ -29653,27 +29644,27 @@ var rM = (e) => typeof e == "string", iM = RegExp("\\{\\{([^{}]+)\\}\\}", "g"),
|
|
|
29653
29644
|
config: e,
|
|
29654
29645
|
errors: t
|
|
29655
29646
|
});
|
|
29656
|
-
},
|
|
29647
|
+
}, ZM = (e) => {
|
|
29657
29648
|
let t = [];
|
|
29658
29649
|
return e.universalIdentifier || t.push("Logic function must have a universalIdentifier"), e.handler || t.push("Logic function must have a handler"), typeof e.handler != "function" && t.push("Logic function handler must be a function"), e.httpRouteTriggerSettings && (e.httpRouteTriggerSettings.path || t.push("Route trigger must have a path"), e.httpRouteTriggerSettings.httpMethod || t.push("Route trigger must have an httpMethod")), e.cronTriggerSettings && (e.cronTriggerSettings.pattern || t.push("Cron trigger must have a pattern")), e.databaseEventTriggerSettings && (e.databaseEventTriggerSettings.eventName || t.push("Database event trigger must have an eventName")), Em({
|
|
29659
29650
|
config: e,
|
|
29660
29651
|
errors: t
|
|
29661
29652
|
});
|
|
29662
|
-
},
|
|
29653
|
+
}, QM = (e) => {
|
|
29663
29654
|
let t = [];
|
|
29664
29655
|
return e.universalIdentifier || t.push("Post install logic function must have a universalIdentifier"), e.handler || t.push("Post install logic function must have a handler"), typeof e.handler != "function" && t.push("Post install logic function handler must be a function"), Em({
|
|
29665
29656
|
config: e,
|
|
29666
29657
|
errors: t
|
|
29667
29658
|
});
|
|
29668
|
-
},
|
|
29659
|
+
}, $M = (e) => {
|
|
29669
29660
|
let t = [];
|
|
29670
29661
|
return e.universalIdentifier || t.push("Pre install logic function must have a universalIdentifier"), e.handler || t.push("Pre install logic function must have a handler"), typeof e.handler != "function" && t.push("Pre install logic function handler must be a function"), Em({
|
|
29671
29662
|
config: e,
|
|
29672
29663
|
errors: t
|
|
29673
29664
|
});
|
|
29674
|
-
},
|
|
29665
|
+
}, eN = /^[a-z][a-z0-9-]*$/, tN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, nN = ["oauth"], rN = (e) => {
|
|
29675
29666
|
let t = [];
|
|
29676
|
-
if (e.universalIdentifier ?
|
|
29667
|
+
if (e.universalIdentifier ? tN.test(e.universalIdentifier) || t.push(`Connection provider universalIdentifier "${e.universalIdentifier}" must be a UUID. Generate one with \`uuidgen\` or any UUID v4 tool.`) : t.push("Connection provider must have a universalIdentifier"), e.name ? eN.test(e.name) || t.push(`Connection provider name "${e.name}" must match ${eN} (used in URLs)`) : t.push("Connection provider must have a name"), e.displayName || t.push("Connection provider must have a displayName"), e.type ? nN.includes(e.type) || t.push(`Connection provider type "${e.type}" is not supported. Supported types: ${nN.join(", ")}.`) : t.push("Connection provider must declare a `type` (e.g. 'oauth')"), e.type === "oauth") {
|
|
29677
29668
|
let n = e.oauth;
|
|
29678
29669
|
n ? (n.authorizationEndpoint || t.push("OAuth connection provider must have an authorizationEndpoint"), n.tokenEndpoint || t.push("OAuth connection provider must have a tokenEndpoint"), n.clientIdVariable || t.push("OAuth connection provider must reference a clientIdVariable (key of a serverVariable on defineApplication)"), n.clientSecretVariable || t.push("OAuth connection provider must reference a clientSecretVariable (key of a serverVariable on defineApplication)"), Array.isArray(n.scopes) || t.push("OAuth connection provider must declare a scopes array")) : t.push("Connection provider with type 'oauth' must declare an `oauth` config block");
|
|
29679
29670
|
}
|
|
@@ -29681,22 +29672,22 @@ var rM = (e) => typeof e == "string", iM = RegExp("\\{\\{([^{}]+)\\}\\}", "g"),
|
|
|
29681
29672
|
config: e,
|
|
29682
29673
|
errors: t
|
|
29683
29674
|
});
|
|
29684
|
-
},
|
|
29675
|
+
}, iN = (e) => {
|
|
29685
29676
|
let t = [];
|
|
29686
29677
|
return e.universalIdentifier || t.push("NavigationMenuItem must have a universalIdentifier"), typeof e.position != "number" && t.push("NavigationMenuItem must have a position"), Em({
|
|
29687
29678
|
config: e,
|
|
29688
29679
|
errors: t
|
|
29689
29680
|
});
|
|
29690
|
-
},
|
|
29681
|
+
}, aN = (e) => {
|
|
29691
29682
|
let t = [];
|
|
29692
29683
|
e.universalIdentifier || t.push("Object must have a universalIdentifier"), e.nameSingular || t.push("Object must have a nameSingular"), e.namePlural || t.push("Object must have a namePlural"), e.labelSingular || t.push("Object must have a labelSingular"), e.labelPlural || t.push("Object must have a labelPlural");
|
|
29693
|
-
let n =
|
|
29684
|
+
let n = fM(e.fields);
|
|
29694
29685
|
return t.push(...n), G(e.labelIdentifierFieldMetadataUniversalIdentifier) && !e.fields.some((t) => t.universalIdentifier === e.labelIdentifierFieldMetadataUniversalIdentifier) && t.push("labelIdentifierFieldMetadataUniversalIdentifier must reference a field defined in the fields array"), Em({
|
|
29695
29686
|
config: e,
|
|
29696
29687
|
errors: t,
|
|
29697
|
-
warnings:
|
|
29688
|
+
warnings: dM(e.fields)
|
|
29698
29689
|
});
|
|
29699
|
-
},
|
|
29690
|
+
}, oN = "142046f0-4d80-48b5-ad56-26ad410e895c", sN = ({ objectUniversalIdentifier: e, fieldName: t }) => b(`${e}-${t}`, oN);
|
|
29700
29691
|
(/* @__PURE__ */ N(((e, t) => {
|
|
29701
29692
|
(function(n, r) {
|
|
29702
29693
|
typeof e == "object" && t !== void 0 ? r(e) : typeof define == "function" && define.amd ? define(["exports"], r) : r((n = typeof globalThis < "u" ? globalThis : n || self).window = n.window || {});
|
|
@@ -58893,7 +58884,7 @@ var rM = (e) => typeof e == "string", iM = RegExp("\\{\\{([^{}]+)\\}\\}", "g"),
|
|
|
58893
58884
|
Ka.config = Ga.config.bind(Ga), Ka.setData = Ga.setData.bind(Ga), e.slugify = Ka, e.transl = Wa, e.transliterate = Wa, Object.defineProperty(e, "__esModule", { value: !0 });
|
|
58894
58885
|
}));
|
|
58895
58886
|
})))();
|
|
58896
|
-
var
|
|
58887
|
+
var cN = {
|
|
58897
58888
|
attachment: {
|
|
58898
58889
|
universalIdentifier: "20202020-bd3d-4c60-8dca-571c71d4447a",
|
|
58899
58890
|
fields: {
|
|
@@ -59107,7 +59098,6 @@ var lN = {
|
|
|
59107
59098
|
conferenceLink: { universalIdentifier: "20202020-35da-43ef-9ca0-e936e9dc237b" },
|
|
59108
59099
|
calendarChannelEventAssociations: { universalIdentifier: "20202020-bdf8-4572-a2cc-ecbb6bcc3a02" },
|
|
59109
59100
|
calendarEventParticipants: { universalIdentifier: "20202020-e07e-4ccb-88f5-6f3d00458eec" },
|
|
59110
|
-
recordingPreference: { universalIdentifier: "1d231e7e-9bbe-410b-8007-ea7678a83e58" },
|
|
59111
59101
|
callRecordings: { universalIdentifier: "48d6d151-18e2-4111-b405-d85fb9d860d8" },
|
|
59112
59102
|
createdBy: { universalIdentifier: "664a9500-2641-4caa-8d95-069807bb2eb4" },
|
|
59113
59103
|
updatedBy: { universalIdentifier: "1081c196-d675-4801-b9e1-7d8637b48eab" },
|
|
@@ -59138,6 +59128,7 @@ var lN = {
|
|
|
59138
59128
|
deletedAt: { universalIdentifier: "cf22a652-390a-4f55-b3a0-615c8fd8c7ed" },
|
|
59139
59129
|
title: { universalIdentifier: "4cff8863-a1d1-45fd-a370-4eb6aa1f2a5b" },
|
|
59140
59130
|
status: { universalIdentifier: "3e617680-d93e-4309-a54f-90f69528bfd7" },
|
|
59131
|
+
recordingRequestStatus: { universalIdentifier: "7fd681c9-244c-4e98-8939-7b175d472638" },
|
|
59141
59132
|
applicationId: { universalIdentifier: "24ec1239-1240-42cb-8a2d-302632378e09" },
|
|
59142
59133
|
externalBotId: { universalIdentifier: "0a2da128-9bcc-488b-bc31-65318c41bdf9" },
|
|
59143
59134
|
externalRecordingId: { universalIdentifier: "6d17fb71-324b-4625-a5be-b3580607e2c7" },
|
|
@@ -59159,6 +59150,7 @@ var lN = {
|
|
|
59159
59150
|
universalIdentifier: "c395b55e-88f0-4d5b-a1fb-0d38b50e0b19",
|
|
59160
59151
|
viewFields: {
|
|
59161
59152
|
status: { universalIdentifier: "6c4a81a2-d9c1-4f82-984c-f97e083ca710" },
|
|
59153
|
+
recordingRequestStatus: { universalIdentifier: "3bdedacd-0fd5-4175-8d28-2fe41bb5aa77" },
|
|
59162
59154
|
title: { universalIdentifier: "b1d5051b-071d-4514-93cf-704724cdc8f6" },
|
|
59163
59155
|
startedAt: { universalIdentifier: "3b96351f-66ed-4fa6-acb6-698647573af7" }
|
|
59164
59156
|
}
|
|
@@ -59169,6 +59161,7 @@ var lN = {
|
|
|
59169
59161
|
viewFields: {
|
|
59170
59162
|
title: { universalIdentifier: "6308d574-8579-4cf2-a020-c208df97cf3e" },
|
|
59171
59163
|
status: { universalIdentifier: "93483569-fcd2-46cf-b576-9f0318ad2b3b" },
|
|
59164
|
+
recordingRequestStatus: { universalIdentifier: "364a90b1-e9aa-4606-996b-46e579ebeb28" },
|
|
59172
59165
|
startedAt: { universalIdentifier: "3fd00fbb-c153-45e3-b6e6-43d18d34052a" },
|
|
59173
59166
|
endedAt: { universalIdentifier: "ba8c8d41-c112-4173-b927-5b5c5a5c047b" },
|
|
59174
59167
|
video: { universalIdentifier: "acc54ade-cd26-4be2-9391-a42715ad1523" },
|
|
@@ -60233,7 +60226,7 @@ var lN = {
|
|
|
60233
60226
|
}
|
|
60234
60227
|
} }
|
|
60235
60228
|
}
|
|
60236
|
-
},
|
|
60229
|
+
}, lN = {
|
|
60237
60230
|
myFirstDashboard: {
|
|
60238
60231
|
universalIdentifier: "20202020-d001-4d01-8d01-da5ab0a00001",
|
|
60239
60232
|
tabs: { tab1: {
|
|
@@ -60583,7 +60576,7 @@ var lN = {
|
|
|
60583
60576
|
}
|
|
60584
60577
|
} }
|
|
60585
60578
|
}
|
|
60586
|
-
},
|
|
60579
|
+
}, uN = (e) => {
|
|
60587
60580
|
let t = [];
|
|
60588
60581
|
if (e.universalIdentifier || t.push("PageLayout must have a universalIdentifier"), e.name || t.push("PageLayout must have a name"), e.tabs) {
|
|
60589
60582
|
for (let n of e.tabs) if (n.universalIdentifier || t.push("PageLayoutTab must have a universalIdentifier"), n.title || t.push("PageLayoutTab must have a title"), n.widgets) for (let e of n.widgets) e.universalIdentifier || t.push("PageLayoutWidget must have a universalIdentifier"), e.title || t.push("PageLayoutWidget must have a title"), e.type || t.push("PageLayoutWidget must have a type");
|
|
@@ -60592,20 +60585,20 @@ var lN = {
|
|
|
60592
60585
|
config: e,
|
|
60593
60586
|
errors: t
|
|
60594
60587
|
});
|
|
60595
|
-
},
|
|
60588
|
+
}, dN = (e) => {
|
|
60596
60589
|
let t = [];
|
|
60597
60590
|
if (e.universalIdentifier || t.push("PageLayoutTab must have a universalIdentifier"), e.title || t.push("PageLayoutTab must have a title"), e.pageLayoutUniversalIdentifier || t.push("PageLayoutTab must have a pageLayoutUniversalIdentifier when defined standalone (use the parent page layout universalIdentifier)"), e.widgets) for (let n of e.widgets) n.universalIdentifier || t.push("PageLayoutWidget must have a universalIdentifier"), n.title || t.push("PageLayoutWidget must have a title"), n.type || t.push("PageLayoutWidget must have a type");
|
|
60598
60591
|
return Em({
|
|
60599
60592
|
config: e,
|
|
60600
60593
|
errors: t
|
|
60601
60594
|
});
|
|
60602
|
-
},
|
|
60595
|
+
}, fN = (e) => {
|
|
60603
60596
|
let t = [];
|
|
60604
60597
|
return e.universalIdentifier || t.push("Permission flag must have a universalIdentifier"), e.key || t.push("Permission flag must have a key"), e.label || t.push("Permission flag must have a label"), Em({
|
|
60605
60598
|
config: e,
|
|
60606
60599
|
errors: t
|
|
60607
60600
|
});
|
|
60608
|
-
},
|
|
60601
|
+
}, pN = (e) => {
|
|
60609
60602
|
let t = [];
|
|
60610
60603
|
if (e.universalIdentifier || t.push("Role must have a universalIdentifier"), e.label || t.push("Role must have a label"), e.objectPermissions) for (let n of e.objectPermissions) n.objectUniversalIdentifier || t.push("Object permission must have an objectUniversalIdentifier");
|
|
60611
60604
|
if (e.fieldPermissions) for (let n of e.fieldPermissions) n.objectUniversalIdentifier || t.push("Field permission must have an objectUniversalIdentifier"), n.fieldUniversalIdentifier || t.push("Field permission must have a fieldUniversalIdentifier");
|
|
@@ -60613,13 +60606,13 @@ var lN = {
|
|
|
60613
60606
|
config: e,
|
|
60614
60607
|
errors: t
|
|
60615
60608
|
});
|
|
60616
|
-
},
|
|
60609
|
+
}, mN = (e) => pN(e), hN = (e) => {
|
|
60617
60610
|
let t = [];
|
|
60618
60611
|
return e.universalIdentifier || t.push("Skill must have a universalIdentifier"), e.name || t.push("Skill must have a name"), e.label || t.push("Skill must have a label"), e.content || t.push("Skill must have content"), Em({
|
|
60619
60612
|
config: e,
|
|
60620
60613
|
errors: t
|
|
60621
60614
|
});
|
|
60622
|
-
},
|
|
60615
|
+
}, gN = (e) => {
|
|
60623
60616
|
let t = [];
|
|
60624
60617
|
if (e.universalIdentifier || t.push("View must have a universalIdentifier"), e.name || t.push("View must have a name"), e.objectUniversalIdentifier || t.push("View must have an objectUniversalIdentifier"), e.fields) for (let n of e.fields) n.universalIdentifier || t.push("ViewField must have a universalIdentifier"), n.fieldMetadataUniversalIdentifier || t.push("ViewField must have a fieldMetadataUniversalIdentifier");
|
|
60625
60618
|
if (e.filters) for (let n of e.filters) n.universalIdentifier || t.push("ViewFilter must have a universalIdentifier"), n.fieldMetadataUniversalIdentifier || t.push("ViewFilter must have a fieldMetadataUniversalIdentifier");
|
|
@@ -60631,13 +60624,13 @@ var lN = {
|
|
|
60631
60624
|
config: e,
|
|
60632
60625
|
errors: t
|
|
60633
60626
|
});
|
|
60634
|
-
},
|
|
60627
|
+
}, _N = (e) => {
|
|
60635
60628
|
let t = [];
|
|
60636
60629
|
return e.universalIdentifier || t.push("View field must have a universalIdentifier"), e.viewUniversalIdentifier || t.push("View field must have a viewUniversalIdentifier"), e.fieldMetadataUniversalIdentifier || t.push("View field must have a fieldMetadataUniversalIdentifier"), Em({
|
|
60637
60630
|
config: e,
|
|
60638
60631
|
errors: t
|
|
60639
60632
|
});
|
|
60640
|
-
},
|
|
60633
|
+
}, vN = /* @__PURE__ */ Me({
|
|
60641
60634
|
AggregateOperations: () => Fp,
|
|
60642
60635
|
DateDisplayFormat: () => Jp,
|
|
60643
60636
|
FieldMetadataSettingsOnClickAction: () => Kp,
|
|
@@ -60649,10 +60642,10 @@ var lN = {
|
|
|
60649
60642
|
OnDeleteAction: () => nm,
|
|
60650
60643
|
PageLayoutTabLayoutMode: () => em,
|
|
60651
60644
|
RelationType: () => rm,
|
|
60652
|
-
STANDARD_OBJECT: () =>
|
|
60653
|
-
STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS: () =>
|
|
60654
|
-
STANDARD_PAGE_LAYOUT: () =>
|
|
60655
|
-
STANDARD_PAGE_LAYOUT_UNIVERSAL_IDENTIFIERS: () =>
|
|
60645
|
+
STANDARD_OBJECT: () => cN,
|
|
60646
|
+
STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS: () => cN,
|
|
60647
|
+
STANDARD_PAGE_LAYOUT: () => lN,
|
|
60648
|
+
STANDARD_PAGE_LAYOUT_UNIVERSAL_IDENTIFIERS: () => lN,
|
|
60656
60649
|
SystemPermissionFlag: () => Mm,
|
|
60657
60650
|
ViewCalendarLayout: () => im,
|
|
60658
60651
|
ViewFilterGroupLogicalOperator: () => am,
|
|
@@ -60662,88 +60655,88 @@ var lN = {
|
|
|
60662
60655
|
ViewSortDirection: () => lm,
|
|
60663
60656
|
ViewType: () => um,
|
|
60664
60657
|
ViewVisibility: () => dm,
|
|
60665
|
-
canAccessFullAdminPanel: () =>
|
|
60666
|
-
canImpersonate: () =>
|
|
60658
|
+
canAccessFullAdminPanel: () => jM,
|
|
60659
|
+
canImpersonate: () => AM,
|
|
60667
60660
|
createValidationResult: () => Em,
|
|
60668
60661
|
defineAgent: () => Dm,
|
|
60669
60662
|
defineApplication: () => Om,
|
|
60670
|
-
defineApplicationRole: () =>
|
|
60671
|
-
defineCommandMenuItem: () =>
|
|
60672
|
-
defineConnectionProvider: () =>
|
|
60673
|
-
defineField: () =>
|
|
60674
|
-
defineFrontComponent: () =>
|
|
60675
|
-
defineIndex: () =>
|
|
60676
|
-
defineLogicFunction: () =>
|
|
60677
|
-
defineNavigationMenuItem: () =>
|
|
60678
|
-
defineObject: () =>
|
|
60679
|
-
definePageLayout: () =>
|
|
60680
|
-
definePageLayoutTab: () =>
|
|
60681
|
-
definePermissionFlag: () =>
|
|
60682
|
-
definePostInstallLogicFunction: () =>
|
|
60683
|
-
definePreInstallLogicFunction: () =>
|
|
60684
|
-
defineRole: () =>
|
|
60685
|
-
defineSkill: () =>
|
|
60686
|
-
defineView: () =>
|
|
60687
|
-
defineViewField: () =>
|
|
60688
|
-
every: () =>
|
|
60689
|
-
everyDefined: () =>
|
|
60690
|
-
everyEquals: () =>
|
|
60691
|
-
favoriteRecordIds: () =>
|
|
60692
|
-
featureFlags: () =>
|
|
60693
|
-
generateDefaultFieldUniversalIdentifier: () =>
|
|
60694
|
-
hasAnySoftDeleteFilterOnView: () =>
|
|
60695
|
-
includes: () =>
|
|
60696
|
-
includesEvery: () =>
|
|
60697
|
-
isDashboardPageLayoutInEditMode: () =>
|
|
60698
|
-
isDefined: () =>
|
|
60699
|
-
isInSidePanel: () =>
|
|
60700
|
-
isLayoutCustomizationModeEnabled: () =>
|
|
60701
|
-
isNonEmptyString: () =>
|
|
60702
|
-
isSelectAll: () =>
|
|
60703
|
-
none: () =>
|
|
60704
|
-
noneDefined: () =>
|
|
60705
|
-
noneEquals: () =>
|
|
60706
|
-
numberOfSelectedRecords: () =>
|
|
60707
|
-
objectMetadataItem: () =>
|
|
60708
|
-
objectMetadataLabel: () =>
|
|
60709
|
-
objectPermissions: () =>
|
|
60710
|
-
pageType: () =>
|
|
60711
|
-
selectedRecords: () =>
|
|
60712
|
-
some: () =>
|
|
60713
|
-
someDefined: () =>
|
|
60714
|
-
someEquals: () =>
|
|
60715
|
-
someNonEmptyString: () =>
|
|
60716
|
-
targetObjectReadPermissions: () =>
|
|
60717
|
-
targetObjectWritePermissions: () =>
|
|
60718
|
-
validateFields: () =>
|
|
60719
|
-
}),
|
|
60663
|
+
defineApplicationRole: () => mN,
|
|
60664
|
+
defineCommandMenuItem: () => mM,
|
|
60665
|
+
defineConnectionProvider: () => rN,
|
|
60666
|
+
defineField: () => pM,
|
|
60667
|
+
defineFrontComponent: () => JM,
|
|
60668
|
+
defineIndex: () => XM,
|
|
60669
|
+
defineLogicFunction: () => ZM,
|
|
60670
|
+
defineNavigationMenuItem: () => iN,
|
|
60671
|
+
defineObject: () => aN,
|
|
60672
|
+
definePageLayout: () => uN,
|
|
60673
|
+
definePageLayoutTab: () => dN,
|
|
60674
|
+
definePermissionFlag: () => fN,
|
|
60675
|
+
definePostInstallLogicFunction: () => QM,
|
|
60676
|
+
definePreInstallLogicFunction: () => $M,
|
|
60677
|
+
defineRole: () => pN,
|
|
60678
|
+
defineSkill: () => hN,
|
|
60679
|
+
defineView: () => gN,
|
|
60680
|
+
defineViewField: () => _N,
|
|
60681
|
+
every: () => LM,
|
|
60682
|
+
everyDefined: () => RM,
|
|
60683
|
+
everyEquals: () => zM,
|
|
60684
|
+
favoriteRecordIds: () => xM,
|
|
60685
|
+
featureFlags: () => DM,
|
|
60686
|
+
generateDefaultFieldUniversalIdentifier: () => sN,
|
|
60687
|
+
hasAnySoftDeleteFilterOnView: () => CM,
|
|
60688
|
+
includes: () => IM,
|
|
60689
|
+
includesEvery: () => qM,
|
|
60690
|
+
isDashboardPageLayoutInEditMode: () => yM,
|
|
60691
|
+
isDefined: () => PM,
|
|
60692
|
+
isInSidePanel: () => vM,
|
|
60693
|
+
isLayoutCustomizationModeEnabled: () => bM,
|
|
60694
|
+
isNonEmptyString: () => FM,
|
|
60695
|
+
isSelectAll: () => SM,
|
|
60696
|
+
none: () => UM,
|
|
60697
|
+
noneDefined: () => WM,
|
|
60698
|
+
noneEquals: () => GM,
|
|
60699
|
+
numberOfSelectedRecords: () => wM,
|
|
60700
|
+
objectMetadataItem: () => MM,
|
|
60701
|
+
objectMetadataLabel: () => NM,
|
|
60702
|
+
objectPermissions: () => TM,
|
|
60703
|
+
pageType: () => _M,
|
|
60704
|
+
selectedRecords: () => EM,
|
|
60705
|
+
some: () => BM,
|
|
60706
|
+
someDefined: () => VM,
|
|
60707
|
+
someEquals: () => HM,
|
|
60708
|
+
someNonEmptyString: () => KM,
|
|
60709
|
+
targetObjectReadPermissions: () => OM,
|
|
60710
|
+
targetObjectWritePermissions: () => kM,
|
|
60711
|
+
validateFields: () => fM
|
|
60712
|
+
}), yN = (e) => /^define[A-Z]/.test(e) || e === "createValidationResult", bN = ((e) => {
|
|
60720
60713
|
let t = [], n = [];
|
|
60721
|
-
for (let r of Object.keys(e).sort())
|
|
60714
|
+
for (let r of Object.keys(e).sort()) yN(r) ? t.push(r) : n.push(r);
|
|
60722
60715
|
return {
|
|
60723
60716
|
factories: t,
|
|
60724
60717
|
any: n
|
|
60725
60718
|
};
|
|
60726
|
-
})(
|
|
60719
|
+
})(vN), xN = "twenty-sdk-define-stub", SN = "__twenty-sdk-define-stub__", CN = "\n// Auto-generated stub for twenty-sdk/define injected by the SDK CLI build.\n// Real implementations would pull in zod, twenty-shared and ~1MB of code; at\n// runtime only `default.config.handler` is consumed, so tiny no-ops suffice.\nconst __defineFactoryStub = (config) => ({\n success: true,\n config,\n errors: [],\n});\n\nconst __anyHandler = {\n get(_target, prop) {\n if (prop === '__esModule') return true;\n if (prop === Symbol.toPrimitive) return () => '';\n if (typeof prop === 'symbol') return undefined;\n return new Proxy(() => undefined, __anyHandler);\n },\n apply() {\n return new Proxy(() => undefined, __anyHandler);\n },\n};\nconst __anyStub = new Proxy(() => undefined, __anyHandler);\n", wN = () => {
|
|
60727
60720
|
let e = [];
|
|
60728
|
-
for (let t of
|
|
60729
|
-
for (let t of
|
|
60730
|
-
return `${
|
|
60731
|
-
},
|
|
60721
|
+
for (let t of bN.factories) e.push(`export const ${t} = __defineFactoryStub;`);
|
|
60722
|
+
for (let t of bN.any) e.push(`export const ${t} = __anyStub;`);
|
|
60723
|
+
return `${CN}\n${e.join("\n")}\n`;
|
|
60724
|
+
}, TN = () => ({
|
|
60732
60725
|
name: "twenty-sdk-define-stub",
|
|
60733
60726
|
setup(e) {
|
|
60734
60727
|
e.onResolve({ filter: /^twenty-sdk\/define$/ }, () => ({
|
|
60735
|
-
path:
|
|
60736
|
-
namespace:
|
|
60728
|
+
path: SN,
|
|
60729
|
+
namespace: xN
|
|
60737
60730
|
})), e.onLoad({
|
|
60738
60731
|
filter: /.*/,
|
|
60739
|
-
namespace:
|
|
60732
|
+
namespace: xN
|
|
60740
60733
|
}, () => ({
|
|
60741
|
-
contents:
|
|
60734
|
+
contents: wN(),
|
|
60742
60735
|
loader: "js"
|
|
60743
60736
|
}));
|
|
60744
60737
|
}
|
|
60745
|
-
}),
|
|
60746
|
-
let t = e.match(
|
|
60738
|
+
}), EN = /^(.+)\((\d+),(\d+)\): error TS\d+: (.+)$/, DN = (e) => {
|
|
60739
|
+
let t = e.match(EN);
|
|
60747
60740
|
if (!t) return null;
|
|
60748
60741
|
let [, n, r, i, a] = t;
|
|
60749
60742
|
return {
|
|
@@ -60752,14 +60745,14 @@ var lN = {
|
|
|
60752
60745
|
line: Number(r),
|
|
60753
60746
|
column: Number(i) - 1
|
|
60754
60747
|
};
|
|
60755
|
-
},
|
|
60748
|
+
}, ON = (e) => {
|
|
60756
60749
|
let t = [];
|
|
60757
60750
|
for (let n of e.split("\n")) {
|
|
60758
|
-
let e =
|
|
60751
|
+
let e = DN(n);
|
|
60759
60752
|
e && t.push(e);
|
|
60760
60753
|
}
|
|
60761
60754
|
return t;
|
|
60762
|
-
},
|
|
60755
|
+
}, kN = (e) => {
|
|
60763
60756
|
let t = T.join(e, "tsconfig.json"), n = T.join(e, "node_modules", ".bin", "tsc");
|
|
60764
60757
|
return new Promise((r) => {
|
|
60765
60758
|
A(n, [
|
|
@@ -60769,10 +60762,10 @@ var lN = {
|
|
|
60769
60762
|
"-p",
|
|
60770
60763
|
t
|
|
60771
60764
|
], { cwd: e }, (e, t, n) => {
|
|
60772
|
-
r(
|
|
60765
|
+
r(ON(n || t));
|
|
60773
60766
|
});
|
|
60774
60767
|
});
|
|
60775
|
-
},
|
|
60768
|
+
}, AN = (e) => e.map((e) => ({
|
|
60776
60769
|
text: e.text,
|
|
60777
60770
|
location: {
|
|
60778
60771
|
file: e.file,
|
|
@@ -60783,14 +60776,14 @@ var lN = {
|
|
|
60783
60776
|
namespace: "",
|
|
60784
60777
|
suggestion: ""
|
|
60785
60778
|
}
|
|
60786
|
-
})),
|
|
60779
|
+
})), jN = (e, t) => ({
|
|
60787
60780
|
name: "typecheck",
|
|
60788
60781
|
setup: (n) => {
|
|
60789
60782
|
n.onStart(async () => {
|
|
60790
|
-
if (!t()) return { errors:
|
|
60783
|
+
if (!t()) return { errors: AN(await kN(e)) };
|
|
60791
60784
|
});
|
|
60792
60785
|
}
|
|
60793
|
-
}),
|
|
60786
|
+
}), MN = [
|
|
60794
60787
|
"twenty-client-sdk/core",
|
|
60795
60788
|
"twenty-client-sdk/metadata",
|
|
60796
60789
|
"path",
|
|
@@ -60811,7 +60804,7 @@ var lN = {
|
|
|
60811
60804
|
"tls",
|
|
60812
60805
|
"child_process",
|
|
60813
60806
|
"worker_threads"
|
|
60814
|
-
],
|
|
60807
|
+
], NN = class {
|
|
60815
60808
|
constructor(e) {
|
|
60816
60809
|
this.esBuildContext = null, this.isRestarting = !1, this.lastChecksums = /* @__PURE__ */ new Map(), this.buildCompletePromise = Promise.resolve(), this.resolveBuildComplete = null, this.appPath = e.appPath, this.sourcePaths = e.sourcePaths, this.watchMode = e.watch ?? !0, this.onFileBuilt = e.handleFileBuilt, this.onBuildError = e.handleBuildError, this.config = e.config;
|
|
60817
60810
|
}
|
|
@@ -60886,28 +60879,28 @@ var lN = {
|
|
|
60886
60879
|
this.resolveBuildComplete = e;
|
|
60887
60880
|
}), await this.esBuildContext.rebuild(), await this.buildCompletePromise, this.watchMode && await this.esBuildContext.watch();
|
|
60888
60881
|
}
|
|
60889
|
-
},
|
|
60882
|
+
}, PN = (e) => new NN({
|
|
60890
60883
|
...e,
|
|
60891
60884
|
config: {
|
|
60892
|
-
externalModules:
|
|
60885
|
+
externalModules: MN,
|
|
60893
60886
|
fileFolder: Yp.BuiltLogicFunction,
|
|
60894
60887
|
platform: "node",
|
|
60895
|
-
extraPlugins: [
|
|
60888
|
+
extraPlugins: [jN(e.appPath, e.shouldSkipTypecheck), TN()],
|
|
60896
60889
|
banner: Ie
|
|
60897
60890
|
}
|
|
60898
|
-
}),
|
|
60891
|
+
}), FN = (t) => new NN({
|
|
60899
60892
|
...t,
|
|
60900
60893
|
config: {
|
|
60901
60894
|
externalModules: Tm,
|
|
60902
60895
|
fileFolder: Yp.BuiltFrontComponent,
|
|
60903
60896
|
jsx: "automatic",
|
|
60904
60897
|
extraPlugins: [
|
|
60905
|
-
|
|
60898
|
+
jN(t.appPath, t.shouldSkipTypecheck),
|
|
60906
60899
|
...e(),
|
|
60907
|
-
|
|
60900
|
+
TN()
|
|
60908
60901
|
]
|
|
60909
60902
|
}
|
|
60910
|
-
}),
|
|
60903
|
+
}), IN = () => ({
|
|
60911
60904
|
bundle: !0,
|
|
60912
60905
|
splitting: !1,
|
|
60913
60906
|
format: "esm",
|
|
@@ -60920,7 +60913,7 @@ var lN = {
|
|
|
60920
60913
|
minify: !0,
|
|
60921
60914
|
define: { "process.env.NODE_ENV": "\"production\"" },
|
|
60922
60915
|
plugins: [...e()]
|
|
60923
|
-
}),
|
|
60916
|
+
}), LN = async (t) => {
|
|
60924
60917
|
let n = o(t.appPath, P);
|
|
60925
60918
|
await _m(n), await ym(n);
|
|
60926
60919
|
let r = /* @__PURE__ */ new Map(), i = (e) => {
|
|
@@ -60943,13 +60936,13 @@ var lN = {
|
|
|
60943
60936
|
platform: "node",
|
|
60944
60937
|
outdir: o(t.appPath, P),
|
|
60945
60938
|
outExtension: { ".js": ".mjs" },
|
|
60946
|
-
external:
|
|
60939
|
+
external: MN,
|
|
60947
60940
|
tsconfig: o(t.appPath, "tsconfig.json"),
|
|
60948
60941
|
sourcemap: !0,
|
|
60949
60942
|
metafile: !0,
|
|
60950
60943
|
logLevel: "silent",
|
|
60951
60944
|
banner: Ie,
|
|
60952
|
-
plugins: [
|
|
60945
|
+
plugins: [TN()]
|
|
60953
60946
|
},
|
|
60954
60947
|
onFileBuilt: i
|
|
60955
60948
|
}), await mm({
|
|
@@ -60957,28 +60950,28 @@ var lN = {
|
|
|
60957
60950
|
sourcePaths: s,
|
|
60958
60951
|
fileFolder: Yp.BuiltFrontComponent,
|
|
60959
60952
|
buildOptions: {
|
|
60960
|
-
...
|
|
60953
|
+
...IN(),
|
|
60961
60954
|
outdir: o(t.appPath, P),
|
|
60962
60955
|
tsconfig: o(t.appPath, "tsconfig.json"),
|
|
60963
60956
|
jsx: "automatic",
|
|
60964
60957
|
sourcemap: !0,
|
|
60965
60958
|
metafile: !0,
|
|
60966
60959
|
logLevel: "silent",
|
|
60967
|
-
plugins: [...e(),
|
|
60960
|
+
plugins: [...e(), TN()]
|
|
60968
60961
|
},
|
|
60969
60962
|
onFileBuilt: i
|
|
60970
|
-
}), await
|
|
60963
|
+
}), await RN({
|
|
60971
60964
|
appPath: t.appPath,
|
|
60972
60965
|
fileFolder: Yp.PublicAsset,
|
|
60973
60966
|
filePaths: t.filePaths.publicAssets,
|
|
60974
60967
|
collectFileBuilt: i
|
|
60975
|
-
}), await
|
|
60968
|
+
}), await RN({
|
|
60976
60969
|
appPath: t.appPath,
|
|
60977
60970
|
fileFolder: Yp.Dependencies,
|
|
60978
60971
|
filePaths: ["package.json", "yarn.lock"].filter((e) => gm(o(t.appPath, e))),
|
|
60979
60972
|
collectFileBuilt: i
|
|
60980
60973
|
}), { builtFileInfos: r };
|
|
60981
|
-
},
|
|
60974
|
+
}, RN = async ({ appPath: e, fileFolder: t, filePaths: n, collectFileBuilt: r }) => {
|
|
60982
60975
|
for (let a of n) {
|
|
60983
60976
|
let n = o(e, a);
|
|
60984
60977
|
if (!await hm(n)) continue;
|
|
@@ -60992,11 +60985,11 @@ var lN = {
|
|
|
60992
60985
|
checksum: u.createHash("md5").update(l).digest("hex")
|
|
60993
60986
|
});
|
|
60994
60987
|
}
|
|
60995
|
-
},
|
|
60988
|
+
}, zN = /* @__PURE__ */ function(e) {
|
|
60996
60989
|
return e.DefineApplication = "defineApplication", e.DefineApplicationRole = "defineApplicationRole", e.DefineField = "defineField", e.DefineIndex = "defineIndex", e.DefineLogicFunction = "defineLogicFunction", e.DefinePostInstallLogicFunction = "definePostInstallLogicFunction", e.DefinePreInstallLogicFunction = "definePreInstallLogicFunction", e.DefineObject = "defineObject", e.DefinePermissionFlag = "definePermissionFlag", e.DefineRole = "defineRole", e.DefineSkill = "defineSkill", e.DefineAgent = "defineAgent", e.DefineConnectionProvider = "defineConnectionProvider", e.DefineFrontComponent = "defineFrontComponent", e.DefineView = "defineView", e.DefineViewField = "defineViewField", e.DefineNavigationMenuItem = "defineNavigationMenuItem", e.DefinePageLayout = "definePageLayout", e.DefinePageLayoutTab = "definePageLayoutTab", e.DefineCommandMenuItem = "defineCommandMenuItem", e;
|
|
60997
|
-
}({}),
|
|
60990
|
+
}({}), BN = /* @__PURE__ */ function(e) {
|
|
60998
60991
|
return e.Application = "application", e.Fields = "fields", e.Indexes = "indexes", e.LogicFunctions = "logicFunctions", e.Objects = "objects", e.PermissionFlags = "permissionFlags", e.Roles = "roles", e.Skills = "skills", e.Agents = "agents", e.ConnectionProviders = "connectionProviders", e.FrontComponents = "frontComponents", e.PublicAssets = "publicAssets", e.Views = "views", e.ViewFields = "viewFields", e.NavigationMenuItems = "navigationMenuItems", e.PageLayouts = "pageLayouts", e.PageLayoutTabs = "pageLayoutTabs", e.CommandMenuItems = "commandMenuItems", e;
|
|
60999
|
-
}({}),
|
|
60992
|
+
}({}), VN = {
|
|
61000
60993
|
defineApplication: "application",
|
|
61001
60994
|
defineApplicationRole: "roles",
|
|
61002
60995
|
defineField: "fields",
|
|
@@ -61017,41 +61010,41 @@ var lN = {
|
|
|
61017
61010
|
definePageLayout: "pageLayouts",
|
|
61018
61011
|
definePageLayoutTab: "pageLayoutTabs",
|
|
61019
61012
|
defineCommandMenuItem: "commandMenuItems"
|
|
61020
|
-
},
|
|
61013
|
+
}, HN = (e) => {
|
|
61021
61014
|
if (!le.isCallExpression(e)) return;
|
|
61022
61015
|
let t = e.expression;
|
|
61023
|
-
if (le.isIdentifier(t) && Object.values(
|
|
61024
|
-
},
|
|
61016
|
+
if (le.isIdentifier(t) && Object.values(zN).includes(t.text)) return t.text;
|
|
61017
|
+
}, UN = (e) => {
|
|
61025
61018
|
let t = le.createSourceFile("temp.ts", e, le.ScriptTarget.Latest, !0), n = [];
|
|
61026
61019
|
le.forEachChild(t, (e) => {
|
|
61027
61020
|
n.push(e);
|
|
61028
61021
|
});
|
|
61029
61022
|
for (let e of n) if (le.isExportAssignment(e)) {
|
|
61030
61023
|
if (e.isExportEquals || !e.expression) return;
|
|
61031
|
-
let t =
|
|
61024
|
+
let t = HN(e.expression);
|
|
61032
61025
|
if (t) return t;
|
|
61033
61026
|
}
|
|
61034
|
-
},
|
|
61027
|
+
}, WN = [[/\bfavoriteRecordIds\.length\b/g, "arrayLength(favoriteRecordIds)"], [/\bselectedRecords\.length\b/g, "arrayLength(selectedRecords)"]], GN = (e) => WN.reduce((e, [t, n]) => e.replace(t, n), e.replace(/!==/g, "!=").replace(/===/g, "==").replace(/&&/g, "and").replace(/\|\|/g, "or").replace(/!(?!=)/g, "not ").replace(/,(\s*\))/g, "$1")), KN = /(conditionalAvailabilityExpression\s*:\s*)(?!['"`])((?:[^,}()]|\([^()]*\))+)/g, qN = (e) => e.replace(KN, (e, t, n) => t + JSON.stringify(GN(n.trim()))), JN = {
|
|
61035
61028
|
name: "conditional-availability-transform",
|
|
61036
61029
|
setup: (e) => {
|
|
61037
61030
|
e.onLoad({ filter: /\.tsx?$/ }, async (e) => {
|
|
61038
61031
|
let t = await ue.readFile(e.path, "utf8");
|
|
61039
61032
|
if (!t.includes("conditionalAvailabilityExpression")) return null;
|
|
61040
|
-
let n =
|
|
61033
|
+
let n = qN(t);
|
|
61041
61034
|
return n === t ? null : {
|
|
61042
61035
|
contents: n,
|
|
61043
61036
|
loader: e.path.endsWith(".tsx") ? "tsx" : "ts"
|
|
61044
61037
|
};
|
|
61045
61038
|
});
|
|
61046
61039
|
}
|
|
61047
|
-
},
|
|
61040
|
+
}, YN = [
|
|
61048
61041
|
"twenty-sdk/ui",
|
|
61049
61042
|
"twenty-client-sdk/core",
|
|
61050
61043
|
"twenty-client-sdk/metadata"
|
|
61051
|
-
],
|
|
61044
|
+
], XN = {
|
|
61052
61045
|
name: "manifest-mock",
|
|
61053
61046
|
setup: (e) => {
|
|
61054
|
-
let t = RegExp(`^(${
|
|
61047
|
+
let t = RegExp(`^(${YN.map((e) => e.replace("/", "\\/")).join("|")})$`);
|
|
61055
61048
|
e.onResolve({ filter: t }, ({ path: e }) => ({
|
|
61056
61049
|
path: e,
|
|
61057
61050
|
namespace: "manifest-mock"
|
|
@@ -61063,10 +61056,10 @@ var lN = {
|
|
|
61063
61056
|
loader: "js"
|
|
61064
61057
|
}));
|
|
61065
61058
|
}
|
|
61066
|
-
},
|
|
61059
|
+
}, ZN = async ({ filePath: e, appPath: t }) => $N(await QN({
|
|
61067
61060
|
filePath: e,
|
|
61068
61061
|
appPath: t
|
|
61069
|
-
}), e),
|
|
61062
|
+
}), e), QN = async ({ filePath: e, appPath: t }) => {
|
|
61070
61063
|
let r = n.join(t, "tsconfig.json"), i = await hm(r), a = de(n.join(t, "package.json")), o, s;
|
|
61071
61064
|
try {
|
|
61072
61065
|
o = n.dirname(a.resolve("react/package.json")), s = n.dirname(a.resolve("react-dom/package.json"));
|
|
@@ -61084,7 +61077,7 @@ var lN = {
|
|
|
61084
61077
|
...o && { react: o },
|
|
61085
61078
|
...s && { "react-dom": s }
|
|
61086
61079
|
},
|
|
61087
|
-
plugins: [
|
|
61080
|
+
plugins: [JN, XN],
|
|
61088
61081
|
logLevel: "silent"
|
|
61089
61082
|
})).outputFiles[0].text, l = await m(n.join(pe.tmpdir(), "twenty-manifest-")), u = n.join(l, "module.cjs");
|
|
61090
61083
|
try {
|
|
@@ -61092,27 +61085,27 @@ var lN = {
|
|
|
61092
61085
|
} finally {
|
|
61093
61086
|
await xm(l);
|
|
61094
61087
|
}
|
|
61095
|
-
},
|
|
61096
|
-
if (G(e.default) &&
|
|
61088
|
+
}, $N = (e, t) => {
|
|
61089
|
+
if (G(e.default) && Yj(e.default)) return e.default;
|
|
61097
61090
|
throw Error(`Config file ${t} must export a config object default export`);
|
|
61098
|
-
},
|
|
61091
|
+
}, eP = "a80ff791-b940-4c47-a522-2bb478515415", tP = (e) => e.type !== U.SELECT && e.type !== U.MULTI_SELECT || e.options === void 0 || e.options === null ? e : {
|
|
61099
61092
|
...e,
|
|
61100
61093
|
options: e.options.map((t) => ({
|
|
61101
61094
|
...t,
|
|
61102
|
-
id: t.id ?? b(`${t.label}-${e.universalIdentifier}`,
|
|
61095
|
+
id: t.id ?? b(`${t.label}-${e.universalIdentifier}`, eP)
|
|
61103
61096
|
}))
|
|
61104
|
-
},
|
|
61097
|
+
}, nP = "b403ec59-4d80-4f22-85e6-717a192dc9cb", rP = (e) => ({
|
|
61105
61098
|
...e,
|
|
61106
61099
|
objectPermissions: (e.objectPermissions ?? []).map((t) => ({
|
|
61107
61100
|
...t,
|
|
61108
|
-
universalIdentifier: b(`${e.universalIdentifier}:${t.objectUniversalIdentifier}`,
|
|
61101
|
+
universalIdentifier: b(`${e.universalIdentifier}:${t.objectUniversalIdentifier}`, nP)
|
|
61109
61102
|
})),
|
|
61110
61103
|
fieldPermissions: (e.fieldPermissions ?? []).map((t) => ({
|
|
61111
61104
|
...t,
|
|
61112
|
-
universalIdentifier: b(`${e.universalIdentifier}:${t.objectUniversalIdentifier}:${t.fieldUniversalIdentifier}`,
|
|
61105
|
+
universalIdentifier: b(`${e.universalIdentifier}:${t.objectUniversalIdentifier}:${t.fieldUniversalIdentifier}`, nP)
|
|
61113
61106
|
})),
|
|
61114
61107
|
permissionFlagUniversalIdentifiers: e.permissionFlagUniversalIdentifiers ?? []
|
|
61115
|
-
}),
|
|
61108
|
+
}), iP = (e) => {
|
|
61116
61109
|
let t = e.universalIdentifier;
|
|
61117
61110
|
return [
|
|
61118
61111
|
{
|
|
@@ -61123,7 +61116,7 @@ var lN = {
|
|
|
61123
61116
|
isNullable: !1,
|
|
61124
61117
|
defaultValue: "uuid",
|
|
61125
61118
|
type: U.UUID,
|
|
61126
|
-
universalIdentifier:
|
|
61119
|
+
universalIdentifier: sN({
|
|
61127
61120
|
objectUniversalIdentifier: t,
|
|
61128
61121
|
fieldName: "id"
|
|
61129
61122
|
})
|
|
@@ -61136,7 +61129,7 @@ var lN = {
|
|
|
61136
61129
|
isNullable: !0,
|
|
61137
61130
|
defaultValue: null,
|
|
61138
61131
|
type: U.TEXT,
|
|
61139
|
-
universalIdentifier:
|
|
61132
|
+
universalIdentifier: sN({
|
|
61140
61133
|
objectUniversalIdentifier: t,
|
|
61141
61134
|
fieldName: "name"
|
|
61142
61135
|
})
|
|
@@ -61149,7 +61142,7 @@ var lN = {
|
|
|
61149
61142
|
isNullable: !1,
|
|
61150
61143
|
defaultValue: "now",
|
|
61151
61144
|
type: U.DATE_TIME,
|
|
61152
|
-
universalIdentifier:
|
|
61145
|
+
universalIdentifier: sN({
|
|
61153
61146
|
objectUniversalIdentifier: t,
|
|
61154
61147
|
fieldName: "createdAt"
|
|
61155
61148
|
})
|
|
@@ -61162,7 +61155,7 @@ var lN = {
|
|
|
61162
61155
|
isNullable: !1,
|
|
61163
61156
|
defaultValue: "now",
|
|
61164
61157
|
type: U.DATE_TIME,
|
|
61165
|
-
universalIdentifier:
|
|
61158
|
+
universalIdentifier: sN({
|
|
61166
61159
|
objectUniversalIdentifier: t,
|
|
61167
61160
|
fieldName: "updatedAt"
|
|
61168
61161
|
})
|
|
@@ -61175,7 +61168,7 @@ var lN = {
|
|
|
61175
61168
|
isNullable: !0,
|
|
61176
61169
|
defaultValue: null,
|
|
61177
61170
|
type: U.DATE_TIME,
|
|
61178
|
-
universalIdentifier:
|
|
61171
|
+
universalIdentifier: sN({
|
|
61179
61172
|
objectUniversalIdentifier: t,
|
|
61180
61173
|
fieldName: "deletedAt"
|
|
61181
61174
|
})
|
|
@@ -61191,7 +61184,7 @@ var lN = {
|
|
|
61191
61184
|
source: "'MANUAL'"
|
|
61192
61185
|
},
|
|
61193
61186
|
type: U.ACTOR,
|
|
61194
|
-
universalIdentifier:
|
|
61187
|
+
universalIdentifier: sN({
|
|
61195
61188
|
objectUniversalIdentifier: t,
|
|
61196
61189
|
fieldName: "createdBy"
|
|
61197
61190
|
})
|
|
@@ -61207,7 +61200,7 @@ var lN = {
|
|
|
61207
61200
|
source: "'MANUAL'"
|
|
61208
61201
|
},
|
|
61209
61202
|
type: U.ACTOR,
|
|
61210
|
-
universalIdentifier:
|
|
61203
|
+
universalIdentifier: sN({
|
|
61211
61204
|
objectUniversalIdentifier: t,
|
|
61212
61205
|
fieldName: "updatedBy"
|
|
61213
61206
|
})
|
|
@@ -61220,7 +61213,7 @@ var lN = {
|
|
|
61220
61213
|
isNullable: !1,
|
|
61221
61214
|
defaultValue: 0,
|
|
61222
61215
|
type: U.POSITION,
|
|
61223
|
-
universalIdentifier:
|
|
61216
|
+
universalIdentifier: sN({
|
|
61224
61217
|
objectUniversalIdentifier: t,
|
|
61225
61218
|
fieldName: "position"
|
|
61226
61219
|
})
|
|
@@ -61233,59 +61226,59 @@ var lN = {
|
|
|
61233
61226
|
isNullable: !0,
|
|
61234
61227
|
defaultValue: null,
|
|
61235
61228
|
type: U.TS_VECTOR,
|
|
61236
|
-
universalIdentifier:
|
|
61229
|
+
universalIdentifier: sN({
|
|
61237
61230
|
objectUniversalIdentifier: t,
|
|
61238
61231
|
fieldName: "searchVector"
|
|
61239
61232
|
})
|
|
61240
61233
|
}
|
|
61241
61234
|
];
|
|
61242
|
-
},
|
|
61235
|
+
}, aP = {
|
|
61243
61236
|
targetFieldName: (e) => `target${GA(e.nameSingular)}`,
|
|
61244
61237
|
targetLabel: (e) => GA(e.nameSingular),
|
|
61245
61238
|
icon: "IconBuildingSkyscraper",
|
|
61246
61239
|
isNullable: !0
|
|
61247
|
-
},
|
|
61240
|
+
}, oP = [
|
|
61248
61241
|
{
|
|
61249
|
-
...
|
|
61242
|
+
...aP,
|
|
61250
61243
|
fieldName: "timelineActivities",
|
|
61251
61244
|
label: "Timeline Activities",
|
|
61252
61245
|
targetIcon: "IconTimelineEvent",
|
|
61253
61246
|
targetFieldType: U.MORPH_RELATION,
|
|
61254
61247
|
standardObjectKey: "timelineActivity",
|
|
61255
|
-
morphId:
|
|
61248
|
+
morphId: cN.timelineActivity.morphIds.targetMorphId.morphId
|
|
61256
61249
|
},
|
|
61257
61250
|
{
|
|
61258
|
-
...
|
|
61251
|
+
...aP,
|
|
61259
61252
|
fieldName: "attachments",
|
|
61260
61253
|
label: "Attachments",
|
|
61261
61254
|
icon: "IconBuildingSkyscraper",
|
|
61262
61255
|
targetIcon: "IconFileImport",
|
|
61263
61256
|
targetFieldType: U.MORPH_RELATION,
|
|
61264
61257
|
standardObjectKey: "attachment",
|
|
61265
|
-
morphId:
|
|
61258
|
+
morphId: cN.attachment.morphIds.targetMorphId.morphId
|
|
61266
61259
|
},
|
|
61267
61260
|
{
|
|
61268
|
-
...
|
|
61261
|
+
...aP,
|
|
61269
61262
|
fieldName: "noteTargets",
|
|
61270
61263
|
label: "Note Targets",
|
|
61271
61264
|
icon: "IconBuildingSkyscraper",
|
|
61272
61265
|
targetIcon: "IconCheckbox",
|
|
61273
61266
|
targetFieldType: U.MORPH_RELATION,
|
|
61274
61267
|
standardObjectKey: "noteTarget",
|
|
61275
|
-
morphId:
|
|
61268
|
+
morphId: cN.noteTarget.morphIds.targetMorphId.morphId
|
|
61276
61269
|
},
|
|
61277
61270
|
{
|
|
61278
|
-
...
|
|
61271
|
+
...aP,
|
|
61279
61272
|
fieldName: "taskTargets",
|
|
61280
61273
|
label: "Task Targets",
|
|
61281
61274
|
icon: "IconBuildingSkyscraper",
|
|
61282
61275
|
targetIcon: "IconCheckbox",
|
|
61283
61276
|
targetFieldType: U.MORPH_RELATION,
|
|
61284
61277
|
standardObjectKey: "taskTarget",
|
|
61285
|
-
morphId:
|
|
61278
|
+
morphId: cN.taskTarget.morphIds.targetMorphId.morphId
|
|
61286
61279
|
}
|
|
61287
|
-
],
|
|
61288
|
-
let i =
|
|
61280
|
+
], sP = ({ config: e, forwardFieldUniversalIdentifier: t, objectConfig: n, universalIdentifier: r }) => {
|
|
61281
|
+
let i = cN[e.standardObjectKey], a = {
|
|
61289
61282
|
name: e.targetFieldName(n),
|
|
61290
61283
|
label: e.targetLabel(n),
|
|
61291
61284
|
description: `${e.targetLabel(n)} ${n.labelSingular}`,
|
|
@@ -61309,13 +61302,13 @@ var lN = {
|
|
|
61309
61302
|
...a,
|
|
61310
61303
|
type: e.targetFieldType
|
|
61311
61304
|
};
|
|
61312
|
-
},
|
|
61305
|
+
}, cP = (e) => {
|
|
61313
61306
|
let t = [], n = [];
|
|
61314
|
-
for (let r of
|
|
61315
|
-
let i =
|
|
61307
|
+
for (let r of oP) {
|
|
61308
|
+
let i = cN[r.standardObjectKey], a = sN({
|
|
61316
61309
|
objectUniversalIdentifier: e.universalIdentifier,
|
|
61317
61310
|
fieldName: r.fieldName
|
|
61318
|
-
}), o =
|
|
61311
|
+
}), o = sN({
|
|
61319
61312
|
objectUniversalIdentifier: e.universalIdentifier,
|
|
61320
61313
|
fieldName: `${r.fieldName}Inverse`
|
|
61321
61314
|
}), s = {
|
|
@@ -61329,7 +61322,7 @@ var lN = {
|
|
|
61329
61322
|
universalIdentifier: a,
|
|
61330
61323
|
relationTargetFieldMetadataUniversalIdentifier: o,
|
|
61331
61324
|
relationTargetObjectMetadataUniversalIdentifier: i.universalIdentifier
|
|
61332
|
-
}, c =
|
|
61325
|
+
}, c = sP({
|
|
61333
61326
|
config: r,
|
|
61334
61327
|
objectConfig: e,
|
|
61335
61328
|
universalIdentifier: o,
|
|
@@ -61341,25 +61334,25 @@ var lN = {
|
|
|
61341
61334
|
objectFields: t,
|
|
61342
61335
|
fields: n
|
|
61343
61336
|
};
|
|
61344
|
-
},
|
|
61345
|
-
let t =
|
|
61337
|
+
}, lP = (e) => {
|
|
61338
|
+
let t = iP(e), { objectFields: n, fields: r } = cP(e), i = (e.fields ?? []).map((e) => e.name), a = [...e.fields];
|
|
61346
61339
|
for (let e of t) i.includes(e.name) || a.push(e);
|
|
61347
61340
|
for (let e of n) i.includes(e.name) || a.push(e);
|
|
61348
61341
|
return {
|
|
61349
61342
|
objectFields: a,
|
|
61350
61343
|
fields: r
|
|
61351
61344
|
};
|
|
61352
|
-
},
|
|
61345
|
+
}, uP = /* @__PURE__ */ "pageType.isInSidePanel.isDashboardPageLayoutInEditMode.isLayoutCustomizationModeEnabled.favoriteRecordIds.isSelectAll.hasAnySoftDeleteFilterOnView.numberOfSelectedRecords.objectPermissions.selectedRecords.featureFlags.targetObjectReadPermissions.targetObjectWritePermissions.canImpersonate.canAccessFullAdminPanel.objectMetadataItem.objectMetadataLabel.isDefined.isNonEmptyString.includes.every.everyDefined.everyEquals.some.someDefined.someEquals.none.noneDefined.noneEquals.someNonEmptyString.includesEvery".split("."), dP = "conditionalAvailabilityExpression", fP = ["twenty-sdk/define", "twenty-sdk"], pP = new Set(uP), mP = (e) => {
|
|
61353
61346
|
let t = [];
|
|
61354
61347
|
for (let n of e.statements) {
|
|
61355
|
-
if (!j.isImportDeclaration(n) || !j.isStringLiteral(n.moduleSpecifier) || !
|
|
61348
|
+
if (!j.isImportDeclaration(n) || !j.isStringLiteral(n.moduleSpecifier) || !fP.includes(n.moduleSpecifier.text)) continue;
|
|
61356
61349
|
let r = n.importClause;
|
|
61357
61350
|
if (!G(r) || r.phaseModifier === j.SyntaxKind.TypeKeyword) continue;
|
|
61358
61351
|
let i = r.namedBindings;
|
|
61359
61352
|
if (G(i)) {
|
|
61360
61353
|
if (j.isNamespaceImport(i)) {
|
|
61361
61354
|
let n = i.name.text, r = (e) => {
|
|
61362
|
-
j.isPropertyAccessExpression(e) && j.isIdentifier(e.expression) && e.expression.text === n &&
|
|
61355
|
+
j.isPropertyAccessExpression(e) && j.isIdentifier(e.expression) && e.expression.text === n && pP.has(e.name.text) && t.push({
|
|
61363
61356
|
importedName: e.name.text,
|
|
61364
61357
|
node: e
|
|
61365
61358
|
}), j.forEachChild(e, r);
|
|
@@ -61370,7 +61363,7 @@ var lN = {
|
|
|
61370
61363
|
if (j.isNamedImports(i)) for (let e of i.elements) {
|
|
61371
61364
|
if (e.isTypeOnly) continue;
|
|
61372
61365
|
let n = (e.propertyName ?? e.name).text;
|
|
61373
|
-
|
|
61366
|
+
pP.has(n) && t.push({
|
|
61374
61367
|
importedName: n,
|
|
61375
61368
|
node: e
|
|
61376
61369
|
});
|
|
@@ -61378,10 +61371,10 @@ var lN = {
|
|
|
61378
61371
|
}
|
|
61379
61372
|
}
|
|
61380
61373
|
return t;
|
|
61381
|
-
},
|
|
61374
|
+
}, hP = (e) => {
|
|
61382
61375
|
let t = !1, n = (e) => {
|
|
61383
61376
|
if (!t) {
|
|
61384
|
-
if ((j.isPropertyAssignment(e) || j.isShorthandPropertyAssignment(e)) && (j.isIdentifier(e.name) || j.isStringLiteral(e.name)) && e.name.text ===
|
|
61377
|
+
if ((j.isPropertyAssignment(e) || j.isShorthandPropertyAssignment(e)) && (j.isIdentifier(e.name) || j.isStringLiteral(e.name)) && e.name.text === dP) {
|
|
61385
61378
|
t = !0;
|
|
61386
61379
|
return;
|
|
61387
61380
|
}
|
|
@@ -61389,14 +61382,14 @@ var lN = {
|
|
|
61389
61382
|
}
|
|
61390
61383
|
};
|
|
61391
61384
|
return n(e), t;
|
|
61392
|
-
},
|
|
61393
|
-
if (!
|
|
61394
|
-
let n = j.createSourceFile(t, e, j.ScriptTarget.Latest, !0, t.endsWith(".tsx") ? j.ScriptKind.TSX : j.ScriptKind.TS), r =
|
|
61395
|
-
return r.length === 0 ||
|
|
61385
|
+
}, gP = (e, t) => {
|
|
61386
|
+
if (!uP.some((t) => e.includes(t))) return [];
|
|
61387
|
+
let n = j.createSourceFile(t, e, j.ScriptTarget.Latest, !0, t.endsWith(".tsx") ? j.ScriptKind.TSX : j.ScriptKind.TS), r = mP(n);
|
|
61388
|
+
return r.length === 0 || hP(n) ? [] : r.map(({ importedName: e, node: r }) => {
|
|
61396
61389
|
let { line: i, character: a } = n.getLineAndCharacterOfPosition(r.getStart(n));
|
|
61397
|
-
return `${t}:${i + 1}:${a + 1} - "${e}" is a conditional-availability expression variable from twenty-sdk but this file has no ${
|
|
61390
|
+
return `${t}:${i + 1}:${a + 1} - "${e}" is a conditional-availability expression variable from twenty-sdk but this file has no ${dP}. These variables can only be used inside a command's ${dP}, not at runtime.`;
|
|
61398
61391
|
});
|
|
61399
|
-
},
|
|
61392
|
+
}, _P = ({ views: e, objects: t, fields: n }) => {
|
|
61400
61393
|
let r = [], i = /* @__PURE__ */ new Map();
|
|
61401
61394
|
for (let e of n) i.set(e.universalIdentifier, e);
|
|
61402
61395
|
for (let e of t) for (let t of e.fields) i.set(t.universalIdentifier, t);
|
|
@@ -61412,10 +61405,10 @@ var lN = {
|
|
|
61412
61405
|
a.includes(e.operand) || r.push(`Operand "${e.operand}" is not supported on field "${t.name}" (type "${n}"). Supported operands: ${a.join(", ")}.`);
|
|
61413
61406
|
}
|
|
61414
61407
|
return r;
|
|
61415
|
-
},
|
|
61408
|
+
}, vP = {
|
|
61416
61409
|
type: "object",
|
|
61417
61410
|
properties: {}
|
|
61418
|
-
},
|
|
61411
|
+
}, yP = (e) => {
|
|
61419
61412
|
let t = { type: "unknown" };
|
|
61420
61413
|
switch (e.type) {
|
|
61421
61414
|
case "string":
|
|
@@ -61429,16 +61422,16 @@ var lN = {
|
|
|
61429
61422
|
t.type = "boolean";
|
|
61430
61423
|
break;
|
|
61431
61424
|
case "array":
|
|
61432
|
-
t.type = "array", e.items && (t.items =
|
|
61425
|
+
t.type = "array", e.items && (t.items = yP(e.items));
|
|
61433
61426
|
break;
|
|
61434
61427
|
case "object":
|
|
61435
|
-
t.type = "object", e.properties && (t.properties = Object.fromEntries(Object.entries(e.properties).map(([e, t]) => [e,
|
|
61428
|
+
t.type = "object", e.properties && (t.properties = Object.fromEntries(Object.entries(e.properties).map(([e, t]) => [e, yP(t)])));
|
|
61436
61429
|
break;
|
|
61437
61430
|
default: t.type = "unknown";
|
|
61438
61431
|
}
|
|
61439
61432
|
return Array.isArray(e.enum) && (t.enum = e.enum.filter((e) => typeof e == "string")), e.multiline === !0 && (t.multiline = !0), D(e.label) && (t.label = e.label), t;
|
|
61440
|
-
},
|
|
61441
|
-
|
|
61433
|
+
}, bP = (e) => [yP(e)];
|
|
61434
|
+
bP({
|
|
61442
61435
|
type: "object",
|
|
61443
61436
|
properties: {
|
|
61444
61437
|
a: { type: "string" },
|
|
@@ -61447,42 +61440,42 @@ xP({
|
|
|
61447
61440
|
});
|
|
61448
61441
|
//#endregion
|
|
61449
61442
|
//#region ../twenty-shared/dist/logic-function.mjs
|
|
61450
|
-
var
|
|
61451
|
-
let { getFunctionInputSchema: t } = await import("./get-function-input-schema-NI9y_bIk-
|
|
61443
|
+
var xP = async (e) => {
|
|
61444
|
+
let { getFunctionInputSchema: t } = await import("./get-function-input-schema-NI9y_bIk-Cdh2RIb9.mjs"), n = t(e)[0];
|
|
61452
61445
|
return n?.type === "object" && G(n.properties) ? {
|
|
61453
61446
|
type: "object",
|
|
61454
61447
|
properties: n.properties
|
|
61455
|
-
} :
|
|
61456
|
-
},
|
|
61448
|
+
} : vP;
|
|
61449
|
+
}, SP = (e) => !G(e) || e === null ? "unknown" : typeof e == "string" ? "string" : typeof e == "number" ? "number" : typeof e == "boolean" ? "boolean" : Array.isArray(e) ? "array" : "unknown", CP = (e) => e ? Object.entries(e).reduce((e, [t, n]) => (O(n) && !Array.isArray(n) ? e[t] = {
|
|
61457
61450
|
isLeaf: !1,
|
|
61458
61451
|
type: "object",
|
|
61459
61452
|
label: t,
|
|
61460
|
-
value:
|
|
61453
|
+
value: CP(n)
|
|
61461
61454
|
} : e[t] = {
|
|
61462
61455
|
isLeaf: !0,
|
|
61463
61456
|
value: n,
|
|
61464
|
-
type:
|
|
61457
|
+
type: SP(n),
|
|
61465
61458
|
label: t
|
|
61466
|
-
}, e), {}) : {},
|
|
61459
|
+
}, e), {}) : {}, wP = [
|
|
61467
61460
|
"string",
|
|
61468
61461
|
"number",
|
|
61469
61462
|
"boolean",
|
|
61470
61463
|
"array",
|
|
61471
61464
|
"unknown"
|
|
61472
|
-
],
|
|
61465
|
+
], TP = (e) => wP.includes(e), EP = (e, t) => {
|
|
61473
61466
|
let n = t.label ?? e;
|
|
61474
61467
|
return t.type === "object" ? {
|
|
61475
61468
|
isLeaf: !1,
|
|
61476
61469
|
type: "object",
|
|
61477
61470
|
label: n,
|
|
61478
|
-
value: O(t.properties) ?
|
|
61471
|
+
value: O(t.properties) ? DP(t.properties) : {}
|
|
61479
61472
|
} : {
|
|
61480
61473
|
isLeaf: !0,
|
|
61481
|
-
type:
|
|
61474
|
+
type: TP(t.type) ? t.type : "unknown",
|
|
61482
61475
|
label: n,
|
|
61483
61476
|
value: null
|
|
61484
61477
|
};
|
|
61485
|
-
},
|
|
61478
|
+
}, DP = (e) => Object.entries(e).reduce((e, [t, n]) => (e[t] = EP(t, n), e), {}), OP = async (e) => await me(["**/*.ts", "**/*.tsx"], {
|
|
61486
61479
|
cwd: e,
|
|
61487
61480
|
absolute: !0,
|
|
61488
61481
|
ignore: [
|
|
@@ -61492,104 +61485,104 @@ var SP = async (e) => {
|
|
|
61492
61485
|
"**/.twenty/**"
|
|
61493
61486
|
],
|
|
61494
61487
|
onlyFiles: !0
|
|
61495
|
-
}),
|
|
61488
|
+
}), kP = async (e) => await me([`${Fe}/**/*`], {
|
|
61496
61489
|
cwd: e,
|
|
61497
61490
|
absolute: !0,
|
|
61498
61491
|
onlyFiles: !0
|
|
61499
|
-
}),
|
|
61500
|
-
let t = await
|
|
61492
|
+
}), AP = async (e) => {
|
|
61493
|
+
let t = await OP(e), n = [], i = [], o, c = [], l = [], u = [], d = [], f = [], p = [], m = [], g = [], _ = [], v = [], y = [], b = [], x = [], S = [], C = [], w = [], T = [], E = [], ee = [], te = [], D = [], ne = [], re = [], O = [], ie = [], k = [], A = [], ae = [], oe = [], se = [], ce = [], le = [], j = [], ue = [], de = [], fe = [], pe = [], me = [];
|
|
61501
61494
|
for (let r of t) {
|
|
61502
61495
|
let t = await h(r, "utf-8"), a = s(e, r);
|
|
61503
|
-
n.push(...
|
|
61504
|
-
let y =
|
|
61496
|
+
n.push(...gP(t, a));
|
|
61497
|
+
let y = UN(t);
|
|
61505
61498
|
if (!y) continue;
|
|
61506
|
-
let le =
|
|
61499
|
+
let le = VN[y];
|
|
61507
61500
|
switch (le) {
|
|
61508
|
-
case
|
|
61509
|
-
let t = await
|
|
61501
|
+
case BN.Application: {
|
|
61502
|
+
let t = await ZN({
|
|
61510
61503
|
appPath: e,
|
|
61511
61504
|
filePath: r
|
|
61512
61505
|
});
|
|
61513
61506
|
o = t.config, n.push(...t.errors), i.push(...t.warnings ?? []), D.push(a);
|
|
61514
61507
|
break;
|
|
61515
61508
|
}
|
|
61516
|
-
case
|
|
61517
|
-
let t = await
|
|
61509
|
+
case BN.Objects: {
|
|
61510
|
+
let t = await ZN({
|
|
61518
61511
|
appPath: e,
|
|
61519
61512
|
filePath: r
|
|
61520
|
-
}), { objectFields: o, fields: s } =
|
|
61513
|
+
}), { objectFields: o, fields: s } = lP(t.config), u = t.config.labelIdentifierFieldMetadataUniversalIdentifier ?? o.find((e) => e.name === "name")?.universalIdentifier;
|
|
61521
61514
|
if (!u) {
|
|
61522
61515
|
n.push(`No label identifier field found for object ${t.config.nameSingular}. Please add a field with name "name" to your object.`);
|
|
61523
61516
|
break;
|
|
61524
61517
|
}
|
|
61525
61518
|
let d = {
|
|
61526
61519
|
...t.config,
|
|
61527
|
-
fields: o.map(
|
|
61520
|
+
fields: o.map(tP),
|
|
61528
61521
|
labelIdentifierFieldMetadataUniversalIdentifier: u
|
|
61529
61522
|
};
|
|
61530
61523
|
c.push(d), l.push(...s), n.push(...t.errors), i.push(...t.warnings ?? []), ne.push(a);
|
|
61531
61524
|
break;
|
|
61532
61525
|
}
|
|
61533
|
-
case
|
|
61534
|
-
let t = await
|
|
61526
|
+
case BN.Fields: {
|
|
61527
|
+
let t = await ZN({
|
|
61535
61528
|
appPath: e,
|
|
61536
61529
|
filePath: r
|
|
61537
|
-
}), o =
|
|
61530
|
+
}), o = tP(t.config);
|
|
61538
61531
|
l.push(o), n.push(...t.errors), i.push(...t.warnings ?? []), re.push(a);
|
|
61539
61532
|
break;
|
|
61540
61533
|
}
|
|
61541
|
-
case
|
|
61542
|
-
let t = await
|
|
61534
|
+
case BN.PermissionFlags: {
|
|
61535
|
+
let t = await ZN({
|
|
61543
61536
|
appPath: e,
|
|
61544
61537
|
filePath: r
|
|
61545
61538
|
});
|
|
61546
61539
|
d.push(t.config), n.push(...t.errors), i.push(...t.warnings ?? []), ie.push(a);
|
|
61547
61540
|
break;
|
|
61548
61541
|
}
|
|
61549
|
-
case
|
|
61550
|
-
let t = await
|
|
61542
|
+
case BN.Roles: {
|
|
61543
|
+
let t = await ZN({
|
|
61551
61544
|
appPath: e,
|
|
61552
61545
|
filePath: r
|
|
61553
|
-
}), o =
|
|
61554
|
-
f.push(o), n.push(...t.errors), i.push(...t.warnings ?? []), k.push(a), y ===
|
|
61546
|
+
}), o = rP(t.config);
|
|
61547
|
+
f.push(o), n.push(...t.errors), i.push(...t.warnings ?? []), k.push(a), y === zN.DefineApplicationRole && te.push(t.config.universalIdentifier);
|
|
61555
61548
|
break;
|
|
61556
61549
|
}
|
|
61557
|
-
case
|
|
61558
|
-
let t = await
|
|
61550
|
+
case BN.Skills: {
|
|
61551
|
+
let t = await ZN({
|
|
61559
61552
|
appPath: e,
|
|
61560
61553
|
filePath: r
|
|
61561
61554
|
});
|
|
61562
61555
|
p.push(t.config), n.push(...t.errors), i.push(...t.warnings ?? []), A.push(a);
|
|
61563
61556
|
break;
|
|
61564
61557
|
}
|
|
61565
|
-
case
|
|
61566
|
-
let t = await
|
|
61558
|
+
case BN.Agents: {
|
|
61559
|
+
let t = await ZN({
|
|
61567
61560
|
appPath: e,
|
|
61568
61561
|
filePath: r
|
|
61569
61562
|
});
|
|
61570
61563
|
m.push(t.config), n.push(...t.errors), i.push(...t.warnings ?? []), ae.push(a);
|
|
61571
61564
|
break;
|
|
61572
61565
|
}
|
|
61573
|
-
case
|
|
61574
|
-
let t = await
|
|
61566
|
+
case BN.ConnectionProviders: {
|
|
61567
|
+
let t = await ZN({
|
|
61575
61568
|
appPath: e,
|
|
61576
61569
|
filePath: r
|
|
61577
61570
|
});
|
|
61578
61571
|
g.push(t.config), n.push(...t.errors), i.push(...t.warnings ?? []), oe.push(a);
|
|
61579
61572
|
break;
|
|
61580
61573
|
}
|
|
61581
|
-
case
|
|
61582
|
-
let o = await
|
|
61574
|
+
case BN.LogicFunctions: {
|
|
61575
|
+
let o = await ZN({
|
|
61583
61576
|
appPath: e,
|
|
61584
61577
|
filePath: r
|
|
61585
61578
|
});
|
|
61586
61579
|
n.push(...o.errors), i.push(...o.warnings ?? []);
|
|
61587
|
-
let { handler: c, ...l } = o.config, u = s(e, r), d = l.toolTriggerSettings && !l.toolTriggerSettings.inputSchema || l.workflowActionTriggerSettings && !l.workflowActionTriggerSettings.inputSchema ? await
|
|
61580
|
+
let { handler: c, ...l } = o.config, u = s(e, r), d = l.toolTriggerSettings && !l.toolTriggerSettings.inputSchema || l.workflowActionTriggerSettings && !l.workflowActionTriggerSettings.inputSchema ? await xP(t) : null, f = l.toolTriggerSettings ? {
|
|
61588
61581
|
...l.toolTriggerSettings,
|
|
61589
61582
|
inputSchema: l.toolTriggerSettings.inputSchema ?? d ?? void 0
|
|
61590
61583
|
} : void 0, p = l.workflowActionTriggerSettings ? {
|
|
61591
61584
|
...l.workflowActionTriggerSettings,
|
|
61592
|
-
inputSchema: l.workflowActionTriggerSettings.inputSchema ?? (d ?
|
|
61585
|
+
inputSchema: l.workflowActionTriggerSettings.inputSchema ?? (d ? bP(d) : void 0)
|
|
61593
61586
|
} : void 0, m = {
|
|
61594
61587
|
...l,
|
|
61595
61588
|
...f ? { toolTriggerSettings: f } : {},
|
|
@@ -61599,7 +61592,7 @@ var SP = async (e) => {
|
|
|
61599
61592
|
builtHandlerPath: u.replace(/\.tsx?$/, ".mjs"),
|
|
61600
61593
|
builtHandlerChecksum: "[default-checksum]"
|
|
61601
61594
|
};
|
|
61602
|
-
if (_.push(m), se.push(a), y ===
|
|
61595
|
+
if (_.push(m), se.push(a), y === zN.DefinePostInstallLogicFunction) {
|
|
61603
61596
|
let e = o.config;
|
|
61604
61597
|
E.push({
|
|
61605
61598
|
universalIdentifier: o.config.universalIdentifier,
|
|
@@ -61607,7 +61600,7 @@ var SP = async (e) => {
|
|
|
61607
61600
|
shouldRunSynchronously: e.shouldRunSynchronously ?? !1
|
|
61608
61601
|
});
|
|
61609
61602
|
}
|
|
61610
|
-
if (y ===
|
|
61603
|
+
if (y === zN.DefinePreInstallLogicFunction) {
|
|
61611
61604
|
let e = o.config;
|
|
61612
61605
|
ee.push({
|
|
61613
61606
|
universalIdentifier: o.config.universalIdentifier,
|
|
@@ -61616,8 +61609,8 @@ var SP = async (e) => {
|
|
|
61616
61609
|
}
|
|
61617
61610
|
break;
|
|
61618
61611
|
}
|
|
61619
|
-
case
|
|
61620
|
-
let t = await
|
|
61612
|
+
case BN.FrontComponents: {
|
|
61613
|
+
let t = await ZN({
|
|
61621
61614
|
appPath: e,
|
|
61622
61615
|
filePath: r
|
|
61623
61616
|
});
|
|
@@ -61633,67 +61626,67 @@ var SP = async (e) => {
|
|
|
61633
61626
|
v.push(u), ce.push(a);
|
|
61634
61627
|
break;
|
|
61635
61628
|
}
|
|
61636
|
-
case
|
|
61637
|
-
let t = await
|
|
61629
|
+
case BN.Views: {
|
|
61630
|
+
let t = await ZN({
|
|
61638
61631
|
appPath: e,
|
|
61639
61632
|
filePath: r
|
|
61640
61633
|
}), o = { ...t.config };
|
|
61641
61634
|
b.push(o), n.push(...t.errors), i.push(...t.warnings ?? []), j.push(a);
|
|
61642
61635
|
break;
|
|
61643
61636
|
}
|
|
61644
|
-
case
|
|
61645
|
-
let t = await
|
|
61637
|
+
case BN.ViewFields: {
|
|
61638
|
+
let t = await ZN({
|
|
61646
61639
|
appPath: e,
|
|
61647
61640
|
filePath: r
|
|
61648
61641
|
});
|
|
61649
61642
|
x.push(t.config), n.push(...t.errors), i.push(...t.warnings ?? []), ue.push(a);
|
|
61650
61643
|
break;
|
|
61651
61644
|
}
|
|
61652
|
-
case
|
|
61653
|
-
let t = await
|
|
61645
|
+
case BN.NavigationMenuItems: {
|
|
61646
|
+
let t = await ZN({
|
|
61654
61647
|
appPath: e,
|
|
61655
61648
|
filePath: r
|
|
61656
61649
|
});
|
|
61657
61650
|
S.push(t.config), n.push(...t.errors), i.push(...t.warnings ?? []), de.push(a);
|
|
61658
61651
|
break;
|
|
61659
61652
|
}
|
|
61660
|
-
case
|
|
61661
|
-
let t = await
|
|
61653
|
+
case BN.PageLayouts: {
|
|
61654
|
+
let t = await ZN({
|
|
61662
61655
|
appPath: e,
|
|
61663
61656
|
filePath: r
|
|
61664
61657
|
}), o = { ...t.config };
|
|
61665
61658
|
C.push(o), n.push(...t.errors), i.push(...t.warnings ?? []), fe.push(a);
|
|
61666
61659
|
break;
|
|
61667
61660
|
}
|
|
61668
|
-
case
|
|
61669
|
-
let t = await
|
|
61661
|
+
case BN.Indexes: {
|
|
61662
|
+
let t = await ZN({
|
|
61670
61663
|
appPath: e,
|
|
61671
61664
|
filePath: r
|
|
61672
61665
|
}), o = { ...t.config };
|
|
61673
61666
|
u.push(o), n.push(...t.errors), i.push(...t.warnings ?? []), O.push(a);
|
|
61674
61667
|
break;
|
|
61675
61668
|
}
|
|
61676
|
-
case
|
|
61677
|
-
let t = await
|
|
61669
|
+
case BN.PageLayoutTabs: {
|
|
61670
|
+
let t = await ZN({
|
|
61678
61671
|
appPath: e,
|
|
61679
61672
|
filePath: r
|
|
61680
61673
|
}), o = { ...t.config };
|
|
61681
61674
|
w.push(o), n.push(...t.errors), i.push(...t.warnings ?? []), pe.push(a);
|
|
61682
61675
|
break;
|
|
61683
61676
|
}
|
|
61684
|
-
case
|
|
61685
|
-
let t = await
|
|
61677
|
+
case BN.CommandMenuItems: {
|
|
61678
|
+
let t = await ZN({
|
|
61686
61679
|
appPath: e,
|
|
61687
61680
|
filePath: r
|
|
61688
61681
|
});
|
|
61689
61682
|
T.push(t.config), n.push(...t.errors), i.push(...t.warnings ?? []), me.push(a);
|
|
61690
61683
|
break;
|
|
61691
61684
|
}
|
|
61692
|
-
case
|
|
61685
|
+
case BN.PublicAssets: break;
|
|
61693
61686
|
default: zA(le);
|
|
61694
61687
|
}
|
|
61695
61688
|
}
|
|
61696
|
-
let he = await
|
|
61689
|
+
let he = await kP(e);
|
|
61697
61690
|
for (let t of he) {
|
|
61698
61691
|
let n = s(e, t);
|
|
61699
61692
|
y.push({
|
|
@@ -61705,7 +61698,7 @@ var SP = async (e) => {
|
|
|
61705
61698
|
}
|
|
61706
61699
|
o || n.push("Cannot build application, please export default defineApplication() to define an application"), E.length > 1 && n.push("Only one post install logic function is allowed per application"), ee.length > 1 && n.push("Only one pre install logic function is allowed per application"), te.length > 1 && n.push("Only one defineApplicationRole is allowed per application");
|
|
61707
61700
|
let ge = o?.defaultRoleUniversalIdentifier ?? (te.length === 1 ? te[0] : void 0);
|
|
61708
|
-
o && !ge && n.push("Application must declare a default role: either pass `defaultRoleUniversalIdentifier` to defineApplication() or mark a role file with defineApplicationRole()"), n.push(...
|
|
61701
|
+
o && !ge && n.push("Application must declare a default role: either pass `defaultRoleUniversalIdentifier` to defineApplication() or mark a role file with defineApplicationRole()"), n.push(..._P({
|
|
61709
61702
|
views: b,
|
|
61710
61703
|
objects: c,
|
|
61711
61704
|
fields: l
|
|
@@ -61762,32 +61755,32 @@ var SP = async (e) => {
|
|
|
61762
61755
|
errors: n,
|
|
61763
61756
|
warnings: i
|
|
61764
61757
|
};
|
|
61765
|
-
},
|
|
61758
|
+
}, jP = 4, MP = [U.RELATION, U.MORPH_RELATION], NP = [rm.MANY_TO_ONE, rm.ONE_TO_MANY], PP = (e) => {
|
|
61766
61759
|
let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
|
|
61767
61760
|
for (let r of e) t.has(r) ? n.add(r) : t.add(r);
|
|
61768
61761
|
return Array.from(n);
|
|
61769
|
-
},
|
|
61762
|
+
}, FP = (e) => {
|
|
61770
61763
|
let t = [];
|
|
61771
61764
|
if (!e) return [];
|
|
61772
|
-
for (let [n, r] of Object.entries(e)) n === "universalIdentifier" && typeof r == "string" && t.push(r), !(n === "postInstallLogicFunction" || n === "preInstallLogicFunction") && typeof r == "object" && t.push(...
|
|
61765
|
+
for (let [n, r] of Object.entries(e)) n === "universalIdentifier" && typeof r == "string" && t.push(r), !(n === "postInstallLogicFunction" || n === "preInstallLogicFunction") && typeof r == "object" && t.push(...FP(r));
|
|
61773
61766
|
return t;
|
|
61774
|
-
},
|
|
61767
|
+
}, IP = (e) => {
|
|
61775
61768
|
let t = [];
|
|
61776
61769
|
for (let n of e) {
|
|
61777
|
-
if (!
|
|
61770
|
+
if (!MP.includes(n.type)) continue;
|
|
61778
61771
|
let e = n.universalSettings;
|
|
61779
61772
|
if (!e?.relationType) {
|
|
61780
|
-
t.push(`Relation field "${n.name}" is missing relationType. ${n.type} fields must declare a relationType (${
|
|
61773
|
+
t.push(`Relation field "${n.name}" is missing relationType. ${n.type} fields must declare a relationType (${NP.join(" or ")}) in universalSettings.`);
|
|
61781
61774
|
continue;
|
|
61782
61775
|
}
|
|
61783
|
-
if (!
|
|
61784
|
-
t.push(`Relation field "${n.name}" has invalid relationType "${e.relationType}". Expected ${
|
|
61776
|
+
if (!NP.includes(e.relationType)) {
|
|
61777
|
+
t.push(`Relation field "${n.name}" has invalid relationType "${e.relationType}". Expected ${NP.join(" or ")}.`);
|
|
61785
61778
|
continue;
|
|
61786
61779
|
}
|
|
61787
61780
|
e.relationType === rm.MANY_TO_ONE && !e.joinColumnName && t.push(`MANY_TO_ONE relation field "${n.name}" is missing joinColumnName. MANY_TO_ONE relations must declare a joinColumnName in universalSettings.`);
|
|
61788
61781
|
}
|
|
61789
61782
|
return t;
|
|
61790
|
-
},
|
|
61783
|
+
}, LP = (e) => {
|
|
61791
61784
|
let t = [], n = /* @__PURE__ */ new Set();
|
|
61792
61785
|
for (let r of e) {
|
|
61793
61786
|
if (n.has(r)) continue;
|
|
@@ -61796,30 +61789,35 @@ var SP = async (e) => {
|
|
|
61796
61789
|
continue;
|
|
61797
61790
|
}
|
|
61798
61791
|
let e = S(r);
|
|
61799
|
-
e <
|
|
61792
|
+
e < jP && t.push(`Universal identifier "${r}" is UUID version ${e}. Only UUID version ${jP} or higher is allowed.`);
|
|
61800
61793
|
}
|
|
61801
61794
|
return t;
|
|
61802
|
-
},
|
|
61803
|
-
let t = [], n = [], r =
|
|
61795
|
+
}, RP = (e) => {
|
|
61796
|
+
let t = [], n = [], r = FP(e), i = PP(r);
|
|
61804
61797
|
i.length > 0 && t.push(`Duplicate universal identifiers: ${i.join(", ")}`);
|
|
61805
|
-
let a =
|
|
61798
|
+
let a = LP(r);
|
|
61806
61799
|
a.length > 0 && t.push(`Invalid universal identifiers: ${a.join(", ")}`);
|
|
61807
61800
|
let o = [...e.fields, ...e.objects.flatMap((e) => e.fields)];
|
|
61808
|
-
return t.push(...
|
|
61801
|
+
return t.push(...IP(o)), {
|
|
61809
61802
|
errors: t,
|
|
61810
61803
|
warnings: n,
|
|
61811
61804
|
isValid: t.length === 0
|
|
61812
61805
|
};
|
|
61806
|
+
}, zP = {
|
|
61807
|
+
"twenty-sdk": "\"twenty-sdk\" is listed under \"dependencies\" in package.json. It is a build-time only tool and should be moved to \"devDependencies\".",
|
|
61808
|
+
"twenty-client-sdk": "\"twenty-client-sdk\" is listed under \"dependencies\" in package.json. It is provided at runtime by Twenty's injected SDK and should be moved to \"devDependencies\"."
|
|
61813
61809
|
}, BP = async (e) => {
|
|
61814
61810
|
let t = n.join(e, "package.json");
|
|
61815
|
-
|
|
61811
|
+
if (!await hm(t)) return [];
|
|
61812
|
+
let r = await Sm(t);
|
|
61813
|
+
return Object.entries(zP).filter(([e]) => G(r.dependencies?.[e])).map(([, e]) => e);
|
|
61816
61814
|
}, VP = async (e) => {
|
|
61817
|
-
let t = await
|
|
61815
|
+
let t = await AP(e);
|
|
61818
61816
|
if (t.errors.length > 0 || !t.manifest) return {
|
|
61819
61817
|
success: !1,
|
|
61820
61818
|
errors: t.errors.length > 0 ? t.errors : ["Failed to build manifest."]
|
|
61821
61819
|
};
|
|
61822
|
-
let n =
|
|
61820
|
+
let n = RP(t.manifest);
|
|
61823
61821
|
if (!n.isValid) return {
|
|
61824
61822
|
success: !1,
|
|
61825
61823
|
errors: n.errors
|
|
@@ -61934,13 +61932,13 @@ var SP = async (e) => {
|
|
|
61934
61932
|
let { manifest: a, filePaths: o } = i;
|
|
61935
61933
|
for (let e of i.warnings) r?.(`⚠ ${e}`);
|
|
61936
61934
|
r?.("Building application files...");
|
|
61937
|
-
let s = await
|
|
61935
|
+
let s = await LN({
|
|
61938
61936
|
appPath: t,
|
|
61939
61937
|
manifest: a,
|
|
61940
61938
|
filePaths: o
|
|
61941
61939
|
});
|
|
61942
61940
|
r?.("Running typecheck...");
|
|
61943
|
-
let c = await
|
|
61941
|
+
let c = await kN(t);
|
|
61944
61942
|
if (c.length > 0) {
|
|
61945
61943
|
let e = c.map((e) => `${e.file}(${e.line},${e.column + 1}): ${e.text}`);
|
|
61946
61944
|
return {
|
|
@@ -62702,7 +62700,7 @@ var SP = async (e) => {
|
|
|
62702
62700
|
};
|
|
62703
62701
|
}, mF = (e) => WP(() => pF(e), $.PUBLISH_FAILED), hF = {
|
|
62704
62702
|
name: "twenty-sdk",
|
|
62705
|
-
version: "2.
|
|
62703
|
+
version: "2.14.0",
|
|
62706
62704
|
sideEffects: !1,
|
|
62707
62705
|
bin: { twenty: "dist/cli.cjs" },
|
|
62708
62706
|
files: [
|
|
@@ -62827,7 +62825,7 @@ var SP = async (e) => {
|
|
|
62827
62825
|
await _m(t);
|
|
62828
62826
|
let r = n.join(t, "manifest.json");
|
|
62829
62827
|
if (!await hm(r)) {
|
|
62830
|
-
let { manifest: t } = await
|
|
62828
|
+
let { manifest: t } = await AP(e);
|
|
62831
62829
|
return t;
|
|
62832
62830
|
}
|
|
62833
62831
|
return await Sm(r);
|
|
@@ -63213,9 +63211,9 @@ var SP = async (e) => {
|
|
|
63213
63211
|
for (let e of t) if (await aI(e)) return `http://localhost:${e}`;
|
|
63214
63212
|
return null;
|
|
63215
63213
|
}, sI = (e) => {
|
|
63216
|
-
if (
|
|
63214
|
+
if (Yj(e)) return e;
|
|
63217
63215
|
}, cI = (e) => sI(e)?.extensions?.subCode, lI = (e, t) => cI(e) === t, uI = (e) => {
|
|
63218
|
-
if (!
|
|
63216
|
+
if (!Yj(e)) return;
|
|
63219
63217
|
let { error: t } = e;
|
|
63220
63218
|
return typeof t == "string" ? t : void 0;
|
|
63221
63219
|
}, dI = (e) => uI(e) === "invalid_client", fI = async (e, t) => {
|
|
@@ -63398,13 +63396,13 @@ var SP = async (e) => {
|
|
|
63398
63396
|
};
|
|
63399
63397
|
for (let e of c.warnings) r?.(M.yellow(`⚠ ${e}`));
|
|
63400
63398
|
r?.("Building application files...");
|
|
63401
|
-
let l = await
|
|
63399
|
+
let l = await LN({
|
|
63402
63400
|
appPath: t,
|
|
63403
63401
|
manifest: c.manifest,
|
|
63404
63402
|
filePaths: c.filePaths
|
|
63405
63403
|
});
|
|
63406
63404
|
r?.("Running typecheck...");
|
|
63407
|
-
let u = await
|
|
63405
|
+
let u = await kN(t);
|
|
63408
63406
|
if (u.length > 0) {
|
|
63409
63407
|
let e = u.map((e) => `${e.file}(${e.line},${e.column + 1}): ${e.text}`);
|
|
63410
63408
|
return {
|
|
@@ -64001,4 +63999,4 @@ var SP = async (e) => {
|
|
|
64001
63999
|
}
|
|
64002
64000
|
}, qI = (e) => WP(() => KI(e), GP.AUTH_FAILED);
|
|
64003
64001
|
//#endregion
|
|
64004
|
-
export {
|
|
64002
|
+
export { $j as $, yF as A, YP as B, EF as C, kF as D, TF as E, fF as F, WP as G, GP as H, uF as I, VP as J, UP as K, rF as L, gF as M, hF as N, DF as O, mF as P, kN as Q, eF as R, jF as S, AF as T, qP as U, $ as V, KP as W, PN as X, FN as Y, DN as Z, JF as _, EI as a, hm as at, CF as b, bI as c, Yp as ct, aI as d, rm as dt, zA as et, oI as f, um as ft, XF as g, N as gt, QF as h, P as ht, NI as i, _m as it, _F as j, wF as k, gI as l, U as lt, nI as m, Le as mt, LI as n, bm as nt, SI as o, Sm as ot, rI as p, Fe as pt, HP as q, FI as r, ym as rt, xI as s, xm as st, qI as t, G as tt, hI as u, nm as ut, bF as v, OF as w, xF as x, SF as y, ZP as z };
|