@mountaya/client 0.1.0 → 0.2.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 +45 -0
- package/README.md +2 -2
- package/dist/admin/index.cjs +2876 -3502
- package/dist/admin/index.cjs.map +1 -1
- package/dist/admin/index.d.cts +731 -912
- package/dist/admin/index.d.ts +731 -912
- package/dist/admin/index.js +188 -285
- package/dist/admin/index.js.map +1 -1
- package/dist/browser.cjs +5913 -7993
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +42 -78
- package/dist/browser.d.ts +42 -78
- package/dist/browser.js +18 -49
- package/dist/browser.js.map +1 -1
- package/dist/chunk-CeEX7ayk.d.cts +75531 -0
- package/dist/chunk-CeEX7ayk.d.ts +75531 -0
- package/dist/chunk-Cg7Dtcb4.js +2987 -0
- package/dist/chunk-Cg7Dtcb4.js.map +1 -0
- package/dist/chunk-DJqUsgsy.d.ts +1463 -0
- package/dist/chunk-DNc8T5K1.js +241 -0
- package/dist/chunk-DNc8T5K1.js.map +1 -0
- package/dist/chunk-DTxzw3hu.d.cts +1463 -0
- package/dist/chunk-DmxQID5X.js +2289 -0
- package/dist/chunk-DmxQID5X.js.map +1 -0
- package/dist/chunk-DoZt_oIV.d.ts +3991 -0
- package/dist/chunk-DpJrqANO.js +11 -0
- package/dist/chunk-Dx8mPAdC.d.cts +3991 -0
- package/dist/chunk-X2ukY3ho.js +419 -0
- package/dist/chunk-X2ukY3ho.js.map +1 -0
- package/dist/events/index.cjs +1338 -1874
- package/dist/events/index.cjs.map +1 -1
- package/dist/events/index.d.cts +373 -382
- package/dist/events/index.d.ts +373 -382
- package/dist/events/index.js +523 -806
- package/dist/events/index.js.map +1 -1
- package/dist/index.cjs +5908 -7988
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +37 -69
- package/dist/index.d.ts +37 -69
- package/dist/index.js +17 -48
- package/dist/index.js.map +1 -1
- package/package.json +7 -8
- package/src/browser.ts +1 -0
- package/src/core/rules/clientHeader.ts +1 -1
- package/src/core/rules/errors.ts +1 -1
- package/src/core/rules/nullMasks.gen.ts +14 -2
- package/src/core/rules/version.gen.ts +1 -1
- package/src/events/index.ts +1 -5
- package/src/rest/adminResources.gen.ts +2 -0
- package/src/rest/dates.gen.ts +1 -1
- package/src/rest/resources.gen.ts +2 -0
- package/src/rest/schema.gen.ts +247 -60
- package/src/tiles/schema.gen.ts +1 -3
- package/dist/chunk-BM526BHG.js +0 -342
- package/dist/chunk-BM526BHG.js.map +0 -1
- package/dist/chunk-D2YEVTG7.js +0 -327
- package/dist/chunk-D2YEVTG7.js.map +0 -1
- package/dist/chunk-OHKVUREN.js +0 -3500
- package/dist/chunk-OHKVUREN.js.map +0 -1
- package/dist/chunk-TDTK2L5H.js +0 -3842
- package/dist/chunk-TDTK2L5H.js.map +0 -1
- package/dist/coreOperations.gen-BMYPoBbz.d.ts +0 -1760
- package/dist/coreOperations.gen-BxX5xRxw.d.cts +0 -1760
- package/dist/errors-B-GqAtQv.d.cts +0 -75960
- package/dist/errors-B-GqAtQv.d.ts +0 -75960
- package/dist/operations.gen-CvTyzKNF.d.cts +0 -3993
- package/dist/operations.gen-DUD406TV.d.ts +0 -3993
package/dist/browser.d.cts
CHANGED
|
@@ -1,56 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import { b as bind$1, a as bind$2 } from './coreOperations.gen-BxX5xRxw.cjs';
|
|
6
|
-
export { D as DataOptions, c as DataResult, s as DataSelection, F as FieldTree, M as MountayaResponse, d as MountayaSelectionError, P as PagedResponse, e as PaginateOptions, R as ResourceKind, f as ResourceRef, S as SCHEMA_VERSION, g as Selected, h as Selection, i as SelectionValue, o as data, j as decodeRestSchema, p as paginate, k as rest, l as tiles } from './coreOperations.gen-BxX5xRxw.cjs';
|
|
7
|
-
import { a5 as bind } from './operations.gen-CvTyzKNF.cjs';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* The browser-safe entry point of `@mountaya/client`.
|
|
11
|
-
*
|
|
12
|
-
* Identical to the default entry except for what it refuses to give you: there is no
|
|
13
|
-
* secret-key credential here, so a browser bundle cannot reach one through this import
|
|
14
|
-
* even by mistake.
|
|
15
|
-
*
|
|
16
|
-
* ```ts
|
|
17
|
-
* import { Mountaya } from "@mountaya/client/browser";
|
|
18
|
-
*
|
|
19
|
-
* // A publishable key alone reaches public data on the Map Studio and Tile APIs.
|
|
20
|
-
* const mountaya = new Mountaya({ credential: { publishableKey: "pk_…" } });
|
|
21
|
-
*
|
|
22
|
-
* // A session token minted by your server scopes it up to the organization, and is what
|
|
23
|
-
* // every Data API call requires beside the key.
|
|
24
|
-
* const scoped = new Mountaya({
|
|
25
|
-
* credential: { publishableKey: "pk_…", sessionToken },
|
|
26
|
-
* });
|
|
27
|
-
* ```
|
|
28
|
-
*
|
|
29
|
-
* Mint the session token on your server with `POST /v1/sessions`, using the secret key
|
|
30
|
-
* there, and send only the token to the browser. The token is short-lived and carries an
|
|
31
|
-
* `expires_at`, which is the whole reason it is safe to ship where the secret key is not.
|
|
32
|
-
*
|
|
33
|
-
* This is one of two defences. The other is a runtime guard in `core/rules/auth.ts` that throws
|
|
34
|
-
* if a secret key is constructed where a page's `window` and `document` both exist, or in a React
|
|
35
|
-
* Native application: it catches the cases this entry point cannot, where a bundler resolves the
|
|
36
|
-
* Node condition into browser code anyway, and where a runtime resolves no browser entry point.
|
|
37
|
-
*/
|
|
38
|
-
|
|
1
|
+
import { $n as CollabLockReleasedEvent, $r as ImportGranularity, $t as AgentRunEvent, A as schema_gen_d_exports$2, Aa as ProposedSegment, Ai as Language, Ao as TerrainVariantConfig, Ar as ConflictResponse, At as SessionTokenSnapshot, B as IsochronesResult, Ba as ResponseMetadataCreatedPart, Bn as CollabCursorEvent, Bo as TileSourceType, Br as ExportVariant, Bt as AgentClientToolManifest, C as MountayaServerError, Cn as BadRequestResponse, Co as SurfaceType, D as isMountayaError, Di as ItineraryWaypoint, Do as TerrainVariant, Dt as ShareCredential, E as isMountayaApiError, Ei as ItineraryUpdateParams, Eo as TerrainTileSize, Er as CollectionUpdateParams, Et as SessionTokenSource, Fi as Locales, Fn as CategoryActivities, Fo as TileLegend, Fr as EmbeddedStudioSafetyRules, Ga as ResponseMetadataPatchItinerary, Gi as OkResponse, Gn as CollabDraftUpdateSignal, Go as UnitLegend, Gr as GeoJSONLineString, Gt as AgentErrorCode, H as ItineraryResult, Ha as ResponseMetadataLimitReached, Hn as CollabDraftClearEvent, Ho as TrailDifficultyInfo, Hr as GatewayTimeoutResponse, Ht as AgentConfirmInput, I as ExportItineraryResult, Ii as ManeuverType, In as CategoryOverlays, Io as TileLegendKind, Ir as EmbeddedStudioTheme, It as AgentAwaitingInputEvent, J as ReverseGeocodeResult, Ja as ResponseMetadataPostItinerary, Jn as CollabItineraryChangedEvent, Jo as UnitSlope, Jr as GeoJSONMultiPolygon, Jt as AgentMessageDeltaEvent, K as PoisResult, Ka as ResponseMetadataPatchZone, Ki as Organization, Kn as CollabEntity, Ko as UnitLength, Kr as GeoJSONMultiLineString, Kt as AgentErrorEvent, La as RangeType, Ln as CollabChangeAction, Lo as TileLegendStep, Lr as EmbeddedStudioThemeColors, Lt as AgentBudgetDimension, M as AnalyzeGeometryResult, Mi as LimitKey, Mo as Theme, Mr as Elevation, Mt as Activity, Ni as ListMetadata, Nn as Boundaries, No as TileLayer, Nr as ElevationTileSize, Nt as ActivityCapabilities, Oo as TerrainVariantAsStyle, Or as CollectionZonesAddParams, Ot as SessionTokenEngine, P as DirectionsResult, Pi as LocaleMap, Po as TileLayerType, Pr as EmbeddedStudioDefaultProps, Pt as ActivitySlug, Q as SuggestionsResult, Qa as RoadAccessRestrictionType, Qn as CollabLockReleaseSignal, Qr as IdempotentReplayed, Qt as AgentRunCreateParams, R as GeocodeResult, Ra as ReadSurface, Rn as CollabChangeKind, Ro as TileSource, Rr as Errors, Rt as AgentBudgetExhaustedEvent, S as MountayaRateLimitError, Si as ItinerarySegmentGroup, So as SurfaceInfo, Sr as CollectionItinerariesAddParams, St as CookieCredential, T as errorForStatus, Ta as PaymentRequiredResponse, Ti as ItineraryStatus, To as Terrain, Ua as ResponseMetadataLockConflict, Un as CollabDraftClearSignal, Uo as TrailDifficultyType, Ur as GeoJSONGeometry, Ut as AgentConfirmRequiredEvent, Va as ResponseMetadataIdempotentAnswer, Vn as CollabCursorSignal, Vo as TooManyRequestsResponse, Vr as ForbiddenResponse, Vt as AgentCloseInput, W as MatrixResult, Wa as ResponseMetadataPatchCollection, Wn as CollabDraftUpdateEvent, Wo as UnauthorizedResponse, Wr as GeoJSONGeometryCollection, Wt as AgentDoneEvent, X as SearchResult, Xa as ResponseMetadataPostZone, Xn as CollabLockAcquireSignal, Xr as GeoJSONPolygon, Xt as AgentReconnectEvent, Yn as CollabLock, Yo as UnitTemperature, Yr as GeoJSONPoint, Yt as AgentMessageEvent, Za as RoadAccessInfo, Zn as CollabLockAcquiredEvent, Zr as HTTPError, Zt as AgentRun, _ as MountayaIdempotentAnswerUnavailableError, _a as OverlayContentType, _r as CollabZoneChangedEvent, _s as WaypointPropertyFormat, _t as Surface, a as IdempotentAnswer, ac as ZoneFeature, an as AgentRunProfile, ao as SegmentSplitParams, ar as CollabPresenceSnapshotEvent, at as schema_gen_d_exports, b as MountayaPayloadTooLargeError, ba as PayloadTooLargeResponse, bi as ItinerarySegment, br as CollectionCreateParams, bt as parseRateLimit, c as MountayaBadRequestError, cc as ZoneSource, ci as ItineraryCount, cn as AgentToolAbandonedReason, co as Session, cr as CollabSelectionEvent, cs as WaypointAmenity, ct as ClientOptions, d as MountayaConflictError, dc as ZoneUpdateParams, di as ItineraryDuplicateParams, dn as AgentToolErrorCode, dr as CollabSelectionSignal, ds as WaypointIcon, dt as RequestOptions, ei as ImportProvider, en as AgentRunEventType, eo as SegmentConvertParams, er as CollabLockSnapshotEvent, et as TerrainGridResult, f as MountayaConnectionError, fn as AgentToolResultEvent, fo as ShareLink, fr as CollabSignalParams, fs as WaypointLink, ft as ResponseReport, g as MountayaIdempotencyKeyInUseError, ga as OverlayCapabilities, gi as ItineraryImportPreview, go as StudioEntitlement, gr as CollabWaypointChangedEvent, gs as WaypointProperty, gt as RetryOptions, h as MountayaForbiddenError, ha as Overlay, hi as ItineraryImportConfirmWaypoint, ho as StreamReconnectReason, hr as CollabStreamEventType, hs as WaypointPhoto, ht as defaultBaseUrls, i as ErrorMetadata, in as AgentRunInputType, io as SegmentMode, ir as CollabPresenceLeaveEvent, it as TerrainSamplesResult, ja as ProposedWaypoint, ji as Layers, jo as TerrainVariants, jr as CreatedResponse, jt as AcceptedResponse, ka as ProposedCandidate, ki as ItineraryWithDetails, ko as TerrainVariantAsTiles, kr as ConflictMetadata, kt as SessionTokenEngineOptions, l as MountayaBillingError, lc as ZoneSourceKind, li as ItineraryCreateParams, ln as AgentToolCallEvent, lr as CollabSelectionKind, ls as WaypointContact, lt as MountayaTransport$1, m as MountayaError, mc as schema_gen_d_exports$1, mi as ItineraryImportConfirmSegment, mn as AgentUserMessageInput, mo as SpeedInfo, mr as CollabStreamEvent, ms as WaypointMode, mt as boundFetch, n as ErrorCode, nc as Zone, ni as ImportWarning, nn as AgentRunFeedbackRating, no as SegmentGroupCreateParams, nr as CollabPosition, nt as TerrainProfileResult, o as MountayaApiError, oa as OrganizationRole, oc as ZoneLevel, on as AgentRunReason, oo as SegmentUpdateParams, or as CollabReconnectEvent, os as WayType, ot as BaseUrlOverrides, p as MountayaDataError, pi as ItineraryImportConfirmParams, pn as AgentToolResultInput, po as SlopeInfo, pr as CollabSignalType, ps as WaypointMedia, pt as StreamSeam, qa as ResponseMetadataPostCollection, qn as CollabEntityKind, qo as UnitPace, qr as GeoJSONMultiPoint, qt as AgentManifestUpdateInput, r as ErrorEntry, rc as ZoneCreateParams, ri as InternalErrorResponse, rn as AgentRunInputParams, ro as SegmentGroupUpdateParams, rr as CollabPresenceJoinEvent, s as MountayaAuthenticationError, sa as OrganizationSettings, sc as ZoneMode, si as Itinerary, sn as AgentToolAbandonedEvent, so as ServiceUnavailableResponse, sr as CollabSegmentChangedEvent, ss as WayTypeInfo, st as BinaryBody, t as ApiErrorDetails, ta as OrganizationLookupParams, ti as ImportRecommendationReason, tn as AgentRunFeedbackParams, to as SegmentCreateParams, tr as CollabMember, u as MountayaConfigurationError, uc as ZoneStatus, ui as ItineraryDirectionsStep, un as AgentToolCallTarget, uo as SessionSurface, ur as CollabSelectionRef, us as WaypointCreateParams, ut as RequestArgs, v as MountayaMethodNotAllowedError, va as OverlaySupportedCapabilities, vi as ItineraryPace, vr as Collection, vs as WaypointTiming, vt as RateLimitInfo, w as PAYMENT_REQUIRED_CODE, wr as CollectionItineraryUpdateParams, wt as PublishableCredential, x as MountayaPreconditionFailedError, xo as SuccessExtensions, xt as DateMask, y as MountayaNotFoundError, ya as PaginationMetadata, yi as ItineraryPaceSegment, yr as CollectionCount, ys as WaypointUpdateParams, yt as RateLimitPolicy, za as RelationToUser, zi as NotFoundResponse, zn as CollabCollectionChangedEvent, zo as TileSourceSize, zr as ExportFormat, zt as AgentChecksUnmetEvent } from "./chunk-CeEX7ayk.cjs";
|
|
2
|
+
import { _ as FieldTree, a as PagedResponse, b as Selection, c as MountayaResponse, d as operations_gen_d_exports$1, f as bind, g as DataResult, h as DataOptions, i as ResourceRef, l as decodeRestSchema, m as selection_gen_d_exports, n as SCHEMA_VERSION, o as PaginateOptions, p as operations_gen_d_exports, r as ResourceKind, s as paginate, t as coreOperations_gen_d_exports, u as bind$1, v as MountayaSelectionError, x as SelectionValue, y as Selected } from "./chunk-DTxzw3hu.cjs";
|
|
3
|
+
import { t as bind$2 } from "./chunk-Dx8mPAdC.cjs";
|
|
4
|
+
import { Geometry } from "geojson";
|
|
39
5
|
/**
|
|
40
6
|
* BrowserClientOptions is ClientOptions with the secret-key credential removed.
|
|
41
7
|
*
|
|
42
8
|
* The narrowing is the point of this module: `{ secretKey }` is not assignable here, so
|
|
43
9
|
* the mistake is a type error at the call site rather than a key in a bundle.
|
|
44
10
|
*/
|
|
45
|
-
interface BrowserClientOptions extends Omit<ClientOptions, "credential"> {
|
|
46
|
-
|
|
47
|
-
|
|
11
|
+
export interface BrowserClientOptions extends Omit<ClientOptions, "credential"> {
|
|
12
|
+
/** How the client authenticates: a publishable key, a share token or the browser's session. */
|
|
13
|
+
readonly credential: PublishableCredential | ShareCredential | CookieCredential;
|
|
48
14
|
}
|
|
49
15
|
/**
|
|
50
16
|
* MountayaTransport is the default entry's transport, as a type: the constructor below builds
|
|
51
17
|
* that same class, so a transport this entry hands out is one the default entry's type describes.
|
|
52
18
|
*/
|
|
53
|
-
type MountayaTransport = MountayaTransport$1;
|
|
19
|
+
export type MountayaTransport = MountayaTransport$1;
|
|
54
20
|
/**
|
|
55
21
|
* MountayaTransport builds a transport from {@link BrowserClientOptions}, so a secret key is a type
|
|
56
22
|
* error at the call site here as it is for {@link Mountaya}, rather than a key in a bundle that
|
|
@@ -60,7 +26,7 @@ type MountayaTransport = MountayaTransport$1;
|
|
|
60
26
|
* `instanceof` answers the same against either entry's name. A secret-key transport is built from
|
|
61
27
|
* `@mountaya/client`, on a server.
|
|
62
28
|
*/
|
|
63
|
-
declare const MountayaTransport: new (options: BrowserClientOptions) => MountayaTransport$1;
|
|
29
|
+
export declare const MountayaTransport: new (options: BrowserClientOptions) => MountayaTransport$1;
|
|
64
30
|
/**
|
|
65
31
|
* Mountaya is the browser client. It accepts a publishable key or a share token, and
|
|
66
32
|
* cannot be constructed with a secret key.
|
|
@@ -68,39 +34,37 @@ declare const MountayaTransport: new (options: BrowserClientOptions) => Mountaya
|
|
|
68
34
|
* The organization's operations are the admin unit's: `new MountayaAdmin(mountaya)` of
|
|
69
35
|
* `@mountaya/client/admin` answers them, bound to this client's transport.
|
|
70
36
|
*/
|
|
71
|
-
declare class Mountaya {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
37
|
+
export declare class Mountaya {
|
|
38
|
+
/**
|
|
39
|
+
* The AI agent: starting a run, answering it, rating it. Each method resolves to the response
|
|
40
|
+
* envelope, with the payload at `data`; a run's events are read through
|
|
41
|
+
* `createAgentTransport` of `@mountaya/client/events`.
|
|
42
|
+
*/
|
|
43
|
+
readonly agent: ReturnType<typeof bind$2>["agent"];
|
|
44
|
+
/**
|
|
45
|
+
* The GraphQL Data API: directions, search, terrain, isochrones, matrices. Each method resolves
|
|
46
|
+
* to the operation's own field, with no envelope.
|
|
47
|
+
*/
|
|
48
|
+
readonly data: ReturnType<typeof bind>;
|
|
49
|
+
/**
|
|
50
|
+
* The Map Studio API's map half: itineraries, zones, collections, and their catalogs. Each
|
|
51
|
+
* method resolves to the response envelope, with the payload at `data`.
|
|
52
|
+
*/
|
|
53
|
+
readonly studio: ReturnType<typeof bind$2>["studio"];
|
|
54
|
+
/** The Tile API's style specifications. Each method resolves to the response envelope. */
|
|
55
|
+
readonly tiles: ReturnType<typeof bind$1>;
|
|
56
|
+
/**
|
|
57
|
+
* The transport every method calls through: for a call this client binds no method for, and
|
|
58
|
+
* for the openers of `@mountaya/client/events`.
|
|
59
|
+
*/
|
|
60
|
+
readonly transport: MountayaTransport;
|
|
61
|
+
/**
|
|
62
|
+
* Builds a browser client over one credential and its options, checking both before anything
|
|
63
|
+
* is sent.
|
|
64
|
+
*
|
|
65
|
+
* @throws `MountayaConfigurationError` for options that are not an object, a credential that
|
|
66
|
+
* cannot work, or an option outside its range: see {@link ClientOptions}.
|
|
67
|
+
*/
|
|
68
|
+
constructor(options: BrowserClientOptions);
|
|
103
69
|
}
|
|
104
|
-
|
|
105
|
-
export { CookieCredential, Mountaya, MountayaTransport, PublishableCredential, ShareCredential };
|
|
106
|
-
export type { BrowserClientOptions };
|
|
70
|
+
export { type AcceptedResponse, type Activity, type ActivityCapabilities, type ActivitySlug, type AgentAwaitingInputEvent, type AgentBudgetDimension, type AgentBudgetExhaustedEvent, type AgentChecksUnmetEvent, type AgentClientToolManifest, type AgentCloseInput, type AgentConfirmInput, type AgentConfirmRequiredEvent, type AgentDoneEvent, type AgentErrorCode, type AgentErrorEvent, type AgentManifestUpdateInput, type AgentMessageDeltaEvent, type AgentMessageEvent, type AgentReconnectEvent, type AgentRun, type AgentRunCreateParams, type AgentRunEvent, type AgentRunEventType, type AgentRunFeedbackParams, type AgentRunFeedbackRating, type AgentRunInputParams, type AgentRunInputType, type AgentRunProfile, type AgentRunReason, type AgentToolAbandonedEvent, type AgentToolAbandonedReason, type AgentToolCallEvent, type AgentToolCallTarget, type AgentToolErrorCode, type AgentToolResultEvent, type AgentToolResultInput, type AgentUserMessageInput, type AnalyzeGeometryResult, type ApiErrorDetails, type BadRequestResponse, type BaseUrlOverrides, type BinaryBody, type Boundaries, type CategoryActivities, type CategoryOverlays, type CollabChangeAction, type CollabChangeKind, type CollabCollectionChangedEvent, type CollabCursorEvent, type CollabCursorSignal, type CollabDraftClearEvent, type CollabDraftClearSignal, type CollabDraftUpdateEvent, type CollabDraftUpdateSignal, type CollabEntity, type CollabEntityKind, type CollabItineraryChangedEvent, type CollabLock, type CollabLockAcquireSignal, type CollabLockAcquiredEvent, type CollabLockReleaseSignal, type CollabLockReleasedEvent, type CollabLockSnapshotEvent, type CollabMember, type CollabPosition, type CollabPresenceJoinEvent, type CollabPresenceLeaveEvent, type CollabPresenceSnapshotEvent, type CollabReconnectEvent, type CollabSegmentChangedEvent, type CollabSelectionEvent, type CollabSelectionKind, type CollabSelectionRef, type CollabSelectionSignal, type CollabSignalParams, type CollabSignalType, type CollabStreamEvent, type CollabStreamEventType, type CollabWaypointChangedEvent, type CollabZoneChangedEvent, type Collection, type CollectionCount, type CollectionCreateParams, type CollectionItinerariesAddParams, type CollectionItineraryUpdateParams, type CollectionUpdateParams, type CollectionZonesAddParams, type ConflictMetadata, type ConflictResponse, type CookieCredential, type CreatedResponse, type DataOptions, type DataResult, type schema_gen_d_exports as DataSchema, selection_gen_d_exports as DataSelection, type DateMask, type DirectionsResult, type Elevation, type ElevationTileSize, type EmbeddedStudioDefaultProps, type EmbeddedStudioSafetyRules, type EmbeddedStudioTheme, type EmbeddedStudioThemeColors, type ErrorCode, type ErrorEntry, type ErrorMetadata, type Errors, type ExportFormat, type ExportItineraryResult, type ExportVariant, type FieldTree, type ForbiddenResponse, type GatewayTimeoutResponse, type GeoJSONGeometry, type GeoJSONGeometryCollection, type GeoJSONLineString, type GeoJSONMultiLineString, type GeoJSONMultiPoint, type GeoJSONMultiPolygon, type GeoJSONPoint, type GeoJSONPolygon, type GeocodeResult, type Geometry, type HTTPError, type IdempotentAnswer, type IdempotentReplayed, type ImportGranularity, type ImportProvider, type ImportRecommendationReason, type ImportWarning, type InternalErrorResponse, type IsochronesResult, type Itinerary, type ItineraryCount, type ItineraryCreateParams, type ItineraryDirectionsStep, type ItineraryDuplicateParams, type ItineraryImportConfirmParams, type ItineraryImportConfirmSegment, type ItineraryImportConfirmWaypoint, type ItineraryImportPreview, type ItineraryPace, type ItineraryPaceSegment, type ItineraryResult, type ItinerarySegment, type ItinerarySegmentGroup, type ItineraryStatus, type ItineraryUpdateParams, type ItineraryWaypoint, type ItineraryWithDetails, type Language, type Layers, type LimitKey, type ListMetadata, type LocaleMap, type Locales, type ManeuverType, type MatrixResult, MountayaApiError, MountayaAuthenticationError, MountayaBadRequestError, MountayaBillingError, MountayaConfigurationError, MountayaConflictError, MountayaConnectionError, MountayaDataError, MountayaError, MountayaForbiddenError, MountayaIdempotencyKeyInUseError, MountayaIdempotentAnswerUnavailableError, MountayaMethodNotAllowedError, MountayaNotFoundError, MountayaPayloadTooLargeError, MountayaPreconditionFailedError, MountayaRateLimitError, type MountayaResponse, MountayaSelectionError, MountayaServerError, type NotFoundResponse, type OkResponse, type Organization, type OrganizationLookupParams, type OrganizationRole, type OrganizationSettings, type Overlay, type OverlayCapabilities, type OverlayContentType, type OverlaySupportedCapabilities, PAYMENT_REQUIRED_CODE, type PagedResponse, type PaginateOptions, type PaginationMetadata, type PayloadTooLargeResponse, type PaymentRequiredResponse, type PoisResult, type ProposedCandidate, type ProposedSegment, type ProposedWaypoint, type PublishableCredential, type RangeType, type RateLimitInfo, type RateLimitPolicy, type ReadSurface, type RelationToUser, type RequestArgs, type RequestOptions, type ResourceKind, type ResourceRef, type ResponseMetadataCreatedPart, type ResponseMetadataIdempotentAnswer, type ResponseMetadataLimitReached, type ResponseMetadataLockConflict, type ResponseMetadataPatchCollection, type ResponseMetadataPatchItinerary, type ResponseMetadataPatchZone, type ResponseMetadataPostCollection, type ResponseMetadataPostItinerary, type ResponseMetadataPostZone, type ResponseReport, type schema_gen_d_exports$1 as RestSchema, type RetryOptions, type ReverseGeocodeResult, type RoadAccessInfo, type RoadAccessRestrictionType, SCHEMA_VERSION, type SearchResult, type SegmentConvertParams, type SegmentCreateParams, type SegmentGroupCreateParams, type SegmentGroupUpdateParams, type SegmentMode, type SegmentSplitParams, type SegmentUpdateParams, type Selected, type Selection, type SelectionValue, type ServiceUnavailableResponse, type Session, type SessionSurface, SessionTokenEngine, type SessionTokenEngineOptions, type SessionTokenSnapshot, type SessionTokenSource, type ShareCredential, type ShareLink, type SlopeInfo, type SpeedInfo, type StreamReconnectReason, type StreamSeam, type StudioEntitlement, type SuccessExtensions, type SuggestionsResult, type Surface, type SurfaceInfo, type SurfaceType, type Terrain, type TerrainGridResult, type TerrainProfileResult, type TerrainSamplesResult, type TerrainTileSize, type TerrainVariant, type TerrainVariantAsStyle, type TerrainVariantAsTiles, type TerrainVariantConfig, type TerrainVariants, type Theme, type TileLayer, type TileLayerType, type TileLegend, type TileLegendKind, type TileLegendStep, type schema_gen_d_exports$2 as TileSchema, type TileSource, type TileSourceSize, type TileSourceType, type TooManyRequestsResponse, type TrailDifficultyInfo, type TrailDifficultyType, type UnauthorizedResponse, type UnitLegend, type UnitLength, type UnitPace, type UnitSlope, type UnitTemperature, type WayType, type WayTypeInfo, type WaypointAmenity, type WaypointContact, type WaypointCreateParams, type WaypointIcon, type WaypointLink, type WaypointMedia, type WaypointMode, type WaypointPhoto, type WaypointProperty, type WaypointPropertyFormat, type WaypointTiming, type WaypointUpdateParams, type Zone, type ZoneCreateParams, type ZoneFeature, type ZoneLevel, type ZoneMode, type ZoneSource, type ZoneSourceKind, type ZoneStatus, type ZoneUpdateParams, boundFetch, operations_gen_d_exports as data, decodeRestSchema, defaultBaseUrls, errorForStatus, isMountayaApiError, isMountayaError, paginate, parseRateLimit, coreOperations_gen_d_exports as rest, operations_gen_d_exports$1 as tiles };
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,56 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import { b as bind$1, a as bind$2 } from './coreOperations.gen-BMYPoBbz.js';
|
|
6
|
-
export { D as DataOptions, c as DataResult, s as DataSelection, F as FieldTree, M as MountayaResponse, d as MountayaSelectionError, P as PagedResponse, e as PaginateOptions, R as ResourceKind, f as ResourceRef, S as SCHEMA_VERSION, g as Selected, h as Selection, i as SelectionValue, o as data, j as decodeRestSchema, p as paginate, k as rest, l as tiles } from './coreOperations.gen-BMYPoBbz.js';
|
|
7
|
-
import { a5 as bind } from './operations.gen-DUD406TV.js';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* The browser-safe entry point of `@mountaya/client`.
|
|
11
|
-
*
|
|
12
|
-
* Identical to the default entry except for what it refuses to give you: there is no
|
|
13
|
-
* secret-key credential here, so a browser bundle cannot reach one through this import
|
|
14
|
-
* even by mistake.
|
|
15
|
-
*
|
|
16
|
-
* ```ts
|
|
17
|
-
* import { Mountaya } from "@mountaya/client/browser";
|
|
18
|
-
*
|
|
19
|
-
* // A publishable key alone reaches public data on the Map Studio and Tile APIs.
|
|
20
|
-
* const mountaya = new Mountaya({ credential: { publishableKey: "pk_…" } });
|
|
21
|
-
*
|
|
22
|
-
* // A session token minted by your server scopes it up to the organization, and is what
|
|
23
|
-
* // every Data API call requires beside the key.
|
|
24
|
-
* const scoped = new Mountaya({
|
|
25
|
-
* credential: { publishableKey: "pk_…", sessionToken },
|
|
26
|
-
* });
|
|
27
|
-
* ```
|
|
28
|
-
*
|
|
29
|
-
* Mint the session token on your server with `POST /v1/sessions`, using the secret key
|
|
30
|
-
* there, and send only the token to the browser. The token is short-lived and carries an
|
|
31
|
-
* `expires_at`, which is the whole reason it is safe to ship where the secret key is not.
|
|
32
|
-
*
|
|
33
|
-
* This is one of two defences. The other is a runtime guard in `core/rules/auth.ts` that throws
|
|
34
|
-
* if a secret key is constructed where a page's `window` and `document` both exist, or in a React
|
|
35
|
-
* Native application: it catches the cases this entry point cannot, where a bundler resolves the
|
|
36
|
-
* Node condition into browser code anyway, and where a runtime resolves no browser entry point.
|
|
37
|
-
*/
|
|
38
|
-
|
|
1
|
+
import { $n as CollabLockReleasedEvent, $r as ImportGranularity, $t as AgentRunEvent, A as schema_gen_d_exports$2, Aa as ProposedSegment, Ai as Language, Ao as TerrainVariantConfig, Ar as ConflictResponse, At as SessionTokenSnapshot, B as IsochronesResult, Ba as ResponseMetadataCreatedPart, Bn as CollabCursorEvent, Bo as TileSourceType, Br as ExportVariant, Bt as AgentClientToolManifest, C as MountayaServerError, Cn as BadRequestResponse, Co as SurfaceType, D as isMountayaError, Di as ItineraryWaypoint, Do as TerrainVariant, Dt as ShareCredential, E as isMountayaApiError, Ei as ItineraryUpdateParams, Eo as TerrainTileSize, Er as CollectionUpdateParams, Et as SessionTokenSource, Fi as Locales, Fn as CategoryActivities, Fo as TileLegend, Fr as EmbeddedStudioSafetyRules, Ga as ResponseMetadataPatchItinerary, Gi as OkResponse, Gn as CollabDraftUpdateSignal, Go as UnitLegend, Gr as GeoJSONLineString, Gt as AgentErrorCode, H as ItineraryResult, Ha as ResponseMetadataLimitReached, Hn as CollabDraftClearEvent, Ho as TrailDifficultyInfo, Hr as GatewayTimeoutResponse, Ht as AgentConfirmInput, I as ExportItineraryResult, Ii as ManeuverType, In as CategoryOverlays, Io as TileLegendKind, Ir as EmbeddedStudioTheme, It as AgentAwaitingInputEvent, J as ReverseGeocodeResult, Ja as ResponseMetadataPostItinerary, Jn as CollabItineraryChangedEvent, Jo as UnitSlope, Jr as GeoJSONMultiPolygon, Jt as AgentMessageDeltaEvent, K as PoisResult, Ka as ResponseMetadataPatchZone, Ki as Organization, Kn as CollabEntity, Ko as UnitLength, Kr as GeoJSONMultiLineString, Kt as AgentErrorEvent, La as RangeType, Ln as CollabChangeAction, Lo as TileLegendStep, Lr as EmbeddedStudioThemeColors, Lt as AgentBudgetDimension, M as AnalyzeGeometryResult, Mi as LimitKey, Mo as Theme, Mr as Elevation, Mt as Activity, Ni as ListMetadata, Nn as Boundaries, No as TileLayer, Nr as ElevationTileSize, Nt as ActivityCapabilities, Oo as TerrainVariantAsStyle, Or as CollectionZonesAddParams, Ot as SessionTokenEngine, P as DirectionsResult, Pi as LocaleMap, Po as TileLayerType, Pr as EmbeddedStudioDefaultProps, Pt as ActivitySlug, Q as SuggestionsResult, Qa as RoadAccessRestrictionType, Qn as CollabLockReleaseSignal, Qr as IdempotentReplayed, Qt as AgentRunCreateParams, R as GeocodeResult, Ra as ReadSurface, Rn as CollabChangeKind, Ro as TileSource, Rr as Errors, Rt as AgentBudgetExhaustedEvent, S as MountayaRateLimitError, Si as ItinerarySegmentGroup, So as SurfaceInfo, Sr as CollectionItinerariesAddParams, St as CookieCredential, T as errorForStatus, Ta as PaymentRequiredResponse, Ti as ItineraryStatus, To as Terrain, Ua as ResponseMetadataLockConflict, Un as CollabDraftClearSignal, Uo as TrailDifficultyType, Ur as GeoJSONGeometry, Ut as AgentConfirmRequiredEvent, Va as ResponseMetadataIdempotentAnswer, Vn as CollabCursorSignal, Vo as TooManyRequestsResponse, Vr as ForbiddenResponse, Vt as AgentCloseInput, W as MatrixResult, Wa as ResponseMetadataPatchCollection, Wn as CollabDraftUpdateEvent, Wo as UnauthorizedResponse, Wr as GeoJSONGeometryCollection, Wt as AgentDoneEvent, X as SearchResult, Xa as ResponseMetadataPostZone, Xn as CollabLockAcquireSignal, Xr as GeoJSONPolygon, Xt as AgentReconnectEvent, Yn as CollabLock, Yo as UnitTemperature, Yr as GeoJSONPoint, Yt as AgentMessageEvent, Za as RoadAccessInfo, Zn as CollabLockAcquiredEvent, Zr as HTTPError, Zt as AgentRun, _ as MountayaIdempotentAnswerUnavailableError, _a as OverlayContentType, _r as CollabZoneChangedEvent, _s as WaypointPropertyFormat, _t as Surface, a as IdempotentAnswer, ac as ZoneFeature, an as AgentRunProfile, ao as SegmentSplitParams, ar as CollabPresenceSnapshotEvent, at as schema_gen_d_exports, b as MountayaPayloadTooLargeError, ba as PayloadTooLargeResponse, bi as ItinerarySegment, br as CollectionCreateParams, bt as parseRateLimit, c as MountayaBadRequestError, cc as ZoneSource, ci as ItineraryCount, cn as AgentToolAbandonedReason, co as Session, cr as CollabSelectionEvent, cs as WaypointAmenity, ct as ClientOptions, d as MountayaConflictError, dc as ZoneUpdateParams, di as ItineraryDuplicateParams, dn as AgentToolErrorCode, dr as CollabSelectionSignal, ds as WaypointIcon, dt as RequestOptions, ei as ImportProvider, en as AgentRunEventType, eo as SegmentConvertParams, er as CollabLockSnapshotEvent, et as TerrainGridResult, f as MountayaConnectionError, fn as AgentToolResultEvent, fo as ShareLink, fr as CollabSignalParams, fs as WaypointLink, ft as ResponseReport, g as MountayaIdempotencyKeyInUseError, ga as OverlayCapabilities, gi as ItineraryImportPreview, go as StudioEntitlement, gr as CollabWaypointChangedEvent, gs as WaypointProperty, gt as RetryOptions, h as MountayaForbiddenError, ha as Overlay, hi as ItineraryImportConfirmWaypoint, ho as StreamReconnectReason, hr as CollabStreamEventType, hs as WaypointPhoto, ht as defaultBaseUrls, i as ErrorMetadata, in as AgentRunInputType, io as SegmentMode, ir as CollabPresenceLeaveEvent, it as TerrainSamplesResult, ja as ProposedWaypoint, ji as Layers, jo as TerrainVariants, jr as CreatedResponse, jt as AcceptedResponse, ka as ProposedCandidate, ki as ItineraryWithDetails, ko as TerrainVariantAsTiles, kr as ConflictMetadata, kt as SessionTokenEngineOptions, l as MountayaBillingError, lc as ZoneSourceKind, li as ItineraryCreateParams, ln as AgentToolCallEvent, lr as CollabSelectionKind, ls as WaypointContact, lt as MountayaTransport$1, m as MountayaError, mc as schema_gen_d_exports$1, mi as ItineraryImportConfirmSegment, mn as AgentUserMessageInput, mo as SpeedInfo, mr as CollabStreamEvent, ms as WaypointMode, mt as boundFetch, n as ErrorCode, nc as Zone, ni as ImportWarning, nn as AgentRunFeedbackRating, no as SegmentGroupCreateParams, nr as CollabPosition, nt as TerrainProfileResult, o as MountayaApiError, oa as OrganizationRole, oc as ZoneLevel, on as AgentRunReason, oo as SegmentUpdateParams, or as CollabReconnectEvent, os as WayType, ot as BaseUrlOverrides, p as MountayaDataError, pi as ItineraryImportConfirmParams, pn as AgentToolResultInput, po as SlopeInfo, pr as CollabSignalType, ps as WaypointMedia, pt as StreamSeam, qa as ResponseMetadataPostCollection, qn as CollabEntityKind, qo as UnitPace, qr as GeoJSONMultiPoint, qt as AgentManifestUpdateInput, r as ErrorEntry, rc as ZoneCreateParams, ri as InternalErrorResponse, rn as AgentRunInputParams, ro as SegmentGroupUpdateParams, rr as CollabPresenceJoinEvent, s as MountayaAuthenticationError, sa as OrganizationSettings, sc as ZoneMode, si as Itinerary, sn as AgentToolAbandonedEvent, so as ServiceUnavailableResponse, sr as CollabSegmentChangedEvent, ss as WayTypeInfo, st as BinaryBody, t as ApiErrorDetails, ta as OrganizationLookupParams, ti as ImportRecommendationReason, tn as AgentRunFeedbackParams, to as SegmentCreateParams, tr as CollabMember, u as MountayaConfigurationError, uc as ZoneStatus, ui as ItineraryDirectionsStep, un as AgentToolCallTarget, uo as SessionSurface, ur as CollabSelectionRef, us as WaypointCreateParams, ut as RequestArgs, v as MountayaMethodNotAllowedError, va as OverlaySupportedCapabilities, vi as ItineraryPace, vr as Collection, vs as WaypointTiming, vt as RateLimitInfo, w as PAYMENT_REQUIRED_CODE, wr as CollectionItineraryUpdateParams, wt as PublishableCredential, x as MountayaPreconditionFailedError, xo as SuccessExtensions, xt as DateMask, y as MountayaNotFoundError, ya as PaginationMetadata, yi as ItineraryPaceSegment, yr as CollectionCount, ys as WaypointUpdateParams, yt as RateLimitPolicy, za as RelationToUser, zi as NotFoundResponse, zn as CollabCollectionChangedEvent, zo as TileSourceSize, zr as ExportFormat, zt as AgentChecksUnmetEvent } from "./chunk-CeEX7ayk.js";
|
|
2
|
+
import { _ as FieldTree, a as PagedResponse, b as Selection, c as MountayaResponse, d as operations_gen_d_exports$1, f as bind, g as DataResult, h as DataOptions, i as ResourceRef, l as decodeRestSchema, m as selection_gen_d_exports, n as SCHEMA_VERSION, o as PaginateOptions, p as operations_gen_d_exports, r as ResourceKind, s as paginate, t as coreOperations_gen_d_exports, u as bind$1, v as MountayaSelectionError, x as SelectionValue, y as Selected } from "./chunk-DJqUsgsy.js";
|
|
3
|
+
import { t as bind$2 } from "./chunk-DoZt_oIV.js";
|
|
4
|
+
import { Geometry } from "geojson";
|
|
39
5
|
/**
|
|
40
6
|
* BrowserClientOptions is ClientOptions with the secret-key credential removed.
|
|
41
7
|
*
|
|
42
8
|
* The narrowing is the point of this module: `{ secretKey }` is not assignable here, so
|
|
43
9
|
* the mistake is a type error at the call site rather than a key in a bundle.
|
|
44
10
|
*/
|
|
45
|
-
interface BrowserClientOptions extends Omit<ClientOptions, "credential"> {
|
|
46
|
-
|
|
47
|
-
|
|
11
|
+
export interface BrowserClientOptions extends Omit<ClientOptions, "credential"> {
|
|
12
|
+
/** How the client authenticates: a publishable key, a share token or the browser's session. */
|
|
13
|
+
readonly credential: PublishableCredential | ShareCredential | CookieCredential;
|
|
48
14
|
}
|
|
49
15
|
/**
|
|
50
16
|
* MountayaTransport is the default entry's transport, as a type: the constructor below builds
|
|
51
17
|
* that same class, so a transport this entry hands out is one the default entry's type describes.
|
|
52
18
|
*/
|
|
53
|
-
type MountayaTransport = MountayaTransport$1;
|
|
19
|
+
export type MountayaTransport = MountayaTransport$1;
|
|
54
20
|
/**
|
|
55
21
|
* MountayaTransport builds a transport from {@link BrowserClientOptions}, so a secret key is a type
|
|
56
22
|
* error at the call site here as it is for {@link Mountaya}, rather than a key in a bundle that
|
|
@@ -60,7 +26,7 @@ type MountayaTransport = MountayaTransport$1;
|
|
|
60
26
|
* `instanceof` answers the same against either entry's name. A secret-key transport is built from
|
|
61
27
|
* `@mountaya/client`, on a server.
|
|
62
28
|
*/
|
|
63
|
-
declare const MountayaTransport: new (options: BrowserClientOptions) => MountayaTransport$1;
|
|
29
|
+
export declare const MountayaTransport: new (options: BrowserClientOptions) => MountayaTransport$1;
|
|
64
30
|
/**
|
|
65
31
|
* Mountaya is the browser client. It accepts a publishable key or a share token, and
|
|
66
32
|
* cannot be constructed with a secret key.
|
|
@@ -68,39 +34,37 @@ declare const MountayaTransport: new (options: BrowserClientOptions) => Mountaya
|
|
|
68
34
|
* The organization's operations are the admin unit's: `new MountayaAdmin(mountaya)` of
|
|
69
35
|
* `@mountaya/client/admin` answers them, bound to this client's transport.
|
|
70
36
|
*/
|
|
71
|
-
declare class Mountaya {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
37
|
+
export declare class Mountaya {
|
|
38
|
+
/**
|
|
39
|
+
* The AI agent: starting a run, answering it, rating it. Each method resolves to the response
|
|
40
|
+
* envelope, with the payload at `data`; a run's events are read through
|
|
41
|
+
* `createAgentTransport` of `@mountaya/client/events`.
|
|
42
|
+
*/
|
|
43
|
+
readonly agent: ReturnType<typeof bind$2>["agent"];
|
|
44
|
+
/**
|
|
45
|
+
* The GraphQL Data API: directions, search, terrain, isochrones, matrices. Each method resolves
|
|
46
|
+
* to the operation's own field, with no envelope.
|
|
47
|
+
*/
|
|
48
|
+
readonly data: ReturnType<typeof bind>;
|
|
49
|
+
/**
|
|
50
|
+
* The Map Studio API's map half: itineraries, zones, collections, and their catalogs. Each
|
|
51
|
+
* method resolves to the response envelope, with the payload at `data`.
|
|
52
|
+
*/
|
|
53
|
+
readonly studio: ReturnType<typeof bind$2>["studio"];
|
|
54
|
+
/** The Tile API's style specifications. Each method resolves to the response envelope. */
|
|
55
|
+
readonly tiles: ReturnType<typeof bind$1>;
|
|
56
|
+
/**
|
|
57
|
+
* The transport every method calls through: for a call this client binds no method for, and
|
|
58
|
+
* for the openers of `@mountaya/client/events`.
|
|
59
|
+
*/
|
|
60
|
+
readonly transport: MountayaTransport;
|
|
61
|
+
/**
|
|
62
|
+
* Builds a browser client over one credential and its options, checking both before anything
|
|
63
|
+
* is sent.
|
|
64
|
+
*
|
|
65
|
+
* @throws `MountayaConfigurationError` for options that are not an object, a credential that
|
|
66
|
+
* cannot work, or an option outside its range: see {@link ClientOptions}.
|
|
67
|
+
*/
|
|
68
|
+
constructor(options: BrowserClientOptions);
|
|
103
69
|
}
|
|
104
|
-
|
|
105
|
-
export { CookieCredential, Mountaya, MountayaTransport, PublishableCredential, ShareCredential };
|
|
106
|
-
export type { BrowserClientOptions };
|
|
70
|
+
export { type AcceptedResponse, type Activity, type ActivityCapabilities, type ActivitySlug, type AgentAwaitingInputEvent, type AgentBudgetDimension, type AgentBudgetExhaustedEvent, type AgentChecksUnmetEvent, type AgentClientToolManifest, type AgentCloseInput, type AgentConfirmInput, type AgentConfirmRequiredEvent, type AgentDoneEvent, type AgentErrorCode, type AgentErrorEvent, type AgentManifestUpdateInput, type AgentMessageDeltaEvent, type AgentMessageEvent, type AgentReconnectEvent, type AgentRun, type AgentRunCreateParams, type AgentRunEvent, type AgentRunEventType, type AgentRunFeedbackParams, type AgentRunFeedbackRating, type AgentRunInputParams, type AgentRunInputType, type AgentRunProfile, type AgentRunReason, type AgentToolAbandonedEvent, type AgentToolAbandonedReason, type AgentToolCallEvent, type AgentToolCallTarget, type AgentToolErrorCode, type AgentToolResultEvent, type AgentToolResultInput, type AgentUserMessageInput, type AnalyzeGeometryResult, type ApiErrorDetails, type BadRequestResponse, type BaseUrlOverrides, type BinaryBody, type Boundaries, type CategoryActivities, type CategoryOverlays, type CollabChangeAction, type CollabChangeKind, type CollabCollectionChangedEvent, type CollabCursorEvent, type CollabCursorSignal, type CollabDraftClearEvent, type CollabDraftClearSignal, type CollabDraftUpdateEvent, type CollabDraftUpdateSignal, type CollabEntity, type CollabEntityKind, type CollabItineraryChangedEvent, type CollabLock, type CollabLockAcquireSignal, type CollabLockAcquiredEvent, type CollabLockReleaseSignal, type CollabLockReleasedEvent, type CollabLockSnapshotEvent, type CollabMember, type CollabPosition, type CollabPresenceJoinEvent, type CollabPresenceLeaveEvent, type CollabPresenceSnapshotEvent, type CollabReconnectEvent, type CollabSegmentChangedEvent, type CollabSelectionEvent, type CollabSelectionKind, type CollabSelectionRef, type CollabSelectionSignal, type CollabSignalParams, type CollabSignalType, type CollabStreamEvent, type CollabStreamEventType, type CollabWaypointChangedEvent, type CollabZoneChangedEvent, type Collection, type CollectionCount, type CollectionCreateParams, type CollectionItinerariesAddParams, type CollectionItineraryUpdateParams, type CollectionUpdateParams, type CollectionZonesAddParams, type ConflictMetadata, type ConflictResponse, type CookieCredential, type CreatedResponse, type DataOptions, type DataResult, type schema_gen_d_exports as DataSchema, selection_gen_d_exports as DataSelection, type DateMask, type DirectionsResult, type Elevation, type ElevationTileSize, type EmbeddedStudioDefaultProps, type EmbeddedStudioSafetyRules, type EmbeddedStudioTheme, type EmbeddedStudioThemeColors, type ErrorCode, type ErrorEntry, type ErrorMetadata, type Errors, type ExportFormat, type ExportItineraryResult, type ExportVariant, type FieldTree, type ForbiddenResponse, type GatewayTimeoutResponse, type GeoJSONGeometry, type GeoJSONGeometryCollection, type GeoJSONLineString, type GeoJSONMultiLineString, type GeoJSONMultiPoint, type GeoJSONMultiPolygon, type GeoJSONPoint, type GeoJSONPolygon, type GeocodeResult, type Geometry, type HTTPError, type IdempotentAnswer, type IdempotentReplayed, type ImportGranularity, type ImportProvider, type ImportRecommendationReason, type ImportWarning, type InternalErrorResponse, type IsochronesResult, type Itinerary, type ItineraryCount, type ItineraryCreateParams, type ItineraryDirectionsStep, type ItineraryDuplicateParams, type ItineraryImportConfirmParams, type ItineraryImportConfirmSegment, type ItineraryImportConfirmWaypoint, type ItineraryImportPreview, type ItineraryPace, type ItineraryPaceSegment, type ItineraryResult, type ItinerarySegment, type ItinerarySegmentGroup, type ItineraryStatus, type ItineraryUpdateParams, type ItineraryWaypoint, type ItineraryWithDetails, type Language, type Layers, type LimitKey, type ListMetadata, type LocaleMap, type Locales, type ManeuverType, type MatrixResult, MountayaApiError, MountayaAuthenticationError, MountayaBadRequestError, MountayaBillingError, MountayaConfigurationError, MountayaConflictError, MountayaConnectionError, MountayaDataError, MountayaError, MountayaForbiddenError, MountayaIdempotencyKeyInUseError, MountayaIdempotentAnswerUnavailableError, MountayaMethodNotAllowedError, MountayaNotFoundError, MountayaPayloadTooLargeError, MountayaPreconditionFailedError, MountayaRateLimitError, type MountayaResponse, MountayaSelectionError, MountayaServerError, type NotFoundResponse, type OkResponse, type Organization, type OrganizationLookupParams, type OrganizationRole, type OrganizationSettings, type Overlay, type OverlayCapabilities, type OverlayContentType, type OverlaySupportedCapabilities, PAYMENT_REQUIRED_CODE, type PagedResponse, type PaginateOptions, type PaginationMetadata, type PayloadTooLargeResponse, type PaymentRequiredResponse, type PoisResult, type ProposedCandidate, type ProposedSegment, type ProposedWaypoint, type PublishableCredential, type RangeType, type RateLimitInfo, type RateLimitPolicy, type ReadSurface, type RelationToUser, type RequestArgs, type RequestOptions, type ResourceKind, type ResourceRef, type ResponseMetadataCreatedPart, type ResponseMetadataIdempotentAnswer, type ResponseMetadataLimitReached, type ResponseMetadataLockConflict, type ResponseMetadataPatchCollection, type ResponseMetadataPatchItinerary, type ResponseMetadataPatchZone, type ResponseMetadataPostCollection, type ResponseMetadataPostItinerary, type ResponseMetadataPostZone, type ResponseReport, type schema_gen_d_exports$1 as RestSchema, type RetryOptions, type ReverseGeocodeResult, type RoadAccessInfo, type RoadAccessRestrictionType, SCHEMA_VERSION, type SearchResult, type SegmentConvertParams, type SegmentCreateParams, type SegmentGroupCreateParams, type SegmentGroupUpdateParams, type SegmentMode, type SegmentSplitParams, type SegmentUpdateParams, type Selected, type Selection, type SelectionValue, type ServiceUnavailableResponse, type Session, type SessionSurface, SessionTokenEngine, type SessionTokenEngineOptions, type SessionTokenSnapshot, type SessionTokenSource, type ShareCredential, type ShareLink, type SlopeInfo, type SpeedInfo, type StreamReconnectReason, type StreamSeam, type StudioEntitlement, type SuccessExtensions, type SuggestionsResult, type Surface, type SurfaceInfo, type SurfaceType, type Terrain, type TerrainGridResult, type TerrainProfileResult, type TerrainSamplesResult, type TerrainTileSize, type TerrainVariant, type TerrainVariantAsStyle, type TerrainVariantAsTiles, type TerrainVariantConfig, type TerrainVariants, type Theme, type TileLayer, type TileLayerType, type TileLegend, type TileLegendKind, type TileLegendStep, type schema_gen_d_exports$2 as TileSchema, type TileSource, type TileSourceSize, type TileSourceType, type TooManyRequestsResponse, type TrailDifficultyInfo, type TrailDifficultyType, type UnauthorizedResponse, type UnitLegend, type UnitLength, type UnitPace, type UnitSlope, type UnitTemperature, type WayType, type WayTypeInfo, type WaypointAmenity, type WaypointContact, type WaypointCreateParams, type WaypointIcon, type WaypointLink, type WaypointMedia, type WaypointMode, type WaypointPhoto, type WaypointProperty, type WaypointPropertyFormat, type WaypointTiming, type WaypointUpdateParams, type Zone, type ZoneCreateParams, type ZoneFeature, type ZoneLevel, type ZoneMode, type ZoneSource, type ZoneSourceKind, type ZoneStatus, type ZoneUpdateParams, boundFetch, operations_gen_d_exports as data, decodeRestSchema, defaultBaseUrls, errorForStatus, isMountayaApiError, isMountayaError, paginate, parseRateLimit, coreOperations_gen_d_exports as rest, operations_gen_d_exports$1 as tiles };
|
package/dist/browser.js
CHANGED
|
@@ -1,53 +1,22 @@
|
|
|
1
|
-
import { MountayaTransport,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { bind } from './chunk-TDTK2L5H.js';
|
|
6
|
-
export { MountayaApiError, MountayaAuthenticationError, MountayaBadRequestError, MountayaBillingError, MountayaConfigurationError, MountayaConflictError, MountayaConnectionError, MountayaDataError, MountayaError, MountayaForbiddenError, MountayaIdempotencyKeyInUseError, MountayaIdempotentAnswerUnavailableError, MountayaMethodNotAllowedError, MountayaNotFoundError, MountayaPayloadTooLargeError, MountayaPreconditionFailedError, MountayaRateLimitError, MountayaServerError, PAYMENT_REQUIRED_CODE, errorForStatus, isMountayaApiError, isMountayaError, parseRateLimit } from './chunk-TDTK2L5H.js';
|
|
7
|
-
|
|
8
|
-
// src/browser.ts
|
|
9
|
-
var MountayaTransport2 = MountayaTransport;
|
|
1
|
+
import { a as bind$1, c as operations_gen_exports, d as MountayaTransport$1, f as boundFetch, i as SessionTokenEngine, l as selection_gen_exports, n as SCHEMA_VERSION, o as operations_gen_exports$1, p as defaultBaseUrls, r as paginate, s as bind, t as coreOperations_gen_exports, u as MountayaSelectionError } from "./chunk-DmxQID5X.js";
|
|
2
|
+
import { An as MountayaConnectionError, Bn as MountayaRateLimitError, Dn as MountayaBillingError, En as MountayaBadRequestError, Fn as MountayaIdempotentAnswerUnavailableError, Hn as PAYMENT_REQUIRED_CODE, In as MountayaMethodNotAllowedError, Kn as errorForStatus, Ln as MountayaNotFoundError, Mn as MountayaError, Nn as MountayaForbiddenError, On as MountayaConfigurationError, Pn as MountayaIdempotencyKeyInUseError, Rn as MountayaPayloadTooLargeError, Tn as MountayaAuthenticationError, Vn as MountayaServerError, Xn as isMountayaApiError, Zn as isMountayaError, jn as MountayaDataError, kn as MountayaConflictError, rr as parseRateLimit, t as bind$2, wn as MountayaApiError, zn as MountayaPreconditionFailedError } from "./chunk-Cg7Dtcb4.js";
|
|
3
|
+
import { t as decodeRestSchema } from "./chunk-X2ukY3ho.js";
|
|
4
|
+
const MountayaTransport = MountayaTransport$1;
|
|
10
5
|
var Mountaya = class {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
* method resolves to the response envelope, with the payload at `data`.
|
|
25
|
-
*/
|
|
26
|
-
studio;
|
|
27
|
-
/** The Tile API's style specifications. Each method resolves to the response envelope. */
|
|
28
|
-
tiles;
|
|
29
|
-
/**
|
|
30
|
-
* The transport every method calls through: for a call this client binds no method for, and
|
|
31
|
-
* for the openers of `@mountaya/client/events`.
|
|
32
|
-
*/
|
|
33
|
-
transport;
|
|
34
|
-
/**
|
|
35
|
-
* Builds a browser client over one credential and its options, checking both before anything
|
|
36
|
-
* is sent.
|
|
37
|
-
*
|
|
38
|
-
* @throws `MountayaConfigurationError` for options that are not an object, a credential that
|
|
39
|
-
* cannot work, or an option outside its range: see {@link ClientOptions}.
|
|
40
|
-
*/
|
|
41
|
-
constructor(options) {
|
|
42
|
-
this.transport = new MountayaTransport2(options);
|
|
43
|
-
const api = bind(this.transport);
|
|
44
|
-
this.agent = api.agent;
|
|
45
|
-
this.data = bind$1(this.transport);
|
|
46
|
-
this.studio = api.studio;
|
|
47
|
-
this.tiles = bind2(this.transport);
|
|
48
|
-
}
|
|
6
|
+
agent;
|
|
7
|
+
data;
|
|
8
|
+
studio;
|
|
9
|
+
tiles;
|
|
10
|
+
transport;
|
|
11
|
+
constructor(options) {
|
|
12
|
+
this.transport = new MountayaTransport(options);
|
|
13
|
+
const api = bind$2(this.transport);
|
|
14
|
+
this.agent = api.agent;
|
|
15
|
+
this.data = bind(this.transport);
|
|
16
|
+
this.studio = api.studio;
|
|
17
|
+
this.tiles = bind$1(this.transport);
|
|
18
|
+
}
|
|
49
19
|
};
|
|
20
|
+
export { selection_gen_exports as DataSelection, Mountaya, MountayaApiError, MountayaAuthenticationError, MountayaBadRequestError, MountayaBillingError, MountayaConfigurationError, MountayaConflictError, MountayaConnectionError, MountayaDataError, MountayaError, MountayaForbiddenError, MountayaIdempotencyKeyInUseError, MountayaIdempotentAnswerUnavailableError, MountayaMethodNotAllowedError, MountayaNotFoundError, MountayaPayloadTooLargeError, MountayaPreconditionFailedError, MountayaRateLimitError, MountayaSelectionError, MountayaServerError, MountayaTransport, PAYMENT_REQUIRED_CODE, SCHEMA_VERSION, SessionTokenEngine, boundFetch, operations_gen_exports as data, decodeRestSchema, defaultBaseUrls, errorForStatus, isMountayaApiError, isMountayaError, paginate, parseRateLimit, coreOperations_gen_exports as rest, operations_gen_exports$1 as tiles };
|
|
50
21
|
|
|
51
|
-
export { Mountaya, MountayaTransport2 as MountayaTransport };
|
|
52
|
-
//# sourceMappingURL=browser.js.map
|
|
53
22
|
//# sourceMappingURL=browser.js.map
|
package/dist/browser.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"browser.js","names":["CoreTransport","bindRest","bindData","bindTiles"],"sources":["../src/browser.ts"],"mappings":";;;AAoLA,MAAa,oBACXA;AASF,IAAa,WAAb,MAAsB;CAMpB;CAKA;CAKA;CAEA;CAKA;CASA,YAAY,SAA+B;EACzC,KAAK,YAAY,IAAI,kBAAkB,OAAO;EAE9C,MAAM,MAAMC,OAAS,KAAK,SAAS;EAEnC,KAAK,QAAQ,IAAI;EACjB,KAAK,OAAOC,KAAS,KAAK,SAAS;EACnC,KAAK,SAAS,IAAI;EAClB,KAAK,QAAQC,OAAU,KAAK,SAAS;CACvC;AACF"}
|