@minmaps-dev/mm-web-sdk 1.0.0-rc.44 → 1.0.0-rc.46
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 +11 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +373 -185
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/jacs.cjs +2 -0
- package/dist/jacs.cjs.map +1 -0
- package/dist/jacs.d.ts +319 -0
- package/dist/jacs.js +2 -0
- package/dist/jacs.js.map +1 -0
- package/dist/react.cjs +1 -1
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.ts +5 -1
- package/dist/react.js +1 -1
- package/dist/react.js.map +1 -1
- package/package.json +8 -1
- package/src/themes/alt3-hybrid-style.json +1 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Map, IControl, ControlPosition
|
|
1
|
+
import { Map, StyleSpecification, IControl, ControlPosition } from 'maplibre-gl';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Represents a floor in a building
|
|
@@ -637,7 +637,10 @@ type SDKConfig = {
|
|
|
637
637
|
deviceId?: string | number;
|
|
638
638
|
};
|
|
639
639
|
jacs: {
|
|
640
|
-
|
|
640
|
+
/** `snapshot` reads published venue snapshots from a CDN — what clients
|
|
641
|
+
* should use. `proxy`/`direct` read live JACS (the draft): local dev and
|
|
642
|
+
* CMS preview. */
|
|
643
|
+
mode: 'proxy' | 'direct' | 'snapshot';
|
|
641
644
|
host?: string;
|
|
642
645
|
auth?: {
|
|
643
646
|
clientId: string;
|
|
@@ -645,6 +648,7 @@ type SDKConfig = {
|
|
|
645
648
|
password: string;
|
|
646
649
|
};
|
|
647
650
|
proxyBaseUrl?: string;
|
|
651
|
+
baseUrl?: string;
|
|
648
652
|
};
|
|
649
653
|
options?: SDKOptions;
|
|
650
654
|
};
|
|
@@ -1083,6 +1087,323 @@ declare function parseOpenHours(raw: unknown): OpenHours | null;
|
|
|
1083
1087
|
*/
|
|
1084
1088
|
declare function getOpenStatus(hours: OpenHours, now?: Date, options?: OpenStatusOptions): OpenStatus;
|
|
1085
1089
|
|
|
1090
|
+
type JacsProviderConfig = {
|
|
1091
|
+
mode: 'proxy';
|
|
1092
|
+
proxyBaseUrl?: string;
|
|
1093
|
+
fetchImpl?: typeof fetch;
|
|
1094
|
+
} | {
|
|
1095
|
+
mode: 'direct';
|
|
1096
|
+
host: string;
|
|
1097
|
+
clientId: string;
|
|
1098
|
+
username: string;
|
|
1099
|
+
password: string;
|
|
1100
|
+
fetchImpl?: typeof fetch;
|
|
1101
|
+
};
|
|
1102
|
+
type GetBuildingsArgs = {
|
|
1103
|
+
customerId: number | string;
|
|
1104
|
+
venueId: number | string;
|
|
1105
|
+
};
|
|
1106
|
+
type GetFloorsArgs = {
|
|
1107
|
+
customerId: number | string;
|
|
1108
|
+
venueId: number | string;
|
|
1109
|
+
buildingId: number | string;
|
|
1110
|
+
/** BCP-47 code (`es`, `en-US`). When set, JACS resolves floor `name` /
|
|
1111
|
+
* `description` to that locale instead of the customer's default. */
|
|
1112
|
+
locale?: string;
|
|
1113
|
+
};
|
|
1114
|
+
type GetDestinationsArgs = {
|
|
1115
|
+
customerId: number | string;
|
|
1116
|
+
venueId: number | string;
|
|
1117
|
+
/** See {@link GetFloorsArgs.locale}. */
|
|
1118
|
+
locale?: string;
|
|
1119
|
+
};
|
|
1120
|
+
type GetAmenitiesArgs = {
|
|
1121
|
+
customerId: number | string;
|
|
1122
|
+
/** See {@link GetFloorsArgs.locale}. */
|
|
1123
|
+
locale?: string;
|
|
1124
|
+
};
|
|
1125
|
+
type GetZonesArgs = {
|
|
1126
|
+
customerId: number | string;
|
|
1127
|
+
venueId: number | string;
|
|
1128
|
+
/** See {@link GetFloorsArgs.locale}. */
|
|
1129
|
+
locale?: string;
|
|
1130
|
+
};
|
|
1131
|
+
type GetMapLabelsArgs = {
|
|
1132
|
+
customerId: number | string;
|
|
1133
|
+
venueId: number | string;
|
|
1134
|
+
/** See {@link GetFloorsArgs.locale}. */
|
|
1135
|
+
locale?: string;
|
|
1136
|
+
};
|
|
1137
|
+
type GetVenueArgs = {
|
|
1138
|
+
customerId: number | string;
|
|
1139
|
+
venueId: number | string;
|
|
1140
|
+
};
|
|
1141
|
+
type JacsVenue = Record<string, any>;
|
|
1142
|
+
type GetBuildingFullArgs = {
|
|
1143
|
+
customerId: number | string;
|
|
1144
|
+
venueId: number | string;
|
|
1145
|
+
buildingId: number | string;
|
|
1146
|
+
mapProfile?: string;
|
|
1147
|
+
geojson?: boolean;
|
|
1148
|
+
};
|
|
1149
|
+
type JacsBuildingFull = Record<string, any>;
|
|
1150
|
+
type JacsVenueAll = Record<string, any>;
|
|
1151
|
+
type GetStylesheet3dArgs = {
|
|
1152
|
+
customerId: number | string;
|
|
1153
|
+
venueId: number | string;
|
|
1154
|
+
buildingId: number | string;
|
|
1155
|
+
};
|
|
1156
|
+
type GetFloorMapGeoJsonArgs = {
|
|
1157
|
+
customerId: number | string;
|
|
1158
|
+
venueId: number | string;
|
|
1159
|
+
buildingId: number | string;
|
|
1160
|
+
floorId: number | string;
|
|
1161
|
+
};
|
|
1162
|
+
type GetPolygonLayersArgs = {
|
|
1163
|
+
customerId: number | string;
|
|
1164
|
+
};
|
|
1165
|
+
type GetFloorMapTemplate3dArgs = {
|
|
1166
|
+
customerId: number | string;
|
|
1167
|
+
venueId: number | string;
|
|
1168
|
+
buildingId: number | string;
|
|
1169
|
+
floorId: number | string;
|
|
1170
|
+
};
|
|
1171
|
+
type JacsBuilding = {
|
|
1172
|
+
id?: number | string;
|
|
1173
|
+
buildingId?: number | string;
|
|
1174
|
+
name?: string;
|
|
1175
|
+
isDefault?: boolean;
|
|
1176
|
+
default?: boolean;
|
|
1177
|
+
[key: string]: any;
|
|
1178
|
+
};
|
|
1179
|
+
type JacsFloor = Record<string, any>;
|
|
1180
|
+
type JacsDestination = Record<string, any>;
|
|
1181
|
+
type JacsAmenity = Record<string, any>;
|
|
1182
|
+
type JacsZone = Record<string, any>;
|
|
1183
|
+
type JacsMapLabel = Record<string, any>;
|
|
1184
|
+
type JacsPolygonLayer = Record<string, any>;
|
|
1185
|
+
/**
|
|
1186
|
+
* This matches the “map-template/3d” shape you pasted earlier:
|
|
1187
|
+
* rows keyed by layerName with paint-ish properties like fill, line-color, etc.
|
|
1188
|
+
*/
|
|
1189
|
+
type JacsMapTemplate3dRow = {
|
|
1190
|
+
layerName: string;
|
|
1191
|
+
fill?: string | null;
|
|
1192
|
+
'fill-opacity'?: number | null;
|
|
1193
|
+
fillAntialias?: boolean | null;
|
|
1194
|
+
'fill-pattern'?: string | null;
|
|
1195
|
+
'line-color'?: string | null;
|
|
1196
|
+
'line-width'?: number | null;
|
|
1197
|
+
lineOpacity?: number | null;
|
|
1198
|
+
strokeWidth?: number | null;
|
|
1199
|
+
strokeOpacity?: number | null;
|
|
1200
|
+
'fill-extrusion-color'?: string | null;
|
|
1201
|
+
'fill-extrusion-height'?: number | null;
|
|
1202
|
+
'fill-extrusion-opacity'?: number | null;
|
|
1203
|
+
'fill-extrusion-base'?: number | null;
|
|
1204
|
+
'fill-extrusion-pattern'?: string | null;
|
|
1205
|
+
[key: string]: any;
|
|
1206
|
+
};
|
|
1207
|
+
declare class JacsProvider {
|
|
1208
|
+
private mode;
|
|
1209
|
+
private proxyBaseUrl;
|
|
1210
|
+
private direct;
|
|
1211
|
+
private fetchImpl;
|
|
1212
|
+
private tokenCache;
|
|
1213
|
+
constructor(config: JacsProviderConfig);
|
|
1214
|
+
/** `/customer/all` — every customer with its venues, for a venue picker. Each
|
|
1215
|
+
* entry is `{ customer, venues[] }`. Not venue-scoped. */
|
|
1216
|
+
getCustomersAll(): Promise<Record<string, any>[]>;
|
|
1217
|
+
getPolygonLayers(args: GetPolygonLayersArgs): Promise<JacsPolygonLayer[]>;
|
|
1218
|
+
getFloorMapTemplate3d(args: GetFloorMapTemplate3dArgs): Promise<JacsMapTemplate3dRow[]>;
|
|
1219
|
+
getFloors(args: GetFloorsArgs): Promise<JacsFloor[]>;
|
|
1220
|
+
/**
|
|
1221
|
+
* Hits the JEM venue full-call aggregator at /customer/{cid}/venue/{vid}/all.
|
|
1222
|
+
* Unlike /building/{bid}/full this endpoint does NOT go through Redis — JACS
|
|
1223
|
+
* assembles the response server-side from many controllers on every call, so
|
|
1224
|
+
* SDK consumers always see fresh data regardless of cache invalidation state.
|
|
1225
|
+
*
|
|
1226
|
+
* Response shape: { customer, venue, buildings: [{ floors }], waypoints[],
|
|
1227
|
+
* destinations[], amenities[], paths[], mapLabels[], devices[], zones[],
|
|
1228
|
+
* pathTypes[], mapProfiles[] }. Floor geojson is NOT included — the SDK
|
|
1229
|
+
* lazy-loads it via ensureFloorGeojson.
|
|
1230
|
+
*/
|
|
1231
|
+
getVenueAll(args: GetVenueArgs): Promise<JacsVenueAll>;
|
|
1232
|
+
getVenue(args: GetVenueArgs): Promise<JacsVenue>;
|
|
1233
|
+
getFloorMapGeojson(args: GetFloorMapGeoJsonArgs): Promise<GeoJSON.FeatureCollection>;
|
|
1234
|
+
getBuildingFull(args: GetBuildingFullArgs): Promise<JacsBuildingFull>;
|
|
1235
|
+
getDestinations(args: GetDestinationsArgs): Promise<JacsDestination[]>;
|
|
1236
|
+
/** Zones (department groupings). `name` / `description` are localized. */
|
|
1237
|
+
getZones(args: GetZonesArgs): Promise<JacsZone[]>;
|
|
1238
|
+
/**
|
|
1239
|
+
* CMS-authored map labels (street / area / wing names). The endpoint is
|
|
1240
|
+
* `/label`, not `/map-label` — the latter 404s. The localized `name` is on
|
|
1241
|
+
* the label template; each `instances[]` placement carries its own internal
|
|
1242
|
+
* `name` ("Parking Lot E - Instance 1") which is authoring metadata and is
|
|
1243
|
+
* never displayed.
|
|
1244
|
+
*/
|
|
1245
|
+
getMapLabels(args: GetMapLabelsArgs): Promise<JacsMapLabel[]>;
|
|
1246
|
+
/**
|
|
1247
|
+
* Amenities are **customer-scoped**, not venue-scoped. A
|
|
1248
|
+
* `/customer/{id}/venue/{id}/amenity` path also exists and returns the same
|
|
1249
|
+
* records, but it silently ignores `?locale=` — it answers with the base
|
|
1250
|
+
* (en-US) names for every locale, which reads as "translations aren't
|
|
1251
|
+
* working" rather than as a wrong URL. Only `/customer/{id}/amenity`
|
|
1252
|
+
* resolves the locale. Don't reintroduce the venue segment.
|
|
1253
|
+
*/
|
|
1254
|
+
getAmenities(args: GetAmenitiesArgs): Promise<JacsAmenity[]>;
|
|
1255
|
+
getBuildings(args: GetBuildingsArgs): Promise<JacsBuilding[]>;
|
|
1256
|
+
getStylesheet3d(args: GetStylesheet3dArgs): Promise<StyleSpecification>;
|
|
1257
|
+
invalidateToken(): void;
|
|
1258
|
+
getJson<T>(path: string): Promise<T>;
|
|
1259
|
+
private extractArray;
|
|
1260
|
+
private getJwtToken;
|
|
1261
|
+
private normalizeHost;
|
|
1262
|
+
private joinUrl;
|
|
1263
|
+
private safeReadText;
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
/** The JacsProvider methods the SDK's data layer reads. Both JacsProvider (live
|
|
1267
|
+
* JACS) and SnapshotProvider (published snapshots) implement them. */
|
|
1268
|
+
type JacsReader = Pick<JacsProvider, 'getVenueAll' | 'getFloorMapGeojson' | 'getDestinations' | 'getFloors' | 'getZones' | 'getMapLabels' | 'getAmenities' | 'getPolygonLayers' | 'getCustomersAll'>;
|
|
1269
|
+
type SnapshotProviderConfig = {
|
|
1270
|
+
/** Root of the snapshot host, e.g. `https://snapshots.example.com`. */
|
|
1271
|
+
baseUrl: string;
|
|
1272
|
+
fetchImpl?: typeof fetch;
|
|
1273
|
+
};
|
|
1274
|
+
/** Highest manifest `schemaVersion` this SDK can read. */
|
|
1275
|
+
declare const SNAPSHOT_SCHEMA_VERSION = 1;
|
|
1276
|
+
/**
|
|
1277
|
+
* The venue (or its customer) can't be shown from snapshots: it was never
|
|
1278
|
+
* published, or it was withdrawn (unpublished, disabled or deleted). Thrown
|
|
1279
|
+
* from `init()`; check `reason` to show "not published" vs "no longer
|
|
1280
|
+
* available".
|
|
1281
|
+
*/
|
|
1282
|
+
declare class SnapshotUnavailableError extends Error {
|
|
1283
|
+
readonly reason: 'not-published' | 'withdrawn';
|
|
1284
|
+
readonly customerId: string;
|
|
1285
|
+
readonly venueId: string | null;
|
|
1286
|
+
constructor(reason: 'not-published' | 'withdrawn', customerId: string, venueId: string | null);
|
|
1287
|
+
}
|
|
1288
|
+
/** The customer and venue snapshot versions a load is using. */
|
|
1289
|
+
type SnapshotVersions = {
|
|
1290
|
+
customer: number;
|
|
1291
|
+
venue: number;
|
|
1292
|
+
};
|
|
1293
|
+
/**
|
|
1294
|
+
* Result of `checkForUpdate`: whether what's published now differs from what
|
|
1295
|
+
* this instance loaded.
|
|
1296
|
+
*
|
|
1297
|
+
* - `current` — nothing newer is published.
|
|
1298
|
+
* - `available` — a newer customer or venue version is published; reload to
|
|
1299
|
+
* show it.
|
|
1300
|
+
* - `unavailable` — the venue (or its customer) has since been withdrawn or
|
|
1301
|
+
* was never published; a reload would fail with `SnapshotUnavailableError`.
|
|
1302
|
+
* - `incompatible` — a newer version is published in a schema this SDK can't
|
|
1303
|
+
* read; don't reload until the SDK is updated.
|
|
1304
|
+
*/
|
|
1305
|
+
type SnapshotUpdateCheck = {
|
|
1306
|
+
status: 'current';
|
|
1307
|
+
loaded: SnapshotVersions;
|
|
1308
|
+
} | {
|
|
1309
|
+
status: 'available';
|
|
1310
|
+
loaded: SnapshotVersions;
|
|
1311
|
+
latest: SnapshotVersions;
|
|
1312
|
+
} | {
|
|
1313
|
+
status: 'unavailable';
|
|
1314
|
+
loaded: SnapshotVersions;
|
|
1315
|
+
reason: 'not-published' | 'withdrawn';
|
|
1316
|
+
} | {
|
|
1317
|
+
status: 'incompatible';
|
|
1318
|
+
loaded: SnapshotVersions;
|
|
1319
|
+
schemaVersion: number;
|
|
1320
|
+
};
|
|
1321
|
+
/**
|
|
1322
|
+
* Picks the locale folder to read. Exact (case-insensitive) match first, then a
|
|
1323
|
+
* same-language match (`es` → `es-US`), then `fallback` — so a locale the
|
|
1324
|
+
* customer added after this venue was last published falls back to the default
|
|
1325
|
+
* language until the venue is republished.
|
|
1326
|
+
*/
|
|
1327
|
+
declare function resolveSnapshotLocale(requested: string | undefined, available: string[], fallback: string): string;
|
|
1328
|
+
declare class SnapshotProvider implements JacsReader {
|
|
1329
|
+
private baseUrl;
|
|
1330
|
+
private fetchImpl;
|
|
1331
|
+
private snapshots;
|
|
1332
|
+
private files;
|
|
1333
|
+
constructor(config: SnapshotProviderConfig);
|
|
1334
|
+
/** `directory.json` — published, public customers with their venues, in
|
|
1335
|
+
* `/customer/all`'s `{ customer, venues[] }` shape. */
|
|
1336
|
+
getCustomersAll(): Promise<Record<string, any>[]>;
|
|
1337
|
+
/** venue.json with the customer-wide pieces put back where `/all` has them. */
|
|
1338
|
+
getVenueAll(args: {
|
|
1339
|
+
customerId: number | string;
|
|
1340
|
+
venueId: number | string;
|
|
1341
|
+
}): Promise<JacsVenueAll>;
|
|
1342
|
+
getFloorMapGeojson(args: {
|
|
1343
|
+
customerId: number | string;
|
|
1344
|
+
venueId: number | string;
|
|
1345
|
+
floorId: number | string;
|
|
1346
|
+
}): Promise<GeoJSON.FeatureCollection>;
|
|
1347
|
+
getDestinations(args: {
|
|
1348
|
+
customerId: number | string;
|
|
1349
|
+
venueId: number | string;
|
|
1350
|
+
locale?: string;
|
|
1351
|
+
}): Promise<JacsDestination[]>;
|
|
1352
|
+
/** The snapshot holds the first building's floors only — the one the SDK reads. */
|
|
1353
|
+
getFloors(args: {
|
|
1354
|
+
customerId: number | string;
|
|
1355
|
+
venueId: number | string;
|
|
1356
|
+
locale?: string;
|
|
1357
|
+
}): Promise<JacsFloor[]>;
|
|
1358
|
+
getZones(args: {
|
|
1359
|
+
customerId: number | string;
|
|
1360
|
+
venueId: number | string;
|
|
1361
|
+
locale?: string;
|
|
1362
|
+
}): Promise<JacsZone[]>;
|
|
1363
|
+
getMapLabels(args: {
|
|
1364
|
+
customerId: number | string;
|
|
1365
|
+
venueId: number | string;
|
|
1366
|
+
locale?: string;
|
|
1367
|
+
}): Promise<JacsMapLabel[]>;
|
|
1368
|
+
getAmenities(args: {
|
|
1369
|
+
customerId: number | string;
|
|
1370
|
+
locale?: string;
|
|
1371
|
+
}): Promise<JacsAmenity[]>;
|
|
1372
|
+
getPolygonLayers(args: {
|
|
1373
|
+
customerId: number | string;
|
|
1374
|
+
}): Promise<JacsPolygonLayer[]>;
|
|
1375
|
+
/** The manifest versions this instance is reading, once loaded. */
|
|
1376
|
+
getVersions(customerId: number | string, venueId: number | string): Promise<{
|
|
1377
|
+
customer: number;
|
|
1378
|
+
venue: number;
|
|
1379
|
+
}>;
|
|
1380
|
+
/**
|
|
1381
|
+
* Re-reads both manifests (without changing what this instance reads) and
|
|
1382
|
+
* compares them with the versions it loaded. Rejects when a manifest can't
|
|
1383
|
+
* be fetched — a network failure says nothing about what's published, so
|
|
1384
|
+
* try again later.
|
|
1385
|
+
*/
|
|
1386
|
+
checkForUpdate(customerId: number | string, venueId: number | string): Promise<SnapshotUpdateCheck>;
|
|
1387
|
+
private venueLocalized;
|
|
1388
|
+
private customerRef;
|
|
1389
|
+
private venueRef;
|
|
1390
|
+
/**
|
|
1391
|
+
* Runs `read` against the pinned snapshots. The publisher keeps old versions
|
|
1392
|
+
* for a while, but a long-running client (a kiosk) can outlive one: if a
|
|
1393
|
+
* pinned version's file is gone, re-read that manifest and retry once on the
|
|
1394
|
+
* current version. Data already loaded from the old version stays as it was;
|
|
1395
|
+
* files fetched from now on come from the new one.
|
|
1396
|
+
*/
|
|
1397
|
+
private pinned;
|
|
1398
|
+
/** The current manifest, read once per instance: a loaded venue keeps
|
|
1399
|
+
* reading the version it started with (see `pinned` for when it can't). */
|
|
1400
|
+
private snapshot;
|
|
1401
|
+
/** Versioned files are immutable, so one fetch per file per instance. */
|
|
1402
|
+
private file;
|
|
1403
|
+
private list;
|
|
1404
|
+
private fetchJson;
|
|
1405
|
+
}
|
|
1406
|
+
|
|
1086
1407
|
declare class MinuteMaps {
|
|
1087
1408
|
private config;
|
|
1088
1409
|
private map;
|
|
@@ -1153,6 +1474,10 @@ declare class MinuteMaps {
|
|
|
1153
1474
|
* `setLocale()` can rebuild + re-emit `routeReady` with retranslated
|
|
1154
1475
|
* step text without recomputing the path. Cleared on route failure. */
|
|
1155
1476
|
private lastRouteDestinationPoi;
|
|
1477
|
+
/** Waypoint ids (stringified) of the connector(s) the active transition
|
|
1478
|
+
* step rides — empty unless `setActiveStep` is on a transition. Drives
|
|
1479
|
+
* `applyRouteConnectorHighlight`. */
|
|
1480
|
+
private activeTransitionWaypointIds;
|
|
1156
1481
|
private amenityManager;
|
|
1157
1482
|
private wayfinding;
|
|
1158
1483
|
private highlightManager;
|
|
@@ -1415,6 +1740,18 @@ declare class MinuteMaps {
|
|
|
1415
1740
|
* repeatedly; the fetch for a given code happens once.
|
|
1416
1741
|
*/
|
|
1417
1742
|
prefetchLocale(locale: string): Promise<void>;
|
|
1743
|
+
/**
|
|
1744
|
+
* Whether newer data has been published since this venue loaded, for
|
|
1745
|
+
* long-running displays (kiosks) that should pick up a publish. Snapshot
|
|
1746
|
+
* mode only: it re-reads the venue's and customer's manifests and compares
|
|
1747
|
+
* them with the versions in use; `{ status: 'unsupported' }` in live
|
|
1748
|
+
* (`proxy`/`direct`) modes. A loaded venue never switches versions by
|
|
1749
|
+
* itself — on `available`, reload (ideally while nobody is using the
|
|
1750
|
+
* screen). Rejects when the manifests can't be fetched; try again later.
|
|
1751
|
+
*/
|
|
1752
|
+
checkForUpdate(): Promise<SnapshotUpdateCheck | {
|
|
1753
|
+
status: 'unsupported';
|
|
1754
|
+
}>;
|
|
1418
1755
|
/** Currently active locale (BCP-47), or `undefined` when no locale has
|
|
1419
1756
|
* been set — meaning JACS resolves names to the customer's default. */
|
|
1420
1757
|
getActiveLocale(): string | undefined;
|
|
@@ -1732,9 +2069,10 @@ declare class MinuteMaps {
|
|
|
1732
2069
|
* theme's `route-line-active` layer paints it in gold over the
|
|
1733
2070
|
* muted base route.
|
|
1734
2071
|
*
|
|
1735
|
-
* Transition steps (cross-floor elevator / stair hops) clear the
|
|
1736
|
-
* highlight —
|
|
1737
|
-
*
|
|
2072
|
+
* Transition steps (cross-floor elevator / stair hops) clear the line
|
|
2073
|
+
* highlight — there's no meaningful on-floor segment to paint — and
|
|
2074
|
+
* instead swap the connector(s) the step rides to their highlighted
|
|
2075
|
+
* sprite badge (`CONNECTOR_HIGHLIGHTED_ICON_SUFFIX`).
|
|
1738
2076
|
*
|
|
1739
2077
|
* Pass `null` to clear the highlight without changing the floor or
|
|
1740
2078
|
* tearing down the route.
|
|
@@ -1742,6 +2080,17 @@ declare class MinuteMaps {
|
|
|
1742
2080
|
setActiveStep(step: WayfindStep | null): Promise<void>;
|
|
1743
2081
|
private writeActiveStepHighlight;
|
|
1744
2082
|
private clearActiveStepHighlight;
|
|
2083
|
+
/**
|
|
2084
|
+
* Point `ROUTE_CONNECTOR_LAYER_ID`'s `icon-image` at the highlighted badge
|
|
2085
|
+
* for the connector(s) the active transition step rides, and back at the
|
|
2086
|
+
* plain `iconId` otherwise. Imperative like the layer's filter, so it's
|
|
2087
|
+
* re-run from `updateRouteFloorFilter` after a theme swap drops it.
|
|
2088
|
+
*
|
|
2089
|
+
* `coalesce` over `image` falls back to the plain badge when the sprite has
|
|
2090
|
+
* no `-highlighted` copy of an id (a custom CMS connector icon, or a sprite
|
|
2091
|
+
* that predates the variant) rather than drawing nothing.
|
|
2092
|
+
*/
|
|
2093
|
+
private applyRouteConnectorHighlight;
|
|
1745
2094
|
clearRoute(): void;
|
|
1746
2095
|
/**
|
|
1747
2096
|
* Put the end-of-route marker on `poi`, or take it down (`null`). With
|
|
@@ -2109,182 +2458,12 @@ declare class MinuteMaps {
|
|
|
2109
2458
|
}
|
|
2110
2459
|
declare function createMinuteMapsSDK(config: SDKConfig): MinuteMaps;
|
|
2111
2460
|
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
host: string;
|
|
2119
|
-
clientId: string;
|
|
2120
|
-
username: string;
|
|
2121
|
-
password: string;
|
|
2122
|
-
fetchImpl?: typeof fetch;
|
|
2123
|
-
};
|
|
2124
|
-
type GetBuildingsArgs = {
|
|
2125
|
-
customerId: number | string;
|
|
2126
|
-
venueId: number | string;
|
|
2127
|
-
};
|
|
2128
|
-
type GetFloorsArgs = {
|
|
2129
|
-
customerId: number | string;
|
|
2130
|
-
venueId: number | string;
|
|
2131
|
-
buildingId: number | string;
|
|
2132
|
-
/** BCP-47 code (`es`, `en-US`). When set, JACS resolves floor `name` /
|
|
2133
|
-
* `description` to that locale instead of the customer's default. */
|
|
2134
|
-
locale?: string;
|
|
2135
|
-
};
|
|
2136
|
-
type GetDestinationsArgs = {
|
|
2137
|
-
customerId: number | string;
|
|
2138
|
-
venueId: number | string;
|
|
2139
|
-
/** See {@link GetFloorsArgs.locale}. */
|
|
2140
|
-
locale?: string;
|
|
2141
|
-
};
|
|
2142
|
-
type GetAmenitiesArgs = {
|
|
2143
|
-
customerId: number | string;
|
|
2144
|
-
/** See {@link GetFloorsArgs.locale}. */
|
|
2145
|
-
locale?: string;
|
|
2146
|
-
};
|
|
2147
|
-
type GetZonesArgs = {
|
|
2148
|
-
customerId: number | string;
|
|
2149
|
-
venueId: number | string;
|
|
2150
|
-
/** See {@link GetFloorsArgs.locale}. */
|
|
2151
|
-
locale?: string;
|
|
2152
|
-
};
|
|
2153
|
-
type GetMapLabelsArgs = {
|
|
2154
|
-
customerId: number | string;
|
|
2155
|
-
venueId: number | string;
|
|
2156
|
-
/** See {@link GetFloorsArgs.locale}. */
|
|
2157
|
-
locale?: string;
|
|
2158
|
-
};
|
|
2159
|
-
type GetVenueArgs = {
|
|
2160
|
-
customerId: number | string;
|
|
2161
|
-
venueId: number | string;
|
|
2162
|
-
};
|
|
2163
|
-
type JacsVenue = Record<string, any>;
|
|
2164
|
-
type GetBuildingFullArgs = {
|
|
2165
|
-
customerId: number | string;
|
|
2166
|
-
venueId: number | string;
|
|
2167
|
-
buildingId: number | string;
|
|
2168
|
-
mapProfile?: string;
|
|
2169
|
-
geojson?: boolean;
|
|
2170
|
-
};
|
|
2171
|
-
type JacsBuildingFull = Record<string, any>;
|
|
2172
|
-
type JacsVenueAll = Record<string, any>;
|
|
2173
|
-
type GetStylesheet3dArgs = {
|
|
2174
|
-
customerId: number | string;
|
|
2175
|
-
venueId: number | string;
|
|
2176
|
-
buildingId: number | string;
|
|
2177
|
-
};
|
|
2178
|
-
type GetFloorMapGeoJsonArgs = {
|
|
2179
|
-
customerId: number | string;
|
|
2180
|
-
venueId: number | string;
|
|
2181
|
-
buildingId: number | string;
|
|
2182
|
-
floorId: number | string;
|
|
2183
|
-
};
|
|
2184
|
-
type GetPolygonLayersArgs = {
|
|
2185
|
-
customerId: number | string;
|
|
2186
|
-
};
|
|
2187
|
-
type GetFloorMapTemplate3dArgs = {
|
|
2188
|
-
customerId: number | string;
|
|
2189
|
-
venueId: number | string;
|
|
2190
|
-
buildingId: number | string;
|
|
2191
|
-
floorId: number | string;
|
|
2192
|
-
};
|
|
2193
|
-
type JacsBuilding = {
|
|
2194
|
-
id?: number | string;
|
|
2195
|
-
buildingId?: number | string;
|
|
2196
|
-
name?: string;
|
|
2197
|
-
isDefault?: boolean;
|
|
2198
|
-
default?: boolean;
|
|
2199
|
-
[key: string]: any;
|
|
2200
|
-
};
|
|
2201
|
-
type JacsFloor = Record<string, any>;
|
|
2202
|
-
type JacsDestination = Record<string, any>;
|
|
2203
|
-
type JacsAmenity = Record<string, any>;
|
|
2204
|
-
type JacsZone = Record<string, any>;
|
|
2205
|
-
type JacsMapLabel = Record<string, any>;
|
|
2206
|
-
type JacsPolygonLayer = Record<string, any>;
|
|
2207
|
-
/**
|
|
2208
|
-
* This matches the “map-template/3d” shape you pasted earlier:
|
|
2209
|
-
* rows keyed by layerName with paint-ish properties like fill, line-color, etc.
|
|
2210
|
-
*/
|
|
2211
|
-
type JacsMapTemplate3dRow = {
|
|
2212
|
-
layerName: string;
|
|
2213
|
-
fill?: string | null;
|
|
2214
|
-
'fill-opacity'?: number | null;
|
|
2215
|
-
fillAntialias?: boolean | null;
|
|
2216
|
-
'fill-pattern'?: string | null;
|
|
2217
|
-
'line-color'?: string | null;
|
|
2218
|
-
'line-width'?: number | null;
|
|
2219
|
-
lineOpacity?: number | null;
|
|
2220
|
-
strokeWidth?: number | null;
|
|
2221
|
-
strokeOpacity?: number | null;
|
|
2222
|
-
'fill-extrusion-color'?: string | null;
|
|
2223
|
-
'fill-extrusion-height'?: number | null;
|
|
2224
|
-
'fill-extrusion-opacity'?: number | null;
|
|
2225
|
-
'fill-extrusion-base'?: number | null;
|
|
2226
|
-
'fill-extrusion-pattern'?: string | null;
|
|
2227
|
-
[key: string]: any;
|
|
2228
|
-
};
|
|
2229
|
-
declare class JacsProvider {
|
|
2230
|
-
private mode;
|
|
2231
|
-
private proxyBaseUrl;
|
|
2232
|
-
private direct;
|
|
2233
|
-
private fetchImpl;
|
|
2234
|
-
private tokenCache;
|
|
2235
|
-
constructor(config: JacsProviderConfig);
|
|
2236
|
-
/** `/customer/all` — every customer with its venues, for a venue picker. Each
|
|
2237
|
-
* entry is `{ customer, venues[] }`. Not venue-scoped. */
|
|
2238
|
-
getCustomersAll(): Promise<Record<string, any>[]>;
|
|
2239
|
-
getPolygonLayers(args: GetPolygonLayersArgs): Promise<JacsPolygonLayer[]>;
|
|
2240
|
-
getFloorMapTemplate3d(args: GetFloorMapTemplate3dArgs): Promise<JacsMapTemplate3dRow[]>;
|
|
2241
|
-
getFloors(args: GetFloorsArgs): Promise<JacsFloor[]>;
|
|
2242
|
-
/**
|
|
2243
|
-
* Hits the JEM venue full-call aggregator at /customer/{cid}/venue/{vid}/all.
|
|
2244
|
-
* Unlike /building/{bid}/full this endpoint does NOT go through Redis — JACS
|
|
2245
|
-
* assembles the response server-side from many controllers on every call, so
|
|
2246
|
-
* SDK consumers always see fresh data regardless of cache invalidation state.
|
|
2247
|
-
*
|
|
2248
|
-
* Response shape: { customer, venue, buildings: [{ floors }], waypoints[],
|
|
2249
|
-
* destinations[], amenities[], paths[], mapLabels[], devices[], zones[],
|
|
2250
|
-
* pathTypes[], mapProfiles[] }. Floor geojson is NOT included — the SDK
|
|
2251
|
-
* lazy-loads it via ensureFloorGeojson.
|
|
2252
|
-
*/
|
|
2253
|
-
getVenueAll(args: GetVenueArgs): Promise<JacsVenueAll>;
|
|
2254
|
-
getVenue(args: GetVenueArgs): Promise<JacsVenue>;
|
|
2255
|
-
getFloorMapGeojson(args: GetFloorMapGeoJsonArgs): Promise<GeoJSON.FeatureCollection>;
|
|
2256
|
-
getBuildingFull(args: GetBuildingFullArgs): Promise<JacsBuildingFull>;
|
|
2257
|
-
getDestinations(args: GetDestinationsArgs): Promise<JacsDestination[]>;
|
|
2258
|
-
/** Zones (department groupings). `name` / `description` are localized. */
|
|
2259
|
-
getZones(args: GetZonesArgs): Promise<JacsZone[]>;
|
|
2260
|
-
/**
|
|
2261
|
-
* CMS-authored map labels (street / area / wing names). The endpoint is
|
|
2262
|
-
* `/label`, not `/map-label` — the latter 404s. The localized `name` is on
|
|
2263
|
-
* the label template; each `instances[]` placement carries its own internal
|
|
2264
|
-
* `name` ("Parking Lot E - Instance 1") which is authoring metadata and is
|
|
2265
|
-
* never displayed.
|
|
2266
|
-
*/
|
|
2267
|
-
getMapLabels(args: GetMapLabelsArgs): Promise<JacsMapLabel[]>;
|
|
2268
|
-
/**
|
|
2269
|
-
* Amenities are **customer-scoped**, not venue-scoped. A
|
|
2270
|
-
* `/customer/{id}/venue/{id}/amenity` path also exists and returns the same
|
|
2271
|
-
* records, but it silently ignores `?locale=` — it answers with the base
|
|
2272
|
-
* (en-US) names for every locale, which reads as "translations aren't
|
|
2273
|
-
* working" rather than as a wrong URL. Only `/customer/{id}/amenity`
|
|
2274
|
-
* resolves the locale. Don't reintroduce the venue segment.
|
|
2275
|
-
*/
|
|
2276
|
-
getAmenities(args: GetAmenitiesArgs): Promise<JacsAmenity[]>;
|
|
2277
|
-
getBuildings(args: GetBuildingsArgs): Promise<JacsBuilding[]>;
|
|
2278
|
-
getStylesheet3d(args: GetStylesheet3dArgs): Promise<StyleSpecification>;
|
|
2279
|
-
invalidateToken(): void;
|
|
2280
|
-
getJson<T>(path: string): Promise<T>;
|
|
2281
|
-
private extractArray;
|
|
2282
|
-
private getJwtToken;
|
|
2283
|
-
private normalizeHost;
|
|
2284
|
-
private joinUrl;
|
|
2285
|
-
private safeReadText;
|
|
2286
|
-
}
|
|
2287
|
-
|
|
2461
|
+
/** Where a `VenueDirectory` reads from: live JACS (`proxy`/`direct`, which
|
|
2462
|
+
* reads `/customer/all`) or published snapshots (`snapshot`, which reads
|
|
2463
|
+
* `directory.json` — published venues only). */
|
|
2464
|
+
type VenueDirectoryConfig = JacsProviderConfig | ({
|
|
2465
|
+
mode: 'snapshot';
|
|
2466
|
+
} & SnapshotProviderConfig);
|
|
2288
2467
|
/** The slice of `/customer/all`'s `customer` object a client acts on. Audit
|
|
2289
2468
|
* fields, quotas and SSO config are dropped on purpose. */
|
|
2290
2469
|
type Customer = {
|
|
@@ -2327,6 +2506,14 @@ type VenueSummary = {
|
|
|
2327
2506
|
clustering: boolean;
|
|
2328
2507
|
/** Whether JACS publishes the venue's edits automatically. */
|
|
2329
2508
|
autoPublish: boolean;
|
|
2509
|
+
/** The venue's street address (its first building's `address`); `null` when
|
|
2510
|
+
* blank or unknown. Only snapshot directories carry it — `/customer/all`
|
|
2511
|
+
* has no buildings — so it is always `null` in `proxy`/`direct` mode. Same
|
|
2512
|
+
* value `MinuteMaps.getVenueAddress()` returns once the venue loads. */
|
|
2513
|
+
address: string | null;
|
|
2514
|
+
/** The venue's description, as with `address`. Matches
|
|
2515
|
+
* `MinuteMaps.getVenueDescription()`. */
|
|
2516
|
+
description: string | null;
|
|
2330
2517
|
};
|
|
2331
2518
|
/** One entry of `/customer/all`: a customer and the venues it owns. Hand a
|
|
2332
2519
|
* venue's `customerId` and `id` to the SDK's `jacs`/`venue` config to load it. */
|
|
@@ -2347,11 +2534,12 @@ declare function customerDisplayName(customer: Customer): string;
|
|
|
2347
2534
|
* "select your hospital" screen. Unlike the `MinuteMaps` class this isn't
|
|
2348
2535
|
* bound to a venue: it runs *before* one is chosen.
|
|
2349
2536
|
*
|
|
2350
|
-
* Accepts
|
|
2537
|
+
* Accepts JACS config (proxy or direct), snapshot config, or an existing
|
|
2538
|
+
* `JacsProvider` / `SnapshotProvider`.
|
|
2351
2539
|
*/
|
|
2352
2540
|
declare class VenueDirectory {
|
|
2353
2541
|
private jacs;
|
|
2354
|
-
constructor(config:
|
|
2542
|
+
constructor(config: VenueDirectoryConfig | JacsReader);
|
|
2355
2543
|
/** `/customer/all`, optionally narrowed to one `tenantId`. */
|
|
2356
2544
|
listCustomerVenues(options?: ListCustomerVenuesOptions): Promise<CustomerVenues[]>;
|
|
2357
2545
|
}
|
|
@@ -2464,5 +2652,5 @@ type ResolvedIconSource = {
|
|
|
2464
2652
|
*/
|
|
2465
2653
|
declare function resolveAmenityIconSource(amenity: AmenityLike, preferredLocale?: string): ResolvedIconSource | null;
|
|
2466
2654
|
|
|
2467
|
-
export { BUILDING_NAME_EXTENSOR_KEY, DAY_KEYS, IMAGE_ALT_EXTENSOR_KEY, MinuteMaps, OPEN_HOURS_EXTENSOR_KEY, OPEN_HOURS_VERSION, PHONE_EXTENSOR_KEY, POINT_OF_INTEREST_EXTENSOR_KEY, RESERVED_EXTENSOR_PREFIX, VenueDirectory, activeSectionIndex, createMinuteMapsSDK, customerDisplayName, getOpenStatus, groupStepsIntoFloorSections, isConnectorAmenity, parseBuildingName, parseImageAlt, parseOpenHours, parsePhone, parsePointOfInterest, resolveAmenityIconSource };
|
|
2468
|
-
export type { Amenity, AmenityBadgeStyle, AmenityWithFloor, Bounds, BoundsPadding, CameraState, Customer, CustomerVenues, DayKey, Destination, DestinationPhone, EventCallback, Floor, FloorMetadata, HoursRange, JMapAuth, JMapConfig, JacsAuth, JacsConfig, JacsProviderConfig, ListCustomerVenuesOptions, MapEvent, OpenHours, OpenHoursTransition, OpenStatus, OpenStatusOptions, POI, POISearchResult, ResolvedIconSource, RouteFloorSection, RoutePoint, RoutingOptions, SDKConfig, SDKOptions, ThemeName, TransitionStep, VenueSummary, ViewOptions, WayfindCenterMode, WayfindStep, Waypoint, Zone };
|
|
2655
|
+
export { BUILDING_NAME_EXTENSOR_KEY, DAY_KEYS, IMAGE_ALT_EXTENSOR_KEY, MinuteMaps, OPEN_HOURS_EXTENSOR_KEY, OPEN_HOURS_VERSION, PHONE_EXTENSOR_KEY, POINT_OF_INTEREST_EXTENSOR_KEY, RESERVED_EXTENSOR_PREFIX, SNAPSHOT_SCHEMA_VERSION, SnapshotProvider, SnapshotUnavailableError, VenueDirectory, activeSectionIndex, createMinuteMapsSDK, customerDisplayName, getOpenStatus, groupStepsIntoFloorSections, isConnectorAmenity, parseBuildingName, parseImageAlt, parseOpenHours, parsePhone, parsePointOfInterest, resolveAmenityIconSource, resolveSnapshotLocale };
|
|
2656
|
+
export type { Amenity, AmenityBadgeStyle, AmenityWithFloor, Bounds, BoundsPadding, CameraState, Customer, CustomerVenues, DayKey, Destination, DestinationPhone, EventCallback, Floor, FloorMetadata, HoursRange, JMapAuth, JMapConfig, JacsAuth, JacsConfig, JacsProviderConfig, JacsReader, ListCustomerVenuesOptions, MapEvent, OpenHours, OpenHoursTransition, OpenStatus, OpenStatusOptions, POI, POISearchResult, ResolvedIconSource, RouteFloorSection, RoutePoint, RoutingOptions, SDKConfig, SDKOptions, SnapshotProviderConfig, SnapshotUpdateCheck, SnapshotVersions, ThemeName, TransitionStep, VenueDirectoryConfig, VenueSummary, ViewOptions, WayfindCenterMode, WayfindStep, Waypoint, Zone };
|