@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.
Files changed (67) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/README.md +2 -2
  3. package/dist/admin/index.cjs +2876 -3502
  4. package/dist/admin/index.cjs.map +1 -1
  5. package/dist/admin/index.d.cts +731 -912
  6. package/dist/admin/index.d.ts +731 -912
  7. package/dist/admin/index.js +188 -285
  8. package/dist/admin/index.js.map +1 -1
  9. package/dist/browser.cjs +5913 -7993
  10. package/dist/browser.cjs.map +1 -1
  11. package/dist/browser.d.cts +42 -78
  12. package/dist/browser.d.ts +42 -78
  13. package/dist/browser.js +18 -49
  14. package/dist/browser.js.map +1 -1
  15. package/dist/chunk-CeEX7ayk.d.cts +75531 -0
  16. package/dist/chunk-CeEX7ayk.d.ts +75531 -0
  17. package/dist/chunk-Cg7Dtcb4.js +2987 -0
  18. package/dist/chunk-Cg7Dtcb4.js.map +1 -0
  19. package/dist/chunk-DJqUsgsy.d.ts +1463 -0
  20. package/dist/chunk-DNc8T5K1.js +241 -0
  21. package/dist/chunk-DNc8T5K1.js.map +1 -0
  22. package/dist/chunk-DTxzw3hu.d.cts +1463 -0
  23. package/dist/chunk-DmxQID5X.js +2289 -0
  24. package/dist/chunk-DmxQID5X.js.map +1 -0
  25. package/dist/chunk-DoZt_oIV.d.ts +3991 -0
  26. package/dist/chunk-DpJrqANO.js +11 -0
  27. package/dist/chunk-Dx8mPAdC.d.cts +3991 -0
  28. package/dist/chunk-X2ukY3ho.js +419 -0
  29. package/dist/chunk-X2ukY3ho.js.map +1 -0
  30. package/dist/events/index.cjs +1338 -1874
  31. package/dist/events/index.cjs.map +1 -1
  32. package/dist/events/index.d.cts +373 -382
  33. package/dist/events/index.d.ts +373 -382
  34. package/dist/events/index.js +523 -806
  35. package/dist/events/index.js.map +1 -1
  36. package/dist/index.cjs +5908 -7988
  37. package/dist/index.cjs.map +1 -1
  38. package/dist/index.d.cts +37 -69
  39. package/dist/index.d.ts +37 -69
  40. package/dist/index.js +17 -48
  41. package/dist/index.js.map +1 -1
  42. package/package.json +7 -8
  43. package/src/browser.ts +1 -0
  44. package/src/core/rules/clientHeader.ts +1 -1
  45. package/src/core/rules/errors.ts +1 -1
  46. package/src/core/rules/nullMasks.gen.ts +14 -2
  47. package/src/core/rules/version.gen.ts +1 -1
  48. package/src/events/index.ts +1 -5
  49. package/src/rest/adminResources.gen.ts +2 -0
  50. package/src/rest/dates.gen.ts +1 -1
  51. package/src/rest/resources.gen.ts +2 -0
  52. package/src/rest/schema.gen.ts +247 -60
  53. package/src/tiles/schema.gen.ts +1 -3
  54. package/dist/chunk-BM526BHG.js +0 -342
  55. package/dist/chunk-BM526BHG.js.map +0 -1
  56. package/dist/chunk-D2YEVTG7.js +0 -327
  57. package/dist/chunk-D2YEVTG7.js.map +0 -1
  58. package/dist/chunk-OHKVUREN.js +0 -3500
  59. package/dist/chunk-OHKVUREN.js.map +0 -1
  60. package/dist/chunk-TDTK2L5H.js +0 -3842
  61. package/dist/chunk-TDTK2L5H.js.map +0 -1
  62. package/dist/coreOperations.gen-BMYPoBbz.d.ts +0 -1760
  63. package/dist/coreOperations.gen-BxX5xRxw.d.cts +0 -1760
  64. package/dist/errors-B-GqAtQv.d.cts +0 -75960
  65. package/dist/errors-B-GqAtQv.d.ts +0 -75960
  66. package/dist/operations.gen-CvTyzKNF.d.cts +0 -3993
  67. package/dist/operations.gen-DUD406TV.d.ts +0 -3993
@@ -1,56 +1,22 @@
1
- export { Geometry } from 'geojson';
2
- import { ba as PublishableCredential, bb as ShareCredential, bc as CookieCredential } from './errors-B-GqAtQv.cjs';
3
- import { ClientOptions, MountayaTransport as MountayaTransport$1 } from './index.cjs';
4
- export { bd as AcceptedResponse, be as Activity, bf as ActivityCapabilities, bg as ActivitySlug, bh as AgentAwaitingInputEvent, bi as AgentBudgetDimension, bj as AgentBudgetExhaustedEvent, bk as AgentChecksUnmetEvent, bl as AgentClientToolManifest, bm as AgentCloseInput, bn as AgentConfirmInput, bo as AgentConfirmRequiredEvent, bp as AgentDoneEvent, bq as AgentErrorCode, br as AgentErrorEvent, bs as AgentManifestUpdateInput, bt as AgentMessageDeltaEvent, bu as AgentMessageEvent, bv as AgentReconnectEvent, bw as AgentRun, bx as AgentRunCreateParams, by as AgentRunEvent, bz as AgentRunEventType, bA as AgentRunFeedbackParams, bB as AgentRunFeedbackRating, bC as AgentRunInputParams, bD as AgentRunInputType, bE as AgentRunProfile, bF as AgentRunReason, bG as AgentToolAbandonedEvent, bH as AgentToolAbandonedReason, bI as AgentToolCallEvent, bJ as AgentToolCallTarget, bK as AgentToolErrorCode, bL as AgentToolResultEvent, bM as AgentToolResultInput, bN as AgentUserMessageInput, bO as AnalyzeGeometryResult, bP as ApiErrorDetails, bQ as BadRequestResponse, bR as BaseUrlOverrides, bS as BinaryBody, bT as Boundaries, bU as CategoryActivities, bV as CategoryOverlays, bW as CollabChangeAction, bX as CollabChangeKind, bY as CollabCollectionChangedEvent, bZ as CollabCursorEvent, b_ as CollabCursorSignal, b$ as CollabDraftClearEvent, c0 as CollabDraftClearSignal, c1 as CollabDraftUpdateEvent, c2 as CollabDraftUpdateSignal, c3 as CollabEntity, c4 as CollabEntityKind, c5 as CollabItineraryChangedEvent, c6 as CollabLock, c7 as CollabLockAcquireSignal, c8 as CollabLockAcquiredEvent, c9 as CollabLockReleaseSignal, ca as CollabLockReleasedEvent, cb as CollabLockSnapshotEvent, cc as CollabMember, cd as CollabPosition, ce as CollabPresenceJoinEvent, cf as CollabPresenceLeaveEvent, cg as CollabPresenceSnapshotEvent, ch as CollabReconnectEvent, ci as CollabSegmentChangedEvent, cj as CollabSelectionEvent, ck as CollabSelectionKind, cl as CollabSelectionRef, cm as CollabSelectionSignal, cn as CollabSignalParams, co as CollabSignalType, cp as CollabStreamEvent, cq as CollabStreamEventType, cr as CollabWaypointChangedEvent, cs as CollabZoneChangedEvent, ct as Collection, cu as CollectionCount, cv as CollectionCreateParams, cw as CollectionItinerariesAddParams, cx as CollectionItineraryUpdateParams, cy as CollectionUpdateParams, cz as CollectionZonesAddParams, cA as ConflictMetadata, cB as ConflictResponse, cC as CreatedResponse, cD as DataSchema, cE as DateMask, cF as DirectionsResult, cG as Elevation, cH as ElevationTileSize, cI as EmbeddedStudioDefaultProps, cJ as EmbeddedStudioSafetyRules, cK as EmbeddedStudioTheme, cL as EmbeddedStudioThemeColors, cM as ErrorCode, cN as ErrorEntry, cO as ErrorMetadata, cP as Errors, cQ as ExportFormat, cR as ExportItineraryResult, cS as ExportVariant, cT as ForbiddenResponse, cU as GatewayTimeoutResponse, cV as GeoJSONGeometry, cW as GeoJSONGeometryCollection, cX as GeoJSONLineString, cY as GeoJSONMultiLineString, cZ as GeoJSONMultiPoint, c_ as GeoJSONMultiPolygon, c$ as GeoJSONPoint, d0 as GeoJSONPolygon, d1 as GeocodeResult, d2 as HTTPError, d3 as IdempotentAnswer, d4 as IdempotentReplayed, d5 as ImportGranularity, d6 as ImportProvider, d7 as ImportRecommendationReason, d8 as ImportWarning, d9 as InternalErrorResponse, da as IsochronesResult, db as Itinerary, dc as ItineraryCount, dd as ItineraryCreateParams, de as ItineraryDirectionsStep, df as ItineraryDuplicateParams, dg as ItineraryImportConfirmParams, dh as ItineraryImportConfirmSegment, di as ItineraryImportConfirmWaypoint, dj as ItineraryImportPreview, dk as ItineraryPace, dl as ItineraryPaceSegment, dm as ItineraryResult, dn as ItinerarySegment, dp as ItinerarySegmentGroup, dq as ItineraryStatus, dr as ItineraryUpdateParams, ds as ItineraryWaypoint, dt as ItineraryWithDetails, du as Language, dv as Layers, dw as LimitKey, dx as ListMetadata, dy as LocaleMap, dz as Locales, dA as ManeuverType, dB as MatrixResult, dC as MountayaApiError, dD as MountayaAuthenticationError, dE as MountayaBadRequestError, dF as MountayaBillingError, dG as MountayaConfigurationError, dH as MountayaConflictError, dI as MountayaConnectionError, dJ as MountayaDataError, M as MountayaError, dK as MountayaForbiddenError, dL as MountayaIdempotencyKeyInUseError, dM as MountayaIdempotentAnswerUnavailableError, dN as MountayaMethodNotAllowedError, dO as MountayaNotFoundError, dP as MountayaPayloadTooLargeError, dQ as MountayaPreconditionFailedError, dR as MountayaRateLimitError, dS as MountayaServerError, dT as NotFoundResponse, dU as OkResponse, dV as Organization, dW as OrganizationLookupParams, dX as OrganizationRole, dY as OrganizationSettings, dZ as Overlay, d_ as OverlayCapabilities, d$ as OverlayContentType, e0 as OverlaySupportedCapabilities, e1 as PAYMENT_REQUIRED_CODE, e2 as PaginationMetadata, e3 as PayloadTooLargeResponse, e4 as PaymentRequiredResponse, e5 as PoisResult, e6 as ProposedCandidate, e7 as ProposedSegment, e8 as ProposedWaypoint, e9 as RangeType, ea as RateLimitInfo, eb as RateLimitPolicy, ec as ReadSurface, ed as RelationToUser, ee as RequestArgs, ef as RequestOptions, eg as ResponseMetadataCreatedPart, eh as ResponseMetadataIdempotentAnswer, ei as ResponseMetadataLimitReached, ej as ResponseMetadataLockConflict, ek as ResponseMetadataPatchCollection, el as ResponseMetadataPatchItinerary, em as ResponseMetadataPatchZone, en as ResponseMetadataPostCollection, eo as ResponseMetadataPostItinerary, ep as ResponseMetadataPostZone, eq as ResponseReport, er as RestSchema, es as RetryOptions, et as ReverseGeocodeResult, eu as RoadAccessInfo, ev as RoadAccessRestrictionType, ew as SearchResult, ex as SegmentConvertParams, ey as SegmentCreateParams, ez as SegmentGroupCreateParams, eA as SegmentGroupUpdateParams, eB as SegmentMode, eC as SegmentSplitParams, eD as SegmentUpdateParams, eE as ServiceUnavailableResponse, eF as Session, eG as SessionSurface, eH as SessionTokenEngine, eI as SessionTokenEngineOptions, eJ as SessionTokenSnapshot, eK as SessionTokenSource, eL as ShareLink, eM as SlopeInfo, eN as SpeedInfo, eO as StreamReconnectReason, eP as StreamSeam, eQ as StudioEntitlement, eR as SuccessExtensions, eS as SuggestionsResult, eT as Surface, eU as SurfaceInfo, eV as SurfaceType, eW as Terrain, eX as TerrainGridResult, eY as TerrainProfileResult, eZ as TerrainSamplesResult, e_ as TerrainTileSize, e$ as TerrainVariant, f0 as TerrainVariantAsStyle, f1 as TerrainVariantAsTiles, f2 as TerrainVariantConfig, f3 as TerrainVariants, f4 as Theme, f5 as TileLayer, f6 as TileLayerType, f7 as TileLegend, f8 as TileLegendKind, f9 as TileLegendStep, fa as TileSchema, fb as TileSource, fc as TileSourceSize, fd as TileSourceType, fe as TooManyRequestsResponse, ff as TrailDifficultyInfo, fg as TrailDifficultyType, fh as UnauthorizedResponse, fi as UnitLegend, fj as UnitLength, fk as UnitPace, fl as UnitSlope, fm as UnitTemperature, fn as WayType, fo as WayTypeInfo, fp as WaypointAmenity, fq as WaypointContact, fr as WaypointCreateParams, fs as WaypointIcon, ft as WaypointLink, fu as WaypointMedia, fv as WaypointMode, fw as WaypointPhoto, fx as WaypointProperty, fy as WaypointPropertyFormat, fz as WaypointTiming, fA as WaypointUpdateParams, fB as Zone, fC as ZoneCreateParams, fD as ZoneFeature, fE as ZoneLevel, fF as ZoneMode, fG as ZoneSource, fH as ZoneSourceKind, fI as ZoneStatus, fJ as ZoneUpdateParams, fK as boundFetch, fL as defaultBaseUrls, fM as errorForStatus, fN as isMountayaApiError, fO as isMountayaError, fP as parseRateLimit } from './errors-B-GqAtQv.cjs';
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
- /** How the client authenticates: a publishable key, a share token or the browser's session. */
47
- readonly credential: PublishableCredential | ShareCredential | CookieCredential;
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
- * The AI agent: starting a run, answering it, rating it. Each method resolves to the response
74
- * envelope, with the payload at `data`; a run's events are read through
75
- * `createAgentTransport` of `@mountaya/client/events`.
76
- */
77
- readonly agent: ReturnType<typeof bind>["agent"];
78
- /**
79
- * The GraphQL Data API: directions, search, terrain, isochrones, matrices. Each method resolves
80
- * to the operation's own field, with no envelope.
81
- */
82
- readonly data: ReturnType<typeof bind$1>;
83
- /**
84
- * The Map Studio API's map half: itineraries, zones, collections, and their catalogs. Each
85
- * method resolves to the response envelope, with the payload at `data`.
86
- */
87
- readonly studio: ReturnType<typeof bind>["studio"];
88
- /** The Tile API's style specifications. Each method resolves to the response envelope. */
89
- readonly tiles: ReturnType<typeof bind$2>;
90
- /**
91
- * The transport every method calls through: for a call this client binds no method for, and
92
- * for the openers of `@mountaya/client/events`.
93
- */
94
- readonly transport: MountayaTransport;
95
- /**
96
- * Builds a browser client over one credential and its options, checking both before anything
97
- * is sent.
98
- *
99
- * @throws `MountayaConfigurationError` for options that are not an object, a credential that
100
- * cannot work, or an option outside its range: see {@link ClientOptions}.
101
- */
102
- constructor(options: BrowserClientOptions);
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
- export { Geometry } from 'geojson';
2
- import { ba as PublishableCredential, bb as ShareCredential, bc as CookieCredential } from './errors-B-GqAtQv.js';
3
- import { ClientOptions, MountayaTransport as MountayaTransport$1 } from './index.js';
4
- export { bd as AcceptedResponse, be as Activity, bf as ActivityCapabilities, bg as ActivitySlug, bh as AgentAwaitingInputEvent, bi as AgentBudgetDimension, bj as AgentBudgetExhaustedEvent, bk as AgentChecksUnmetEvent, bl as AgentClientToolManifest, bm as AgentCloseInput, bn as AgentConfirmInput, bo as AgentConfirmRequiredEvent, bp as AgentDoneEvent, bq as AgentErrorCode, br as AgentErrorEvent, bs as AgentManifestUpdateInput, bt as AgentMessageDeltaEvent, bu as AgentMessageEvent, bv as AgentReconnectEvent, bw as AgentRun, bx as AgentRunCreateParams, by as AgentRunEvent, bz as AgentRunEventType, bA as AgentRunFeedbackParams, bB as AgentRunFeedbackRating, bC as AgentRunInputParams, bD as AgentRunInputType, bE as AgentRunProfile, bF as AgentRunReason, bG as AgentToolAbandonedEvent, bH as AgentToolAbandonedReason, bI as AgentToolCallEvent, bJ as AgentToolCallTarget, bK as AgentToolErrorCode, bL as AgentToolResultEvent, bM as AgentToolResultInput, bN as AgentUserMessageInput, bO as AnalyzeGeometryResult, bP as ApiErrorDetails, bQ as BadRequestResponse, bR as BaseUrlOverrides, bS as BinaryBody, bT as Boundaries, bU as CategoryActivities, bV as CategoryOverlays, bW as CollabChangeAction, bX as CollabChangeKind, bY as CollabCollectionChangedEvent, bZ as CollabCursorEvent, b_ as CollabCursorSignal, b$ as CollabDraftClearEvent, c0 as CollabDraftClearSignal, c1 as CollabDraftUpdateEvent, c2 as CollabDraftUpdateSignal, c3 as CollabEntity, c4 as CollabEntityKind, c5 as CollabItineraryChangedEvent, c6 as CollabLock, c7 as CollabLockAcquireSignal, c8 as CollabLockAcquiredEvent, c9 as CollabLockReleaseSignal, ca as CollabLockReleasedEvent, cb as CollabLockSnapshotEvent, cc as CollabMember, cd as CollabPosition, ce as CollabPresenceJoinEvent, cf as CollabPresenceLeaveEvent, cg as CollabPresenceSnapshotEvent, ch as CollabReconnectEvent, ci as CollabSegmentChangedEvent, cj as CollabSelectionEvent, ck as CollabSelectionKind, cl as CollabSelectionRef, cm as CollabSelectionSignal, cn as CollabSignalParams, co as CollabSignalType, cp as CollabStreamEvent, cq as CollabStreamEventType, cr as CollabWaypointChangedEvent, cs as CollabZoneChangedEvent, ct as Collection, cu as CollectionCount, cv as CollectionCreateParams, cw as CollectionItinerariesAddParams, cx as CollectionItineraryUpdateParams, cy as CollectionUpdateParams, cz as CollectionZonesAddParams, cA as ConflictMetadata, cB as ConflictResponse, cC as CreatedResponse, cD as DataSchema, cE as DateMask, cF as DirectionsResult, cG as Elevation, cH as ElevationTileSize, cI as EmbeddedStudioDefaultProps, cJ as EmbeddedStudioSafetyRules, cK as EmbeddedStudioTheme, cL as EmbeddedStudioThemeColors, cM as ErrorCode, cN as ErrorEntry, cO as ErrorMetadata, cP as Errors, cQ as ExportFormat, cR as ExportItineraryResult, cS as ExportVariant, cT as ForbiddenResponse, cU as GatewayTimeoutResponse, cV as GeoJSONGeometry, cW as GeoJSONGeometryCollection, cX as GeoJSONLineString, cY as GeoJSONMultiLineString, cZ as GeoJSONMultiPoint, c_ as GeoJSONMultiPolygon, c$ as GeoJSONPoint, d0 as GeoJSONPolygon, d1 as GeocodeResult, d2 as HTTPError, d3 as IdempotentAnswer, d4 as IdempotentReplayed, d5 as ImportGranularity, d6 as ImportProvider, d7 as ImportRecommendationReason, d8 as ImportWarning, d9 as InternalErrorResponse, da as IsochronesResult, db as Itinerary, dc as ItineraryCount, dd as ItineraryCreateParams, de as ItineraryDirectionsStep, df as ItineraryDuplicateParams, dg as ItineraryImportConfirmParams, dh as ItineraryImportConfirmSegment, di as ItineraryImportConfirmWaypoint, dj as ItineraryImportPreview, dk as ItineraryPace, dl as ItineraryPaceSegment, dm as ItineraryResult, dn as ItinerarySegment, dp as ItinerarySegmentGroup, dq as ItineraryStatus, dr as ItineraryUpdateParams, ds as ItineraryWaypoint, dt as ItineraryWithDetails, du as Language, dv as Layers, dw as LimitKey, dx as ListMetadata, dy as LocaleMap, dz as Locales, dA as ManeuverType, dB as MatrixResult, dC as MountayaApiError, dD as MountayaAuthenticationError, dE as MountayaBadRequestError, dF as MountayaBillingError, dG as MountayaConfigurationError, dH as MountayaConflictError, dI as MountayaConnectionError, dJ as MountayaDataError, M as MountayaError, dK as MountayaForbiddenError, dL as MountayaIdempotencyKeyInUseError, dM as MountayaIdempotentAnswerUnavailableError, dN as MountayaMethodNotAllowedError, dO as MountayaNotFoundError, dP as MountayaPayloadTooLargeError, dQ as MountayaPreconditionFailedError, dR as MountayaRateLimitError, dS as MountayaServerError, dT as NotFoundResponse, dU as OkResponse, dV as Organization, dW as OrganizationLookupParams, dX as OrganizationRole, dY as OrganizationSettings, dZ as Overlay, d_ as OverlayCapabilities, d$ as OverlayContentType, e0 as OverlaySupportedCapabilities, e1 as PAYMENT_REQUIRED_CODE, e2 as PaginationMetadata, e3 as PayloadTooLargeResponse, e4 as PaymentRequiredResponse, e5 as PoisResult, e6 as ProposedCandidate, e7 as ProposedSegment, e8 as ProposedWaypoint, e9 as RangeType, ea as RateLimitInfo, eb as RateLimitPolicy, ec as ReadSurface, ed as RelationToUser, ee as RequestArgs, ef as RequestOptions, eg as ResponseMetadataCreatedPart, eh as ResponseMetadataIdempotentAnswer, ei as ResponseMetadataLimitReached, ej as ResponseMetadataLockConflict, ek as ResponseMetadataPatchCollection, el as ResponseMetadataPatchItinerary, em as ResponseMetadataPatchZone, en as ResponseMetadataPostCollection, eo as ResponseMetadataPostItinerary, ep as ResponseMetadataPostZone, eq as ResponseReport, er as RestSchema, es as RetryOptions, et as ReverseGeocodeResult, eu as RoadAccessInfo, ev as RoadAccessRestrictionType, ew as SearchResult, ex as SegmentConvertParams, ey as SegmentCreateParams, ez as SegmentGroupCreateParams, eA as SegmentGroupUpdateParams, eB as SegmentMode, eC as SegmentSplitParams, eD as SegmentUpdateParams, eE as ServiceUnavailableResponse, eF as Session, eG as SessionSurface, eH as SessionTokenEngine, eI as SessionTokenEngineOptions, eJ as SessionTokenSnapshot, eK as SessionTokenSource, eL as ShareLink, eM as SlopeInfo, eN as SpeedInfo, eO as StreamReconnectReason, eP as StreamSeam, eQ as StudioEntitlement, eR as SuccessExtensions, eS as SuggestionsResult, eT as Surface, eU as SurfaceInfo, eV as SurfaceType, eW as Terrain, eX as TerrainGridResult, eY as TerrainProfileResult, eZ as TerrainSamplesResult, e_ as TerrainTileSize, e$ as TerrainVariant, f0 as TerrainVariantAsStyle, f1 as TerrainVariantAsTiles, f2 as TerrainVariantConfig, f3 as TerrainVariants, f4 as Theme, f5 as TileLayer, f6 as TileLayerType, f7 as TileLegend, f8 as TileLegendKind, f9 as TileLegendStep, fa as TileSchema, fb as TileSource, fc as TileSourceSize, fd as TileSourceType, fe as TooManyRequestsResponse, ff as TrailDifficultyInfo, fg as TrailDifficultyType, fh as UnauthorizedResponse, fi as UnitLegend, fj as UnitLength, fk as UnitPace, fl as UnitSlope, fm as UnitTemperature, fn as WayType, fo as WayTypeInfo, fp as WaypointAmenity, fq as WaypointContact, fr as WaypointCreateParams, fs as WaypointIcon, ft as WaypointLink, fu as WaypointMedia, fv as WaypointMode, fw as WaypointPhoto, fx as WaypointProperty, fy as WaypointPropertyFormat, fz as WaypointTiming, fA as WaypointUpdateParams, fB as Zone, fC as ZoneCreateParams, fD as ZoneFeature, fE as ZoneLevel, fF as ZoneMode, fG as ZoneSource, fH as ZoneSourceKind, fI as ZoneStatus, fJ as ZoneUpdateParams, fK as boundFetch, fL as defaultBaseUrls, fM as errorForStatus, fN as isMountayaApiError, fO as isMountayaError, fP as parseRateLimit } from './errors-B-GqAtQv.js';
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
- /** How the client authenticates: a publishable key, a share token or the browser's session. */
47
- readonly credential: PublishableCredential | ShareCredential | CookieCredential;
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
- * The AI agent: starting a run, answering it, rating it. Each method resolves to the response
74
- * envelope, with the payload at `data`; a run's events are read through
75
- * `createAgentTransport` of `@mountaya/client/events`.
76
- */
77
- readonly agent: ReturnType<typeof bind>["agent"];
78
- /**
79
- * The GraphQL Data API: directions, search, terrain, isochrones, matrices. Each method resolves
80
- * to the operation's own field, with no envelope.
81
- */
82
- readonly data: ReturnType<typeof bind$1>;
83
- /**
84
- * The Map Studio API's map half: itineraries, zones, collections, and their catalogs. Each
85
- * method resolves to the response envelope, with the payload at `data`.
86
- */
87
- readonly studio: ReturnType<typeof bind>["studio"];
88
- /** The Tile API's style specifications. Each method resolves to the response envelope. */
89
- readonly tiles: ReturnType<typeof bind$2>;
90
- /**
91
- * The transport every method calls through: for a call this client binds no method for, and
92
- * for the openers of `@mountaya/client/events`.
93
- */
94
- readonly transport: MountayaTransport;
95
- /**
96
- * Builds a browser client over one credential and its options, checking both before anything
97
- * is sent.
98
- *
99
- * @throws `MountayaConfigurationError` for options that are not an object, a credential that
100
- * cannot work, or an option outside its range: see {@link ClientOptions}.
101
- */
102
- constructor(options: BrowserClientOptions);
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, bind as bind$1, bind2 } from './chunk-OHKVUREN.js';
2
- export { selection_gen_exports as DataSelection, MountayaSelectionError, SCHEMA_VERSION, SessionTokenEngine, boundFetch, operations_gen_exports as data, defaultBaseUrls, paginate, coreOperations_gen_exports as rest, operations_gen_exports2 as tiles } from './chunk-OHKVUREN.js';
3
- export { decodeRestSchema } from './chunk-BM526BHG.js';
4
- import './chunk-D2YEVTG7.js';
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
- * The AI agent: starting a run, answering it, rating it. Each method resolves to the response
13
- * envelope, with the payload at `data`; a run's events are read through
14
- * `createAgentTransport` of `@mountaya/client/events`.
15
- */
16
- agent;
17
- /**
18
- * The GraphQL Data API: directions, search, terrain, isochrones, matrices. Each method resolves
19
- * to the operation's own field, with no envelope.
20
- */
21
- data;
22
- /**
23
- * The Map Studio API's map half: itineraries, zones, collections, and their catalogs. Each
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
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/browser.ts"],"names":["MountayaTransport","bind"],"mappings":";;;;;;;;AAmLO,IAAMA,kBAAAA,GACX;AASK,IAAM,WAAN,MAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMX,KAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA,MAAA;AAAA;AAAA,EAEA,KAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAST,YAAY,OAAA,EAA+B;AACzC,IAAA,IAAA,CAAK,SAAA,GAAY,IAAIA,kBAAAA,CAAkB,OAAO,CAAA;AAE9C,IAAA,MAAM,GAAA,GAAMC,IAAAA,CAAS,IAAA,CAAK,SAAS,CAAA;AAEnC,IAAA,IAAA,CAAK,QAAQ,GAAA,CAAI,KAAA;AACjB,IAAA,IAAA,CAAK,IAAA,GAAOA,MAAA,CAAS,IAAA,CAAK,SAAS,CAAA;AACnC,IAAA,IAAA,CAAK,SAAS,GAAA,CAAI,MAAA;AAClB,IAAA,IAAA,CAAK,KAAA,GAAQA,KAAAA,CAAU,IAAA,CAAK,SAAS,CAAA;AAAA,EACvC;AACF","file":"browser.js"}
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"}