@bowmark/web 1.2.0 → 1.3.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/README.md CHANGED
@@ -29,7 +29,11 @@ autocomplete is the entire promise. What exists to call is listed, one row per
29
29
  function, in
30
30
  [`CAPABILITIES.md`](https://github.com/bowmark-ai/web/blob/main/CAPABILITIES.md) and
31
31
  [`PROVIDERS.md`](https://github.com/bowmark-ai/web/blob/main/PROVIDERS.md) — absolute
32
- URLs, because this README is read on npm where a relative link resolves to nothing.
32
+ URLs, because this README is read on npm where a relative link resolves to nothing. What
33
+ changed between versions is
34
+ [`CHANGELOG.md`](https://github.com/bowmark-ai/web/blob/main/CHANGELOG.md), which is
35
+ generated by diffing those same two tables, so it describes the callable surface and
36
+ nothing else.
33
37
 
34
38
  **Zero runtime dependencies, permanently.** Not an aspiration — the argument guard is
35
39
  plain JS rather than a validator library, and the envelope shapes are hand-restated
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bowmark/web",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "type": "module",
5
5
  "description": "The public client for the Bowmark capability library — real TypeScript for the whole bowmark.* surface, with no Bowmark source on the caller's disk. ZERO runtime dependencies, deliberately and permanently.",
6
6
  "license": "MIT",
@@ -5,8 +5,8 @@
5
5
  // rather than imported. An `import` or `export` at the top level of this file would
6
6
  // turn it into a module and every declaration below would stop being global.
7
7
  //
8
- // Manifest version: 11b1a109d7e69ffbbcccb30182dd5333770aeb23ab75946f15d55d7f7d84a7bf
9
- // 8 capabilities, 68 providers, 208 typed functions, 20 refused.
8
+ // Manifest version: 80346d8cf36c785e2b7fe0a77a87e5a51fa97ceb04ea11c951c71a9f7f75ad8e
9
+ // 8 capabilities, 71 providers, 214 typed functions, 20 refused.
10
10
  // 51,711 family members, sharing 2 interface(s) — declared once and pointed at, never repeated per member.
11
11
  //
12
12
  // REFUSED — these functions are real and callable, and their declared arguments
@@ -1965,6 +1965,102 @@ interface CloudflareSearchDomainAvailabilityResult {
1965
1965
  }
1966
1966
  }
1967
1967
 
1968
+ declare namespace BowmarkProvider_decked {
1969
+ // ── DECKED — the unit's own declarations, verbatim ──
1970
+ // DECKED's OWN shapes — not a capability contract.
1971
+
1972
+ type DeckedCabSideOption = "Cab-side Gap" | "Load Floor";
1973
+
1974
+ interface DeckedFit {
1975
+ vehicleClass: string; // the site's own product handle, e.g. "drawers-fullsize"
1976
+ vehicleClassTitle: string;
1977
+ model: string; // e.g. "Ford F150 (2004-2014)"
1978
+ fitOption: string | null; // a bed length or wheel base — null for a class with only "Model" (SUV, Service Body)
1979
+ sku: string;
1980
+ price: number;
1981
+ priceFormatted: string;
1982
+ available: boolean;
1983
+ url: string; // the class's product page, preselecting this exact variant
1984
+ }
1985
+
1986
+ interface DeckedVehicleClass {
1987
+ handle: string;
1988
+ title: string;
1989
+ url: string;
1990
+ secondOption: string | null; // "Bed Length" | "Wheel Base" | null
1991
+ fits: DeckedFit[];
1992
+ }
1993
+
1994
+ interface DeckedFitmentResult {
1995
+ query: string;
1996
+ bedLength: string | null;
1997
+ matched: boolean;
1998
+ fit: DeckedFit | null;
1999
+ candidates: DeckedFit[]; // populated when not narrowed to exactly one real fit
2000
+ message: string;
2001
+ }
2002
+
2003
+ interface DeckedCabSideOptionResult {
2004
+ query: string;
2005
+ bedLength: string;
2006
+ option: DeckedCabSideOption;
2007
+ compatible: boolean; // false is a real, expected "does not fit" answer — not an error
2008
+ fit: DeckedFit | null;
2009
+ reason: string | null;
2010
+ baseFit: DeckedFit | null; // the "Cab-side Gap" fit at the same vehicle + bed length (DECKED's standard option), for the price delta
2011
+ }
2012
+
2013
+ /**
2014
+ * DECKED's truck-bed/SUV/cargo-van Drawer System vehicle-fitment catalog — list every vehicle
2015
+ * class and model DECKED fits, read one class's full fit list (model, bed length/wheel base,
2016
+ * exact SKU and live price), resolve a free-text vehicle to its real fitted SKU and price, and
2017
+ * price the Load Floor vs Cab-side Gap 8'-bed accessory-pack option (including a real fitment
2018
+ * rejection when a vehicle has no matching SKU), all off the storefront's own live catalog
2019
+ * rather than a researched estimate.
2020
+ */
2021
+ interface Unit {
2022
+ /**
2023
+ * Lists every real DECKED vehicle fit across all six vehicle classes (SUV, Full-Size, Midsize,
2024
+ * Cargo Van, Service Body, RamBox) from the storefront's own live catalog — model, bed
2025
+ * length/wheel base (where the class has one), exact SKU, live price and availability. `query`
2026
+ * (optional) narrows the list by a fuzzy match on the vehicle make/model text, e.g. "4runner"
2027
+ * or "f150". Excludes the generic /products/drawers "Style: Trucks" decoy, which carries no
2028
+ * real per-vehicle fitment.
2029
+ */
2030
+ searchFits(query?: string): Promise<DeckedFit[]>;
2031
+
2032
+ /**
2033
+ * Reads one vehicle class's complete fit list — a handle (e.g. "drawers-fullsize") or a
2034
+ * shopper-shaped name (e.g. "Full-Size", "SUV", "Cargo Van") — every model it fits, each with
2035
+ * its own bed lengths / wheel bases, SKUs, live prices and availability. THROWS on an
2036
+ * unrecognized class, naming searchFits() as the way to find current ones.
2037
+ */
2038
+ getVehicleClass(vehicleClass: string): Promise<DeckedVehicleClass>;
2039
+
2040
+ /**
2041
+ * Resolves a free-text vehicle (e.g. "Toyota 4Runner 2023", "Ford F-150 2015") to its real
2042
+ * fitted SKU and live price, mirroring the on-page widget's own Make/Model/Year -> Bed Length
2043
+ * narrowing flow. `matched: true` with a populated `fit` means exactly one real fit narrowed
2044
+ * to; otherwise `candidates` lists every real fit that DID match the vehicle (pass `bedLength`
2045
+ * to narrow a class that needs one, or read `fitOption` off a candidate). Never throws for an
2046
+ * ambiguous or zero-bed-length match — an unmatched vehicle name is the one case this DOES
2047
+ * treat as a caller error (throws, naming searchFits()).
2048
+ */
2049
+ resolveFitment(vehicleQuery: string, bedLength?: string): Promise<DeckedFitmentResult>;
2050
+
2051
+ /**
2052
+ * Prices DECKED's 8'-bed cab-side accessory-pack option — "Cab-side Gap" or "Load Floor" — for
2053
+ * one vehicle + bed length, against the two real accessory-pack product handles the site
2054
+ * publishes. `compatible: false` + a `reason` is a REAL, expected answer (not an error) for a
2055
+ * vehicle whose class has no 8'-bed SKU in that product line — e.g. an SUV, which has no Bed
2056
+ * Length option at all. `baseFit` (when resolvable) is the "Cab-side Gap" fit at the same
2057
+ * vehicle + bed length — DECKED's standard 8' option — so a caller can read the real dollar
2058
+ * delta the Load Floor upgrade costs.
2059
+ */
2060
+ priceCabSideOption(vehicleQuery: string, bedLength: string, option: DeckedCabSideOption): Promise<DeckedCabSideOptionResult>;
2061
+ }
2062
+ }
2063
+
1968
2064
  declare namespace BowmarkProvider_dickssportinggoods {
1969
2065
  // ── DICK'S Sporting Goods — the unit's own declarations, verbatim ──
1970
2066
  interface dickssportinggoodsDayHours {
@@ -5952,6 +6048,31 @@ interface LiquiddeathLiveCart {
5952
6048
  }
5953
6049
  }
5954
6050
 
6051
+ declare namespace BowmarkProvider_lonelyplanet {
6052
+ // ── Lonely Planet — the unit's own declarations, verbatim ──
6053
+ interface LonelyPlanetSearchResult {
6054
+ title: string;
6055
+ subtitle: string | null;
6056
+ collection: string; // e.g. "destinationAssemblies", "products", "journeysItineraries"
6057
+ url: string;
6058
+ }
6059
+
6060
+ /**
6061
+ * Travel guides: destination guides, site search, Best in Travel picks, curated trips and
6062
+ * guidebooks.
6063
+ */
6064
+ interface Unit {
6065
+ /**
6066
+ * Searches lonelyplanet.com's site-wide index — destinations, articles, curated trip
6067
+ * itineraries, guidebooks and points of interest — for a free-text query, the way the site's
6068
+ * own search bar does. Returns each match's title, subtitle, its `collection` (the site's own
6069
+ * result-type tag, e.g. "destinationAssemblies", "products") and a resolvable url. This is the
6070
+ * entry point for a caller who does not yet know which destination page or guide they want.
6071
+ */
6072
+ search(query: string): Promise<LonelyPlanetSearchResult[]>;
6073
+ }
6074
+ }
6075
+
5955
6076
  declare namespace BowmarkProvider_lufthansa {
5956
6077
  // ── Lufthansa — the unit's own declarations, verbatim ──
5957
6078
  interface LufthansaFlightLeg {
@@ -8883,6 +9004,47 @@ interface SamsclubMembershipPlan {
8883
9004
  }
8884
9005
  }
8885
9006
 
9007
+ declare namespace BowmarkProvider_sears {
9008
+ // ── Sears — the unit's own declarations, verbatim ──
9009
+ interface SearsSearchPrice {
9010
+ currentAmount: number;
9011
+ currentDisplay: string;
9012
+ regularAmount: number | null;
9013
+ regularDisplay: string | null;
9014
+ onSale: boolean;
9015
+ }
9016
+ interface SearsSearchResult {
9017
+ productId: string;
9018
+ url: string;
9019
+ name: string;
9020
+ brand: string | null;
9021
+ price: SearsSearchPrice;
9022
+ thumbnail: string | null;
9023
+ rating: number | null;
9024
+ reviewCount: number | null;
9025
+ totalCount: number;
9026
+ }
9027
+ interface SearsSearchQuery {
9028
+ query: string;
9029
+ zipCode?: string;
9030
+ limit?: number;
9031
+ }
9032
+
9033
+ /** Sears' own storefront — product search, product detail, fulfillment/stock and store locator. */
9034
+ interface Unit {
9035
+ /**
9036
+ * Searches Sears' live catalog by free-text keyword the way the site's own search bar does,
9037
+ * returning matching product rows: id, name, brand, current and regular price, a thumbnail,
9038
+ * rating/review count and the site's own total match count. A query with no matches returns an
9039
+ * empty array — Sears not carrying something is a real, common answer, not an error. `zipCode`
9040
+ * narrows price/availability the way the site's own zip cookie does; omit it for the site's
9041
+ * own default (New York, 10101). Returns one page (up to 48 rows); the site publishes no
9042
+ * further paging parameter this function reaches.
9043
+ */
9044
+ search(query: SearsSearchQuery): Promise<SearsSearchResult[]>;
9045
+ }
9046
+ }
9047
+
8886
9048
  declare namespace BowmarkProvider_selectblinds {
8887
9049
  // ── SelectBlinds — the unit's own declarations, verbatim ──
8888
9050
  // SelectBlinds' OWN shapes — not a capability contract.
@@ -10577,6 +10739,7 @@ interface BowmarkProviders {
10577
10739
  chriscraft: BowmarkProvider_chriscraft.Unit;
10578
10740
  classpass: BowmarkProvider_classpass.Unit;
10579
10741
  cloudflare: BowmarkProvider_cloudflare.Unit;
10742
+ decked: BowmarkProvider_decked.Unit;
10580
10743
  dickssportinggoods: BowmarkProvider_dickssportinggoods.Unit;
10581
10744
  dillards: BowmarkProvider_dillards.Unit;
10582
10745
  discounttire: BowmarkProvider_discounttire.Unit;
@@ -10600,6 +10763,7 @@ interface BowmarkProviders {
10600
10763
  labcorp: BowmarkProvider_labcorp.Unit;
10601
10764
  linkedin: BowmarkProvider_linkedin.Unit;
10602
10765
  liquiddeath: BowmarkProvider_liquiddeath.Unit;
10766
+ lonelyplanet: BowmarkProvider_lonelyplanet.Unit;
10603
10767
  lufthansa: BowmarkProvider_lufthansa.Unit;
10604
10768
  mailchimp: BowmarkProvider_mailchimp.Unit;
10605
10769
  mcdonalds: BowmarkProvider_mcdonalds.Unit;
@@ -10621,6 +10785,7 @@ interface BowmarkProviders {
10621
10785
  reddit: BowmarkProvider_reddit.Unit;
10622
10786
  ritani: BowmarkProvider_ritani.Unit;
10623
10787
  samsclub: BowmarkProvider_samsclub.Unit;
10788
+ sears: BowmarkProvider_sears.Unit;
10624
10789
  selectblinds: BowmarkProvider_selectblinds.Unit;
10625
10790
  semihandmade: BowmarkProvider_semihandmade.Unit;
10626
10791
  soundcloud: BowmarkProvider_soundcloud.Unit;
@@ -5,13 +5,13 @@
5
5
  // declares no readable argument shape — not an absent one, which is what the
6
6
  // guard fails closed on.
7
7
  //
8
- // Manifest version: 11b1a109d7e69ffbbcccb30182dd5333770aeb23ab75946f15d55d7f7d84a7bf
9
- // 202 checked, 20 unchecked.
8
+ // Manifest version: 80346d8cf36c785e2b7fe0a77a87e5a51fa97ceb04ea11c951c71a9f7f75ad8e
9
+ // 208 checked, 20 unchecked.
10
10
 
11
11
  import type { ValidatorTable } from "../validate.js";
12
12
 
13
13
  export const VALIDATORS: ValidatorTable = {
14
- "version": "11b1a109d7e69ffbbcccb30182dd5333770aeb23ab75946f15d55d7f7d84a7bf",
14
+ "version": "80346d8cf36c785e2b7fe0a77a87e5a51fa97ceb04ea11c951c71a9f7f75ad8e",
15
15
  "units": {
16
16
  "cars": {
17
17
  "defs": {
@@ -2143,6 +2143,83 @@ export const VALIDATORS: ValidatorTable = {
2143
2143
  ]
2144
2144
  }
2145
2145
  },
2146
+ "providers.decked": {
2147
+ "defs": {
2148
+ "DeckedCabSideOption": {
2149
+ "k": "union",
2150
+ "of": [
2151
+ {
2152
+ "k": "literal",
2153
+ "v": "Cab-side Gap"
2154
+ },
2155
+ {
2156
+ "k": "literal",
2157
+ "v": "Load Floor"
2158
+ }
2159
+ ]
2160
+ }
2161
+ },
2162
+ "functions": {
2163
+ "searchFits": [
2164
+ {
2165
+ "name": "query",
2166
+ "schema": {
2167
+ "k": "string"
2168
+ },
2169
+ "optional": true
2170
+ }
2171
+ ],
2172
+ "getVehicleClass": [
2173
+ {
2174
+ "name": "vehicleClass",
2175
+ "schema": {
2176
+ "k": "string"
2177
+ },
2178
+ "optional": false
2179
+ }
2180
+ ],
2181
+ "resolveFitment": [
2182
+ {
2183
+ "name": "vehicleQuery",
2184
+ "schema": {
2185
+ "k": "string"
2186
+ },
2187
+ "optional": false
2188
+ },
2189
+ {
2190
+ "name": "bedLength",
2191
+ "schema": {
2192
+ "k": "string"
2193
+ },
2194
+ "optional": true
2195
+ }
2196
+ ],
2197
+ "priceCabSideOption": [
2198
+ {
2199
+ "name": "vehicleQuery",
2200
+ "schema": {
2201
+ "k": "string"
2202
+ },
2203
+ "optional": false
2204
+ },
2205
+ {
2206
+ "name": "bedLength",
2207
+ "schema": {
2208
+ "k": "string"
2209
+ },
2210
+ "optional": false
2211
+ },
2212
+ {
2213
+ "name": "option",
2214
+ "schema": {
2215
+ "k": "ref",
2216
+ "name": "DeckedCabSideOption"
2217
+ },
2218
+ "optional": false
2219
+ }
2220
+ ]
2221
+ }
2222
+ },
2146
2223
  "providers.dickssportinggoods": {
2147
2224
  "defs": {},
2148
2225
  "functions": {
@@ -4901,6 +4978,20 @@ export const VALIDATORS: ValidatorTable = {
4901
4978
  ]
4902
4979
  }
4903
4980
  },
4981
+ "providers.lonelyplanet": {
4982
+ "defs": {},
4983
+ "functions": {
4984
+ "search": [
4985
+ {
4986
+ "name": "query",
4987
+ "schema": {
4988
+ "k": "string"
4989
+ },
4990
+ "optional": false
4991
+ }
4992
+ ]
4993
+ }
4994
+ },
4904
4995
  "providers.lufthansa": {
4905
4996
  "defs": {},
4906
4997
  "functions": {
@@ -9014,6 +9105,48 @@ export const VALIDATORS: ValidatorTable = {
9014
9105
  "getMembershipPlans": []
9015
9106
  }
9016
9107
  },
9108
+ "providers.sears": {
9109
+ "defs": {
9110
+ "SearsSearchQuery": {
9111
+ "k": "object",
9112
+ "props": [
9113
+ {
9114
+ "name": "query",
9115
+ "schema": {
9116
+ "k": "string"
9117
+ },
9118
+ "optional": false
9119
+ },
9120
+ {
9121
+ "name": "zipCode",
9122
+ "schema": {
9123
+ "k": "string"
9124
+ },
9125
+ "optional": true
9126
+ },
9127
+ {
9128
+ "name": "limit",
9129
+ "schema": {
9130
+ "k": "number"
9131
+ },
9132
+ "optional": true
9133
+ }
9134
+ ]
9135
+ }
9136
+ },
9137
+ "functions": {
9138
+ "search": [
9139
+ {
9140
+ "name": "query",
9141
+ "schema": {
9142
+ "k": "ref",
9143
+ "name": "SearsSearchQuery"
9144
+ },
9145
+ "optional": false
9146
+ }
9147
+ ]
9148
+ }
9149
+ },
9017
9150
  "providers.selectblinds": {
9018
9151
  "defs": {},
9019
9152
  "functions": {
package/src/index.ts CHANGED
@@ -17,12 +17,14 @@
17
17
  // the two must stay in sync — see `packages/runtime/src/namespace.ts`.
18
18
 
19
19
  import { client } from "./session.js";
20
- import { type ClientOptions, type RunEnvelope, postRun, resolveClient } from "./transport.js";
20
+ import { type ClientOptions, postRun, type RunEnvelope, resolveClient } from "./transport.js";
21
21
 
22
+ export { type WireProblem, wireProblem } from "./guard.js";
23
+ export { client, openManagedSession, type SessionHandle, session } from "./session.js";
22
24
  export {
25
+ type AuthNeed,
23
26
  BowmarkError,
24
27
  BowmarkNeedsUserError,
25
- type AuthNeed,
26
28
  type CallEnvelope,
27
29
  type ClientOptions,
28
30
  type ClosedSession,
@@ -31,8 +33,6 @@ export {
31
33
  type OpenedSession,
32
34
  type RunEnvelope,
33
35
  } from "./transport.js";
34
- export { type WireProblem, wireProblem } from "./guard.js";
35
- export { type SessionHandle, client, openManagedSession, session } from "./session.js";
36
36
 
37
37
  /** The whole callable library, typed. `await bowmark.music.search("aphex twin")`.
38
38
  *