@xyo-network/api 2.75.0 → 2.75.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/Api/Api.d.cts +12 -0
- package/dist/browser/Api/Api.d.cts.map +1 -0
- package/dist/browser/Api/Api.js +3 -155
- package/dist/browser/Api/Api.js.map +1 -1
- package/dist/browser/Api/index.d.cts +2 -0
- package/dist/browser/Api/index.d.cts.map +1 -0
- package/dist/browser/Api/index.js +1 -166
- package/dist/browser/Api/index.js.map +1 -1
- package/dist/browser/Base.d.cts +32 -0
- package/dist/browser/Base.d.cts.map +1 -0
- package/dist/browser/Base.js +7 -8
- package/dist/browser/Base.js.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/LocationDivinerApi.d.cts +12 -0
- package/dist/browser/Diviner/LocationDiviner/LocationDivinerApi.d.cts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/LocationDivinerApi.js +5 -16
- package/dist/browser/Diviner/LocationDiviner/LocationDivinerApi.js.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.d.cts +10 -0
- package/dist/browser/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.d.cts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.js +2 -3
- package/dist/browser/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.js.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.d.cts +5 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.d.cts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.cts +12 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.cts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.js +3 -4
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.js.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.d.cts +3 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.d.cts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.js +2 -11
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.js.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.cts +12 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.cts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.js +3 -4
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.js.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.cts +2 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.cts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.js +1 -11
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.js.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.d.cts +18 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.d.cts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.d.cts +5 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.d.cts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuerySchema.d.cts +6 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuerySchema.d.cts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuerySchema.js +2 -3
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuerySchema.js.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.cts +8 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.cts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.cts +12 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.cts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.js +3 -4
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.js.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.cts +3 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.cts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.js +2 -11
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.js.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Queries/index.d.cts +7 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/index.d.cts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/index.js +6 -42
- package/dist/browser/Diviner/LocationDiviner/Queries/index.js.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.d.cts +13 -0
- package/dist/browser/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.d.cts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.js +1 -2
- package/dist/browser/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.js.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Witnesses/LocationWitness.d.cts +21 -0
- package/dist/browser/Diviner/LocationDiviner/Witnesses/LocationWitness.d.cts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Witnesses/LocationWitness.js +1 -2
- package/dist/browser/Diviner/LocationDiviner/Witnesses/LocationWitness.js.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/Witnesses/index.d.cts +3 -0
- package/dist/browser/Diviner/LocationDiviner/Witnesses/index.d.cts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Witnesses/index.js +2 -9
- package/dist/browser/Diviner/LocationDiviner/Witnesses/index.js.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/index.d.cts +5 -0
- package/dist/browser/Diviner/LocationDiviner/index.d.cts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/index.js +4 -82
- package/dist/browser/Diviner/LocationDiviner/index.js.map +1 -1
- package/dist/browser/Diviner/LocationDiviner/models.d.cts +5 -0
- package/dist/browser/Diviner/LocationDiviner/models.d.cts.map +1 -0
- package/dist/browser/Diviner/RemoteDivinerConfig.d.cts +11 -0
- package/dist/browser/Diviner/RemoteDivinerConfig.d.cts.map +1 -0
- package/dist/browser/Diviner/RemoteDivinerConfig.js +1 -2
- package/dist/browser/Diviner/RemoteDivinerConfig.js.map +1 -1
- package/dist/browser/Diviner/RemoteDivinerError.d.cts +6 -0
- package/dist/browser/Diviner/RemoteDivinerError.d.cts.map +1 -0
- package/dist/browser/Diviner/RemoteDivinerError.js +2 -3
- package/dist/browser/Diviner/RemoteDivinerError.js.map +1 -1
- package/dist/browser/Diviner/index.d.cts +3 -0
- package/dist/browser/Diviner/index.d.cts.map +1 -0
- package/dist/browser/Diviner/index.js +2 -86
- package/dist/browser/Diviner/index.js.map +1 -1
- package/dist/browser/Simple.d.cts +22 -0
- package/dist/browser/Simple.d.cts.map +1 -0
- package/dist/browser/Simple.js +4 -109
- package/dist/browser/Simple.js.map +1 -1
- package/dist/browser/Test/index.d.cts +3 -0
- package/dist/browser/Test/index.d.cts.map +1 -0
- package/dist/browser/Test/index.js +2 -32
- package/dist/browser/Test/index.js.map +1 -1
- package/dist/browser/Test/testBoundWitness.d.cts +4 -0
- package/dist/browser/Test/testBoundWitness.d.cts.map +1 -0
- package/dist/browser/Test/testBoundWitness.js +1 -2
- package/dist/browser/Test/testBoundWitness.js.map +1 -1
- package/dist/browser/Test/testPayload.d.cts +6 -0
- package/dist/browser/Test/testPayload.d.cts.map +1 -0
- package/dist/browser/Test/testPayload.js +2 -3
- package/dist/browser/Test/testPayload.js.map +1 -1
- package/dist/browser/WithArchive.d.cts +4 -0
- package/dist/browser/WithArchive.d.cts.map +1 -0
- package/dist/browser/index.d.cts +7 -0
- package/dist/browser/index.d.cts.map +1 -0
- package/dist/browser/index.js +6 -253
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/models/ArchivePath.d.cts +4 -0
- package/dist/browser/models/ArchivePath.d.cts.map +1 -0
- package/dist/browser/models/index.d.cts +2 -0
- package/dist/browser/models/index.d.cts.map +1 -0
- package/dist/browser/models/index.js +1 -0
- package/dist/browser/models/index.js.map +1 -1
- package/dist/browser/objToQuery.d.cts +2 -0
- package/dist/browser/objToQuery.d.cts.map +1 -0
- package/dist/browser/objToQuery.js +1 -2
- package/dist/browser/objToQuery.js.map +1 -1
- package/dist/docs.json +16171 -0
- package/dist/node/Api/Api.d.cts +12 -0
- package/dist/node/Api/Api.d.cts.map +1 -0
- package/dist/node/Api/Api.js +161 -4
- package/dist/node/Api/Api.js.map +1 -1
- package/dist/node/Api/Api.mjs +159 -3
- package/dist/node/Api/Api.mjs.map +1 -1
- package/dist/node/Api/index.d.cts +2 -0
- package/dist/node/Api/index.d.cts.map +1 -0
- package/dist/node/Api/index.js +178 -3
- package/dist/node/Api/index.js.map +1 -1
- package/dist/node/Api/index.mjs +170 -1
- package/dist/node/Api/index.mjs.map +1 -1
- package/dist/node/Base.d.cts +32 -0
- package/dist/node/Base.d.cts.map +1 -0
- package/dist/node/Base.js +20 -14
- package/dist/node/Base.js.map +1 -1
- package/dist/node/Base.mjs +19 -14
- package/dist/node/Base.mjs.map +1 -1
- package/dist/node/Diviner/LocationDiviner/LocationDivinerApi.d.cts +12 -0
- package/dist/node/Diviner/LocationDiviner/LocationDivinerApi.d.cts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/LocationDivinerApi.js +18 -6
- package/dist/node/Diviner/LocationDiviner/LocationDivinerApi.js.map +1 -1
- package/dist/node/Diviner/LocationDiviner/LocationDivinerApi.mjs +16 -5
- package/dist/node/Diviner/LocationDiviner/LocationDivinerApi.mjs.map +1 -1
- package/dist/node/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.d.cts +10 -0
- package/dist/node/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.d.cts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.js +4 -2
- package/dist/node/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.js.map +1 -1
- package/dist/node/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.mjs +3 -2
- package/dist/node/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.mjs.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.d.cts +5 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.d.cts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.js +2 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.js.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.cts +12 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.cts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.js +6 -4
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.js.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.mjs +5 -4
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.mjs.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.d.cts +3 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.d.cts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.js +21 -5
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.js.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.mjs +11 -2
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.mjs.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.cts +12 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.cts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.js +6 -4
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.js.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.mjs +5 -4
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.mjs.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.cts +2 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.cts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.js +21 -3
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.js.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.mjs +11 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.mjs.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.d.cts +18 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.d.cts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.js +2 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.js.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.d.cts +5 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.d.cts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.js +2 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.js.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuerySchema.d.cts +6 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuerySchema.d.cts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuerySchema.js +4 -2
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuerySchema.js.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuerySchema.mjs +3 -2
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuerySchema.mjs.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.cts +8 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.cts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.js +2 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.js.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.cts +12 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.cts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.js +6 -4
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.js.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.mjs +5 -4
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.mjs.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.cts +3 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.cts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.js +21 -5
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.js.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.mjs +11 -2
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.mjs.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/index.d.cts +7 -0
- package/dist/node/Diviner/LocationDiviner/Queries/index.d.cts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/index.js +59 -13
- package/dist/node/Diviner/LocationDiviner/Queries/index.js.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Queries/index.mjs +42 -6
- package/dist/node/Diviner/LocationDiviner/Queries/index.mjs.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.d.cts +13 -0
- package/dist/node/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.d.cts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.js +3 -1
- package/dist/node/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.js.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.mjs +2 -1
- package/dist/node/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.mjs.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Witnesses/LocationWitness.d.cts +21 -0
- package/dist/node/Diviner/LocationDiviner/Witnesses/LocationWitness.d.cts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Witnesses/LocationWitness.js +3 -1
- package/dist/node/Diviner/LocationDiviner/Witnesses/LocationWitness.js.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Witnesses/LocationWitness.mjs +2 -1
- package/dist/node/Diviner/LocationDiviner/Witnesses/LocationWitness.mjs.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Witnesses/index.d.cts +3 -0
- package/dist/node/Diviner/LocationDiviner/Witnesses/index.d.cts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Witnesses/index.js +18 -5
- package/dist/node/Diviner/LocationDiviner/Witnesses/index.js.map +1 -1
- package/dist/node/Diviner/LocationDiviner/Witnesses/index.mjs +9 -2
- package/dist/node/Diviner/LocationDiviner/Witnesses/index.mjs.map +1 -1
- package/dist/node/Diviner/LocationDiviner/index.d.cts +5 -0
- package/dist/node/Diviner/LocationDiviner/index.d.cts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/index.js +102 -9
- package/dist/node/Diviner/LocationDiviner/index.js.map +1 -1
- package/dist/node/Diviner/LocationDiviner/index.mjs +82 -4
- package/dist/node/Diviner/LocationDiviner/index.mjs.map +1 -1
- package/dist/node/Diviner/LocationDiviner/models.d.cts +5 -0
- package/dist/node/Diviner/LocationDiviner/models.d.cts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/models.js +2 -0
- package/dist/node/Diviner/LocationDiviner/models.js.map +1 -1
- package/dist/node/Diviner/RemoteDivinerConfig.d.cts +11 -0
- package/dist/node/Diviner/RemoteDivinerConfig.d.cts.map +1 -0
- package/dist/node/Diviner/RemoteDivinerConfig.js +3 -1
- package/dist/node/Diviner/RemoteDivinerConfig.js.map +1 -1
- package/dist/node/Diviner/RemoteDivinerConfig.mjs +2 -1
- package/dist/node/Diviner/RemoteDivinerConfig.mjs.map +1 -1
- package/dist/node/Diviner/RemoteDivinerError.d.cts +6 -0
- package/dist/node/Diviner/RemoteDivinerError.d.cts.map +1 -0
- package/dist/node/Diviner/RemoteDivinerError.js +4 -2
- package/dist/node/Diviner/RemoteDivinerError.js.map +1 -1
- package/dist/node/Diviner/RemoteDivinerError.mjs +3 -2
- package/dist/node/Diviner/RemoteDivinerError.mjs.map +1 -1
- package/dist/node/Diviner/index.d.cts +3 -0
- package/dist/node/Diviner/index.d.cts.map +1 -0
- package/dist/node/Diviner/index.js +107 -5
- package/dist/node/Diviner/index.js.map +1 -1
- package/dist/node/Diviner/index.mjs +86 -2
- package/dist/node/Diviner/index.mjs.map +1 -1
- package/dist/node/Simple.d.cts +22 -0
- package/dist/node/Simple.d.cts.map +1 -0
- package/dist/node/Simple.js +118 -6
- package/dist/node/Simple.js.map +1 -1
- package/dist/node/Simple.mjs +113 -4
- package/dist/node/Simple.mjs.map +1 -1
- package/dist/node/Test/index.d.cts +3 -0
- package/dist/node/Test/index.d.cts.map +1 -0
- package/dist/node/Test/index.js +42 -5
- package/dist/node/Test/index.js.map +1 -1
- package/dist/node/Test/index.mjs +32 -2
- package/dist/node/Test/index.mjs.map +1 -1
- package/dist/node/Test/testBoundWitness.d.cts +4 -0
- package/dist/node/Test/testBoundWitness.d.cts.map +1 -0
- package/dist/node/Test/testBoundWitness.js +3 -1
- package/dist/node/Test/testBoundWitness.js.map +1 -1
- package/dist/node/Test/testBoundWitness.mjs +2 -1
- package/dist/node/Test/testBoundWitness.mjs.map +1 -1
- package/dist/node/Test/testPayload.d.cts +6 -0
- package/dist/node/Test/testPayload.d.cts.map +1 -0
- package/dist/node/Test/testPayload.js +4 -2
- package/dist/node/Test/testPayload.js.map +1 -1
- package/dist/node/Test/testPayload.mjs +3 -2
- package/dist/node/Test/testPayload.mjs.map +1 -1
- package/dist/node/WithArchive.d.cts +4 -0
- package/dist/node/WithArchive.d.cts.map +1 -0
- package/dist/node/WithArchive.js +2 -0
- package/dist/node/WithArchive.js.map +1 -1
- package/dist/node/index.d.cts +7 -0
- package/dist/node/index.d.cts.map +1 -0
- package/dist/node/index.js +281 -13
- package/dist/node/index.js.map +1 -1
- package/dist/node/index.mjs +257 -6
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/models/ArchivePath.d.cts +4 -0
- package/dist/node/models/ArchivePath.d.cts.map +1 -0
- package/dist/node/models/ArchivePath.js +2 -0
- package/dist/node/models/ArchivePath.js.map +1 -1
- package/dist/node/models/index.d.cts +2 -0
- package/dist/node/models/index.d.cts.map +1 -0
- package/dist/node/models/index.js +2 -6
- package/dist/node/models/index.js.map +1 -1
- package/dist/node/models/index.mjs +0 -1
- package/dist/node/models/index.mjs.map +1 -1
- package/dist/node/objToQuery.d.cts +2 -0
- package/dist/node/objToQuery.d.cts.map +1 -0
- package/dist/node/objToQuery.js +3 -1
- package/dist/node/objToQuery.js.map +1 -1
- package/dist/node/objToQuery.mjs +2 -1
- package/dist/node/objToQuery.mjs.map +1 -1
- package/package.json +12 -12
|
@@ -1,83 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { axios } from "@xyo-network/axios";
|
|
6
|
-
var locationDivinerApiResponseTransformer = (data, _headers) => {
|
|
7
|
-
return data.data;
|
|
8
|
-
};
|
|
9
|
-
var getLocationDivinerApiResponseTransformer = (axiosInstance = axios) => {
|
|
10
|
-
return axiosInstance.defaults.transformResponse ? [].concat(axiosInstance.defaults.transformResponse, locationDivinerApiResponseTransformer) : [locationDivinerApiResponseTransformer];
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
// src/Diviner/LocationDiviner/LocationDivinerApi.ts
|
|
14
|
-
var LocationDivinerApi = class {
|
|
15
|
-
config;
|
|
16
|
-
constructor(config) {
|
|
17
|
-
this.config = config;
|
|
18
|
-
}
|
|
19
|
-
get axiosRequestConfig() {
|
|
20
|
-
return {
|
|
21
|
-
transformResponse: getLocationDivinerApiResponseTransformer()
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
async getLocationQuery(hash) {
|
|
25
|
-
return (await axios2.get(`${this.config.apiDomain}/location/query/${hash}`, this.axiosRequestConfig)).data;
|
|
26
|
-
}
|
|
27
|
-
async postLocationQuery(request) {
|
|
28
|
-
return (await axios2.post(`${this.config.apiDomain}/location/query`, { ...request }, this.axiosRequestConfig)).data;
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
// src/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.ts
|
|
33
|
-
var locationHeatmapQuerySchema = "network.xyo.location.heatmap.query";
|
|
34
|
-
var locationHeatmapAnswerSchema = "network.xyo.location.heatmap.answer";
|
|
35
|
-
var isLocationHeatmapQuery = (query) => {
|
|
36
|
-
return query && query?.schema === locationHeatmapQuerySchema;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
// src/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.ts
|
|
40
|
-
var locationQuadkeyHeatmapQuerySchema = "network.xyo.location.heatmap.quadkey.query";
|
|
41
|
-
var locationQuadkeyHeatmapAnswerSchema = "network.xyo.location.heatmap.quadkey.answer";
|
|
42
|
-
var isLocationQuadkeyHeatmapQuery = (query) => {
|
|
43
|
-
return query && query?.schema === locationQuadkeyHeatmapQuerySchema;
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
// src/Diviner/LocationDiviner/Queries/LocationQuerySchema.ts
|
|
47
|
-
var locationQuerySchemas = {
|
|
48
|
-
"network.xyo.location.heatmap.quadkey.query": true,
|
|
49
|
-
"network.xyo.location.heatmap.query": true,
|
|
50
|
-
"network.xyo.location.range.query": true
|
|
51
|
-
};
|
|
52
|
-
var isSupportedLocationQuerySchema = (schema) => {
|
|
53
|
-
return locationQuerySchemas[schema] || false;
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
// src/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.ts
|
|
57
|
-
var LocationTimeRangeQuerySchema = "network.xyo.location.range.query";
|
|
58
|
-
var LocationTimeRangeAnswerSchema = "network.xyo.location.range.answer";
|
|
59
|
-
var isLocationTimeRangeQuery = (query) => {
|
|
60
|
-
return query && query?.schema === LocationTimeRangeAnswerSchema;
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
// src/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.ts
|
|
64
|
-
var CurrentLocationWitnessSchema = "co.coinapp.currentlocationwitness";
|
|
65
|
-
|
|
66
|
-
// src/Diviner/LocationDiviner/Witnesses/LocationWitness.ts
|
|
67
|
-
var LocationWitnessSchema = "network.xyo.location";
|
|
68
|
-
export {
|
|
69
|
-
CurrentLocationWitnessSchema,
|
|
70
|
-
LocationDivinerApi,
|
|
71
|
-
LocationTimeRangeAnswerSchema,
|
|
72
|
-
LocationTimeRangeQuerySchema,
|
|
73
|
-
LocationWitnessSchema,
|
|
74
|
-
isLocationHeatmapQuery,
|
|
75
|
-
isLocationQuadkeyHeatmapQuery,
|
|
76
|
-
isLocationTimeRangeQuery,
|
|
77
|
-
isSupportedLocationQuerySchema,
|
|
78
|
-
locationHeatmapAnswerSchema,
|
|
79
|
-
locationHeatmapQuerySchema,
|
|
80
|
-
locationQuadkeyHeatmapAnswerSchema,
|
|
81
|
-
locationQuadkeyHeatmapQuerySchema
|
|
82
|
-
};
|
|
1
|
+
export * from "./LocationDivinerApi";
|
|
2
|
+
export * from "./models";
|
|
3
|
+
export * from "./Queries";
|
|
4
|
+
export * from "./Witnesses";
|
|
83
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/Diviner/LocationDiviner/
|
|
1
|
+
{"version":3,"sources":["../../../../src/Diviner/LocationDiviner/index.ts"],"sourcesContent":["export * from './LocationDivinerApi'\nexport * from './models'\nexport * from './Queries'\nexport * from './Witnesses'\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../../src/Diviner/LocationDiviner/models.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACvC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;CAClB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DivinerConfig } from '@xyo-network/diviner-model';
|
|
2
|
+
import { ArchivistApi } from '../Api';
|
|
3
|
+
export type RemoteDivinerConfigSchema = 'network.xyo.diviner.remote.config';
|
|
4
|
+
export declare const RemoteDivinerConfigSchema: RemoteDivinerConfigSchema;
|
|
5
|
+
export type RemoteDivinerConfig = DivinerConfig & {
|
|
6
|
+
/** @deprecated use in params instead */
|
|
7
|
+
api?: ArchivistApi;
|
|
8
|
+
archive?: string;
|
|
9
|
+
schema: RemoteDivinerConfigSchema;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=RemoteDivinerConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RemoteDivinerConfig.d.ts","sourceRoot":"","sources":["../../../src/Diviner/RemoteDivinerConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AAErC,MAAM,MAAM,yBAAyB,GAAG,mCAAmC,CAAA;AAC3E,eAAO,MAAM,yBAAyB,EAAE,yBAA+D,CAAA;AAEvG,MAAM,MAAM,mBAAmB,GAAG,aAAa,GAAG;IAChD,wCAAwC;IACxC,GAAG,CAAC,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,yBAAyB,CAAA;CAClC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/Diviner/RemoteDivinerConfig.ts"],"sourcesContent":["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":"
|
|
1
|
+
{"version":3,"sources":["../../../src/Diviner/RemoteDivinerConfig.ts"],"sourcesContent":["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":"AAKO,MAAM,4BAAuD;","names":[]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare class RemoteDivinerError extends Error {
|
|
2
|
+
isRemoteDivinerError: boolean;
|
|
3
|
+
constructor(action: string, error: Error['cause'], message?: string);
|
|
4
|
+
static isRemoteDivinerError(error: unknown): RemoteDivinerError | undefined;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=RemoteDivinerError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RemoteDivinerError.d.ts","sourceRoot":"","sources":["../../../src/Diviner/RemoteDivinerError.ts"],"names":[],"mappings":"AAAA,qBAAa,kBAAmB,SAAQ,KAAK;IAC3C,oBAAoB,UAAO;gBACf,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM;IAGnE,MAAM,CAAC,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB,GAAG,SAAS;CAG5E"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
var RemoteDivinerError = class extends Error {
|
|
1
|
+
class RemoteDivinerError extends Error {
|
|
3
2
|
isRemoteDivinerError = true;
|
|
4
3
|
constructor(action, error, message) {
|
|
5
4
|
super(`Remote Diviner [${action}] failed${message ? ` (${message})` : ""}`, { cause: error });
|
|
@@ -7,7 +6,7 @@ var RemoteDivinerError = class extends Error {
|
|
|
7
6
|
static isRemoteDivinerError(error) {
|
|
8
7
|
return error.isRemoteDivinerError ? error : void 0;
|
|
9
8
|
}
|
|
10
|
-
}
|
|
9
|
+
}
|
|
11
10
|
export {
|
|
12
11
|
RemoteDivinerError
|
|
13
12
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/Diviner/RemoteDivinerError.ts"],"sourcesContent":["export class RemoteDivinerError extends Error {\n isRemoteDivinerError = true\n constructor(action: string, error: Error['cause'], message?: string) {\n super(`Remote Diviner [${action}] failed${message ? ` (${message})` : ''}`, { cause: error })\n }\n static isRemoteDivinerError(error: unknown): RemoteDivinerError | undefined {\n return (error as RemoteDivinerError).isRemoteDivinerError ? (error as RemoteDivinerError) : undefined\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/Diviner/RemoteDivinerError.ts"],"sourcesContent":["export class RemoteDivinerError extends Error {\n isRemoteDivinerError = true\n constructor(action: string, error: Error['cause'], message?: string) {\n super(`Remote Diviner [${action}] failed${message ? ` (${message})` : ''}`, { cause: error })\n }\n static isRemoteDivinerError(error: unknown): RemoteDivinerError | undefined {\n return (error as RemoteDivinerError).isRemoteDivinerError ? (error as RemoteDivinerError) : undefined\n }\n}\n"],"mappings":"AAAO,MAAM,2BAA2B,MAAM;AAAA,EAC5C,uBAAuB;AAAA,EACvB,YAAY,QAAgB,OAAuB,SAAkB;AACnE,UAAM,mBAAmB,MAAM,WAAW,UAAU,KAAK,OAAO,MAAM,EAAE,IAAI,EAAE,OAAO,MAAM,CAAC;AAAA,EAC9F;AAAA,EACA,OAAO,qBAAqB,OAAgD;AAC1E,WAAQ,MAA6B,uBAAwB,QAA+B;AAAA,EAC9F;AACF;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Diviner/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,uBAAuB,CAAA"}
|
|
@@ -1,87 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
// src/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.ts
|
|
5
|
-
import { axios } from "@xyo-network/axios";
|
|
6
|
-
var locationDivinerApiResponseTransformer = (data, _headers) => {
|
|
7
|
-
return data.data;
|
|
8
|
-
};
|
|
9
|
-
var getLocationDivinerApiResponseTransformer = (axiosInstance = axios) => {
|
|
10
|
-
return axiosInstance.defaults.transformResponse ? [].concat(axiosInstance.defaults.transformResponse, locationDivinerApiResponseTransformer) : [locationDivinerApiResponseTransformer];
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
// src/Diviner/LocationDiviner/LocationDivinerApi.ts
|
|
14
|
-
var LocationDivinerApi = class {
|
|
15
|
-
config;
|
|
16
|
-
constructor(config) {
|
|
17
|
-
this.config = config;
|
|
18
|
-
}
|
|
19
|
-
get axiosRequestConfig() {
|
|
20
|
-
return {
|
|
21
|
-
transformResponse: getLocationDivinerApiResponseTransformer()
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
async getLocationQuery(hash) {
|
|
25
|
-
return (await axios2.get(`${this.config.apiDomain}/location/query/${hash}`, this.axiosRequestConfig)).data;
|
|
26
|
-
}
|
|
27
|
-
async postLocationQuery(request) {
|
|
28
|
-
return (await axios2.post(`${this.config.apiDomain}/location/query`, { ...request }, this.axiosRequestConfig)).data;
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
// src/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.ts
|
|
33
|
-
var locationHeatmapQuerySchema = "network.xyo.location.heatmap.query";
|
|
34
|
-
var locationHeatmapAnswerSchema = "network.xyo.location.heatmap.answer";
|
|
35
|
-
var isLocationHeatmapQuery = (query) => {
|
|
36
|
-
return query && query?.schema === locationHeatmapQuerySchema;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
// src/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.ts
|
|
40
|
-
var locationQuadkeyHeatmapQuerySchema = "network.xyo.location.heatmap.quadkey.query";
|
|
41
|
-
var locationQuadkeyHeatmapAnswerSchema = "network.xyo.location.heatmap.quadkey.answer";
|
|
42
|
-
var isLocationQuadkeyHeatmapQuery = (query) => {
|
|
43
|
-
return query && query?.schema === locationQuadkeyHeatmapQuerySchema;
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
// src/Diviner/LocationDiviner/Queries/LocationQuerySchema.ts
|
|
47
|
-
var locationQuerySchemas = {
|
|
48
|
-
"network.xyo.location.heatmap.quadkey.query": true,
|
|
49
|
-
"network.xyo.location.heatmap.query": true,
|
|
50
|
-
"network.xyo.location.range.query": true
|
|
51
|
-
};
|
|
52
|
-
var isSupportedLocationQuerySchema = (schema) => {
|
|
53
|
-
return locationQuerySchemas[schema] || false;
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
// src/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.ts
|
|
57
|
-
var LocationTimeRangeQuerySchema = "network.xyo.location.range.query";
|
|
58
|
-
var LocationTimeRangeAnswerSchema = "network.xyo.location.range.answer";
|
|
59
|
-
var isLocationTimeRangeQuery = (query) => {
|
|
60
|
-
return query && query?.schema === LocationTimeRangeAnswerSchema;
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
// src/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.ts
|
|
64
|
-
var CurrentLocationWitnessSchema = "co.coinapp.currentlocationwitness";
|
|
65
|
-
|
|
66
|
-
// src/Diviner/LocationDiviner/Witnesses/LocationWitness.ts
|
|
67
|
-
var LocationWitnessSchema = "network.xyo.location";
|
|
68
|
-
|
|
69
|
-
// src/Diviner/RemoteDivinerConfig.ts
|
|
70
|
-
var RemoteDivinerConfigSchema = "network.xyo.diviner.remote.config";
|
|
71
|
-
export {
|
|
72
|
-
CurrentLocationWitnessSchema,
|
|
73
|
-
LocationDivinerApi,
|
|
74
|
-
LocationTimeRangeAnswerSchema,
|
|
75
|
-
LocationTimeRangeQuerySchema,
|
|
76
|
-
LocationWitnessSchema,
|
|
77
|
-
RemoteDivinerConfigSchema,
|
|
78
|
-
isLocationHeatmapQuery,
|
|
79
|
-
isLocationQuadkeyHeatmapQuery,
|
|
80
|
-
isLocationTimeRangeQuery,
|
|
81
|
-
isSupportedLocationQuerySchema,
|
|
82
|
-
locationHeatmapAnswerSchema,
|
|
83
|
-
locationHeatmapQuerySchema,
|
|
84
|
-
locationQuadkeyHeatmapAnswerSchema,
|
|
85
|
-
locationQuadkeyHeatmapQuerySchema
|
|
86
|
-
};
|
|
1
|
+
export * from "./LocationDiviner";
|
|
2
|
+
export * from "./RemoteDivinerConfig";
|
|
87
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/Diviner/
|
|
1
|
+
{"version":3,"sources":["../../../src/Diviner/index.ts"],"sourcesContent":["export * from './LocationDiviner'\nexport * from './RemoteDivinerConfig'\n"],"mappings":"AAAA,cAAc;AACd,cAAc;","names":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ApiConfig, ApiResponseBody, ApiResponseTuple } from '@xyo-network/api-models';
|
|
2
|
+
import { Payload, PayloadFindFilter } from '@xyo-network/payload-model';
|
|
3
|
+
import { ApiBase } from './Base';
|
|
4
|
+
export type ApiSimpleQuery = PayloadFindFilter;
|
|
5
|
+
export declare class ApiSimple<T = Payload, D = T, Q extends ApiSimpleQuery = ApiSimpleQuery, C extends ApiConfig = ApiConfig> extends ApiBase<C> {
|
|
6
|
+
delete(): Promise<ApiResponseBody<T>>;
|
|
7
|
+
delete(responseType?: 'body'): Promise<ApiResponseBody<T>>;
|
|
8
|
+
delete(responseType?: 'tuple'): Promise<ApiResponseTuple<T>>;
|
|
9
|
+
find(query?: Q): Promise<ApiResponseBody<T>>;
|
|
10
|
+
find(query?: Q, responseType?: 'body'): Promise<ApiResponseBody<T>>;
|
|
11
|
+
find(query?: Q, responseType?: 'tuple'): Promise<ApiResponseTuple<T>>;
|
|
12
|
+
get(): Promise<ApiResponseBody<T>>;
|
|
13
|
+
get(responseType?: 'body'): Promise<ApiResponseBody<T>>;
|
|
14
|
+
get(responseType?: 'tuple'): Promise<ApiResponseTuple<T>>;
|
|
15
|
+
post(data?: D): Promise<ApiResponseBody<T>>;
|
|
16
|
+
post(data?: D, responseType?: 'body'): Promise<ApiResponseBody<T>>;
|
|
17
|
+
post(data?: D, responseType?: 'tuple'): Promise<ApiResponseTuple<T>>;
|
|
18
|
+
put(data?: D): Promise<ApiResponseBody<T>>;
|
|
19
|
+
put(data?: D, responseType?: 'body'): Promise<ApiResponseBody<T>>;
|
|
20
|
+
put(data?: D, responseType?: 'tuple'): Promise<ApiResponseTuple<T>>;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=Simple.d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Ae,CAAC,CAAC,CAAC,CAAC;IACvD,GAAG,CAAC,YAAY,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;IAUzD,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;IAUpE,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;CAS1E"}
|
package/dist/browser/Simple.js
CHANGED
|
@@ -1,111 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
config;
|
|
5
|
-
axios;
|
|
6
|
-
constructor(config) {
|
|
7
|
-
this.config = config;
|
|
8
|
-
this.axios = new AxiosJson({ ...this.config, headers: this.headers });
|
|
9
|
-
}
|
|
10
|
-
get authenticated() {
|
|
11
|
-
return !!this.config.apiKey || !!this.config.jwtToken;
|
|
12
|
-
}
|
|
13
|
-
get headers() {
|
|
14
|
-
const headers = {};
|
|
15
|
-
if (this.config.jwtToken) {
|
|
16
|
-
headers.Authorization = `Bearer ${this.config.jwtToken}`;
|
|
17
|
-
}
|
|
18
|
-
if (this.config.apiKey) {
|
|
19
|
-
headers["x-api-key"] = this.config.apiKey;
|
|
20
|
-
}
|
|
21
|
-
return headers;
|
|
22
|
-
}
|
|
23
|
-
get query() {
|
|
24
|
-
return this.config.query ?? "";
|
|
25
|
-
}
|
|
26
|
-
get root() {
|
|
27
|
-
return this.config.root ?? "/";
|
|
28
|
-
}
|
|
29
|
-
static resolveResponse(result) {
|
|
30
|
-
return [result?.data?.data, result?.data, result];
|
|
31
|
-
}
|
|
32
|
-
static shapeResponse(response, responseType) {
|
|
33
|
-
const resolvedResponse = _ApiBase.resolveResponse(response);
|
|
34
|
-
return responseType === "tuple" ? resolvedResponse : resolvedResponse[0];
|
|
35
|
-
}
|
|
36
|
-
onError(error, depth = 0) {
|
|
37
|
-
this.config.reportableParent?.onError?.(error, depth + 1);
|
|
38
|
-
this.config.onError?.(error, depth);
|
|
39
|
-
}
|
|
40
|
-
onFailure(response, depth = 0) {
|
|
41
|
-
this.config.reportableParent?.onFailure?.(response, depth + 1);
|
|
42
|
-
this.config.onFailure?.(response, depth);
|
|
43
|
-
}
|
|
44
|
-
onSuccess(response, depth = 0) {
|
|
45
|
-
this.config.reportableParent?.onSuccess?.(response, depth + 1);
|
|
46
|
-
this.config.onSuccess?.(response, depth);
|
|
47
|
-
}
|
|
48
|
-
async deleteEndpoint(endPoint = "", responseType) {
|
|
49
|
-
const response = await this.monitorResponse(async () => {
|
|
50
|
-
return await this.axios.delete(`${this.resolveRoot()}${endPoint}${this.query}`);
|
|
51
|
-
});
|
|
52
|
-
return _ApiBase.shapeResponse(response, responseType);
|
|
53
|
-
}
|
|
54
|
-
async getEndpoint(endPoint = "", responseType) {
|
|
55
|
-
const response = await this.monitorResponse(async () => {
|
|
56
|
-
return await this.axios.get(`${this.resolveRoot()}${endPoint}${this.query}`);
|
|
57
|
-
});
|
|
58
|
-
return _ApiBase.shapeResponse(response, responseType);
|
|
59
|
-
}
|
|
60
|
-
handleMonitorResponseError(error, trapAxiosException) {
|
|
61
|
-
if (!error.isError) {
|
|
62
|
-
throw error;
|
|
63
|
-
}
|
|
64
|
-
if (trapAxiosException) {
|
|
65
|
-
error.response ? this.onFailure(error.response) : this.onError(error);
|
|
66
|
-
if (this.config.throwFailure) {
|
|
67
|
-
throw error;
|
|
68
|
-
}
|
|
69
|
-
return error.response;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
async monitorResponse(closure) {
|
|
73
|
-
let trapAxiosException = true;
|
|
74
|
-
try {
|
|
75
|
-
const response = await closure();
|
|
76
|
-
trapAxiosException = false;
|
|
77
|
-
response.status < 300 ? this.onSuccess(response) : this.onFailure(response);
|
|
78
|
-
return response;
|
|
79
|
-
} catch (ex) {
|
|
80
|
-
this.handleMonitorResponseError(ex, trapAxiosException);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
async postEndpoint(endPoint = "", data, responseType) {
|
|
84
|
-
const response = await this.monitorResponse(async () => {
|
|
85
|
-
return await this.axios.post(`${this.resolveRoot()}${endPoint}${this.query}`, data);
|
|
86
|
-
});
|
|
87
|
-
return _ApiBase.shapeResponse(response, responseType);
|
|
88
|
-
}
|
|
89
|
-
async putEndpoint(endPoint = "", data, responseType) {
|
|
90
|
-
const response = await this.monitorResponse(async () => {
|
|
91
|
-
return await this.axios.put(`${this.resolveRoot()}${endPoint}${this.query}`, data);
|
|
92
|
-
});
|
|
93
|
-
return _ApiBase.shapeResponse(response, responseType);
|
|
94
|
-
}
|
|
95
|
-
resolveRoot() {
|
|
96
|
-
return `${this.config.apiDomain}${this.root}`;
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
// src/objToQuery.ts
|
|
101
|
-
var objToQuery = (obj) => {
|
|
102
|
-
return `?${Object.entries(obj).map(([key, value]) => {
|
|
103
|
-
return `${key}=${value}`;
|
|
104
|
-
}).filter((value) => value !== void 0).join("&")}`;
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
// src/Simple.ts
|
|
108
|
-
var ApiSimple = class extends ApiBase {
|
|
1
|
+
import { ApiBase } from "./Base";
|
|
2
|
+
import { objToQuery } from "./objToQuery";
|
|
3
|
+
class ApiSimple extends ApiBase {
|
|
109
4
|
async delete(responseType) {
|
|
110
5
|
switch (responseType) {
|
|
111
6
|
case "tuple":
|
|
@@ -146,7 +41,7 @@ var ApiSimple = class extends ApiBase {
|
|
|
146
41
|
return await this.putEndpoint(void 0, data);
|
|
147
42
|
}
|
|
148
43
|
}
|
|
149
|
-
}
|
|
44
|
+
}
|
|
150
45
|
export {
|
|
151
46
|
ApiSimple
|
|
152
47
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Base.ts","../../src/objToQuery.ts","../../src/Simple.ts"],"sourcesContent":["import {\n ApiConfig,\n ApiEnvelope,\n ApiError,\n ApiReportable,\n ApiResponse,\n ApiResponseBody,\n ApiResponseTuple,\n ApiResponseTupleOrBody,\n ApiResponseType,\n} from '@xyo-network/api-models'\nimport { AxiosJson } from '@xyo-network/axios'\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 (ex) {\n this.handleMonitorResponseError(ex 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 default:\n return await this.deleteEndpoint(undefined)\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 default:\n return await this.getEndpoint(objToQuery(query))\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 default:\n return await this.getEndpoint(undefined)\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 default:\n return await this.postEndpoint(undefined, data)\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 default:\n return await this.putEndpoint(undefined, data)\n }\n }\n}\n"],"mappings":";AAWA,SAAS,iBAAiB;AAEnB,IAAM,UAAN,MAAM,SAAkE;AAAA,EACpE;AAAA,EACC;AAAA,EAEV,YAAY,QAAW;AACrB,SAAK,SAAS;AACd,SAAK,QAAQ,IAAI,UAAU,EAAE,GAAG,KAAK,QAAQ,SAAS,KAAK,QAAQ,CAAC;AAAA,EACtE;AAAA,EAEA,IAAI,gBAAgB;AAClB,WAAO,CAAC,CAAC,KAAK,OAAO,UAAU,CAAC,CAAC,KAAK,OAAO;AAAA,EAC/C;AAAA,EAEA,IAAc,UAAkC;AAC9C,UAAM,UAAkC,CAAC;AACzC,QAAI,KAAK,OAAO,UAAU;AACxB,cAAQ,gBAAgB,UAAU,KAAK,OAAO,QAAQ;AAAA,IACxD;AACA,QAAI,KAAK,OAAO,QAAQ;AACtB,cAAQ,WAAW,IAAI,KAAK,OAAO;AAAA,IACrC;AACA,WAAO;AAAA,EACT;AAAA,EAEA,IAAc,QAAQ;AACpB,WAAO,KAAK,OAAO,SAAS;AAAA,EAC9B;AAAA,EAEA,IAAc,OAAO;AACnB,WAAO,KAAK,O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["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 default:\n return await this.deleteEndpoint(undefined)\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 default:\n return await this.getEndpoint(objToQuery(query))\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 default:\n return await this.getEndpoint(undefined)\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 default:\n return await this.postEndpoint(undefined, data)\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 default:\n return await this.putEndpoint(undefined, data)\n }\n }\n}\n"],"mappings":"AAGA,SAAS,eAAe;AACxB,SAAS,kBAAkB;AAIpB,MAAM,kBAAkH,QAAW;AAAA,EAIxI,MAAM,OAAO,cAAoE;AAC/E,YAAQ,cAAc;AAAA,MACpB,KAAK;AACH,eAAO,MAAM,KAAK,eAAe,QAAW,OAAO;AAAA,MACrD;AACE,eAAO,MAAM,KAAK,eAAe,MAAS;AAAA,IAC9C;AAAA,EACF;AAAA,EAKA,MAAM,KAAK,QAAQ,CAAC,GAAG,cAAoE;AACzF,YAAQ,cAAc;AAAA,MACpB,KAAK;AACH,eAAO,MAAM,KAAK,YAAY,WAAW,KAAK,GAAG,OAAO;AAAA,MAC1D;AACE,eAAO,MAAM,KAAK,YAAY,WAAW,KAAK,CAAC;AAAA,IACnD;AAAA,EACF;AAAA,EAKA,MAAM,IAAI,cAAoE;AAC5E,YAAQ,cAAc;AAAA,MACpB,KAAK;AACH,eAAO,MAAM,KAAK,YAAY,QAAW,OAAO;AAAA,MAClD;AACE,eAAO,MAAM,KAAK,YAAY,MAAS;AAAA,IAC3C;AAAA,EACF;AAAA,EAKA,MAAM,KAAK,MAAU,cAAoE;AACvF,YAAQ,cAAc;AAAA,MACpB,KAAK;AACH,eAAO,MAAM,KAAK,aAAa,QAAW,MAAM,OAAO;AAAA,MACzD;AACE,eAAO,MAAM,KAAK,aAAa,QAAW,IAAI;AAAA,IAClD;AAAA,EACF;AAAA,EAKA,MAAM,IAAI,MAAU,cAAoE;AACtF,YAAQ,cAAc;AAAA,MACpB,KAAK;AACH,eAAO,MAAM,KAAK,YAAY,QAAW,MAAM,OAAO;AAAA,MACxD;AACE,eAAO,MAAM,KAAK,YAAY,QAAW,IAAI;AAAA,IACjD;AAAA,EACF;AACF;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Test/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA"}
|
|
@@ -1,33 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var testBoundWitness = {
|
|
4
|
-
_client: "js",
|
|
5
|
-
_hash: "b0ffb9ebf872dc316b7be48327256c5316f7cb84d7c706861b18b86af1942dea",
|
|
6
|
-
_signatures: ["95100e5fd2012b958e96895870cfac5353c3a33a19314cfd1304ef7d01d052ec2a3ef80d6449cf88d463027fe0d868ed8cfb8b7323d37e93a08570233eea0b17"],
|
|
7
|
-
_timestamp: 1650067385598,
|
|
8
|
-
addresses: ["5346a2ce56ec4177b67092bda710e150ba6fa046"],
|
|
9
|
-
payload_hashes: ["20e14207f952a09f767ff614a648546c037fe524ace0bfe55db31f818aff1f1c"],
|
|
10
|
-
payload_schemas: ["network.xyo.test"],
|
|
11
|
-
previous_hashes: [null],
|
|
12
|
-
schema: BoundWitnessSchema
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
// src/Test/testPayload.ts
|
|
16
|
-
var testSchema = "network.xyo.test";
|
|
17
|
-
var testPayload = {
|
|
18
|
-
_hash: "20e14207f952a09f767ff614a648546c037fe524ace0bfe55db31f818aff1f1c",
|
|
19
|
-
_timestamp: 1609459255555,
|
|
20
|
-
numberField: 1,
|
|
21
|
-
objectField: {
|
|
22
|
-
numberField: 1,
|
|
23
|
-
stringField: "stringValue"
|
|
24
|
-
},
|
|
25
|
-
schema: testSchema,
|
|
26
|
-
stringField: "stringValue"
|
|
27
|
-
};
|
|
28
|
-
export {
|
|
29
|
-
testBoundWitness,
|
|
30
|
-
testPayload,
|
|
31
|
-
testSchema
|
|
32
|
-
};
|
|
1
|
+
export * from "./testBoundWitness";
|
|
2
|
+
export * from "./testPayload";
|
|
33
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/Test/
|
|
1
|
+
{"version":3,"sources":["../../../src/Test/index.ts"],"sourcesContent":["export * from './testBoundWitness'\nexport * from './testPayload'\n"],"mappings":"AAAA,cAAc;AACd,cAAc;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testBoundWitness.d.ts","sourceRoot":"","sources":["../../../src/Test/testBoundWitness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAsB,MAAM,iCAAiC,CAAA;AAElF,QAAA,MAAM,gBAAgB,EAAE,YAUP,CAAA;AAEjB,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
// src/Test/testBoundWitness.ts
|
|
2
1
|
import { BoundWitnessSchema } from "@xyo-network/boundwitness-model";
|
|
3
|
-
|
|
2
|
+
const testBoundWitness = {
|
|
4
3
|
_client: "js",
|
|
5
4
|
_hash: "b0ffb9ebf872dc316b7be48327256c5316f7cb84d7c706861b18b86af1942dea",
|
|
6
5
|
_signatures: ["95100e5fd2012b958e96895870cfac5353c3a33a19314cfd1304ef7d01d052ec2a3ef80d6449cf88d463027fe0d868ed8cfb8b7323d37e93a08570233eea0b17"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/Test/testBoundWitness.ts"],"sourcesContent":["import { BoundWitness, BoundWitnessSchema } from '@xyo-network/boundwitness-model'\n\nconst testBoundWitness: BoundWitness = {\n _client: 'js',\n _hash: 'b0ffb9ebf872dc316b7be48327256c5316f7cb84d7c706861b18b86af1942dea',\n _signatures: ['95100e5fd2012b958e96895870cfac5353c3a33a19314cfd1304ef7d01d052ec2a3ef80d6449cf88d463027fe0d868ed8cfb8b7323d37e93a08570233eea0b17'],\n _timestamp: 1650067385598,\n addresses: ['5346a2ce56ec4177b67092bda710e150ba6fa046'],\n payload_hashes: ['20e14207f952a09f767ff614a648546c037fe524ace0bfe55db31f818aff1f1c'],\n payload_schemas: ['network.xyo.test'],\n previous_hashes: [null],\n schema: BoundWitnessSchema,\n} as BoundWitness\n\nexport { testBoundWitness }\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/Test/testBoundWitness.ts"],"sourcesContent":["import { BoundWitness, BoundWitnessSchema } from '@xyo-network/boundwitness-model'\n\nconst testBoundWitness: BoundWitness = {\n _client: 'js',\n _hash: 'b0ffb9ebf872dc316b7be48327256c5316f7cb84d7c706861b18b86af1942dea',\n _signatures: ['95100e5fd2012b958e96895870cfac5353c3a33a19314cfd1304ef7d01d052ec2a3ef80d6449cf88d463027fe0d868ed8cfb8b7323d37e93a08570233eea0b17'],\n _timestamp: 1650067385598,\n addresses: ['5346a2ce56ec4177b67092bda710e150ba6fa046'],\n payload_hashes: ['20e14207f952a09f767ff614a648546c037fe524ace0bfe55db31f818aff1f1c'],\n payload_schemas: ['network.xyo.test'],\n previous_hashes: [null],\n schema: BoundWitnessSchema,\n} as BoundWitness\n\nexport { testBoundWitness }\n"],"mappings":"AAAA,SAAuB,0BAA0B;AAEjD,MAAM,mBAAiC;AAAA,EACrC,SAAS;AAAA,EACT,OAAO;AAAA,EACP,aAAa,CAAC,kIAAkI;AAAA,EAChJ,YAAY;AAAA,EACZ,WAAW,CAAC,0CAA0C;AAAA,EACtD,gBAAgB,CAAC,kEAAkE;AAAA,EACnF,iBAAiB,CAAC,kBAAkB;AAAA,EACpC,iBAAiB,CAAC,IAAI;AAAA,EACtB,QAAQ;AACV;","names":[]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { StringKeyObject } from '@xyo-network/core';
|
|
2
|
+
import { Payload } from '@xyo-network/payload-model';
|
|
3
|
+
declare const testSchema = "network.xyo.test";
|
|
4
|
+
declare const testPayload: Payload<StringKeyObject>;
|
|
5
|
+
export { testPayload, testSchema };
|
|
6
|
+
//# sourceMappingURL=testPayload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testPayload.d.ts","sourceRoot":"","sources":["../../../src/Test/testPayload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,QAAA,MAAM,UAAU,qBAAqB,CAAA;AACrC,QAAA,MAAM,WAAW,EAAE,OAAO,CAAC,eAAe,CAUzC,CAAA;AAED,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var testPayload = {
|
|
1
|
+
const testSchema = "network.xyo.test";
|
|
2
|
+
const testPayload = {
|
|
4
3
|
_hash: "20e14207f952a09f767ff614a648546c037fe524ace0bfe55db31f818aff1f1c",
|
|
5
4
|
_timestamp: 1609459255555,
|
|
6
5
|
numberField: 1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/Test/testPayload.ts"],"sourcesContent":["import { StringKeyObject } from '@xyo-network/core'\nimport { Payload } from '@xyo-network/payload-model'\n\nconst testSchema = 'network.xyo.test'\nconst testPayload: Payload<StringKeyObject> = {\n _hash: '20e14207f952a09f767ff614a648546c037fe524ace0bfe55db31f818aff1f1c',\n _timestamp: 1609459255555,\n numberField: 1,\n objectField: {\n numberField: 1,\n stringField: 'stringValue',\n },\n schema: testSchema,\n stringField: 'stringValue',\n}\n\nexport { testPayload, testSchema }\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/Test/testPayload.ts"],"sourcesContent":["import { StringKeyObject } from '@xyo-network/core'\nimport { Payload } from '@xyo-network/payload-model'\n\nconst testSchema = 'network.xyo.test'\nconst testPayload: Payload<StringKeyObject> = {\n _hash: '20e14207f952a09f767ff614a648546c037fe524ace0bfe55db31f818aff1f1c',\n _timestamp: 1609459255555,\n numberField: 1,\n objectField: {\n numberField: 1,\n stringField: 'stringValue',\n },\n schema: testSchema,\n stringField: 'stringValue',\n}\n\nexport { testPayload, testSchema }\n"],"mappings":"AAGA,MAAM,aAAa;AACnB,MAAM,cAAwC;AAAA,EAC5C,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,aAAa;AAAA,IACX,aAAa;AAAA,IACb,aAAa;AAAA,EACf;AAAA,EACA,QAAQ;AAAA,EACR,aAAa;AACf;","names":[]}
|