@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
package/dist/index.d.cts CHANGED
@@ -1,76 +1,44 @@
1
- export { Geometry } from 'geojson';
2
- import { a as MountayaTransport, b9 as ClientOptions } from './errors-B-GqAtQv.cjs';
3
- 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, bc as CookieCredential, cC as CreatedResponse, fQ as Credential, 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, ba as PublishableCredential, 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, fR as SecretCredential, 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, bb as ShareCredential, 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';
4
- import { b as bind$1, a as bind$2 } from './coreOperations.gen-BxX5xRxw.cjs';
5
- 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';
6
- import { a5 as bind } from './operations.gen-CvTyzKNF.cjs';
7
-
8
- /**
9
- * The Mountaya API client: the Map Studio API, the Tile API and the GraphQL Data API, behind one
10
- * credential.
11
- *
12
- * ```ts
13
- * import { Mountaya } from "@mountaya/client";
14
- *
15
- * const mountaya = new Mountaya({ credential: { publishableKey: "pk_…" } });
16
- *
17
- * // A Map Studio or Tile API method resolves to the response envelope: the payload is at `data`.
18
- * const { data: groups } = await mountaya.studio.itineraries.getItineraries();
19
- * const { data: zones } = await mountaya.studio.zones.getZones();
20
- * ```
21
- *
22
- * The Map Studio API's map half arrives as `studio` (itineraries, zones, collections,
23
- * collaboration, catalogs), and `agent` beside it: a run outlives the surface that started it and
24
- * is addressed by a run id no map holds. The organization behind the map (its keys, settings,
25
- * members, billing and webhooks, and minting a session token) is the admin unit's, which
26
- * `@mountaya/client/admin` publishes as `new MountayaAdmin(mountaya)` beside webhook receiving, so
27
- * an application that never manages an organization never imports it. Which namespace and which
28
- * unit an operation belongs to is declared in the contract, not decided here, so every language's
29
- * client divides it the same way.
30
- *
31
- * This entry point exposes the secret-key credential, which mints session tokens and must only
32
- * ever run on a server. Browser code imports `@mountaya/client/browser`, which does not export it
33
- * at all.
34
- */
35
-
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, Ct as Credential, 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, Tt as SecretCredential, 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, 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";
36
5
  /**
37
6
  * Mountaya is the client. One instance holds one credential and one set of policies.
38
7
  *
39
8
  * The organization's operations are the admin unit's: `new MountayaAdmin(mountaya)` of
40
9
  * `@mountaya/client/admin` answers them, bound to this client's transport.
41
10
  */
42
- declare class Mountaya {
43
- /**
44
- * The AI agent: starting a run, answering it, rating it. Each method resolves to the response
45
- * envelope, with the payload at `data`; a run's events are read through
46
- * `createAgentTransport` of `@mountaya/client/events`.
47
- */
48
- readonly agent: ReturnType<typeof bind>["agent"];
49
- /**
50
- * The GraphQL Data API: directions, search, terrain, isochrones, matrices. Each method resolves
51
- * to the operation's own field, with no envelope.
52
- */
53
- readonly data: ReturnType<typeof bind$1>;
54
- /**
55
- * The Map Studio API's map half: itineraries, zones, collections, and their catalogs. Each
56
- * method resolves to the response envelope, with the payload at `data`.
57
- */
58
- readonly studio: ReturnType<typeof bind>["studio"];
59
- /** The Tile API's style specifications. Each method resolves to the response envelope. */
60
- readonly tiles: ReturnType<typeof bind$2>;
61
- /**
62
- * The transport every method calls through: for a call this client binds no method for, and
63
- * for the openers of `@mountaya/client/events`.
64
- */
65
- readonly transport: MountayaTransport;
66
- /**
67
- * Builds a client over one credential and its options, checking both before anything is sent.
68
- *
69
- * @throws `MountayaConfigurationError` for options that are not an object, a credential that
70
- * cannot work, a secret key in a page or a React Native application, or an option outside
71
- * its range: see {@link ClientOptions}.
72
- */
73
- constructor(options: ClientOptions);
11
+ export declare class Mountaya {
12
+ /**
13
+ * The AI agent: starting a run, answering it, rating it. Each method resolves to the response
14
+ * envelope, with the payload at `data`; a run's events are read through
15
+ * `createAgentTransport` of `@mountaya/client/events`.
16
+ */
17
+ readonly agent: ReturnType<typeof bind$2>["agent"];
18
+ /**
19
+ * The GraphQL Data API: directions, search, terrain, isochrones, matrices. Each method resolves
20
+ * to the operation's own field, with no envelope.
21
+ */
22
+ readonly data: ReturnType<typeof bind>;
23
+ /**
24
+ * The Map Studio API's map half: itineraries, zones, collections, and their catalogs. Each
25
+ * method resolves to the response envelope, with the payload at `data`.
26
+ */
27
+ readonly studio: ReturnType<typeof bind$2>["studio"];
28
+ /** The Tile API's style specifications. Each method resolves to the response envelope. */
29
+ readonly tiles: ReturnType<typeof bind$1>;
30
+ /**
31
+ * The transport every method calls through: for a call this client binds no method for, and
32
+ * for the openers of `@mountaya/client/events`.
33
+ */
34
+ readonly transport: MountayaTransport;
35
+ /**
36
+ * Builds a client over one credential and its options, checking both before anything is sent.
37
+ *
38
+ * @throws `MountayaConfigurationError` for options that are not an object, a credential that
39
+ * cannot work, a secret key in a page or a React Native application, or an option outside
40
+ * its range: see {@link ClientOptions}.
41
+ */
42
+ constructor(options: ClientOptions);
74
43
  }
75
-
76
- export { ClientOptions, Mountaya, MountayaTransport };
44
+ 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 ClientOptions, 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 Credential, 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, MountayaTransport, 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 SecretCredential, 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/index.d.ts CHANGED
@@ -1,76 +1,44 @@
1
- export { Geometry } from 'geojson';
2
- import { a as MountayaTransport, b9 as ClientOptions } from './errors-B-GqAtQv.js';
3
- 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, bc as CookieCredential, cC as CreatedResponse, fQ as Credential, 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, ba as PublishableCredential, 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, fR as SecretCredential, 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, bb as ShareCredential, 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';
4
- import { b as bind$1, a as bind$2 } from './coreOperations.gen-BMYPoBbz.js';
5
- 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';
6
- import { a5 as bind } from './operations.gen-DUD406TV.js';
7
-
8
- /**
9
- * The Mountaya API client: the Map Studio API, the Tile API and the GraphQL Data API, behind one
10
- * credential.
11
- *
12
- * ```ts
13
- * import { Mountaya } from "@mountaya/client";
14
- *
15
- * const mountaya = new Mountaya({ credential: { publishableKey: "pk_…" } });
16
- *
17
- * // A Map Studio or Tile API method resolves to the response envelope: the payload is at `data`.
18
- * const { data: groups } = await mountaya.studio.itineraries.getItineraries();
19
- * const { data: zones } = await mountaya.studio.zones.getZones();
20
- * ```
21
- *
22
- * The Map Studio API's map half arrives as `studio` (itineraries, zones, collections,
23
- * collaboration, catalogs), and `agent` beside it: a run outlives the surface that started it and
24
- * is addressed by a run id no map holds. The organization behind the map (its keys, settings,
25
- * members, billing and webhooks, and minting a session token) is the admin unit's, which
26
- * `@mountaya/client/admin` publishes as `new MountayaAdmin(mountaya)` beside webhook receiving, so
27
- * an application that never manages an organization never imports it. Which namespace and which
28
- * unit an operation belongs to is declared in the contract, not decided here, so every language's
29
- * client divides it the same way.
30
- *
31
- * This entry point exposes the secret-key credential, which mints session tokens and must only
32
- * ever run on a server. Browser code imports `@mountaya/client/browser`, which does not export it
33
- * at all.
34
- */
35
-
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, Ct as Credential, 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, Tt as SecretCredential, 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, 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";
36
5
  /**
37
6
  * Mountaya is the client. One instance holds one credential and one set of policies.
38
7
  *
39
8
  * The organization's operations are the admin unit's: `new MountayaAdmin(mountaya)` of
40
9
  * `@mountaya/client/admin` answers them, bound to this client's transport.
41
10
  */
42
- declare class Mountaya {
43
- /**
44
- * The AI agent: starting a run, answering it, rating it. Each method resolves to the response
45
- * envelope, with the payload at `data`; a run's events are read through
46
- * `createAgentTransport` of `@mountaya/client/events`.
47
- */
48
- readonly agent: ReturnType<typeof bind>["agent"];
49
- /**
50
- * The GraphQL Data API: directions, search, terrain, isochrones, matrices. Each method resolves
51
- * to the operation's own field, with no envelope.
52
- */
53
- readonly data: ReturnType<typeof bind$1>;
54
- /**
55
- * The Map Studio API's map half: itineraries, zones, collections, and their catalogs. Each
56
- * method resolves to the response envelope, with the payload at `data`.
57
- */
58
- readonly studio: ReturnType<typeof bind>["studio"];
59
- /** The Tile API's style specifications. Each method resolves to the response envelope. */
60
- readonly tiles: ReturnType<typeof bind$2>;
61
- /**
62
- * The transport every method calls through: for a call this client binds no method for, and
63
- * for the openers of `@mountaya/client/events`.
64
- */
65
- readonly transport: MountayaTransport;
66
- /**
67
- * Builds a client over one credential and its options, checking both before anything is sent.
68
- *
69
- * @throws `MountayaConfigurationError` for options that are not an object, a credential that
70
- * cannot work, a secret key in a page or a React Native application, or an option outside
71
- * its range: see {@link ClientOptions}.
72
- */
73
- constructor(options: ClientOptions);
11
+ export declare class Mountaya {
12
+ /**
13
+ * The AI agent: starting a run, answering it, rating it. Each method resolves to the response
14
+ * envelope, with the payload at `data`; a run's events are read through
15
+ * `createAgentTransport` of `@mountaya/client/events`.
16
+ */
17
+ readonly agent: ReturnType<typeof bind$2>["agent"];
18
+ /**
19
+ * The GraphQL Data API: directions, search, terrain, isochrones, matrices. Each method resolves
20
+ * to the operation's own field, with no envelope.
21
+ */
22
+ readonly data: ReturnType<typeof bind>;
23
+ /**
24
+ * The Map Studio API's map half: itineraries, zones, collections, and their catalogs. Each
25
+ * method resolves to the response envelope, with the payload at `data`.
26
+ */
27
+ readonly studio: ReturnType<typeof bind$2>["studio"];
28
+ /** The Tile API's style specifications. Each method resolves to the response envelope. */
29
+ readonly tiles: ReturnType<typeof bind$1>;
30
+ /**
31
+ * The transport every method calls through: for a call this client binds no method for, and
32
+ * for the openers of `@mountaya/client/events`.
33
+ */
34
+ readonly transport: MountayaTransport;
35
+ /**
36
+ * Builds a client over one credential and its options, checking both before anything is sent.
37
+ *
38
+ * @throws `MountayaConfigurationError` for options that are not an object, a credential that
39
+ * cannot work, a secret key in a page or a React Native application, or an option outside
40
+ * its range: see {@link ClientOptions}.
41
+ */
42
+ constructor(options: ClientOptions);
74
43
  }
75
-
76
- export { ClientOptions, Mountaya, MountayaTransport };
44
+ 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 ClientOptions, 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 Credential, 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, MountayaTransport, 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 SecretCredential, 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/index.js CHANGED
@@ -1,52 +1,21 @@
1
- import { MountayaTransport, bind as bind$1, bind2 } from './chunk-OHKVUREN.js';
2
- export { selection_gen_exports as DataSelection, MountayaSelectionError, MountayaTransport, 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/index.ts
1
+ import { a as bind$1, c as operations_gen_exports, d as MountayaTransport, 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";
9
4
  var Mountaya = class {
10
- /**
11
- * The AI agent: starting a run, answering it, rating it. Each method resolves to the response
12
- * envelope, with the payload at `data`; a run's events are read through
13
- * `createAgentTransport` of `@mountaya/client/events`.
14
- */
15
- agent;
16
- /**
17
- * The GraphQL Data API: directions, search, terrain, isochrones, matrices. Each method resolves
18
- * to the operation's own field, with no envelope.
19
- */
20
- data;
21
- /**
22
- * The Map Studio API's map half: itineraries, zones, collections, and their catalogs. Each
23
- * method resolves to the response envelope, with the payload at `data`.
24
- */
25
- studio;
26
- /** The Tile API's style specifications. Each method resolves to the response envelope. */
27
- tiles;
28
- /**
29
- * The transport every method calls through: for a call this client binds no method for, and
30
- * for the openers of `@mountaya/client/events`.
31
- */
32
- transport;
33
- /**
34
- * Builds a client over one credential and its options, checking both before anything is sent.
35
- *
36
- * @throws `MountayaConfigurationError` for options that are not an object, a credential that
37
- * cannot work, a secret key in a page or a React Native application, or an option outside
38
- * its range: see {@link ClientOptions}.
39
- */
40
- constructor(options) {
41
- this.transport = new MountayaTransport(options);
42
- const api = bind(this.transport);
43
- this.agent = api.agent;
44
- this.data = bind$1(this.transport);
45
- this.studio = api.studio;
46
- this.tiles = bind2(this.transport);
47
- }
5
+ agent;
6
+ data;
7
+ studio;
8
+ tiles;
9
+ transport;
10
+ constructor(options) {
11
+ this.transport = new MountayaTransport(options);
12
+ const api = bind$2(this.transport);
13
+ this.agent = api.agent;
14
+ this.data = bind(this.transport);
15
+ this.studio = api.studio;
16
+ this.tiles = bind$1(this.transport);
17
+ }
48
18
  };
19
+ 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 };
49
20
 
50
- export { Mountaya };
51
- //# sourceMappingURL=index.js.map
52
21
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":["bind"],"mappings":";;;;;;;;AAyLO,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,EAAwB;AAClC,IAAA,IAAA,CAAK,SAAA,GAAY,IAAI,iBAAA,CAAkB,OAAO,CAAA;AAK9C,IAAA,MAAM,GAAA,GAAMA,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":"index.js"}
1
+ {"version":3,"file":"index.js","names":["bindRest","bindData","bindTiles"],"sources":["../src/index.ts"],"mappings":";;;AAyLA,IAAa,WAAb,MAAsB;CAMpB;CAKA;CAKA;CAEA;CAKA;CASA,YAAY,SAAwB;EAClC,KAAK,YAAY,IAAI,kBAAkB,OAAO;EAK9C,MAAM,MAAMA,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"}
package/package.json CHANGED
@@ -9,12 +9,11 @@
9
9
  "description": "The Mountaya API client: Map Studio API, Tile API and the GraphQL Data API, with no runtime dependencies.",
10
10
  "devDependencies": {
11
11
  "@arethetypeswrong/cli": "0.18.5",
12
- "@types/node": "26.6.5",
12
+ "@types/node": "26.6.11",
13
13
  "@typescript/typescript6": "6.0.2",
14
14
  "publint": "0.3.25",
15
- "tsup": "9.0.0",
16
15
  "typescript": "7.0.2",
17
- "vitest": "5.0.5"
16
+ "vite-plus": "1.8.0"
18
17
  },
19
18
  "engines": {
20
19
  "node": ">=22.18.0"
@@ -99,14 +98,14 @@
99
98
  },
100
99
  "scripts": {
101
100
  "attw": "attw --pack .",
102
- "build": "NODE_OPTIONS='--import=../../scripts/lib/typescriptApi.mjs --max-old-space-size=4096' tsup",
103
- "dev": "NODE_OPTIONS='--import=../../scripts/lib/typescriptApi.mjs --max-old-space-size=4096' tsup --watch",
101
+ "build": "NODE_OPTIONS='--import=../../scripts/lib/typescriptApi.mjs --max-old-space-size=4096' vp pack",
102
+ "dev": "NODE_OPTIONS='--import=../../scripts/lib/typescriptApi.mjs --max-old-space-size=4096' vp pack --watch",
104
103
  "generate:readme": "node ../../scripts/generate-readme-exports.mjs && node ../../scripts/generate-readme-props.mjs",
105
104
  "lint": "npm run typecheck && node ../../scripts/generate-readme-exports.mjs --check && node ../../scripts/generate-readme-props.mjs --check && node ../../scripts/check-readme-snippets.mjs",
106
105
  "prepublishOnly": "npm run build && npm run publint && npm run attw",
107
106
  "publint": "publint",
108
- "test": "vitest run",
109
- "test:watch": "vitest",
107
+ "test": "vp test run",
108
+ "test:watch": "vp test watch",
110
109
  "typecheck": "node ../../scripts/typecheck.mjs"
111
110
  },
112
111
  "sideEffects": false,
@@ -125,5 +124,5 @@
125
124
  ]
126
125
  }
127
126
  },
128
- "version": "0.1.0"
127
+ "version": "0.2.0"
129
128
  }
package/src/browser.ts CHANGED
@@ -166,6 +166,7 @@ export interface BrowserClientOptions extends Omit<ClientOptions, "credential">
166
166
  * MountayaTransport is the default entry's transport, as a type: the constructor below builds
167
167
  * that same class, so a transport this entry hands out is one the default entry's type describes.
168
168
  */
169
+ // oxlint-disable-next-line no-redeclare -- a type and a value of one name, as a class is both.
169
170
  export type MountayaTransport = CoreTransport;
170
171
 
171
172
  /**
@@ -11,7 +11,7 @@
11
11
  * transport writes it beside the credential on every request, a stream's open included.
12
12
  *
13
13
  * The version is read from this package's manifest, the one place a release moves it. The build
14
- * inlines what it reads: tsup bundles the manifest's `version` alone into the entry points, so
14
+ * inlines what it reads: the build bundles the manifest's `version` alone into the entry points, so
15
15
  * `dist` carries it as a literal and reads no file at run time, and a toolchain that resolves the
16
16
  * `@mountaya/source` condition reads the manifest that ships beside `src`.
17
17
  */
@@ -907,7 +907,7 @@ const secondsSpelled = (count: number): string => `${count} ${count === 1 ? "sec
907
907
 
908
908
  /**
909
909
  * The moment a wait of `seconds` from now ends, as an instant in UTC to the second
910
- * (`2026-11-26T00:00:00Z`), or undefined where it lies past the last moment a `Date` holds.
910
+ * (`2026-12-01T00:00:00Z`), or undefined where it lies past the last moment a `Date` holds.
911
911
  */
912
912
  const momentAfter = (seconds: number): string | undefined => {
913
913
  // A `Retry-After` delay counts from the answer's receipt (RFC 9110, section 10.2.3), so it is
@@ -115,10 +115,10 @@ export const notificationPreferenceNulls = { locked_reason: true } as const;
115
115
  export const notificationPreferencesNulls = { notifications: [notificationPreferenceNulls] } as const;
116
116
 
117
117
  /** The members of `SubscriptionDiscount` that read null where a value leaves them out. */
118
- export const subscriptionDiscountNulls = { ends_at: true } as const;
118
+ export const subscriptionDiscountNulls = { covers_through: true, ends_at: true } as const;
119
119
 
120
120
  /** The members of `OrganizationSubscription` that read null where a value leaves them out. */
121
- export const organizationSubscriptionNulls = { discount: subscriptionDiscountNulls } as const;
121
+ export const organizationSubscriptionNulls = { discount: subscriptionDiscountNulls, end_reason: true, ended_at: true } as const;
122
122
 
123
123
  /** The members of `OrganizationSubscriptionSummary` that read null where a value leaves them out. */
124
124
  export const organizationSubscriptionSummaryNulls = { api: organizationSubscriptionNulls } as const;
@@ -126,6 +126,12 @@ export const organizationSubscriptionSummaryNulls = { api: organizationSubscript
126
126
  /** The members of `Session` that read null where a value leaves them out. */
127
127
  export const sessionNulls = { user_id: true } as const;
128
128
 
129
+ /** The members of `UsageDataPoint` that read null where a value leaves them out. */
130
+ export const usageDataPointNulls = { client_version: true } as const;
131
+
132
+ /** The members of `UsageTilePoint` that read null where a value leaves them out. */
133
+ export const usageTilePointNulls = { client_version: true } as const;
134
+
129
135
  /** The members of `WebhookDelivery` that read null where a value leaves them out. */
130
136
  export const webhookDeliveryNulls = { next_attempt_at: true } as const;
131
137
 
@@ -219,6 +225,8 @@ export const restSchemaNulls: { readonly [schema: string]: NullableMask } = {
219
225
  TileLayer: tileLayerNulls,
220
226
  TileLegend: tileLegendNulls,
221
227
  TileSource: tileSourceNulls,
228
+ UsageDataPoint: usageDataPointNulls,
229
+ UsageTilePoint: usageTilePointNulls,
222
230
  WebhookDelivery: webhookDeliveryNulls,
223
231
  WebhookDeliveryTrigger: webhookDeliveryTriggerNulls,
224
232
  WebhookDeliveryWithAttempts: webhookDeliveryWithAttemptsNulls,
@@ -325,6 +333,10 @@ export const responseNulls: { readonly [operationId: string]: NullableMask } = {
325
333
  getOrganizationMembers: { extensions: { metadata: listMetadataNulls } },
326
334
  /** GET /v1/organizations/{organization_id}/publishable-keys */
327
335
  getOrganizationPublishableKeys: { extensions: { metadata: listMetadataNulls } },
336
+ /** GET /v1/organizations/{organization_id}/usage/data */
337
+ getOrganizationUsageData: { data: [usageDataPointNulls] },
338
+ /** GET /v1/organizations/{organization_id}/usage/tiles */
339
+ getOrganizationUsageTiles: { data: [usageTilePointNulls] },
328
340
  /** GET /v1/organizations/{organization_id}/webhook-deliveries */
329
341
  getOrganizationWebhookDeliveries: { data: [webhookDeliveryNulls], extensions: { metadata: listMetadataNulls } },
330
342
  /** GET /v1/organizations/{organization_id}/webhook-deliveries/{delivery_id} */
@@ -13,4 +13,4 @@
13
13
  * without importing the package root: the root reaches the secret-key credential, and
14
14
  * the browser entry's guarantee is that nothing in its module graph does.
15
15
  */
16
- export const SCHEMA_VERSION = "v0.9.0";
16
+ export const SCHEMA_VERSION = "v0.10.0";
@@ -40,11 +40,7 @@ export type {
40
40
  AgentTransport,
41
41
  AgentWriteOptions,
42
42
  } from "./rules/agent.js";
43
- export {
44
- agentTerminalEventTypes,
45
- createAgentTransport,
46
- decodeAgentFrame,
47
- } from "./rules/agent.js";
43
+ export { agentTerminalEventTypes, createAgentTransport, decodeAgentFrame } from "./rules/agent.js";
48
44
  export type {
49
45
  CollabDurableChange,
50
46
  CollabEvent,
@@ -84,8 +84,10 @@ export type {
84
84
  SetupIntentSession,
85
85
  SubscriptionCollectionMethod,
86
86
  SubscriptionDiscount,
87
+ SubscriptionEndReason,
87
88
  SubscriptionStatus,
88
89
  TaxId,
90
+ UsageClientName,
89
91
  UsageDataPoint,
90
92
  UsageDataResourceType,
91
93
  UsageDataSurface,
@@ -111,7 +111,7 @@ export const organizationMemberEventObjectDates = { joined_at: true } as const;
111
111
  export const subscriptionDiscountDates = { ends_at: true } as const;
112
112
 
113
113
  /** The instants in `OrganizationSubscription`. */
114
- export const organizationSubscriptionDates = { current_period_end_at: true, discount: subscriptionDiscountDates } as const;
114
+ export const organizationSubscriptionDates = { current_period_end_at: true, discount: subscriptionDiscountDates, ended_at: true } as const;
115
115
 
116
116
  /** The instants in `OrganizationSubscriptionEventObject`. */
117
117
  export const organizationSubscriptionEventObjectDates = { current_period_end_at: true } as const;
@@ -266,6 +266,7 @@ export type {
266
266
  StudioEntitlement,
267
267
  SubscriptionCollectionMethod,
268
268
  SubscriptionDiscount,
269
+ SubscriptionEndReason,
269
270
  SubscriptionStatus,
270
271
  SuccessExtensions,
271
272
  SurfaceInfo,
@@ -296,6 +297,7 @@ export type {
296
297
  UnitPace,
297
298
  UnitSlope,
298
299
  UnitTemperature,
300
+ UsageClientName,
299
301
  UsageDataPoint,
300
302
  UsageDataResourceType,
301
303
  UsageDataSurface,