@honua/sdk-esri-compat 0.0.10-alpha.0 → 0.1.0-beta.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/LICENSE +201 -0
- package/contract/index.d.ts +39 -4
- package/contract/index.d.ts.map +1 -1
- package/contract/index.js +36 -3
- package/contract/jobs.d.ts +37 -3
- package/contract/jobs.d.ts.map +1 -1
- package/contract/jobs.js +18 -0
- package/contract/pmtiles.d.ts +162 -0
- package/contract/pmtiles.d.ts.map +1 -0
- package/contract/pmtiles.js +155 -0
- package/contract/source.d.ts +301 -2
- package/contract/source.d.ts.map +1 -1
- package/contract/source.js +423 -27
- package/contract/temporal.d.ts +455 -0
- package/contract/temporal.d.ts.map +1 -0
- package/contract/temporal.js +146 -0
- package/contract/tiles.d.ts.map +1 -1
- package/contract/tiles.js +3 -2
- package/contract/types.d.ts +89 -2
- package/contract/types.d.ts.map +1 -1
- package/contract/types.js +8 -0
- package/core/auth/client-credentials-provider.d.ts +51 -0
- package/core/auth/client-credentials-provider.d.ts.map +1 -0
- package/core/auth/client-credentials-provider.js +115 -0
- package/core/auth/credential-store.d.ts +52 -0
- package/core/auth/credential-store.d.ts.map +1 -0
- package/core/auth/credential-store.js +82 -0
- package/core/auth/index.d.ts +23 -0
- package/core/auth/index.d.ts.map +1 -0
- package/core/auth/index.js +20 -0
- package/core/auth/oauth2-provider.d.ts +114 -0
- package/core/auth/oauth2-provider.d.ts.map +1 -0
- package/core/auth/oauth2-provider.js +408 -0
- package/core/auth/pkce.d.ts +25 -0
- package/core/auth/pkce.d.ts.map +1 -0
- package/core/auth/pkce.js +46 -0
- package/core/auth/static-providers.d.ts +20 -0
- package/core/auth/static-providers.d.ts.map +1 -0
- package/core/auth/static-providers.js +26 -0
- package/core/auth/token-endpoint.d.ts +40 -0
- package/core/auth/token-endpoint.d.ts.map +1 -0
- package/core/auth/token-endpoint.js +133 -0
- package/core/auth/types.d.ts +144 -0
- package/core/auth/types.d.ts.map +1 -0
- package/core/auth/types.js +8 -0
- package/core/batch.d.ts.map +1 -1
- package/core/batch.js +3 -2
- package/core/client.d.ts +296 -8
- package/core/client.d.ts.map +1 -1
- package/core/client.js +746 -1881
- package/core/compatibility.d.ts +18 -0
- package/core/compatibility.d.ts.map +1 -0
- package/core/compatibility.js +245 -0
- package/core/errors.d.ts +72 -1
- package/core/errors.d.ts.map +1 -1
- package/core/errors.js +60 -0
- package/core/esri-geojson.d.ts +66 -0
- package/core/esri-geojson.d.ts.map +1 -0
- package/core/esri-geojson.js +363 -0
- package/core/geoparquet-sql.d.ts +162 -0
- package/core/geoparquet-sql.d.ts.map +1 -0
- package/core/geoparquet-sql.js +333 -0
- package/core/geoservices.d.ts +34 -0
- package/core/geoservices.d.ts.map +1 -0
- package/core/geoservices.js +434 -0
- package/core/grpc-adapter.d.ts.map +1 -1
- package/core/grpc-adapter.js +33 -49
- package/core/odata.d.ts.map +1 -1
- package/core/odata.js +76 -9
- package/core/ogc-endpoint-layout.d.ts +70 -0
- package/core/ogc-endpoint-layout.d.ts.map +1 -0
- package/core/ogc-endpoint-layout.js +173 -0
- package/core/ogc-features.d.ts +23 -0
- package/core/ogc-features.d.ts.map +1 -0
- package/core/ogc-features.js +129 -0
- package/core/ogc-maps.d.ts +4 -0
- package/core/ogc-maps.d.ts.map +1 -1
- package/core/ogc-maps.js +73 -0
- package/core/ogc-processes.d.ts +29 -3
- package/core/ogc-processes.d.ts.map +1 -1
- package/core/ogc-processes.js +107 -9
- package/core/ogc-records.d.ts +9 -0
- package/core/ogc-records.d.ts.map +1 -1
- package/core/ogc-records.js +108 -5
- package/core/ogc-tiles.d.ts +71 -1
- package/core/ogc-tiles.d.ts.map +1 -1
- package/core/ogc-tiles.js +102 -0
- package/core/path-utils.d.ts +69 -0
- package/core/path-utils.d.ts.map +1 -0
- package/core/path-utils.js +123 -0
- package/core/pbf-decoder.d.ts +11 -0
- package/core/pbf-decoder.d.ts.map +1 -1
- package/core/pbf-decoder.js +79 -4
- package/core/process-runner.d.ts +1 -0
- package/core/process-runner.d.ts.map +1 -1
- package/core/process-runner.js +56 -8
- package/core/protocol-transport.d.ts +76 -0
- package/core/protocol-transport.d.ts.map +1 -0
- package/core/protocol-transport.js +15 -0
- package/core/request-pipeline.d.ts +88 -0
- package/core/request-pipeline.d.ts.map +1 -0
- package/core/request-pipeline.js +273 -0
- package/core/stac-static.d.ts +51 -0
- package/core/stac-static.d.ts.map +1 -0
- package/core/stac-static.js +195 -0
- package/core/stac.d.ts +24 -0
- package/core/stac.d.ts.map +1 -1
- package/core/stac.js +156 -13
- package/core/surfaces.d.ts +15 -2
- package/core/surfaces.d.ts.map +1 -1
- package/core/surfaces.js +154 -47
- package/core/terrain-elevation.d.ts +114 -0
- package/core/terrain-elevation.d.ts.map +1 -0
- package/core/terrain-elevation.js +150 -0
- package/core/types.d.ts +98 -0
- package/core/types.d.ts.map +1 -1
- package/core/wfs-capabilities.d.ts +10 -0
- package/core/wfs-capabilities.d.ts.map +1 -1
- package/core/wfs-capabilities.js +14 -2
- package/core/wfs-filter.d.ts.map +1 -1
- package/core/wfs-filter.js +67 -19
- package/core/wfs.d.ts +13 -0
- package/core/wfs.d.ts.map +1 -1
- package/core/wfs.js +25 -5
- package/core/wire-shared.d.ts +32 -0
- package/core/wire-shared.d.ts.map +1 -0
- package/core/wire-shared.js +76 -0
- package/core/wms-axis.d.ts +36 -0
- package/core/wms-axis.d.ts.map +1 -0
- package/core/wms-axis.js +73 -0
- package/core/wms-capabilities.d.ts.map +1 -1
- package/core/wms-capabilities.js +2 -9
- package/core/wms.d.ts +36 -0
- package/core/wms.d.ts.map +1 -1
- package/core/wms.js +157 -1
- package/core/wmts-capabilities.d.ts.map +1 -1
- package/core/wmts-capabilities.js +2 -9
- package/core/wmts.d.ts +24 -1
- package/core/wmts.d.ts.map +1 -1
- package/core/wmts.js +160 -1
- package/core/xml-text.d.ts +20 -0
- package/core/xml-text.d.ts.map +1 -0
- package/core/xml-text.js +85 -0
- package/esri-compat/esri-request.d.ts.map +1 -1
- package/esri-compat/esri-request.js +62 -1
- package/esri-compat/feature-filter.d.ts +55 -0
- package/esri-compat/feature-filter.d.ts.map +1 -0
- package/esri-compat/feature-filter.js +109 -0
- package/esri-compat/feature-layer.d.ts.map +1 -1
- package/esri-compat/feature-layer.js +15 -9
- package/esri-compat/geojson-layer.d.ts +86 -0
- package/esri-compat/geojson-layer.d.ts.map +1 -0
- package/esri-compat/geojson-layer.js +191 -0
- package/esri-compat/geometry-engine.d.ts +107 -0
- package/esri-compat/geometry-engine.d.ts.map +1 -0
- package/esri-compat/geometry-engine.js +266 -0
- package/esri-compat/identity-manager.d.ts +43 -0
- package/esri-compat/identity-manager.d.ts.map +1 -1
- package/esri-compat/identity-manager.js +131 -1
- package/esri-compat/imagery-layer.d.ts +78 -0
- package/esri-compat/imagery-layer.d.ts.map +1 -0
- package/esri-compat/imagery-layer.js +167 -0
- package/esri-compat/map-image-layer.d.ts.map +1 -1
- package/esri-compat/map-image-layer.js +9 -4
- package/esri-compat/map-view.d.ts +8 -0
- package/esri-compat/map-view.d.ts.map +1 -1
- package/esri-compat/map-view.js +70 -5
- package/esri-compat/oauth-info.d.ts +15 -0
- package/esri-compat/oauth-info.d.ts.map +1 -1
- package/esri-compat/oauth-info.js +27 -0
- package/esri-compat/query.d.ts +12 -0
- package/esri-compat/query.d.ts.map +1 -1
- package/esri-compat/query.js +13 -4
- package/esri-compat/reactive-utils.d.ts +1 -0
- package/esri-compat/reactive-utils.d.ts.map +1 -1
- package/esri-compat/reactive-utils.js +16 -1
- package/esri-compat/tile-layer.d.ts.map +1 -1
- package/esri-compat/tile-layer.js +2 -1
- package/esri-compat/url.d.ts +1 -0
- package/esri-compat/url.d.ts.map +1 -1
- package/esri-compat/url.js +14 -0
- package/esri-compat/vector-tile-layer.d.ts +47 -0
- package/esri-compat/vector-tile-layer.d.ts.map +1 -0
- package/esri-compat/vector-tile-layer.js +130 -0
- package/esri-compat/wfs-layer.d.ts +64 -0
- package/esri-compat/wfs-layer.d.ts.map +1 -0
- package/esri-compat/wfs-layer.js +145 -0
- package/esri-compat/wms-layer.d.ts +76 -0
- package/esri-compat/wms-layer.d.ts.map +1 -0
- package/esri-compat/wms-layer.js +157 -0
- package/expr/expression.d.ts +457 -0
- package/expr/expression.d.ts.map +1 -0
- package/expr/expression.js +663 -0
- package/expr/index.d.ts +32 -0
- package/expr/index.d.ts.map +1 -0
- package/expr/index.js +30 -0
- package/geometry/convert.d.ts +13 -0
- package/geometry/convert.d.ts.map +1 -0
- package/geometry/convert.js +12 -0
- package/geometry/index.d.ts +17 -0
- package/geometry/index.d.ts.map +1 -0
- package/geometry/index.js +15 -0
- package/geometry/internal.d.ts +25 -0
- package/geometry/internal.d.ts.map +1 -0
- package/geometry/internal.js +40 -0
- package/geometry/ops.d.ts +71 -0
- package/geometry/ops.d.ts.map +1 -0
- package/geometry/ops.js +147 -0
- package/geometry/project.d.ts +40 -0
- package/geometry/project.d.ts.map +1 -0
- package/geometry/project.js +88 -0
- package/geometry/types.d.ts +36 -0
- package/geometry/types.d.ts.map +1 -0
- package/geometry/types.js +12 -0
- package/index.d.ts +17 -3
- package/index.js +7 -0
- package/package.json +23 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 Honua
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/contract/index.d.ts
CHANGED
|
@@ -4,9 +4,40 @@
|
|
|
4
4
|
*
|
|
5
5
|
* The runtime classes in `src/core/surfaces.ts` remain the implementation;
|
|
6
6
|
* this module is the protocol-neutral vocabulary layered over them. See
|
|
7
|
-
* `docs/shared-client-contract.md` for the full design
|
|
7
|
+
* `docs/shared-client-contract.md` for the full design and
|
|
8
|
+
* `docs/protocol-capability-matrix.md` for per-protocol capability coverage.
|
|
8
9
|
*
|
|
9
|
-
* @
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* import { createDataset, PROTOCOL_DEFAULT_CAPABILITIES } from "@honua/sdk-js/contract";
|
|
13
|
+
* import { HonuaClient } from "@honua/sdk-js/honua";
|
|
14
|
+
*
|
|
15
|
+
* const client = new HonuaClient({ baseUrl: "https://your-honua-server.example" });
|
|
16
|
+
*
|
|
17
|
+
* const dataset = createDataset({
|
|
18
|
+
* id: "ops",
|
|
19
|
+
* client,
|
|
20
|
+
* sources: [
|
|
21
|
+
* {
|
|
22
|
+
* id: "incidents",
|
|
23
|
+
* protocol: "geoservices-feature-service",
|
|
24
|
+
* locator: { url: "https://your-honua-server.example", serviceId: "incidents", layerId: 0 },
|
|
25
|
+
* capabilities: PROTOCOL_DEFAULT_CAPABILITIES["geoservices-feature-service"],
|
|
26
|
+
* },
|
|
27
|
+
* {
|
|
28
|
+
* id: "imagery",
|
|
29
|
+
* protocol: "stac",
|
|
30
|
+
* locator: { url: "https://your-honua-server.example/stac" },
|
|
31
|
+
* capabilities: PROTOCOL_DEFAULT_CAPABILITIES.stac,
|
|
32
|
+
* },
|
|
33
|
+
* ],
|
|
34
|
+
* });
|
|
35
|
+
*
|
|
36
|
+
* const incidents = await dataset.source("incidents")!.queryAll({ where: "STATUS = 'OPEN'" });
|
|
37
|
+
* const scenes = await dataset.source("imagery")!.query({ where: "collections IN ('landsat-c2-l2')" });
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* @packageDocumentation
|
|
10
41
|
*/
|
|
11
42
|
export type { AdapterFor, AdapterKind, AdapterTypeMap, AggregationFn, AggregationHistogramBucketAliases, AggregationHistogramBucketSpec, AggregationMetric, AggregationSpec, AggregationTimeIntervalSpec, AggregationTimeIntervalUnit, AggregationTimeSeriesAliases, AggregationTimeSeriesSpec, AttachmentAdd, AttachmentApi, AttachmentDelete, AttachmentEditOutcome, AttachmentGroup, AttachmentInfo, AttachmentQuery, AttachmentUpdate, CanonicalFeature, Capabilities, Capability, CapabilityPolicy, CreateDatasetOptions, Dataset, DatasetId, DegradedReason, EditEnvelope, EditOutcome, EditResult, FeatureId, MapBinding, PaginationSpec, Protocol, Query, RelatedGroup, RelatedQuery, RelatedResult, ResolveSourceContext, Result, SortSpec, Source, SourceAnalyticsCapabilities, SourceDescriptor, SourceFreshnessContract, SourceHistogramCapabilityMetadata, SourceId, SourceLocator, SourceResolver, SourceSchema, SourceTimeSeriesCapabilityMetadata, } from "./types.js";
|
|
12
43
|
export type { SpatialAggregationCacheMetadata, SpatialAggregationCategoryBucket, SpatialAggregationCategorySummarySpec, SpatialAggregationCategoryValue, SpatialAggregationCell, SpatialAggregationCellGeometry, SpatialAggregationContractFixture, SpatialAggregationCountSummarySpec, SpatialAggregationCountValue, SpatialAggregationDomainValue, SpatialAggregationGroupByMetadata, SpatialAggregationGroupBySpec, SpatialAggregationGroupedSummary, SpatialAggregationHistogramBucket, SpatialAggregationHistogramSummarySpec, SpatialAggregationHistogramValue, SpatialAggregationInclude, SpatialAggregationIndexModelMetadata, SpatialAggregationIndexCoverageMetadata, SpatialAggregationIndexSelection, SpatialAggregationIndexState, SpatialAggregationMetadata, SpatialAggregationMetricKind, SpatialAggregationMetricSummarySpec, SpatialAggregationMetricValue, SpatialAggregationPageInfo, SpatialAggregationPageRequest, SpatialAggregationProgressRefinement, SpatialAggregationProgressStatus, SpatialAggregationProgressiveState, SpatialAggregationRangeBucketSpec, SpatialAggregationRangeBucketValue, SpatialAggregationRangeSummarySpec, SpatialAggregationRangeValue, SpatialAggregationRequest, SpatialAggregationResolutionInput, SpatialAggregationResult, SpatialAggregationResolvedWidgetSummary, SpatialAggregationSummaryBag, SpatialAggregationSummaryBase, SpatialAggregationSummaryKind, SpatialAggregationSummaryMetadata, SpatialAggregationSummarySpec, SpatialAggregationSummaryValue, SpatialAggregationValidationIssue, SpatialAggregationValueType, SpatialAggregationViewport, SpatialAggregationWidgetKind, SpatialAggregationWidgetMetadata, SpatialAggregationWidgetSummarySource, } from "./spatial-aggregation.js";
|
|
@@ -23,6 +54,10 @@ export { FEATURE_SERVER_H3_SPATIAL_AGGREGATION_INDEX_MODEL_ID, SPATIAL_AGGREGATI
|
|
|
23
54
|
export { QUERY_TILE_SERVER_CONTRACT_VERSION, QUERY_TILE_SERVER_FEATURE_DETAIL_ROUTE_TEMPLATE, QUERY_TILE_SERVER_RESPONSE_HEADERS, QUERY_TILE_SERVER_ROUTE_PREFIX, QUERY_TILE_SERVER_SOURCE_ROUTE_TEMPLATE, QUERY_TILE_SERVER_TILEJSON_ROUTE_TEMPLATE, QUERY_TILE_SERVER_TILE_ROUTE_TEMPLATE, buildQueryTileCacheKey, buildQueryTileFeatureDetailQuery, buildQueryTileServerPath, buildQueryTileServerUrl, defineQueryTileSource, loadQueryTileFeatureDetail, mapQueryTileFeatureIdentity, normalizeQueryTileKey, normalizeQueryTileSourceDescriptor, parseQueryTileFeatureDetailResponse, parseQueryTileJson, parseQueryTileServerErrorResponse, queryTileServerRequestParamsFromDescriptor, queryTileKeyString, stableJson, } from "./tiles.js";
|
|
24
55
|
export type { DefineQueryTileSourceOptions, QueryTileCacheIdentityDescriptor, QueryTileCacheKeyOptions, QueryTileCachePolicy, QueryTileEndpointDescriptor, QueryTileFallbackMode, QueryTileFallbackPolicy, QueryTileFeatureDetailOptions, QueryTileFeatureIdentityContext, QueryTileFeatureIdentityDescriptor, QueryTileFeatureIdentityMapper, QueryTileFeatureIdentityTarget, QueryTileFormat, QueryTileFeatureDetailResponse, QueryTileJson, QueryTileJsonVectorLayer, QueryTileKey, QueryTileKeyInput, QueryTileProjectionDescriptor, QueryTileScheme, QueryTileServerCachePolicyDescriptor, QueryTileServerCacheValidators, QueryTileServerContractFixture, QueryTileServerDegradation, QueryTileServerDegradationCode, QueryTileServerDegradationSeverity, QueryTileServerError, QueryTileServerErrorCode, QueryTileServerErrorResponse, QueryTileServerFeatureIdentityDescriptor, QueryTileServerLimitDescriptor, QueryTileServerRequestParameters, QueryTileServerRouteKind, QueryTileServerRouteOptions, QueryTileServerTileJsonMetadata, QueryTileSpatialReference, QueryTileSpatialReferenceDescriptor, QueryTileExtentDescriptor, QueryTileSourceDescriptor, } from "./tiles.js";
|
|
25
56
|
export { ALL_CAPABILITIES, FIRST_PARTY_PROTOCOLS, createDataset, geoServicesFeatureSource, geoServicesGPServiceSource, geoServicesGeometryServiceSource, geoServicesImageSource, geoServicesMapServiceSource, odataSource, ogcFeaturesSource, ogcTilesSource, ogcMapsSource, ogcRecordsSource, stacSearchSource, wfsSource, wmsSource, wmtsSource, } from "./source.js";
|
|
26
|
-
export type { IJobRun, JobError, JobProgress, JobResult, JobSnapshot, JobSnapshotListener, JobStatus, } from "./jobs.js";
|
|
27
|
-
export { isJobTerminal } from "./jobs.js";
|
|
57
|
+
export type { IJobRun, JobError, JobProgress, JobResult, JobResultsOptions, JobSnapshot, JobSnapshotListener, JobStatus, } from "./jobs.js";
|
|
58
|
+
export { HonuaJobPollTimeoutError, isJobTerminal } from "./jobs.js";
|
|
59
|
+
export { HonuaPmtilesArchive, describePmtilesArchive, stripPmtilesScheme, toPmtilesSourceUrl } from "./pmtiles.js";
|
|
60
|
+
export type { DescribePmtilesArchiveDeps, PmtilesArchiveDescription, PmtilesArchiveLike, PmtilesHeaderLike, PmtilesModuleLike, PmtilesRangeResponse, PmtilesSourceLike, PmtilesTileKind, PmtilesVectorLayerInfo, } from "./pmtiles.js";
|
|
61
|
+
export { TEMPORAL_CAPABILITY, TEMPORAL_ROUTE_PREFIX, TEMPORAL_ROUTES, TEMPORAL_SCHEMA_VERSION, assertValidTemporalRollbackPlanRequest, createTemporalClient, isReadOnlyTemporalHistory, temporalModeSupports, validateTemporalRollbackPlanRequest, } from "./temporal.js";
|
|
62
|
+
export type { TemporalAsOfRequest, TemporalAttributeChange, TemporalCheckpoint, TemporalChangeSet, TemporalChangeSetOperationKind, TemporalClient, TemporalClientCallOptions, TemporalContractFixture, TemporalCursor, TemporalCursorType, TemporalDiff, TemporalDiffRequest, TemporalDiffStatus, TemporalDiffSummary, TemporalError, TemporalErrorCode, TemporalFeatureChangeType, TemporalFeatureDiff, TemporalFeatureTimeline, TemporalFeatureTimelineRequest, TemporalFilter, TemporalGeometryChange, TemporalHistoryModel, TemporalJobRef, TemporalMode, TemporalRequestClient, TemporalRevision, TemporalRevisionOperation, TemporalRiskLevel, TemporalRollbackExecuteRequest, TemporalRollbackMode, TemporalRollbackOperation, TemporalRollbackPlan, TemporalRollbackPlanRequest, TemporalRollbackScope, TemporalRollbackStatus, TemporalSourceCapability, TemporalValidationIssue, } from "./temporal.js";
|
|
28
63
|
//# sourceMappingURL=index.d.ts.map
|
package/contract/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/contract/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/contract/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,YAAY,EACV,UAAU,EACV,WAAW,EACX,cAAc,EACd,aAAa,EACb,iCAAiC,EACjC,8BAA8B,EAC9B,iBAAiB,EACjB,eAAe,EACf,2BAA2B,EAC3B,2BAA2B,EAC3B,4BAA4B,EAC5B,yBAAyB,EACzB,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,qBAAqB,EACrB,eAAe,EACf,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,oBAAoB,EACpB,OAAO,EACP,SAAS,EACT,cAAc,EACd,YAAY,EACZ,WAAW,EACX,UAAU,EACV,SAAS,EACT,UAAU,EACV,cAAc,EACd,QAAQ,EACR,KAAK,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AiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,eAAe,EACf,sBAAsB,GACvB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,eAAe,EACf,uBAAuB,EACvB,sCAAsC,EACtC,oBAAoB,EACpB,yBAAyB,EACzB,oBAAoB,EACpB,mCAAmC,GACpC,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,mBAAmB,EACnB,uBAAuB,EACvB,kBAAkB,EAClB,iBAAiB,EACjB,8BAA8B,EAC9B,cAAc,EACd,yBAAyB,EACzB,uBAAuB,EACvB,cAAc,EACd,kBAAkB,EAClB,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,yBAAyB,EACzB,mBAAmB,EACnB,uBAAuB,EACvB,8BAA8B,EAC9B,cAAc,EACd,sBAAsB,EACtB,oBAAoB,EACpB,cAAc,EACd,YAAY,EACZ,qBAAqB,EACrB,gBAAgB,EAChB,yBAAyB,EACzB,iBAAiB,EACjB,8BAA8B,EAC9B,oBAAoB,EACpB,yBAAyB,EACzB,oBAAoB,EACpB,2BAA2B,EAC3B,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,EACxB,uBAAuB,GACxB,MAAM,eAAe,CAAC"}
|
package/contract/index.js
CHANGED
|
@@ -4,9 +4,40 @@
|
|
|
4
4
|
*
|
|
5
5
|
* The runtime classes in `src/core/surfaces.ts` remain the implementation;
|
|
6
6
|
* this module is the protocol-neutral vocabulary layered over them. See
|
|
7
|
-
* `docs/shared-client-contract.md` for the full design
|
|
7
|
+
* `docs/shared-client-contract.md` for the full design and
|
|
8
|
+
* `docs/protocol-capability-matrix.md` for per-protocol capability coverage.
|
|
8
9
|
*
|
|
9
|
-
* @
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* import { createDataset, PROTOCOL_DEFAULT_CAPABILITIES } from "@honua/sdk-js/contract";
|
|
13
|
+
* import { HonuaClient } from "@honua/sdk-js/honua";
|
|
14
|
+
*
|
|
15
|
+
* const client = new HonuaClient({ baseUrl: "https://your-honua-server.example" });
|
|
16
|
+
*
|
|
17
|
+
* const dataset = createDataset({
|
|
18
|
+
* id: "ops",
|
|
19
|
+
* client,
|
|
20
|
+
* sources: [
|
|
21
|
+
* {
|
|
22
|
+
* id: "incidents",
|
|
23
|
+
* protocol: "geoservices-feature-service",
|
|
24
|
+
* locator: { url: "https://your-honua-server.example", serviceId: "incidents", layerId: 0 },
|
|
25
|
+
* capabilities: PROTOCOL_DEFAULT_CAPABILITIES["geoservices-feature-service"],
|
|
26
|
+
* },
|
|
27
|
+
* {
|
|
28
|
+
* id: "imagery",
|
|
29
|
+
* protocol: "stac",
|
|
30
|
+
* locator: { url: "https://your-honua-server.example/stac" },
|
|
31
|
+
* capabilities: PROTOCOL_DEFAULT_CAPABILITIES.stac,
|
|
32
|
+
* },
|
|
33
|
+
* ],
|
|
34
|
+
* });
|
|
35
|
+
*
|
|
36
|
+
* const incidents = await dataset.source("incidents")!.queryAll({ where: "STATUS = 'OPEN'" });
|
|
37
|
+
* const scenes = await dataset.source("imagery")!.query({ where: "collections IN ('landsat-c2-l2')" });
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* @packageDocumentation
|
|
10
41
|
*/
|
|
11
42
|
export { CAPABILITIES, PROTOCOL_DEFAULT_CAPABILITIES, PROTOCOLS, capabilities, intersectCapabilities, unionCapabilities, } from "./types.js";
|
|
12
43
|
export { ANALYTICS_SOURCE_SCHEMA_VERSION, analyticsSourceDegradedReason, analyticsSourceId, assessAnalyticsSourcePushdown, buildAnalyticsSourceCacheKey, defineIndexedSpatialSource, defineWarehouseQuerySource, defineWarehouseTableSource, defineWarehouseTilesetSource, isAnalyticsSourceDescriptor, normalizeAnalyticsSourceDescriptor, } from "./analytics-sources.js";
|
|
@@ -16,4 +47,6 @@ export { EditSketchWorkflowModel, createEditSketchWorkflow } from "./edit-sketch
|
|
|
16
47
|
export { FEATURE_SERVER_H3_SPATIAL_AGGREGATION_INDEX_MODEL_ID, SPATIAL_AGGREGATION_CAPABILITY, SPATIAL_AGGREGATION_METADATA_SCHEMA_VERSION, SPATIAL_AGGREGATION_SCHEMA_VERSION, assertFeatureServerH3SpatialAggregationRequest, assertValidSpatialAggregationRequest, isSpatialAggregationComplete, resolveSpatialAggregationWidgetSummary, spatialAggregationProgress, spatialAggregationSummaryKindSupportedByFeatureServerH3, spatialAggregationSummaryKindRequiresField, spatialAggregationWidgets, validateFeatureServerH3SpatialAggregationRequest, validateSpatialAggregationRequest, } from "./spatial-aggregation.js";
|
|
17
48
|
export { QUERY_TILE_SERVER_CONTRACT_VERSION, QUERY_TILE_SERVER_FEATURE_DETAIL_ROUTE_TEMPLATE, QUERY_TILE_SERVER_RESPONSE_HEADERS, QUERY_TILE_SERVER_ROUTE_PREFIX, QUERY_TILE_SERVER_SOURCE_ROUTE_TEMPLATE, QUERY_TILE_SERVER_TILEJSON_ROUTE_TEMPLATE, QUERY_TILE_SERVER_TILE_ROUTE_TEMPLATE, buildQueryTileCacheKey, buildQueryTileFeatureDetailQuery, buildQueryTileServerPath, buildQueryTileServerUrl, defineQueryTileSource, loadQueryTileFeatureDetail, mapQueryTileFeatureIdentity, normalizeQueryTileKey, normalizeQueryTileSourceDescriptor, parseQueryTileFeatureDetailResponse, parseQueryTileJson, parseQueryTileServerErrorResponse, queryTileServerRequestParamsFromDescriptor, queryTileKeyString, stableJson, } from "./tiles.js";
|
|
18
49
|
export { ALL_CAPABILITIES, FIRST_PARTY_PROTOCOLS, createDataset, geoServicesFeatureSource, geoServicesGPServiceSource, geoServicesGeometryServiceSource, geoServicesImageSource, geoServicesMapServiceSource, odataSource, ogcFeaturesSource, ogcTilesSource, ogcMapsSource, ogcRecordsSource, stacSearchSource, wfsSource, wmsSource, wmtsSource, } from "./source.js";
|
|
19
|
-
export { isJobTerminal } from "./jobs.js";
|
|
50
|
+
export { HonuaJobPollTimeoutError, isJobTerminal } from "./jobs.js";
|
|
51
|
+
export { HonuaPmtilesArchive, describePmtilesArchive, stripPmtilesScheme, toPmtilesSourceUrl } from "./pmtiles.js";
|
|
52
|
+
export { TEMPORAL_CAPABILITY, TEMPORAL_ROUTE_PREFIX, TEMPORAL_ROUTES, TEMPORAL_SCHEMA_VERSION, assertValidTemporalRollbackPlanRequest, createTemporalClient, isReadOnlyTemporalHistory, temporalModeSupports, validateTemporalRollbackPlanRequest, } from "./temporal.js";
|
package/contract/jobs.d.ts
CHANGED
|
@@ -66,6 +66,25 @@ export interface JobResult<T = unknown> {
|
|
|
66
66
|
}
|
|
67
67
|
/** Listener function invoked on every observed snapshot transition. */
|
|
68
68
|
export type JobSnapshotListener<T = unknown> = (snapshot: JobSnapshot<T>) => void;
|
|
69
|
+
/**
|
|
70
|
+
* Bounds for {@link IJobRun.results}. Without any bound a hung or never-terminal
|
|
71
|
+
* status endpoint polls forever with no caller cancellation. Implementations
|
|
72
|
+
* pass {@link signal} through to the underlying status request, stop polling
|
|
73
|
+
* when the signal aborts or a deadline / attempt cap is reached, and use capped
|
|
74
|
+
* exponential backoff between polls.
|
|
75
|
+
*/
|
|
76
|
+
export interface JobResultsOptions {
|
|
77
|
+
/** Abort the poll loop (and the in-flight status request) when this fires. */
|
|
78
|
+
readonly signal?: AbortSignal;
|
|
79
|
+
/** Wall-clock budget in ms for reaching a terminal state. */
|
|
80
|
+
readonly deadlineMs?: number;
|
|
81
|
+
/** Maximum number of status polls before giving up. */
|
|
82
|
+
readonly maxAttempts?: number;
|
|
83
|
+
/** Base poll interval in ms (defaults to the adapter's cadence). */
|
|
84
|
+
readonly pollIntervalMs?: number;
|
|
85
|
+
/** Cap for the exponential backoff interval in ms. */
|
|
86
|
+
readonly maxPollIntervalMs?: number;
|
|
87
|
+
}
|
|
69
88
|
/**
|
|
70
89
|
* Canonical async-operation handle. Methods are intentionally narrow so
|
|
71
90
|
* downstream tickets that submit jobs (operator workflows, manifest
|
|
@@ -94,10 +113,13 @@ export interface IJobRun<T = unknown> {
|
|
|
94
113
|
/**
|
|
95
114
|
* Wait for the job to reach a terminal state and resolve with the
|
|
96
115
|
* outputs. Rejects with `HonuaJobFailedError` for `failed` /
|
|
97
|
-
* `dismissed` terminal states
|
|
98
|
-
*
|
|
116
|
+
* `dismissed` terminal states, or `HonuaJobPollTimeoutError` when the
|
|
117
|
+
* optional {@link JobResultsOptions} deadline / attempt cap is reached or
|
|
118
|
+
* the supplied signal aborts. Implementations poll on a configurable
|
|
119
|
+
* interval (capped exponential backoff); the default cadence is left to
|
|
120
|
+
* the adapter.
|
|
99
121
|
*/
|
|
100
|
-
results(): Promise<JobResult<T>>;
|
|
122
|
+
results(options?: JobResultsOptions): Promise<JobResult<T>>;
|
|
101
123
|
/**
|
|
102
124
|
* Cancel / dismiss the job. Idempotent. Returns the resulting status
|
|
103
125
|
* (typically `dismissed`, but the server may have raced to a terminal
|
|
@@ -112,4 +134,16 @@ export interface IJobRun<T = unknown> {
|
|
|
112
134
|
* watchers and tests.
|
|
113
135
|
*/
|
|
114
136
|
export declare function isJobTerminal(status: JobStatus): boolean;
|
|
137
|
+
/**
|
|
138
|
+
* Thrown by {@link IJobRun.results} when the poll loop is cancelled or exhausted
|
|
139
|
+
* before the job reached a terminal state — i.e. the {@link JobResultsOptions}
|
|
140
|
+
* signal aborted, the deadline elapsed, or the attempt cap was hit. `reason`
|
|
141
|
+
* distinguishes the three so callers can branch (e.g. retry vs surface).
|
|
142
|
+
*/
|
|
143
|
+
export declare class HonuaJobPollTimeoutError extends Error {
|
|
144
|
+
readonly reason: "aborted" | "deadline" | "max-attempts";
|
|
145
|
+
readonly jobId: string;
|
|
146
|
+
readonly lastStatus: JobStatus;
|
|
147
|
+
constructor(message: string, reason: "aborted" | "deadline" | "max-attempts", jobId: string, lastStatus: JobStatus);
|
|
148
|
+
}
|
|
115
149
|
//# sourceMappingURL=jobs.d.ts.map
|
package/contract/jobs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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C,CAAC,CAAC,CAAC;IAC5D;;;;;OAKG;IACH,MAAM,IAAI,OAAO,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAExD;AAED;;;;;GAKG;AACH,qBAAa,wBAAyB,SAAQ,KAAK;IACjD,SAAgB,MAAM,EAAE,SAAS,GAAG,UAAU,GAAG,cAAc,CAAC;IAChE,SAAgB,KAAK,EAAE,MAAM,CAAC;IAC9B,SAAgB,UAAU,EAAE,SAAS,CAAC;gBAGpC,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,SAAS,GAAG,UAAU,GAAG,cAAc,EAC/C,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,SAAS;CAQxB"}
|
package/contract/jobs.js
CHANGED
|
@@ -20,3 +20,21 @@
|
|
|
20
20
|
export function isJobTerminal(status) {
|
|
21
21
|
return status === "successful" || status === "failed" || status === "dismissed";
|
|
22
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Thrown by {@link IJobRun.results} when the poll loop is cancelled or exhausted
|
|
25
|
+
* before the job reached a terminal state — i.e. the {@link JobResultsOptions}
|
|
26
|
+
* signal aborted, the deadline elapsed, or the attempt cap was hit. `reason`
|
|
27
|
+
* distinguishes the three so callers can branch (e.g. retry vs surface).
|
|
28
|
+
*/
|
|
29
|
+
export class HonuaJobPollTimeoutError extends Error {
|
|
30
|
+
reason;
|
|
31
|
+
jobId;
|
|
32
|
+
lastStatus;
|
|
33
|
+
constructor(message, reason, jobId, lastStatus) {
|
|
34
|
+
super(message);
|
|
35
|
+
this.name = "HonuaJobPollTimeoutError";
|
|
36
|
+
this.reason = reason;
|
|
37
|
+
this.jobId = jobId;
|
|
38
|
+
this.lastStatus = lastStatus;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PMTiles archive inspection for the protocol-neutral contract.
|
|
3
|
+
*
|
|
4
|
+
* A PMTiles archive is a single, immutable file (on object storage or any
|
|
5
|
+
* static host) that stores an entire raster or vector tile pyramid. It
|
|
6
|
+
* participates in the `Dataset` / `Source` model as a **tiles-only** protocol:
|
|
7
|
+
* the canonical query family throws {@link HonuaCapabilityNotSupportedError}
|
|
8
|
+
* (there is no feature-query surface on an archive), while archive metadata —
|
|
9
|
+
* bounds, min/max zoom, and vector layer names — is inspected through
|
|
10
|
+
* `Source.protocol("pmtiles").describe()`.
|
|
11
|
+
*
|
|
12
|
+
* This module never statically imports the `pmtiles` package. The reader is
|
|
13
|
+
* pulled in lazily (`await import("pmtiles")`) the first time an archive is
|
|
14
|
+
* actually described, mirroring the Cesium adapter so consumers that never
|
|
15
|
+
* touch PMTiles pay zero bundle cost. A minimal `pmtiles` module slice is
|
|
16
|
+
* modelled here so the wiring stays unit-testable against an injected fake
|
|
17
|
+
* without a network fetch.
|
|
18
|
+
*
|
|
19
|
+
* @module
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* Canonical tile-payload kinds a PMTiles archive can store. `mvt` is a vector
|
|
23
|
+
* archive (Mapbox Vector Tiles); the rest are raster encodings. `unknown`
|
|
24
|
+
* covers archives whose header tile-type byte the reader could not classify.
|
|
25
|
+
*/
|
|
26
|
+
export type PmtilesTileKind = "mvt" | "png" | "jpeg" | "webp" | "avif" | "unknown";
|
|
27
|
+
/**
|
|
28
|
+
* One vector layer advertised in a vector archive's TileJSON-style metadata
|
|
29
|
+
* (`vector_layers`). Present only for `mvt` archives; raster archives report an
|
|
30
|
+
* empty {@link PmtilesArchiveDescription.vectorLayers} list.
|
|
31
|
+
*/
|
|
32
|
+
export interface PmtilesVectorLayerInfo {
|
|
33
|
+
/** Layer id — the MapLibre `source-layer` name to reference in a style. */
|
|
34
|
+
readonly id: string;
|
|
35
|
+
/** Optional human description carried in the archive metadata. */
|
|
36
|
+
readonly description?: string;
|
|
37
|
+
/** Optional per-layer minimum zoom advertised in the metadata. */
|
|
38
|
+
readonly minZoom?: number;
|
|
39
|
+
/** Optional per-layer maximum zoom advertised in the metadata. */
|
|
40
|
+
readonly maxZoom?: number;
|
|
41
|
+
/** Optional field-name → type map advertised in the metadata. */
|
|
42
|
+
readonly fields?: Readonly<Record<string, string>>;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* The archive metadata surfaced by {@link describePmtilesArchive}. Bounds are
|
|
46
|
+
* `[west, south, east, north]` in degrees; `center` is `[lon, lat, zoom]`. The
|
|
47
|
+
* raw metadata JSON is preserved on `metadata` for callers that need archive
|
|
48
|
+
* fields beyond the normalized shape.
|
|
49
|
+
*/
|
|
50
|
+
export interface PmtilesArchiveDescription {
|
|
51
|
+
/** Archive URL the description was read from. */
|
|
52
|
+
readonly url: string;
|
|
53
|
+
/** Tile payload kind stored in the archive. */
|
|
54
|
+
readonly tileKind: PmtilesTileKind;
|
|
55
|
+
/** Geographic bounds `[west, south, east, north]` in degrees. */
|
|
56
|
+
readonly bounds: readonly [number, number, number, number];
|
|
57
|
+
/** Lowest zoom level present in the archive. */
|
|
58
|
+
readonly minZoom: number;
|
|
59
|
+
/** Highest zoom level present in the archive. */
|
|
60
|
+
readonly maxZoom: number;
|
|
61
|
+
/** Suggested view center `[lon, lat, zoom]`. */
|
|
62
|
+
readonly center: readonly [number, number, number];
|
|
63
|
+
/** Vector layer definitions (empty for raster archives). */
|
|
64
|
+
readonly vectorLayers: readonly PmtilesVectorLayerInfo[];
|
|
65
|
+
/** Attribution string advertised in the archive metadata, when present. */
|
|
66
|
+
readonly attribution?: string;
|
|
67
|
+
/** The raw, parsed archive metadata JSON. */
|
|
68
|
+
readonly metadata: Readonly<Record<string, unknown>>;
|
|
69
|
+
}
|
|
70
|
+
/** A byte-range response from a {@link PmtilesSourceLike}. */
|
|
71
|
+
export interface PmtilesRangeResponse {
|
|
72
|
+
readonly data: ArrayBuffer;
|
|
73
|
+
readonly etag?: string;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* The `pmtiles` `Source` surface — a byte-range reader over the archive. A
|
|
77
|
+
* remote archive uses the reader's own `FetchSource`; a local fixture (tests)
|
|
78
|
+
* supplies a buffer-backed implementation.
|
|
79
|
+
*/
|
|
80
|
+
export interface PmtilesSourceLike {
|
|
81
|
+
getBytes(offset: number, length: number, signal?: AbortSignal, etag?: string): Promise<PmtilesRangeResponse>;
|
|
82
|
+
getKey(): string;
|
|
83
|
+
}
|
|
84
|
+
/** The `Header` fields this module reads (a subset of `pmtiles.Header`). */
|
|
85
|
+
export interface PmtilesHeaderLike {
|
|
86
|
+
readonly minZoom: number;
|
|
87
|
+
readonly maxZoom: number;
|
|
88
|
+
readonly minLon: number;
|
|
89
|
+
readonly minLat: number;
|
|
90
|
+
readonly maxLon: number;
|
|
91
|
+
readonly maxLat: number;
|
|
92
|
+
readonly centerZoom: number;
|
|
93
|
+
readonly centerLon: number;
|
|
94
|
+
readonly centerLat: number;
|
|
95
|
+
readonly tileType: number;
|
|
96
|
+
}
|
|
97
|
+
/** The `PMTiles` reader surface this module drives. */
|
|
98
|
+
export interface PmtilesArchiveLike {
|
|
99
|
+
getHeader(): Promise<PmtilesHeaderLike>;
|
|
100
|
+
getMetadata(): Promise<unknown>;
|
|
101
|
+
}
|
|
102
|
+
/** The minimal slice of `typeof import("pmtiles")` the describe path needs. */
|
|
103
|
+
export interface PmtilesModuleLike {
|
|
104
|
+
new (source: PmtilesSourceLike | string): PmtilesArchiveLike;
|
|
105
|
+
}
|
|
106
|
+
/** Injectable dependencies for {@link describePmtilesArchive} (test seams). */
|
|
107
|
+
export interface DescribePmtilesArchiveDeps {
|
|
108
|
+
/** Override the lazily-imported `pmtiles.PMTiles` constructor. */
|
|
109
|
+
readonly PMTiles?: PmtilesModuleLike;
|
|
110
|
+
/** Read from a local/in-memory source instead of fetching `url`. */
|
|
111
|
+
readonly source?: PmtilesSourceLike;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Inspect a PMTiles archive and return its normalized metadata (bounds, min/max
|
|
115
|
+
* zoom, suggested center, and vector layer names). The `pmtiles` reader is
|
|
116
|
+
* imported lazily on first use.
|
|
117
|
+
*
|
|
118
|
+
* Pass {@link DescribePmtilesArchiveDeps.source} to read a local archive (the
|
|
119
|
+
* unit-test path) or {@link DescribePmtilesArchiveDeps.PMTiles} to inject a fake
|
|
120
|
+
* reader; both default to fetching `url` through the real reader.
|
|
121
|
+
*
|
|
122
|
+
* @example
|
|
123
|
+
* ```ts
|
|
124
|
+
* const info = await describePmtilesArchive("https://example.com/basemap.pmtiles");
|
|
125
|
+
* console.log(info.bounds, info.minZoom, info.maxZoom);
|
|
126
|
+
* for (const layer of info.vectorLayers) console.log(layer.id);
|
|
127
|
+
* ```
|
|
128
|
+
*/
|
|
129
|
+
export declare function describePmtilesArchive(url: string, deps?: DescribePmtilesArchiveDeps): Promise<PmtilesArchiveDescription>;
|
|
130
|
+
/**
|
|
131
|
+
* Typed adapter handle for a PMTiles archive, reachable through
|
|
132
|
+
* `Source.protocol("pmtiles")`. Provides the archive-metadata inspection
|
|
133
|
+
* surface ({@link HonuaPmtilesArchive.describe}) that the tiles-only PMTiles
|
|
134
|
+
* `Source` uses to participate in the Dataset model honestly. The first
|
|
135
|
+
* `describe()` call is cached so repeated inspection does not re-open the
|
|
136
|
+
* archive.
|
|
137
|
+
*/
|
|
138
|
+
export declare class HonuaPmtilesArchive {
|
|
139
|
+
#private;
|
|
140
|
+
/** The `pmtiles://`-free archive URL this handle inspects. */
|
|
141
|
+
readonly url: string;
|
|
142
|
+
constructor(url: string, deps?: DescribePmtilesArchiveDeps);
|
|
143
|
+
/**
|
|
144
|
+
* Inspect the archive and return its normalized metadata. Cached after the
|
|
145
|
+
* first successful call; a failed inspection is not cached so a transient
|
|
146
|
+
* fetch error can be retried.
|
|
147
|
+
*/
|
|
148
|
+
describe(): Promise<PmtilesArchiveDescription>;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Strip a leading `pmtiles://` scheme from an archive URL, if present. MapLibre
|
|
152
|
+
* style sources address PMTiles archives as `pmtiles://https://…`; the reader
|
|
153
|
+
* (and this contract's describe path) want the bare archive URL.
|
|
154
|
+
*/
|
|
155
|
+
export declare function stripPmtilesScheme(url: string): string;
|
|
156
|
+
/**
|
|
157
|
+
* Add the `pmtiles://` scheme to a bare archive URL if it is not already
|
|
158
|
+
* present. The inverse of {@link stripPmtilesScheme}; use it when composing a
|
|
159
|
+
* MapLibre source `url` from a plain archive locator.
|
|
160
|
+
*/
|
|
161
|
+
export declare function toPmtilesSourceUrl(url: string): string;
|
|
162
|
+
//# sourceMappingURL=pmtiles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pmtiles.d.ts","sourceRoot":"","sources":["../../../src/contract/pmtiles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;AAEnF;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,kEAAkE;IAClE,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,kEAAkE;IAClE,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,kEAAkE;IAClE,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,iEAAiE;IACjE,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACpD;AAED;;;;;GAKG;AACH,MAAM,WAAW,yBAAyB;IACxC,iDAAiD;IACjD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,+CAA+C;IAC/C,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;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