@xyo-network/api 2.109.0 → 2.110.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/browser/Api/Api.d.cts +1 -1
- package/dist/browser/Api/Api.d.cts.map +1 -1
- package/dist/browser/Api/Api.d.mts +1 -1
- package/dist/browser/Api/Api.d.mts.map +1 -1
- package/dist/browser/Api/Api.d.ts +1 -1
- package/dist/browser/Api/Api.d.ts.map +1 -1
- package/dist/browser/Api/index.d.cts +1 -1
- package/dist/browser/Api/index.d.cts.map +1 -1
- package/dist/browser/Api/index.d.mts +1 -1
- package/dist/browser/Api/index.d.mts.map +1 -1
- package/dist/browser/Api/index.d.ts +1 -1
- package/dist/browser/Api/index.d.ts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/LocationDivinerApi.d.cts +2 -2
- package/dist/browser/Diviner/LocationDiviner/LocationDivinerApi.d.cts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/LocationDivinerApi.d.mts +2 -2
- package/dist/browser/Diviner/LocationDiviner/LocationDivinerApi.d.mts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/LocationDivinerApi.d.ts +2 -2
- package/dist/browser/Diviner/LocationDiviner/LocationDivinerApi.d.ts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.cts +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.cts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.mts +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.mts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.ts +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.ts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.d.cts +2 -2
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.d.cts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.d.mts +2 -2
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.d.mts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.d.ts +2 -2
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.d.ts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.cts +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.cts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.mts +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.mts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.ts +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.ts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.cts +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.cts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.mts +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.mts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.ts +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.ts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.d.cts +4 -4
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.d.cts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.d.mts +4 -4
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.d.mts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.d.ts +4 -4
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.d.ts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.d.cts +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.d.cts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.d.mts +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.d.mts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.d.ts +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.d.ts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuerySchema.d.cts +3 -3
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuerySchema.d.cts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuerySchema.d.mts +3 -3
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuerySchema.d.mts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuerySchema.d.ts +3 -3
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuerySchema.d.ts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.cts +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.cts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.mts +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.mts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.ts +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.ts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.cts +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.cts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.mts +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.mts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.ts +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.ts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.cts +2 -2
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.cts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.mts +2 -2
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.mts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.ts +2 -2
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.ts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/index.d.cts +6 -6
- package/dist/browser/Diviner/LocationDiviner/Queries/index.d.cts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/index.d.mts +6 -6
- package/dist/browser/Diviner/LocationDiviner/Queries/index.d.mts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/index.d.ts +6 -6
- package/dist/browser/Diviner/LocationDiviner/Queries/index.d.ts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Witnesses/index.d.cts +2 -2
- package/dist/browser/Diviner/LocationDiviner/Witnesses/index.d.cts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Witnesses/index.d.mts +2 -2
- package/dist/browser/Diviner/LocationDiviner/Witnesses/index.d.mts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Witnesses/index.d.ts +2 -2
- package/dist/browser/Diviner/LocationDiviner/Witnesses/index.d.ts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/index.d.cts +4 -4
- package/dist/browser/Diviner/LocationDiviner/index.d.cts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/index.d.mts +4 -4
- package/dist/browser/Diviner/LocationDiviner/index.d.mts.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/index.d.ts +4 -4
- package/dist/browser/Diviner/LocationDiviner/index.d.ts.map +1 -1
- package/dist/browser/Diviner/RemoteDivinerConfig.d.cts +1 -1
- package/dist/browser/Diviner/RemoteDivinerConfig.d.cts.map +1 -1
- package/dist/browser/Diviner/RemoteDivinerConfig.d.mts +1 -1
- package/dist/browser/Diviner/RemoteDivinerConfig.d.mts.map +1 -1
- package/dist/browser/Diviner/RemoteDivinerConfig.d.ts +1 -1
- package/dist/browser/Diviner/RemoteDivinerConfig.d.ts.map +1 -1
- package/dist/browser/Diviner/index.d.cts +2 -2
- package/dist/browser/Diviner/index.d.cts.map +1 -1
- package/dist/browser/Diviner/index.d.mts +2 -2
- package/dist/browser/Diviner/index.d.mts.map +1 -1
- package/dist/browser/Diviner/index.d.ts +2 -2
- package/dist/browser/Diviner/index.d.ts.map +1 -1
- package/dist/browser/Simple.d.cts +1 -1
- package/dist/browser/Simple.d.cts.map +1 -1
- package/dist/browser/Simple.d.mts +1 -1
- package/dist/browser/Simple.d.mts.map +1 -1
- package/dist/browser/Simple.d.ts +1 -1
- package/dist/browser/Simple.d.ts.map +1 -1
- package/dist/browser/Test/index.d.cts +2 -2
- package/dist/browser/Test/index.d.cts.map +1 -1
- package/dist/browser/Test/index.d.mts +2 -2
- package/dist/browser/Test/index.d.mts.map +1 -1
- package/dist/browser/Test/index.d.ts +2 -2
- package/dist/browser/Test/index.d.ts.map +1 -1
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.d.cts +6 -6
- package/dist/browser/index.d.cts.map +1 -1
- package/dist/browser/index.d.mts +6 -6
- package/dist/browser/index.d.mts.map +1 -1
- package/dist/browser/index.d.ts +6 -6
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/models/index.d.cts +1 -1
- package/dist/browser/models/index.d.cts.map +1 -1
- package/dist/browser/models/index.d.mts +1 -1
- package/dist/browser/models/index.d.mts.map +1 -1
- package/dist/browser/models/index.d.ts +1 -1
- package/dist/browser/models/index.d.ts.map +1 -1
- package/dist/neutral/Api/Api.d.cts +1 -1
- package/dist/neutral/Api/Api.d.cts.map +1 -1
- package/dist/neutral/Api/Api.d.mts +1 -1
- package/dist/neutral/Api/Api.d.mts.map +1 -1
- package/dist/neutral/Api/Api.d.ts +1 -1
- package/dist/neutral/Api/Api.d.ts.map +1 -1
- package/dist/neutral/Api/index.d.cts +1 -1
- package/dist/neutral/Api/index.d.cts.map +1 -1
- package/dist/neutral/Api/index.d.mts +1 -1
- package/dist/neutral/Api/index.d.mts.map +1 -1
- package/dist/neutral/Api/index.d.ts +1 -1
- package/dist/neutral/Api/index.d.ts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/LocationDivinerApi.d.cts +2 -2
- package/dist/neutral/Diviner/LocationDiviner/LocationDivinerApi.d.cts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/LocationDivinerApi.d.mts +2 -2
- package/dist/neutral/Diviner/LocationDiviner/LocationDivinerApi.d.mts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/LocationDivinerApi.d.ts +2 -2
- package/dist/neutral/Diviner/LocationDiviner/LocationDivinerApi.d.ts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.cts +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.cts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.mts +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.mts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.ts +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.ts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.d.cts +2 -2
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.d.cts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.d.mts +2 -2
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.d.mts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.d.ts +2 -2
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.d.ts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.cts +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.cts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.mts +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.mts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.ts +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.ts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.cts +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.cts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.mts +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.mts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.ts +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.ts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.d.cts +4 -4
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.d.cts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.d.mts +4 -4
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.d.mts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.d.ts +4 -4
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.d.ts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.d.cts +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.d.cts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.d.mts +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.d.mts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.d.ts +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.d.ts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQuerySchema.d.cts +3 -3
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQuerySchema.d.cts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQuerySchema.d.mts +3 -3
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQuerySchema.d.mts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQuerySchema.d.ts +3 -3
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationQuerySchema.d.ts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.cts +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.cts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.mts +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.mts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.ts +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.ts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.cts +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.cts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.mts +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.mts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.ts +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.ts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.cts +2 -2
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.cts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.mts +2 -2
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.mts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.ts +2 -2
- package/dist/neutral/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.ts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/index.d.cts +6 -6
- package/dist/neutral/Diviner/LocationDiviner/Queries/index.d.cts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/index.d.mts +6 -6
- package/dist/neutral/Diviner/LocationDiviner/Queries/index.d.mts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Queries/index.d.ts +6 -6
- package/dist/neutral/Diviner/LocationDiviner/Queries/index.d.ts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Witnesses/index.d.cts +2 -2
- package/dist/neutral/Diviner/LocationDiviner/Witnesses/index.d.cts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Witnesses/index.d.mts +2 -2
- package/dist/neutral/Diviner/LocationDiviner/Witnesses/index.d.mts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/Witnesses/index.d.ts +2 -2
- package/dist/neutral/Diviner/LocationDiviner/Witnesses/index.d.ts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/index.d.cts +4 -4
- package/dist/neutral/Diviner/LocationDiviner/index.d.cts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/index.d.mts +4 -4
- package/dist/neutral/Diviner/LocationDiviner/index.d.mts.map +1 -1
- package/dist/neutral/Diviner/LocationDiviner/index.d.ts +4 -4
- package/dist/neutral/Diviner/LocationDiviner/index.d.ts.map +1 -1
- package/dist/neutral/Diviner/RemoteDivinerConfig.d.cts +1 -1
- package/dist/neutral/Diviner/RemoteDivinerConfig.d.cts.map +1 -1
- package/dist/neutral/Diviner/RemoteDivinerConfig.d.mts +1 -1
- package/dist/neutral/Diviner/RemoteDivinerConfig.d.mts.map +1 -1
- package/dist/neutral/Diviner/RemoteDivinerConfig.d.ts +1 -1
- package/dist/neutral/Diviner/RemoteDivinerConfig.d.ts.map +1 -1
- package/dist/neutral/Diviner/index.d.cts +2 -2
- package/dist/neutral/Diviner/index.d.cts.map +1 -1
- package/dist/neutral/Diviner/index.d.mts +2 -2
- package/dist/neutral/Diviner/index.d.mts.map +1 -1
- package/dist/neutral/Diviner/index.d.ts +2 -2
- package/dist/neutral/Diviner/index.d.ts.map +1 -1
- package/dist/neutral/Simple.d.cts +1 -1
- package/dist/neutral/Simple.d.cts.map +1 -1
- package/dist/neutral/Simple.d.mts +1 -1
- package/dist/neutral/Simple.d.mts.map +1 -1
- package/dist/neutral/Simple.d.ts +1 -1
- package/dist/neutral/Simple.d.ts.map +1 -1
- package/dist/neutral/Test/index.d.cts +2 -2
- package/dist/neutral/Test/index.d.cts.map +1 -1
- package/dist/neutral/Test/index.d.mts +2 -2
- package/dist/neutral/Test/index.d.mts.map +1 -1
- package/dist/neutral/Test/index.d.ts +2 -2
- package/dist/neutral/Test/index.d.ts.map +1 -1
- package/dist/neutral/index.cjs.map +1 -1
- package/dist/neutral/index.d.cts +6 -6
- package/dist/neutral/index.d.cts.map +1 -1
- package/dist/neutral/index.d.mts +6 -6
- package/dist/neutral/index.d.mts.map +1 -1
- package/dist/neutral/index.d.ts +6 -6
- package/dist/neutral/index.d.ts.map +1 -1
- package/dist/neutral/index.js.map +1 -1
- package/dist/neutral/models/index.d.cts +1 -1
- package/dist/neutral/models/index.d.cts.map +1 -1
- package/dist/neutral/models/index.d.mts +1 -1
- package/dist/neutral/models/index.d.mts.map +1 -1
- package/dist/neutral/models/index.d.ts +1 -1
- package/dist/neutral/models/index.d.ts.map +1 -1
- package/dist/node/Api/Api.d.cts +1 -1
- package/dist/node/Api/Api.d.cts.map +1 -1
- package/dist/node/Api/Api.d.mts +1 -1
- package/dist/node/Api/Api.d.mts.map +1 -1
- package/dist/node/Api/Api.d.ts +1 -1
- package/dist/node/Api/Api.d.ts.map +1 -1
- package/dist/node/Api/index.d.cts +1 -1
- package/dist/node/Api/index.d.cts.map +1 -1
- package/dist/node/Api/index.d.mts +1 -1
- package/dist/node/Api/index.d.mts.map +1 -1
- package/dist/node/Api/index.d.ts +1 -1
- package/dist/node/Api/index.d.ts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/LocationDivinerApi.d.cts +2 -2
- package/dist/node/Diviner/LocationDiviner/LocationDivinerApi.d.cts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/LocationDivinerApi.d.mts +2 -2
- package/dist/node/Diviner/LocationDiviner/LocationDivinerApi.d.mts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/LocationDivinerApi.d.ts +2 -2
- package/dist/node/Diviner/LocationDiviner/LocationDivinerApi.d.ts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.cts +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.cts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.mts +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.mts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.ts +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.ts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.d.cts +2 -2
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.d.cts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.d.mts +2 -2
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.d.mts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.d.ts +2 -2
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.d.ts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.cts +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.cts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.mts +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.mts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.ts +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.ts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.cts +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.cts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.mts +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.mts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.ts +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.ts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.d.cts +4 -4
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.d.cts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.d.mts +4 -4
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.d.mts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.d.ts +4 -4
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.d.ts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.d.cts +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.d.cts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.d.mts +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.d.mts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.d.ts +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.d.ts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuerySchema.d.cts +3 -3
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuerySchema.d.cts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuerySchema.d.mts +3 -3
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuerySchema.d.mts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuerySchema.d.ts +3 -3
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuerySchema.d.ts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.cts +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.cts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.mts +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.mts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.ts +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.ts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.cts +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.cts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.mts +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.mts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.ts +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.ts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.cts +2 -2
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.cts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.mts +2 -2
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.mts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.ts +2 -2
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.ts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/index.d.cts +6 -6
- package/dist/node/Diviner/LocationDiviner/Queries/index.d.cts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/index.d.mts +6 -6
- package/dist/node/Diviner/LocationDiviner/Queries/index.d.mts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/index.d.ts +6 -6
- package/dist/node/Diviner/LocationDiviner/Queries/index.d.ts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Witnesses/index.d.cts +2 -2
- package/dist/node/Diviner/LocationDiviner/Witnesses/index.d.cts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Witnesses/index.d.mts +2 -2
- package/dist/node/Diviner/LocationDiviner/Witnesses/index.d.mts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Witnesses/index.d.ts +2 -2
- package/dist/node/Diviner/LocationDiviner/Witnesses/index.d.ts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/index.d.cts +4 -4
- package/dist/node/Diviner/LocationDiviner/index.d.cts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/index.d.mts +4 -4
- package/dist/node/Diviner/LocationDiviner/index.d.mts.map +1 -1
- package/dist/node/Diviner/LocationDiviner/index.d.ts +4 -4
- package/dist/node/Diviner/LocationDiviner/index.d.ts.map +1 -1
- package/dist/node/Diviner/RemoteDivinerConfig.d.cts +1 -1
- package/dist/node/Diviner/RemoteDivinerConfig.d.cts.map +1 -1
- package/dist/node/Diviner/RemoteDivinerConfig.d.mts +1 -1
- package/dist/node/Diviner/RemoteDivinerConfig.d.mts.map +1 -1
- package/dist/node/Diviner/RemoteDivinerConfig.d.ts +1 -1
- package/dist/node/Diviner/RemoteDivinerConfig.d.ts.map +1 -1
- package/dist/node/Diviner/index.d.cts +2 -2
- package/dist/node/Diviner/index.d.cts.map +1 -1
- package/dist/node/Diviner/index.d.mts +2 -2
- package/dist/node/Diviner/index.d.mts.map +1 -1
- package/dist/node/Diviner/index.d.ts +2 -2
- package/dist/node/Diviner/index.d.ts.map +1 -1
- package/dist/node/Simple.d.cts +1 -1
- package/dist/node/Simple.d.cts.map +1 -1
- package/dist/node/Simple.d.mts +1 -1
- package/dist/node/Simple.d.mts.map +1 -1
- package/dist/node/Simple.d.ts +1 -1
- package/dist/node/Simple.d.ts.map +1 -1
- package/dist/node/Test/index.d.cts +2 -2
- package/dist/node/Test/index.d.cts.map +1 -1
- package/dist/node/Test/index.d.mts +2 -2
- package/dist/node/Test/index.d.mts.map +1 -1
- package/dist/node/Test/index.d.ts +2 -2
- package/dist/node/Test/index.d.ts.map +1 -1
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.d.cts +6 -6
- package/dist/node/index.d.cts.map +1 -1
- package/dist/node/index.d.mts +6 -6
- package/dist/node/index.d.mts.map +1 -1
- package/dist/node/index.d.ts +6 -6
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js.map +1 -1
- package/dist/node/models/index.d.cts +1 -1
- package/dist/node/models/index.d.cts.map +1 -1
- package/dist/node/models/index.d.mts +1 -1
- package/dist/node/models/index.d.mts.map +1 -1
- package/dist/node/models/index.d.ts +1 -1
- package/dist/node/models/index.d.ts.map +1 -1
- package/package.json +11 -11
- package/src/Api/Api.ts +1 -1
- package/src/Api/index.ts +1 -1
- package/src/Diviner/LocationDiviner/LocationDivinerApi.ts +3 -3
- package/src/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.ts +1 -1
- package/src/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.ts +2 -2
- package/src/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.ts +1 -1
- package/src/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.ts +1 -1
- package/src/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.ts +4 -4
- package/src/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.ts +1 -1
- package/src/Diviner/LocationDiviner/Queries/LocationQuerySchema.ts +3 -3
- package/src/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.ts +1 -1
- package/src/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.ts +1 -1
- package/src/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.ts +2 -2
- package/src/Diviner/LocationDiviner/Queries/index.ts +6 -6
- package/src/Diviner/LocationDiviner/Witnesses/index.ts +2 -2
- package/src/Diviner/LocationDiviner/index.ts +4 -4
- package/src/Diviner/RemoteDivinerConfig.ts +1 -1
- package/src/Diviner/index.ts +2 -2
- package/src/Simple.ts +2 -2
- package/src/Test/index.ts +2 -2
- package/src/index.ts +6 -6
- package/src/models/index.ts +1 -1
@@ -1,3 +1,3 @@
|
|
1
|
-
export * from './LocationDiviner';
|
2
|
-
export * from './RemoteDivinerConfig';
|
1
|
+
export * from './LocationDiviner/index.js';
|
2
|
+
export * from './RemoteDivinerConfig.js';
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Diviner/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Diviner/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA;AAC1C,cAAc,0BAA0B,CAAA"}
|
@@ -1,3 +1,3 @@
|
|
1
|
-
export * from './LocationDiviner';
|
2
|
-
export * from './RemoteDivinerConfig';
|
1
|
+
export * from './LocationDiviner/index.js';
|
2
|
+
export * from './RemoteDivinerConfig.js';
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Diviner/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Diviner/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA;AAC1C,cAAc,0BAA0B,CAAA"}
|
package/dist/node/Simple.d.cts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ApiConfig, ApiResponseBody, ApiResponseTuple } from '@xyo-network/api-models';
|
2
2
|
import { Payload, PayloadFindFilter } from '@xyo-network/payload-model';
|
3
|
-
import { ApiBase } from './Base';
|
3
|
+
import { ApiBase } from './Base.js';
|
4
4
|
export type ApiSimpleQuery = PayloadFindFilter;
|
5
5
|
export declare class ApiSimple<T = Payload, D = T, Q extends ApiSimpleQuery = ApiSimpleQuery, C extends ApiConfig = ApiConfig> extends ApiBase<C> {
|
6
6
|
delete(): Promise<ApiResponseBody<T>>;
|
@@ -1 +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,
|
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,WAAW,CAAA;AAGnC,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,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,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"}
|
package/dist/node/Simple.d.mts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ApiConfig, ApiResponseBody, ApiResponseTuple } from '@xyo-network/api-models';
|
2
2
|
import { Payload, PayloadFindFilter } from '@xyo-network/payload-model';
|
3
|
-
import { ApiBase } from './Base';
|
3
|
+
import { ApiBase } from './Base.js';
|
4
4
|
export type ApiSimpleQuery = PayloadFindFilter;
|
5
5
|
export declare class ApiSimple<T = Payload, D = T, Q extends ApiSimpleQuery = ApiSimpleQuery, C extends ApiConfig = ApiConfig> extends ApiBase<C> {
|
6
6
|
delete(): Promise<ApiResponseBody<T>>;
|
@@ -1 +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,
|
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,WAAW,CAAA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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"}
|
package/dist/node/Simple.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ApiConfig, ApiResponseBody, ApiResponseTuple } from '@xyo-network/api-models';
|
2
2
|
import { Payload, PayloadFindFilter } from '@xyo-network/payload-model';
|
3
|
-
import { ApiBase } from './Base';
|
3
|
+
import { ApiBase } from './Base.js';
|
4
4
|
export type ApiSimpleQuery = PayloadFindFilter;
|
5
5
|
export declare class ApiSimple<T = Payload, D = T, Q extends ApiSimpleQuery = ApiSimpleQuery, C extends ApiConfig = ApiConfig> extends ApiBase<C> {
|
6
6
|
delete(): Promise<ApiResponseBody<T>>;
|
@@ -1 +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,
|
1
|
+
{"version":3,"file":"Simple.d.ts","sourceRoot":"","sources":["../../src/Simple.ts"],"names":[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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"}
|
@@ -1,3 +1,3 @@
|
|
1
|
-
export * from './testBoundWitness';
|
2
|
-
export * from './testPayload';
|
1
|
+
export * from './testBoundWitness.js';
|
2
|
+
export * from './testPayload.js';
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Test/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Test/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AACrC,cAAc,kBAAkB,CAAA"}
|
@@ -1,3 +1,3 @@
|
|
1
|
-
export * from './testBoundWitness';
|
2
|
-
export * from './testPayload';
|
1
|
+
export * from './testBoundWitness.js';
|
2
|
+
export * from './testPayload.js';
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Test/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Test/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AACrC,cAAc,kBAAkB,CAAA"}
|
@@ -1,3 +1,3 @@
|
|
1
|
-
export * from './testBoundWitness';
|
2
|
-
export * from './testPayload';
|
1
|
+
export * from './testBoundWitness.js';
|
2
|
+
export * from './testPayload.js';
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Test/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Test/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AACrC,cAAc,kBAAkB,CAAA"}
|
package/dist/node/index.cjs.map
CHANGED
@@ -1 +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,WAAN,MAAMA,SAAAA;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,gB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AACtE,YAAQ,MAAML,oBAAMM,KAAoC,GAAG,KAAKb,OAAOS,SAAS,mBAAmB;MAAE,GAAGG;IAAQ,GAAG,KAAKV,kBAAkB,GAAGQ;EAC/I;AACF,GAnBMX,kCAAN;;;AEJO,IAAMe,6BAAyD;AAG/D,IAAMC,8BAA2D;AAQjE,IAAMC,yBAAyB,wBAACC,UAAAA;AACrC,SAAOA,UAASA,+BAAOC,YAAWJ;AACpC,GAFsC;;;ACX/B,IAAMK,oCAAuE;AAE7E,IAAMC,qCAAyE;AAO/E,IAAMC,gCAAgC,wBAACC,UAAAA;AAC5C,SAAOA,UAASA,+BAAOC,YAAWJ;AACpC,GAF6C;;;ACN7C,IAAMK,uBAA0D;EAC9D,8CAA8C;EAC9C,sCAAsC;EACtC,oCAAoC;AACtC;AAEO,IAAMC,iCAAiC,wBAACC,WAAAA;AAC7C,SAAOF,qBAAqBE,MAAAA,KAAkC;AAChE,GAF8C;;;ACTvC,IAAMC,+BAA6D;AAGnE,IAAMC,gCAA+D;AAUrE,IAAMC,2BAA2B,wBAACC,UAAAA;AACvC,SAAOA,UAASA,+BAAOC,YAAWH;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","_a","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"]}
|
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/index.js'\nexport * from './Base.js'\nexport * from './Diviner/index.js'\nexport * from './models/index.js'\nexport * from './Simple.js'\nexport * from './WithArchive.js'\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.js'\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.js'\nimport { objToQuery } from './objToQuery.js'\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.js'\nimport { GetLocationQueryResponse } from './models.js'\nimport { LocationQueryCreationResponse, SupportedLocationQueryCreationRequest } from './Queries/index.js'\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/index.js'\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/index.js'\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/index.js'\nimport { LocationQuadkeyHeatmapQuerySchema } from './LocationQuadkeyHeatmapQuery/index.js'\nimport { LocationTimeRangeQuerySchema } from './LocationTimeRangeQuery/index.js'\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/index.js'\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/index.js'\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,WAAN,MAAMA,SAAAA;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;AA7C1E,QAAAC;AA8CI,WAAO;OAACD,MAAAA,iCAAQE,SAARF,gBAAAA,IAAcE;MAAMF,iCAAQE;MAAMF;;EAC5C;EAEA,OAAeG,cAA2BC,UAAmDC,cAAgC;AAC3H,UAAMC,mB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AAG/D,IAAMC,8BAA2D;AAQjE,IAAMC,yBAAyB,wBAACC,UAAAA;AACrC,SAAOA,UAASA,+BAAOC,YAAWJ;AACpC,GAFsC;;;ACX/B,IAAMK,oCAAuE;AAE7E,IAAMC,qCAAyE;AAO/E,IAAMC,gCAAgC,wBAACC,UAAAA;AAC5C,SAAOA,UAASA,+BAAOC,YAAWJ;AACpC,GAF6C;;;ACN7C,IAAMK,uBAA0D;EAC9D,8CAA8C;EAC9C,sCAAsC;EACtC,oCAAoC;AACtC;AAEO,IAAMC,iCAAiC,wBAACC,WAAAA;AAC7C,SAAOF,qBAAqBE,MAAAA,KAAkC;AAChE,GAF8C;;;ACTvC,IAAMC,+BAA6D;AAGnE,IAAMC,gCAA+D;AAUrE,IAAMC,2BAA2B,wBAACC,UAAAA;AACvC,SAAOA,UAASA,+BAAOC,YAAWH;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","_a","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"]}
|
package/dist/node/index.d.cts
CHANGED
@@ -1,7 +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';
|
1
|
+
export * from './Api/index.js';
|
2
|
+
export * from './Base.js';
|
3
|
+
export * from './Diviner/index.js';
|
4
|
+
export * from './models/index.js';
|
5
|
+
export * from './Simple.js';
|
6
|
+
export * from './WithArchive.js';
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;AACzB,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA"}
|
package/dist/node/index.d.mts
CHANGED
@@ -1,7 +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';
|
1
|
+
export * from './Api/index.js';
|
2
|
+
export * from './Base.js';
|
3
|
+
export * from './Diviner/index.js';
|
4
|
+
export * from './models/index.js';
|
5
|
+
export * from './Simple.js';
|
6
|
+
export * from './WithArchive.js';
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;AACzB,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA"}
|
package/dist/node/index.d.ts
CHANGED
@@ -1,7 +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';
|
1
|
+
export * from './Api/index.js';
|
2
|
+
export * from './Base.js';
|
3
|
+
export * from './Diviner/index.js';
|
4
|
+
export * from './models/index.js';
|
5
|
+
export * from './Simple.js';
|
6
|
+
export * from './WithArchive.js';
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/node/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;AACzB,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA"}
|
package/dist/node/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../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":["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":";;;;AACA,SAASA,YAAY;;;ACDrB,SAASC,iBAAiB;AAanB,IAAMC,WAAN,MAAMA,SAAAA;EACFC;EACCC;EAEVC,YAAYF,QAAW;AACrB,SAAKA,SAASA;AACd,SAAKC,QAAQ,IAAIE,UAAU;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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AOA,IAAMU,sBAAN,WAAMA;EACJC;EACAC,YAAYD,QAAmB;AAC7B,SAAKA,SAASA;EAChB;EAEA,IAAYE,qBAA4C;AACtD,WAAO;MACLC,mBAAmBC,yCAAAA;IACrB;EACF;EAEA,MAAMC,iBAAiBC,MAAc;AACnC,YAAQ,MAAMC,OAAMC,IAA8B,GAAG,KAAKR,OAAOS,SAAS,mBAAmBH,IAAAA,IAAQ,KAAKJ,kBAAkB,GAAGQ;EACjI;EAEA,MAAMC,kBAAkBC,SAAgD;AACtE,YAAQ,MAAML,OAAMM,KAAoC,GAAG,KAAKb,OAAOS,SAAS,mBAAmB;MAAE,GAAGG;IAAQ,GAAG,KAAKV,kBAAkB,GAAGQ;EAC/I;AACF,GAnBMX,kCAAN;;;AEJO,IAAMe,6BAAyD;AAG/D,IAAMC,8BAA2D;AAQjE,IAAMC,yBAAyB,wBAACC,UAAAA;AACrC,SAAOA,UAASA,+BAAOC,YAAWJ;AACpC,GAFsC;;;ACX/B,IAAMK,oCAAuE;AAE7E,IAAMC,qCAAyE;AAO/E,IAAMC,gCAAgC,wBAACC,UAAAA;AAC5C,SAAOA,UAASA,+BAAOC,YAAWJ;AACpC,GAF6C;;;ACN7C,IAAMK,uBAA0D;EAC9D,8CAA8C;EAC9C,sCAAsC;EACtC,oCAAoC;AACtC;AAEO,IAAMC,iCAAiC,wBAACC,WAAAA;AAC7C,SAAOF,qBAAqBE,MAAAA,KAAkC;AAChE,GAF8C;;;ACTvC,IAAMC,+BAA6D;AAGnE,IAAMC,gCAA+D;AAUrE,IAAMC,2BAA2B,wBAACC,UAAAA;AACvC,SAAOA,UAASA,+BAAOC,YAAWH;AACpC,GAFwC;;;ACbjC,IAAMI,+BAA6D;;;ACAnE,IAAMC,wBAA+C;;;ACErD,IAAMC,4BAAuD;","names":["Huri","AxiosJson","ApiBase","config","axios","constructor","AxiosJson","headers","authenticated","apiKey","jwtToken","Authorization","query","root","resolveResponse","result","_a","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","axios","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"]}
|
1
|
+
{"version":3,"sources":["../../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":["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.js'\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.js'\nimport { objToQuery } from './objToQuery.js'\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.js'\nimport { GetLocationQueryResponse } from './models.js'\nimport { LocationQueryCreationResponse, SupportedLocationQueryCreationRequest } from './Queries/index.js'\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/index.js'\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/index.js'\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/index.js'\nimport { LocationQuadkeyHeatmapQuerySchema } from './LocationQuadkeyHeatmapQuery/index.js'\nimport { LocationTimeRangeQuerySchema } from './LocationTimeRangeQuery/index.js'\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/index.js'\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/index.js'\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":";;;;AACA,SAASA,YAAY;;;ACDrB,SAASC,iBAAiB;AAanB,IAAMC,WAAN,MAAMA,SAAAA;EACFC;EACCC;EAEVC,YAAYF,QAAW;AACrB,SAAKA,SAASA;AACd,SAAKC,QAAQ,IAAIE,UAAU;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,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;AACtE,YAAQ,MAAML,OAAMM,KAAoC,GAAG,KAAKb,OAAOS,SAAS,mBAAmB;MAAE,GAAGG;IAAQ,GAAG,KAAKV,kBAAkB,GAAGQ;EAC/I;AACF,GAnBMX,kCAAN;;;AEJO,IAAMe,6BAAyD;AAG/D,IAAMC,8BAA2D;AAQjE,IAAMC,yBAAyB,wBAACC,UAAAA;AACrC,SAAOA,UAASA,+BAAOC,YAAWJ;AACpC,GAFsC;;;ACX/B,IAAMK,oCAAuE;AAE7E,IAAMC,qCAAyE;AAO/E,IAAMC,gCAAgC,wBAACC,UAAAA;AAC5C,SAAOA,UAASA,+BAAOC,YAAWJ;AACpC,GAF6C;;;ACN7C,IAAMK,uBAA0D;EAC9D,8CAA8C;EAC9C,sCAAsC;EACtC,oCAAoC;AACtC;AAEO,IAAMC,iCAAiC,wBAACC,WAAAA;AAC7C,SAAOF,qBAAqBE,MAAAA,KAAkC;AAChE,GAF8C;;;ACTvC,IAAMC,+BAA6D;AAGnE,IAAMC,gCAA+D;AAUrE,IAAMC,2BAA2B,wBAACC,UAAAA;AACvC,SAAOA,UAASA,+BAAOC,YAAWH;AACpC,GAFwC;;;ACbjC,IAAMI,+BAA6D;;;ACAnE,IAAMC,wBAA+C;;;ACErD,IAAMC,4BAAuD;","names":["Huri","AxiosJson","ApiBase","config","axios","constructor","AxiosJson","headers","authenticated","apiKey","jwtToken","Authorization","query","root","resolveResponse","result","_a","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","axios","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"]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export * from './ArchivePath';
|
1
|
+
export * from './ArchivePath.js';
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export * from './ArchivePath';
|
1
|
+
export * from './ArchivePath.js';
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export * from './ArchivePath';
|
1
|
+
export * from './ArchivePath.js';
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA"}
|
package/package.json
CHANGED
@@ -9,21 +9,21 @@
|
|
9
9
|
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/issues"
|
10
10
|
},
|
11
11
|
"dependencies": {
|
12
|
-
"@xylabs/axios": "^3.5.
|
13
|
-
"@xylabs/object": "^3.5.
|
14
|
-
"@xyo-network/api-models": "^2.
|
15
|
-
"@xyo-network/boundwitness-model": "^2.
|
16
|
-
"@xyo-network/diviner-model": "^2.
|
17
|
-
"@xyo-network/huri": "^2.
|
18
|
-
"@xyo-network/payload-model": "^2.
|
12
|
+
"@xylabs/axios": "^3.5.9",
|
13
|
+
"@xylabs/object": "^3.5.9",
|
14
|
+
"@xyo-network/api-models": "^2.110.0",
|
15
|
+
"@xyo-network/boundwitness-model": "^2.110.0",
|
16
|
+
"@xyo-network/diviner-model": "^2.110.0",
|
17
|
+
"@xyo-network/huri": "^2.110.0",
|
18
|
+
"@xyo-network/payload-model": "^2.110.0"
|
19
19
|
},
|
20
20
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
21
21
|
"devDependencies": {
|
22
|
-
"@xylabs/jest-helpers": "^3.5.
|
22
|
+
"@xylabs/jest-helpers": "^3.5.9",
|
23
23
|
"@xylabs/ts-scripts-yarn3": "^3.11.12",
|
24
24
|
"@xylabs/tsconfig": "^3.11.12",
|
25
|
-
"@xyo-network/module-model": "^2.
|
26
|
-
"@xyo-network/query-payload-plugin": "^2.
|
25
|
+
"@xyo-network/module-model": "^2.110.0",
|
26
|
+
"@xyo-network/query-payload-plugin": "^2.110.0",
|
27
27
|
"jest": "^29.7.0",
|
28
28
|
"typescript": "^5.5.3",
|
29
29
|
"uuid": "^10.0.0"
|
@@ -67,6 +67,6 @@
|
|
67
67
|
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js.git"
|
68
68
|
},
|
69
69
|
"sideEffects": false,
|
70
|
-
"version": "2.
|
70
|
+
"version": "2.110.0",
|
71
71
|
"type": "module"
|
72
72
|
}
|
package/src/Api/Api.ts
CHANGED
@@ -2,7 +2,7 @@ import { ApiConfig } from '@xyo-network/api-models'
|
|
2
2
|
import { Huri } from '@xyo-network/huri'
|
3
3
|
import { Payload } from '@xyo-network/payload-model'
|
4
4
|
|
5
|
-
import { ApiSimple } from '../Simple'
|
5
|
+
import { ApiSimple } from '../Simple.js'
|
6
6
|
|
7
7
|
export class ArchivistApi<C extends ApiConfig = ApiConfig> extends ApiSimple<Payload[], C> {
|
8
8
|
huri(huri: Huri | string) {
|
package/src/Api/index.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export * from './Api'
|
1
|
+
export * from './Api.js'
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { axios, RawAxiosRequestConfig } from '@xylabs/axios'
|
2
2
|
import { ApiConfig } from '@xyo-network/api-models'
|
3
3
|
|
4
|
-
import { getLocationDivinerApiResponseTransformer } from './LocationDivinerApiResponseTransformer'
|
5
|
-
import { GetLocationQueryResponse } from './models'
|
6
|
-
import { LocationQueryCreationResponse, SupportedLocationQueryCreationRequest } from './Queries'
|
4
|
+
import { getLocationDivinerApiResponseTransformer } from './LocationDivinerApiResponseTransformer.js'
|
5
|
+
import { GetLocationQueryResponse } from './models.js'
|
6
|
+
import { LocationQueryCreationResponse, SupportedLocationQueryCreationRequest } from './Queries/index.js'
|
7
7
|
|
8
8
|
class LocationDivinerApi {
|
9
9
|
config: ApiConfig
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { LocationWitnessSchema } from '../../Witnesses'
|
1
|
+
import { LocationWitnessSchema } from '../../Witnesses/index.js'
|
2
2
|
|
3
3
|
export type LocationHeatmapQuerySchema = 'network.xyo.location.heatmap.query'
|
4
4
|
export const locationHeatmapQuerySchema: LocationHeatmapQuerySchema = 'network.xyo.location.heatmap.query'
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export * from './LocationHeatmapPointProperties'
|
2
|
-
export * from './LocationHeatmapQuery'
|
1
|
+
export * from './LocationHeatmapPointProperties.js'
|
2
|
+
export * from './LocationHeatmapQuery.js'
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { LocationWitnessSchema } from '../../Witnesses'
|
1
|
+
import { LocationWitnessSchema } from '../../Witnesses/index.js'
|
2
2
|
|
3
3
|
export type LocationQuadkeyHeatmapQuerySchema = 'network.xyo.location.heatmap.quadkey.query'
|
4
4
|
export const locationQuadkeyHeatmapQuerySchema: LocationQuadkeyHeatmapQuerySchema = 'network.xyo.location.heatmap.quadkey.query'
|
@@ -1 +1 @@
|
|
1
|
-
export * from './LocationQuadkeyHeatmapQuery'
|
1
|
+
export * from './LocationQuadkeyHeatmapQuery.js'
|