@dotbep/core 0.2.14 → 0.2.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +10 -0
- package/dist/index.js +25 -20
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -219,6 +219,11 @@ export declare const BEPSchema: z.ZodObject<{
|
|
|
219
219
|
description: z.ZodOptional<z.ZodString>;
|
|
220
220
|
image: z.ZodOptional<z.ZodString>;
|
|
221
221
|
websiteUrl: z.ZodOptional<z.ZodURL>;
|
|
222
|
+
location: z.ZodOptional<z.ZodObject<{
|
|
223
|
+
address: z.ZodOptional<z.ZodString>;
|
|
224
|
+
coordinates: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
225
|
+
}, z.core.$strip>>;
|
|
226
|
+
customData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
222
227
|
}, z.core.$strip>;
|
|
223
228
|
deliverableNamingConvention: z.ZodOptional<z.ZodObject<{
|
|
224
229
|
delimiter: z.ZodString;
|
|
@@ -2113,6 +2118,11 @@ export declare const ProjectSchema: z.ZodObject<{
|
|
|
2113
2118
|
description: z.ZodOptional<z.ZodString>;
|
|
2114
2119
|
image: z.ZodOptional<z.ZodString>;
|
|
2115
2120
|
websiteUrl: z.ZodOptional<z.ZodURL>;
|
|
2121
|
+
location: z.ZodOptional<z.ZodObject<{
|
|
2122
|
+
address: z.ZodOptional<z.ZodString>;
|
|
2123
|
+
coordinates: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
2124
|
+
}, z.core.$strip>>;
|
|
2125
|
+
customData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2116
2126
|
}, z.core.$strip>;
|
|
2117
2127
|
|
|
2118
2128
|
export declare type RaciAssignment = {
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import se from "jszip";
|
|
2
2
|
import { z as r, ZodError as We } from "zod";
|
|
3
|
-
const
|
|
3
|
+
const Ge = r.enum([
|
|
4
4
|
"appointing-party",
|
|
5
5
|
"lead-appointed-party",
|
|
6
6
|
"appointed-party"
|
|
7
|
-
]),
|
|
7
|
+
]), Xe = r.enum(["video", "document"]), Ve = r.enum(["zone", "location"]), He = r.enum(["LR", "TB"]), xs = r.enum(["start", "end", "process", "decision", "automation"]), Ye = r.enum(["info", "warning", "blocking"]), Qe = r.enum([
|
|
8
8
|
"roles",
|
|
9
9
|
"members",
|
|
10
10
|
"teams",
|
|
@@ -32,7 +32,12 @@ const Xe = r.enum([
|
|
|
32
32
|
clientId: r.string().describe("ref Team.id").optional(),
|
|
33
33
|
description: r.string().optional(),
|
|
34
34
|
image: r.string().optional(),
|
|
35
|
-
websiteUrl: r.url().optional()
|
|
35
|
+
websiteUrl: r.url().optional(),
|
|
36
|
+
location: r.object({
|
|
37
|
+
address: r.string().optional(),
|
|
38
|
+
coordinates: r.tuple([r.number(), r.number()]).optional().describe("[longitude, latitude] — GeoJSON order")
|
|
39
|
+
}).optional(),
|
|
40
|
+
customData: r.record(r.string(), r.unknown()).optional()
|
|
36
41
|
}).describe("General metadata about the construction project the BEP belongs to."), le = r.object({
|
|
37
42
|
id: r.uuid(),
|
|
38
43
|
name: r.string().min(1),
|
|
@@ -47,7 +52,7 @@ const Xe = r.enum([
|
|
|
47
52
|
}).describe("A project participant identified by email. Each member holds one role, which determines their responsibilities across workflow steps."), et = r.object({
|
|
48
53
|
id: r.string().min(1).describe("Must comply with the naming convention token pattern."),
|
|
49
54
|
name: r.string().min(1),
|
|
50
|
-
isoRole:
|
|
55
|
+
isoRole: Ge,
|
|
51
56
|
description: r.string().optional(),
|
|
52
57
|
disciplineIds: r.array(r.string()).optional(),
|
|
53
58
|
representativeEmail: r.email().optional().describe("ref Member.email"),
|
|
@@ -287,7 +292,7 @@ const Xe = r.enum([
|
|
|
287
292
|
}).describe("A reusable process definition associated with one or more BIM uses. Describes the ordered steps, responsibilities, and transitions that govern how work is carried out."), Re = r.object({
|
|
288
293
|
id: r.uuid(),
|
|
289
294
|
name: r.string().min(1),
|
|
290
|
-
type:
|
|
295
|
+
type: Xe,
|
|
291
296
|
url: r.string().min(1),
|
|
292
297
|
description: r.string().optional()
|
|
293
298
|
}).describe("Supporting material attached to the BEP, such as a reference document or instructional video."), je = r.object({
|
|
@@ -1169,7 +1174,7 @@ class Wt extends y {
|
|
|
1169
1174
|
);
|
|
1170
1175
|
}
|
|
1171
1176
|
}
|
|
1172
|
-
class
|
|
1177
|
+
class Gt extends y {
|
|
1173
1178
|
constructor(e) {
|
|
1174
1179
|
super(
|
|
1175
1180
|
() => e().lbs,
|
|
@@ -1280,7 +1285,7 @@ class Xt extends y {
|
|
|
1280
1285
|
return Bt(this.list());
|
|
1281
1286
|
}
|
|
1282
1287
|
}
|
|
1283
|
-
class
|
|
1288
|
+
class Xt extends y {
|
|
1284
1289
|
constructor(e) {
|
|
1285
1290
|
super(
|
|
1286
1291
|
() => e().members,
|
|
@@ -1752,7 +1757,7 @@ function N(n) {
|
|
|
1752
1757
|
return n;
|
|
1753
1758
|
}
|
|
1754
1759
|
}
|
|
1755
|
-
function
|
|
1760
|
+
function G(n) {
|
|
1756
1761
|
for (var e = 0, s = n.length, t; e < s; ) {
|
|
1757
1762
|
if (t = n.charCodeAt(e), t >= 48 && t <= 57) {
|
|
1758
1763
|
e++;
|
|
@@ -1768,17 +1773,17 @@ function $(n) {
|
|
|
1768
1773
|
function Je(n) {
|
|
1769
1774
|
return n.replace(/~1/g, "/").replace(/~0/g, "~");
|
|
1770
1775
|
}
|
|
1771
|
-
function
|
|
1776
|
+
function X(n) {
|
|
1772
1777
|
if (n === void 0)
|
|
1773
1778
|
return !0;
|
|
1774
1779
|
if (n) {
|
|
1775
1780
|
if (Array.isArray(n)) {
|
|
1776
1781
|
for (var e = 0, s = n.length; e < s; e++)
|
|
1777
|
-
if (
|
|
1782
|
+
if (X(n[e]))
|
|
1778
1783
|
return !0;
|
|
1779
1784
|
} else if (typeof n == "object") {
|
|
1780
1785
|
for (var t = W(n), i = t.length, o = 0; o < i; o++)
|
|
1781
|
-
if (
|
|
1786
|
+
if (X(n[t[o]]))
|
|
1782
1787
|
return !0;
|
|
1783
1788
|
}
|
|
1784
1789
|
}
|
|
@@ -1833,7 +1838,7 @@ var Ke = (
|
|
|
1833
1838
|
}
|
|
1834
1839
|
}, ls = {
|
|
1835
1840
|
add: function(n, e, s) {
|
|
1836
|
-
return
|
|
1841
|
+
return G(e) ? n.splice(e, 0, this.value) : n[e] = this.value, { newDocument: s, index: e };
|
|
1837
1842
|
},
|
|
1838
1843
|
remove: function(n, e, s) {
|
|
1839
1844
|
var t = n.splice(e, 1);
|
|
@@ -1886,9 +1891,9 @@ function R(n, e, s, t, i, o) {
|
|
|
1886
1891
|
if (p === "-")
|
|
1887
1892
|
p = c.length;
|
|
1888
1893
|
else {
|
|
1889
|
-
if (s && !
|
|
1894
|
+
if (s && !G(p))
|
|
1890
1895
|
throw new b("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index", "OPERATION_PATH_ILLEGAL_ARRAY_INDEX", o, e, n);
|
|
1891
|
-
|
|
1896
|
+
G(p) && (p = ~~p);
|
|
1892
1897
|
}
|
|
1893
1898
|
if (u >= f) {
|
|
1894
1899
|
if (s && e.op === "add" && p > c.length)
|
|
@@ -1935,7 +1940,7 @@ function D(n, e, s, t) {
|
|
|
1935
1940
|
throw new b("Operation `from` property is not present (applicable in `move` and `copy` operations)", "OPERATION_FROM_REQUIRED", e, n, s);
|
|
1936
1941
|
if ((n.op === "add" || n.op === "replace" || n.op === "test") && n.value === void 0)
|
|
1937
1942
|
throw new b("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)", "OPERATION_VALUE_REQUIRED", e, n, s);
|
|
1938
|
-
if ((n.op === "add" || n.op === "replace" || n.op === "test") &&
|
|
1943
|
+
if ((n.op === "add" || n.op === "replace" || n.op === "test") && X(n.value))
|
|
1939
1944
|
throw new b("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)", "OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED", e, n, s);
|
|
1940
1945
|
if (s) {
|
|
1941
1946
|
if (n.op == "add") {
|
|
@@ -2958,7 +2963,7 @@ class F {
|
|
|
2958
2963
|
return d && a.push(d), i.clientId && !o.teams.some((l) => l.id === i.clientId) && a.push(`teams["${i.clientId}"] not found`), a;
|
|
2959
2964
|
},
|
|
2960
2965
|
t
|
|
2961
|
-
), this.actions = new Rt(t), this.annexes = new jt(t), this.env = new Ot(t), this.events = new Mt(t), this.effects = new At(t), this.automations = new Tt(t), this.bimUses = new Ct(t, () => this.workflows), this.disciplines = new Dt(t), this.guides = new Ut(t), this.lods = new zt(t), this.lois = new Zt(t), this.loin = new Jt(t), this.lbsNodes = new
|
|
2966
|
+
), this.actions = new Rt(t), this.annexes = new jt(t), this.env = new Ot(t), this.events = new Mt(t), this.effects = new At(t), this.automations = new Tt(t), this.bimUses = new Ct(t, () => this.workflows), this.disciplines = new Dt(t), this.guides = new Ut(t), this.lods = new zt(t), this.lois = new Zt(t), this.loin = new Jt(t), this.lbsNodes = new Gt(t), this.assetTypes = new Kt(t), this.extensions = new qt(t), this.roles = new Wt(t), this.members = new Xt(t), this.milestones = new Vt(t), this.objectives = new Ht(t), this.phases = new Yt(t), this.remoteData = new Qt(t), this.resolvers = new es(t), this.softwares = new ts(t, () => this.assetTypes), this.standards = new ss(t, () => this._zip), this.teams = new ns(t, () => this.members), this.workflows = new os(t, () => this.members, () => this.teams), this.deliverables = new Pt(t, () => this.teams, () => this.assetTypes, () => this.lbsNodes, () => this.milestones), this.notes = new Lt(t, () => this.members), this.flags = new Ft(t), this.engine = new Os(
|
|
2962
2967
|
() => this._data,
|
|
2963
2968
|
(i) => this.history.get(i)
|
|
2964
2969
|
), this.history = new E(
|
|
@@ -3230,7 +3235,7 @@ export {
|
|
|
3230
3235
|
Ee as ActionSchema,
|
|
3231
3236
|
Rt as Actions,
|
|
3232
3237
|
Re as AnnexSchema,
|
|
3233
|
-
|
|
3238
|
+
Xe as AnnexType,
|
|
3234
3239
|
jt as Annexes,
|
|
3235
3240
|
we as AssetTypeSchema,
|
|
3236
3241
|
Kt as AssetTypes,
|
|
@@ -3282,11 +3287,11 @@ export {
|
|
|
3282
3287
|
je as GuideSchema,
|
|
3283
3288
|
Ut as Guides,
|
|
3284
3289
|
E as History,
|
|
3285
|
-
|
|
3290
|
+
Ge as ISORole,
|
|
3286
3291
|
nt as LBSNodeBaseSchema,
|
|
3287
3292
|
he as LBSNodeSchema,
|
|
3288
3293
|
Ve as LBSNodeType,
|
|
3289
|
-
|
|
3294
|
+
Gt as LBSNodes,
|
|
3290
3295
|
Te as LODSchema,
|
|
3291
3296
|
zt as LODs,
|
|
3292
3297
|
Jt as LOINEntity,
|
|
@@ -3295,7 +3300,7 @@ export {
|
|
|
3295
3300
|
Oe as LOISchema,
|
|
3296
3301
|
Zt as LOIs,
|
|
3297
3302
|
ce as MemberSchema,
|
|
3298
|
-
|
|
3303
|
+
Xt as Members,
|
|
3299
3304
|
Ts as MemoryStorage,
|
|
3300
3305
|
pe as MilestoneSchema,
|
|
3301
3306
|
Vt as Milestones,
|