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
package/dist/define/index.mjs
CHANGED
|
@@ -28355,7 +28355,7 @@ function vk() {
|
|
|
28355
28355
|
return JO(mk, arguments);
|
|
28356
28356
|
}
|
|
28357
28357
|
//#endregion
|
|
28358
|
-
//#region ../twenty-shared/dist/utils-
|
|
28358
|
+
//#region ../twenty-shared/dist/utils-BABg2N6J.mjs
|
|
28359
28359
|
var yk = /* @__PURE__ */ v(JD(), 1);
|
|
28360
28360
|
YD(), XD(), HO(), V.TEXT, V.FULL_NAME, V.EMAILS, V.ADDRESS, V.LINKS, V.PHONES, V.RICH_TEXT, V.UUID;
|
|
28361
28361
|
var bk = (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);
|
|
@@ -28759,21 +28759,12 @@ var qk = [H.IS_EMPTY, H.IS_NOT_EMPTY], Jk = [H.IS, H.IS_NOT];
|
|
|
28759
28759
|
H.IS_NOT,
|
|
28760
28760
|
...qk
|
|
28761
28761
|
], H.IS, H.IS_NOT, H.IS_EMPTY, H.IS_NOT_EMPTY;
|
|
28762
|
-
var Yk = (e, t, n) => Object.values(gp[e]).includes(t) && t === n;
|
|
28763
|
-
|
|
28764
|
-
|
|
28765
|
-
return Xk = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
28766
|
-
return typeof e;
|
|
28767
|
-
} : function(e) {
|
|
28768
|
-
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
28769
|
-
}, Xk(e);
|
|
28770
|
-
}
|
|
28771
|
-
var Zk = 365.2425, Qk = 3600 * 24;
|
|
28772
|
-
Qk * 7, Qk * Zk / 12 * 3;
|
|
28773
|
-
var $k = Ol().transform((e) => e === "" ? [] : kA(e) ? [e] : JSON.parse(e)).refine((e) => Array.isArray(e) && e.every((e) => typeof e == "string"), { error: "Expected an array of strings" }), eA = gf((e) => {
|
|
28762
|
+
var Yk = (e, t, n) => Object.values(gp[e]).includes(t) && t === n, Xk = 365.2425, Zk = 3600 * 24;
|
|
28763
|
+
Zk * 7, Zk * Xk / 12 * 3;
|
|
28764
|
+
var Qk = Ol().transform((e) => e === "" ? [] : OA(e) ? [e] : JSON.parse(e)).refine((e) => Array.isArray(e) && e.every((e) => typeof e == "string"), { error: "Expected an array of strings" }), $k = gf((e) => {
|
|
28774
28765
|
try {
|
|
28775
28766
|
if (typeof e == "string") {
|
|
28776
|
-
if (
|
|
28767
|
+
if (OA(e)) return [e];
|
|
28777
28768
|
try {
|
|
28778
28769
|
let t = JSON.parse(e);
|
|
28779
28770
|
return Array.isArray(t) ? t : [t];
|
|
@@ -28785,11 +28776,11 @@ var $k = Ol().transform((e) => e === "" ? [] : kA(e) ? [e] : JSON.parse(e)).refi
|
|
|
28785
28776
|
} catch {
|
|
28786
28777
|
return [];
|
|
28787
28778
|
}
|
|
28788
|
-
}, ed(Ol().refine((e) => bk(e) ||
|
|
28779
|
+
}, ed(Ol().refine((e) => bk(e) || OA(e), "Must be a valid UUID or a variable with {{ }} syntax"))).catch([]), eA = rd({
|
|
28789
28780
|
isCurrentWorkspaceMemberSelected: ju().optional(),
|
|
28790
28781
|
isCurrentRecordSelected: ju().optional(),
|
|
28791
28782
|
selectedRecordIds: ed(Ol())
|
|
28792
|
-
}),
|
|
28783
|
+
}), tA = Ol().transform((e, t) => {
|
|
28793
28784
|
try {
|
|
28794
28785
|
return JSON.parse(e);
|
|
28795
28786
|
} catch (e) {
|
|
@@ -28798,13 +28789,13 @@ var $k = Ol().transform((e) => e === "" ? [] : kA(e) ? [e] : JSON.parse(e)).refi
|
|
|
28798
28789
|
message: e.message
|
|
28799
28790
|
}), S;
|
|
28800
28791
|
}
|
|
28801
|
-
}).pipe(
|
|
28792
|
+
}).pipe(eA), nA = ({ recordFilter: e, fieldMetadataItemById: t, filterValueDependencies: n }) => {
|
|
28802
28793
|
let r = t.get(e.fieldMetadataId);
|
|
28803
28794
|
if (U(r) && Bk(e)) {
|
|
28804
28795
|
if (r.type === V.RELATION && U(e.relationTargetFieldMetadataId)) {
|
|
28805
28796
|
let i = t.get(e.relationTargetFieldMetadataId);
|
|
28806
28797
|
if (!U(i)) return;
|
|
28807
|
-
let a =
|
|
28798
|
+
let a = rA({
|
|
28808
28799
|
recordFilter: {
|
|
28809
28800
|
...e,
|
|
28810
28801
|
fieldMetadataId: i.id,
|
|
@@ -28815,13 +28806,13 @@ var $k = Ol().transform((e) => e === "" ? [] : kA(e) ? [e] : JSON.parse(e)).refi
|
|
|
28815
28806
|
});
|
|
28816
28807
|
return U(a) ? { [r.name]: a } : void 0;
|
|
28817
28808
|
}
|
|
28818
|
-
return
|
|
28809
|
+
return rA({
|
|
28819
28810
|
recordFilter: e,
|
|
28820
28811
|
fieldMetadataItem: r,
|
|
28821
28812
|
filterValueDependencies: n
|
|
28822
28813
|
});
|
|
28823
28814
|
}
|
|
28824
|
-
},
|
|
28815
|
+
}, rA = ({ recordFilter: e, fieldMetadataItem: t, filterValueDependencies: n }) => {
|
|
28825
28816
|
if (Pk({
|
|
28826
28817
|
recordFilterOperand: e.operand,
|
|
28827
28818
|
correspondingFieldMetadataItem: t
|
|
@@ -28853,7 +28844,7 @@ var $k = Ol().transform((e) => e === "" ? [] : kA(e) ? [e] : JSON.parse(e)).refi
|
|
|
28853
28844
|
}
|
|
28854
28845
|
case "DATE":
|
|
28855
28846
|
if (e.operand === H.IS_RELATIVE) {
|
|
28856
|
-
let n =
|
|
28847
|
+
let n = vA(e.value), r = yA({
|
|
28857
28848
|
value: "PAST_1_DAY",
|
|
28858
28849
|
operand: H.IS_RELATIVE
|
|
28859
28850
|
});
|
|
@@ -28879,9 +28870,9 @@ var $k = Ol().transform((e) => e === "" ? [] : kA(e) ? [e] : JSON.parse(e)).refi
|
|
|
28879
28870
|
throw Error(`Unknown operand ${e.operand} for ${o} filter`);
|
|
28880
28871
|
case "DATE_TIME":
|
|
28881
28872
|
if (e.operand === H.IS_RELATIVE) {
|
|
28882
|
-
let r =
|
|
28873
|
+
let r = SA(e), i = U(r) && typeof r == "object" ? r : null;
|
|
28883
28874
|
if (!U(i)) throw Error(`Cannot parse relative date filter : "${e.value}"`);
|
|
28884
|
-
let a =
|
|
28875
|
+
let a = SA({
|
|
28885
28876
|
value: `PAST_1_DAY;;${n.timeZone}`,
|
|
28886
28877
|
operand: H.IS_RELATIVE
|
|
28887
28878
|
});
|
|
@@ -28894,7 +28885,7 @@ var $k = Ol().transform((e) => e === "" ? [] : kA(e) ? [e] : JSON.parse(e)).refi
|
|
|
28894
28885
|
switch (e.operand) {
|
|
28895
28886
|
case H.IS_IN_PAST: return { [t.name]: { lt: r.toInstant().round("minute").toString() } };
|
|
28896
28887
|
case H.IS_IN_FUTURE: return { [t.name]: { gt: r.toInstant().round("minute").toString() } };
|
|
28897
|
-
case H.IS_TODAY: return { and: [{ [t.name]: { gte:
|
|
28888
|
+
case H.IS_TODAY: return { and: [{ [t.name]: { gte: cA(r, "DAY").toInstant().toString() } }, { [t.name]: { lt: lA(r, "DAY").toInstant().toString() } }] };
|
|
28898
28889
|
}
|
|
28899
28890
|
} else {
|
|
28900
28891
|
if (!r(e.value)) throw Error("Date filter is empty");
|
|
@@ -28930,10 +28921,10 @@ var $k = Ol().transform((e) => e === "" ? [] : kA(e) ? [e] : JSON.parse(e)).refi
|
|
|
28930
28921
|
default: throw Error(`Unknown operand ${e.operand} for ${o} filter`);
|
|
28931
28922
|
}
|
|
28932
28923
|
case "RELATION": {
|
|
28933
|
-
let { isCurrentWorkspaceMemberSelected: r, isCurrentRecordSelected: i, selectedRecordIds: a } =
|
|
28924
|
+
let { isCurrentWorkspaceMemberSelected: r, isCurrentRecordSelected: i, selectedRecordIds: a } = tA.catch({
|
|
28934
28925
|
isCurrentWorkspaceMemberSelected: !1,
|
|
28935
28926
|
isCurrentRecordSelected: !1,
|
|
28936
|
-
selectedRecordIds:
|
|
28927
|
+
selectedRecordIds: $k.parse(e.value)
|
|
28937
28928
|
}).parse(e.value), s = [
|
|
28938
28929
|
...a,
|
|
28939
28930
|
...r ? [n?.currentWorkspaceMemberId] : [],
|
|
@@ -28947,7 +28938,7 @@ var $k = Ol().transform((e) => e === "" ? [] : kA(e) ? [e] : JSON.parse(e)).refi
|
|
|
28947
28938
|
}
|
|
28948
28939
|
}
|
|
28949
28940
|
case "CURRENCY": if (Yk(V.CURRENCY, "currencyCode", i)) {
|
|
28950
|
-
let n =
|
|
28941
|
+
let n = Qk.parse(e.value);
|
|
28951
28942
|
if (n.length === 0) return;
|
|
28952
28943
|
let r = { [t.name]: { currencyCode: { in: n } } };
|
|
28953
28944
|
switch (e.operand) {
|
|
@@ -28979,7 +28970,7 @@ var $k = Ol().transform((e) => e === "" ? [] : kA(e) ? [e] : JSON.parse(e)).refi
|
|
|
28979
28970
|
case "ADDRESS": switch (e.operand) {
|
|
28980
28971
|
case H.CONTAINS: if (a) {
|
|
28981
28972
|
if (i === "addressCountry") {
|
|
28982
|
-
let n =
|
|
28973
|
+
let n = Qk.parse(e.value);
|
|
28983
28974
|
return n.length === 0 ? {} : { [t.name]: { [i]: { in: n } } };
|
|
28984
28975
|
}
|
|
28985
28976
|
return { [t.name]: { [i]: { ilike: `%${e.value}%` } } };
|
|
@@ -29008,7 +28999,7 @@ var $k = Ol().transform((e) => e === "" ? [] : kA(e) ? [e] : JSON.parse(e)).refi
|
|
|
29008
28999
|
default: throw Error(`Unknown operand ${e.operand} for ${o} filter`);
|
|
29009
29000
|
}
|
|
29010
29001
|
case "MULTI_SELECT": {
|
|
29011
|
-
let n =
|
|
29002
|
+
let n = Qk.parse(e.value);
|
|
29012
29003
|
if (n.length === 0) return;
|
|
29013
29004
|
let r = n.filter((e) => e === ""), i = n.filter((e) => e !== "");
|
|
29014
29005
|
switch (e.operand) {
|
|
@@ -29025,7 +29016,7 @@ var $k = Ol().transform((e) => e === "" ? [] : kA(e) ? [e] : JSON.parse(e)).refi
|
|
|
29025
29016
|
}
|
|
29026
29017
|
}
|
|
29027
29018
|
case "SELECT": {
|
|
29028
|
-
let n =
|
|
29019
|
+
let n = Qk.parse(e.value);
|
|
29029
29020
|
if (n.length === 0) return;
|
|
29030
29021
|
let r = n.filter((e) => e === ""), i = n.filter((e) => e !== "");
|
|
29031
29022
|
switch (e.operand) {
|
|
@@ -29060,9 +29051,9 @@ var $k = Ol().transform((e) => e === "" ? [] : kA(e) ? [e] : JSON.parse(e)).refi
|
|
|
29060
29051
|
default: throw Error(`Unknown operand ${e.operand} for ${t.label} filter`);
|
|
29061
29052
|
}
|
|
29062
29053
|
if (i === "workspaceMemberId") {
|
|
29063
|
-
let { isCurrentWorkspaceMemberSelected: r, selectedRecordIds: i } =
|
|
29054
|
+
let { isCurrentWorkspaceMemberSelected: r, selectedRecordIds: i } = tA.catch({
|
|
29064
29055
|
isCurrentWorkspaceMemberSelected: !1,
|
|
29065
|
-
selectedRecordIds:
|
|
29056
|
+
selectedRecordIds: $k.parse(e.value)
|
|
29066
29057
|
}).parse(e.value), a = r ? [...i, n?.currentWorkspaceMemberId].filter(U) : i;
|
|
29067
29058
|
if (!U(a) || a.length === 0) return;
|
|
29068
29059
|
switch (e.operand) {
|
|
@@ -29123,7 +29114,7 @@ var $k = Ol().transform((e) => e === "" ? [] : kA(e) ? [e] : JSON.parse(e)).refi
|
|
|
29123
29114
|
}
|
|
29124
29115
|
case "BOOLEAN": return { [t.name]: { eq: e.value === "true" } };
|
|
29125
29116
|
case "UUID": {
|
|
29126
|
-
let n =
|
|
29117
|
+
let n = $k.parse(e.value), r = U(n) && n.length > 0 ? n : ["00000000-0000-4000-8000-000000000000"];
|
|
29127
29118
|
switch (e.operand) {
|
|
29128
29119
|
case H.IS: return { [t.name]: { in: r } };
|
|
29129
29120
|
case H.IS_NOT: return { not: { [t.name]: { in: r } } };
|
|
@@ -29132,14 +29123,14 @@ var $k = Ol().transform((e) => e === "" ? [] : kA(e) ? [e] : JSON.parse(e)).refi
|
|
|
29132
29123
|
}
|
|
29133
29124
|
default: throw Error("Unknown filter type");
|
|
29134
29125
|
}
|
|
29135
|
-
},
|
|
29126
|
+
}, iA = ({ filterValueDependencies: e, filters: t, fieldMetadataItemById: n, recordFilterGroups: r, currentRecordFilterGroupId: i }) => {
|
|
29136
29127
|
let a = r.find((e) => e.id === i);
|
|
29137
29128
|
if (!U(a)) return;
|
|
29138
|
-
let o = t.filter((e) => e.recordFilterGroupId === i).map((t) =>
|
|
29129
|
+
let o = t.filter((e) => e.recordFilterGroupId === i).map((t) => nA({
|
|
29139
29130
|
filterValueDependencies: e,
|
|
29140
29131
|
recordFilter: t,
|
|
29141
29132
|
fieldMetadataItemById: n
|
|
29142
|
-
})).filter(U), s = r.filter((e) => e.parentRecordFilterGroupId === i).map((i) =>
|
|
29133
|
+
})).filter(U), s = r.filter((e) => e.parentRecordFilterGroupId === i).map((i) => iA({
|
|
29143
29134
|
filterValueDependencies: e,
|
|
29144
29135
|
filters: t,
|
|
29145
29136
|
fieldMetadataItemById: n,
|
|
@@ -29149,7 +29140,7 @@ var $k = Ol().transform((e) => e === "" ? [] : kA(e) ? [e] : JSON.parse(e)).refi
|
|
|
29149
29140
|
if (a.logicalOperator === ap.AND) return { and: [...o, ...s] };
|
|
29150
29141
|
if (a.logicalOperator === ap.OR) return { or: [...o, ...s] };
|
|
29151
29142
|
throw Error(`Unknown logical operator ${a.logicalOperator}`);
|
|
29152
|
-
},
|
|
29143
|
+
}, aA = (e, t, n) => {
|
|
29153
29144
|
switch (t) {
|
|
29154
29145
|
case "DAY": return e.add({ days: n });
|
|
29155
29146
|
case "WEEK": return e.add({ weeks: n });
|
|
@@ -29161,22 +29152,22 @@ var $k = Ol().transform((e) => e === "" ? [] : kA(e) ? [e] : JSON.parse(e)).refi
|
|
|
29161
29152
|
case "HOUR": return e.add({ hours: n });
|
|
29162
29153
|
default: return Sk(t);
|
|
29163
29154
|
}
|
|
29164
|
-
},
|
|
29155
|
+
}, oA = Of.enum([
|
|
29165
29156
|
ep.MONDAY,
|
|
29166
29157
|
ep.SATURDAY,
|
|
29167
29158
|
ep.SUNDAY
|
|
29168
|
-
]),
|
|
29159
|
+
]), sA = (e) => {
|
|
29169
29160
|
switch (e) {
|
|
29170
29161
|
case ep.MONDAY: return 1;
|
|
29171
29162
|
case ep.SATURDAY: return 6;
|
|
29172
29163
|
case ep.SUNDAY: return 7;
|
|
29173
29164
|
default: return Sk(e);
|
|
29174
29165
|
}
|
|
29175
|
-
},
|
|
29166
|
+
}, cA = (e, t, n) => {
|
|
29176
29167
|
switch (t) {
|
|
29177
29168
|
case "DAY": return e.startOfDay();
|
|
29178
29169
|
case "WEEK": {
|
|
29179
|
-
let t = U(n) ?
|
|
29170
|
+
let t = U(n) ? sA(n) : 1, r = (e.dayOfWeek - t + 7) % 7;
|
|
29180
29171
|
return e.startOfDay().subtract({ days: r });
|
|
29181
29172
|
}
|
|
29182
29173
|
case "QUARTER": {
|
|
@@ -29211,23 +29202,23 @@ var $k = Ol().transform((e) => e === "" ? [] : kA(e) ? [e] : JSON.parse(e)).refi
|
|
|
29211
29202
|
});
|
|
29212
29203
|
default: return Sk(t);
|
|
29213
29204
|
}
|
|
29214
|
-
},
|
|
29205
|
+
}, lA = (e, t, n) => {
|
|
29215
29206
|
switch (t) {
|
|
29216
|
-
case "DAY": return
|
|
29217
|
-
case "WEEK": return
|
|
29218
|
-
case "MONTH": return
|
|
29219
|
-
case "QUARTER": return
|
|
29220
|
-
case "YEAR": return
|
|
29221
|
-
case "SECOND": return
|
|
29222
|
-
case "MINUTE": return
|
|
29223
|
-
case "HOUR": return
|
|
29207
|
+
case "DAY": return cA(e, "DAY").add({ days: 1 });
|
|
29208
|
+
case "WEEK": return cA(e, "WEEK", n).add({ weeks: 1 });
|
|
29209
|
+
case "MONTH": return cA(e, "MONTH", n).add({ months: 1 });
|
|
29210
|
+
case "QUARTER": return cA(e, "QUARTER", n).add({ months: 3 });
|
|
29211
|
+
case "YEAR": return cA(e, "YEAR", n).add({ years: 1 });
|
|
29212
|
+
case "SECOND": return cA(e, "SECOND").add({ seconds: 1 });
|
|
29213
|
+
case "MINUTE": return cA(e, "MINUTE").add({ minutes: 1 });
|
|
29214
|
+
case "HOUR": return cA(e, "HOUR").add({ hours: 1 });
|
|
29224
29215
|
default: return Sk(t);
|
|
29225
29216
|
}
|
|
29226
|
-
},
|
|
29217
|
+
}, uA = Of.union([Of.coerce.number().int().positive(), Of.literal("undefined")]).transform((e) => e === "undefined" ? void 0 : e), dA = Of.enum([
|
|
29227
29218
|
"NEXT",
|
|
29228
29219
|
"THIS",
|
|
29229
29220
|
"PAST"
|
|
29230
|
-
]),
|
|
29221
|
+
]), fA = Of.enum([
|
|
29231
29222
|
"SECOND",
|
|
29232
29223
|
"MINUTE",
|
|
29233
29224
|
"HOUR",
|
|
@@ -29236,24 +29227,24 @@ var $k = Ol().transform((e) => e === "" ? [] : kA(e) ? [e] : JSON.parse(e)).refi
|
|
|
29236
29227
|
"MONTH",
|
|
29237
29228
|
"QUARTER",
|
|
29238
29229
|
"YEAR"
|
|
29239
|
-
]),
|
|
29240
|
-
direction:
|
|
29241
|
-
amount:
|
|
29242
|
-
unit:
|
|
29230
|
+
]), pA = Of.object({
|
|
29231
|
+
direction: dA,
|
|
29232
|
+
amount: uA.nullish(),
|
|
29233
|
+
unit: fA,
|
|
29243
29234
|
timezone: Of.string().nullish(),
|
|
29244
|
-
firstDayOfTheWeek:
|
|
29245
|
-
}).refine((e) => !(e.amount === void 0 && e.direction !== "THIS"), { error: "Amount cannot be 'undefined' unless direction is 'THIS'" }),
|
|
29246
|
-
let r = new RegExp(
|
|
29235
|
+
firstDayOfTheWeek: oA.nullish()
|
|
29236
|
+
}).refine((e) => !(e.amount === void 0 && e.direction !== "THIS"), { error: "Amount cannot be 'undefined' unless direction is 'THIS'" }), mA = /((?:THIS)|(?:PAST)|(?:NEXT))_(\d*)_(DAY|MONTH|YEAR|WEEK|QUARTER|HOUR|MINUTE|SECOND)(?:(?:;;([^;;]*);;)?(?:(MONDAY|SUNDAY|SATURDAY);;)?)?/, hA = Of.string().transform((e, t) => {
|
|
29237
|
+
let r = new RegExp(mA).exec(e);
|
|
29247
29238
|
if (!n(r)) return t.addIssue(`Cannot parse stringified inline relative date filter, value : "${e}"`), Of.NEVER;
|
|
29248
29239
|
let [i, a, o, s, c, l] = r;
|
|
29249
|
-
return
|
|
29240
|
+
return pA.parse({
|
|
29250
29241
|
direction: a,
|
|
29251
29242
|
amount: o,
|
|
29252
29243
|
unit: s,
|
|
29253
29244
|
timezone: c,
|
|
29254
29245
|
firstDayOfTheWeek: l
|
|
29255
29246
|
});
|
|
29256
|
-
}),
|
|
29247
|
+
}), gA = (e, t, n) => {
|
|
29257
29248
|
switch (t) {
|
|
29258
29249
|
case "DAY": return e.subtract({ days: n });
|
|
29259
29250
|
case "WEEK": return e.subtract({ weeks: n });
|
|
@@ -29265,20 +29256,20 @@ var $k = Ol().transform((e) => e === "" ? [] : kA(e) ? [e] : JSON.parse(e)).refi
|
|
|
29265
29256
|
case "HOUR": return e.subtract({ hours: n });
|
|
29266
29257
|
default: return Sk(t);
|
|
29267
29258
|
}
|
|
29268
|
-
},
|
|
29259
|
+
}, _A = (e, t) => {
|
|
29269
29260
|
let { direction: n, amount: r, unit: i, firstDayOfTheWeek: a } = e;
|
|
29270
29261
|
switch (n) {
|
|
29271
29262
|
case "NEXT": {
|
|
29272
29263
|
if (!zf(r)) throw Error("Amount is required");
|
|
29273
29264
|
if (i === "QUARTER") {
|
|
29274
|
-
let n =
|
|
29265
|
+
let n = aA(cA(t, "QUARTER", a), "QUARTER", 1), i = aA(n, "QUARTER", r), o = n.toPlainDate().toString(), s = i.toPlainDate().toString();
|
|
29275
29266
|
return {
|
|
29276
29267
|
...e,
|
|
29277
29268
|
start: o,
|
|
29278
29269
|
end: s
|
|
29279
29270
|
};
|
|
29280
29271
|
}
|
|
29281
|
-
let n = t.startOfDay().add({ days: 1 }), o =
|
|
29272
|
+
let n = t.startOfDay().add({ days: 1 }), o = aA(n, i, r), s = n.toPlainDate().toString(), c = o?.toPlainDate().toString();
|
|
29282
29273
|
return {
|
|
29283
29274
|
...e,
|
|
29284
29275
|
start: s,
|
|
@@ -29288,14 +29279,14 @@ var $k = Ol().transform((e) => e === "" ? [] : kA(e) ? [e] : JSON.parse(e)).refi
|
|
|
29288
29279
|
case "PAST": {
|
|
29289
29280
|
if (!zf(r)) throw Error("Amount is required");
|
|
29290
29281
|
if (i === "QUARTER") {
|
|
29291
|
-
let n =
|
|
29282
|
+
let n = cA(t, "QUARTER", a), i = gA(n, "QUARTER", r).toPlainDate().toString(), o = n.toPlainDate().toString();
|
|
29292
29283
|
return {
|
|
29293
29284
|
...e,
|
|
29294
29285
|
start: i,
|
|
29295
29286
|
end: o
|
|
29296
29287
|
};
|
|
29297
29288
|
}
|
|
29298
|
-
let n = t.startOfDay(), o =
|
|
29289
|
+
let n = t.startOfDay(), o = gA(n, i, r)?.toPlainDate().toString(), s = n.toPlainDate().toString();
|
|
29299
29290
|
return {
|
|
29300
29291
|
...e,
|
|
29301
29292
|
start: o,
|
|
@@ -29303,7 +29294,7 @@ var $k = Ol().transform((e) => e === "" ? [] : kA(e) ? [e] : JSON.parse(e)).refi
|
|
|
29303
29294
|
};
|
|
29304
29295
|
}
|
|
29305
29296
|
case "THIS": {
|
|
29306
|
-
let n =
|
|
29297
|
+
let n = cA(t, i, a), r = lA(t, i, a), o = n?.toPlainDate().toString(), s = r?.toPlainDate().toString();
|
|
29307
29298
|
return {
|
|
29308
29299
|
...e,
|
|
29309
29300
|
start: o,
|
|
@@ -29311,13 +29302,13 @@ var $k = Ol().transform((e) => e === "" ? [] : kA(e) ? [e] : JSON.parse(e)).refi
|
|
|
29311
29302
|
};
|
|
29312
29303
|
}
|
|
29313
29304
|
}
|
|
29314
|
-
},
|
|
29305
|
+
}, vA = (e) => {
|
|
29315
29306
|
if (!r(e)) return null;
|
|
29316
|
-
let t =
|
|
29307
|
+
let t = hA.safeParse(e);
|
|
29317
29308
|
if (!t.success) return null;
|
|
29318
29309
|
let n = t.data;
|
|
29319
|
-
return
|
|
29320
|
-
},
|
|
29310
|
+
return _A(n, zf(n.timezone) ? aD.Now.zonedDateTimeISO(n.timezone) : aD.Now.zonedDateTimeISO());
|
|
29311
|
+
}, yA = (e) => e.value ? e.operand === H.IS_RELATIVE ? vA(e.value) : e.value : null, bA = (e, t) => {
|
|
29321
29312
|
let { direction: n, amount: r, unit: i, firstDayOfTheWeek: a } = e, o = [
|
|
29322
29313
|
"SECOND",
|
|
29323
29314
|
"MINUTE",
|
|
@@ -29327,72 +29318,72 @@ var $k = Ol().transform((e) => e === "" ? [] : kA(e) ? [e] : JSON.parse(e)).refi
|
|
|
29327
29318
|
case "NEXT":
|
|
29328
29319
|
if (!U(r)) throw Error("Amount is required");
|
|
29329
29320
|
if (i === "QUARTER") {
|
|
29330
|
-
let n =
|
|
29321
|
+
let n = lA(t, "QUARTER");
|
|
29331
29322
|
return {
|
|
29332
29323
|
...e,
|
|
29333
29324
|
start: n,
|
|
29334
|
-
end:
|
|
29325
|
+
end: aA(n, i, r)
|
|
29335
29326
|
};
|
|
29336
29327
|
}
|
|
29337
29328
|
if (o) return {
|
|
29338
29329
|
...e,
|
|
29339
29330
|
start: t,
|
|
29340
|
-
end:
|
|
29331
|
+
end: aA(t, i, r)
|
|
29341
29332
|
};
|
|
29342
29333
|
{
|
|
29343
29334
|
let n = t.startOfDay().add({ days: 1 });
|
|
29344
29335
|
return {
|
|
29345
29336
|
...e,
|
|
29346
29337
|
start: n,
|
|
29347
|
-
end:
|
|
29338
|
+
end: aA(n, i, r)
|
|
29348
29339
|
};
|
|
29349
29340
|
}
|
|
29350
29341
|
case "PAST":
|
|
29351
29342
|
if (!U(r)) throw Error("Amount is required");
|
|
29352
29343
|
if (i === "QUARTER") {
|
|
29353
|
-
let n =
|
|
29344
|
+
let n = cA(t, "QUARTER");
|
|
29354
29345
|
return {
|
|
29355
29346
|
...e,
|
|
29356
|
-
start:
|
|
29347
|
+
start: gA(n, i, r),
|
|
29357
29348
|
end: n
|
|
29358
29349
|
};
|
|
29359
29350
|
}
|
|
29360
29351
|
if (o) return {
|
|
29361
29352
|
...e,
|
|
29362
|
-
start:
|
|
29353
|
+
start: gA(t, i, r),
|
|
29363
29354
|
end: t
|
|
29364
29355
|
};
|
|
29365
29356
|
{
|
|
29366
29357
|
let n = t.startOfDay();
|
|
29367
29358
|
return {
|
|
29368
29359
|
...e,
|
|
29369
|
-
start:
|
|
29360
|
+
start: gA(n, i, r),
|
|
29370
29361
|
end: n
|
|
29371
29362
|
};
|
|
29372
29363
|
}
|
|
29373
29364
|
case "THIS": return {
|
|
29374
29365
|
...e,
|
|
29375
|
-
start:
|
|
29376
|
-
end:
|
|
29366
|
+
start: cA(t, i, a),
|
|
29367
|
+
end: lA(t, i, a)
|
|
29377
29368
|
};
|
|
29378
29369
|
}
|
|
29379
|
-
},
|
|
29370
|
+
}, xA = (e) => {
|
|
29380
29371
|
if (!r(e)) return null;
|
|
29381
|
-
let t =
|
|
29372
|
+
let t = hA.safeParse(e);
|
|
29382
29373
|
if (t.success) {
|
|
29383
29374
|
let e = t.data;
|
|
29384
|
-
return
|
|
29375
|
+
return bA(e, (zf(e.timezone) ? aD.Now.zonedDateTimeISO(e.timezone) : aD.Now.zonedDateTimeISO()).round({ smallestUnit: "second" }));
|
|
29385
29376
|
} else return null;
|
|
29386
|
-
},
|
|
29377
|
+
}, SA = (e) => e.value ? e.operand === H.IS_RELATIVE ? xA(e.value) : e.value : null;
|
|
29387
29378
|
up.Is, H.IS, up.IsNotNull, H.IS_NOT_NULL, up.IsNot, H.IS_NOT, up.LessThanOrEqual, H.LESS_THAN_OR_EQUAL, up.GreaterThanOrEqual, H.GREATER_THAN_OR_EQUAL, up.IsBefore, H.IS_BEFORE, up.IsAfter, H.IS_AFTER, up.Contains, H.CONTAINS, up.DoesNotContain, H.DOES_NOT_CONTAIN, up.IsEmpty, H.IS_EMPTY, up.IsNotEmpty, H.IS_NOT_EMPTY, up.IsRelative, H.IS_RELATIVE, up.IsInPast, H.IS_IN_PAST, up.IsInFuture, H.IS_IN_FUTURE, up.IsToday, H.IS_TODAY, H.IS, H.IS, H.IS_NOT_NULL, H.IS_NOT_NULL, H.IS_NOT, H.IS_NOT, H.LESS_THAN_OR_EQUAL, H.LESS_THAN_OR_EQUAL, H.GREATER_THAN_OR_EQUAL, H.GREATER_THAN_OR_EQUAL, H.IS_BEFORE, H.IS_BEFORE, H.IS_AFTER, H.IS_AFTER, H.CONTAINS, H.CONTAINS, H.DOES_NOT_CONTAIN, H.DOES_NOT_CONTAIN, H.IS_EMPTY, H.IS_EMPTY, H.IS_NOT_EMPTY, H.IS_NOT_EMPTY, H.IS_RELATIVE, H.IS_RELATIVE, H.IS_IN_PAST, H.IS_IN_PAST, H.IS_IN_FUTURE, H.IS_IN_FUTURE, H.IS_TODAY, H.IS_TODAY, H.VECTOR_SEARCH, H.VECTOR_SEARCH;
|
|
29388
|
-
var
|
|
29379
|
+
var CA = (e) => e === void 0 || typeof e != "object" || !e ? e : Array.isArray(e) ? e.map((e) => CA(e)).filter((e) => !c(e)) : Object.entries(e).reduce((e, [t, n]) => {
|
|
29389
29380
|
if (c(n)) return e;
|
|
29390
29381
|
if (n === null || n instanceof Date) return {
|
|
29391
29382
|
...e,
|
|
29392
29383
|
[t]: n
|
|
29393
29384
|
};
|
|
29394
29385
|
if (typeof n == "object") {
|
|
29395
|
-
let r =
|
|
29386
|
+
let r = CA(n);
|
|
29396
29387
|
return !c(r) && Object.keys(r).length > 0 ? {
|
|
29397
29388
|
...e,
|
|
29398
29389
|
[t]: r
|
|
@@ -29402,29 +29393,29 @@ var wA = (e) => e === void 0 || typeof e != "object" || !e ? e : Array.isArray(e
|
|
|
29402
29393
|
...e,
|
|
29403
29394
|
[t]: n
|
|
29404
29395
|
};
|
|
29405
|
-
}, {}),
|
|
29396
|
+
}, {}), wA = {
|
|
29406
29397
|
BOLD: "bold",
|
|
29407
29398
|
ITALIC: "italic",
|
|
29408
29399
|
UNDERLINE: "underline",
|
|
29409
29400
|
STRIKE: "strike",
|
|
29410
29401
|
LINK: "link"
|
|
29411
29402
|
};
|
|
29412
|
-
|
|
29413
|
-
var
|
|
29403
|
+
wA.UNDERLINE, wA.BOLD, wA.ITALIC, wA.STRIKE, wA.LINK;
|
|
29404
|
+
var TA = (e) => typeof e == "object" && !!e && !Array.isArray(e), EA = (e) => {
|
|
29414
29405
|
let t = e.trim();
|
|
29415
29406
|
return t.startsWith("http://") || t.startsWith("https://") || t.startsWith("HTTPS://") || t.startsWith("HTTP://") ? t : `https://${t}`;
|
|
29416
|
-
},
|
|
29407
|
+
}, DA = (e, t) => {
|
|
29417
29408
|
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";
|
|
29418
29409
|
return o && !r || a && !n ? !1 : i || o || a;
|
|
29419
29410
|
};
|
|
29420
29411
|
Ol().transform((e, t) => {
|
|
29421
|
-
let n =
|
|
29412
|
+
let n = EA(e.trim()), r = n.replace("https://", "").replace("http://", "").replace("HTTPS://", "").replace("HTTP://", "");
|
|
29422
29413
|
if (/^\d+(?:\/[a-zA-Z]*)?$/.test(r)) return t.addIssue({
|
|
29423
29414
|
code: "custom",
|
|
29424
29415
|
message: "domain is not a valid url"
|
|
29425
29416
|
}), S;
|
|
29426
29417
|
try {
|
|
29427
|
-
return
|
|
29418
|
+
return DA(new URL(n).hostname) ? n : (t.addIssue({
|
|
29428
29419
|
code: "custom",
|
|
29429
29420
|
message: "domain is not a valid url"
|
|
29430
29421
|
}), S);
|
|
@@ -29435,74 +29426,74 @@ Ol().transform((e, t) => {
|
|
|
29435
29426
|
}), S;
|
|
29436
29427
|
}
|
|
29437
29428
|
});
|
|
29438
|
-
var
|
|
29429
|
+
var OA = (e) => /^{{[^{}]+}}$/.test(e), kA = /* @__PURE__ */ new Map();
|
|
29439
29430
|
for (let e of _k()) {
|
|
29440
|
-
let t = vk(e), n =
|
|
29441
|
-
n ? n.push(e) :
|
|
29431
|
+
let t = vk(e), n = kA.get(t);
|
|
29432
|
+
n ? n.push(e) : kA.set(t, [e]);
|
|
29442
29433
|
}
|
|
29443
29434
|
new Set(_k());
|
|
29444
|
-
var
|
|
29435
|
+
var AA = (e) => typeof e == "string", jA = RegExp("\\{\\{([^{}]+)\\}\\}", "g"), MA = (e, t) => U(e) ? AA(e) ? FA(e, t) : Array.isArray(e) ? NA(e, t) : typeof e == "object" && e ? PA(e, t) : e : e, NA = (e, t) => {
|
|
29445
29436
|
let n = e;
|
|
29446
|
-
for (let r = 0; r < e.length; ++r) n[r] =
|
|
29437
|
+
for (let r = 0; r < e.length; ++r) n[r] = MA(e[r], t);
|
|
29447
29438
|
return n;
|
|
29448
|
-
},
|
|
29449
|
-
let i =
|
|
29450
|
-
return e[typeof i == "string" ? i : String(i)] =
|
|
29451
|
-
}, {}),
|
|
29452
|
-
let n = e.match(
|
|
29453
|
-
return !n || n.length === 0 ? e : n.length === 1 && n[0] === e ? jk(e, t) : e.replace(
|
|
29454
|
-
},
|
|
29439
|
+
}, PA = (e, t) => Object.entries(e).reduce((e, [n, r]) => {
|
|
29440
|
+
let i = MA(n, t);
|
|
29441
|
+
return e[typeof i == "string" ? i : String(i)] = MA(r, t), e;
|
|
29442
|
+
}, {}), FA = (e, t) => {
|
|
29443
|
+
let n = e.match(jA);
|
|
29444
|
+
return !n || n.length === 0 ? e : n.length === 1 && n[0] === e ? jk(e, t) : e.replace(jA, (e, n) => jk(e, t));
|
|
29445
|
+
}, IA = (e) => e.length >= 2 && e.startsWith("'") && e.endsWith("'"), LA = (e) => Object.values(Xf).includes(e), RA = (e) => {
|
|
29455
29446
|
let { defaultValue: t, type: n } = e;
|
|
29456
|
-
return U(t) ? s(t) ?
|
|
29457
|
-
},
|
|
29458
|
-
let t =
|
|
29447
|
+
return U(t) ? s(t) ? IA(t) || LA(t) ? [] : [t] : Array.isArray(t) && (n === V.MULTI_SELECT || n === V.ARRAY) ? t.filter((e) => typeof e == "string" && !IA(e)) : n in gp && TA(t) ? Object.values(t).filter((e) => typeof e == "string" && !IA(e)) : [] : [];
|
|
29448
|
+
}, zA = (e) => U(e) ? e.flatMap((e) => {
|
|
29449
|
+
let t = RA(e);
|
|
29459
29450
|
if (t.length === 0) return [];
|
|
29460
29451
|
let n = t[0];
|
|
29461
29452
|
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}".`];
|
|
29462
|
-
}) : [],
|
|
29453
|
+
}) : [], BA = (e) => {
|
|
29463
29454
|
if (!e) return [];
|
|
29464
29455
|
let t = [];
|
|
29465
29456
|
for (let n of e) r(n.label) || t.push("Field must have a label"), r(n.name) || t.push(`Field "${n.label}" must have a name`), r(n.universalIdentifier) || t.push(`Field "${n.label}" must have a universalIdentifier`), (n.type === V.SELECT || n.type === V.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 === V.RELATION || n.type === V.MORPH_RELATION || n.type === V.FILES) && t.push(`Field "${n.label}" of type ${n.type} cannot be unique`);
|
|
29466
29457
|
return t;
|
|
29467
|
-
},
|
|
29458
|
+
}, VA = (e) => {
|
|
29468
29459
|
let t = [];
|
|
29469
29460
|
e.objectUniversalIdentifier || t.push("Field must have an objectUniversalIdentifier");
|
|
29470
|
-
let n =
|
|
29461
|
+
let n = BA([e]);
|
|
29471
29462
|
return t.push(...n), y({
|
|
29472
29463
|
config: e,
|
|
29473
29464
|
errors: t,
|
|
29474
|
-
warnings:
|
|
29465
|
+
warnings: zA([e])
|
|
29475
29466
|
});
|
|
29476
|
-
},
|
|
29467
|
+
}, HA = (e) => {
|
|
29477
29468
|
let t = [], n = [];
|
|
29478
29469
|
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"), y({
|
|
29479
29470
|
config: e,
|
|
29480
29471
|
errors: t,
|
|
29481
29472
|
warnings: n
|
|
29482
29473
|
});
|
|
29483
|
-
},
|
|
29474
|
+
}, UA = (e) => e === "then", WA = (e) => typeof e == "symbol", $ = (e) => {
|
|
29484
29475
|
let t = () => {
|
|
29485
29476
|
throw Error(`"${e}" from twenty-sdk can only be used inside a command's conditionalAvailabilityExpression, not at runtime.`);
|
|
29486
29477
|
};
|
|
29487
29478
|
return new Proxy(function() {}, {
|
|
29488
29479
|
get: (e, n) => {
|
|
29489
|
-
if (!(
|
|
29480
|
+
if (!(UA(n) || WA(n))) return t();
|
|
29490
29481
|
},
|
|
29491
29482
|
apply: t,
|
|
29492
29483
|
construct: t,
|
|
29493
29484
|
has: t
|
|
29494
29485
|
});
|
|
29495
|
-
},
|
|
29486
|
+
}, GA = $("pageType"), KA = $("isInSidePanel"), qA = $("isDashboardPageLayoutInEditMode"), JA = $("isLayoutCustomizationModeEnabled"), YA = $("favoriteRecordIds"), XA = $("isSelectAll"), ZA = $("hasAnySoftDeleteFilterOnView"), QA = $("numberOfSelectedRecords"), $A = $("objectPermissions"), ej = $("selectedRecords"), tj = $("featureFlags"), nj = $("targetObjectReadPermissions"), rj = $("targetObjectWritePermissions"), ij = $("canImpersonate"), aj = $("canAccessFullAdminPanel"), oj = $("objectMetadataItem"), sj = $("objectMetadataLabel"), cj = $("isDefined"), lj = $("isNonEmptyString"), uj = $("includes"), dj = $("every"), fj = $("everyDefined"), pj = $("everyEquals"), mj = $("some"), hj = $("someDefined"), gj = $("someEquals"), _j = $("none"), vj = $("noneDefined"), yj = $("noneEquals"), bj = $("someNonEmptyString"), xj = $("includesEvery"), Sj = (e) => {
|
|
29496
29487
|
let t = [];
|
|
29497
29488
|
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"), y({
|
|
29498
29489
|
config: e,
|
|
29499
29490
|
errors: t
|
|
29500
29491
|
});
|
|
29501
|
-
},
|
|
29492
|
+
}, Cj = (e) => typeof e == "string" && e.trim().length > 0, wj = (e) => {
|
|
29502
29493
|
let t = [];
|
|
29503
|
-
if (
|
|
29494
|
+
if (Cj(e.universalIdentifier) || t.push("Index must have a universalIdentifier"), Cj(e.objectUniversalIdentifier) || t.push("Index must reference an objectUniversalIdentifier"), !xk(e.fields)) t.push("Index must have at least one field");
|
|
29504
29495
|
else {
|
|
29505
|
-
for (let n of e.fields)
|
|
29496
|
+
for (let n of e.fields) Cj(n.universalIdentifier) || t.push("IndexField must have a universalIdentifier"), Cj(n.fieldUniversalIdentifier) || t.push("IndexField must reference a fieldUniversalIdentifier");
|
|
29506
29497
|
let n = e.fields.map((e) => `${e.fieldUniversalIdentifier}::${e.subFieldName ?? ""}`);
|
|
29507
29498
|
new Set(n).size !== n.length && t.push("Index lists the same column twice");
|
|
29508
29499
|
}
|
|
@@ -29510,27 +29501,27 @@ var jA = (e) => typeof e == "string", MA = RegExp("\\{\\{([^{}]+)\\}\\}", "g"),
|
|
|
29510
29501
|
config: e,
|
|
29511
29502
|
errors: t
|
|
29512
29503
|
});
|
|
29513
|
-
},
|
|
29504
|
+
}, Tj = (e) => {
|
|
29514
29505
|
let t = [];
|
|
29515
29506
|
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")), y({
|
|
29516
29507
|
config: e,
|
|
29517
29508
|
errors: t
|
|
29518
29509
|
});
|
|
29519
|
-
},
|
|
29510
|
+
}, Ej = (e) => {
|
|
29520
29511
|
let t = [];
|
|
29521
29512
|
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"), y({
|
|
29522
29513
|
config: e,
|
|
29523
29514
|
errors: t
|
|
29524
29515
|
});
|
|
29525
|
-
},
|
|
29516
|
+
}, Dj = (e) => {
|
|
29526
29517
|
let t = [];
|
|
29527
29518
|
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"), y({
|
|
29528
29519
|
config: e,
|
|
29529
29520
|
errors: t
|
|
29530
29521
|
});
|
|
29531
|
-
},
|
|
29522
|
+
}, Oj = /^[a-z][a-z0-9-]*$/, kj = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, Aj = ["oauth"], jj = (e) => {
|
|
29532
29523
|
let t = [];
|
|
29533
|
-
if (e.universalIdentifier ?
|
|
29524
|
+
if (e.universalIdentifier ? kj.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 ? Oj.test(e.name) || t.push(`Connection provider name "${e.name}" must match ${Oj} (used in URLs)`) : t.push("Connection provider must have a name"), e.displayName || t.push("Connection provider must have a displayName"), e.type ? Aj.includes(e.type) || t.push(`Connection provider type "${e.type}" is not supported. Supported types: ${Aj.join(", ")}.`) : t.push("Connection provider must declare a `type` (e.g. 'oauth')"), e.type === "oauth") {
|
|
29534
29525
|
let n = e.oauth;
|
|
29535
29526
|
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");
|
|
29536
29527
|
}
|
|
@@ -29538,22 +29529,22 @@ var jA = (e) => typeof e == "string", MA = RegExp("\\{\\{([^{}]+)\\}\\}", "g"),
|
|
|
29538
29529
|
config: e,
|
|
29539
29530
|
errors: t
|
|
29540
29531
|
});
|
|
29541
|
-
},
|
|
29532
|
+
}, Mj = (e) => {
|
|
29542
29533
|
let t = [];
|
|
29543
29534
|
return e.universalIdentifier || t.push("NavigationMenuItem must have a universalIdentifier"), typeof e.position != "number" && t.push("NavigationMenuItem must have a position"), y({
|
|
29544
29535
|
config: e,
|
|
29545
29536
|
errors: t
|
|
29546
29537
|
});
|
|
29547
|
-
},
|
|
29538
|
+
}, Nj = (e) => {
|
|
29548
29539
|
let t = [];
|
|
29549
29540
|
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");
|
|
29550
|
-
let n =
|
|
29541
|
+
let n = BA(e.fields);
|
|
29551
29542
|
return t.push(...n), U(e.labelIdentifierFieldMetadataUniversalIdentifier) && !e.fields.some((t) => t.universalIdentifier === e.labelIdentifierFieldMetadataUniversalIdentifier) && t.push("labelIdentifierFieldMetadataUniversalIdentifier must reference a field defined in the fields array"), y({
|
|
29552
29543
|
config: e,
|
|
29553
29544
|
errors: t,
|
|
29554
|
-
warnings:
|
|
29545
|
+
warnings: zA(e.fields)
|
|
29555
29546
|
});
|
|
29556
|
-
},
|
|
29547
|
+
}, Pj = "142046f0-4d80-48b5-ad56-26ad410e895c", Fj = ({ objectUniversalIdentifier: e, fieldName: n }) => t(`${e}-${n}`, Pj);
|
|
29557
29548
|
(/* @__PURE__ */ h(((e, t) => {
|
|
29558
29549
|
(function(n, r) {
|
|
29559
29550
|
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 || {});
|
|
@@ -58750,7 +58741,7 @@ var jA = (e) => typeof e == "string", MA = RegExp("\\{\\{([^{}]+)\\}\\}", "g"),
|
|
|
58750
58741
|
Ya.config = Ja.config.bind(Ja), Ya.setData = Ja.setData.bind(Ja), e.slugify = Ya, e.transl = qa, e.transliterate = qa, Object.defineProperty(e, "__esModule", { value: !0 });
|
|
58751
58742
|
}));
|
|
58752
58743
|
})))();
|
|
58753
|
-
var
|
|
58744
|
+
var Ij = {
|
|
58754
58745
|
attachment: {
|
|
58755
58746
|
universalIdentifier: "20202020-bd3d-4c60-8dca-571c71d4447a",
|
|
58756
58747
|
fields: {
|
|
@@ -58964,7 +58955,6 @@ var Lj = {
|
|
|
58964
58955
|
conferenceLink: { universalIdentifier: "20202020-35da-43ef-9ca0-e936e9dc237b" },
|
|
58965
58956
|
calendarChannelEventAssociations: { universalIdentifier: "20202020-bdf8-4572-a2cc-ecbb6bcc3a02" },
|
|
58966
58957
|
calendarEventParticipants: { universalIdentifier: "20202020-e07e-4ccb-88f5-6f3d00458eec" },
|
|
58967
|
-
recordingPreference: { universalIdentifier: "1d231e7e-9bbe-410b-8007-ea7678a83e58" },
|
|
58968
58958
|
callRecordings: { universalIdentifier: "48d6d151-18e2-4111-b405-d85fb9d860d8" },
|
|
58969
58959
|
createdBy: { universalIdentifier: "664a9500-2641-4caa-8d95-069807bb2eb4" },
|
|
58970
58960
|
updatedBy: { universalIdentifier: "1081c196-d675-4801-b9e1-7d8637b48eab" },
|
|
@@ -58995,6 +58985,7 @@ var Lj = {
|
|
|
58995
58985
|
deletedAt: { universalIdentifier: "cf22a652-390a-4f55-b3a0-615c8fd8c7ed" },
|
|
58996
58986
|
title: { universalIdentifier: "4cff8863-a1d1-45fd-a370-4eb6aa1f2a5b" },
|
|
58997
58987
|
status: { universalIdentifier: "3e617680-d93e-4309-a54f-90f69528bfd7" },
|
|
58988
|
+
recordingRequestStatus: { universalIdentifier: "7fd681c9-244c-4e98-8939-7b175d472638" },
|
|
58998
58989
|
applicationId: { universalIdentifier: "24ec1239-1240-42cb-8a2d-302632378e09" },
|
|
58999
58990
|
externalBotId: { universalIdentifier: "0a2da128-9bcc-488b-bc31-65318c41bdf9" },
|
|
59000
58991
|
externalRecordingId: { universalIdentifier: "6d17fb71-324b-4625-a5be-b3580607e2c7" },
|
|
@@ -59016,6 +59007,7 @@ var Lj = {
|
|
|
59016
59007
|
universalIdentifier: "c395b55e-88f0-4d5b-a1fb-0d38b50e0b19",
|
|
59017
59008
|
viewFields: {
|
|
59018
59009
|
status: { universalIdentifier: "6c4a81a2-d9c1-4f82-984c-f97e083ca710" },
|
|
59010
|
+
recordingRequestStatus: { universalIdentifier: "3bdedacd-0fd5-4175-8d28-2fe41bb5aa77" },
|
|
59019
59011
|
title: { universalIdentifier: "b1d5051b-071d-4514-93cf-704724cdc8f6" },
|
|
59020
59012
|
startedAt: { universalIdentifier: "3b96351f-66ed-4fa6-acb6-698647573af7" }
|
|
59021
59013
|
}
|
|
@@ -59026,6 +59018,7 @@ var Lj = {
|
|
|
59026
59018
|
viewFields: {
|
|
59027
59019
|
title: { universalIdentifier: "6308d574-8579-4cf2-a020-c208df97cf3e" },
|
|
59028
59020
|
status: { universalIdentifier: "93483569-fcd2-46cf-b576-9f0318ad2b3b" },
|
|
59021
|
+
recordingRequestStatus: { universalIdentifier: "364a90b1-e9aa-4606-996b-46e579ebeb28" },
|
|
59029
59022
|
startedAt: { universalIdentifier: "3fd00fbb-c153-45e3-b6e6-43d18d34052a" },
|
|
59030
59023
|
endedAt: { universalIdentifier: "ba8c8d41-c112-4173-b927-5b5c5a5c047b" },
|
|
59031
59024
|
video: { universalIdentifier: "acc54ade-cd26-4be2-9391-a42715ad1523" },
|
|
@@ -60090,7 +60083,7 @@ var Lj = {
|
|
|
60090
60083
|
}
|
|
60091
60084
|
} }
|
|
60092
60085
|
}
|
|
60093
|
-
},
|
|
60086
|
+
}, Lj = {
|
|
60094
60087
|
myFirstDashboard: {
|
|
60095
60088
|
universalIdentifier: "20202020-d001-4d01-8d01-da5ab0a00001",
|
|
60096
60089
|
tabs: { tab1: {
|
|
@@ -60440,7 +60433,7 @@ var Lj = {
|
|
|
60440
60433
|
}
|
|
60441
60434
|
} }
|
|
60442
60435
|
}
|
|
60443
|
-
},
|
|
60436
|
+
}, Rj = (e) => {
|
|
60444
60437
|
let t = [];
|
|
60445
60438
|
if (e.universalIdentifier || t.push("PageLayout must have a universalIdentifier"), e.name || t.push("PageLayout must have a name"), e.tabs) {
|
|
60446
60439
|
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");
|
|
@@ -60449,20 +60442,20 @@ var Lj = {
|
|
|
60449
60442
|
config: e,
|
|
60450
60443
|
errors: t
|
|
60451
60444
|
});
|
|
60452
|
-
},
|
|
60445
|
+
}, zj = (e) => {
|
|
60453
60446
|
let t = [];
|
|
60454
60447
|
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");
|
|
60455
60448
|
return y({
|
|
60456
60449
|
config: e,
|
|
60457
60450
|
errors: t
|
|
60458
60451
|
});
|
|
60459
|
-
},
|
|
60452
|
+
}, Bj = (e) => {
|
|
60460
60453
|
let t = [];
|
|
60461
60454
|
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"), y({
|
|
60462
60455
|
config: e,
|
|
60463
60456
|
errors: t
|
|
60464
60457
|
});
|
|
60465
|
-
},
|
|
60458
|
+
}, Vj = (e) => {
|
|
60466
60459
|
let t = [];
|
|
60467
60460
|
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");
|
|
60468
60461
|
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");
|
|
@@ -60470,13 +60463,13 @@ var Lj = {
|
|
|
60470
60463
|
config: e,
|
|
60471
60464
|
errors: t
|
|
60472
60465
|
});
|
|
60473
|
-
},
|
|
60466
|
+
}, Hj = (e) => Vj(e), Uj = (e) => {
|
|
60474
60467
|
let t = [];
|
|
60475
60468
|
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"), y({
|
|
60476
60469
|
config: e,
|
|
60477
60470
|
errors: t
|
|
60478
60471
|
});
|
|
60479
|
-
},
|
|
60472
|
+
}, Wj = (e) => {
|
|
60480
60473
|
let t = [];
|
|
60481
60474
|
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");
|
|
60482
60475
|
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");
|
|
@@ -60488,7 +60481,7 @@ var Lj = {
|
|
|
60488
60481
|
config: e,
|
|
60489
60482
|
errors: t
|
|
60490
60483
|
});
|
|
60491
|
-
},
|
|
60484
|
+
}, Gj = (e) => {
|
|
60492
60485
|
let t = [];
|
|
60493
60486
|
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"), y({
|
|
60494
60487
|
config: e,
|
|
@@ -60496,6 +60489,6 @@ var Lj = {
|
|
|
60496
60489
|
});
|
|
60497
60490
|
};
|
|
60498
60491
|
//#endregion
|
|
60499
|
-
export { Bf as AggregateOperations, $f as DateDisplayFormat, Zf as FieldMetadataSettingsOnClickAction, V as FieldType, tp as HTTPMethod, np as NavigationMenuItemType, Qf as NumberDataType, rp as ObjectRecordGroupByDateGranularity, op as OnDeleteAction, ip as PageLayoutTabLayoutMode, sp as RelationType,
|
|
60492
|
+
export { Bf as AggregateOperations, $f as DateDisplayFormat, Zf as FieldMetadataSettingsOnClickAction, V as FieldType, tp as HTTPMethod, np as NavigationMenuItemType, Qf as NumberDataType, rp as ObjectRecordGroupByDateGranularity, op as OnDeleteAction, ip as PageLayoutTabLayoutMode, sp as RelationType, Ij as STANDARD_OBJECT, Ij as STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS, Lj as STANDARD_PAGE_LAYOUT, Lj as STANDARD_PAGE_LAYOUT_UNIVERSAL_IDENTIFIERS, yp as SystemPermissionFlag, cp as ViewCalendarLayout, lp as ViewFilterGroupLogicalOperator, H as ViewFilterOperand, dp as ViewKey, fp as ViewOpenRecordIn, pp as ViewSortDirection, mp as ViewType, hp as ViewVisibility, aj as canAccessFullAdminPanel, ij as canImpersonate, y as createValidationResult, b as defineAgent, x as defineApplication, Hj as defineApplicationRole, HA as defineCommandMenuItem, jj as defineConnectionProvider, VA as defineField, Sj as defineFrontComponent, wj as defineIndex, Tj as defineLogicFunction, Mj as defineNavigationMenuItem, Nj as defineObject, Rj as definePageLayout, zj as definePageLayoutTab, Bj as definePermissionFlag, Ej as definePostInstallLogicFunction, Dj as definePreInstallLogicFunction, Vj as defineRole, Uj as defineSkill, Wj as defineView, Gj as defineViewField, dj as every, fj as everyDefined, pj as everyEquals, YA as favoriteRecordIds, tj as featureFlags, Fj as generateDefaultFieldUniversalIdentifier, ZA as hasAnySoftDeleteFilterOnView, uj as includes, xj as includesEvery, qA as isDashboardPageLayoutInEditMode, cj as isDefined, KA as isInSidePanel, JA as isLayoutCustomizationModeEnabled, lj as isNonEmptyString, XA as isSelectAll, _j as none, vj as noneDefined, yj as noneEquals, QA as numberOfSelectedRecords, oj as objectMetadataItem, sj as objectMetadataLabel, $A as objectPermissions, GA as pageType, ej as selectedRecords, mj as some, hj as someDefined, gj as someEquals, bj as someNonEmptyString, nj as targetObjectReadPermissions, rj as targetObjectWritePermissions, BA as validateFields };
|
|
60500
60493
|
|
|
60501
60494
|
//# sourceMappingURL=index.mjs.map
|