@benchme/scenarios 0.9.1 → 0.11.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/dist/acme-v1/index.d.ts +2 -1
- package/dist/acme-v1/index.js +4 -1
- package/dist/acme-v1/index.js.map +1 -1
- package/dist/acme-v1/names.d.ts +3 -0
- package/dist/acme-v1/names.js +3 -0
- package/dist/acme-v1/names.js.map +1 -1
- package/dist/cuj-v1/accounts.d.ts +14 -0
- package/dist/cuj-v1/accounts.js +52 -0
- package/dist/cuj-v1/accounts.js.map +1 -0
- package/dist/cuj-v1/index.d.ts +10 -0
- package/dist/cuj-v1/index.js +21 -0
- package/dist/cuj-v1/index.js.map +1 -0
- package/dist/guide-v1/index.js +2 -0
- package/dist/guide-v1/index.js.map +1 -1
- package/dist/index.d.ts +16 -2
- package/dist/index.js +18 -2
- package/dist/index.js.map +1 -1
- package/dist/prng.d.ts +7 -0
- package/dist/prng.js +12 -0
- package/dist/prng.js.map +1 -1
- package/dist/scenario.d.ts +78 -0
- package/dist/scenario.js.map +1 -1
- package/dist/shops-v1/index.js +2 -0
- package/dist/shops-v1/index.js.map +1 -1
- package/dist/sites/cinema/generate.d.ts +22 -0
- package/dist/sites/cinema/generate.js +258 -0
- package/dist/sites/cinema/generate.js.map +1 -0
- package/dist/sites/cinema/index.d.ts +3 -0
- package/dist/sites/cinema/index.js +4 -0
- package/dist/sites/cinema/index.js.map +1 -0
- package/dist/sites/cinema/rules.d.ts +142 -0
- package/dist/sites/cinema/rules.js +191 -0
- package/dist/sites/cinema/rules.js.map +1 -0
- package/dist/sites/cinema/types.d.ts +93 -0
- package/dist/sites/cinema/types.js +2 -0
- package/dist/sites/cinema/types.js.map +1 -0
- package/dist/sites/clinic/generate.d.ts +28 -0
- package/dist/sites/clinic/generate.js +282 -0
- package/dist/sites/clinic/generate.js.map +1 -0
- package/dist/sites/clinic/index.d.ts +3 -0
- package/dist/sites/clinic/index.js +3 -0
- package/dist/sites/clinic/index.js.map +1 -0
- package/dist/sites/clinic/rules.d.ts +96 -0
- package/dist/sites/clinic/rules.js +154 -0
- package/dist/sites/clinic/rules.js.map +1 -0
- package/dist/sites/clinic/types.d.ts +125 -0
- package/dist/sites/clinic/types.js +2 -0
- package/dist/sites/clinic/types.js.map +1 -0
- package/dist/sites/dining/generate.d.ts +15 -0
- package/dist/sites/dining/generate.js +146 -0
- package/dist/sites/dining/generate.js.map +1 -0
- package/dist/sites/dining/index.d.ts +3 -0
- package/dist/sites/dining/index.js +4 -0
- package/dist/sites/dining/index.js.map +1 -0
- package/dist/sites/dining/rules.d.ts +92 -0
- package/dist/sites/dining/rules.js +156 -0
- package/dist/sites/dining/rules.js.map +1 -0
- package/dist/sites/dining/types.d.ts +69 -0
- package/dist/sites/dining/types.js +14 -0
- package/dist/sites/dining/types.js.map +1 -0
- package/dist/sites/events/generate.d.ts +27 -0
- package/dist/sites/events/generate.js +197 -0
- package/dist/sites/events/generate.js.map +1 -0
- package/dist/sites/events/index.d.ts +3 -0
- package/dist/sites/events/index.js +4 -0
- package/dist/sites/events/index.js.map +1 -0
- package/dist/sites/events/rules.d.ts +99 -0
- package/dist/sites/events/rules.js +172 -0
- package/dist/sites/events/rules.js.map +1 -0
- package/dist/sites/events/types.d.ts +78 -0
- package/dist/sites/events/types.js +10 -0
- package/dist/sites/events/types.js.map +1 -0
- package/dist/sites/flights/generate.d.ts +21 -0
- package/dist/sites/flights/generate.js +210 -0
- package/dist/sites/flights/generate.js.map +1 -0
- package/dist/sites/flights/index.d.ts +3 -0
- package/dist/sites/flights/index.js +3 -0
- package/dist/sites/flights/index.js.map +1 -0
- package/dist/sites/flights/rules.d.ts +79 -0
- package/dist/sites/flights/rules.js +125 -0
- package/dist/sites/flights/rules.js.map +1 -0
- package/dist/sites/flights/types.d.ts +69 -0
- package/dist/sites/flights/types.js +2 -0
- package/dist/sites/flights/types.js.map +1 -0
- package/dist/sites/homes/generate.d.ts +19 -0
- package/dist/sites/homes/generate.js +180 -0
- package/dist/sites/homes/generate.js.map +1 -0
- package/dist/sites/homes/index.d.ts +3 -0
- package/dist/sites/homes/index.js +3 -0
- package/dist/sites/homes/index.js.map +1 -0
- package/dist/sites/homes/rules.d.ts +68 -0
- package/dist/sites/homes/rules.js +94 -0
- package/dist/sites/homes/rules.js.map +1 -0
- package/dist/sites/homes/types.d.ts +62 -0
- package/dist/sites/homes/types.js +2 -0
- package/dist/sites/homes/types.js.map +1 -0
- package/dist/sites/hotels/generate.d.ts +16 -0
- package/dist/sites/hotels/generate.js +134 -0
- package/dist/sites/hotels/generate.js.map +1 -0
- package/dist/sites/pizza/catalog.d.ts +34 -0
- package/dist/sites/pizza/catalog.js +65 -0
- package/dist/sites/pizza/catalog.js.map +1 -0
- package/dist/sites/pizza/generate.d.ts +19 -0
- package/dist/sites/pizza/generate.js +203 -0
- package/dist/sites/pizza/generate.js.map +1 -0
- package/dist/sites/pizza/index.d.ts +4 -0
- package/dist/sites/pizza/index.js +4 -0
- package/dist/sites/pizza/index.js.map +1 -0
- package/dist/sites/pizza/rules.d.ts +134 -0
- package/dist/sites/pizza/rules.js +217 -0
- package/dist/sites/pizza/rules.js.map +1 -0
- package/dist/sites/pizza/types.d.ts +114 -0
- package/dist/sites/pizza/types.js +2 -0
- package/dist/sites/pizza/types.js.map +1 -0
- package/dist/sites/rows.d.ts +14 -0
- package/dist/sites/rows.js +45 -0
- package/dist/sites/rows.js.map +1 -0
- package/dist/sites/sports/generate.d.ts +18 -0
- package/dist/sites/sports/generate.js +247 -0
- package/dist/sites/sports/generate.js.map +1 -0
- package/dist/sites/sports/index.d.ts +3 -0
- package/dist/sites/sports/index.js +3 -0
- package/dist/sites/sports/index.js.map +1 -0
- package/dist/sites/sports/rules.d.ts +110 -0
- package/dist/sites/sports/rules.js +139 -0
- package/dist/sites/sports/rules.js.map +1 -0
- package/dist/sites/sports/types.d.ts +91 -0
- package/dist/sites/sports/types.js +8 -0
- package/dist/sites/sports/types.js.map +1 -0
- package/dist/stays.d.ts +63 -0
- package/dist/stays.js +96 -0
- package/dist/stays.js.map +1 -0
- package/dist/web-v1/index.js +2 -0
- package/dist/web-v1/index.js.map +1 -1
- package/dist/webmcp-v1/index.d.ts +11 -0
- package/dist/webmcp-v1/index.js +26 -0
- package/dist/webmcp-v1/index.js.map +1 -0
- package/package.json +1 -1
package/dist/acme-v1/index.d.ts
CHANGED
|
@@ -3,7 +3,8 @@ import type { Scenario } from "../scenario.js";
|
|
|
3
3
|
* acme-v1: a small industrial-supply company. Sizes are fixed so tasks can
|
|
4
4
|
* assume them; every value is derived from the seed through ONE rng stream in a
|
|
5
5
|
* fixed order (changing that order changes every downstream fixture — bump the
|
|
6
|
-
* scenario key instead).
|
|
6
|
+
* scenario key instead). The sites from webmcp-tools are not part of it: they
|
|
7
|
+
* are webmcp-v1's, and an acme-v1 workspace seeds them empty.
|
|
7
8
|
*/
|
|
8
9
|
export declare const ACME_V1_SIZES: {
|
|
9
10
|
readonly products: 120;
|
package/dist/acme-v1/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { minstd } from "../prng.js";
|
|
2
|
+
import { noSiteRows } from "../sites/rows.js";
|
|
2
3
|
import { city, companyName } from "./names.js";
|
|
3
4
|
import { documents } from "./documents.js";
|
|
4
5
|
import { agents, slaPolicies, tickets } from "./helpdesk.js";
|
|
@@ -7,7 +8,8 @@ import { customers, locations, orders, products, stock, transfers } from "./ware
|
|
|
7
8
|
* acme-v1: a small industrial-supply company. Sizes are fixed so tasks can
|
|
8
9
|
* assume them; every value is derived from the seed through ONE rng stream in a
|
|
9
10
|
* fixed order (changing that order changes every downstream fixture — bump the
|
|
10
|
-
* scenario key instead).
|
|
11
|
+
* scenario key instead). The sites from webmcp-tools are not part of it: they
|
|
12
|
+
* are webmcp-v1's, and an acme-v1 workspace seeds them empty.
|
|
11
13
|
*/
|
|
12
14
|
export const ACME_V1_SIZES = { products: 120, customers: 40, orders: 300, transfers: 60, agents: 8, tickets: 150 };
|
|
13
15
|
export const acmeV1 = {
|
|
@@ -36,6 +38,7 @@ export const acmeV1 = {
|
|
|
36
38
|
warehouse: { products: items, locations: sites, stock: stockRows, customers: custs, orders: orderRows, orderLines: lines, transfers: transferRows },
|
|
37
39
|
helpdesk: { agents: ag, tickets: hd.tickets, comments: hd.comments, slaPolicies: slaPolicies() },
|
|
38
40
|
vault: { documents: docs },
|
|
41
|
+
...noSiteRows(),
|
|
39
42
|
};
|
|
40
43
|
},
|
|
41
44
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/acme-v1/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE1F
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/acme-v1/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,C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.d.ts
CHANGED
|
@@ -5,3 +5,6 @@ export declare function city(rng: Rng): string;
|
|
|
5
5
|
export declare function personName(rng: Rng): string;
|
|
6
6
|
export declare function companyName(rng: Rng): string;
|
|
7
7
|
export declare const CATEGORY_LIST: readonly string[];
|
|
8
|
+
export declare const CITY_LIST: readonly string[];
|
|
9
|
+
export declare const FIRST_NAMES: readonly string[];
|
|
10
|
+
export declare const LAST_NAMES: readonly string[];
|
package/dist/acme-v1/names.js
CHANGED
|
@@ -27,4 +27,7 @@ export function companyName(rng) {
|
|
|
27
27
|
return `${word(rng)} ${pick(rng, ["Industrial", "Supply", "Systems", "Works", "Logistics"])}`;
|
|
28
28
|
}
|
|
29
29
|
export const CATEGORY_LIST = CATEGORIES;
|
|
30
|
+
export const CITY_LIST = CITIES;
|
|
31
|
+
export const FIRST_NAMES = FIRST;
|
|
32
|
+
export const LAST_NAMES = LAST;
|
|
30
33
|
//# sourceMappingURL=names.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"names.js","sourceRoot":"","sources":["../../src/acme-v1/names.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,GAAG,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAEjD;;;GAGG;AACH,MAAM,SAAS,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;AAC7H,MAAM,UAAU,GAAG,CAAC,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,CAAU,CAAC;AAC5H,MAAM,MAAM,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,CAAU,CA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,GAAG,SAAS,EAAE,CAAC,EAAE;QAAE,CAAC,IAAI,IAAI,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;IAC9D,OAAO,CAAC,CAAC,CAAC,CAAE,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAC1C,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,GAAQ;IAC/B,OAAO,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;AAC/B,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,GAAQ;IAC3B,OAAO,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;AAC3B,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,GAAQ;IACjC,OAAO,GAAG,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,CAAC;AAClD,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,GAAQ;IAClC,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC;AAChG,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GAAsB,UAAU,CAAC;AAC3D,MAAM,CAAC,MAAM,SAAS,GAAsB,MAAM,CAAC;AACnD,MAAM,CAAC,MAAM,WAAW,GAAsB,KAAK,CAAC;AACpD,MAAM,CAAC,MAAM,UAAU,GAAsB,IAAI,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SiteAccounts } from "../scenario.js";
|
|
2
|
+
import type { SiteRows } from "../sites/rows.js";
|
|
3
|
+
/** How many people of each site's rows get an account of their own. */
|
|
4
|
+
export declare const ACCOUNTS_PER_SITE = 4;
|
|
5
|
+
/**
|
|
6
|
+
* The accounts a cuj-v1 workspace starts with: on each site, a few of the
|
|
7
|
+
* people its rows already have something for, signed up and verified, each
|
|
8
|
+
* with a password. A task that asks someone to act on their own account says
|
|
9
|
+
* who they are and their password; a task that asks for a new account signs
|
|
10
|
+
* up with an email no account has. Drawn from a stream of their own
|
|
11
|
+
* (`substream(seed, "cuj-v1:accounts:<app>")`), spread across each site's
|
|
12
|
+
* people in email order, so the same seed gives the same accounts forever.
|
|
13
|
+
*/
|
|
14
|
+
export declare function siteAccounts(seed: number, rows: SiteRows): SiteAccounts;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { int, pick, substream } from "../prng.js";
|
|
2
|
+
/** How many people of each site's rows get an account of their own. */
|
|
3
|
+
export const ACCOUNTS_PER_SITE = 4;
|
|
4
|
+
const WORDS = ["amber", "birch", "cedar", "delta", "ember", "fjord", "garnet", "harbor", "indigo", "juniper", "kestrel", "linden", "marble", "nectar", "orchid", "pewter"];
|
|
5
|
+
/** A password a person can type: two words and four digits, from the site's own stream. */
|
|
6
|
+
const passwordOf = (rng) => `${pick(rng, WORDS)}-${int(rng, 1000, 9999)}-${pick(rng, WORDS)}`;
|
|
7
|
+
/** People with something on the site, by email, each once, in email order; the first name seen for an email is kept. */
|
|
8
|
+
function people(list) {
|
|
9
|
+
const byEmail = new Map();
|
|
10
|
+
for (const p of list)
|
|
11
|
+
if (!byEmail.has(p.email.toLowerCase()))
|
|
12
|
+
byEmail.set(p.email.toLowerCase(), p.name);
|
|
13
|
+
return [...byEmail].map(([email, name]) => ({ email, name })).sort((a, b) => a.email.localeCompare(b.email));
|
|
14
|
+
}
|
|
15
|
+
/** Who on each site has something to act on: a booking, an order, a viewing, a prescription, a place in the directory. */
|
|
16
|
+
function candidates(rows) {
|
|
17
|
+
return {
|
|
18
|
+
hotels: people(rows.hotels.bookings.filter((b) => b.status === "confirmed").map((b) => ({ email: b.guestEmail, name: b.guestName }))),
|
|
19
|
+
flights: people(rows.flights.bookings.filter((b) => b.status === "confirmed").map((b) => ({ email: b.contactEmail, name: b.passengers[0]?.name ?? b.contactEmail }))),
|
|
20
|
+
dining: people(rows.dining.reservations.filter((r) => r.status === "confirmed").map((r) => ({ email: r.guestEmail, name: r.guestName }))),
|
|
21
|
+
pizza: people(rows.pizza.orders.map((o) => ({ email: o.customerEmail, name: o.customerName }))),
|
|
22
|
+
cinema: people(rows.cinema.bookings.filter((b) => b.status === "confirmed").map((b) => ({ email: b.customerEmail, name: b.customerName }))),
|
|
23
|
+
sports: people(rows.sports.customers),
|
|
24
|
+
homes: people(rows.homes.viewings.filter((v) => v.status === "requested").map((v) => ({ email: v.viewerEmail, name: v.viewerName }))),
|
|
25
|
+
clinic: people(rows.clinic.patients),
|
|
26
|
+
events: people(rows.events.people),
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The accounts a cuj-v1 workspace starts with: on each site, a few of the
|
|
31
|
+
* people its rows already have something for, signed up and verified, each
|
|
32
|
+
* with a password. A task that asks someone to act on their own account says
|
|
33
|
+
* who they are and their password; a task that asks for a new account signs
|
|
34
|
+
* up with an email no account has. Drawn from a stream of their own
|
|
35
|
+
* (`substream(seed, "cuj-v1:accounts:<app>")`), spread across each site's
|
|
36
|
+
* people in email order, so the same seed gives the same accounts forever.
|
|
37
|
+
*/
|
|
38
|
+
export function siteAccounts(seed, rows) {
|
|
39
|
+
const out = {};
|
|
40
|
+
for (const [app, list] of Object.entries(candidates(rows))) {
|
|
41
|
+
const rng = substream(seed, `cuj-v1:accounts:${app}`);
|
|
42
|
+
const step = Math.max(1, Math.floor(list.length / ACCOUNTS_PER_SITE));
|
|
43
|
+
const chosen = [];
|
|
44
|
+
for (let i = Math.min(int(rng, 0, step - 1), list.length - 1); i < list.length && chosen.length < ACCOUNTS_PER_SITE; i += step) {
|
|
45
|
+
const p = list[i];
|
|
46
|
+
chosen.push({ email: p.email, name: p.name, password: passwordOf(rng) });
|
|
47
|
+
}
|
|
48
|
+
out[app] = chosen;
|
|
49
|
+
}
|
|
50
|
+
return out;
|
|
51
|
+
}
|
|
52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D,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,iBAAiB,CAAC,CAAC,CAAC;QACtE,MAAM,MAAM,GAAkB,EAAE,CAAC;QACjC,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,IAAI,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,GAAG,iBAAiB,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC;YAC/H,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAoC,CAAC;YACrD,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,QAAQ,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC3E,CAAC;QACD,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;IACpB,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Scenario } from "../scenario.js";
|
|
2
|
+
/**
|
|
3
|
+
* cuj-v1: critical user journeys on the nine sites of webmcp-v1, in focus
|
|
4
|
+
* areas and at levels (tools/intent-corpus/cuj, docs/scenarios/cuj-v1.md).
|
|
5
|
+
* Its rows are webmcp-v1's at the same seed, row for row; what it adds is a
|
|
6
|
+
* few accounts already signed up on each site (`accounts`), so a journey can
|
|
7
|
+
* begin with someone signing in to their own account. Its workspaces
|
|
8
|
+
* advertise the nine sites and the inbox their sign-up codes land in.
|
|
9
|
+
*/
|
|
10
|
+
export declare const cujV1: Scenario;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SITE_APPS } from "../sites/rows.js";
|
|
2
|
+
import { webmcpV1 } from "../webmcp-v1/index.js";
|
|
3
|
+
import { siteAccounts } from "./accounts.js";
|
|
4
|
+
/**
|
|
5
|
+
* cuj-v1: critical user journeys on the nine sites of webmcp-v1, in focus
|
|
6
|
+
* areas and at levels (tools/intent-corpus/cuj, docs/scenarios/cuj-v1.md).
|
|
7
|
+
* Its rows are webmcp-v1's at the same seed, row for row; what it adds is a
|
|
8
|
+
* few accounts already signed up on each site (`accounts`), so a journey can
|
|
9
|
+
* begin with someone signing in to their own account. Its workspaces
|
|
10
|
+
* advertise the nine sites and the inbox their sign-up codes land in.
|
|
11
|
+
*/
|
|
12
|
+
export const cujV1 = {
|
|
13
|
+
key: "cuj-v1",
|
|
14
|
+
description: "Critical user journeys on the nine sites of webmcp-v1 (hotels, flights, restaurants, pizza, cinema, a sports store, homes, clinics, office events), with a few accounts already signed up on each",
|
|
15
|
+
apps: [...SITE_APPS, "mail"],
|
|
16
|
+
generate(seed) {
|
|
17
|
+
const rows = webmcpV1.generate(seed);
|
|
18
|
+
return { ...rows, accounts: siteAccounts(seed, rows) };
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cuj-v1/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,KAAK,GAAa;IAC7B,GAAG,EAAE,QAAQ;IACb,WAAW,EAAE,mMAAmM;IAChN,IAAI,EAAE,CAAC,GAAG,SAAS,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,IAAY;QACnB,MAAM,IAAI,GAAG,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACrC,OAAO,EAAE,GAAG,IAAI,EAAE,QAAQ,EAAE,YAAY,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC;IACzD,CAAC;CACF,CAAC"}
|
package/dist/guide-v1/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { acmeV1 } from "../acme-v1/index.js";
|
|
2
|
+
import { noSiteRows } from "../sites/rows.js";
|
|
2
3
|
/**
|
|
3
4
|
* guide-v1: the buyer's guide (apps/guide). The guide's pages are a pure function of the workspace's seed, which
|
|
4
5
|
* names one edition of it (a category, an arm, a target product — apps/guide's edition table), so the acme apps seed
|
|
@@ -15,6 +16,7 @@ export const guideV1 = {
|
|
|
15
16
|
warehouse: { products: [], locations: [], stock: [], customers: [], orders: [], orderLines: [], transfers: [] },
|
|
16
17
|
helpdesk: { agents: [], tickets: [], comments: [], slaPolicies: [] },
|
|
17
18
|
vault: { documents: [] },
|
|
19
|
+
...noSiteRows(),
|
|
18
20
|
};
|
|
19
21
|
},
|
|
20
22
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/guide-v1/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/guide-v1/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,OAAO,GAAa;IAC/B,GAAG,EAAE,UAAU;IACf,WAAW,EAAE,6GAA6G;IAC1H,IAAI,EAAE,CAAC,OAAO,CAAC;IACf,QAAQ;QACN,OAAO;YACL,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO;YACnC,SAAS,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;YAC/G,QAAQ,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE;YACpE,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;YACxB,GAAG,UAAU,EAAE;SAChB,CAAC;IACJ,CAAC;CACF,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,25 @@
|
|
|
1
1
|
import { ScenarioRegistry } from "./scenario.js";
|
|
2
2
|
export { ACME_V1_SIZES, acmeV1 } from "./acme-v1/index.js";
|
|
3
|
+
export { AMENITIES, HOTEL_SIZES } from "./sites/hotels/generate.js";
|
|
3
4
|
export { shopsV1 } from "./shops-v1/index.js";
|
|
4
5
|
export { guideV1 } from "./guide-v1/index.js";
|
|
5
6
|
export { webV1 } from "./web-v1/index.js";
|
|
7
|
+
export { webmcpV1 } from "./webmcp-v1/index.js";
|
|
8
|
+
export { cujV1 } from "./cuj-v1/index.js";
|
|
9
|
+
export { ACCOUNTS_PER_SITE, siteAccounts } from "./cuj-v1/accounts.js";
|
|
10
|
+
export { SITE_APPS, noSiteRows, siteRows, type SiteApp, type SiteRows } from "./sites/rows.js";
|
|
11
|
+
export * from "./sites/flights/index.js";
|
|
12
|
+
export * from "./sites/dining/index.js";
|
|
13
|
+
export * from "./sites/pizza/index.js";
|
|
14
|
+
export * from "./sites/cinema/index.js";
|
|
15
|
+
export * from "./sites/sports/index.js";
|
|
16
|
+
export * from "./sites/homes/index.js";
|
|
17
|
+
export * from "./sites/clinic/index.js";
|
|
18
|
+
export * from "./sites/events/index.js";
|
|
6
19
|
export { documentsMatching, lowStock, openOrdersFor, openTicketsFor, orderTotalCents, slaBreaches, stockOf } from "./answers.js";
|
|
7
|
-
export { int, minstd, pick, shuffle, type Rng } from "./prng.js";
|
|
8
|
-
export {
|
|
20
|
+
export { int, minstd, pick, shuffle, substream, type Rng } from "./prng.js";
|
|
21
|
+
export { MAX_NIGHTS, STAY_WINDOW, addDays, checkOutOf, fitProblem, isDate, nightsOf, roomsLeft, searchStays, stayProblem, stayTotalCents, type Stay, type StayOffer, type StayProblem, type StayQuery, } from "./stays.js";
|
|
22
|
+
export { ScenarioRegistry, UnknownScenarioError, type Agent, type Booking, type BookingStatus, type Comment, type CompanyFacts, type Customer, type Document, type DocumentKind, type Hotel, type HotelRows, type Location, type Order, type OrderLine, type OrderStatus, type Product, type RoomType, type Scenario, type ScenarioRows, type SiteAccount, type SiteAccounts, type SlaPolicy, type Stock, type Ticket, type TicketPriority, type TicketStatus, type Transfer, type TransferStatus, } from "./scenario.js";
|
|
9
23
|
/**
|
|
10
24
|
* The default registry with every shipped scenario. acme-v1 stays first: the
|
|
11
25
|
* gateway's robots.txt advertises the shared workspace of the first one.
|
package/dist/index.js
CHANGED
|
@@ -3,16 +3,32 @@ import { guideV1 } from "./guide-v1/index.js";
|
|
|
3
3
|
import { ScenarioRegistry } from "./scenario.js";
|
|
4
4
|
import { shopsV1 } from "./shops-v1/index.js";
|
|
5
5
|
import { webV1 } from "./web-v1/index.js";
|
|
6
|
+
import { webmcpV1 } from "./webmcp-v1/index.js";
|
|
7
|
+
import { cujV1 } from "./cuj-v1/index.js";
|
|
6
8
|
export { ACME_V1_SIZES, acmeV1 } from "./acme-v1/index.js";
|
|
9
|
+
export { AMENITIES, HOTEL_SIZES } from "./sites/hotels/generate.js";
|
|
7
10
|
export { shopsV1 } from "./shops-v1/index.js";
|
|
8
11
|
export { guideV1 } from "./guide-v1/index.js";
|
|
9
12
|
export { webV1 } from "./web-v1/index.js";
|
|
13
|
+
export { webmcpV1 } from "./webmcp-v1/index.js";
|
|
14
|
+
export { cujV1 } from "./cuj-v1/index.js";
|
|
15
|
+
export { ACCOUNTS_PER_SITE, siteAccounts } from "./cuj-v1/accounts.js";
|
|
16
|
+
export { SITE_APPS, noSiteRows, siteRows } from "./sites/rows.js";
|
|
17
|
+
export * from "./sites/flights/index.js";
|
|
18
|
+
export * from "./sites/dining/index.js";
|
|
19
|
+
export * from "./sites/pizza/index.js";
|
|
20
|
+
export * from "./sites/cinema/index.js";
|
|
21
|
+
export * from "./sites/sports/index.js";
|
|
22
|
+
export * from "./sites/homes/index.js";
|
|
23
|
+
export * from "./sites/clinic/index.js";
|
|
24
|
+
export * from "./sites/events/index.js";
|
|
10
25
|
export { documentsMatching, lowStock, openOrdersFor, openTicketsFor, orderTotalCents, slaBreaches, stockOf } from "./answers.js";
|
|
11
|
-
export { int, minstd, pick, shuffle } from "./prng.js";
|
|
26
|
+
export { int, minstd, pick, shuffle, substream } from "./prng.js";
|
|
27
|
+
export { MAX_NIGHTS, STAY_WINDOW, addDays, checkOutOf, fitProblem, isDate, nightsOf, roomsLeft, searchStays, stayProblem, stayTotalCents, } from "./stays.js";
|
|
12
28
|
export { ScenarioRegistry, UnknownScenarioError, } from "./scenario.js";
|
|
13
29
|
/**
|
|
14
30
|
* The default registry with every shipped scenario. acme-v1 stays first: the
|
|
15
31
|
* gateway's robots.txt advertises the shared workspace of the first one.
|
|
16
32
|
*/
|
|
17
|
-
export const scenarios = new ScenarioRegistry().register(acmeV1).register(shopsV1).register(guideV1).register(webV1);
|
|
33
|
+
export const scenarios = new ScenarioRegistry().register(acmeV1).register(shopsV1).register(guideV1).register(webV1).register(webmcpV1).register(cujV1);
|
|
18
34
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,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AAC"}
|
package/dist/prng.d.ts
CHANGED
|
@@ -6,6 +6,13 @@ export type Rng = () => number;
|
|
|
6
6
|
* fixture an oracle was derived from.
|
|
7
7
|
*/
|
|
8
8
|
export declare function minstd(seed: number): Rng;
|
|
9
|
+
/**
|
|
10
|
+
* A stream of its own for one part of a scenario: same (seed, key) → same
|
|
11
|
+
* sequence, and drawing from it never moves a value drawn from `minstd(seed)`.
|
|
12
|
+
* Lets a scenario grow a part (acme-v1's hotels) without changing a single
|
|
13
|
+
* row it generated before.
|
|
14
|
+
*/
|
|
15
|
+
export declare function substream(seed: number, key: string): Rng;
|
|
9
16
|
/** Integer in [min, max] inclusive. */
|
|
10
17
|
export declare function int(rng: Rng, min: number, max: number): number;
|
|
11
18
|
export declare function pick<T>(rng: Rng, items: readonly T[]): T;
|
package/dist/prng.js
CHANGED
|
@@ -14,6 +14,18 @@ export function minstd(seed) {
|
|
|
14
14
|
return (state - 1) / (MODULUS - 1);
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* A stream of its own for one part of a scenario: same (seed, key) → same
|
|
19
|
+
* sequence, and drawing from it never moves a value drawn from `minstd(seed)`.
|
|
20
|
+
* Lets a scenario grow a part (acme-v1's hotels) without changing a single
|
|
21
|
+
* row it generated before.
|
|
22
|
+
*/
|
|
23
|
+
export function substream(seed, key) {
|
|
24
|
+
let h = 2166136261;
|
|
25
|
+
for (const ch of `${seed}:${key}`)
|
|
26
|
+
h = Math.imul(h ^ ch.charCodeAt(0), 16777619) >>> 0;
|
|
27
|
+
return minstd((h % 2147483646) + 1);
|
|
28
|
+
}
|
|
17
29
|
/** Integer in [min, max] inclusive. */
|
|
18
30
|
export function int(rng, min, max) {
|
|
19
31
|
return min + Math.floor(rng() * (max - min + 1));
|
package/dist/prng.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prng.js","sourceRoot":"","sources":["../src/prng.ts"],"names":[],"mappings":"AAGA,MAAM,OAA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AE,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;AACnD,CAAC;AAED,MAAM,UAAU,IAAI,CAAI,GAAQ,EAAE,KAAmB;IACnD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAChE,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAM,CAAC;AACnD,CAAC;AAED,8BAA8B;AAC9B,MAAM,UAAU,OAAO,CAAI,GAAQ,EAAE,KAAmB;IACtD,MAAM,GAAG,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC;IACvB,KAAK,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QACxC,MAAM,CAAC,GAAG,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QACzB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,GAAG,CAAC,CAAC,CAAM,CAAC,CAAC;IAChD,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
package/dist/scenario.d.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
import type { ClinicRows } from "./sites/clinic/types.js";
|
|
2
|
+
import type { EventRows } from "./sites/events/types.js";
|
|
3
|
+
import type { PizzaRows } from "./sites/pizza/types.js";
|
|
4
|
+
import type { SportsRows } from "./sites/sports/types.js";
|
|
5
|
+
import type { CinemaRows } from "./sites/cinema/types.js";
|
|
6
|
+
import type { FlightRows } from "./sites/flights/types.js";
|
|
7
|
+
import type { DiningRows } from "./sites/dining/types.js";
|
|
8
|
+
import type { HomeRows } from "./sites/homes/types.js";
|
|
1
9
|
/**
|
|
2
10
|
* Row shapes carry NATURAL keys (sku, code, orderNo) and no database ids, so
|
|
3
11
|
* every app can insert them under any workspace_id.
|
|
@@ -85,6 +93,57 @@ export type Document = {
|
|
|
85
93
|
tags: string[];
|
|
86
94
|
updatedAt: string;
|
|
87
95
|
};
|
|
96
|
+
/**
|
|
97
|
+
* The hotel booking site (apps/hotels). Prices are per room per night; a
|
|
98
|
+
* stay's total adds the hotel's pet fee (once per stay, when pets come) and
|
|
99
|
+
* its late-checkout fee (when the guest asks for it). Rules: ./stays.ts.
|
|
100
|
+
*/
|
|
101
|
+
export type Hotel = {
|
|
102
|
+
code: string;
|
|
103
|
+
name: string;
|
|
104
|
+
city: string;
|
|
105
|
+
rating: number;
|
|
106
|
+
description: string;
|
|
107
|
+
amenities: string[];
|
|
108
|
+
petsAllowed: boolean;
|
|
109
|
+
/** One fee per stay with any number of pets; null where pets are not allowed. */
|
|
110
|
+
petFeeCents: number | null;
|
|
111
|
+
/** The latest checkout a guest can ask for, "HH:MM"; null where late checkout is not offered. */
|
|
112
|
+
lateCheckoutUntil: string | null;
|
|
113
|
+
lateCheckoutFeeCents: number | null;
|
|
114
|
+
};
|
|
115
|
+
export type RoomType = {
|
|
116
|
+
hotelCode: string;
|
|
117
|
+
code: string;
|
|
118
|
+
name: string;
|
|
119
|
+
maxAdults: number;
|
|
120
|
+
maxKids: number;
|
|
121
|
+
nightlyCents: number;
|
|
122
|
+
rooms: number;
|
|
123
|
+
};
|
|
124
|
+
export type BookingStatus = "confirmed" | "cancelled";
|
|
125
|
+
export type Booking = {
|
|
126
|
+
bookingNo: string;
|
|
127
|
+
hotelCode: string;
|
|
128
|
+
roomCode: string;
|
|
129
|
+
guestName: string;
|
|
130
|
+
guestEmail: string;
|
|
131
|
+
/** The first night, "YYYY-MM-DD". */
|
|
132
|
+
checkIn: string;
|
|
133
|
+
nights: number;
|
|
134
|
+
adults: number;
|
|
135
|
+
kids: number;
|
|
136
|
+
pets: number;
|
|
137
|
+
lateCheckout: boolean;
|
|
138
|
+
status: BookingStatus;
|
|
139
|
+
totalCents: number;
|
|
140
|
+
createdAt: string;
|
|
141
|
+
};
|
|
142
|
+
export type HotelRows = {
|
|
143
|
+
hotels: Hotel[];
|
|
144
|
+
rooms: RoomType[];
|
|
145
|
+
bookings: Booking[];
|
|
146
|
+
};
|
|
88
147
|
export type CompanyFacts = {
|
|
89
148
|
name: string;
|
|
90
149
|
founded: number;
|
|
@@ -92,6 +151,14 @@ export type CompanyFacts = {
|
|
|
92
151
|
employees: number;
|
|
93
152
|
fiscalYearRevenueCents: number;
|
|
94
153
|
};
|
|
154
|
+
/** An account a site already has when a workspace starts: signed up and verified, with the password its owner types. */
|
|
155
|
+
export type SiteAccount = {
|
|
156
|
+
email: string;
|
|
157
|
+
name: string;
|
|
158
|
+
password: string;
|
|
159
|
+
};
|
|
160
|
+
/** Accounts by site app (hotels, flights …); a site with none is left out. */
|
|
161
|
+
export type SiteAccounts = Partial<Record<"hotels" | "flights" | "dining" | "pizza" | "cinema" | "sports" | "homes" | "clinic" | "events", SiteAccount[]>>;
|
|
95
162
|
export type ScenarioRows = {
|
|
96
163
|
company: CompanyFacts;
|
|
97
164
|
warehouse: {
|
|
@@ -112,6 +179,17 @@ export type ScenarioRows = {
|
|
|
112
179
|
vault: {
|
|
113
180
|
documents: Document[];
|
|
114
181
|
};
|
|
182
|
+
hotels: HotelRows;
|
|
183
|
+
homes: HomeRows;
|
|
184
|
+
dining: DiningRows;
|
|
185
|
+
flights: FlightRows;
|
|
186
|
+
cinema: CinemaRows;
|
|
187
|
+
sports: SportsRows;
|
|
188
|
+
pizza: PizzaRows;
|
|
189
|
+
events: EventRows;
|
|
190
|
+
clinic: ClinicRows;
|
|
191
|
+
/** Accounts the sites start with (cuj-v1); absent where a scenario seeds none, as every other does. */
|
|
192
|
+
accounts?: SiteAccounts;
|
|
115
193
|
};
|
|
116
194
|
/** A scenario is a pure function of its seed: same seed, byte-identical rows. */
|
|
117
195
|
export interface Scenario {
|
package/dist/scenario.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scenario.js","sourceRoot":"","sources":["../src/scenario.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scenario.js","sourceRoot":"","sources":["../src/scenario.ts"],"names":[],"mappings":"AA8IA,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IAC7C,YAAY,GAAW;QACrB,KAAK,CAAC,qBAAqB,GAAG,EAAE,CAAC,CAAC;QAClC,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF;AAED,+EAA+E;AAC/E,MAAM,OAAO,gBAAgB;IACV,KAAK,GAAG,IAAI,GAAG,EAAoB,CAAC;IAErD,QAAQ,CAAC,QAAkB;QACzB,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,gCAAgC,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC;QAClG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QACvC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,GAAG,CAAC,GAAW;QACb,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAC9B,IAAI,CAAC,CAAC;YAAE,MAAM,IAAI,oBAAoB,CAAC,GAAG,CAAC,CAAC;QAC5C,OAAO,CAAC,CAAC;IACX,CAAC;IAED,GAAG,CAAC,GAAW;QACb,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC7B,CAAC;IAED,IAAI;QACF,OAAO,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;IAClC,CAAC;CACF"}
|
package/dist/shops-v1/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { acmeV1 } from "../acme-v1/index.js";
|
|
2
|
+
import { noSiteRows } from "../sites/rows.js";
|
|
2
3
|
/**
|
|
3
4
|
* shops-v1: the consumer stores. Each store owns its catalogue (apps/shops),
|
|
4
5
|
* so the acme apps seed nothing and minting stays cheap; `company` is acme-v1's
|
|
@@ -13,6 +14,7 @@ export const shopsV1 = {
|
|
|
13
14
|
warehouse: { products: [], locations: [], stock: [], customers: [], orders: [], orderLines: [], transfers: [] },
|
|
14
15
|
helpdesk: { agents: [], tickets: [], comments: [], slaPolicies: [] },
|
|
15
16
|
vault: { documents: [] },
|
|
17
|
+
...noSiteRows(),
|
|
16
18
|
};
|
|
17
19
|
},
|
|
18
20
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/shops-v1/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/shops-v1/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C;;;;GAIG;AACH,MAAM,CAAC,MAAM,OAAO,GAAa;IAC/B,GAAG,EAAE,UAAU;IACf,WAAW,EAAE,4GAA4G;IACzH,QAAQ;QACN,OAAO;YACL,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO;YACnC,SAAS,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;YAC/G,QAAQ,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE;YACpE,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;YACxB,GAAG,UAAU,EAAE;SAChB,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { CinemaRows } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* The cinema site's rows: one cinema in each city, 2–3 screens each (half the
|
|
4
|
+
* cinemas have a large-format screen), invented films, three days of
|
|
5
|
+
* showtimes (four a day on every screen; each cinema's headliner plays most),
|
|
6
|
+
* and bookings already made. Drawn from a stream of its own
|
|
7
|
+
* (`substream(seed, "cinema")`), so adding the site moved no other row. Some
|
|
8
|
+
* showtimes are sold out on purpose, and some are nearly full with only
|
|
9
|
+
* single seats left (no two side by side): a search has to read free seats,
|
|
10
|
+
* not just the programme.
|
|
11
|
+
*/
|
|
12
|
+
export declare const CINEMA_SIZES: {
|
|
13
|
+
readonly films: 16;
|
|
14
|
+
readonly screensPerCinema: readonly [2, 3];
|
|
15
|
+
readonly filmsPerCinema: 6;
|
|
16
|
+
readonly customers: 30;
|
|
17
|
+
readonly bookings: 50;
|
|
18
|
+
readonly soldOut: 5;
|
|
19
|
+
readonly nearlyFull: 12;
|
|
20
|
+
};
|
|
21
|
+
export declare const CINEMA_GENRES: readonly ["action", "animation", "comedy", "drama", "horror", "science fiction"];
|
|
22
|
+
export declare function cinemaRows(seed: number): CinemaRows;
|