@tileflow/static 0.1.0-alpha.24 → 0.1.0-alpha.25
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 +8 -0
- package/dist/{chunk-N63IFMFM.js → chunk-RGXE4HDY.js} +6 -0
- package/dist/client.d.ts +1 -0
- package/dist/client.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -237,3 +237,11 @@ logical operation, including a distinct-key cache reuse. Downloading an immutabl
|
|
|
237
237
|
consumes zero units.
|
|
238
238
|
|
|
239
239
|
Docs: https://tileflow.dev/docs
|
|
240
|
+
|
|
241
|
+
## Team credentials
|
|
242
|
+
|
|
243
|
+
A Team credential can serve multiple Maps. Pass `mapId` in the options to `createStaticMap` or
|
|
244
|
+
`precacheStaticMap`; it must be a Managed Map ID such as `map_1234567890abcdef`. The client sends
|
|
245
|
+
`X-Tileflow-Map-Id` separately from the portable scene. `scene.map` remains the deployed environment
|
|
246
|
+
name. The Hosted API must support unified Team credentials and authorize the selected Map.
|
|
247
|
+
Existing Map-scoped keys remain usable without this option. Keep either key on a trusted server.
|
|
@@ -136,6 +136,12 @@ async function requestStaticMapUntilReady(request, options) {
|
|
|
136
136
|
if (options.apiKey) {
|
|
137
137
|
headers.Authorization = `Bearer ${options.apiKey}`;
|
|
138
138
|
}
|
|
139
|
+
if (options.mapId !== void 0) {
|
|
140
|
+
if (!/^map_[A-Za-z0-9_-]{16}$/u.test(options.mapId)) {
|
|
141
|
+
throw new Error("Invalid Tileflow Map ID.");
|
|
142
|
+
}
|
|
143
|
+
headers["X-Tileflow-Map-Id"] = options.mapId;
|
|
144
|
+
}
|
|
139
145
|
return runWithinStaticMapBudget(maxWaitMs, options.signal, async (signal) => {
|
|
140
146
|
let operationId = null;
|
|
141
147
|
while (true) {
|
package/dist/client.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ type StaticMapHostedResult = StaticMapResultBase & Readonly<{
|
|
|
39
39
|
type StaticMapResult = StaticMapImageResult | StaticMapHostedResult;
|
|
40
40
|
type StaticMapCreateOptions = {
|
|
41
41
|
apiKey?: string;
|
|
42
|
+
mapId?: string;
|
|
42
43
|
apiUrl?: string;
|
|
43
44
|
fetch?: typeof fetch;
|
|
44
45
|
idempotencyKey: string;
|
package/dist/client.js
CHANGED
package/dist/index.js
CHANGED