@pegasimed.com/pegasi-sail-connect-shared 0.2.0-dev.4 → 0.2.0-dev.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1688 -11
- package/dist/authorization/index.d.ts +2 -0
- package/dist/authorization/index.d.ts.map +1 -1
- package/dist/authorization/index.js +2 -0
- package/dist/authorization/index.js.map +1 -1
- package/dist/authorization/internal-authorization.d.ts +61 -1
- package/dist/authorization/internal-authorization.d.ts.map +1 -1
- package/dist/authorization/internal-authorization.js +105 -2
- package/dist/authorization/internal-authorization.js.map +1 -1
- package/dist/authorization/permission-codec.d.ts +15 -0
- package/dist/authorization/permission-codec.d.ts.map +1 -0
- package/dist/authorization/permission-codec.js +98 -0
- package/dist/authorization/permission-codec.js.map +1 -0
- package/dist/authorization/practitioner-link.d.ts +20 -0
- package/dist/authorization/practitioner-link.d.ts.map +1 -0
- package/dist/authorization/practitioner-link.js +53 -0
- package/dist/authorization/practitioner-link.js.map +1 -0
- package/dist/authorization-testing.d.ts +247 -0
- package/dist/authorization-testing.d.ts.map +1 -0
- package/dist/authorization-testing.js +789 -0
- package/dist/authorization-testing.js.map +1 -0
- package/dist/capabilities/catalog-data.d.ts +3273 -805
- package/dist/capabilities/catalog-data.d.ts.map +1 -1
- package/dist/capabilities/catalog-data.js +3455 -885
- package/dist/capabilities/catalog-data.js.map +1 -1
- package/dist/capabilities/catalog.d.ts +1 -1
- package/dist/capabilities/catalog.d.ts.map +1 -1
- package/dist/capabilities/catalog.js +1 -1
- package/dist/capabilities/catalog.js.map +1 -1
- package/dist/capabilities/index.d.ts +4 -0
- package/dist/capabilities/index.d.ts.map +1 -1
- package/dist/capabilities/index.js +7 -0
- package/dist/capabilities/index.js.map +1 -1
- package/dist/capabilities/types.d.ts +6 -0
- package/dist/capabilities/types.d.ts.map +1 -1
- package/dist/capabilities/validate.d.ts +1 -1
- package/dist/capabilities/validate.d.ts.map +1 -1
- package/dist/capabilities/validate.js +9 -0
- package/dist/capabilities/validate.js.map +1 -1
- package/dist/consent/index.d.ts +45 -0
- package/dist/consent/index.d.ts.map +1 -0
- package/dist/consent/index.js +121 -0
- package/dist/consent/index.js.map +1 -0
- package/dist/consent/schema.d.ts +169 -0
- package/dist/consent/schema.d.ts.map +1 -0
- package/dist/consent/schema.js +74 -0
- package/dist/consent/schema.js.map +1 -0
- package/dist/consent/vectors.d.ts +1709 -0
- package/dist/consent/vectors.d.ts.map +1 -0
- package/dist/consent/vectors.js +144 -0
- package/dist/consent/vectors.js.map +1 -0
- package/dist/dates/adapters.d.ts +18 -0
- package/dist/dates/adapters.d.ts.map +1 -0
- package/dist/dates/adapters.js +79 -0
- package/dist/dates/adapters.js.map +1 -0
- package/dist/dates/canonical-time-zones.d.ts +2 -0
- package/dist/dates/canonical-time-zones.d.ts.map +1 -0
- package/dist/dates/canonical-time-zones.js +346 -0
- package/dist/dates/canonical-time-zones.js.map +1 -0
- package/dist/dates/index.d.ts +4 -0
- package/dist/dates/index.d.ts.map +1 -0
- package/dist/dates/index.js +4 -0
- package/dist/dates/index.js.map +1 -0
- package/dist/dates/instant.d.ts +10 -0
- package/dist/dates/instant.d.ts.map +1 -0
- package/dist/dates/instant.js +23 -0
- package/dist/dates/instant.js.map +1 -0
- package/dist/dates/time-zone.d.ts +7 -0
- package/dist/dates/time-zone.d.ts.map +1 -0
- package/dist/dates/time-zone.js +68 -0
- package/dist/dates/time-zone.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/organization/index.d.ts +141 -0
- package/dist/organization/index.d.ts.map +1 -0
- package/dist/organization/index.js +93 -0
- package/dist/organization/index.js.map +1 -0
- package/package.json +17 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canonical-time-zones.js","sourceRoot":"","sources":["../../src/dates/canonical-time-zones.ts"],"names":[],"mappings":"AAAA,mFAAmF;A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,iBAAiB;IACjB,eAAe;IACf,iBAAiB;IACjB,kBAAkB;IAClB,iBAAiB;IACjB,iBAAiB;IACjB,eAAe;IACf,kBAAkB;IAClB,iBAAiB;IACjB,iBAAiB;IACjB,oBAAoB;IACpB,cAAc;IACd,aAAa;IACb,eAAe;IACf,eAAe;IACf,eAAe;IACf,cAAc;IACd,cAAc;IACd,eAAe;IACf,cAAc;IACd,eAAe;IACf,aAAa;IACb,aAAa;IACb,eAAe;IACf,gBAAgB;IAChB,mBAAmB;IACnB,cAAc;IACd,gBAAgB;IAChB,eAAe;IACf,kBAAkB;IAClB,eAAe;IACf,gBAAgB;IAChB,kBAAkB;IAClB,eAAe;IACf,eAAe;IACf,eAAe;IACf,iBAAiB;IACjB,kBAAkB;IAClB,cAAc;IACd,kBAAkB;IAClB,sBAAsB;IACtB,iBAAiB;IACjB,gBAAgB;IAChB,eAAe;IACf,iBAAiB;IACjB,cAAc;IACd,mBAAmB;IACnB,iBAAiB;IACjB,qBAAqB;IACrB,cAAc;IACd,kBAAkB;IAClB,gBAAgB;IAChB,oBAAoB;IACpB,gBAAgB;IAChB,mBAAmB;IACnB,mBAAmB;IACnB,eAAe;IACf,cAAc;IACd,iBAAiB;IACjB,gBAAgB;IAChB,mBAAmB;IACnB,eAAe;IACf,kBAAkB;IAClB,sBAAsB;IACtB,mBAAmB;IACnB,gBAAgB;IAChB,gBAAgB;IAChB,mBAAmB;CACpB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dates/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/dates/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare const utcInstant: unique symbol;
|
|
2
|
+
/** An ISO 8601 UTC instant with a four-digit year and exactly three fractional digits. */
|
|
3
|
+
export type UtcInstant = string & {
|
|
4
|
+
readonly [utcInstant]: true;
|
|
5
|
+
};
|
|
6
|
+
export declare function isUtcInstant(value: unknown): value is UtcInstant;
|
|
7
|
+
export declare function parseUtcInstant(value: unknown): UtcInstant;
|
|
8
|
+
export declare function serializeUtcInstant(value: Date): UtcInstant;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=instant.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instant.d.ts","sourceRoot":"","sources":["../../src/dates/instant.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,UAAU,EAAE,OAAO,MAAM,CAAC;AAExC,0FAA0F;AAC1F,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,CAAC,UAAU,CAAC,EAAE,IAAI,CAAA;CAAE,CAAC;AAIlE,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAIhE;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,UAAU,CAG1D;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,IAAI,GAAG,UAAU,CAQ3D"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const UTC_INSTANT = /^(?!0000)\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/u;
|
|
2
|
+
export function isUtcInstant(value) {
|
|
3
|
+
if (typeof value !== "string" || value.length !== 24 || !UTC_INSTANT.test(value))
|
|
4
|
+
return false;
|
|
5
|
+
const milliseconds = Date.parse(value);
|
|
6
|
+
return Number.isFinite(milliseconds) && new Date(milliseconds).toISOString() === value;
|
|
7
|
+
}
|
|
8
|
+
export function parseUtcInstant(value) {
|
|
9
|
+
if (!isUtcInstant(value))
|
|
10
|
+
throw new RangeError("Invalid UTC instant");
|
|
11
|
+
return value;
|
|
12
|
+
}
|
|
13
|
+
export function serializeUtcInstant(value) {
|
|
14
|
+
let iso;
|
|
15
|
+
try {
|
|
16
|
+
iso = Date.prototype.toISOString.call(value);
|
|
17
|
+
}
|
|
18
|
+
catch {
|
|
19
|
+
throw new RangeError("Invalid UTC date");
|
|
20
|
+
}
|
|
21
|
+
return parseUtcInstant(iso);
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=instant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instant.js","sourceRoot":"","sources":["../../src/dates/instant.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,GAAG,wDAAwD,CAAC;AAE7E,MAAM,UAAU,YAAY,CAAC,KAAc;IACzC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAC/F,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACvC,OAAO,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,WAAW,EAAE,KAAK,KAAK,CAAC;AACzF,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,KAAc;IAC5C,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC;QAAE,MAAM,IAAI,UAAU,CAAC,qBAAqB,CAAC,CAAC;IACtE,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,KAAW;IAC7C,IAAI,GAAW,CAAC;IAChB,IAAI,CAAC;QACH,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,UAAU,CAAC,kBAAkB,CAAC,CAAC;IAC3C,CAAC;IACD,OAAO,eAAe,CAAC,GAAG,CAAC,CAAC;AAC9B,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type UtcInstant } from "./instant.js";
|
|
2
|
+
export type DstResolution = "reject" | "earlier" | "later";
|
|
3
|
+
/** Returns YYYY-MM-DDTHH:mm:ss.SSS in the specified zone. */
|
|
4
|
+
export declare function toLocalDateTime(instant: UtcInstant, timeZone: string): string;
|
|
5
|
+
/** Resolves a wall time. In a gap, earlier/later shift it backward/forward by the offset change. */
|
|
6
|
+
export declare function fromLocalDateTime(localDateTime: string, timeZone: string, resolution: DstResolution): UtcInstant;
|
|
7
|
+
//# sourceMappingURL=time-zone.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time-zone.d.ts","sourceRoot":"","sources":["../../src/dates/time-zone.ts"],"names":[],"mappings":"AACA,OAAO,EAAwC,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAErF,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,CAAC;AAyC3D,6DAA6D;AAC7D,wBAAgB,eAAe,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAI7E;AAED,oGAAoG;AACpG,wBAAgB,iBAAiB,CAAC,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,GAAG,UAAU,CAuBhH"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { canonicalTimeZones } from "./canonical-time-zones.js";
|
|
2
|
+
import { parseUtcInstant, serializeUtcInstant } from "./instant.js";
|
|
3
|
+
const DAY_MS = 86_400_000;
|
|
4
|
+
function zoneFormatter(timeZone) {
|
|
5
|
+
if (timeZone !== "UTC" && !canonicalTimeZones.has(timeZone)) {
|
|
6
|
+
throw new RangeError("Invalid IANA time zone");
|
|
7
|
+
}
|
|
8
|
+
try {
|
|
9
|
+
return new Intl.DateTimeFormat("en-US", {
|
|
10
|
+
timeZone,
|
|
11
|
+
// The Gregorian formatter exposes the era for wall times before year 0001.
|
|
12
|
+
calendar: "gregory",
|
|
13
|
+
numberingSystem: "latn",
|
|
14
|
+
era: "short",
|
|
15
|
+
year: "numeric",
|
|
16
|
+
month: "2-digit",
|
|
17
|
+
day: "2-digit",
|
|
18
|
+
hourCycle: "h23",
|
|
19
|
+
hour: "2-digit",
|
|
20
|
+
minute: "2-digit",
|
|
21
|
+
second: "2-digit",
|
|
22
|
+
fractionalSecondDigits: 3
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
throw new RangeError("Invalid IANA time zone");
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
function wallTimeMilliseconds(formatter, epochMilliseconds) {
|
|
30
|
+
const parts = Object.fromEntries(formatter.formatToParts(epochMilliseconds).map(({ type, value }) => [type, value]));
|
|
31
|
+
const year = Number(parts.year);
|
|
32
|
+
// setUTCFullYear preserves years 0–99 and permits probing just outside the public range.
|
|
33
|
+
const date = new Date(0);
|
|
34
|
+
date.setUTCFullYear(parts.era === "BC" ? 1 - year : year, Number(parts.month) - 1, Number(parts.day));
|
|
35
|
+
date.setUTCHours(Number(parts.hour), Number(parts.minute), Number(parts.second), Number(parts.fractionalSecond));
|
|
36
|
+
return date.getTime();
|
|
37
|
+
}
|
|
38
|
+
/** Returns YYYY-MM-DDTHH:mm:ss.SSS in the specified zone. */
|
|
39
|
+
export function toLocalDateTime(instant, timeZone) {
|
|
40
|
+
const milliseconds = Date.parse(parseUtcInstant(instant));
|
|
41
|
+
const wallTime = wallTimeMilliseconds(zoneFormatter(timeZone), milliseconds);
|
|
42
|
+
return serializeUtcInstant(new Date(wallTime)).slice(0, -1);
|
|
43
|
+
}
|
|
44
|
+
/** Resolves a wall time. In a gap, earlier/later shift it backward/forward by the offset change. */
|
|
45
|
+
export function fromLocalDateTime(localDateTime, timeZone, resolution) {
|
|
46
|
+
if (resolution !== "reject" && resolution !== "earlier" && resolution !== "later") {
|
|
47
|
+
throw new RangeError("Invalid DST resolution");
|
|
48
|
+
}
|
|
49
|
+
if (typeof localDateTime !== "string" || localDateTime.length !== 23) {
|
|
50
|
+
throw new RangeError("Invalid local date and time");
|
|
51
|
+
}
|
|
52
|
+
const wallTime = Date.parse(parseUtcInstant(localDateTime + "Z"));
|
|
53
|
+
const formatter = zoneFormatter(timeZone);
|
|
54
|
+
// IANA offsets fit inside one day. Sample on both sides of the transition
|
|
55
|
+
// so folds and gaps use the actual offsets, including historical changes.
|
|
56
|
+
const offsets = new Set([wallTime - DAY_MS, wallTime, wallTime + DAY_MS].map((probe) => wallTimeMilliseconds(formatter, probe) - probe));
|
|
57
|
+
const candidates = [...offsets].map((offset) => wallTime - offset).sort((a, b) => a - b);
|
|
58
|
+
const matches = candidates.filter((candidate) => wallTimeMilliseconds(formatter, candidate) === wallTime);
|
|
59
|
+
if (matches.length === 1)
|
|
60
|
+
return serializeUtcInstant(new Date(matches[0]));
|
|
61
|
+
if (resolution === "reject") {
|
|
62
|
+
throw new RangeError(matches.length === 0 ? "Nonexistent local date and time" : "Ambiguous local date and time");
|
|
63
|
+
}
|
|
64
|
+
const choices = matches.length === 0 ? candidates : matches;
|
|
65
|
+
const resolved = resolution === "earlier" ? choices[0] : choices[choices.length - 1];
|
|
66
|
+
return serializeUtcInstant(new Date(resolved));
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=time-zone.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time-zone.js","sourceRoot":"","sources":["../../src/dates/time-zone.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAmB,MAAM,cAAc,CAAC;AAIrF,MAAM,MAAM,GAAG,UAAU,CAAC;AAE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,QAAQ,CAAC,CAAC,CAAC;AACjD,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,8 +3,11 @@ export * from "./authorization/index.js";
|
|
|
3
3
|
export * from "./capabilities/index.js";
|
|
4
4
|
export * from "./clinical-operations.js";
|
|
5
5
|
export * from "./config.js";
|
|
6
|
+
export * from "./consent/index.js";
|
|
7
|
+
export * from "./dates/index.js";
|
|
6
8
|
export * from "./ids.js";
|
|
7
9
|
export * from "./jwt.js";
|
|
10
|
+
export * from "./organization/index.js";
|
|
8
11
|
export * from "./phi-redaction.js";
|
|
9
12
|
export * from "./stable-json.js";
|
|
10
13
|
export * from "./worker-logger.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -3,8 +3,11 @@ export * from "./authorization/index.js";
|
|
|
3
3
|
export * from "./capabilities/index.js";
|
|
4
4
|
export * from "./clinical-operations.js";
|
|
5
5
|
export * from "./config.js";
|
|
6
|
+
export * from "./consent/index.js";
|
|
7
|
+
export * from "./dates/index.js";
|
|
6
8
|
export * from "./ids.js";
|
|
7
9
|
export * from "./jwt.js";
|
|
10
|
+
export * from "./organization/index.js";
|
|
8
11
|
export * from "./phi-redaction.js";
|
|
9
12
|
export * from "./stable-json.js";
|
|
10
13
|
export * from "./worker-logger.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/** Organization kinds shared by attribute consumers; no kind grants attributes. */
|
|
2
|
+
export declare const ORGANIZATION_KINDS: readonly ["tenant", "hospital", "site", "department", "service", "unit", "customer", "supplier", "manufacturer", "insurer"];
|
|
3
|
+
export type OrganizationKind = typeof ORGANIZATION_KINDS[number];
|
|
4
|
+
export type OrganizationAttributeFamily = "flow" | "administrative";
|
|
5
|
+
export type OrganizationAttributeStatus = "active" | "deprecated";
|
|
6
|
+
declare const definitions: readonly [{
|
|
7
|
+
readonly key: "board-host";
|
|
8
|
+
readonly family: "flow";
|
|
9
|
+
readonly label: "Anfitrión de comité";
|
|
10
|
+
readonly description: "Identifica organizaciones con agendas para comité médico y listado de citas.";
|
|
11
|
+
readonly allowedKinds: readonly ["hospital", "site", "department", "service", "unit"];
|
|
12
|
+
}, {
|
|
13
|
+
readonly key: "patient-admission";
|
|
14
|
+
readonly family: "flow";
|
|
15
|
+
readonly label: "Admisión de paciente";
|
|
16
|
+
readonly description: "Identifica organizaciones para admisión de pacientes y selección de agendas de admisión y destinos de traslado.";
|
|
17
|
+
readonly allowedKinds: readonly ["hospital", "site", "department", "service", "unit"];
|
|
18
|
+
}, {
|
|
19
|
+
readonly key: "patient-transfer";
|
|
20
|
+
readonly family: "flow";
|
|
21
|
+
readonly label: "Traslado de paciente";
|
|
22
|
+
readonly description: "Declara la intención de participar en traslados; no se acreditó un consumidor funcional de esta clave.";
|
|
23
|
+
readonly allowedKinds: readonly ["hospital", "site", "department", "service", "unit"];
|
|
24
|
+
}, {
|
|
25
|
+
readonly key: "schedule-appointment";
|
|
26
|
+
readonly family: "flow";
|
|
27
|
+
readonly label: "Agenda cita";
|
|
28
|
+
readonly description: "Identifica organizaciones con agendas para citas y actividades de cita del flujo de atención.";
|
|
29
|
+
readonly allowedKinds: readonly ["hospital", "site", "department", "service", "unit"];
|
|
30
|
+
}, {
|
|
31
|
+
readonly key: "schedule-procedure";
|
|
32
|
+
readonly family: "flow";
|
|
33
|
+
readonly label: "Agenda procedimiento";
|
|
34
|
+
readonly description: "Identifica organizaciones con agendas para procedimientos y sus actividades del flujo de atención.";
|
|
35
|
+
readonly allowedKinds: readonly ["hospital", "site", "department", "service", "unit"];
|
|
36
|
+
}, {
|
|
37
|
+
readonly key: "schedule-reception";
|
|
38
|
+
readonly family: "flow";
|
|
39
|
+
readonly label: "Agenda recepción";
|
|
40
|
+
readonly description: "Identifica organizaciones con agendas de recepción; es independiente de la capacidad física de una ubicación.";
|
|
41
|
+
readonly allowedKinds: readonly ["hospital", "site", "department", "service", "unit"];
|
|
42
|
+
}, {
|
|
43
|
+
readonly key: "accounts-payable";
|
|
44
|
+
readonly family: "administrative";
|
|
45
|
+
readonly label: "Cuentas por pagar";
|
|
46
|
+
readonly description: "Declara operación de cuentas por pagar; no se acreditó un control operativo basado en esta clave.";
|
|
47
|
+
readonly allowedKinds: readonly ["tenant", "hospital", "site", "department", "service", "unit"];
|
|
48
|
+
}, {
|
|
49
|
+
readonly key: "accounts-receivable";
|
|
50
|
+
readonly family: "administrative";
|
|
51
|
+
readonly label: "Cuentas por cobrar";
|
|
52
|
+
readonly description: "Declara operación de cuentas por cobrar; no se acreditó un control operativo basado en esta clave.";
|
|
53
|
+
readonly allowedKinds: readonly ["tenant", "hospital", "site", "department", "service", "unit"];
|
|
54
|
+
}, {
|
|
55
|
+
readonly key: "budgets";
|
|
56
|
+
readonly family: "administrative";
|
|
57
|
+
readonly label: "Presupuestos";
|
|
58
|
+
readonly description: "Declara operación de presupuestos de la organización; es independiente de la emisión fiscal y no acredita por sí sola autorización para cotizar.";
|
|
59
|
+
readonly allowedKinds: readonly ["tenant", "hospital", "site", "department", "service", "unit"];
|
|
60
|
+
}, {
|
|
61
|
+
readonly key: "cases";
|
|
62
|
+
readonly family: "administrative";
|
|
63
|
+
readonly label: "Casos";
|
|
64
|
+
readonly description: "Identifica organizaciones operadoras de casos en recepción y admisión, con condiciones clínicas evaluadas por separado.";
|
|
65
|
+
readonly allowedKinds: readonly ["tenant", "hospital", "site", "department", "service", "unit"];
|
|
66
|
+
}, {
|
|
67
|
+
readonly key: "coverages";
|
|
68
|
+
readonly family: "administrative";
|
|
69
|
+
readonly label: "Coberturas";
|
|
70
|
+
readonly description: "Declara operación de coberturas; no acredita que una contraparte aseguradora sea la organización operadora.";
|
|
71
|
+
readonly allowedKinds: readonly ["tenant", "hospital", "site", "department", "service", "unit"];
|
|
72
|
+
}, {
|
|
73
|
+
readonly key: "fiscal-documents";
|
|
74
|
+
readonly family: "administrative";
|
|
75
|
+
readonly label: "Documentos fiscales";
|
|
76
|
+
readonly description: "Declara operación de documentos fiscales; no acredita por sí sola autorización para facturar o cotizar.";
|
|
77
|
+
readonly allowedKinds: readonly ["tenant", "hospital", "site", "department", "service", "unit"];
|
|
78
|
+
}, {
|
|
79
|
+
readonly key: "inventory";
|
|
80
|
+
readonly family: "administrative";
|
|
81
|
+
readonly label: "Inventario";
|
|
82
|
+
readonly description: "Declara operación de inventario; permisos de usuario y pertenencia a almacenes se evalúan por separado.";
|
|
83
|
+
readonly allowedKinds: readonly ["tenant", "hospital", "site", "department", "service", "unit"];
|
|
84
|
+
}, {
|
|
85
|
+
readonly key: "payments";
|
|
86
|
+
readonly family: "administrative";
|
|
87
|
+
readonly label: "Pagos";
|
|
88
|
+
readonly description: "Declara operación de pagos; no se acreditó un control operativo común basado en esta clave.";
|
|
89
|
+
readonly allowedKinds: readonly ["tenant", "hospital", "site", "department", "service", "unit"];
|
|
90
|
+
}, {
|
|
91
|
+
readonly key: "professional-fees";
|
|
92
|
+
readonly family: "administrative";
|
|
93
|
+
readonly label: "Honorarios profesionales";
|
|
94
|
+
readonly description: "Declara operación de honorarios profesionales; no se acreditó un consumidor funcional de esta clave.";
|
|
95
|
+
readonly allowedKinds: readonly ["tenant", "hospital", "site", "department", "service", "unit"];
|
|
96
|
+
}, {
|
|
97
|
+
readonly key: "treasury";
|
|
98
|
+
readonly family: "administrative";
|
|
99
|
+
readonly label: "Tesorería";
|
|
100
|
+
readonly description: "Declara operación de tesorería; los permisos de usuario siguen siendo una dimensión independiente.";
|
|
101
|
+
readonly allowedKinds: readonly ["tenant", "hospital", "site", "department", "service", "unit"];
|
|
102
|
+
}];
|
|
103
|
+
export type OrganizationAttributeKey = typeof definitions[number]["key"];
|
|
104
|
+
export interface OrganizationAttributeDefinition {
|
|
105
|
+
readonly key: OrganizationAttributeKey;
|
|
106
|
+
readonly family: OrganizationAttributeFamily;
|
|
107
|
+
/** es-CL label from the legacy snapshot or an explicit owner decision. */
|
|
108
|
+
readonly label: string;
|
|
109
|
+
readonly description: string;
|
|
110
|
+
readonly allowedKinds: readonly OrganizationKind[];
|
|
111
|
+
readonly status: OrganizationAttributeStatus;
|
|
112
|
+
/** Required attribute keys, not external workflow prerequisites. None are established yet. */
|
|
113
|
+
readonly dependencies: readonly OrganizationAttributeKey[];
|
|
114
|
+
}
|
|
115
|
+
/** All entries are active, but none are assigned by default. Deeply frozen. */
|
|
116
|
+
export declare const ORGANIZATION_ATTRIBUTE_CATALOG: readonly OrganizationAttributeDefinition[];
|
|
117
|
+
/** Canonical ASCII lexicographic order, also used by normalizeOrganizationAttributes. */
|
|
118
|
+
export declare const ORGANIZATION_ATTRIBUTE_KEYS: readonly OrganizationAttributeKey[];
|
|
119
|
+
export declare function isOrganizationKind(value: unknown): value is OrganizationKind;
|
|
120
|
+
export declare function isOrganizationAttributeKey(value: unknown): value is OrganizationAttributeKey;
|
|
121
|
+
export declare function getOrganizationAttribute(value: unknown): OrganizationAttributeDefinition | undefined;
|
|
122
|
+
export type OrganizationAttributesErrorCode = "invalid-kind" | "invalid-list" | "unknown-attribute" | "duplicate-attribute" | "attribute-not-allowed";
|
|
123
|
+
export type OrganizationAttributesResult = {
|
|
124
|
+
readonly ok: true;
|
|
125
|
+
readonly attributes: readonly OrganizationAttributeKey[];
|
|
126
|
+
} | {
|
|
127
|
+
readonly ok: false;
|
|
128
|
+
readonly code: OrganizationAttributesErrorCode;
|
|
129
|
+
readonly index?: number;
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* Validate the complete resulting set, including after a kind change.
|
|
133
|
+
* Accept only dense own data arrays bounded by the catalog size. No coercion,
|
|
134
|
+
* getters, aliases, silent deduplication, defaults or inherited attributes.
|
|
135
|
+
* Return the first stable error without echoing caller data. Never throws.
|
|
136
|
+
*/
|
|
137
|
+
export declare function validateOrganizationAttributes(kind: unknown, value: unknown): OrganizationAttributesResult;
|
|
138
|
+
/** Validate first, then sort a fresh frozen array; never changes caller input. */
|
|
139
|
+
export declare function normalizeOrganizationAttributes(kind: unknown, value: unknown): OrganizationAttributesResult;
|
|
140
|
+
export {};
|
|
141
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/organization/index.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,eAAO,MAAM,kBAAkB,6HAGpB,CAAC;AAEZ,MAAM,MAAM,gBAAgB,GAAG,OAAO,kBAAkB,CAAC,MAAM,CAAC,CAAC;AACjE,MAAM,MAAM,2BAA2B,GAAG,MAAM,GAAG,gBAAgB,CAAC;AACpE,MAAM,MAAM,2BAA2B,GAAG,QAAQ,GAAG,YAAY,CAAC;AAYlE,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBP,CAAC;AAEX,MAAM,MAAM,wBAAwB,GAAG,OAAO,WAAW,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC;AAEzE,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,GAAG,EAAE,wBAAwB,CAAC;IACvC,QAAQ,CAAC,MAAM,EAAE,2BAA2B,CAAC;IAC7C,0EAA0E;IAC1E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,YAAY,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACnD,QAAQ,CAAC,MAAM,E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"tenant", "hospital", "site", "department", "service", "unit",
|
|
4
|
+
"customer", "supplier", "manufacturer", "insurer"
|
|
5
|
+
]);
|
|
6
|
+
const clinicalKinds = Object.freeze([
|
|
7
|
+
"hospital", "site", "department", "service", "unit"
|
|
8
|
+
]);
|
|
9
|
+
const administrativeKinds = Object.freeze([
|
|
10
|
+
"tenant", ...clinicalKinds
|
|
11
|
+
]);
|
|
12
|
+
const noDependencies = Object.freeze([]);
|
|
13
|
+
// Labels: legacy snapshot 2026-06-14, except budgets (owner decision WP #1310).
|
|
14
|
+
// Descriptions express catalog intent, never proof of an implemented authorization guard.
|
|
15
|
+
const definitions = [
|
|
16
|
+
{ key: "board-host", family: "flow", label: "Anfitrión de comité", description: "Identifica organizaciones con agendas para comité médico y listado de citas.", allowedKinds: clinicalKinds },
|
|
17
|
+
{ key: "patient-admission", family: "flow", label: "Admisión de paciente", description: "Identifica organizaciones para admisión de pacientes y selección de agendas de admisión y destinos de traslado.", allowedKinds: clinicalKinds },
|
|
18
|
+
{ key: "patient-transfer", family: "flow", label: "Traslado de paciente", description: "Declara la intención de participar en traslados; no se acreditó un consumidor funcional de esta clave.", allowedKinds: clinicalKinds },
|
|
19
|
+
{ key: "schedule-appointment", family: "flow", label: "Agenda cita", description: "Identifica organizaciones con agendas para citas y actividades de cita del flujo de atención.", allowedKinds: clinicalKinds },
|
|
20
|
+
{ key: "schedule-procedure", family: "flow", label: "Agenda procedimiento", description: "Identifica organizaciones con agendas para procedimientos y sus actividades del flujo de atención.", allowedKinds: clinicalKinds },
|
|
21
|
+
{ key: "schedule-reception", family: "flow", label: "Agenda recepción", description: "Identifica organizaciones con agendas de recepción; es independiente de la capacidad física de una ubicación.", allowedKinds: clinicalKinds },
|
|
22
|
+
{ key: "accounts-payable", family: "administrative", label: "Cuentas por pagar", description: "Declara operación de cuentas por pagar; no se acreditó un control operativo basado en esta clave.", allowedKinds: administrativeKinds },
|
|
23
|
+
{ key: "accounts-receivable", family: "administrative", label: "Cuentas por cobrar", description: "Declara operación de cuentas por cobrar; no se acreditó un control operativo basado en esta clave.", allowedKinds: administrativeKinds },
|
|
24
|
+
{ key: "budgets", family: "administrative", label: "Presupuestos", description: "Declara operación de presupuestos de la organización; es independiente de la emisión fiscal y no acredita por sí sola autorización para cotizar.", allowedKinds: administrativeKinds },
|
|
25
|
+
{ key: "cases", family: "administrative", label: "Casos", description: "Identifica organizaciones operadoras de casos en recepción y admisión, con condiciones clínicas evaluadas por separado.", allowedKinds: administrativeKinds },
|
|
26
|
+
{ key: "coverages", family: "administrative", label: "Coberturas", description: "Declara operación de coberturas; no acredita que una contraparte aseguradora sea la organización operadora.", allowedKinds: administrativeKinds },
|
|
27
|
+
{ key: "fiscal-documents", family: "administrative", label: "Documentos fiscales", description: "Declara operación de documentos fiscales; no acredita por sí sola autorización para facturar o cotizar.", allowedKinds: administrativeKinds },
|
|
28
|
+
{ key: "inventory", family: "administrative", label: "Inventario", description: "Declara operación de inventario; permisos de usuario y pertenencia a almacenes se evalúan por separado.", allowedKinds: administrativeKinds },
|
|
29
|
+
{ key: "payments", family: "administrative", label: "Pagos", description: "Declara operación de pagos; no se acreditó un control operativo común basado en esta clave.", allowedKinds: administrativeKinds },
|
|
30
|
+
{ key: "professional-fees", family: "administrative", label: "Honorarios profesionales", description: "Declara operación de honorarios profesionales; no se acreditó un consumidor funcional de esta clave.", allowedKinds: administrativeKinds },
|
|
31
|
+
{ key: "treasury", family: "administrative", label: "Tesorería", description: "Declara operación de tesorería; los permisos de usuario siguen siendo una dimensión independiente.", allowedKinds: administrativeKinds }
|
|
32
|
+
];
|
|
33
|
+
/** All entries are active, but none are assigned by default. Deeply frozen. */
|
|
34
|
+
export const ORGANIZATION_ATTRIBUTE_CATALOG = Object.freeze(definitions.map((entry) => Object.freeze({ ...entry, status: "active", dependencies: noDependencies })));
|
|
35
|
+
/** Canonical ASCII lexicographic order, also used by normalizeOrganizationAttributes. */
|
|
36
|
+
export const ORGANIZATION_ATTRIBUTE_KEYS = Object.freeze(definitions.map((entry) => entry.key).sort());
|
|
37
|
+
export function isOrganizationKind(value) {
|
|
38
|
+
return typeof value === "string" && ORGANIZATION_KINDS.some((kind) => kind === value);
|
|
39
|
+
}
|
|
40
|
+
export function isOrganizationAttributeKey(value) {
|
|
41
|
+
return typeof value === "string" && ORGANIZATION_ATTRIBUTE_KEYS.some((key) => key === value);
|
|
42
|
+
}
|
|
43
|
+
export function getOrganizationAttribute(value) {
|
|
44
|
+
return ORGANIZATION_ATTRIBUTE_CATALOG.find((entry) => entry.key === value);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Validate the complete resulting set, including after a kind change.
|
|
48
|
+
* Accept only dense own data arrays bounded by the catalog size. No coercion,
|
|
49
|
+
* getters, aliases, silent deduplication, defaults or inherited attributes.
|
|
50
|
+
* Return the first stable error without echoing caller data. Never throws.
|
|
51
|
+
*/
|
|
52
|
+
export function validateOrganizationAttributes(kind, value) {
|
|
53
|
+
if (!isOrganizationKind(kind))
|
|
54
|
+
return { ok: false, code: "invalid-kind" };
|
|
55
|
+
try {
|
|
56
|
+
if (!Array.isArray(value))
|
|
57
|
+
return { ok: false, code: "invalid-list" };
|
|
58
|
+
const lengthDescriptor = Object.getOwnPropertyDescriptor(value, "length");
|
|
59
|
+
const length = lengthDescriptor?.value;
|
|
60
|
+
if (typeof length !== "number" || !Number.isInteger(length) || length < 0 || length > ORGANIZATION_ATTRIBUTE_KEYS.length) {
|
|
61
|
+
return { ok: false, code: "invalid-list" };
|
|
62
|
+
}
|
|
63
|
+
const attributes = [];
|
|
64
|
+
const seen = new Set();
|
|
65
|
+
for (let index = 0; index < length; index += 1) {
|
|
66
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, String(index));
|
|
67
|
+
if (!descriptor || !("value" in descriptor))
|
|
68
|
+
return { ok: false, code: "invalid-list", index };
|
|
69
|
+
const key = descriptor.value;
|
|
70
|
+
if (!isOrganizationAttributeKey(key))
|
|
71
|
+
return { ok: false, code: "unknown-attribute", index };
|
|
72
|
+
if (seen.has(key))
|
|
73
|
+
return { ok: false, code: "duplicate-attribute", index };
|
|
74
|
+
const definition = getOrganizationAttribute(key);
|
|
75
|
+
if (!definition.allowedKinds.includes(kind))
|
|
76
|
+
return { ok: false, code: "attribute-not-allowed", index };
|
|
77
|
+
seen.add(key);
|
|
78
|
+
attributes.push(key);
|
|
79
|
+
}
|
|
80
|
+
return { ok: true, attributes: Object.freeze(attributes) };
|
|
81
|
+
}
|
|
82
|
+
catch {
|
|
83
|
+
return { ok: false, code: "invalid-list" };
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
/** Validate first, then sort a fresh frozen array; never changes caller input. */
|
|
87
|
+
export function normalizeOrganizationAttributes(kind, value) {
|
|
88
|
+
const result = validateOrganizationAttributes(kind, value);
|
|
89
|
+
if (!result.ok)
|
|
90
|
+
return result;
|
|
91
|
+
return { ok: true, attributes: Object.freeze([...result.attributes].sort()) };
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/organization/index.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC9C,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM;IAC7D,UAAU,EAAE,UAAU,EAAE,cAAc,EAAE,SAAS;CACzC,CAAC,CAAC;AAMZ,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC;IAClC,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM;CACL,CAAC,CAAC;AAClD,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC;IACxC,QAAQ,EAAE,GAAG,aAAa;CACoB,CAAC,CAAC;AAClD,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,EAAW,CAAC,CAAC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AI,EAAE,uBAAuB,EAAE,KAAK,EAAE,CAAC;YACxG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACd,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACvB,CAAC;QACD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC;IAC7D,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;IAC7C,CAAC;AACH,CAAC;AAED,kFAAkF;AAClF,MAAM,UAAU,+BAA+B,CAAC,IAAa,EAAE,KAAc;IAC3E,MAAM,MAAM,GAAG,8BAA8B,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC3D,IAAI,CAAC,MAAM,CAAC,EAAE;QAAE,OAAO,MAAM,CAAC;IAC9B,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC;AAChF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pegasimed.com/pegasi-sail-connect-shared",
|
|
3
|
-
"version": "0.2.0-dev.
|
|
3
|
+
"version": "0.2.0-dev.40",
|
|
4
4
|
"description": "Versioned shared TypeScript helpers for PEGASI SAIL/CONNECT services.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -34,6 +34,10 @@
|
|
|
34
34
|
"types": "./dist/clinical-operations.d.ts",
|
|
35
35
|
"import": "./dist/clinical-operations.js"
|
|
36
36
|
},
|
|
37
|
+
"./dates": {
|
|
38
|
+
"types": "./dist/dates/index.d.ts",
|
|
39
|
+
"import": "./dist/dates/index.js"
|
|
40
|
+
},
|
|
37
41
|
"./jwt": {
|
|
38
42
|
"types": "./dist/jwt.d.ts",
|
|
39
43
|
"import": "./dist/jwt.js"
|
|
@@ -57,6 +61,18 @@
|
|
|
57
61
|
"./authorization": {
|
|
58
62
|
"types": "./dist/authorization/index.d.ts",
|
|
59
63
|
"import": "./dist/authorization/index.js"
|
|
64
|
+
},
|
|
65
|
+
"./authorization/testing": {
|
|
66
|
+
"types": "./dist/authorization-testing.d.ts",
|
|
67
|
+
"import": "./dist/authorization-testing.js"
|
|
68
|
+
},
|
|
69
|
+
"./consent": {
|
|
70
|
+
"types": "./dist/consent/index.d.ts",
|
|
71
|
+
"import": "./dist/consent/index.js"
|
|
72
|
+
},
|
|
73
|
+
"./organization": {
|
|
74
|
+
"types": "./dist/organization/index.d.ts",
|
|
75
|
+
"import": "./dist/organization/index.js"
|
|
60
76
|
}
|
|
61
77
|
},
|
|
62
78
|
"files": [
|