@xyo-network/api-location-diviner 5.4.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 +165 -0
- package/dist/neutral/LocationDiviner/LocationDivinerApi.d.ts +11 -0
- package/dist/neutral/LocationDiviner/LocationDivinerApi.d.ts.map +1 -0
- package/dist/neutral/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.d.ts +5 -0
- package/dist/neutral/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.d.ts.map +1 -0
- package/dist/neutral/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.ts +16 -0
- package/dist/neutral/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.ts.map +1 -0
- package/dist/neutral/LocationDiviner/Queries/LocationHeatmapQuery/index.d.ts +3 -0
- package/dist/neutral/LocationDiviner/Queries/LocationHeatmapQuery/index.d.ts.map +1 -0
- package/dist/neutral/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.ts +16 -0
- package/dist/neutral/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.ts.map +1 -0
- package/dist/neutral/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.ts +2 -0
- package/dist/neutral/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.ts.map +1 -0
- package/dist/neutral/LocationDiviner/Queries/LocationQueryCreationRequest.d.ts +18 -0
- package/dist/neutral/LocationDiviner/Queries/LocationQueryCreationRequest.d.ts.map +1 -0
- package/dist/neutral/LocationDiviner/Queries/LocationQueryCreationResponse.d.ts +5 -0
- package/dist/neutral/LocationDiviner/Queries/LocationQueryCreationResponse.d.ts.map +1 -0
- package/dist/neutral/LocationDiviner/Queries/LocationQuerySchema.d.ts +7 -0
- package/dist/neutral/LocationDiviner/Queries/LocationQuerySchema.d.ts.map +1 -0
- package/dist/neutral/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.ts +8 -0
- package/dist/neutral/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.ts.map +1 -0
- package/dist/neutral/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.ts +16 -0
- package/dist/neutral/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.ts.map +1 -0
- package/dist/neutral/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.ts +3 -0
- package/dist/neutral/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.ts.map +1 -0
- package/dist/neutral/LocationDiviner/Queries/index.d.ts +7 -0
- package/dist/neutral/LocationDiviner/Queries/index.d.ts.map +1 -0
- package/dist/neutral/LocationDiviner/Witnesses/CurrentLocationWitness.d.ts +15 -0
- package/dist/neutral/LocationDiviner/Witnesses/CurrentLocationWitness.d.ts.map +1 -0
- package/dist/neutral/LocationDiviner/Witnesses/LocationWitness.d.ts +23 -0
- package/dist/neutral/LocationDiviner/Witnesses/LocationWitness.d.ts.map +1 -0
- package/dist/neutral/LocationDiviner/Witnesses/index.d.ts +3 -0
- package/dist/neutral/LocationDiviner/Witnesses/index.d.ts.map +1 -0
- package/dist/neutral/LocationDiviner/index.d.ts +5 -0
- package/dist/neutral/LocationDiviner/index.d.ts.map +1 -0
- package/dist/neutral/LocationDiviner/models.d.ts +5 -0
- package/dist/neutral/LocationDiviner/models.d.ts.map +1 -0
- package/dist/neutral/RemoteDivinerConfig.d.ts +13 -0
- package/dist/neutral/RemoteDivinerConfig.d.ts.map +1 -0
- package/dist/neutral/RemoteDivinerError.d.ts +6 -0
- package/dist/neutral/RemoteDivinerError.d.ts.map +1 -0
- package/dist/neutral/index.d.ts +4 -0
- package/dist/neutral/index.d.ts.map +1 -0
- package/dist/neutral/index.mjs +93 -0
- package/dist/neutral/index.mjs.map +1 -0
- package/package.json +73 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
GNU LESSER GENERAL PUBLIC LICENSE
|
|
2
|
+
Version 3, 29 June 2007
|
|
3
|
+
|
|
4
|
+
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
|
5
|
+
Everyone is permitted to copy and distribute verbatim copies
|
|
6
|
+
of this license document, but changing it is not allowed.
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
This version of the GNU Lesser General Public License incorporates
|
|
10
|
+
the terms and conditions of version 3 of the GNU General Public
|
|
11
|
+
License, supplemented by the additional permissions listed below.
|
|
12
|
+
|
|
13
|
+
0. Additional Definitions.
|
|
14
|
+
|
|
15
|
+
As used herein, "this License" refers to version 3 of the GNU Lesser
|
|
16
|
+
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
|
17
|
+
General Public License.
|
|
18
|
+
|
|
19
|
+
"The Library" refers to a covered work governed by this License,
|
|
20
|
+
other than an Application or a Combined Work as defined below.
|
|
21
|
+
|
|
22
|
+
An "Application" is any work that makes use of an interface provided
|
|
23
|
+
by the Library, but which is not otherwise based on the Library.
|
|
24
|
+
Defining a subclass of a class defined by the Library is deemed a mode
|
|
25
|
+
of using an interface provided by the Library.
|
|
26
|
+
|
|
27
|
+
A "Combined Work" is a work produced by combining or linking an
|
|
28
|
+
Application with the Library. The particular version of the Library
|
|
29
|
+
with which the Combined Work was made is also called the "Linked
|
|
30
|
+
Version".
|
|
31
|
+
|
|
32
|
+
The "Minimal Corresponding Source" for a Combined Work means the
|
|
33
|
+
Corresponding Source for the Combined Work, excluding any source code
|
|
34
|
+
for portions of the Combined Work that, considered in isolation, are
|
|
35
|
+
based on the Application, and not on the Linked Version.
|
|
36
|
+
|
|
37
|
+
The "Corresponding Application Code" for a Combined Work means the
|
|
38
|
+
object code and/or source code for the Application, including any data
|
|
39
|
+
and utility programs needed for reproducing the Combined Work from the
|
|
40
|
+
Application, but excluding the System Libraries of the Combined Work.
|
|
41
|
+
|
|
42
|
+
1. Exception to Section 3 of the GNU GPL.
|
|
43
|
+
|
|
44
|
+
You may convey a covered work under sections 3 and 4 of this License
|
|
45
|
+
without being bound by section 3 of the GNU GPL.
|
|
46
|
+
|
|
47
|
+
2. Conveying Modified Versions.
|
|
48
|
+
|
|
49
|
+
If you modify a copy of the Library, and, in your modifications, a
|
|
50
|
+
facility refers to a function or data to be supplied by an Application
|
|
51
|
+
that uses the facility (other than as an argument passed when the
|
|
52
|
+
facility is invoked), then you may convey a copy of the modified
|
|
53
|
+
version:
|
|
54
|
+
|
|
55
|
+
a) under this License, provided that you make a good faith effort to
|
|
56
|
+
ensure that, in the event an Application does not supply the
|
|
57
|
+
function or data, the facility still operates, and performs
|
|
58
|
+
whatever part of its purpose remains meaningful, or
|
|
59
|
+
|
|
60
|
+
b) under the GNU GPL, with none of the additional permissions of
|
|
61
|
+
this License applicable to that copy.
|
|
62
|
+
|
|
63
|
+
3. Object Code Incorporating Material from Library Header Files.
|
|
64
|
+
|
|
65
|
+
The object code form of an Application may incorporate material from
|
|
66
|
+
a header file that is part of the Library. You may convey such object
|
|
67
|
+
code under terms of your choice, provided that, if the incorporated
|
|
68
|
+
material is not limited to numerical parameters, data structure
|
|
69
|
+
layouts and accessors, or small macros, inline functions and templates
|
|
70
|
+
(ten or fewer lines in length), you do both of the following:
|
|
71
|
+
|
|
72
|
+
a) Give prominent notice with each copy of the object code that the
|
|
73
|
+
Library is used in it and that the Library and its use are
|
|
74
|
+
covered by this License.
|
|
75
|
+
|
|
76
|
+
b) Accompany the object code with a copy of the GNU GPL and this license
|
|
77
|
+
document.
|
|
78
|
+
|
|
79
|
+
4. Combined Works.
|
|
80
|
+
|
|
81
|
+
You may convey a Combined Work under terms of your choice that,
|
|
82
|
+
taken together, effectively do not restrict modification of the
|
|
83
|
+
portions of the Library contained in the Combined Work and reverse
|
|
84
|
+
engineering for debugging such modifications, if you also do each of
|
|
85
|
+
the following:
|
|
86
|
+
|
|
87
|
+
a) Give prominent notice with each copy of the Combined Work that
|
|
88
|
+
the Library is used in it and that the Library and its use are
|
|
89
|
+
covered by this License.
|
|
90
|
+
|
|
91
|
+
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
|
92
|
+
document.
|
|
93
|
+
|
|
94
|
+
c) For a Combined Work that displays copyright notices during
|
|
95
|
+
execution, include the copyright notice for the Library among
|
|
96
|
+
these notices, as well as a reference directing the user to the
|
|
97
|
+
copies of the GNU GPL and this license document.
|
|
98
|
+
|
|
99
|
+
d) Do one of the following:
|
|
100
|
+
|
|
101
|
+
0) Convey the Minimal Corresponding Source under the terms of this
|
|
102
|
+
License, and the Corresponding Application Code in a form
|
|
103
|
+
suitable for, and under terms that permit, the user to
|
|
104
|
+
recombine or relink the Application with a modified version of
|
|
105
|
+
the Linked Version to produce a modified Combined Work, in the
|
|
106
|
+
manner specified by section 6 of the GNU GPL for conveying
|
|
107
|
+
Corresponding Source.
|
|
108
|
+
|
|
109
|
+
1) Use a suitable shared library mechanism for linking with the
|
|
110
|
+
Library. A suitable mechanism is one that (a) uses at run time
|
|
111
|
+
a copy of the Library already present on the user's computer
|
|
112
|
+
system, and (b) will operate properly with a modified version
|
|
113
|
+
of the Library that is interface-compatible with the Linked
|
|
114
|
+
Version.
|
|
115
|
+
|
|
116
|
+
e) Provide Installation Information, but only if you would otherwise
|
|
117
|
+
be required to provide such information under section 6 of the
|
|
118
|
+
GNU GPL, and only to the extent that such information is
|
|
119
|
+
necessary to install and execute a modified version of the
|
|
120
|
+
Combined Work produced by recombining or relinking the
|
|
121
|
+
Application with a modified version of the Linked Version. (If
|
|
122
|
+
you use option 4d0, the Installation Information must accompany
|
|
123
|
+
the Minimal Corresponding Source and Corresponding Application
|
|
124
|
+
Code. If you use option 4d1, you must provide the Installation
|
|
125
|
+
Information in the manner specified by section 6 of the GNU GPL
|
|
126
|
+
for conveying Corresponding Source.)
|
|
127
|
+
|
|
128
|
+
5. Combined Libraries.
|
|
129
|
+
|
|
130
|
+
You may place library facilities that are a work based on the
|
|
131
|
+
Library side by side in a single library together with other library
|
|
132
|
+
facilities that are not Applications and are not covered by this
|
|
133
|
+
License, and convey such a combined library under terms of your
|
|
134
|
+
choice, if you do both of the following:
|
|
135
|
+
|
|
136
|
+
a) Accompany the combined library with a copy of the same work based
|
|
137
|
+
on the Library, uncombined with any other library facilities,
|
|
138
|
+
conveyed under the terms of this License.
|
|
139
|
+
|
|
140
|
+
b) Give prominent notice with the combined library that part of it
|
|
141
|
+
is a work based on the Library, and explaining where to find the
|
|
142
|
+
accompanying uncombined form of the same work.
|
|
143
|
+
|
|
144
|
+
6. Revised Versions of the GNU Lesser General Public License.
|
|
145
|
+
|
|
146
|
+
The Free Software Foundation may publish revised and/or new versions
|
|
147
|
+
of the GNU Lesser General Public License from time to time. Such new
|
|
148
|
+
versions will be similar in spirit to the present version, but may
|
|
149
|
+
differ in detail to address new problems or concerns.
|
|
150
|
+
|
|
151
|
+
Each version is given a distinguishing version number. If the
|
|
152
|
+
Library as you received it specifies that a certain numbered version
|
|
153
|
+
of the GNU Lesser General Public License "or any later version"
|
|
154
|
+
applies to it, you have the option of following the terms and
|
|
155
|
+
conditions either of that published version or of any later version
|
|
156
|
+
published by the Free Software Foundation. If the Library as you
|
|
157
|
+
received it does not specify a version number of the GNU Lesser
|
|
158
|
+
General Public License, you may choose any version of the GNU Lesser
|
|
159
|
+
General Public License ever published by the Free Software Foundation.
|
|
160
|
+
|
|
161
|
+
If the Library as you received it specifies that a proxy can decide
|
|
162
|
+
whether future versions of the GNU Lesser General Public License shall
|
|
163
|
+
apply, that proxy's public statement of acceptance of any version is
|
|
164
|
+
permanent authorization for you to choose that version for the
|
|
165
|
+
Library.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ApiConfig } from '@xyo-network/api-models';
|
|
2
|
+
import type { GetLocationQueryResponse } from './models.ts';
|
|
3
|
+
import type { LocationQueryCreationResponse, SupportedLocationQueryCreationRequest } from './Queries/index.ts';
|
|
4
|
+
declare class LocationDivinerApi {
|
|
5
|
+
config: ApiConfig;
|
|
6
|
+
constructor(config: ApiConfig);
|
|
7
|
+
getLocationQuery(hash: string): Promise<GetLocationQueryResponse>;
|
|
8
|
+
postLocationQuery(request: SupportedLocationQueryCreationRequest): Promise<LocationQueryCreationResponse>;
|
|
9
|
+
}
|
|
10
|
+
export { LocationDivinerApi };
|
|
11
|
+
//# sourceMappingURL=LocationDivinerApi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocationDivinerApi.d.ts","sourceRoot":"","sources":["../../../src/LocationDiviner/LocationDivinerApi.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAe,MAAM,yBAAyB,CAAA;AAErE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AAC3D,OAAO,KAAK,EAAE,6BAA6B,EAAE,qCAAqC,EAAE,MAAM,oBAAoB,CAAA;AAE9G,cAAM,kBAAkB;IACtB,MAAM,EAAE,SAAS,CAAA;gBACL,MAAM,EAAE,SAAS;IAIvB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAKjE,iBAAiB,CAAC,OAAO,EAAE,qCAAqC,GAAG,OAAO,CAAC,6BAA6B,CAAC;CAIhH;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocationHeatmapPointProperties.d.ts","sourceRoot":"","sources":["../../../../../src/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;CACd"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { LocationWitnessSchema } from '../../Witnesses/index.ts';
|
|
2
|
+
export declare const LocationHeatmapQuerySchema: "network.xyo.location.heatmap.query" & {
|
|
3
|
+
readonly __schema: true;
|
|
4
|
+
};
|
|
5
|
+
export type LocationHeatmapQuerySchema = typeof LocationHeatmapQuerySchema;
|
|
6
|
+
export declare const LocationHeatmapAnswerSchema: "network.xyo.location.heatmap.answer" & {
|
|
7
|
+
readonly __schema: true;
|
|
8
|
+
};
|
|
9
|
+
export type LocationHeatmapAnswerSchema = typeof LocationHeatmapAnswerSchema;
|
|
10
|
+
export interface LocationHeatmapQuery {
|
|
11
|
+
schema: LocationWitnessSchema;
|
|
12
|
+
startTime?: string;
|
|
13
|
+
stopTime?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const isLocationHeatmapQuery: (query: unknown) => query is LocationHeatmapQuery;
|
|
16
|
+
//# sourceMappingURL=LocationHeatmapQuery.d.ts.map
|
package/dist/neutral/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocationHeatmapQuery.d.ts","sourceRoot":"","sources":["../../../../../src/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAA;AAErE,eAAO,MAAM,0BAA0B;;CAAuD,CAAA;AAC9F,MAAM,MAAM,0BAA0B,GAAG,OAAO,0BAA0B,CAAA;AAE1E,eAAO,MAAM,2BAA2B;;CAAwD,CAAA;AAChG,MAAM,MAAM,2BAA2B,GAAG,OAAO,2BAA2B,CAAA;AAE5E,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,qBAAqB,CAAA;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,eAAO,MAAM,sBAAsB,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,oBAEhE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/LocationDiviner/Queries/LocationHeatmapQuery/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAA;AACnD,cAAc,2BAA2B,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { LocationWitnessSchema } from '../../Witnesses/index.ts';
|
|
2
|
+
export declare const LocationQuadkeyHeatmapQuerySchema: "network.xyo.location.heatmap.quadkey.query" & {
|
|
3
|
+
readonly __schema: true;
|
|
4
|
+
};
|
|
5
|
+
export type LocationQuadkeyHeatmapQuerySchema = typeof LocationQuadkeyHeatmapQuerySchema;
|
|
6
|
+
export declare const LocationQuadkeyHeatmapAnswerSchema: "network.xyo.location.heatmap.quadkey.answer" & {
|
|
7
|
+
readonly __schema: true;
|
|
8
|
+
};
|
|
9
|
+
export type LocationQuadkeyHeatmapAnswerSchema = typeof LocationQuadkeyHeatmapAnswerSchema;
|
|
10
|
+
export interface LocationQuadkeyHeatmapQuery {
|
|
11
|
+
schema: LocationWitnessSchema;
|
|
12
|
+
startTime?: string;
|
|
13
|
+
stopTime?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const isLocationQuadkeyHeatmapQuery: (query: unknown) => query is LocationQuadkeyHeatmapQuery;
|
|
16
|
+
//# sourceMappingURL=LocationQuadkeyHeatmapQuery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocationQuadkeyHeatmapQuery.d.ts","sourceRoot":"","sources":["../../../../../src/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAA;AAErE,eAAO,MAAM,iCAAiC;;CAA+D,CAAA;AAC7G,MAAM,MAAM,iCAAiC,GAAG,OAAO,iCAAiC,CAAA;AAExF,eAAO,MAAM,kCAAkC;;CAAgE,CAAA;AAC/G,MAAM,MAAM,kCAAkC,GAAG,OAAO,kCAAkC,CAAA;AAE1F,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE,qBAAqB,CAAA;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,eAAO,MAAM,6BAA6B,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,2BAEvE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ApiConfig } from '@xyo-network/api-models';
|
|
2
|
+
import type { LocationHeatmapQuery, LocationHeatmapQuerySchema } from './LocationHeatmapQuery/index.ts';
|
|
3
|
+
import type { LocationQuadkeyHeatmapQuery, LocationQuadkeyHeatmapQuerySchema } from './LocationQuadkeyHeatmapQuery/index.ts';
|
|
4
|
+
import type { LocationQuerySchema } from './LocationQuerySchema.ts';
|
|
5
|
+
import type { LocationTimeRangeQuery, LocationTimeRangeQuerySchema } from './LocationTimeRangeQuery/index.ts';
|
|
6
|
+
export interface LocationQueryCreationRequest<TSchema extends LocationQuerySchema = LocationQuerySchema, TQuery extends object = object> {
|
|
7
|
+
query: TQuery;
|
|
8
|
+
resultArchive: string;
|
|
9
|
+
resultArchivist: ApiConfig;
|
|
10
|
+
schema: TSchema;
|
|
11
|
+
sourceArchive: string;
|
|
12
|
+
sourceArchivist: ApiConfig;
|
|
13
|
+
}
|
|
14
|
+
export type LocationTimeRangeQueryCreationRequest = LocationQueryCreationRequest<LocationTimeRangeQuerySchema, LocationTimeRangeQuery>;
|
|
15
|
+
export type LocationHeatmapQueryCreationRequest = LocationQueryCreationRequest<LocationHeatmapQuerySchema, LocationHeatmapQuery>;
|
|
16
|
+
export type LocationQuadkeyHeatmapQueryCreationRequest = LocationQueryCreationRequest<LocationQuadkeyHeatmapQuerySchema, LocationQuadkeyHeatmapQuery>;
|
|
17
|
+
export type SupportedLocationQueryCreationRequest = LocationTimeRangeQueryCreationRequest | LocationHeatmapQueryCreationRequest | LocationQuadkeyHeatmapQueryCreationRequest;
|
|
18
|
+
//# sourceMappingURL=LocationQueryCreationRequest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocationQueryCreationRequest.d.ts","sourceRoot":"","sources":["../../../../src/LocationDiviner/Queries/LocationQueryCreationRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAExD,OAAO,KAAK,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAA;AACvG,OAAO,KAAK,EAAE,2BAA2B,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAA;AAC5H,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACnE,OAAO,KAAK,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAA;AAE7G,MAAM,WAAW,4BAA4B,CAC3C,OAAO,SAAS,mBAAmB,GAAG,mBAAmB,EACzD,MAAM,SAAS,MAAM,GAAG,MAAM;IAE9B,KAAK,EAAE,MAAM,CAAA;IACb,aAAa,EAAE,MAAM,CAAA;IACrB,eAAe,EAAE,SAAS,CAAA;IAC1B,MAAM,EAAE,OAAO,CAAA;IACf,aAAa,EAAE,MAAM,CAAA;IACrB,eAAe,EAAE,SAAS,CAAA;CAC3B;AAED,MAAM,MAAM,qCAAqC,GAAG,4BAA4B,CAAC,4BAA4B,EAAE,sBAAsB,CAAC,CAAA;AACtI,MAAM,MAAM,mCAAmC,GAAG,4BAA4B,CAAC,0BAA0B,EAAE,oBAAoB,CAAC,CAAA;AAEhI,MAAM,MAAM,0CAA0C,GAAG,4BAA4B,CAAC,iCAAiC,EAAE,2BAA2B,CAAC,CAAA;AAErJ,MAAM,MAAM,qCAAqC,GAC3C,qCAAqC,GACrC,mCAAmC,GACnC,0CAA0C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocationQueryCreationResponse.d.ts","sourceRoot":"","sources":["../../../../src/LocationDiviner/Queries/LocationQueryCreationResponse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAA;AAErF,MAAM,WAAW,6BAA8B,SAAQ,4BAA4B;IACjF,IAAI,EAAE,MAAM,CAAA;CACb"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Schema } from '@xyo-network/payload-model';
|
|
2
|
+
import type { LocationHeatmapQuerySchema } from './LocationHeatmapQuery/index.ts';
|
|
3
|
+
import type { LocationQuadkeyHeatmapQuerySchema } from './LocationQuadkeyHeatmapQuery/index.ts';
|
|
4
|
+
import type { LocationTimeRangeQuerySchema } from './LocationTimeRangeQuery/index.ts';
|
|
5
|
+
export type LocationQuerySchema = LocationQuadkeyHeatmapQuerySchema | LocationHeatmapQuerySchema | LocationTimeRangeQuerySchema;
|
|
6
|
+
export declare const isSupportedLocationQuerySchema: (schema: Schema) => schema is LocationQuerySchema;
|
|
7
|
+
//# sourceMappingURL=LocationQuerySchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocationQuerySchema.d.ts","sourceRoot":"","sources":["../../../../src/LocationDiviner/Queries/LocationQuerySchema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAExD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAA;AACjF,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAA;AAC/F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAA;AAErF,MAAM,MAAM,mBAAmB,GAAG,iCAAiC,GAAG,0BAA0B,GAAG,4BAA4B,CAAA;AAQ/H,eAAO,MAAM,8BAA8B,GAAI,QAAQ,MAAM,KAAG,MAAM,IAAI,mBAEzE,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { LocationWitnessSchema } from '../../Witnesses/index.ts';
|
|
2
|
+
export interface LocationTimeRangePointProperties {
|
|
3
|
+
_archive: string;
|
|
4
|
+
_client: string;
|
|
5
|
+
_timestamp: number;
|
|
6
|
+
schema: LocationWitnessSchema;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=LocationTimeRangePointProperties.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocationTimeRangePointProperties.d.ts","sourceRoot":"","sources":["../../../../../src/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAA;AAErE,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,qBAAqB,CAAA;CAC9B"}
|
package/dist/neutral/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LocationWitnessSchema } from '../../Witnesses/index.ts';
|
|
2
|
+
export declare const LocationTimeRangeQuerySchema: "network.xyo.location.range.query" & {
|
|
3
|
+
readonly __schema: true;
|
|
4
|
+
};
|
|
5
|
+
export type LocationTimeRangeQuerySchema = typeof LocationTimeRangeQuerySchema;
|
|
6
|
+
export declare const LocationTimeRangeAnswerSchema: "network.xyo.location.range.answer" & {
|
|
7
|
+
readonly __schema: true;
|
|
8
|
+
};
|
|
9
|
+
export type LocationTimeRangeAnswerSchema = typeof LocationTimeRangeAnswerSchema;
|
|
10
|
+
export interface LocationTimeRangeQuery {
|
|
11
|
+
schema: LocationWitnessSchema;
|
|
12
|
+
startTime?: string;
|
|
13
|
+
stopTime?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const isLocationTimeRangeQuery: boolean;
|
|
16
|
+
//# sourceMappingURL=LocationTimeRangeQuery.d.ts.map
|
package/dist/neutral/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocationTimeRangeQuery.d.ts","sourceRoot":"","sources":["../../../../../src/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAA;AAEhE,eAAO,MAAM,4BAA4B;;CAAqD,CAAA;AAC9F,MAAM,MAAM,4BAA4B,GAAG,OAAO,4BAA4B,CAAA;AAE9E,eAAO,MAAM,6BAA6B;;CAAsD,CAAA;AAChG,MAAM,MAAM,6BAA6B,GAAG,OAAO,6BAA6B,CAAA;AAEhF,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,qBAAqB,CAAA;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAGlB;AAED,eAAO,MAAM,wBAAwB,SAAqC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/LocationDiviner/Queries/LocationTimeRangeQuery/index.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAA;AACrD,cAAc,6BAA6B,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './LocationHeatmapQuery/index.ts';
|
|
2
|
+
export * from './LocationQuadkeyHeatmapQuery/index.ts';
|
|
3
|
+
export * from './LocationQueryCreationRequest.ts';
|
|
4
|
+
export * from './LocationQueryCreationResponse.ts';
|
|
5
|
+
export * from './LocationQuerySchema.ts';
|
|
6
|
+
export * from './LocationTimeRangeQuery/index.ts';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/LocationDiviner/Queries/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAA;AAC/C,cAAc,wCAAwC,CAAA;AACtD,cAAc,mCAAmC,CAAA;AACjD,cAAc,oCAAoC,CAAA;AAClD,cAAc,0BAA0B,CAAA;AACxC,cAAc,mCAAmC,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type Payload } from '@xyo-network/payload-model';
|
|
2
|
+
export declare const CurrentLocationWitnessSchema: "co.coinapp.currentlocationwitness" & {
|
|
3
|
+
readonly __schema: true;
|
|
4
|
+
};
|
|
5
|
+
export type CurrentLocationWitnessSchema = typeof CurrentLocationWitnessSchema;
|
|
6
|
+
export type CurrentLocationWitnessPayload = Payload<{
|
|
7
|
+
altitudeMeters: number;
|
|
8
|
+
directionDegrees: number;
|
|
9
|
+
latitude: number;
|
|
10
|
+
longitude: number;
|
|
11
|
+
quadkey: string;
|
|
12
|
+
schema: CurrentLocationWitnessSchema;
|
|
13
|
+
speedKph: number;
|
|
14
|
+
}>;
|
|
15
|
+
//# sourceMappingURL=CurrentLocationWitness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CurrentLocationWitness.d.ts","sourceRoot":"","sources":["../../../../src/LocationDiviner/Witnesses/CurrentLocationWitness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEnE,eAAO,MAAM,4BAA4B;;CAAsD,CAAA;AAC/F,MAAM,MAAM,4BAA4B,GAAG,OAAO,4BAA4B,CAAA;AAE9E,MAAM,MAAM,6BAA6B,GAAG,OAAO,CAAC;IAClD,cAAc,EAAE,MAAM,CAAA;IACtB,gBAAgB,EAAE,MAAM,CAAA;IACxB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,4BAA4B,CAAA;IACpC,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAC,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type Payload } from '@xyo-network/payload-model';
|
|
2
|
+
export declare const LocationWitnessSchema: "network.xyo.location" & {
|
|
3
|
+
readonly __schema: true;
|
|
4
|
+
};
|
|
5
|
+
export type LocationWitnessSchema = typeof LocationWitnessSchema;
|
|
6
|
+
export interface Coordinates {
|
|
7
|
+
accuracy: number | null;
|
|
8
|
+
altitude: number | null;
|
|
9
|
+
altitudeAccuracy: number | null;
|
|
10
|
+
heading: number | null;
|
|
11
|
+
latitude: number;
|
|
12
|
+
longitude: number;
|
|
13
|
+
speed: number | null;
|
|
14
|
+
}
|
|
15
|
+
export interface CurrentLocation {
|
|
16
|
+
coords: Coordinates;
|
|
17
|
+
timestamp: number;
|
|
18
|
+
}
|
|
19
|
+
export type LocationWitnessPayload = Payload<{
|
|
20
|
+
currentLocation: CurrentLocation;
|
|
21
|
+
schema: LocationWitnessSchema;
|
|
22
|
+
}>;
|
|
23
|
+
//# sourceMappingURL=LocationWitness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocationWitness.d.ts","sourceRoot":"","sources":["../../../../src/LocationDiviner/Witnesses/LocationWitness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEnE,eAAO,MAAM,qBAAqB;;CAAyC,CAAA;AAC3E,MAAM,MAAM,qBAAqB,GAAG,OAAO,qBAAqB,CAAA;AAEhE,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAA;IAC/B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CACrB;AACD,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,WAAW,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,MAAM,sBAAsB,GAAG,OAAO,CAAC;IAC3C,eAAe,EAAE,eAAe,CAAA;IAChC,MAAM,EAAE,qBAAqB,CAAA;CAC9B,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/LocationDiviner/Witnesses/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAA;AAC3C,cAAc,sBAAsB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/LocationDiviner/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,cAAc,aAAa,CAAA;AAC3B,cAAc,oBAAoB,CAAA;AAClC,cAAc,sBAAsB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../src/LocationDiviner/models.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACvC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;CAClB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ArchivistApi } from '@xyo-network/api';
|
|
2
|
+
import type { DivinerConfig } from '@xyo-network/diviner-model';
|
|
3
|
+
export declare const RemoteDivinerConfigSchema: "network.xyo.diviner.remote.config" & {
|
|
4
|
+
readonly __schema: true;
|
|
5
|
+
};
|
|
6
|
+
export type RemoteDivinerConfigSchema = typeof RemoteDivinerConfigSchema;
|
|
7
|
+
export type RemoteDivinerConfig = DivinerConfig & {
|
|
8
|
+
/** @deprecated use in params instead */
|
|
9
|
+
api?: ArchivistApi;
|
|
10
|
+
archive?: string;
|
|
11
|
+
schema: RemoteDivinerConfigSchema;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=RemoteDivinerConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RemoteDivinerConfig.d.ts","sourceRoot":"","sources":["../../src/RemoteDivinerConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAG/D,eAAO,MAAM,yBAAyB;;CAAsD,CAAA;AAC5F,MAAM,MAAM,yBAAyB,GAAG,OAAO,yBAAyB,CAAA;AAExE,MAAM,MAAM,mBAAmB,GAAG,aAAa,GAAG;IAChD,wCAAwC;IACxC,GAAG,CAAC,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,yBAAyB,CAAA;CAClC,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare class RemoteDivinerError extends Error {
|
|
2
|
+
isRemoteDivinerError: boolean;
|
|
3
|
+
constructor(action: string, error: Error['cause'], message?: string);
|
|
4
|
+
static isRemoteDivinerError(error: unknown): RemoteDivinerError | undefined;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=RemoteDivinerError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RemoteDivinerError.d.ts","sourceRoot":"","sources":["../../src/RemoteDivinerError.ts"],"names":[],"mappings":"AAEA,qBAAa,kBAAmB,SAAQ,KAAK;IAC3C,oBAAoB,UAAO;gBACf,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM;IAKnE,MAAM,CAAC,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB,GAAG,SAAS;CAG5E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA;AAC1C,cAAc,0BAA0B,CAAA;AACxC,cAAc,yBAAyB,CAAA"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
// src/LocationDiviner/LocationDivinerApi.ts
|
|
2
|
+
import { assertEx, fetchJsonClient } from "@xylabs/sdk-js";
|
|
3
|
+
var LocationDivinerApi = class {
|
|
4
|
+
config;
|
|
5
|
+
constructor(config) {
|
|
6
|
+
this.config = config;
|
|
7
|
+
}
|
|
8
|
+
async getLocationQuery(hash) {
|
|
9
|
+
const response = await fetchJsonClient.get(`${this.config.apiDomain}/location/query/${hash}`);
|
|
10
|
+
return assertEx(response.data?.data, () => "LocationDivinerApi.getLocationQuery: missing response data");
|
|
11
|
+
}
|
|
12
|
+
async postLocationQuery(request) {
|
|
13
|
+
const response = await fetchJsonClient.post(`${this.config.apiDomain}/location/query`, { ...request });
|
|
14
|
+
return assertEx(response.data?.data, () => "LocationDivinerApi.postLocationQuery: missing response data");
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
// src/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.ts
|
|
19
|
+
import { asSchema } from "@xyo-network/payload-model";
|
|
20
|
+
var LocationHeatmapQuerySchema = asSchema("network.xyo.location.heatmap.query", true);
|
|
21
|
+
var LocationHeatmapAnswerSchema = asSchema("network.xyo.location.heatmap.answer", true);
|
|
22
|
+
var isLocationHeatmapQuery = (query) => {
|
|
23
|
+
return typeof query === "object" && query !== null && "schema" in query && query.schema === LocationHeatmapQuerySchema;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
// src/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.ts
|
|
27
|
+
import { asSchema as asSchema2 } from "@xyo-network/payload-model";
|
|
28
|
+
var LocationQuadkeyHeatmapQuerySchema = asSchema2("network.xyo.location.heatmap.quadkey.query", true);
|
|
29
|
+
var LocationQuadkeyHeatmapAnswerSchema = asSchema2("network.xyo.location.heatmap.quadkey.answer", true);
|
|
30
|
+
var isLocationQuadkeyHeatmapQuery = (query) => {
|
|
31
|
+
return typeof query === "object" && query !== null && "schema" in query && query.schema === LocationQuadkeyHeatmapQuerySchema;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
// src/LocationDiviner/Queries/LocationQuerySchema.ts
|
|
35
|
+
var locationQuerySchemas = {
|
|
36
|
+
"network.xyo.location.heatmap.quadkey.query": true,
|
|
37
|
+
"network.xyo.location.heatmap.query": true,
|
|
38
|
+
"network.xyo.location.range.query": true
|
|
39
|
+
};
|
|
40
|
+
var isSupportedLocationQuerySchema = (schema) => {
|
|
41
|
+
return locationQuerySchemas[schema] || false;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
// src/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.ts
|
|
45
|
+
import { asSchema as asSchema5, isPayload } from "@xyo-network/payload-model";
|
|
46
|
+
|
|
47
|
+
// src/LocationDiviner/Witnesses/CurrentLocationWitness.ts
|
|
48
|
+
import { asSchema as asSchema3 } from "@xyo-network/payload-model";
|
|
49
|
+
var CurrentLocationWitnessSchema = asSchema3("co.coinapp.currentlocationwitness", true);
|
|
50
|
+
|
|
51
|
+
// src/LocationDiviner/Witnesses/LocationWitness.ts
|
|
52
|
+
import { asSchema as asSchema4 } from "@xyo-network/payload-model";
|
|
53
|
+
var LocationWitnessSchema = asSchema4("network.xyo.location", true);
|
|
54
|
+
|
|
55
|
+
// src/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.ts
|
|
56
|
+
var LocationTimeRangeQuerySchema = asSchema5("network.xyo.location.range.query", true);
|
|
57
|
+
var LocationTimeRangeAnswerSchema = asSchema5("network.xyo.location.range.answer", true);
|
|
58
|
+
var isLocationTimeRangeQuery = isPayload([LocationWitnessSchema]);
|
|
59
|
+
|
|
60
|
+
// src/RemoteDivinerConfig.ts
|
|
61
|
+
import { asSchema as asSchema6 } from "@xyo-network/payload-model";
|
|
62
|
+
var RemoteDivinerConfigSchema = asSchema6("network.xyo.diviner.remote.config", true);
|
|
63
|
+
|
|
64
|
+
// src/RemoteDivinerError.ts
|
|
65
|
+
import { isString } from "@xylabs/sdk-js";
|
|
66
|
+
var RemoteDivinerError = class extends Error {
|
|
67
|
+
isRemoteDivinerError = true;
|
|
68
|
+
constructor(action, error, message) {
|
|
69
|
+
const messageString = isString(message) ? ` (${message})` : "";
|
|
70
|
+
super(`Remote Diviner [${action}] failed${messageString}`, { cause: error });
|
|
71
|
+
}
|
|
72
|
+
static isRemoteDivinerError(error) {
|
|
73
|
+
return error.isRemoteDivinerError ? error : void 0;
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
export {
|
|
77
|
+
CurrentLocationWitnessSchema,
|
|
78
|
+
LocationDivinerApi,
|
|
79
|
+
LocationHeatmapAnswerSchema,
|
|
80
|
+
LocationHeatmapQuerySchema,
|
|
81
|
+
LocationQuadkeyHeatmapAnswerSchema,
|
|
82
|
+
LocationQuadkeyHeatmapQuerySchema,
|
|
83
|
+
LocationTimeRangeAnswerSchema,
|
|
84
|
+
LocationTimeRangeQuerySchema,
|
|
85
|
+
LocationWitnessSchema,
|
|
86
|
+
RemoteDivinerConfigSchema,
|
|
87
|
+
RemoteDivinerError,
|
|
88
|
+
isLocationHeatmapQuery,
|
|
89
|
+
isLocationQuadkeyHeatmapQuery,
|
|
90
|
+
isLocationTimeRangeQuery,
|
|
91
|
+
isSupportedLocationQuerySchema
|
|
92
|
+
};
|
|
93
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/LocationDiviner/LocationDivinerApi.ts","../../src/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.ts","../../src/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.ts","../../src/LocationDiviner/Queries/LocationQuerySchema.ts","../../src/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.ts","../../src/LocationDiviner/Witnesses/CurrentLocationWitness.ts","../../src/LocationDiviner/Witnesses/LocationWitness.ts","../../src/RemoteDivinerConfig.ts","../../src/RemoteDivinerError.ts"],"sourcesContent":["import { assertEx, fetchJsonClient } from '@xylabs/sdk-js'\nimport type { ApiConfig, ApiEnvelope } from '@xyo-network/api-models'\n\nimport type { GetLocationQueryResponse } from './models.ts'\nimport type { LocationQueryCreationResponse, SupportedLocationQueryCreationRequest } from './Queries/index.ts'\n\nclass LocationDivinerApi {\n config: ApiConfig\n constructor(config: ApiConfig) {\n this.config = config\n }\n\n async getLocationQuery(hash: string): Promise<GetLocationQueryResponse> {\n const response = await fetchJsonClient.get<ApiEnvelope<GetLocationQueryResponse>>(`${this.config.apiDomain}/location/query/${hash}`)\n return assertEx(response.data?.data, () => 'LocationDivinerApi.getLocationQuery: missing response data')\n }\n\n async postLocationQuery(request: SupportedLocationQueryCreationRequest): Promise<LocationQueryCreationResponse> {\n const response = await fetchJsonClient.post<ApiEnvelope<LocationQueryCreationResponse>>(`${this.config.apiDomain}/location/query`, { ...request })\n return assertEx(response.data?.data, () => 'LocationDivinerApi.postLocationQuery: missing response data')\n }\n}\n\nexport { LocationDivinerApi }\n","import { asSchema } from '@xyo-network/payload-model'\n\nimport type { LocationWitnessSchema } from '../../Witnesses/index.ts'\n\nexport const LocationHeatmapQuerySchema = asSchema('network.xyo.location.heatmap.query', true)\nexport type LocationHeatmapQuerySchema = typeof LocationHeatmapQuerySchema\n\nexport const LocationHeatmapAnswerSchema = asSchema('network.xyo.location.heatmap.answer', true)\nexport type LocationHeatmapAnswerSchema = typeof LocationHeatmapAnswerSchema\n\nexport interface LocationHeatmapQuery {\n schema: LocationWitnessSchema\n startTime?: string\n stopTime?: string\n}\n\nexport const isLocationHeatmapQuery = (query: unknown): query is LocationHeatmapQuery => {\n return typeof query === 'object' && query !== null && 'schema' in query && query.schema === LocationHeatmapQuerySchema\n}\n","import { asSchema } from '@xyo-network/payload-model'\n\nimport type { LocationWitnessSchema } from '../../Witnesses/index.ts'\n\nexport const LocationQuadkeyHeatmapQuerySchema = asSchema('network.xyo.location.heatmap.quadkey.query', true)\nexport type LocationQuadkeyHeatmapQuerySchema = typeof LocationQuadkeyHeatmapQuerySchema\n\nexport const LocationQuadkeyHeatmapAnswerSchema = asSchema('network.xyo.location.heatmap.quadkey.answer', true)\nexport type LocationQuadkeyHeatmapAnswerSchema = typeof LocationQuadkeyHeatmapAnswerSchema\n\nexport interface LocationQuadkeyHeatmapQuery {\n schema: LocationWitnessSchema\n startTime?: string\n stopTime?: string\n}\n\nexport const isLocationQuadkeyHeatmapQuery = (query: unknown): query is LocationQuadkeyHeatmapQuery => {\n return typeof query === 'object' && query !== null && 'schema' in query && query.schema === LocationQuadkeyHeatmapQuerySchema\n}\n","import type { Schema } from '@xyo-network/payload-model'\n\nimport type { LocationHeatmapQuerySchema } from './LocationHeatmapQuery/index.ts'\nimport type { LocationQuadkeyHeatmapQuerySchema } from './LocationQuadkeyHeatmapQuery/index.ts'\nimport type { LocationTimeRangeQuerySchema } from './LocationTimeRangeQuery/index.ts'\n\nexport type LocationQuerySchema = LocationQuadkeyHeatmapQuerySchema | LocationHeatmapQuerySchema | LocationTimeRangeQuerySchema\n\nconst locationQuerySchemas: Record<string, true> = {\n 'network.xyo.location.heatmap.quadkey.query': true,\n 'network.xyo.location.heatmap.query': true,\n 'network.xyo.location.range.query': true,\n}\n\nexport const isSupportedLocationQuerySchema = (schema: Schema): schema is LocationQuerySchema => {\n return locationQuerySchemas[schema as LocationQuerySchema] || false\n}\n","import { asSchema, isPayload } from '@xyo-network/payload-model'\n\nimport { LocationWitnessSchema } from '../../Witnesses/index.ts'\n\nexport const LocationTimeRangeQuerySchema = asSchema('network.xyo.location.range.query', true)\nexport type LocationTimeRangeQuerySchema = typeof LocationTimeRangeQuerySchema\n\nexport const LocationTimeRangeAnswerSchema = asSchema('network.xyo.location.range.answer', true)\nexport type LocationTimeRangeAnswerSchema = typeof LocationTimeRangeAnswerSchema\n\nexport interface LocationTimeRangeQuery {\n schema: LocationWitnessSchema\n startTime?: string\n stopTime?: string\n\n // TODO: Bounding rectangle, etc.\n}\n\nexport const isLocationTimeRangeQuery = isPayload([LocationWitnessSchema])\n","import { asSchema, type Payload } from '@xyo-network/payload-model'\n\nexport const CurrentLocationWitnessSchema = asSchema('co.coinapp.currentlocationwitness', true)\nexport type CurrentLocationWitnessSchema = typeof CurrentLocationWitnessSchema\n\nexport type CurrentLocationWitnessPayload = Payload<{\n altitudeMeters: number\n directionDegrees: number\n latitude: number\n longitude: number\n quadkey: string\n schema: CurrentLocationWitnessSchema\n speedKph: number\n}>\n","import { asSchema, type Payload } from '@xyo-network/payload-model'\n\nexport const LocationWitnessSchema = asSchema('network.xyo.location', true)\nexport type LocationWitnessSchema = typeof LocationWitnessSchema\n\nexport interface Coordinates {\n accuracy: number | null\n altitude: number | null\n altitudeAccuracy: number | null\n heading: number | null\n latitude: number\n longitude: number\n speed: number | null\n}\nexport interface CurrentLocation {\n coords: Coordinates\n timestamp: number\n}\n\nexport type LocationWitnessPayload = Payload<{\n currentLocation: CurrentLocation\n schema: LocationWitnessSchema\n}>\n","import type { ArchivistApi } from '@xyo-network/api'\nimport type { DivinerConfig } from '@xyo-network/diviner-model'\nimport { asSchema } from '@xyo-network/payload-model'\n\nexport const RemoteDivinerConfigSchema = asSchema('network.xyo.diviner.remote.config', true)\nexport type RemoteDivinerConfigSchema = typeof RemoteDivinerConfigSchema\n\nexport type RemoteDivinerConfig = DivinerConfig & {\n /** @deprecated use in params instead */\n api?: ArchivistApi\n archive?: string\n schema: RemoteDivinerConfigSchema\n}\n","import { isString } from '@xylabs/sdk-js'\n\nexport class RemoteDivinerError extends Error {\n isRemoteDivinerError = true\n constructor(action: string, error: Error['cause'], message?: string) {\n const messageString = isString(message) ? ` (${message})` : ''\n super(`Remote Diviner [${action}] failed${messageString}`, { cause: error })\n }\n\n static isRemoteDivinerError(error: unknown): RemoteDivinerError | undefined {\n return (error as RemoteDivinerError).isRemoteDivinerError ? (error as RemoteDivinerError) : undefined\n }\n}\n"],"mappings":";AAAA,SAAS,UAAU,uBAAuB;AAM1C,IAAM,qBAAN,MAAyB;AAAA,EACvB;AAAA,EACA,YAAY,QAAmB;AAC7B,SAAK,SAAS;AAAA,EAChB;AAAA,EAEA,MAAM,iBAAiB,MAAiD;AACtE,UAAM,WAAW,MAAM,gBAAgB,IAA2C,GAAG,KAAK,OAAO,SAAS,mBAAmB,IAAI,EAAE;AACnI,WAAO,SAAS,SAAS,MAAM,MAAM,MAAM,4DAA4D;AAAA,EACzG;AAAA,EAEA,MAAM,kBAAkB,SAAwF;AAC9G,UAAM,WAAW,MAAM,gBAAgB,KAAiD,GAAG,KAAK,OAAO,SAAS,mBAAmB,EAAE,GAAG,QAAQ,CAAC;AACjJ,WAAO,SAAS,SAAS,MAAM,MAAM,MAAM,6DAA6D;AAAA,EAC1G;AACF;;;ACrBA,SAAS,gBAAgB;AAIlB,IAAM,6BAA6B,SAAS,sCAAsC,IAAI;AAGtF,IAAM,8BAA8B,SAAS,uCAAuC,IAAI;AASxF,IAAM,yBAAyB,CAAC,UAAkD;AACvF,SAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,YAAY,SAAS,MAAM,WAAW;AAC9F;;;AClBA,SAAS,YAAAA,iBAAgB;AAIlB,IAAM,oCAAoCA,UAAS,8CAA8C,IAAI;AAGrG,IAAM,qCAAqCA,UAAS,+CAA+C,IAAI;AASvG,IAAM,gCAAgC,CAAC,UAAyD;AACrG,SAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,YAAY,SAAS,MAAM,WAAW;AAC9F;;;ACVA,IAAM,uBAA6C;AAAA,EACjD,8CAA8C;AAAA,EAC9C,sCAAsC;AAAA,EACtC,oCAAoC;AACtC;AAEO,IAAM,iCAAiC,CAAC,WAAkD;AAC/F,SAAO,qBAAqB,MAA6B,KAAK;AAChE;;;AChBA,SAAS,YAAAC,WAAU,iBAAiB;;;ACApC,SAAS,YAAAC,iBAA8B;AAEhC,IAAM,+BAA+BA,UAAS,qCAAqC,IAAI;;;ACF9F,SAAS,YAAAC,iBAA8B;AAEhC,IAAM,wBAAwBA,UAAS,wBAAwB,IAAI;;;AFEnE,IAAM,+BAA+BC,UAAS,oCAAoC,IAAI;AAGtF,IAAM,gCAAgCA,UAAS,qCAAqC,IAAI;AAWxF,IAAM,2BAA2B,UAAU,CAAC,qBAAqB,CAAC;;;AGhBzE,SAAS,YAAAC,iBAAgB;AAElB,IAAM,4BAA4BA,UAAS,qCAAqC,IAAI;;;ACJ3F,SAAS,gBAAgB;AAElB,IAAM,qBAAN,cAAiC,MAAM;AAAA,EAC5C,uBAAuB;AAAA,EACvB,YAAY,QAAgB,OAAuB,SAAkB;AACnE,UAAM,gBAAgB,SAAS,OAAO,IAAI,KAAK,OAAO,MAAM;AAC5D,UAAM,mBAAmB,MAAM,WAAW,aAAa,IAAI,EAAE,OAAO,MAAM,CAAC;AAAA,EAC7E;AAAA,EAEA,OAAO,qBAAqB,OAAgD;AAC1E,WAAQ,MAA6B,uBAAwB,QAA+B;AAAA,EAC9F;AACF;","names":["asSchema","asSchema","asSchema","asSchema","asSchema","asSchema"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@xyo-network/api-location-diviner",
|
|
3
|
+
"version": "5.4.0",
|
|
4
|
+
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
|
+
"homepage": "https://xyo.network",
|
|
6
|
+
"bugs": {
|
|
7
|
+
"url": "git+https://github.com/XYOracleNetwork/sdk-xyo-client-js/issues",
|
|
8
|
+
"email": "support@xyo.network"
|
|
9
|
+
},
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/XYOracleNetwork/sdk-xyo-client-js.git"
|
|
13
|
+
},
|
|
14
|
+
"license": "LGPL-3.0-only",
|
|
15
|
+
"author": {
|
|
16
|
+
"name": "XYO Development Team",
|
|
17
|
+
"email": "support@xyo.network",
|
|
18
|
+
"url": "https://xyo.network"
|
|
19
|
+
},
|
|
20
|
+
"sideEffects": false,
|
|
21
|
+
"type": "module",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"types": "./dist/neutral/index.d.ts",
|
|
25
|
+
"default": "./dist/neutral/index.mjs"
|
|
26
|
+
},
|
|
27
|
+
"./package.json": "./package.json"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"dist",
|
|
31
|
+
"!**/*.bench.*",
|
|
32
|
+
"!**/*.spec.*",
|
|
33
|
+
"!**/*.test.*",
|
|
34
|
+
"README.md"
|
|
35
|
+
],
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@xyo-network/api": "~5.4.0",
|
|
38
|
+
"@xyo-network/payload-model": "~5.4.0"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@opentelemetry/api": "^1.9.1",
|
|
42
|
+
"@xylabs/sdk-js": "^5.0.97",
|
|
43
|
+
"@xylabs/toolchain": "~7.10.8",
|
|
44
|
+
"@xylabs/tsconfig": "~7.10.8",
|
|
45
|
+
"@xylabs/vitest-extended": "~5.0.97",
|
|
46
|
+
"@xylabs/vitest-matchers": "~5.0.97",
|
|
47
|
+
"ethers": "^6",
|
|
48
|
+
"pako": "~2.1.0",
|
|
49
|
+
"typescript": "~5.9.3",
|
|
50
|
+
"vite": "^6.0.0 || ^7.0.0 || ^8.0.0",
|
|
51
|
+
"vitest": "~4.1.4",
|
|
52
|
+
"zod": "^4.3.6",
|
|
53
|
+
"@xyo-network/account-model": "~5.4.0",
|
|
54
|
+
"@xyo-network/api-models": "~5.4.0",
|
|
55
|
+
"@xyo-network/data": "~5.4.0",
|
|
56
|
+
"@xyo-network/elliptic": "~5.4.0",
|
|
57
|
+
"@xyo-network/diviner-model": "~5.4.0",
|
|
58
|
+
"@xyo-network/huri": "~5.4.0",
|
|
59
|
+
"@xyo-network/manifest-model": "~5.4.0",
|
|
60
|
+
"@xyo-network/module-model": "~5.4.0",
|
|
61
|
+
"@xyo-network/wasm": "~5.4.0",
|
|
62
|
+
"@xyo-network/previous-hash-store-model": "~5.4.0"
|
|
63
|
+
},
|
|
64
|
+
"peerDependencies": {
|
|
65
|
+
"@xylabs/sdk-js": "^5.0.97",
|
|
66
|
+
"@xyo-network/api-models": "~5.4",
|
|
67
|
+
"@xyo-network/diviner-model": "~5.4",
|
|
68
|
+
"@xyo-network/huri": "~5.4"
|
|
69
|
+
},
|
|
70
|
+
"publishConfig": {
|
|
71
|
+
"access": "public"
|
|
72
|
+
}
|
|
73
|
+
}
|