@crvouga/mockingbird-service-junction 3.4.0 → 3.5.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 +6 -0
- package/DISCOVERY.md +2 -0
- package/README.md +27 -19
- package/SUPPORT.md +1 -1
- package/dist/{chunk-SN6QTJKH.js → chunk-KMCP67GK.js} +85 -13
- package/dist/{chunk-SN6QTJKH.js.map → chunk-KMCP67GK.js.map} +2 -2
- package/dist/{chunk-ZTMQ5RIL.js → chunk-Y477MTXC.js} +3 -3
- package/dist/cli.js +2 -2
- package/dist/index.d.ts +74 -61
- package/dist/index.js +1 -1
- package/dist/server.d.ts +43 -30
- package/dist/server.js +2 -2
- package/openapi.yaml +2 -2
- package/package.json +4 -2
- /package/dist/{chunk-ZTMQ5RIL.js.map → chunk-Y477MTXC.js.map} +0 -0
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
pullCorpus,
|
|
12
12
|
resolveAdminPrefix,
|
|
13
13
|
restoreClock
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-KMCP67GK.js";
|
|
15
15
|
import {
|
|
16
16
|
defaultCorpus
|
|
17
17
|
} from "./chunk-2FZJPMTR.js";
|
|
@@ -2982,7 +2982,7 @@ async function preflightFleet(config, options) {
|
|
|
2982
2982
|
break;
|
|
2983
2983
|
}
|
|
2984
2984
|
}
|
|
2985
|
-
targets.set(name, { ...target, packageVersion: packageVersion ?? "3.
|
|
2985
|
+
targets.set(name, { ...target, packageVersion: packageVersion ?? "3.5.0" });
|
|
2986
2986
|
} catch (error) {
|
|
2987
2987
|
throw new Error(`service ${name}: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
|
|
2988
2988
|
}
|
|
@@ -4945,4 +4945,4 @@ export {
|
|
|
4945
4945
|
createServer2 as createServer,
|
|
4946
4946
|
serveTarget
|
|
4947
4947
|
};
|
|
4948
|
-
//# sourceMappingURL=chunk-
|
|
4948
|
+
//# sourceMappingURL=chunk-Y477MTXC.js.map
|
package/dist/cli.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
runCli,
|
|
5
5
|
serveCommand,
|
|
6
6
|
serveTarget
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-Y477MTXC.js";
|
|
8
8
|
import {
|
|
9
9
|
DEFAULT_JUNCTION_BASE_URL,
|
|
10
10
|
createRuntime,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
isSandboxKey,
|
|
13
13
|
pullCorpus,
|
|
14
14
|
verifyAgainstReal
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-KMCP67GK.js";
|
|
16
16
|
import {
|
|
17
17
|
defaultCorpus
|
|
18
18
|
} from "./chunk-2FZJPMTR.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,65 @@
|
|
|
1
1
|
import { Hono } from 'hono';
|
|
2
2
|
|
|
3
|
+
type LabAccountStatus = "active" | "pending" | "suspended" | "ready_to_launch";
|
|
4
|
+
type LabAccountDelegatedFlow = "order_delegated" | "result_delegated" | "fully_delegated" | "not_delegated";
|
|
5
|
+
type LabAccountRecord = {
|
|
6
|
+
id: string;
|
|
7
|
+
lab: string;
|
|
8
|
+
org_id: string | null;
|
|
9
|
+
status: LabAccountStatus;
|
|
10
|
+
delegated_flow: LabAccountDelegatedFlow;
|
|
11
|
+
provider_account_id: string;
|
|
12
|
+
account_name: string | null;
|
|
13
|
+
default_clinical_notes: string | null;
|
|
14
|
+
business_units: string[] | null;
|
|
15
|
+
allowed_billing: Record<string, readonly string[]>;
|
|
16
|
+
team_id_allowlist: readonly string[];
|
|
17
|
+
};
|
|
18
|
+
/** The 50 `USState` values from the docs, alphabetical by state name. */
|
|
19
|
+
declare const US_STATES: readonly string[];
|
|
20
|
+
/** `billing_type` values the vendored create-order body accepts. */
|
|
21
|
+
declare const BILLING_TYPES: readonly ["client_bill", "commercial_insurance", "patient_bill_passthrough", "patient_bill", "upfront_payment"];
|
|
22
|
+
type BillingType = (typeof BILLING_TYPES)[number];
|
|
23
|
+
/** A team the mock is not, for fixtures that model another team's account. */
|
|
24
|
+
declare const OTHER_TEAM_ID: string;
|
|
25
|
+
declare const TEAM_LAB_ACCOUNTS: readonly LabAccountRecord[];
|
|
26
|
+
/**
|
|
27
|
+
* Whether `teamId` may use an account. An empty `team_id_allowlist` counts as linked:
|
|
28
|
+
* a real team's listing returns such accounts (Junction's own Quest, Labcorp and
|
|
29
|
+
* BioReference accounts carry `[]`), and the sandbox places an order that names one by id
|
|
30
|
+
* (corpus/lab-account-probes.json), so the mock treats them as the team's.
|
|
31
|
+
*/
|
|
32
|
+
declare const isLinkedToTeam: (entry: LabAccountRecord, teamId: string) => boolean;
|
|
33
|
+
type LabAccountOmissionPolicy = "platform" | "reject";
|
|
34
|
+
/**
|
|
35
|
+
* A lab account as a consumer configures it. Mirrors `ClientFacingLabAccount`, with
|
|
36
|
+
* every field but `id` and `lab` optional, plus a `states` shorthand for the common
|
|
37
|
+
* case of an account that client-bills in a fixed set of states.
|
|
38
|
+
*/
|
|
39
|
+
type LabAccountInput = {
|
|
40
|
+
id: string;
|
|
41
|
+
/** Lab slug, e.g. `"quest"`, `"labcorp"`, `"bioreference"`. */
|
|
42
|
+
lab: string;
|
|
43
|
+
status?: LabAccountStatus;
|
|
44
|
+
delegated_flow?: LabAccountDelegatedFlow;
|
|
45
|
+
account_name?: string | null;
|
|
46
|
+
provider_account_id?: string;
|
|
47
|
+
org_id?: string | null;
|
|
48
|
+
business_units?: string[] | null;
|
|
49
|
+
default_clinical_notes?: string | null;
|
|
50
|
+
/** Billing type → states it is allowed in. Takes precedence over `states`. */
|
|
51
|
+
allowed_billing?: Record<string, readonly string[]>;
|
|
52
|
+
/** Shorthand for `allowed_billing: { client_bill: states }`. Default: every state. */
|
|
53
|
+
states?: readonly string[];
|
|
54
|
+
/** Teams the account is linked to. Default: the configured team, so it is selectable. */
|
|
55
|
+
team_id_allowlist?: readonly string[];
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Normalize a consumer's configuration into the record the ordering rules read.
|
|
59
|
+
* `teamId` is the default allowlist, so an account is selectable unless told otherwise.
|
|
60
|
+
*/
|
|
61
|
+
declare const labAccountFromInput: (input: LabAccountInput, teamId?: string) => LabAccountRecord;
|
|
62
|
+
|
|
3
63
|
type MountedAPI = FetchAPI$1 & {
|
|
4
64
|
readonly prefix: string;
|
|
5
65
|
GET: FetchHandler;
|
|
@@ -1242,65 +1302,6 @@ interface FetchAPI {
|
|
|
1242
1302
|
fetch(request: Request): Promise<Response>;
|
|
1243
1303
|
}
|
|
1244
1304
|
|
|
1245
|
-
type LabAccountStatus = "active" | "pending" | "suspended" | "ready_to_launch";
|
|
1246
|
-
type LabAccountDelegatedFlow = "order_delegated" | "result_delegated" | "fully_delegated" | "not_delegated";
|
|
1247
|
-
type LabAccountRecord = {
|
|
1248
|
-
id: string;
|
|
1249
|
-
lab: string;
|
|
1250
|
-
org_id: string | null;
|
|
1251
|
-
status: LabAccountStatus;
|
|
1252
|
-
delegated_flow: LabAccountDelegatedFlow;
|
|
1253
|
-
provider_account_id: string;
|
|
1254
|
-
account_name: string | null;
|
|
1255
|
-
default_clinical_notes: string | null;
|
|
1256
|
-
business_units: string[] | null;
|
|
1257
|
-
allowed_billing: Record<string, readonly string[]>;
|
|
1258
|
-
team_id_allowlist: readonly string[];
|
|
1259
|
-
};
|
|
1260
|
-
/** The 50 `USState` values from the docs, alphabetical by state name. */
|
|
1261
|
-
declare const US_STATES: readonly string[];
|
|
1262
|
-
/** `billing_type` values the vendored create-order body accepts. */
|
|
1263
|
-
declare const BILLING_TYPES: readonly ["client_bill", "commercial_insurance", "patient_bill_passthrough", "patient_bill", "upfront_payment"];
|
|
1264
|
-
type BillingType = (typeof BILLING_TYPES)[number];
|
|
1265
|
-
/** A team the mock is not, for fixtures that model another team's account. */
|
|
1266
|
-
declare const OTHER_TEAM_ID: string;
|
|
1267
|
-
declare const TEAM_LAB_ACCOUNTS: readonly LabAccountRecord[];
|
|
1268
|
-
/**
|
|
1269
|
-
* Whether `teamId` may use an account. An empty `team_id_allowlist` counts as linked:
|
|
1270
|
-
* a real team's listing returns such accounts (Junction's own Quest, Labcorp and
|
|
1271
|
-
* BioReference accounts carry `[]`), and the sandbox places an order that names one by id
|
|
1272
|
-
* (corpus/lab-account-probes.json), so the mock treats them as the team's.
|
|
1273
|
-
*/
|
|
1274
|
-
declare const isLinkedToTeam: (entry: LabAccountRecord, teamId: string) => boolean;
|
|
1275
|
-
/**
|
|
1276
|
-
* A lab account as a consumer configures it. Mirrors `ClientFacingLabAccount`, with
|
|
1277
|
-
* every field but `id` and `lab` optional, plus a `states` shorthand for the common
|
|
1278
|
-
* case of an account that client-bills in a fixed set of states.
|
|
1279
|
-
*/
|
|
1280
|
-
type LabAccountInput = {
|
|
1281
|
-
id: string;
|
|
1282
|
-
/** Lab slug, e.g. `"quest"`, `"labcorp"`, `"bioreference"`. */
|
|
1283
|
-
lab: string;
|
|
1284
|
-
status?: LabAccountStatus;
|
|
1285
|
-
delegated_flow?: LabAccountDelegatedFlow;
|
|
1286
|
-
account_name?: string | null;
|
|
1287
|
-
provider_account_id?: string;
|
|
1288
|
-
org_id?: string | null;
|
|
1289
|
-
business_units?: string[] | null;
|
|
1290
|
-
default_clinical_notes?: string | null;
|
|
1291
|
-
/** Billing type → states it is allowed in. Takes precedence over `states`. */
|
|
1292
|
-
allowed_billing?: Record<string, readonly string[]>;
|
|
1293
|
-
/** Shorthand for `allowed_billing: { client_bill: states }`. Default: every state. */
|
|
1294
|
-
states?: readonly string[];
|
|
1295
|
-
/** Teams the account is linked to. Default: the configured team, so it is selectable. */
|
|
1296
|
-
team_id_allowlist?: readonly string[];
|
|
1297
|
-
};
|
|
1298
|
-
/**
|
|
1299
|
-
* Normalize a consumer's configuration into the record the ordering rules read.
|
|
1300
|
-
* `teamId` is the default allowlist, so an account is selectable unless told otherwise.
|
|
1301
|
-
*/
|
|
1302
|
-
declare const labAccountFromInput: (input: LabAccountInput, teamId?: string) => LabAccountRecord;
|
|
1303
|
-
|
|
1304
1305
|
/**
|
|
1305
1306
|
* Named lab accounts a suite can add in one call, modelled on a real team's recorded
|
|
1306
1307
|
* listing (a BioReference-linked team, recorded 2026-09-21 from the Junction sandbox).
|
|
@@ -1852,6 +1853,8 @@ type JunctionRuntimeOptions = {
|
|
|
1852
1853
|
geo?: GeoMode;
|
|
1853
1854
|
/** The team's lab accounts, or `{ presets, accounts }`; see {@link JunctionAPIOptions.labAccounts}. */
|
|
1854
1855
|
labAccounts?: LabAccountLayout;
|
|
1856
|
+
/** Per-lab multiple-account omission policy; default platform. */
|
|
1857
|
+
labAccountOmissionPolicies?: Record<string, LabAccountOmissionPolicy>;
|
|
1855
1858
|
/** The team the mock answers as. Default: the corpus's recorded team, else a fixed id. */
|
|
1856
1859
|
teamId?: string;
|
|
1857
1860
|
/** Sandbox-only restrictions, every one off by default; per namespace via `PUT /__admin/limits`. */
|
|
@@ -2010,6 +2013,8 @@ type JunctionAPIOptions = APIOptions & {
|
|
|
2010
2013
|
* default, `client_bill`.
|
|
2011
2014
|
*/
|
|
2012
2015
|
defaultBillingTypes?: Partial<Record<string, BillingType>>;
|
|
2016
|
+
/** Per-lab multiple-account routing policy; defaults to platform fallback. */
|
|
2017
|
+
labAccountOmissionPolicies?: Record<string, LabAccountOmissionPolicy>;
|
|
2013
2018
|
/** Users and orders to load into every namespace, re-applied on every `reset()`. */
|
|
2014
2019
|
fixtures?: JunctionFixtures;
|
|
2015
2020
|
};
|
|
@@ -2073,7 +2078,10 @@ declare class JunctionAPI implements FetchAPI {
|
|
|
2073
2078
|
get limits(): JunctionLimits;
|
|
2074
2079
|
/** Change some limits (`null` lifts a numeric one); kept across `reset()`. */
|
|
2075
2080
|
configureLimits(input: JunctionLimitsInput): JunctionLimits;
|
|
2076
|
-
/**
|
|
2081
|
+
/** Multiple-account routing policy per lab, kept across reset. */
|
|
2082
|
+
get labAccountOmissionPolicies(): Record<string, LabAccountOmissionPolicy>;
|
|
2083
|
+
set labAccountOmissionPolicies(input: Record<string, LabAccountOmissionPolicy>);
|
|
2084
|
+
/** Lab slug → the billing type an order gets when omitted. Kept across reset. */
|
|
2077
2085
|
get defaultBillingTypes(): Record<string, BillingType>;
|
|
2078
2086
|
/** Replace the per-lab default billing types (`{}` restores `client_bill` everywhere). */
|
|
2079
2087
|
set defaultBillingTypes(input: Partial<Record<string, BillingType>>);
|
|
@@ -2101,6 +2109,11 @@ declare class JunctionAPI implements FetchAPI {
|
|
|
2101
2109
|
* only place the mock reports it.
|
|
2102
2110
|
*/
|
|
2103
2111
|
orderLabAccount(id: string): string | null | undefined;
|
|
2112
|
+
/** Frozen provider number used by the synthetic requisition; null means unknown. */
|
|
2113
|
+
requisitionFixture(id: string): {
|
|
2114
|
+
provider_account_id: string | null;
|
|
2115
|
+
} | undefined;
|
|
2116
|
+
installRequisitionFixture(id: string, providerAccountId: string | null): boolean;
|
|
2104
2117
|
/**
|
|
2105
2118
|
* Put an order straight into a status (a full `<status>.<method>.<event>` value) and
|
|
2106
2119
|
* publish the webhook a real transition would. `flags` takes the same keys as
|
|
@@ -2127,4 +2140,4 @@ declare class LabAccountConflict extends Error {
|
|
|
2127
2140
|
}
|
|
2128
2141
|
|
|
2129
2142
|
export { AVAILABILITY_ADDRESS, AVAILABILITY_START_DATE, BILLING_TYPES, COVERAGE_ZIPS, DEFAULT_JUNCTION_BASE_URL, DEFAULT_LIMITS, DELEGATED_ACCOUNT_STATES, FAULT_PRESETS, FixtureError, IDENTITY_MODES, JUNCTION_NAMESPACE, JunctionAPI, KNOWN_HEADER, LAB_ACCOUNT_PRESETS, LAB_ACCOUNT_PRESET_ALIASES, LabAccountConflict, MISS_HEADER, MOCK_TEAM_ID, ORDER_NOT_FOUND, ORDER_STATUSES_BY_METHOD, OTHER_TEAM_ID, PHLEBOTOMY_AVAILABILITY_ZIPS, PLATFORM_ACCOUNT_STATES, PSC_AVAILABILITY_ZIPS, PSC_LAB_IDS, RESULT_FIXTURES, SANDBOX_KEY_PREFIXES, SEALED_CORPUS_VERSION, SUPPORTED_SEALED_CORPUS_VERSIONS, SYNTHETIC_LAB_ACCOUNT_PRESETS, TEAM_LAB_ACCOUNTS, TRANSITION_ALIASES, UNKNOWN_ZIP_ERROR_TYPE, UNKNOWN_ZIP_STATUS, US_STATES, corpusLabel, createRuntime, createWebhookDispatcher, diffCorpus, document, fingerprintCorpus, isLinkedToTeam, isSandboxKey, labAccountFromInput, observationCacheKey, operationIds, parseSealedCorpus, prefetchCoverageObservations, presetAccountId, pullCorpus, reshapeCoverageGeoCommand, resolveTransition, sandboxUserQuotaBody, signSvix, supportedOperationIds, verifyAgainstReal, verifySvix };
|
|
2130
|
-
export type { BillingType, CorpusDiff, CorpusInfo, Divergence, FetchAPI, GeoMode, GetCacheEntry, IdentityMode, InsertOptions, JunctionAPIOptions, JunctionAdminOptions, JunctionFixtures, JunctionLimits, JunctionLimitsInput, JunctionRuntime, JunctionRuntimeOptions, JunctionWebhookEvent, JunctionWebhookOptions, LabAccountDelegatedFlow, LabAccountInput, LabAccountLayout, LabAccountRecord, LabAccountStatus, OperationId, OrderFixture, OrderRecord, PullCorpusOptions, ResultFixture, SealedCorpus, SeedObservations, SeedReport, SeedSource, SetDiff, SqliteClient, StoredLabAccount, SupportedOperationId, UserFixture, UserRecord, VerifyOptions, VerifyReport, WebhookAttempt, WebhookDelivery, WebhookDispatcher, WebhookEndpoint, WebhookPublisher };
|
|
2143
|
+
export type { BillingType, CorpusDiff, CorpusInfo, Divergence, FetchAPI, GeoMode, GetCacheEntry, IdentityMode, InsertOptions, JunctionAPIOptions, JunctionAdminOptions, JunctionFixtures, JunctionLimits, JunctionLimitsInput, JunctionRuntime, JunctionRuntimeOptions, JunctionWebhookEvent, JunctionWebhookOptions, LabAccountDelegatedFlow, LabAccountInput, LabAccountLayout, LabAccountOmissionPolicy, LabAccountRecord, LabAccountStatus, OperationId, OrderFixture, OrderRecord, PullCorpusOptions, ResultFixture, SealedCorpus, SeedObservations, SeedReport, SeedSource, SetDiff, SqliteClient, StoredLabAccount, SupportedOperationId, UserFixture, UserRecord, VerifyOptions, VerifyReport, WebhookAttempt, WebhookDelivery, WebhookDispatcher, WebhookEndpoint, WebhookPublisher };
|
package/dist/index.js
CHANGED
package/dist/server.d.ts
CHANGED
|
@@ -1897,6 +1897,36 @@ interface SqliteClient {
|
|
|
1897
1897
|
transaction<T>(fn: () => T): T;
|
|
1898
1898
|
}
|
|
1899
1899
|
|
|
1900
|
+
type LabAccountStatus = "active" | "pending" | "suspended" | "ready_to_launch";
|
|
1901
|
+
type LabAccountDelegatedFlow = "order_delegated" | "result_delegated" | "fully_delegated" | "not_delegated";
|
|
1902
|
+
/** `billing_type` values the vendored create-order body accepts. */
|
|
1903
|
+
declare const BILLING_TYPES: readonly ["client_bill", "commercial_insurance", "patient_bill_passthrough", "patient_bill", "upfront_payment"];
|
|
1904
|
+
type BillingType = (typeof BILLING_TYPES)[number];
|
|
1905
|
+
type LabAccountOmissionPolicy = "platform" | "reject";
|
|
1906
|
+
/**
|
|
1907
|
+
* A lab account as a consumer configures it. Mirrors `ClientFacingLabAccount`, with
|
|
1908
|
+
* every field but `id` and `lab` optional, plus a `states` shorthand for the common
|
|
1909
|
+
* case of an account that client-bills in a fixed set of states.
|
|
1910
|
+
*/
|
|
1911
|
+
type LabAccountInput = {
|
|
1912
|
+
id: string;
|
|
1913
|
+
/** Lab slug, e.g. `"quest"`, `"labcorp"`, `"bioreference"`. */
|
|
1914
|
+
lab: string;
|
|
1915
|
+
status?: LabAccountStatus;
|
|
1916
|
+
delegated_flow?: LabAccountDelegatedFlow;
|
|
1917
|
+
account_name?: string | null;
|
|
1918
|
+
provider_account_id?: string;
|
|
1919
|
+
org_id?: string | null;
|
|
1920
|
+
business_units?: string[] | null;
|
|
1921
|
+
default_clinical_notes?: string | null;
|
|
1922
|
+
/** Billing type → states it is allowed in. Takes precedence over `states`. */
|
|
1923
|
+
allowed_billing?: Record<string, readonly string[]>;
|
|
1924
|
+
/** Shorthand for `allowed_billing: { client_bill: states }`. Default: every state. */
|
|
1925
|
+
states?: readonly string[];
|
|
1926
|
+
/** Teams the account is linked to. Default: the configured team, so it is selectable. */
|
|
1927
|
+
team_id_allowlist?: readonly string[];
|
|
1928
|
+
};
|
|
1929
|
+
|
|
1900
1930
|
/** Lab-test catalog mirrored from the Junction sandbox (`GET /v3/lab_test`). */
|
|
1901
1931
|
type CatalogMarker = {
|
|
1902
1932
|
id: number;
|
|
@@ -2172,35 +2202,6 @@ interface FetchAPI {
|
|
|
2172
2202
|
fetch(request: Request): Promise<Response>;
|
|
2173
2203
|
}
|
|
2174
2204
|
|
|
2175
|
-
type LabAccountStatus = "active" | "pending" | "suspended" | "ready_to_launch";
|
|
2176
|
-
type LabAccountDelegatedFlow = "order_delegated" | "result_delegated" | "fully_delegated" | "not_delegated";
|
|
2177
|
-
/** `billing_type` values the vendored create-order body accepts. */
|
|
2178
|
-
declare const BILLING_TYPES: readonly ["client_bill", "commercial_insurance", "patient_bill_passthrough", "patient_bill", "upfront_payment"];
|
|
2179
|
-
type BillingType = (typeof BILLING_TYPES)[number];
|
|
2180
|
-
/**
|
|
2181
|
-
* A lab account as a consumer configures it. Mirrors `ClientFacingLabAccount`, with
|
|
2182
|
-
* every field but `id` and `lab` optional, plus a `states` shorthand for the common
|
|
2183
|
-
* case of an account that client-bills in a fixed set of states.
|
|
2184
|
-
*/
|
|
2185
|
-
type LabAccountInput = {
|
|
2186
|
-
id: string;
|
|
2187
|
-
/** Lab slug, e.g. `"quest"`, `"labcorp"`, `"bioreference"`. */
|
|
2188
|
-
lab: string;
|
|
2189
|
-
status?: LabAccountStatus;
|
|
2190
|
-
delegated_flow?: LabAccountDelegatedFlow;
|
|
2191
|
-
account_name?: string | null;
|
|
2192
|
-
provider_account_id?: string;
|
|
2193
|
-
org_id?: string | null;
|
|
2194
|
-
business_units?: string[] | null;
|
|
2195
|
-
default_clinical_notes?: string | null;
|
|
2196
|
-
/** Billing type → states it is allowed in. Takes precedence over `states`. */
|
|
2197
|
-
allowed_billing?: Record<string, readonly string[]>;
|
|
2198
|
-
/** Shorthand for `allowed_billing: { client_bill: states }`. Default: every state. */
|
|
2199
|
-
states?: readonly string[];
|
|
2200
|
-
/** Teams the account is linked to. Default: the configured team, so it is selectable. */
|
|
2201
|
-
team_id_allowlist?: readonly string[];
|
|
2202
|
-
};
|
|
2203
|
-
|
|
2204
2205
|
/**
|
|
2205
2206
|
* Named lab accounts a suite can add in one call, modelled on a real team's recorded
|
|
2206
2207
|
* listing (a BioReference-linked team, recorded 2026-09-21 from the Junction sandbox).
|
|
@@ -2372,6 +2373,8 @@ type JunctionAPIOptions = APIOptions & {
|
|
|
2372
2373
|
* default, `client_bill`.
|
|
2373
2374
|
*/
|
|
2374
2375
|
defaultBillingTypes?: Partial<Record<string, BillingType>>;
|
|
2376
|
+
/** Per-lab multiple-account routing policy; defaults to platform fallback. */
|
|
2377
|
+
labAccountOmissionPolicies?: Record<string, LabAccountOmissionPolicy>;
|
|
2375
2378
|
/** Users and orders to load into every namespace, re-applied on every `reset()`. */
|
|
2376
2379
|
fixtures?: JunctionFixtures;
|
|
2377
2380
|
};
|
|
@@ -2433,7 +2436,10 @@ declare class JunctionAPI implements FetchAPI {
|
|
|
2433
2436
|
get limits(): JunctionLimits;
|
|
2434
2437
|
/** Change some limits (`null` lifts a numeric one); kept across `reset()`. */
|
|
2435
2438
|
configureLimits(input: JunctionLimitsInput): JunctionLimits;
|
|
2436
|
-
/**
|
|
2439
|
+
/** Multiple-account routing policy per lab, kept across reset. */
|
|
2440
|
+
get labAccountOmissionPolicies(): Record<string, LabAccountOmissionPolicy>;
|
|
2441
|
+
set labAccountOmissionPolicies(input: Record<string, LabAccountOmissionPolicy>);
|
|
2442
|
+
/** Lab slug → the billing type an order gets when omitted. Kept across reset. */
|
|
2437
2443
|
get defaultBillingTypes(): Record<string, BillingType>;
|
|
2438
2444
|
/** Replace the per-lab default billing types (`{}` restores `client_bill` everywhere). */
|
|
2439
2445
|
set defaultBillingTypes(input: Partial<Record<string, BillingType>>);
|
|
@@ -2461,6 +2467,11 @@ declare class JunctionAPI implements FetchAPI {
|
|
|
2461
2467
|
* only place the mock reports it.
|
|
2462
2468
|
*/
|
|
2463
2469
|
orderLabAccount(id: string): string | null | undefined;
|
|
2470
|
+
/** Frozen provider number used by the synthetic requisition; null means unknown. */
|
|
2471
|
+
requisitionFixture(id: string): {
|
|
2472
|
+
provider_account_id: string | null;
|
|
2473
|
+
} | undefined;
|
|
2474
|
+
installRequisitionFixture(id: string, providerAccountId: string | null): boolean;
|
|
2464
2475
|
/**
|
|
2465
2476
|
* Put an order straight into a status (a full `<status>.<method>.<event>` value) and
|
|
2466
2477
|
* publish the webhook a real transition would. `flags` takes the same keys as
|
|
@@ -2491,6 +2502,8 @@ type JunctionRuntimeOptions = {
|
|
|
2491
2502
|
geo?: GeoMode;
|
|
2492
2503
|
/** The team's lab accounts, or `{ presets, accounts }`; see {@link JunctionAPIOptions.labAccounts}. */
|
|
2493
2504
|
labAccounts?: LabAccountLayout;
|
|
2505
|
+
/** Per-lab multiple-account omission policy; default platform. */
|
|
2506
|
+
labAccountOmissionPolicies?: Record<string, LabAccountOmissionPolicy>;
|
|
2494
2507
|
/** The team the mock answers as. Default: the corpus's recorded team, else a fixed id. */
|
|
2495
2508
|
teamId?: string;
|
|
2496
2509
|
/** Sandbox-only restrictions, every one off by default; per namespace via `PUT /__admin/limits`. */
|
package/dist/server.js
CHANGED
package/openapi.yaml
CHANGED
|
@@ -1641,8 +1641,8 @@ paths:
|
|
|
1641
1641
|
enabled: false
|
|
1642
1642
|
safe: true
|
|
1643
1643
|
reason: >-
|
|
1644
|
-
PDF
|
|
1645
|
-
|
|
1644
|
+
Synthetic PDF includes persisted selected provider account number or unknown; admin
|
|
1645
|
+
evidence override supported; live comparison remains shape-only
|
|
1646
1646
|
responses:
|
|
1647
1647
|
"200":
|
|
1648
1648
|
description: Successful Response
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crvouga/mockingbird-service-junction",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0",
|
|
4
4
|
"description": "Stateful emulator of the Junction (Vital) user API driven by its OpenAPI contract and verified by differential property tests against the Junction sandbox.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -86,7 +86,9 @@
|
|
|
86
86
|
"GET /__admin/requests",
|
|
87
87
|
"GET /__admin/metrics",
|
|
88
88
|
"GET /__admin/faults/presets",
|
|
89
|
-
"GET /__admin/ui"
|
|
89
|
+
"GET /__admin/ui",
|
|
90
|
+
"GET/PUT /__admin/lab-account-omission-policies",
|
|
91
|
+
"GET/PUT /__admin/requisitions/:id"
|
|
90
92
|
],
|
|
91
93
|
"reporting": "https://github.com/crvouga/mockingbird/blob/main/docs/REPORTING_ISSUES.md"
|
|
92
94
|
}
|
|
File without changes
|