@xyo-network/api 2.99.2 → 2.99.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (209) hide show
  1. package/dist/neutral/Api/Api.d.cts +12 -0
  2. package/dist/neutral/Api/Api.d.cts.map +1 -0
  3. package/dist/neutral/Api/Api.d.mts +12 -0
  4. package/dist/neutral/Api/Api.d.mts.map +1 -0
  5. package/dist/neutral/Api/Api.d.ts +12 -0
  6. package/dist/neutral/Api/Api.d.ts.map +1 -0
  7. package/dist/neutral/Api/index.d.cts +2 -0
  8. package/dist/neutral/Api/index.d.cts.map +1 -0
  9. package/dist/neutral/Api/index.d.mts +2 -0
  10. package/dist/neutral/Api/index.d.mts.map +1 -0
  11. package/dist/neutral/Api/index.d.ts +2 -0
  12. package/dist/neutral/Api/index.d.ts.map +1 -0
  13. package/dist/neutral/Base.d.cts +32 -0
  14. package/dist/neutral/Base.d.cts.map +1 -0
  15. package/dist/neutral/Base.d.mts +32 -0
  16. package/dist/neutral/Base.d.mts.map +1 -0
  17. package/dist/neutral/Base.d.ts +32 -0
  18. package/dist/neutral/Base.d.ts.map +1 -0
  19. package/dist/neutral/Diviner/LocationDiviner/LocationDivinerApi.d.cts +12 -0
  20. package/dist/neutral/Diviner/LocationDiviner/LocationDivinerApi.d.cts.map +1 -0
  21. package/dist/neutral/Diviner/LocationDiviner/LocationDivinerApi.d.mts +12 -0
  22. package/dist/neutral/Diviner/LocationDiviner/LocationDivinerApi.d.mts.map +1 -0
  23. package/dist/neutral/Diviner/LocationDiviner/LocationDivinerApi.d.ts +12 -0
  24. package/dist/neutral/Diviner/LocationDiviner/LocationDivinerApi.d.ts.map +1 -0
  25. package/dist/neutral/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.d.cts +10 -0
  26. package/dist/neutral/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.d.cts.map +1 -0
  27. package/dist/neutral/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.d.mts +10 -0
  28. package/dist/neutral/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.d.mts.map +1 -0
  29. package/dist/neutral/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.d.ts +10 -0
  30. package/dist/neutral/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.d.ts.map +1 -0
  31. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.d.cts +5 -0
  32. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.d.cts.map +1 -0
  33. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.d.mts +5 -0
  34. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.d.mts.map +1 -0
  35. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.d.ts +5 -0
  36. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.d.ts.map +1 -0
  37. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.cts +12 -0
  38. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.cts.map +1 -0
  39. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.mts +12 -0
  40. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.mts.map +1 -0
  41. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.ts +12 -0
  42. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.ts.map +1 -0
  43. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.d.cts +3 -0
  44. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.d.cts.map +1 -0
  45. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.d.mts +3 -0
  46. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.d.mts.map +1 -0
  47. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.d.ts +3 -0
  48. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.d.ts.map +1 -0
  49. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.cts +12 -0
  50. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.cts.map +1 -0
  51. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.mts +12 -0
  52. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.mts.map +1 -0
  53. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.ts +12 -0
  54. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.ts.map +1 -0
  55. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.cts +2 -0
  56. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.cts.map +1 -0
  57. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.mts +2 -0
  58. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.mts.map +1 -0
  59. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.ts +2 -0
  60. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.ts.map +1 -0
  61. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.d.cts +18 -0
  62. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.d.cts.map +1 -0
  63. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.d.mts +18 -0
  64. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.d.mts.map +1 -0
  65. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.d.ts +18 -0
  66. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.d.ts.map +1 -0
  67. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.d.cts +5 -0
  68. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.d.cts.map +1 -0
  69. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.d.mts +5 -0
  70. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.d.mts.map +1 -0
  71. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.d.ts +5 -0
  72. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.d.ts.map +1 -0
  73. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQuerySchema.d.cts +6 -0
  74. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQuerySchema.d.cts.map +1 -0
  75. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQuerySchema.d.mts +6 -0
  76. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQuerySchema.d.mts.map +1 -0
  77. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQuerySchema.d.ts +6 -0
  78. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQuerySchema.d.ts.map +1 -0
  79. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.cts +8 -0
  80. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.cts.map +1 -0
  81. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.mts +8 -0
  82. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.mts.map +1 -0
  83. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.ts +8 -0
  84. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.ts.map +1 -0
  85. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.cts +12 -0
  86. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.cts.map +1 -0
  87. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.mts +12 -0
  88. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.mts.map +1 -0
  89. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.ts +12 -0
  90. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.ts.map +1 -0
  91. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.cts +3 -0
  92. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.cts.map +1 -0
  93. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.mts +3 -0
  94. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.mts.map +1 -0
  95. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.ts +3 -0
  96. package/dist/neutral/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.ts.map +1 -0
  97. package/dist/neutral/Diviner/LocationDiviner/Queries/index.d.cts +7 -0
  98. package/dist/neutral/Diviner/LocationDiviner/Queries/index.d.cts.map +1 -0
  99. package/dist/neutral/Diviner/LocationDiviner/Queries/index.d.mts +7 -0
  100. package/dist/neutral/Diviner/LocationDiviner/Queries/index.d.mts.map +1 -0
  101. package/dist/neutral/Diviner/LocationDiviner/Queries/index.d.ts +7 -0
  102. package/dist/neutral/Diviner/LocationDiviner/Queries/index.d.ts.map +1 -0
  103. package/dist/neutral/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.d.cts +13 -0
  104. package/dist/neutral/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.d.cts.map +1 -0
  105. package/dist/neutral/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.d.mts +13 -0
  106. package/dist/neutral/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.d.mts.map +1 -0
  107. package/dist/neutral/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.d.ts +13 -0
  108. package/dist/neutral/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.d.ts.map +1 -0
  109. package/dist/neutral/Diviner/LocationDiviner/Witnesses/LocationWitness.d.cts +21 -0
  110. package/dist/neutral/Diviner/LocationDiviner/Witnesses/LocationWitness.d.cts.map +1 -0
  111. package/dist/neutral/Diviner/LocationDiviner/Witnesses/LocationWitness.d.mts +21 -0
  112. package/dist/neutral/Diviner/LocationDiviner/Witnesses/LocationWitness.d.mts.map +1 -0
  113. package/dist/neutral/Diviner/LocationDiviner/Witnesses/LocationWitness.d.ts +21 -0
  114. package/dist/neutral/Diviner/LocationDiviner/Witnesses/LocationWitness.d.ts.map +1 -0
  115. package/dist/neutral/Diviner/LocationDiviner/Witnesses/index.d.cts +3 -0
  116. package/dist/neutral/Diviner/LocationDiviner/Witnesses/index.d.cts.map +1 -0
  117. package/dist/neutral/Diviner/LocationDiviner/Witnesses/index.d.mts +3 -0
  118. package/dist/neutral/Diviner/LocationDiviner/Witnesses/index.d.mts.map +1 -0
  119. package/dist/neutral/Diviner/LocationDiviner/Witnesses/index.d.ts +3 -0
  120. package/dist/neutral/Diviner/LocationDiviner/Witnesses/index.d.ts.map +1 -0
  121. package/dist/neutral/Diviner/LocationDiviner/index.d.cts +5 -0
  122. package/dist/neutral/Diviner/LocationDiviner/index.d.cts.map +1 -0
  123. package/dist/neutral/Diviner/LocationDiviner/index.d.mts +5 -0
  124. package/dist/neutral/Diviner/LocationDiviner/index.d.mts.map +1 -0
  125. package/dist/neutral/Diviner/LocationDiviner/index.d.ts +5 -0
  126. package/dist/neutral/Diviner/LocationDiviner/index.d.ts.map +1 -0
  127. package/dist/neutral/Diviner/LocationDiviner/models.d.cts +5 -0
  128. package/dist/neutral/Diviner/LocationDiviner/models.d.cts.map +1 -0
  129. package/dist/neutral/Diviner/LocationDiviner/models.d.mts +5 -0
  130. package/dist/neutral/Diviner/LocationDiviner/models.d.mts.map +1 -0
  131. package/dist/neutral/Diviner/LocationDiviner/models.d.ts +5 -0
  132. package/dist/neutral/Diviner/LocationDiviner/models.d.ts.map +1 -0
  133. package/dist/neutral/Diviner/RemoteDivinerConfig.d.cts +11 -0
  134. package/dist/neutral/Diviner/RemoteDivinerConfig.d.cts.map +1 -0
  135. package/dist/neutral/Diviner/RemoteDivinerConfig.d.mts +11 -0
  136. package/dist/neutral/Diviner/RemoteDivinerConfig.d.mts.map +1 -0
  137. package/dist/neutral/Diviner/RemoteDivinerConfig.d.ts +11 -0
  138. package/dist/neutral/Diviner/RemoteDivinerConfig.d.ts.map +1 -0
  139. package/dist/neutral/Diviner/RemoteDivinerError.d.cts +6 -0
  140. package/dist/neutral/Diviner/RemoteDivinerError.d.cts.map +1 -0
  141. package/dist/neutral/Diviner/RemoteDivinerError.d.mts +6 -0
  142. package/dist/neutral/Diviner/RemoteDivinerError.d.mts.map +1 -0
  143. package/dist/neutral/Diviner/RemoteDivinerError.d.ts +6 -0
  144. package/dist/neutral/Diviner/RemoteDivinerError.d.ts.map +1 -0
  145. package/dist/neutral/Diviner/index.d.cts +3 -0
  146. package/dist/neutral/Diviner/index.d.cts.map +1 -0
  147. package/dist/neutral/Diviner/index.d.mts +3 -0
  148. package/dist/neutral/Diviner/index.d.mts.map +1 -0
  149. package/dist/neutral/Diviner/index.d.ts +3 -0
  150. package/dist/neutral/Diviner/index.d.ts.map +1 -0
  151. package/dist/neutral/Simple.d.cts +22 -0
  152. package/dist/neutral/Simple.d.cts.map +1 -0
  153. package/dist/neutral/Simple.d.mts +22 -0
  154. package/dist/neutral/Simple.d.mts.map +1 -0
  155. package/dist/neutral/Simple.d.ts +22 -0
  156. package/dist/neutral/Simple.d.ts.map +1 -0
  157. package/dist/neutral/Test/index.d.cts +3 -0
  158. package/dist/neutral/Test/index.d.cts.map +1 -0
  159. package/dist/neutral/Test/index.d.mts +3 -0
  160. package/dist/neutral/Test/index.d.mts.map +1 -0
  161. package/dist/neutral/Test/index.d.ts +3 -0
  162. package/dist/neutral/Test/index.d.ts.map +1 -0
  163. package/dist/neutral/Test/testBoundWitness.d.cts +4 -0
  164. package/dist/neutral/Test/testBoundWitness.d.cts.map +1 -0
  165. package/dist/neutral/Test/testBoundWitness.d.mts +4 -0
  166. package/dist/neutral/Test/testBoundWitness.d.mts.map +1 -0
  167. package/dist/neutral/Test/testBoundWitness.d.ts +4 -0
  168. package/dist/neutral/Test/testBoundWitness.d.ts.map +1 -0
  169. package/dist/neutral/Test/testPayload.d.cts +6 -0
  170. package/dist/neutral/Test/testPayload.d.cts.map +1 -0
  171. package/dist/neutral/Test/testPayload.d.mts +6 -0
  172. package/dist/neutral/Test/testPayload.d.mts.map +1 -0
  173. package/dist/neutral/Test/testPayload.d.ts +6 -0
  174. package/dist/neutral/Test/testPayload.d.ts.map +1 -0
  175. package/dist/neutral/WithArchive.d.cts +4 -0
  176. package/dist/neutral/WithArchive.d.cts.map +1 -0
  177. package/dist/neutral/WithArchive.d.mts +4 -0
  178. package/dist/neutral/WithArchive.d.mts.map +1 -0
  179. package/dist/neutral/WithArchive.d.ts +4 -0
  180. package/dist/neutral/WithArchive.d.ts.map +1 -0
  181. package/dist/neutral/index.cjs +316 -0
  182. package/dist/neutral/index.cjs.map +1 -0
  183. package/dist/neutral/index.d.cts +7 -0
  184. package/dist/neutral/index.d.cts.map +1 -0
  185. package/dist/neutral/index.d.mts +7 -0
  186. package/dist/neutral/index.d.mts.map +1 -0
  187. package/dist/neutral/index.d.ts +7 -0
  188. package/dist/neutral/index.d.ts.map +1 -0
  189. package/dist/neutral/index.js +295 -0
  190. package/dist/neutral/index.js.map +1 -0
  191. package/dist/neutral/models/ArchivePath.d.cts +4 -0
  192. package/dist/neutral/models/ArchivePath.d.cts.map +1 -0
  193. package/dist/neutral/models/ArchivePath.d.mts +4 -0
  194. package/dist/neutral/models/ArchivePath.d.mts.map +1 -0
  195. package/dist/neutral/models/ArchivePath.d.ts +4 -0
  196. package/dist/neutral/models/ArchivePath.d.ts.map +1 -0
  197. package/dist/neutral/models/index.d.cts +2 -0
  198. package/dist/neutral/models/index.d.cts.map +1 -0
  199. package/dist/neutral/models/index.d.mts +2 -0
  200. package/dist/neutral/models/index.d.mts.map +1 -0
  201. package/dist/neutral/models/index.d.ts +2 -0
  202. package/dist/neutral/models/index.d.ts.map +1 -0
  203. package/dist/neutral/objToQuery.d.cts +2 -0
  204. package/dist/neutral/objToQuery.d.cts.map +1 -0
  205. package/dist/neutral/objToQuery.d.mts +2 -0
  206. package/dist/neutral/objToQuery.d.mts.map +1 -0
  207. package/dist/neutral/objToQuery.d.ts +2 -0
  208. package/dist/neutral/objToQuery.d.ts.map +1 -0
  209. package/package.json +13 -13
@@ -0,0 +1,22 @@
1
+ import { ApiConfig, ApiResponseBody, ApiResponseTuple } from '@xyo-network/api-models';
2
+ import { Payload, PayloadFindFilter } from '@xyo-network/payload-model';
3
+ import { ApiBase } from './Base';
4
+ export type ApiSimpleQuery = PayloadFindFilter;
5
+ export declare class ApiSimple<T = Payload, D = T, Q extends ApiSimpleQuery = ApiSimpleQuery, C extends ApiConfig = ApiConfig> extends ApiBase<C> {
6
+ delete(): Promise<ApiResponseBody<T>>;
7
+ delete(responseType?: 'body'): Promise<ApiResponseBody<T>>;
8
+ delete(responseType?: 'tuple'): Promise<ApiResponseTuple<T>>;
9
+ find(query?: Q): Promise<ApiResponseBody<T>>;
10
+ find(query?: Q, responseType?: 'body'): Promise<ApiResponseBody<T>>;
11
+ find(query?: Q, responseType?: 'tuple'): Promise<ApiResponseTuple<T>>;
12
+ get(): Promise<ApiResponseBody<T>>;
13
+ get(responseType?: 'body'): Promise<ApiResponseBody<T>>;
14
+ get(responseType?: 'tuple'): Promise<ApiResponseTuple<T>>;
15
+ post(data?: D): Promise<ApiResponseBody<T>>;
16
+ post(data?: D, responseType?: 'body'): Promise<ApiResponseBody<T>>;
17
+ post(data?: D, responseType?: 'tuple'): Promise<ApiResponseTuple<T>>;
18
+ put(data?: D): Promise<ApiResponseBody<T>>;
19
+ put(data?: D, responseType?: 'body'): Promise<ApiResponseBody<T>>;
20
+ put(data?: D, responseType?: 'tuple'): Promise<ApiResponseTuple<T>>;
21
+ }
22
+ //# sourceMappingURL=Simple.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Simple.d.ts","sourceRoot":"","sources":["../../src/Simple.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,gBAAgB,EAA2C,MAAM,yBAAyB,CAAA;AAC/H,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAEvE,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAGhC,MAAM,MAAM,cAAc,GAAG,iBAAiB,CAAA;AAE9C,qBAAa,SAAS,CAAC,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,SAAS,cAAc,GAAG,cAAc,EAAE,CAAC,SAAS,SAAS,GAAG,SAAS,CAAE,SAAQ,OAAO,CAAC,CAA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Ae,CAAC,CAAC,CAAC,CAAC;IAC1C,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IACjE,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,YAAY,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;CAW1E"}
@@ -0,0 +1,22 @@
1
+ import { ApiConfig, ApiResponseBody, ApiResponseTuple } from '@xyo-network/api-models';
2
+ import { Payload, PayloadFindFilter } from '@xyo-network/payload-model';
3
+ import { ApiBase } from './Base';
4
+ export type ApiSimpleQuery = PayloadFindFilter;
5
+ export declare class ApiSimple<T = Payload, D = T, Q extends ApiSimpleQuery = ApiSimpleQuery, C extends ApiConfig = ApiConfig> extends ApiBase<C> {
6
+ delete(): Promise<ApiResponseBody<T>>;
7
+ delete(responseType?: 'body'): Promise<ApiResponseBody<T>>;
8
+ delete(responseType?: 'tuple'): Promise<ApiResponseTuple<T>>;
9
+ find(query?: Q): Promise<ApiResponseBody<T>>;
10
+ find(query?: Q, responseType?: 'body'): Promise<ApiResponseBody<T>>;
11
+ find(query?: Q, responseType?: 'tuple'): Promise<ApiResponseTuple<T>>;
12
+ get(): Promise<ApiResponseBody<T>>;
13
+ get(responseType?: 'body'): Promise<ApiResponseBody<T>>;
14
+ get(responseType?: 'tuple'): Promise<ApiResponseTuple<T>>;
15
+ post(data?: D): Promise<ApiResponseBody<T>>;
16
+ post(data?: D, responseType?: 'body'): Promise<ApiResponseBody<T>>;
17
+ post(data?: D, responseType?: 'tuple'): Promise<ApiResponseTuple<T>>;
18
+ put(data?: D): Promise<ApiResponseBody<T>>;
19
+ put(data?: D, responseType?: 'body'): Promise<ApiResponseBody<T>>;
20
+ put(data?: D, responseType?: 'tuple'): Promise<ApiResponseTuple<T>>;
21
+ }
22
+ //# sourceMappingURL=Simple.d.ts.map
@@ -0,0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vD,GAAG,CAAC,YAAY,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;IAYzD,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IAC3C,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IAClE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,YAAY,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;IAYpE,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IAC1C,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IACjE,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,YAAY,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;CAW1E"}
@@ -0,0 +1,22 @@
1
+ import { ApiConfig, ApiResponseBody, ApiResponseTuple } from '@xyo-network/api-models';
2
+ import { Payload, PayloadFindFilter } from '@xyo-network/payload-model';
3
+ import { ApiBase } from './Base';
4
+ export type ApiSimpleQuery = PayloadFindFilter;
5
+ export declare class ApiSimple<T = Payload, D = T, Q extends ApiSimpleQuery = ApiSimpleQuery, C extends ApiConfig = ApiConfig> extends ApiBase<C> {
6
+ delete(): Promise<ApiResponseBody<T>>;
7
+ delete(responseType?: 'body'): Promise<ApiResponseBody<T>>;
8
+ delete(responseType?: 'tuple'): Promise<ApiResponseTuple<T>>;
9
+ find(query?: Q): Promise<ApiResponseBody<T>>;
10
+ find(query?: Q, responseType?: 'body'): Promise<ApiResponseBody<T>>;
11
+ find(query?: Q, responseType?: 'tuple'): Promise<ApiResponseTuple<T>>;
12
+ get(): Promise<ApiResponseBody<T>>;
13
+ get(responseType?: 'body'): Promise<ApiResponseBody<T>>;
14
+ get(responseType?: 'tuple'): Promise<ApiResponseTuple<T>>;
15
+ post(data?: D): Promise<ApiResponseBody<T>>;
16
+ post(data?: D, responseType?: 'body'): Promise<ApiResponseBody<T>>;
17
+ post(data?: D, responseType?: 'tuple'): Promise<ApiResponseTuple<T>>;
18
+ put(data?: D): Promise<ApiResponseBody<T>>;
19
+ put(data?: D, responseType?: 'body'): Promise<ApiResponseBody<T>>;
20
+ put(data?: D, responseType?: 'tuple'): Promise<ApiResponseTuple<T>>;
21
+ }
22
+ //# sourceMappingURL=Simple.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Simple.d.ts","sourceRoot":"","sources":["../../src/Simple.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,gBAAgB,EAA2C,MAAM,yBAAyB,CAAA;AAC/H,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAEvE,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAGhC,MAAM,MAAM,cAAc,GAAG,iBAAiB,CAAA;AAE9C,qBAAa,SAAS,CAAC,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,SAAS,cAAc,GAAG,cAAc,EAAE,CAAC,SAAS,SAAS,GAAG,SAAS,CAAE,SAAQ,OAAO,CAAC,CAAC,CAAC;IACjI,MAAM,IAAI,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IACrC,MAAM,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IAC1D,MAAM,CAAC,YAAY,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;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,CAAC,CAAC,CAAC;CAW1E"}
@@ -0,0 +1,3 @@
1
+ export * from './testBoundWitness';
2
+ export * from './testPayload';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Test/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from './testBoundWitness';
2
+ export * from './testPayload';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Test/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from './testBoundWitness';
2
+ export * from './testPayload';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Test/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA"}
@@ -0,0 +1,4 @@
1
+ import { BoundWitness } from '@xyo-network/boundwitness-model';
2
+ declare const testBoundWitness: BoundWitness;
3
+ export { testBoundWitness };
4
+ //# sourceMappingURL=testBoundWitness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"testBoundWitness.d.ts","sourceRoot":"","sources":["../../../src/Test/testBoundWitness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAsB,MAAM,iCAAiC,CAAA;AAElF,QAAA,MAAM,gBAAgB,EAAE,YASP,CAAA;AAEjB,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
@@ -0,0 +1,4 @@
1
+ import { BoundWitness } from '@xyo-network/boundwitness-model';
2
+ declare const testBoundWitness: BoundWitness;
3
+ export { testBoundWitness };
4
+ //# sourceMappingURL=testBoundWitness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"testBoundWitness.d.ts","sourceRoot":"","sources":["../../../src/Test/testBoundWitness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAsB,MAAM,iCAAiC,CAAA;AAElF,QAAA,MAAM,gBAAgB,EAAE,YASP,CAAA;AAEjB,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
@@ -0,0 +1,4 @@
1
+ import { BoundWitness } from '@xyo-network/boundwitness-model';
2
+ declare const testBoundWitness: BoundWitness;
3
+ export { testBoundWitness };
4
+ //# sourceMappingURL=testBoundWitness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"testBoundWitness.d.ts","sourceRoot":"","sources":["../../../src/Test/testBoundWitness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAsB,MAAM,iCAAiC,CAAA;AAElF,QAAA,MAAM,gBAAgB,EAAE,YASP,CAAA;AAEjB,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
@@ -0,0 +1,6 @@
1
+ import { StringKeyObject } from '@xylabs/object';
2
+ import { Payload } from '@xyo-network/payload-model';
3
+ declare const testSchema = "network.xyo.test";
4
+ declare const testPayload: Payload<StringKeyObject>;
5
+ export { testPayload, testSchema };
6
+ //# sourceMappingURL=testPayload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"testPayload.d.ts","sourceRoot":"","sources":["../../../src/Test/testPayload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,QAAA,MAAM,UAAU,qBAAqB,CAAA;AACrC,QAAA,MAAM,WAAW,EAAE,OAAO,CAAC,eAAe,CAUzC,CAAA;AAED,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,CAAA"}
@@ -0,0 +1,6 @@
1
+ import { StringKeyObject } from '@xylabs/object';
2
+ import { Payload } from '@xyo-network/payload-model';
3
+ declare const testSchema = "network.xyo.test";
4
+ declare const testPayload: Payload<StringKeyObject>;
5
+ export { testPayload, testSchema };
6
+ //# sourceMappingURL=testPayload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"testPayload.d.ts","sourceRoot":"","sources":["../../../src/Test/testPayload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,QAAA,MAAM,UAAU,qBAAqB,CAAA;AACrC,QAAA,MAAM,WAAW,EAAE,OAAO,CAAC,eAAe,CAUzC,CAAA;AAED,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,CAAA"}
@@ -0,0 +1,6 @@
1
+ import { StringKeyObject } from '@xylabs/object';
2
+ import { Payload } from '@xyo-network/payload-model';
3
+ declare const testSchema = "network.xyo.test";
4
+ declare const testPayload: Payload<StringKeyObject>;
5
+ export { testPayload, testSchema };
6
+ //# sourceMappingURL=testPayload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"testPayload.d.ts","sourceRoot":"","sources":["../../../src/Test/testPayload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,QAAA,MAAM,UAAU,qBAAqB,CAAA;AACrC,QAAA,MAAM,WAAW,EAAE,OAAO,CAAC,eAAe,CAUzC,CAAA;AAED,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,CAAA"}
@@ -0,0 +1,4 @@
1
+ export declare type WithArchive<ArchivistApiConfig> = ArchivistApiConfig & {
2
+ _archive?: string;
3
+ };
4
+ //# sourceMappingURL=WithArchive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WithArchive.d.ts","sourceRoot":"","sources":["../../src/WithArchive.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,MAAM,WAAW,CAAC,kBAAkB,IAAI,kBAAkB,GAAG;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA"}
@@ -0,0 +1,4 @@
1
+ export declare type WithArchive<ArchivistApiConfig> = ArchivistApiConfig & {
2
+ _archive?: string;
3
+ };
4
+ //# sourceMappingURL=WithArchive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WithArchive.d.ts","sourceRoot":"","sources":["../../src/WithArchive.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,MAAM,WAAW,CAAC,kBAAkB,IAAI,kBAAkB,GAAG;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA"}
@@ -0,0 +1,4 @@
1
+ export declare type WithArchive<ArchivistApiConfig> = ArchivistApiConfig & {
2
+ _archive?: string;
3
+ };
4
+ //# sourceMappingURL=WithArchive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WithArchive.d.ts","sourceRoot":"","sources":["../../src/WithArchive.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,MAAM,WAAW,CAAC,kBAAkB,IAAI,kBAAkB,GAAG;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA"}
@@ -0,0 +1,316 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/index.ts
22
+ var src_exports = {};
23
+ __export(src_exports, {
24
+ ApiBase: () => ApiBase,
25
+ ApiSimple: () => ApiSimple,
26
+ ArchivistApi: () => ArchivistApi,
27
+ CurrentLocationWitnessSchema: () => CurrentLocationWitnessSchema,
28
+ LocationDivinerApi: () => LocationDivinerApi,
29
+ LocationTimeRangeAnswerSchema: () => LocationTimeRangeAnswerSchema,
30
+ LocationTimeRangeQuerySchema: () => LocationTimeRangeQuerySchema,
31
+ LocationWitnessSchema: () => LocationWitnessSchema,
32
+ RemoteDivinerConfigSchema: () => RemoteDivinerConfigSchema,
33
+ isLocationHeatmapQuery: () => isLocationHeatmapQuery,
34
+ isLocationQuadkeyHeatmapQuery: () => isLocationQuadkeyHeatmapQuery,
35
+ isLocationTimeRangeQuery: () => isLocationTimeRangeQuery,
36
+ isSupportedLocationQuerySchema: () => isSupportedLocationQuerySchema,
37
+ locationHeatmapAnswerSchema: () => locationHeatmapAnswerSchema,
38
+ locationHeatmapQuerySchema: () => locationHeatmapQuerySchema,
39
+ locationQuadkeyHeatmapAnswerSchema: () => locationQuadkeyHeatmapAnswerSchema,
40
+ locationQuadkeyHeatmapQuerySchema: () => locationQuadkeyHeatmapQuerySchema
41
+ });
42
+ module.exports = __toCommonJS(src_exports);
43
+
44
+ // src/Api/Api.ts
45
+ var import_huri = require("@xyo-network/huri");
46
+
47
+ // src/Base.ts
48
+ var import_axios = require("@xylabs/axios");
49
+ var ApiBase = class _ApiBase {
50
+ static {
51
+ __name(this, "ApiBase");
52
+ }
53
+ config;
54
+ axios;
55
+ constructor(config) {
56
+ this.config = config;
57
+ this.axios = new import_axios.AxiosJson({
58
+ ...this.config,
59
+ headers: this.headers
60
+ });
61
+ }
62
+ get authenticated() {
63
+ return !!this.config.apiKey || !!this.config.jwtToken;
64
+ }
65
+ get headers() {
66
+ const headers = {};
67
+ if (this.config.jwtToken) {
68
+ headers.Authorization = `Bearer ${this.config.jwtToken}`;
69
+ }
70
+ if (this.config.apiKey) {
71
+ headers["x-api-key"] = this.config.apiKey;
72
+ }
73
+ return headers;
74
+ }
75
+ get query() {
76
+ return this.config.query ?? "";
77
+ }
78
+ get root() {
79
+ return this.config.root ?? "/";
80
+ }
81
+ static resolveResponse(result) {
82
+ return [
83
+ result?.data?.data,
84
+ result?.data,
85
+ result
86
+ ];
87
+ }
88
+ static shapeResponse(response, responseType) {
89
+ const resolvedResponse = _ApiBase.resolveResponse(response);
90
+ return responseType === "tuple" ? resolvedResponse : resolvedResponse[0];
91
+ }
92
+ onError(error, depth = 0) {
93
+ this.config.reportableParent?.onError?.(error, depth + 1);
94
+ this.config.onError?.(error, depth);
95
+ }
96
+ onFailure(response, depth = 0) {
97
+ this.config.reportableParent?.onFailure?.(response, depth + 1);
98
+ this.config.onFailure?.(response, depth);
99
+ }
100
+ onSuccess(response, depth = 0) {
101
+ this.config.reportableParent?.onSuccess?.(response, depth + 1);
102
+ this.config.onSuccess?.(response, depth);
103
+ }
104
+ async deleteEndpoint(endPoint = "", responseType) {
105
+ const response = await this.monitorResponse(async () => {
106
+ return await this.axios.delete(`${this.resolveRoot()}${endPoint}${this.query}`);
107
+ });
108
+ return _ApiBase.shapeResponse(response, responseType);
109
+ }
110
+ async getEndpoint(endPoint = "", responseType) {
111
+ const response = await this.monitorResponse(async () => {
112
+ return await this.axios.get(`${this.resolveRoot()}${endPoint}${this.query}`);
113
+ });
114
+ return _ApiBase.shapeResponse(response, responseType);
115
+ }
116
+ handleMonitorResponseError(error, trapAxiosException) {
117
+ if (!error.isError) {
118
+ throw error;
119
+ }
120
+ if (trapAxiosException) {
121
+ error.response ? this.onFailure(error.response) : this.onError(error);
122
+ if (this.config.throwFailure) {
123
+ throw error;
124
+ }
125
+ return error.response;
126
+ }
127
+ }
128
+ async monitorResponse(closure) {
129
+ let trapAxiosException = true;
130
+ try {
131
+ const response = await closure();
132
+ trapAxiosException = false;
133
+ response.status < 300 ? this.onSuccess(response) : this.onFailure(response);
134
+ return response;
135
+ } catch (error) {
136
+ this.handleMonitorResponseError(error, trapAxiosException);
137
+ }
138
+ }
139
+ async postEndpoint(endPoint = "", data, responseType) {
140
+ const response = await this.monitorResponse(async () => {
141
+ return await this.axios.post(`${this.resolveRoot()}${endPoint}${this.query}`, data);
142
+ });
143
+ return _ApiBase.shapeResponse(response, responseType);
144
+ }
145
+ async putEndpoint(endPoint = "", data, responseType) {
146
+ const response = await this.monitorResponse(async () => {
147
+ return await this.axios.put(`${this.resolveRoot()}${endPoint}${this.query}`, data);
148
+ });
149
+ return _ApiBase.shapeResponse(response, responseType);
150
+ }
151
+ resolveRoot() {
152
+ return `${this.config.apiDomain}${this.root}`;
153
+ }
154
+ };
155
+
156
+ // src/objToQuery.ts
157
+ var objToQuery = /* @__PURE__ */ __name((obj) => {
158
+ return `?${Object.entries(obj).map(([key, value]) => {
159
+ return `${key}=${value}`;
160
+ }).filter((value) => value !== void 0).join("&")}`;
161
+ }, "objToQuery");
162
+
163
+ // src/Simple.ts
164
+ var ApiSimple = class extends ApiBase {
165
+ static {
166
+ __name(this, "ApiSimple");
167
+ }
168
+ async delete(responseType) {
169
+ switch (responseType) {
170
+ case "tuple": {
171
+ return await this.deleteEndpoint(void 0, "tuple");
172
+ }
173
+ default: {
174
+ return await this.deleteEndpoint();
175
+ }
176
+ }
177
+ }
178
+ async find(query = {}, responseType) {
179
+ switch (responseType) {
180
+ case "tuple": {
181
+ return await this.getEndpoint(objToQuery(query), "tuple");
182
+ }
183
+ default: {
184
+ return await this.getEndpoint(objToQuery(query));
185
+ }
186
+ }
187
+ }
188
+ async get(responseType) {
189
+ switch (responseType) {
190
+ case "tuple": {
191
+ return await this.getEndpoint(void 0, "tuple");
192
+ }
193
+ default: {
194
+ return await this.getEndpoint();
195
+ }
196
+ }
197
+ }
198
+ async post(data, responseType) {
199
+ switch (responseType) {
200
+ case "tuple": {
201
+ return await this.postEndpoint(void 0, data, "tuple");
202
+ }
203
+ default: {
204
+ return await this.postEndpoint(void 0, data);
205
+ }
206
+ }
207
+ }
208
+ async put(data, responseType) {
209
+ switch (responseType) {
210
+ case "tuple": {
211
+ return await this.putEndpoint(void 0, data, "tuple");
212
+ }
213
+ default: {
214
+ return await this.putEndpoint(void 0, data);
215
+ }
216
+ }
217
+ }
218
+ };
219
+
220
+ // src/Api/Api.ts
221
+ var ArchivistApi = class extends ApiSimple {
222
+ static {
223
+ __name(this, "ArchivistApi");
224
+ }
225
+ huri(huri) {
226
+ const huriObj = typeof huri === "string" ? new import_huri.Huri(huri) : huri;
227
+ return new ApiSimple({
228
+ ...this.config,
229
+ root: `${this.root}${huriObj.href}/`
230
+ });
231
+ }
232
+ };
233
+
234
+ // src/Diviner/LocationDiviner/LocationDivinerApi.ts
235
+ var import_axios3 = require("@xylabs/axios");
236
+
237
+ // src/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.ts
238
+ var import_axios2 = require("@xylabs/axios");
239
+ var locationDivinerApiResponseTransformer = /* @__PURE__ */ __name((data, _headers) => {
240
+ return data.data;
241
+ }, "locationDivinerApiResponseTransformer");
242
+ var getLocationDivinerApiResponseTransformer = /* @__PURE__ */ __name((axiosInstance = import_axios2.axios) => {
243
+ return axiosInstance.defaults.transformResponse ? [
244
+ ...Array.isArray(axiosInstance.defaults.transformResponse) ? axiosInstance.defaults.transformResponse : [
245
+ axiosInstance.defaults.transformResponse
246
+ ],
247
+ locationDivinerApiResponseTransformer
248
+ ] : [
249
+ locationDivinerApiResponseTransformer
250
+ ];
251
+ }, "getLocationDivinerApiResponseTransformer");
252
+
253
+ // src/Diviner/LocationDiviner/LocationDivinerApi.ts
254
+ var LocationDivinerApi = class LocationDivinerApi2 {
255
+ static {
256
+ __name(this, "LocationDivinerApi");
257
+ }
258
+ config;
259
+ constructor(config) {
260
+ this.config = config;
261
+ }
262
+ get axiosRequestConfig() {
263
+ return {
264
+ transformResponse: getLocationDivinerApiResponseTransformer()
265
+ };
266
+ }
267
+ async getLocationQuery(hash) {
268
+ return (await import_axios3.axios.get(`${this.config.apiDomain}/location/query/${hash}`, this.axiosRequestConfig)).data;
269
+ }
270
+ async postLocationQuery(request) {
271
+ return (await import_axios3.axios.post(`${this.config.apiDomain}/location/query`, {
272
+ ...request
273
+ }, this.axiosRequestConfig)).data;
274
+ }
275
+ };
276
+
277
+ // src/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.ts
278
+ var locationHeatmapQuerySchema = "network.xyo.location.heatmap.query";
279
+ var locationHeatmapAnswerSchema = "network.xyo.location.heatmap.answer";
280
+ var isLocationHeatmapQuery = /* @__PURE__ */ __name((query) => {
281
+ return query && query?.schema === locationHeatmapQuerySchema;
282
+ }, "isLocationHeatmapQuery");
283
+
284
+ // src/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.ts
285
+ var locationQuadkeyHeatmapQuerySchema = "network.xyo.location.heatmap.quadkey.query";
286
+ var locationQuadkeyHeatmapAnswerSchema = "network.xyo.location.heatmap.quadkey.answer";
287
+ var isLocationQuadkeyHeatmapQuery = /* @__PURE__ */ __name((query) => {
288
+ return query && query?.schema === locationQuadkeyHeatmapQuerySchema;
289
+ }, "isLocationQuadkeyHeatmapQuery");
290
+
291
+ // src/Diviner/LocationDiviner/Queries/LocationQuerySchema.ts
292
+ var locationQuerySchemas = {
293
+ "network.xyo.location.heatmap.quadkey.query": true,
294
+ "network.xyo.location.heatmap.query": true,
295
+ "network.xyo.location.range.query": true
296
+ };
297
+ var isSupportedLocationQuerySchema = /* @__PURE__ */ __name((schema) => {
298
+ return locationQuerySchemas[schema] || false;
299
+ }, "isSupportedLocationQuerySchema");
300
+
301
+ // src/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.ts
302
+ var LocationTimeRangeQuerySchema = "network.xyo.location.range.query";
303
+ var LocationTimeRangeAnswerSchema = "network.xyo.location.range.answer";
304
+ var isLocationTimeRangeQuery = /* @__PURE__ */ __name((query) => {
305
+ return query && query?.schema === LocationTimeRangeAnswerSchema;
306
+ }, "isLocationTimeRangeQuery");
307
+
308
+ // src/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.ts
309
+ var CurrentLocationWitnessSchema = "co.coinapp.currentlocationwitness";
310
+
311
+ // src/Diviner/LocationDiviner/Witnesses/LocationWitness.ts
312
+ var LocationWitnessSchema = "network.xyo.location";
313
+
314
+ // src/Diviner/RemoteDivinerConfig.ts
315
+ var RemoteDivinerConfigSchema = "network.xyo.diviner.remote.config";
316
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/index.ts","../../src/Api/Api.ts","../../src/Base.ts","../../src/objToQuery.ts","../../src/Simple.ts","../../src/Diviner/LocationDiviner/LocationDivinerApi.ts","../../src/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.ts","../../src/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.ts","../../src/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.ts","../../src/Diviner/LocationDiviner/Queries/LocationQuerySchema.ts","../../src/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.ts","../../src/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.ts","../../src/Diviner/LocationDiviner/Witnesses/LocationWitness.ts","../../src/Diviner/RemoteDivinerConfig.ts"],"sourcesContent":["export * from './Api'\nexport * from './Base'\nexport * from './Diviner'\nexport * from './models'\nexport * from './Simple'\nexport * from './WithArchive'\n","import { ApiConfig } from '@xyo-network/api-models'\nimport { Huri } from '@xyo-network/huri'\nimport { Payload } from '@xyo-network/payload-model'\n\nimport { ApiSimple } from '../Simple'\n\nexport class ArchivistApi<C extends ApiConfig = ApiConfig> extends ApiSimple<Payload[], C> {\n huri(huri: Huri | string) {\n const huriObj = typeof huri === 'string' ? new Huri(huri) : huri\n return new ApiSimple<Payload>({\n ...this.config,\n root: `${this.root}${huriObj.href}/`,\n })\n }\n}\n","import { AxiosJson } from '@xylabs/axios'\nimport {\n ApiConfig,\n ApiEnvelope,\n ApiError,\n ApiReportable,\n ApiResponse,\n ApiResponseBody,\n ApiResponseTuple,\n ApiResponseTupleOrBody,\n ApiResponseType,\n} from '@xyo-network/api-models'\n\nexport class ApiBase<C extends ApiConfig = ApiConfig> implements ApiReportable {\n readonly config: C\n protected axios: AxiosJson\n\n constructor(config: C) {\n this.config = config\n this.axios = new AxiosJson({ ...this.config, headers: this.headers })\n }\n\n get authenticated() {\n return !!this.config.apiKey || !!this.config.jwtToken\n }\n\n protected get headers(): Record<string, string> {\n const headers: Record<string, string> = {}\n if (this.config.jwtToken) {\n headers.Authorization = `Bearer ${this.config.jwtToken}`\n }\n if (this.config.apiKey) {\n headers['x-api-key'] = this.config.apiKey\n }\n return headers\n }\n\n protected get query() {\n return this.config.query ?? ''\n }\n\n protected get root() {\n return this.config.root ?? '/'\n }\n\n private static resolveResponse<T>(result?: ApiResponse<ApiEnvelope<T>>) {\n return [result?.data?.data, result?.data, result] as ApiResponseTuple<T>\n }\n\n private static shapeResponse<T = unknown>(response: ApiResponse<ApiEnvelope<T>> | undefined, responseType?: ApiResponseType) {\n const resolvedResponse = ApiBase.resolveResponse(response)\n return responseType === 'tuple' ? resolvedResponse : resolvedResponse[0]\n }\n\n onError(error: ApiError, depth = 0) {\n this.config.reportableParent?.onError?.(error, depth + 1)\n this.config.onError?.(error, depth)\n }\n\n onFailure(response: ApiResponse, depth = 0) {\n this.config.reportableParent?.onFailure?.(response, depth + 1)\n this.config.onFailure?.(response, depth)\n }\n\n onSuccess(response: ApiResponse, depth = 0) {\n this.config.reportableParent?.onSuccess?.(response, depth + 1)\n this.config.onSuccess?.(response, depth)\n }\n\n protected async deleteEndpoint<T = unknown>(endPoint?: string): Promise<ApiResponseBody<T>>\n protected async deleteEndpoint<T = unknown>(endPoint?: string, responseType?: 'body'): Promise<ApiResponseBody<T>>\n protected async deleteEndpoint<T = unknown>(endPoint?: string, responseType?: 'tuple'): Promise<ApiResponseTuple<T>>\n protected async deleteEndpoint<T = unknown>(endPoint = '', responseType?: ApiResponseType): Promise<ApiResponseTupleOrBody<T>> {\n const response = await this.monitorResponse<T>(async () => {\n return await this.axios.delete<ApiEnvelope<T>, ApiResponse<ApiEnvelope<T>>>(`${this.resolveRoot()}${endPoint}${this.query}`)\n })\n return ApiBase.shapeResponse<T>(response, responseType)\n }\n\n protected async getEndpoint<T = unknown>(endPoint?: string): Promise<ApiResponseBody<T>>\n protected async getEndpoint<T = unknown>(endPoint?: string, responseType?: 'body'): Promise<ApiResponseBody<T>>\n protected async getEndpoint<T = unknown>(endPoint?: string, responseType?: 'tuple'): Promise<ApiResponseTuple<T>>\n protected async getEndpoint<T = unknown>(endPoint = '', responseType?: ApiResponseType): Promise<ApiResponseTupleOrBody<T>> {\n const response = await this.monitorResponse<T>(async () => {\n return await this.axios.get<ApiEnvelope<T>, ApiResponse<ApiEnvelope<T>>>(`${this.resolveRoot()}${endPoint}${this.query}`)\n })\n return ApiBase.shapeResponse<T>(response, responseType)\n }\n\n protected handleMonitorResponseError<T>(error: ApiError, trapAxiosException: boolean) {\n if (!error.isError) {\n throw error\n }\n\n if (trapAxiosException) {\n error.response ? this.onFailure(error.response) : this.onError(error)\n if (this.config.throwFailure) {\n throw error\n }\n return error.response as ApiResponse<ApiEnvelope<T>>\n }\n }\n\n protected async monitorResponse<T>(closure: () => Promise<ApiResponse<ApiEnvelope<T>>>) {\n //we use this to prevent accidental catching on exceptions in callbacks\n let trapAxiosException = true\n try {\n const response = await closure()\n trapAxiosException = false\n\n response.status < 300 ? this.onSuccess(response) : this.onFailure(response)\n\n return response\n } catch (error) {\n this.handleMonitorResponseError(error as ApiError, trapAxiosException)\n }\n }\n\n protected async postEndpoint<T = unknown, D = unknown>(endPoint?: string, data?: D): Promise<ApiResponseBody<T>>\n protected async postEndpoint<T = unknown, D = unknown>(endPoint?: string, data?: D, responseType?: 'body'): Promise<ApiResponseBody<T>>\n protected async postEndpoint<T = unknown, D = unknown>(endPoint?: string, data?: D, responseType?: 'tuple'): Promise<ApiResponseTuple<T>>\n protected async postEndpoint<T = unknown, D = unknown>(\n endPoint = '',\n data?: D,\n responseType?: ApiResponseType,\n ): Promise<ApiResponseTupleOrBody<T>> {\n const response = await this.monitorResponse<T>(async () => {\n return await this.axios.post<ApiEnvelope<T>, ApiResponse<ApiEnvelope<T>, D>, D>(`${this.resolveRoot()}${endPoint}${this.query}`, data)\n })\n return ApiBase.shapeResponse<T>(response, responseType)\n }\n\n protected async putEndpoint<T = unknown, D = unknown>(endPoint?: string, data?: D): Promise<ApiResponseBody<T>>\n protected async putEndpoint<T = unknown, D = unknown>(endPoint?: string, data?: D, responseType?: 'body'): Promise<ApiResponseBody<T>>\n protected async putEndpoint<T = unknown, D = unknown>(endPoint?: string, data?: D, responseType?: 'tuple'): Promise<ApiResponseTuple<T>>\n protected async putEndpoint<T = unknown, D = unknown>(endPoint = '', data?: D, responseType?: ApiResponseType): Promise<ApiResponseTupleOrBody<T>> {\n const response = await this.monitorResponse<T>(async () => {\n return await this.axios.put<ApiEnvelope<T>, ApiResponse<ApiEnvelope<T>, D>, D>(`${this.resolveRoot()}${endPoint}${this.query}`, data)\n })\n return ApiBase.shapeResponse<T>(response, responseType)\n }\n\n private resolveRoot() {\n return `${this.config.apiDomain}${this.root}`\n }\n}\n","export const objToQuery = (obj: Record<string, string | number | undefined>) => {\n return `?${Object.entries(obj)\n .map(([key, value]) => {\n return `${key}=${value}`\n })\n .filter((value) => value !== undefined)\n .join('&')}`\n}\n","import { ApiConfig, ApiResponseBody, ApiResponseTuple, ApiResponseTupleOrBody, ApiResponseType } from '@xyo-network/api-models'\nimport { Payload, PayloadFindFilter } from '@xyo-network/payload-model'\n\nimport { ApiBase } from './Base'\nimport { objToQuery } from './objToQuery'\n\nexport type ApiSimpleQuery = PayloadFindFilter\n\nexport class ApiSimple<T = Payload, D = T, Q extends ApiSimpleQuery = ApiSimpleQuery, C extends ApiConfig = ApiConfig> extends ApiBase<C> {\n async delete(): Promise<ApiResponseBody<T>>\n async delete(responseType?: 'body'): Promise<ApiResponseBody<T>>\n async delete(responseType?: 'tuple'): Promise<ApiResponseTuple<T>>\n async delete(responseType?: ApiResponseType): Promise<ApiResponseTupleOrBody<T>> {\n switch (responseType) {\n case 'tuple': {\n return await this.deleteEndpoint(undefined, 'tuple')\n }\n default: {\n return await this.deleteEndpoint()\n }\n }\n }\n\n async find(query?: Q): Promise<ApiResponseBody<T>>\n async find(query?: Q, responseType?: 'body'): Promise<ApiResponseBody<T>>\n async find(query?: Q, responseType?: 'tuple'): Promise<ApiResponseTuple<T>>\n async find(query = {}, responseType?: ApiResponseType): Promise<ApiResponseTupleOrBody<T>> {\n switch (responseType) {\n case 'tuple': {\n return await this.getEndpoint(objToQuery(query), 'tuple')\n }\n default: {\n return await this.getEndpoint(objToQuery(query))\n }\n }\n }\n\n async get(): Promise<ApiResponseBody<T>>\n async get(responseType?: 'body'): Promise<ApiResponseBody<T>>\n async get(responseType?: 'tuple'): Promise<ApiResponseTuple<T>>\n async get(responseType?: ApiResponseType): Promise<ApiResponseTupleOrBody<T>> {\n switch (responseType) {\n case 'tuple': {\n return await this.getEndpoint(undefined, 'tuple')\n }\n default: {\n return await this.getEndpoint()\n }\n }\n }\n\n async post(data?: D): Promise<ApiResponseBody<T>>\n async post(data?: D, responseType?: 'body'): Promise<ApiResponseBody<T>>\n async post(data?: D, responseType?: 'tuple'): Promise<ApiResponseTuple<T>>\n async post(data?: D, responseType?: ApiResponseType): Promise<ApiResponseTupleOrBody<T>> {\n switch (responseType) {\n case 'tuple': {\n return await this.postEndpoint(undefined, data, 'tuple')\n }\n default: {\n return await this.postEndpoint(undefined, data)\n }\n }\n }\n\n async put(data?: D): Promise<ApiResponseBody<T>>\n async put(data?: D, responseType?: 'body'): Promise<ApiResponseBody<T>>\n async put(data?: D, responseType?: 'tuple'): Promise<ApiResponseTuple<T>>\n async put(data?: D, responseType?: ApiResponseType): Promise<ApiResponseTupleOrBody<T>> {\n switch (responseType) {\n case 'tuple': {\n return await this.putEndpoint(undefined, data, 'tuple')\n }\n default: {\n return await this.putEndpoint(undefined, data)\n }\n }\n }\n}\n","import { axios, RawAxiosRequestConfig } from '@xylabs/axios'\nimport { ApiConfig } from '@xyo-network/api-models'\n\nimport { getLocationDivinerApiResponseTransformer } from './LocationDivinerApiResponseTransformer'\nimport { GetLocationQueryResponse } from './models'\nimport { LocationQueryCreationResponse, SupportedLocationQueryCreationRequest } from './Queries'\n\nclass LocationDivinerApi {\n config: ApiConfig\n constructor(config: ApiConfig) {\n this.config = config\n }\n\n private get axiosRequestConfig(): RawAxiosRequestConfig {\n return {\n transformResponse: getLocationDivinerApiResponseTransformer(),\n }\n }\n\n async getLocationQuery(hash: string) {\n return (await axios.get<GetLocationQueryResponse>(`${this.config.apiDomain}/location/query/${hash}`, this.axiosRequestConfig)).data\n }\n\n async postLocationQuery(request: SupportedLocationQueryCreationRequest) {\n return (await axios.post<LocationQueryCreationResponse>(`${this.config.apiDomain}/location/query`, { ...request }, this.axiosRequestConfig)).data\n }\n}\n\nexport { LocationDivinerApi }\n","import { axios, AxiosResponseTransformer } from '@xylabs/axios'\n\nexport const locationDivinerApiResponseTransformer: AxiosResponseTransformer = (data, _headers) => {\n return data.data\n}\n\n/**\n * Gets the response transformers for the LocationDiviner API. Done as a method instead of a property\n * to allow detection of dynamically added response transformers.\n * @param axiosInstance The axios instance (defaults to the global instance if none provided)\n * @returns the response transformers for the LocationDiviner API\n */\nexport const getLocationDivinerApiResponseTransformer = (axiosInstance = axios): AxiosResponseTransformer[] => {\n // If there's any existing response transforms preserve them and\n // append our response transform, otherwise just return ours\n return axiosInstance.defaults.transformResponse ?\n [\n ...(Array.isArray(axiosInstance.defaults.transformResponse) ?\n axiosInstance.defaults.transformResponse\n : [axiosInstance.defaults.transformResponse]),\n locationDivinerApiResponseTransformer,\n ]\n : [locationDivinerApiResponseTransformer]\n}\n","import { LocationWitnessSchema } from '../../Witnesses'\n\nexport type LocationHeatmapQuerySchema = 'network.xyo.location.heatmap.query'\nexport const locationHeatmapQuerySchema: LocationHeatmapQuerySchema = 'network.xyo.location.heatmap.query'\n\nexport type LocationHeatmapAnswerSchema = 'network.xyo.location.heatmap.answer'\nexport const locationHeatmapAnswerSchema: LocationHeatmapAnswerSchema = 'network.xyo.location.heatmap.answer'\n\nexport type LocationHeatmapQuery = {\n schema: LocationWitnessSchema\n startTime?: string\n stopTime?: string\n}\n\nexport const isLocationHeatmapQuery = (query: Record<string, unknown>): query is LocationHeatmapQuery => {\n return query && query?.schema === locationHeatmapQuerySchema\n}\n","import { LocationWitnessSchema } from '../../Witnesses'\n\nexport type LocationQuadkeyHeatmapQuerySchema = 'network.xyo.location.heatmap.quadkey.query'\nexport const locationQuadkeyHeatmapQuerySchema: LocationQuadkeyHeatmapQuerySchema = 'network.xyo.location.heatmap.quadkey.query'\nexport type LocationQuadkeyHeatmapAnswerSchema = 'network.xyo.location.heatmap.quadkey.answer'\nexport const locationQuadkeyHeatmapAnswerSchema: LocationQuadkeyHeatmapAnswerSchema = 'network.xyo.location.heatmap.quadkey.answer'\nexport type LocationQuadkeyHeatmapQuery = {\n schema: LocationWitnessSchema\n startTime?: string\n stopTime?: string\n}\n\nexport const isLocationQuadkeyHeatmapQuery = (query: Record<string, unknown>): query is LocationQuadkeyHeatmapQuery => {\n return query && query?.schema === locationQuadkeyHeatmapQuerySchema\n}\n","import { LocationHeatmapQuerySchema } from './LocationHeatmapQuery'\nimport { LocationQuadkeyHeatmapQuerySchema } from './LocationQuadkeyHeatmapQuery'\nimport { LocationTimeRangeQuerySchema } from './LocationTimeRangeQuery'\n\nexport type LocationQuerySchema = LocationQuadkeyHeatmapQuerySchema | LocationHeatmapQuerySchema | LocationTimeRangeQuerySchema\n\nconst locationQuerySchemas: Record<LocationQuerySchema, 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: string): schema is LocationQuerySchema => {\n return locationQuerySchemas[schema as LocationQuerySchema] || false\n}\n","import { LocationWitnessSchema } from '../../Witnesses'\n\nexport type LocationTimeRangeQuerySchema = 'network.xyo.location.range.query'\nexport const LocationTimeRangeQuerySchema: LocationTimeRangeQuerySchema = 'network.xyo.location.range.query'\n\nexport type LocationTimeRangeAnswerSchema = 'network.xyo.location.range.answer'\nexport const LocationTimeRangeAnswerSchema: LocationTimeRangeAnswerSchema = 'network.xyo.location.range.answer'\n\nexport type LocationTimeRangeQuery = {\n schema: LocationWitnessSchema\n startTime?: string\n stopTime?: string\n\n // TODO: Bounding rectangle, etc.\n}\n\nexport const isLocationTimeRangeQuery = (query: Record<string, unknown>): query is LocationTimeRangeQuery => {\n return query && query?.schema === LocationTimeRangeAnswerSchema\n}\n","import { Payload } from '@xyo-network/payload-model'\n\nexport type CurrentLocationWitnessSchema = 'co.coinapp.currentlocationwitness'\nexport const CurrentLocationWitnessSchema: CurrentLocationWitnessSchema = 'co.coinapp.currentlocationwitness'\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 { Payload } from '@xyo-network/payload-model'\n\nexport type LocationWitnessSchema = 'network.xyo.location'\nexport const LocationWitnessSchema: LocationWitnessSchema = 'network.xyo.location'\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 { DivinerConfig } from '@xyo-network/diviner-model'\n\nimport { ArchivistApi } from '../Api'\n\nexport type RemoteDivinerConfigSchema = 'network.xyo.diviner.remote.config'\nexport const RemoteDivinerConfigSchema: RemoteDivinerConfigSchema = 'network.xyo.diviner.remote.config'\n\nexport type RemoteDivinerConfig = DivinerConfig & {\n /** @deprecated use in params instead */\n api?: ArchivistApi\n archive?: string\n schema: RemoteDivinerConfigSchema\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;ACCA,kBAAqB;;;ACDrB,mBAA0B;AAanB,IAAMA,UAAN,MAAMA,SAAAA;EAbb,OAaaA;;;EACFC;EACCC;EAEVC,YAAYF,QAAW;AACrB,SAAKA,SAASA;AACd,SAAKC,QAAQ,IAAIE,uBAAU;MAAE,GAAG,KAAKH;MAAQI,SAAS,KAAKA;IAAQ,CAAA;EACrE;EAEA,IAAIC,gBAAgB;AAClB,WAAO,CAAC,CAAC,KAAKL,OAAOM,UAAU,CAAC,CAAC,KAAKN,OAAOO;EAC/C;EAEA,IAAcH,UAAkC;AAC9C,UAAMA,UAAkC,CAAC;AACzC,QAAI,KAAKJ,OAAOO,UAAU;AACxBH,cAAQI,gBAAgB,UAAU,KAAKR,OAAOO,QAAQ;IACxD;AACA,QAAI,KAAKP,OAAOM,QAAQ;AACtBF,cAAQ,WAAA,IAAe,KAAKJ,OAAOM;IACrC;AACA,WAAOF;EACT;EAEA,IAAcK,QAAQ;AACpB,WAAO,KAAKT,OAAOS,SAAS;EAC9B;EAEA,IAAcC,OAAO;AACnB,WAAO,KAAKV,OAAOU,QAAQ;EAC7B;EAEA,OAAeC,gBAAmBC,QAAsC;AACtE,WAAO;MAACA,QAAQC,MAAMA;MAAMD,QAAQC;MAAMD;;EAC5C;EAEA,OAAeE,cAA2BC,UAAmDC,cAAgC;AAC3H,UAAMC,mBAAmBlB,SAAQY,gBAAgBI,QAAAA;AACjD,WAAOC,iBAAiB,UAAUC,mBAAmBA,iBAAiB,CAAA;EACxE;EAEAC,QAAQC,OAAiBC,QAAQ,GAA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KAAkC;AAChE,GAF8C;;;ACTvC,IAAMC,+BAA6D;AAGnE,IAAMC,gCAA+D;AAUrE,IAAMC,2BAA2B,wBAACC,UAAAA;AACvC,SAAOA,SAASA,OAAOC,WAAWH;AACpC,GAFwC;;;ACbjC,IAAMI,+BAA6D;;;ACAnE,IAAMC,wBAA+C;;;ACErD,IAAMC,4BAAuD;","names":["ApiBase","config","axios","constructor","AxiosJson","headers","authenticated","apiKey","jwtToken","Authorization","query","root","resolveResponse","result","data","shapeResponse","response","responseType","resolvedResponse","onError","error","depth","reportableParent","onFailure","onSuccess","deleteEndpoint","endPoint","monitorResponse","delete","resolveRoot","getEndpoint","get","handleMonitorResponseError","trapAxiosException","isError","throwFailure","closure","status","postEndpoint","post","putEndpoint","put","apiDomain","objToQuery","obj","Object","entries","map","key","value","filter","undefined","join","ApiSimple","ApiBase","delete","responseType","deleteEndpoint","undefined","find","query","getEndpoint","objToQuery","get","post","data","postEndpoint","put","putEndpoint","ArchivistApi","ApiSimple","huri","huriObj","Huri","config","root","href","import_axios","import_axios","locationDivinerApiResponseTransformer","data","_headers","getLocationDivinerApiResponseTransformer","axiosInstance","axios","defaults","transformResponse","Array","isArray","LocationDivinerApi","config","constructor","axiosRequestConfig","transformResponse","getLocationDivinerApiResponseTransformer","getLocationQuery","hash","axios","get","apiDomain","data","postLocationQuery","request","post","locationHeatmapQuerySchema","locationHeatmapAnswerSchema","isLocationHeatmapQuery","query","schema","locationQuadkeyHeatmapQuerySchema","locationQuadkeyHeatmapAnswerSchema","isLocationQuadkeyHeatmapQuery","query","schema","locationQuerySchemas","isSupportedLocationQuerySchema","schema","LocationTimeRangeQuerySchema","LocationTimeRangeAnswerSchema","isLocationTimeRangeQuery","query","schema","CurrentLocationWitnessSchema","LocationWitnessSchema","RemoteDivinerConfigSchema"]}
@@ -0,0 +1,7 @@
1
+ export * from './Api';
2
+ export * from './Base';
3
+ export * from './Diviner';
4
+ export * from './models';
5
+ export * from './Simple';
6
+ export * from './WithArchive';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA;AACrB,cAAc,QAAQ,CAAA;AACtB,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA"}
@@ -0,0 +1,7 @@
1
+ export * from './Api';
2
+ export * from './Base';
3
+ export * from './Diviner';
4
+ export * from './models';
5
+ export * from './Simple';
6
+ export * from './WithArchive';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA;AACrB,cAAc,QAAQ,CAAA;AACtB,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA"}
@@ -0,0 +1,7 @@
1
+ export * from './Api';
2
+ export * from './Base';
3
+ export * from './Diviner';
4
+ export * from './models';
5
+ export * from './Simple';
6
+ export * from './WithArchive';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA;AACrB,cAAc,QAAQ,CAAA;AACtB,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA"}