@mountaya/client 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +104 -0
- package/LICENCE.fr.txt +280 -0
- package/LICENSE.txt +262 -0
- package/README.md +1260 -2
- package/dist/admin/index.cjs +3521 -0
- package/dist/admin/index.cjs.map +1 -0
- package/dist/admin/index.d.cts +1070 -0
- package/dist/admin/index.d.ts +1070 -0
- package/dist/admin/index.js +301 -0
- package/dist/admin/index.js.map +1 -0
- package/dist/browser.cjs +8073 -0
- package/dist/browser.cjs.map +1 -0
- package/dist/browser.d.cts +106 -0
- package/dist/browser.d.ts +106 -0
- package/dist/browser.js +53 -0
- package/dist/browser.js.map +1 -0
- package/dist/chunk-BM526BHG.js +342 -0
- package/dist/chunk-BM526BHG.js.map +1 -0
- package/dist/chunk-D2YEVTG7.js +327 -0
- package/dist/chunk-D2YEVTG7.js.map +1 -0
- package/dist/chunk-OHKVUREN.js +3500 -0
- package/dist/chunk-OHKVUREN.js.map +1 -0
- package/dist/chunk-TDTK2L5H.js +3842 -0
- package/dist/chunk-TDTK2L5H.js.map +1 -0
- package/dist/coreOperations.gen-BMYPoBbz.d.ts +1760 -0
- package/dist/coreOperations.gen-BxX5xRxw.d.cts +1760 -0
- package/dist/errors-B-GqAtQv.d.cts +75960 -0
- package/dist/errors-B-GqAtQv.d.ts +75960 -0
- package/dist/events/index.cjs +1972 -0
- package/dist/events/index.cjs.map +1 -0
- package/dist/events/index.d.cts +781 -0
- package/dist/events/index.d.ts +781 -0
- package/dist/events/index.js +826 -0
- package/dist/events/index.js.map +1 -0
- package/dist/index.cjs +8072 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +76 -0
- package/dist/index.d.ts +76 -0
- package/dist/index.js +52 -0
- package/dist/index.js.map +1 -0
- package/dist/operations.gen-CvTyzKNF.d.cts +3993 -0
- package/dist/operations.gen-DUD406TV.d.ts +3993 -0
- package/package.json +127 -4
- package/src/admin/index.ts +47 -0
- package/src/admin/rules/mountayaAdmin.ts +102 -0
- package/src/browser.ts +232 -0
- package/src/core/engines/sessionToken.ts +870 -0
- package/src/core/rules/auth.ts +1017 -0
- package/src/core/rules/clientHeader.ts +28 -0
- package/src/core/rules/dates.ts +200 -0
- package/src/core/rules/decode.ts +154 -0
- package/src/core/rules/envelope.ts +41 -0
- package/src/core/rules/errors.ts +1486 -0
- package/src/core/rules/graphql.ts +576 -0
- package/src/core/rules/headerValue.ts +42 -0
- package/src/core/rules/idempotencyKey.ts +64 -0
- package/src/core/rules/nullMask.ts +127 -0
- package/src/core/rules/nullMasks.gen.ts +416 -0
- package/src/core/rules/paginate.ts +316 -0
- package/src/core/rules/rateLimit.ts +507 -0
- package/src/core/rules/redaction.ts +219 -0
- package/src/core/rules/resourceRef.ts +110 -0
- package/src/core/rules/responseBody.ts +492 -0
- package/src/core/rules/retry.ts +386 -0
- package/src/core/rules/selection.ts +416 -0
- package/src/core/rules/sessionAnswer.ts +90 -0
- package/src/core/rules/sessionSchedule.ts +131 -0
- package/src/core/rules/sessionWait.ts +112 -0
- package/src/core/rules/transport.ts +2386 -0
- package/src/core/rules/version.gen.ts +16 -0
- package/src/core/rules/webAddress.ts +165 -0
- package/src/core/rules/webAddresses.gen.ts +30 -0
- package/src/data/operations.gen.ts +603 -0
- package/src/data/schema.gen.ts +8078 -0
- package/src/data/selection.gen.ts +472 -0
- package/src/events/index.ts +67 -0
- package/src/events/rules/agent.ts +439 -0
- package/src/events/rules/collab.ts +554 -0
- package/src/events/rules/collabNulls.gen.ts +17 -0
- package/src/events/rules/eventStream.ts +94 -0
- package/src/events/rules/openSseStream.ts +594 -0
- package/src/events/rules/sse.ts +349 -0
- package/src/index.ts +231 -0
- package/src/rest/adminOperations.gen.ts +70 -0
- package/src/rest/adminResources.gen.ts +136 -0
- package/src/rest/coreOperations.gen.ts +74 -0
- package/src/rest/coreResources.gen.ts +244 -0
- package/src/rest/dates.gen.ts +217 -0
- package/src/rest/operations.gen.ts +4341 -0
- package/src/rest/resources.gen.ts +369 -0
- package/src/rest/schema.gen.ts +56840 -0
- package/src/tiles/operations.gen.ts +206 -0
- package/src/tiles/schema.gen.ts +8408 -0
- package/src/webhooks/rules/constructWebhookEvent.ts +482 -0
- package/src/webhooks/rules/webhookEvent.ts +38 -0
- package/src/webhooks/rules/webhookEvents.gen.ts +732 -0
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
// GENERATED FILE. DO NOT EDIT.
|
|
2
|
+
//
|
|
3
|
+
// One method per operation on the public 'tiles' surface, generated from
|
|
4
|
+
// the mountaya/schemas contract (openapi/tiles.yaml).
|
|
5
|
+
//
|
|
6
|
+
// Method names are the spec's operationIds verbatim.
|
|
7
|
+
// Edit the spec in mountaya/schemas, not this file.
|
|
8
|
+
|
|
9
|
+
import type { RequestOptions, MountayaTransport } from "../core/rules/transport.js";
|
|
10
|
+
import type { operations } from "./schema.gen.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* SuccessBody extracts the JSON body of an operation's 2xx response: its 200, else its 201,
|
|
14
|
+
* else its 202.
|
|
15
|
+
*
|
|
16
|
+
* The platform wraps every success in an envelope whose `data` carries the payload, so
|
|
17
|
+
* this resolves to the envelope rather than to the bare resource: callers read
|
|
18
|
+
* `result.data`, which is what the wire actually sends, `null` on a write that removes
|
|
19
|
+
* something and has nothing left to answer. A 202 is read like the other two: an operation
|
|
20
|
+
* that starts work rather than finishing it names what it started at `data`, and that is
|
|
21
|
+
* typed only if this reaches it.
|
|
22
|
+
*/
|
|
23
|
+
type SuccessBody<O> = O extends {
|
|
24
|
+
responses: { 200: { content: { "application/json": infer B } } };
|
|
25
|
+
}
|
|
26
|
+
? B
|
|
27
|
+
: O extends { responses: { 201: { content: { "application/json": infer C } } } }
|
|
28
|
+
? C
|
|
29
|
+
: O extends { responses: { 202: { content: { "application/json": infer D } } } }
|
|
30
|
+
? D
|
|
31
|
+
: unknown;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Retrieve the tile specification for a collection.
|
|
35
|
+
* GET /v1/collections/{collection_id}/specification
|
|
36
|
+
* Requires a publishable key with the `tiles` scope.
|
|
37
|
+
*/
|
|
38
|
+
export const getCollectionSpecification = (transport: MountayaTransport, args: {
|
|
39
|
+
readonly "collection_id": string;
|
|
40
|
+
readonly query?: NonNullable<operations["getCollectionSpecification"]["parameters"]["query"]> | undefined;
|
|
41
|
+
}, options?: RequestOptions): Promise<SuccessBody<operations["getCollectionSpecification"]>> =>
|
|
42
|
+
transport.request({
|
|
43
|
+
acceptsShareToken: true,
|
|
44
|
+
idempotent: true,
|
|
45
|
+
method: "GET",
|
|
46
|
+
operationId: "getCollectionSpecification",
|
|
47
|
+
path: `/v1/collections/${encodeURIComponent(String(args.collection_id))}/specification`,
|
|
48
|
+
query: args.query,
|
|
49
|
+
retry: options?.retry,
|
|
50
|
+
serverBudgetMs: 30000,
|
|
51
|
+
signal: options?.signal,
|
|
52
|
+
surface: "tiles",
|
|
53
|
+
timeoutMs: options?.timeoutMs,
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Retrieve the tile specification for the organization's itineraries.
|
|
58
|
+
* GET /v1/itineraries/specification
|
|
59
|
+
* Requires a publishable key with the `tiles` scope.
|
|
60
|
+
*/
|
|
61
|
+
export const getItinerariesSpecification = (transport: MountayaTransport, options?: RequestOptions): Promise<SuccessBody<operations["getItinerariesSpecification"]>> =>
|
|
62
|
+
transport.request({
|
|
63
|
+
acceptsShareToken: true,
|
|
64
|
+
idempotent: true,
|
|
65
|
+
method: "GET",
|
|
66
|
+
operationId: "getItinerariesSpecification",
|
|
67
|
+
path: "/v1/itineraries/specification",
|
|
68
|
+
retry: options?.retry,
|
|
69
|
+
serverBudgetMs: 30000,
|
|
70
|
+
signal: options?.signal,
|
|
71
|
+
surface: "tiles",
|
|
72
|
+
timeoutMs: options?.timeoutMs,
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Retrieve the tile specification for a single itinerary.
|
|
77
|
+
* GET /v1/itineraries/{itinerary_id}/specification
|
|
78
|
+
* Requires a publishable key with the `tiles` scope.
|
|
79
|
+
*/
|
|
80
|
+
export const getItinerarySpecification = (transport: MountayaTransport, args: {
|
|
81
|
+
readonly "itinerary_id": string;
|
|
82
|
+
}, options?: RequestOptions): Promise<SuccessBody<operations["getItinerarySpecification"]>> =>
|
|
83
|
+
transport.request({
|
|
84
|
+
acceptsShareToken: true,
|
|
85
|
+
idempotent: true,
|
|
86
|
+
method: "GET",
|
|
87
|
+
operationId: "getItinerarySpecification",
|
|
88
|
+
path: `/v1/itineraries/${encodeURIComponent(String(args.itinerary_id))}/specification`,
|
|
89
|
+
retry: options?.retry,
|
|
90
|
+
serverBudgetMs: 30000,
|
|
91
|
+
signal: options?.signal,
|
|
92
|
+
surface: "tiles",
|
|
93
|
+
timeoutMs: options?.timeoutMs,
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Retrieve the tile specification for a map overlay.
|
|
98
|
+
* GET /v1/overlays/{overlay}/specification
|
|
99
|
+
* Requires a publishable key with the `tiles` scope.
|
|
100
|
+
*/
|
|
101
|
+
export const getOverlaySpecification = (transport: MountayaTransport, args: {
|
|
102
|
+
readonly "overlay": string;
|
|
103
|
+
readonly query?: NonNullable<operations["getOverlaySpecification"]["parameters"]["query"]> | undefined;
|
|
104
|
+
}, options?: RequestOptions): Promise<SuccessBody<operations["getOverlaySpecification"]>> =>
|
|
105
|
+
transport.request({
|
|
106
|
+
acceptsShareToken: true,
|
|
107
|
+
idempotent: true,
|
|
108
|
+
method: "GET",
|
|
109
|
+
operationId: "getOverlaySpecification",
|
|
110
|
+
path: `/v1/overlays/${encodeURIComponent(String(args.overlay))}/specification`,
|
|
111
|
+
query: args.query,
|
|
112
|
+
retry: options?.retry,
|
|
113
|
+
serverBudgetMs: 30000,
|
|
114
|
+
signal: options?.signal,
|
|
115
|
+
surface: "tiles",
|
|
116
|
+
timeoutMs: options?.timeoutMs,
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* List the terrains, overlays and layers this API draws.
|
|
121
|
+
* GET /v1/tile-layers
|
|
122
|
+
* Requires a publishable key with the `tiles` scope.
|
|
123
|
+
*/
|
|
124
|
+
export const getTileLayers = (transport: MountayaTransport, args: {
|
|
125
|
+
readonly query?: NonNullable<operations["getTileLayers"]["parameters"]["query"]> | undefined;
|
|
126
|
+
} = {}, options?: RequestOptions): Promise<SuccessBody<operations["getTileLayers"]>> =>
|
|
127
|
+
transport.request({
|
|
128
|
+
acceptsShareToken: true,
|
|
129
|
+
idempotent: true,
|
|
130
|
+
method: "GET",
|
|
131
|
+
operationId: "getTileLayers",
|
|
132
|
+
path: "/v1/tile-layers",
|
|
133
|
+
query: args.query,
|
|
134
|
+
retry: options?.retry,
|
|
135
|
+
serverBudgetMs: 30000,
|
|
136
|
+
signal: options?.signal,
|
|
137
|
+
surface: "tiles",
|
|
138
|
+
timeoutMs: options?.timeoutMs,
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Retrieve the tile specification for the organization's zones.
|
|
143
|
+
* GET /v1/zones/specification
|
|
144
|
+
* Requires a publishable key with the `tiles` scope.
|
|
145
|
+
*/
|
|
146
|
+
export const getZonesSpecification = (transport: MountayaTransport, options?: RequestOptions): Promise<SuccessBody<operations["getZonesSpecification"]>> =>
|
|
147
|
+
transport.request({
|
|
148
|
+
acceptsShareToken: true,
|
|
149
|
+
idempotent: true,
|
|
150
|
+
method: "GET",
|
|
151
|
+
operationId: "getZonesSpecification",
|
|
152
|
+
path: "/v1/zones/specification",
|
|
153
|
+
retry: options?.retry,
|
|
154
|
+
serverBudgetMs: 30000,
|
|
155
|
+
signal: options?.signal,
|
|
156
|
+
surface: "tiles",
|
|
157
|
+
timeoutMs: options?.timeoutMs,
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* bind returns every 'tiles' operation with the transport applied.
|
|
162
|
+
*/
|
|
163
|
+
export const bind = (transport: MountayaTransport) => ({
|
|
164
|
+
/**
|
|
165
|
+
* Retrieve the tile specification for a collection.
|
|
166
|
+
* GET /v1/collections/{collection_id}/specification
|
|
167
|
+
* Requires a publishable key with the `tiles` scope.
|
|
168
|
+
* @see {@link getCollectionSpecification}
|
|
169
|
+
*/
|
|
170
|
+
getCollectionSpecification: (args: Parameters<typeof getCollectionSpecification>[1], options?: RequestOptions) => getCollectionSpecification(transport, args, options),
|
|
171
|
+
/**
|
|
172
|
+
* Retrieve the tile specification for the organization's itineraries.
|
|
173
|
+
* GET /v1/itineraries/specification
|
|
174
|
+
* Requires a publishable key with the `tiles` scope.
|
|
175
|
+
* @see {@link getItinerariesSpecification}
|
|
176
|
+
*/
|
|
177
|
+
getItinerariesSpecification: (options?: RequestOptions) => getItinerariesSpecification(transport, options),
|
|
178
|
+
/**
|
|
179
|
+
* Retrieve the tile specification for a single itinerary.
|
|
180
|
+
* GET /v1/itineraries/{itinerary_id}/specification
|
|
181
|
+
* Requires a publishable key with the `tiles` scope.
|
|
182
|
+
* @see {@link getItinerarySpecification}
|
|
183
|
+
*/
|
|
184
|
+
getItinerarySpecification: (args: Parameters<typeof getItinerarySpecification>[1], options?: RequestOptions) => getItinerarySpecification(transport, args, options),
|
|
185
|
+
/**
|
|
186
|
+
* Retrieve the tile specification for a map overlay.
|
|
187
|
+
* GET /v1/overlays/{overlay}/specification
|
|
188
|
+
* Requires a publishable key with the `tiles` scope.
|
|
189
|
+
* @see {@link getOverlaySpecification}
|
|
190
|
+
*/
|
|
191
|
+
getOverlaySpecification: (args: Parameters<typeof getOverlaySpecification>[1], options?: RequestOptions) => getOverlaySpecification(transport, args, options),
|
|
192
|
+
/**
|
|
193
|
+
* List the terrains, overlays and layers this API draws.
|
|
194
|
+
* GET /v1/tile-layers
|
|
195
|
+
* Requires a publishable key with the `tiles` scope.
|
|
196
|
+
* @see {@link getTileLayers}
|
|
197
|
+
*/
|
|
198
|
+
getTileLayers: (args?: Parameters<typeof getTileLayers>[1], options?: RequestOptions) => getTileLayers(transport, args, options),
|
|
199
|
+
/**
|
|
200
|
+
* Retrieve the tile specification for the organization's zones.
|
|
201
|
+
* GET /v1/zones/specification
|
|
202
|
+
* Requires a publishable key with the `tiles` scope.
|
|
203
|
+
* @see {@link getZonesSpecification}
|
|
204
|
+
*/
|
|
205
|
+
getZonesSpecification: (options?: RequestOptions) => getZonesSpecification(transport, options),
|
|
206
|
+
});
|