@xyo-network/api 2.74.5 → 2.75.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/Api/Api.cjs +188 -0
- package/dist/browser/Api/Api.cjs.map +1 -0
- package/dist/browser/Api/Api.d.mts.map +1 -0
- package/dist/browser/Api/Api.d.ts.map +1 -0
- package/dist/browser/Api/Api.js +167 -0
- package/dist/browser/Api/Api.js.map +1 -0
- package/dist/browser/Api/index.cjs +190 -0
- package/dist/browser/Api/index.cjs.map +1 -0
- package/dist/browser/Api/index.d.mts.map +1 -0
- package/dist/browser/Api/index.d.ts.map +1 -0
- package/dist/browser/Api/index.js +167 -0
- package/dist/browser/Api/index.js.map +1 -0
- package/dist/browser/Base.cjs +123 -0
- package/dist/browser/Base.cjs.map +1 -0
- package/dist/browser/Base.d.mts.map +1 -0
- package/dist/browser/Base.d.ts.map +1 -0
- package/dist/browser/Base.js +102 -0
- package/dist/browser/Base.js.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/LocationDivinerApi.cjs +55 -0
- package/dist/browser/Diviner/LocationDiviner/LocationDivinerApi.cjs.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/LocationDivinerApi.d.mts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/LocationDivinerApi.d.ts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/LocationDivinerApi.js +34 -0
- package/dist/browser/Diviner/LocationDiviner/LocationDivinerApi.js.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.cjs +34 -0
- package/dist/browser/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.cjs.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.d.mts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.d.ts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.js +13 -0
- package/dist/browser/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.js.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.cjs +19 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.cjs.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.d.mts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.d.ts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.js +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.js.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.cjs +33 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.cjs.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.mts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.ts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.js +12 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.js.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.cjs +35 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.cjs.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.d.mts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.d.ts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.js +12 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.js.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.cjs +33 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.cjs.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.mts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.ts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.js +12 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.js.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.cjs +35 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.cjs.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.mts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.ts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.js +12 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.js.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.cjs +19 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.cjs.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.d.mts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.d.ts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.js +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.js.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.cjs +19 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.cjs.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.d.mts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.d.ts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.js +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.js.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuerySchema.cjs +34 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuerySchema.cjs.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuerySchema.d.mts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuerySchema.d.ts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuerySchema.js +13 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationQuerySchema.js.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.cjs +19 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.cjs.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.mts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.ts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.js +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.js.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.cjs +33 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.cjs.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.mts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.ts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.js +12 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.js.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.cjs +35 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.cjs.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.mts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.ts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.js +12 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.js.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/index.cjs +66 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/index.cjs.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/index.d.mts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/index.d.ts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/index.js +43 -0
- package/dist/browser/Diviner/LocationDiviner/Queries/index.js.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.cjs +27 -0
- package/dist/browser/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.cjs.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.d.mts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.d.ts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.js +6 -0
- package/dist/browser/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.js.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Witnesses/LocationWitness.cjs +27 -0
- package/dist/browser/Diviner/LocationDiviner/Witnesses/LocationWitness.cjs.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Witnesses/LocationWitness.d.mts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Witnesses/LocationWitness.d.ts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Witnesses/LocationWitness.js +6 -0
- package/dist/browser/Diviner/LocationDiviner/Witnesses/LocationWitness.js.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Witnesses/index.cjs +33 -0
- package/dist/browser/Diviner/LocationDiviner/Witnesses/index.cjs.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Witnesses/index.d.mts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Witnesses/index.d.ts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/Witnesses/index.js +10 -0
- package/dist/browser/Diviner/LocationDiviner/Witnesses/index.js.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/index.cjs +106 -0
- package/dist/browser/Diviner/LocationDiviner/index.cjs.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/index.d.mts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/index.d.ts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/index.js +83 -0
- package/dist/browser/Diviner/LocationDiviner/index.js.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/models.cjs +19 -0
- package/dist/browser/Diviner/LocationDiviner/models.cjs.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/models.d.mts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/models.d.ts.map +1 -0
- package/dist/browser/Diviner/LocationDiviner/models.js +1 -0
- package/dist/browser/Diviner/LocationDiviner/models.js.map +1 -0
- package/dist/browser/Diviner/RemoteDivinerConfig.cjs +27 -0
- package/dist/browser/Diviner/RemoteDivinerConfig.cjs.map +1 -0
- package/dist/browser/Diviner/RemoteDivinerConfig.d.mts.map +1 -0
- package/dist/browser/Diviner/RemoteDivinerConfig.d.ts.map +1 -0
- package/dist/browser/Diviner/RemoteDivinerConfig.js +6 -0
- package/dist/browser/Diviner/RemoteDivinerConfig.js.map +1 -0
- package/dist/browser/Diviner/RemoteDivinerError.cjs +35 -0
- package/dist/browser/Diviner/RemoteDivinerError.cjs.map +1 -0
- package/dist/browser/Diviner/RemoteDivinerError.d.mts.map +1 -0
- package/dist/browser/Diviner/RemoteDivinerError.d.ts.map +1 -0
- package/dist/browser/Diviner/RemoteDivinerError.js +14 -0
- package/dist/browser/Diviner/RemoteDivinerError.js.map +1 -0
- package/dist/browser/Diviner/index.cjs +110 -0
- package/dist/browser/Diviner/index.cjs.map +1 -0
- package/dist/browser/Diviner/index.d.mts.map +1 -0
- package/dist/browser/Diviner/index.d.ts.map +1 -0
- package/dist/browser/Diviner/index.js +87 -0
- package/dist/browser/Diviner/index.js.map +1 -0
- package/dist/browser/Simple.cjs +176 -0
- package/dist/browser/Simple.cjs.map +1 -0
- package/dist/browser/Simple.d.mts.map +1 -0
- package/dist/browser/Simple.d.ts.map +1 -0
- package/dist/browser/Simple.js +153 -0
- package/dist/browser/Simple.js.map +1 -0
- package/dist/browser/Test/index.cjs +56 -0
- package/dist/browser/Test/index.cjs.map +1 -0
- package/dist/browser/Test/index.d.mts.map +1 -0
- package/dist/browser/Test/index.d.ts.map +1 -0
- package/dist/browser/Test/index.js +33 -0
- package/dist/browser/Test/index.js.map +1 -0
- package/dist/browser/Test/testBoundWitness.cjs +38 -0
- package/dist/browser/Test/testBoundWitness.cjs.map +1 -0
- package/dist/browser/Test/testBoundWitness.d.mts.map +1 -0
- package/dist/browser/Test/testBoundWitness.d.ts.map +1 -0
- package/dist/browser/Test/testBoundWitness.js +17 -0
- package/dist/browser/Test/testBoundWitness.js.map +1 -0
- package/dist/browser/Test/testPayload.cjs +39 -0
- package/dist/browser/Test/testPayload.cjs.map +1 -0
- package/dist/browser/Test/testPayload.d.mts.map +1 -0
- package/dist/browser/Test/testPayload.d.ts.map +1 -0
- package/dist/browser/Test/testPayload.js +18 -0
- package/dist/browser/Test/testPayload.js.map +1 -0
- package/dist/browser/WithArchive.cjs +19 -0
- package/dist/browser/WithArchive.cjs.map +1 -0
- package/dist/browser/WithArchive.d.mts.map +1 -0
- package/dist/browser/WithArchive.d.ts.map +1 -0
- package/dist/browser/WithArchive.js +1 -0
- package/dist/browser/WithArchive.js.map +1 -0
- package/dist/{index.js → browser/index.cjs} +1 -21
- package/dist/browser/index.cjs.map +1 -0
- package/dist/browser/index.d.mts.map +1 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/{index.mjs → browser/index.js} +1 -1
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/models/ArchivePath.cjs +19 -0
- package/dist/browser/models/ArchivePath.cjs.map +1 -0
- package/dist/browser/models/ArchivePath.d.mts.map +1 -0
- package/dist/browser/models/ArchivePath.d.ts.map +1 -0
- package/dist/browser/models/ArchivePath.js +1 -0
- package/dist/browser/models/ArchivePath.js.map +1 -0
- package/dist/browser/models/index.cjs +19 -0
- package/dist/browser/models/index.cjs.map +1 -0
- package/dist/browser/models/index.d.mts.map +1 -0
- package/dist/browser/models/index.d.ts.map +1 -0
- package/dist/browser/models/index.js +1 -0
- package/dist/browser/models/index.js.map +1 -0
- package/dist/browser/objToQuery.cjs +31 -0
- package/dist/browser/objToQuery.cjs.map +1 -0
- package/dist/browser/objToQuery.d.mts.map +1 -0
- package/dist/browser/objToQuery.d.ts.map +1 -0
- package/dist/browser/objToQuery.js +10 -0
- package/dist/browser/objToQuery.js.map +1 -0
- package/dist/node/Api/Api.d.mts +12 -0
- package/dist/node/Api/Api.d.mts.map +1 -0
- package/dist/node/Api/Api.d.ts +12 -0
- package/dist/node/Api/Api.d.ts.map +1 -0
- package/dist/node/Api/Api.js +39 -0
- package/dist/node/Api/Api.js.map +1 -0
- package/dist/node/Api/Api.mjs +15 -0
- package/dist/node/Api/Api.mjs.map +1 -0
- package/dist/node/Api/index.d.mts +2 -0
- package/dist/node/Api/index.d.mts.map +1 -0
- package/dist/node/Api/index.d.ts +2 -0
- package/dist/node/Api/index.d.ts.map +1 -0
- package/dist/node/Api/index.js +23 -0
- package/dist/node/Api/index.js.map +1 -0
- package/dist/node/Api/index.mjs +2 -0
- package/dist/node/Api/index.mjs.map +1 -0
- package/dist/node/Base.d.mts +32 -0
- package/dist/node/Base.d.mts.map +1 -0
- package/dist/node/Base.d.ts +32 -0
- package/dist/node/Base.d.ts.map +1 -0
- package/dist/node/Base.js +125 -0
- package/dist/node/Base.js.map +1 -0
- package/dist/node/Base.mjs +101 -0
- package/dist/node/Base.mjs.map +1 -0
- package/dist/node/Diviner/LocationDiviner/LocationDivinerApi.d.mts +12 -0
- package/dist/node/Diviner/LocationDiviner/LocationDivinerApi.d.mts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/LocationDivinerApi.d.ts +12 -0
- package/dist/node/Diviner/LocationDiviner/LocationDivinerApi.d.ts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/LocationDivinerApi.js +47 -0
- package/dist/node/Diviner/LocationDiviner/LocationDivinerApi.js.map +1 -0
- package/dist/node/Diviner/LocationDiviner/LocationDivinerApi.mjs +23 -0
- package/dist/node/Diviner/LocationDiviner/LocationDivinerApi.mjs.map +1 -0
- package/dist/node/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.d.mts +10 -0
- package/dist/node/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.d.mts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.d.ts +10 -0
- package/dist/node/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.d.ts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.js +37 -0
- package/dist/node/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.js.map +1 -0
- package/dist/node/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.mjs +12 -0
- package/dist/node/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.mjs.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.d.mts +5 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.d.mts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.d.ts +5 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.d.ts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.js +17 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.js.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.mjs +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.mjs.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.mts +12 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.mts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.ts +12 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.ts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.js +37 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.js.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.mjs +11 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.mjs.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.d.mts +3 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.d.mts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.d.ts +3 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.d.ts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.js +25 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.js.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.mjs +3 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.mjs.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.mts +12 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.mts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.ts +12 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.ts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.js +37 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.js.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.mjs +11 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.mjs.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.mts +2 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.mts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.ts +2 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.ts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.js +23 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.js.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.mjs +2 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.mjs.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.d.mts +18 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.d.mts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.d.ts +18 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.d.ts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.js +17 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.js.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.mjs +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.mjs.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.d.mts +5 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.d.mts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.d.ts +5 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.d.ts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.js +17 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.js.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.mjs +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.mjs.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuerySchema.d.mts +6 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuerySchema.d.mts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuerySchema.d.ts +6 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuerySchema.d.ts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuerySchema.js +36 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuerySchema.js.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuerySchema.mjs +12 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationQuerySchema.mjs.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.mts +8 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.mts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.ts +8 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.ts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.js +17 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.js.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.mjs +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.mjs.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.mts +12 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.mts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.ts +12 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.ts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.js +37 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.js.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.mjs +11 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.mjs.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.mts +3 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.mts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.ts +3 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.ts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.js +25 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.js.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.mjs +3 -0
- package/dist/node/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.mjs.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/index.d.mts +7 -0
- package/dist/node/Diviner/LocationDiviner/Queries/index.d.mts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/index.d.ts +7 -0
- package/dist/node/Diviner/LocationDiviner/Queries/index.d.ts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/index.js +33 -0
- package/dist/node/Diviner/LocationDiviner/Queries/index.js.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Queries/index.mjs +7 -0
- package/dist/node/Diviner/LocationDiviner/Queries/index.mjs.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.d.mts +13 -0
- package/dist/node/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.d.mts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.d.ts +13 -0
- package/dist/node/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.d.ts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.js +29 -0
- package/dist/node/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.js.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.mjs +5 -0
- package/dist/node/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.mjs.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Witnesses/LocationWitness.d.mts +21 -0
- package/dist/node/Diviner/LocationDiviner/Witnesses/LocationWitness.d.mts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Witnesses/LocationWitness.d.ts +21 -0
- package/dist/node/Diviner/LocationDiviner/Witnesses/LocationWitness.d.ts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Witnesses/LocationWitness.js +29 -0
- package/dist/node/Diviner/LocationDiviner/Witnesses/LocationWitness.js.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Witnesses/LocationWitness.mjs +5 -0
- package/dist/node/Diviner/LocationDiviner/Witnesses/LocationWitness.mjs.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Witnesses/index.d.mts +3 -0
- package/dist/node/Diviner/LocationDiviner/Witnesses/index.d.mts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Witnesses/index.d.ts +3 -0
- package/dist/node/Diviner/LocationDiviner/Witnesses/index.d.ts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Witnesses/index.js +25 -0
- package/dist/node/Diviner/LocationDiviner/Witnesses/index.js.map +1 -0
- package/dist/node/Diviner/LocationDiviner/Witnesses/index.mjs +3 -0
- package/dist/node/Diviner/LocationDiviner/Witnesses/index.mjs.map +1 -0
- package/dist/node/Diviner/LocationDiviner/index.d.mts +5 -0
- package/dist/node/Diviner/LocationDiviner/index.d.mts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/index.d.ts +5 -0
- package/dist/node/Diviner/LocationDiviner/index.d.ts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/index.js +29 -0
- package/dist/node/Diviner/LocationDiviner/index.js.map +1 -0
- package/dist/node/Diviner/LocationDiviner/index.mjs +5 -0
- package/dist/node/Diviner/LocationDiviner/index.mjs.map +1 -0
- package/dist/node/Diviner/LocationDiviner/models.d.mts +5 -0
- package/dist/node/Diviner/LocationDiviner/models.d.mts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/models.d.ts +5 -0
- package/dist/node/Diviner/LocationDiviner/models.d.ts.map +1 -0
- package/dist/node/Diviner/LocationDiviner/models.js +17 -0
- package/dist/node/Diviner/LocationDiviner/models.js.map +1 -0
- package/dist/node/Diviner/LocationDiviner/models.mjs +1 -0
- package/dist/node/Diviner/LocationDiviner/models.mjs.map +1 -0
- package/dist/node/Diviner/RemoteDivinerConfig.d.mts +11 -0
- package/dist/node/Diviner/RemoteDivinerConfig.d.mts.map +1 -0
- package/dist/node/Diviner/RemoteDivinerConfig.d.ts +11 -0
- package/dist/node/Diviner/RemoteDivinerConfig.d.ts.map +1 -0
- package/dist/node/Diviner/RemoteDivinerConfig.js +29 -0
- package/dist/node/Diviner/RemoteDivinerConfig.js.map +1 -0
- package/dist/node/Diviner/RemoteDivinerConfig.mjs +5 -0
- package/dist/node/Diviner/RemoteDivinerConfig.mjs.map +1 -0
- package/dist/node/Diviner/RemoteDivinerError.d.mts +6 -0
- package/dist/node/Diviner/RemoteDivinerError.d.mts.map +1 -0
- package/dist/node/Diviner/RemoteDivinerError.d.ts +6 -0
- package/dist/node/Diviner/RemoteDivinerError.d.ts.map +1 -0
- package/dist/node/Diviner/RemoteDivinerError.js +37 -0
- package/dist/node/Diviner/RemoteDivinerError.js.map +1 -0
- package/dist/node/Diviner/RemoteDivinerError.mjs +13 -0
- package/dist/node/Diviner/RemoteDivinerError.mjs.map +1 -0
- package/dist/node/Diviner/index.d.mts +3 -0
- package/dist/node/Diviner/index.d.mts.map +1 -0
- package/dist/node/Diviner/index.d.ts +3 -0
- package/dist/node/Diviner/index.d.ts.map +1 -0
- package/dist/node/Diviner/index.js +25 -0
- package/dist/node/Diviner/index.js.map +1 -0
- package/dist/node/Diviner/index.mjs +3 -0
- package/dist/node/Diviner/index.mjs.map +1 -0
- package/dist/node/Simple.d.mts +22 -0
- package/dist/node/Simple.d.mts.map +1 -0
- package/dist/node/Simple.d.ts +22 -0
- package/dist/node/Simple.d.ts.map +1 -0
- package/dist/node/Simple.js +72 -0
- package/dist/node/Simple.js.map +1 -0
- package/dist/node/Simple.mjs +48 -0
- package/dist/node/Simple.mjs.map +1 -0
- package/dist/node/Test/index.d.mts +3 -0
- package/dist/node/Test/index.d.mts.map +1 -0
- package/dist/node/Test/index.d.ts +3 -0
- package/dist/node/Test/index.d.ts.map +1 -0
- package/dist/node/Test/index.js +25 -0
- package/dist/node/Test/index.js.map +1 -0
- package/dist/node/Test/index.mjs +3 -0
- package/dist/node/Test/index.mjs.map +1 -0
- package/dist/node/Test/testBoundWitness.d.mts +4 -0
- package/dist/node/Test/testBoundWitness.d.mts.map +1 -0
- package/dist/node/Test/testBoundWitness.d.ts +4 -0
- package/dist/node/Test/testBoundWitness.d.ts.map +1 -0
- package/dist/node/Test/testBoundWitness.js +40 -0
- package/dist/node/Test/testBoundWitness.js.map +1 -0
- package/dist/node/Test/testBoundWitness.mjs +16 -0
- package/dist/node/Test/testBoundWitness.mjs.map +1 -0
- package/dist/node/Test/testPayload.d.mts +6 -0
- package/dist/node/Test/testPayload.d.mts.map +1 -0
- package/dist/node/Test/testPayload.d.ts +6 -0
- package/dist/node/Test/testPayload.d.ts.map +1 -0
- package/dist/node/Test/testPayload.js +42 -0
- package/dist/node/Test/testPayload.js.map +1 -0
- package/dist/node/Test/testPayload.mjs +17 -0
- package/dist/node/Test/testPayload.mjs.map +1 -0
- package/dist/node/WithArchive.d.mts +4 -0
- package/dist/node/WithArchive.d.mts.map +1 -0
- package/dist/node/WithArchive.d.ts +4 -0
- package/dist/node/WithArchive.d.ts.map +1 -0
- package/dist/node/WithArchive.js +17 -0
- package/dist/node/WithArchive.js.map +1 -0
- package/dist/node/WithArchive.mjs +1 -0
- package/dist/node/WithArchive.mjs.map +1 -0
- package/dist/node/index.d.mts +7 -0
- package/dist/node/index.d.mts.map +1 -0
- package/dist/node/index.d.ts +7 -0
- package/dist/node/index.d.ts.map +1 -0
- package/dist/node/index.js +33 -0
- package/dist/node/index.js.map +1 -0
- package/dist/node/index.mjs +7 -0
- package/dist/node/index.mjs.map +1 -0
- package/dist/node/models/ArchivePath.d.mts +4 -0
- package/dist/node/models/ArchivePath.d.mts.map +1 -0
- package/dist/node/models/ArchivePath.d.ts +4 -0
- package/dist/node/models/ArchivePath.d.ts.map +1 -0
- package/dist/node/models/ArchivePath.js +17 -0
- package/dist/node/models/ArchivePath.js.map +1 -0
- package/dist/node/models/ArchivePath.mjs +1 -0
- package/dist/node/models/ArchivePath.mjs.map +1 -0
- package/dist/node/models/index.d.mts +2 -0
- package/dist/node/models/index.d.mts.map +1 -0
- package/dist/node/models/index.d.ts +2 -0
- package/dist/node/models/index.d.ts.map +1 -0
- package/dist/node/models/index.js +23 -0
- package/dist/node/models/index.js.map +1 -0
- package/dist/node/models/index.mjs +2 -0
- package/dist/node/models/index.mjs.map +1 -0
- package/dist/node/objToQuery.d.mts +2 -0
- package/dist/node/objToQuery.d.mts.map +1 -0
- package/dist/node/objToQuery.d.ts +2 -0
- package/dist/node/objToQuery.d.ts.map +1 -0
- package/dist/node/objToQuery.js +33 -0
- package/dist/node/objToQuery.js.map +1 -0
- package/dist/node/objToQuery.mjs +9 -0
- package/dist/node/objToQuery.mjs.map +1 -0
- package/package.json +32 -29
- package/dist/Api/Api.d.mts.map +0 -1
- package/dist/Api/Api.d.ts.map +0 -1
- package/dist/Api/index.d.mts.map +0 -1
- package/dist/Api/index.d.ts.map +0 -1
- package/dist/Base.d.mts.map +0 -1
- package/dist/Base.d.ts.map +0 -1
- package/dist/Diviner/LocationDiviner/LocationDivinerApi.d.mts.map +0 -1
- package/dist/Diviner/LocationDiviner/LocationDivinerApi.d.ts.map +0 -1
- package/dist/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.d.mts.map +0 -1
- package/dist/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.d.ts.map +0 -1
- package/dist/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.d.mts.map +0 -1
- package/dist/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.d.ts.map +0 -1
- package/dist/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.mts.map +0 -1
- package/dist/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.ts.map +0 -1
- package/dist/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.d.mts.map +0 -1
- package/dist/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.d.ts.map +0 -1
- package/dist/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.mts.map +0 -1
- package/dist/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.ts.map +0 -1
- package/dist/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.mts.map +0 -1
- package/dist/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.ts.map +0 -1
- package/dist/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.d.mts.map +0 -1
- package/dist/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.d.ts.map +0 -1
- package/dist/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.d.mts.map +0 -1
- package/dist/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.d.ts.map +0 -1
- package/dist/Diviner/LocationDiviner/Queries/LocationQuerySchema.d.mts.map +0 -1
- package/dist/Diviner/LocationDiviner/Queries/LocationQuerySchema.d.ts.map +0 -1
- package/dist/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.mts.map +0 -1
- package/dist/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.ts.map +0 -1
- package/dist/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.mts.map +0 -1
- package/dist/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.ts.map +0 -1
- package/dist/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.mts.map +0 -1
- package/dist/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.ts.map +0 -1
- package/dist/Diviner/LocationDiviner/Queries/index.d.mts.map +0 -1
- package/dist/Diviner/LocationDiviner/Queries/index.d.ts.map +0 -1
- package/dist/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.d.mts.map +0 -1
- package/dist/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.d.ts.map +0 -1
- package/dist/Diviner/LocationDiviner/Witnesses/LocationWitness.d.mts.map +0 -1
- package/dist/Diviner/LocationDiviner/Witnesses/LocationWitness.d.ts.map +0 -1
- package/dist/Diviner/LocationDiviner/Witnesses/index.d.mts.map +0 -1
- package/dist/Diviner/LocationDiviner/Witnesses/index.d.ts.map +0 -1
- package/dist/Diviner/LocationDiviner/index.d.mts.map +0 -1
- package/dist/Diviner/LocationDiviner/index.d.ts.map +0 -1
- package/dist/Diviner/LocationDiviner/models.d.mts.map +0 -1
- package/dist/Diviner/LocationDiviner/models.d.ts.map +0 -1
- package/dist/Diviner/RemoteDivinerConfig.d.mts.map +0 -1
- package/dist/Diviner/RemoteDivinerConfig.d.ts.map +0 -1
- package/dist/Diviner/RemoteDivinerError.d.mts.map +0 -1
- package/dist/Diviner/RemoteDivinerError.d.ts.map +0 -1
- package/dist/Diviner/index.d.mts.map +0 -1
- package/dist/Diviner/index.d.ts.map +0 -1
- package/dist/Simple.d.mts.map +0 -1
- package/dist/Simple.d.ts.map +0 -1
- package/dist/Test/index.d.mts.map +0 -1
- package/dist/Test/index.d.ts.map +0 -1
- package/dist/Test/testBoundWitness.d.mts.map +0 -1
- package/dist/Test/testBoundWitness.d.ts.map +0 -1
- package/dist/Test/testPayload.d.mts.map +0 -1
- package/dist/Test/testPayload.d.ts.map +0 -1
- package/dist/WithArchive.d.mts.map +0 -1
- package/dist/WithArchive.d.ts.map +0 -1
- package/dist/docs.json +0 -16171
- package/dist/index.d.mts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/models/ArchivePath.d.mts.map +0 -1
- package/dist/models/ArchivePath.d.ts.map +0 -1
- package/dist/models/index.d.mts.map +0 -1
- package/dist/models/index.d.ts.map +0 -1
- package/dist/objToQuery.d.mts.map +0 -1
- package/dist/objToQuery.d.ts.map +0 -1
- /package/dist/{Api → browser/Api}/Api.d.mts +0 -0
- /package/dist/{Api → browser/Api}/Api.d.ts +0 -0
- /package/dist/{Api → browser/Api}/index.d.mts +0 -0
- /package/dist/{Api → browser/Api}/index.d.ts +0 -0
- /package/dist/{Base.d.mts → browser/Base.d.mts} +0 -0
- /package/dist/{Base.d.ts → browser/Base.d.ts} +0 -0
- /package/dist/{Diviner → browser/Diviner}/LocationDiviner/LocationDivinerApi.d.mts +0 -0
- /package/dist/{Diviner → browser/Diviner}/LocationDiviner/LocationDivinerApi.d.ts +0 -0
- /package/dist/{Diviner → browser/Diviner}/LocationDiviner/LocationDivinerApiResponseTransformer.d.mts +0 -0
- /package/dist/{Diviner → browser/Diviner}/LocationDiviner/LocationDivinerApiResponseTransformer.d.ts +0 -0
- /package/dist/{Diviner → browser/Diviner}/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.d.mts +0 -0
- /package/dist/{Diviner → browser/Diviner}/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.d.ts +0 -0
- /package/dist/{Diviner → browser/Diviner}/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.mts +0 -0
- /package/dist/{Diviner → browser/Diviner}/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.ts +0 -0
- /package/dist/{Diviner → browser/Diviner}/LocationDiviner/Queries/LocationHeatmapQuery/index.d.mts +0 -0
- /package/dist/{Diviner → browser/Diviner}/LocationDiviner/Queries/LocationHeatmapQuery/index.d.ts +0 -0
- /package/dist/{Diviner → browser/Diviner}/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.mts +0 -0
- /package/dist/{Diviner → browser/Diviner}/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.ts +0 -0
- /package/dist/{Diviner → browser/Diviner}/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.mts +0 -0
- /package/dist/{Diviner → browser/Diviner}/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.ts +0 -0
- /package/dist/{Diviner → browser/Diviner}/LocationDiviner/Queries/LocationQueryCreationRequest.d.mts +0 -0
- /package/dist/{Diviner → browser/Diviner}/LocationDiviner/Queries/LocationQueryCreationRequest.d.ts +0 -0
- /package/dist/{Diviner → browser/Diviner}/LocationDiviner/Queries/LocationQueryCreationResponse.d.mts +0 -0
- /package/dist/{Diviner → browser/Diviner}/LocationDiviner/Queries/LocationQueryCreationResponse.d.ts +0 -0
- /package/dist/{Diviner → browser/Diviner}/LocationDiviner/Queries/LocationQuerySchema.d.mts +0 -0
- /package/dist/{Diviner → browser/Diviner}/LocationDiviner/Queries/LocationQuerySchema.d.ts +0 -0
- /package/dist/{Diviner → browser/Diviner}/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.mts +0 -0
- /package/dist/{Diviner → browser/Diviner}/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.ts +0 -0
- /package/dist/{Diviner → browser/Diviner}/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.mts +0 -0
- /package/dist/{Diviner → browser/Diviner}/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.ts +0 -0
- /package/dist/{Diviner → browser/Diviner}/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.mts +0 -0
- /package/dist/{Diviner → browser/Diviner}/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.ts +0 -0
- /package/dist/{Diviner → browser/Diviner}/LocationDiviner/Queries/index.d.mts +0 -0
- /package/dist/{Diviner → browser/Diviner}/LocationDiviner/Queries/index.d.ts +0 -0
- /package/dist/{Diviner → browser/Diviner}/LocationDiviner/Witnesses/CurrentLocationWitness.d.mts +0 -0
- /package/dist/{Diviner → browser/Diviner}/LocationDiviner/Witnesses/CurrentLocationWitness.d.ts +0 -0
- /package/dist/{Diviner → browser/Diviner}/LocationDiviner/Witnesses/LocationWitness.d.mts +0 -0
- /package/dist/{Diviner → browser/Diviner}/LocationDiviner/Witnesses/LocationWitness.d.ts +0 -0
- /package/dist/{Diviner → browser/Diviner}/LocationDiviner/Witnesses/index.d.mts +0 -0
- /package/dist/{Diviner → browser/Diviner}/LocationDiviner/Witnesses/index.d.ts +0 -0
- /package/dist/{Diviner → browser/Diviner}/LocationDiviner/index.d.mts +0 -0
- /package/dist/{Diviner → browser/Diviner}/LocationDiviner/index.d.ts +0 -0
- /package/dist/{Diviner → browser/Diviner}/LocationDiviner/models.d.mts +0 -0
- /package/dist/{Diviner → browser/Diviner}/LocationDiviner/models.d.ts +0 -0
- /package/dist/{Diviner → browser/Diviner}/RemoteDivinerConfig.d.mts +0 -0
- /package/dist/{Diviner → browser/Diviner}/RemoteDivinerConfig.d.ts +0 -0
- /package/dist/{Diviner → browser/Diviner}/RemoteDivinerError.d.mts +0 -0
- /package/dist/{Diviner → browser/Diviner}/RemoteDivinerError.d.ts +0 -0
- /package/dist/{Diviner → browser/Diviner}/index.d.mts +0 -0
- /package/dist/{Diviner → browser/Diviner}/index.d.ts +0 -0
- /package/dist/{Simple.d.mts → browser/Simple.d.mts} +0 -0
- /package/dist/{Simple.d.ts → browser/Simple.d.ts} +0 -0
- /package/dist/{Test → browser/Test}/index.d.mts +0 -0
- /package/dist/{Test → browser/Test}/index.d.ts +0 -0
- /package/dist/{Test → browser/Test}/testBoundWitness.d.mts +0 -0
- /package/dist/{Test → browser/Test}/testBoundWitness.d.ts +0 -0
- /package/dist/{Test → browser/Test}/testPayload.d.mts +0 -0
- /package/dist/{Test → browser/Test}/testPayload.d.ts +0 -0
- /package/dist/{WithArchive.d.mts → browser/WithArchive.d.mts} +0 -0
- /package/dist/{WithArchive.d.ts → browser/WithArchive.d.ts} +0 -0
- /package/dist/{index.d.mts → browser/index.d.mts} +0 -0
- /package/dist/{index.d.ts → browser/index.d.ts} +0 -0
- /package/dist/{models → browser/models}/ArchivePath.d.mts +0 -0
- /package/dist/{models → browser/models}/ArchivePath.d.ts +0 -0
- /package/dist/{models → browser/models}/index.d.mts +0 -0
- /package/dist/{models → browser/models}/index.d.ts +0 -0
- /package/dist/{objToQuery.d.mts → browser/objToQuery.d.mts} +0 -0
- /package/dist/{objToQuery.d.ts → browser/objToQuery.d.ts} +0 -0
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/Api/Api.ts
|
|
21
|
+
var Api_exports = {};
|
|
22
|
+
__export(Api_exports, {
|
|
23
|
+
ArchivistApi: () => ArchivistApi
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(Api_exports);
|
|
26
|
+
var import_huri = require("@xyo-network/huri");
|
|
27
|
+
|
|
28
|
+
// src/Base.ts
|
|
29
|
+
var import_axios = require("@xyo-network/axios");
|
|
30
|
+
var ApiBase = class _ApiBase {
|
|
31
|
+
config;
|
|
32
|
+
axios;
|
|
33
|
+
constructor(config) {
|
|
34
|
+
this.config = config;
|
|
35
|
+
this.axios = new import_axios.AxiosJson({ ...this.config, headers: this.headers });
|
|
36
|
+
}
|
|
37
|
+
get authenticated() {
|
|
38
|
+
return !!this.config.apiKey || !!this.config.jwtToken;
|
|
39
|
+
}
|
|
40
|
+
get headers() {
|
|
41
|
+
const headers = {};
|
|
42
|
+
if (this.config.jwtToken) {
|
|
43
|
+
headers.Authorization = `Bearer ${this.config.jwtToken}`;
|
|
44
|
+
}
|
|
45
|
+
if (this.config.apiKey) {
|
|
46
|
+
headers["x-api-key"] = this.config.apiKey;
|
|
47
|
+
}
|
|
48
|
+
return headers;
|
|
49
|
+
}
|
|
50
|
+
get query() {
|
|
51
|
+
return this.config.query ?? "";
|
|
52
|
+
}
|
|
53
|
+
get root() {
|
|
54
|
+
return this.config.root ?? "/";
|
|
55
|
+
}
|
|
56
|
+
static resolveResponse(result) {
|
|
57
|
+
return [result?.data?.data, result?.data, result];
|
|
58
|
+
}
|
|
59
|
+
static shapeResponse(response, responseType) {
|
|
60
|
+
const resolvedResponse = _ApiBase.resolveResponse(response);
|
|
61
|
+
return responseType === "tuple" ? resolvedResponse : resolvedResponse[0];
|
|
62
|
+
}
|
|
63
|
+
onError(error, depth = 0) {
|
|
64
|
+
this.config.reportableParent?.onError?.(error, depth + 1);
|
|
65
|
+
this.config.onError?.(error, depth);
|
|
66
|
+
}
|
|
67
|
+
onFailure(response, depth = 0) {
|
|
68
|
+
this.config.reportableParent?.onFailure?.(response, depth + 1);
|
|
69
|
+
this.config.onFailure?.(response, depth);
|
|
70
|
+
}
|
|
71
|
+
onSuccess(response, depth = 0) {
|
|
72
|
+
this.config.reportableParent?.onSuccess?.(response, depth + 1);
|
|
73
|
+
this.config.onSuccess?.(response, depth);
|
|
74
|
+
}
|
|
75
|
+
async deleteEndpoint(endPoint = "", responseType) {
|
|
76
|
+
const response = await this.monitorResponse(async () => {
|
|
77
|
+
return await this.axios.delete(`${this.resolveRoot()}${endPoint}${this.query}`);
|
|
78
|
+
});
|
|
79
|
+
return _ApiBase.shapeResponse(response, responseType);
|
|
80
|
+
}
|
|
81
|
+
async getEndpoint(endPoint = "", responseType) {
|
|
82
|
+
const response = await this.monitorResponse(async () => {
|
|
83
|
+
return await this.axios.get(`${this.resolveRoot()}${endPoint}${this.query}`);
|
|
84
|
+
});
|
|
85
|
+
return _ApiBase.shapeResponse(response, responseType);
|
|
86
|
+
}
|
|
87
|
+
handleMonitorResponseError(error, trapAxiosException) {
|
|
88
|
+
if (!error.isError) {
|
|
89
|
+
throw error;
|
|
90
|
+
}
|
|
91
|
+
if (trapAxiosException) {
|
|
92
|
+
error.response ? this.onFailure(error.response) : this.onError(error);
|
|
93
|
+
if (this.config.throwFailure) {
|
|
94
|
+
throw error;
|
|
95
|
+
}
|
|
96
|
+
return error.response;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
async monitorResponse(closure) {
|
|
100
|
+
let trapAxiosException = true;
|
|
101
|
+
try {
|
|
102
|
+
const response = await closure();
|
|
103
|
+
trapAxiosException = false;
|
|
104
|
+
response.status < 300 ? this.onSuccess(response) : this.onFailure(response);
|
|
105
|
+
return response;
|
|
106
|
+
} catch (ex) {
|
|
107
|
+
this.handleMonitorResponseError(ex, trapAxiosException);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
async postEndpoint(endPoint = "", data, responseType) {
|
|
111
|
+
const response = await this.monitorResponse(async () => {
|
|
112
|
+
return await this.axios.post(`${this.resolveRoot()}${endPoint}${this.query}`, data);
|
|
113
|
+
});
|
|
114
|
+
return _ApiBase.shapeResponse(response, responseType);
|
|
115
|
+
}
|
|
116
|
+
async putEndpoint(endPoint = "", data, responseType) {
|
|
117
|
+
const response = await this.monitorResponse(async () => {
|
|
118
|
+
return await this.axios.put(`${this.resolveRoot()}${endPoint}${this.query}`, data);
|
|
119
|
+
});
|
|
120
|
+
return _ApiBase.shapeResponse(response, responseType);
|
|
121
|
+
}
|
|
122
|
+
resolveRoot() {
|
|
123
|
+
return `${this.config.apiDomain}${this.root}`;
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
// src/objToQuery.ts
|
|
128
|
+
var objToQuery = (obj) => {
|
|
129
|
+
return `?${Object.entries(obj).map(([key, value]) => {
|
|
130
|
+
return `${key}=${value}`;
|
|
131
|
+
}).filter((value) => value !== void 0).join("&")}`;
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
// src/Simple.ts
|
|
135
|
+
var ApiSimple = class extends ApiBase {
|
|
136
|
+
async delete(responseType) {
|
|
137
|
+
switch (responseType) {
|
|
138
|
+
case "tuple":
|
|
139
|
+
return await this.deleteEndpoint(void 0, "tuple");
|
|
140
|
+
default:
|
|
141
|
+
return await this.deleteEndpoint(void 0);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
async find(query = {}, responseType) {
|
|
145
|
+
switch (responseType) {
|
|
146
|
+
case "tuple":
|
|
147
|
+
return await this.getEndpoint(objToQuery(query), "tuple");
|
|
148
|
+
default:
|
|
149
|
+
return await this.getEndpoint(objToQuery(query));
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
async get(responseType) {
|
|
153
|
+
switch (responseType) {
|
|
154
|
+
case "tuple":
|
|
155
|
+
return await this.getEndpoint(void 0, "tuple");
|
|
156
|
+
default:
|
|
157
|
+
return await this.getEndpoint(void 0);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
async post(data, responseType) {
|
|
161
|
+
switch (responseType) {
|
|
162
|
+
case "tuple":
|
|
163
|
+
return await this.postEndpoint(void 0, data, "tuple");
|
|
164
|
+
default:
|
|
165
|
+
return await this.postEndpoint(void 0, data);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
async put(data, responseType) {
|
|
169
|
+
switch (responseType) {
|
|
170
|
+
case "tuple":
|
|
171
|
+
return await this.putEndpoint(void 0, data, "tuple");
|
|
172
|
+
default:
|
|
173
|
+
return await this.putEndpoint(void 0, data);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
// src/Api/Api.ts
|
|
179
|
+
var ArchivistApi = class extends ApiSimple {
|
|
180
|
+
huri(huri) {
|
|
181
|
+
const huriObj = typeof huri === "string" ? new import_huri.Huri(huri) : huri;
|
|
182
|
+
return new ApiSimple({
|
|
183
|
+
...this.config,
|
|
184
|
+
root: `${this.root}${huriObj.href}/`
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
//# sourceMappingURL=Api.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/Api/Api.ts","../../../src/Base.ts","../../../src/objToQuery.ts","../../../src/Simple.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 {\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":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,kBAAqB;;;ACUrB,mBAA0B;AAEnB,IAAM,UAAN,MAAM,SAAkE;AAAA,EACpE;AAAA,EACC;AAAA,EAEV,YAAY,QAAW;AACrB,SAAK,SAAS;AACd,SAAK,QAAQ,IAAI,uBAAU,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;A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eAAO,MAAM,KAAK,YAAY,QAAW,IAAI;AAAA,IACjD;AAAA,EACF;AACF;;;AH9DO,IAAM,eAAN,cAA4D,UAAwB;AAAA,EACzF,KAAK,MAAqB;AACxB,UAAM,UAAU,OAAO,SAAS,WAAW,IAAI,iBAAK,IAAI,IAAI;AAC5D,WAAO,IAAI,UAAmB;AAAA,MAC5B,GAAG,KAAK;AAAA,MACR,MAAM,GAAG,KAAK,IAAI,GAAG,QAAQ,IAAI;AAAA,IACnC,CAAC;AAAA,EACH;AACF;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Api.d.ts","sourceRoot":"","sources":["../../../src/Api/Api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAErC,qBAAa,YAAY,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,CAAE,SAAQ,SAAS,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACxF,IAAI,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;;;;;CAOzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Api.d.ts","sourceRoot":"","sources":["../../../src/Api/Api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAErC,qBAAa,YAAY,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,CAAE,SAAQ,SAAS,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACxF,IAAI,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;;;;;CAOzB"}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
// src/Api/Api.ts
|
|
2
|
+
import { Huri } from "@xyo-network/huri";
|
|
3
|
+
|
|
4
|
+
// src/Base.ts
|
|
5
|
+
import { AxiosJson } from "@xyo-network/axios";
|
|
6
|
+
var ApiBase = class _ApiBase {
|
|
7
|
+
config;
|
|
8
|
+
axios;
|
|
9
|
+
constructor(config) {
|
|
10
|
+
this.config = config;
|
|
11
|
+
this.axios = new AxiosJson({ ...this.config, headers: this.headers });
|
|
12
|
+
}
|
|
13
|
+
get authenticated() {
|
|
14
|
+
return !!this.config.apiKey || !!this.config.jwtToken;
|
|
15
|
+
}
|
|
16
|
+
get headers() {
|
|
17
|
+
const headers = {};
|
|
18
|
+
if (this.config.jwtToken) {
|
|
19
|
+
headers.Authorization = `Bearer ${this.config.jwtToken}`;
|
|
20
|
+
}
|
|
21
|
+
if (this.config.apiKey) {
|
|
22
|
+
headers["x-api-key"] = this.config.apiKey;
|
|
23
|
+
}
|
|
24
|
+
return headers;
|
|
25
|
+
}
|
|
26
|
+
get query() {
|
|
27
|
+
return this.config.query ?? "";
|
|
28
|
+
}
|
|
29
|
+
get root() {
|
|
30
|
+
return this.config.root ?? "/";
|
|
31
|
+
}
|
|
32
|
+
static resolveResponse(result) {
|
|
33
|
+
return [result?.data?.data, result?.data, result];
|
|
34
|
+
}
|
|
35
|
+
static shapeResponse(response, responseType) {
|
|
36
|
+
const resolvedResponse = _ApiBase.resolveResponse(response);
|
|
37
|
+
return responseType === "tuple" ? resolvedResponse : resolvedResponse[0];
|
|
38
|
+
}
|
|
39
|
+
onError(error, depth = 0) {
|
|
40
|
+
this.config.reportableParent?.onError?.(error, depth + 1);
|
|
41
|
+
this.config.onError?.(error, depth);
|
|
42
|
+
}
|
|
43
|
+
onFailure(response, depth = 0) {
|
|
44
|
+
this.config.reportableParent?.onFailure?.(response, depth + 1);
|
|
45
|
+
this.config.onFailure?.(response, depth);
|
|
46
|
+
}
|
|
47
|
+
onSuccess(response, depth = 0) {
|
|
48
|
+
this.config.reportableParent?.onSuccess?.(response, depth + 1);
|
|
49
|
+
this.config.onSuccess?.(response, depth);
|
|
50
|
+
}
|
|
51
|
+
async deleteEndpoint(endPoint = "", responseType) {
|
|
52
|
+
const response = await this.monitorResponse(async () => {
|
|
53
|
+
return await this.axios.delete(`${this.resolveRoot()}${endPoint}${this.query}`);
|
|
54
|
+
});
|
|
55
|
+
return _ApiBase.shapeResponse(response, responseType);
|
|
56
|
+
}
|
|
57
|
+
async getEndpoint(endPoint = "", responseType) {
|
|
58
|
+
const response = await this.monitorResponse(async () => {
|
|
59
|
+
return await this.axios.get(`${this.resolveRoot()}${endPoint}${this.query}`);
|
|
60
|
+
});
|
|
61
|
+
return _ApiBase.shapeResponse(response, responseType);
|
|
62
|
+
}
|
|
63
|
+
handleMonitorResponseError(error, trapAxiosException) {
|
|
64
|
+
if (!error.isError) {
|
|
65
|
+
throw error;
|
|
66
|
+
}
|
|
67
|
+
if (trapAxiosException) {
|
|
68
|
+
error.response ? this.onFailure(error.response) : this.onError(error);
|
|
69
|
+
if (this.config.throwFailure) {
|
|
70
|
+
throw error;
|
|
71
|
+
}
|
|
72
|
+
return error.response;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
async monitorResponse(closure) {
|
|
76
|
+
let trapAxiosException = true;
|
|
77
|
+
try {
|
|
78
|
+
const response = await closure();
|
|
79
|
+
trapAxiosException = false;
|
|
80
|
+
response.status < 300 ? this.onSuccess(response) : this.onFailure(response);
|
|
81
|
+
return response;
|
|
82
|
+
} catch (ex) {
|
|
83
|
+
this.handleMonitorResponseError(ex, trapAxiosException);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
async postEndpoint(endPoint = "", data, responseType) {
|
|
87
|
+
const response = await this.monitorResponse(async () => {
|
|
88
|
+
return await this.axios.post(`${this.resolveRoot()}${endPoint}${this.query}`, data);
|
|
89
|
+
});
|
|
90
|
+
return _ApiBase.shapeResponse(response, responseType);
|
|
91
|
+
}
|
|
92
|
+
async putEndpoint(endPoint = "", data, responseType) {
|
|
93
|
+
const response = await this.monitorResponse(async () => {
|
|
94
|
+
return await this.axios.put(`${this.resolveRoot()}${endPoint}${this.query}`, data);
|
|
95
|
+
});
|
|
96
|
+
return _ApiBase.shapeResponse(response, responseType);
|
|
97
|
+
}
|
|
98
|
+
resolveRoot() {
|
|
99
|
+
return `${this.config.apiDomain}${this.root}`;
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
// src/objToQuery.ts
|
|
104
|
+
var objToQuery = (obj) => {
|
|
105
|
+
return `?${Object.entries(obj).map(([key, value]) => {
|
|
106
|
+
return `${key}=${value}`;
|
|
107
|
+
}).filter((value) => value !== void 0).join("&")}`;
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
// src/Simple.ts
|
|
111
|
+
var ApiSimple = class extends ApiBase {
|
|
112
|
+
async delete(responseType) {
|
|
113
|
+
switch (responseType) {
|
|
114
|
+
case "tuple":
|
|
115
|
+
return await this.deleteEndpoint(void 0, "tuple");
|
|
116
|
+
default:
|
|
117
|
+
return await this.deleteEndpoint(void 0);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
async find(query = {}, responseType) {
|
|
121
|
+
switch (responseType) {
|
|
122
|
+
case "tuple":
|
|
123
|
+
return await this.getEndpoint(objToQuery(query), "tuple");
|
|
124
|
+
default:
|
|
125
|
+
return await this.getEndpoint(objToQuery(query));
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
async get(responseType) {
|
|
129
|
+
switch (responseType) {
|
|
130
|
+
case "tuple":
|
|
131
|
+
return await this.getEndpoint(void 0, "tuple");
|
|
132
|
+
default:
|
|
133
|
+
return await this.getEndpoint(void 0);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
async post(data, responseType) {
|
|
137
|
+
switch (responseType) {
|
|
138
|
+
case "tuple":
|
|
139
|
+
return await this.postEndpoint(void 0, data, "tuple");
|
|
140
|
+
default:
|
|
141
|
+
return await this.postEndpoint(void 0, data);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
async put(data, responseType) {
|
|
145
|
+
switch (responseType) {
|
|
146
|
+
case "tuple":
|
|
147
|
+
return await this.putEndpoint(void 0, data, "tuple");
|
|
148
|
+
default:
|
|
149
|
+
return await this.putEndpoint(void 0, data);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
// src/Api/Api.ts
|
|
155
|
+
var ArchivistApi = class extends ApiSimple {
|
|
156
|
+
huri(huri) {
|
|
157
|
+
const huriObj = typeof huri === "string" ? new Huri(huri) : huri;
|
|
158
|
+
return new ApiSimple({
|
|
159
|
+
...this.config,
|
|
160
|
+
root: `${this.root}${huriObj.href}/`
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
export {
|
|
165
|
+
ArchivistApi
|
|
166
|
+
};
|
|
167
|
+
//# sourceMappingURL=Api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/Api/Api.ts","../../../src/Base.ts","../../../src/objToQuery.ts","../../../src/Simple.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 {\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":";AACA,SAAS,YAAY;;;ACUrB,SAAS,iBAAiB;AAEnB,IAAM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AAA,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;;;AH9DO,IAAM,eAAN,cAA4D,UAAwB;AAAA,EACzF,KAAK,MAAqB;AACxB,UAAM,UAAU,OAAO,SAAS,WAAW,IAAI,KAAK,IAAI,IAAI;AAC5D,WAAO,IAAI,UAAmB;AAAA,MAC5B,GAAG,KAAK;AAAA,MACR,MAAM,GAAG,KAAK,IAAI,GAAG,QAAQ,IAAI;AAAA,IACnC,CAAC;AAAA,EACH;AACF;","names":[]}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/Api/index.ts
|
|
21
|
+
var Api_exports = {};
|
|
22
|
+
__export(Api_exports, {
|
|
23
|
+
ArchivistApi: () => ArchivistApi
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(Api_exports);
|
|
26
|
+
|
|
27
|
+
// src/Api/Api.ts
|
|
28
|
+
var import_huri = require("@xyo-network/huri");
|
|
29
|
+
|
|
30
|
+
// src/Base.ts
|
|
31
|
+
var import_axios = require("@xyo-network/axios");
|
|
32
|
+
var ApiBase = class _ApiBase {
|
|
33
|
+
config;
|
|
34
|
+
axios;
|
|
35
|
+
constructor(config) {
|
|
36
|
+
this.config = config;
|
|
37
|
+
this.axios = new import_axios.AxiosJson({ ...this.config, headers: this.headers });
|
|
38
|
+
}
|
|
39
|
+
get authenticated() {
|
|
40
|
+
return !!this.config.apiKey || !!this.config.jwtToken;
|
|
41
|
+
}
|
|
42
|
+
get headers() {
|
|
43
|
+
const headers = {};
|
|
44
|
+
if (this.config.jwtToken) {
|
|
45
|
+
headers.Authorization = `Bearer ${this.config.jwtToken}`;
|
|
46
|
+
}
|
|
47
|
+
if (this.config.apiKey) {
|
|
48
|
+
headers["x-api-key"] = this.config.apiKey;
|
|
49
|
+
}
|
|
50
|
+
return headers;
|
|
51
|
+
}
|
|
52
|
+
get query() {
|
|
53
|
+
return this.config.query ?? "";
|
|
54
|
+
}
|
|
55
|
+
get root() {
|
|
56
|
+
return this.config.root ?? "/";
|
|
57
|
+
}
|
|
58
|
+
static resolveResponse(result) {
|
|
59
|
+
return [result?.data?.data, result?.data, result];
|
|
60
|
+
}
|
|
61
|
+
static shapeResponse(response, responseType) {
|
|
62
|
+
const resolvedResponse = _ApiBase.resolveResponse(response);
|
|
63
|
+
return responseType === "tuple" ? resolvedResponse : resolvedResponse[0];
|
|
64
|
+
}
|
|
65
|
+
onError(error, depth = 0) {
|
|
66
|
+
this.config.reportableParent?.onError?.(error, depth + 1);
|
|
67
|
+
this.config.onError?.(error, depth);
|
|
68
|
+
}
|
|
69
|
+
onFailure(response, depth = 0) {
|
|
70
|
+
this.config.reportableParent?.onFailure?.(response, depth + 1);
|
|
71
|
+
this.config.onFailure?.(response, depth);
|
|
72
|
+
}
|
|
73
|
+
onSuccess(response, depth = 0) {
|
|
74
|
+
this.config.reportableParent?.onSuccess?.(response, depth + 1);
|
|
75
|
+
this.config.onSuccess?.(response, depth);
|
|
76
|
+
}
|
|
77
|
+
async deleteEndpoint(endPoint = "", responseType) {
|
|
78
|
+
const response = await this.monitorResponse(async () => {
|
|
79
|
+
return await this.axios.delete(`${this.resolveRoot()}${endPoint}${this.query}`);
|
|
80
|
+
});
|
|
81
|
+
return _ApiBase.shapeResponse(response, responseType);
|
|
82
|
+
}
|
|
83
|
+
async getEndpoint(endPoint = "", responseType) {
|
|
84
|
+
const response = await this.monitorResponse(async () => {
|
|
85
|
+
return await this.axios.get(`${this.resolveRoot()}${endPoint}${this.query}`);
|
|
86
|
+
});
|
|
87
|
+
return _ApiBase.shapeResponse(response, responseType);
|
|
88
|
+
}
|
|
89
|
+
handleMonitorResponseError(error, trapAxiosException) {
|
|
90
|
+
if (!error.isError) {
|
|
91
|
+
throw error;
|
|
92
|
+
}
|
|
93
|
+
if (trapAxiosException) {
|
|
94
|
+
error.response ? this.onFailure(error.response) : this.onError(error);
|
|
95
|
+
if (this.config.throwFailure) {
|
|
96
|
+
throw error;
|
|
97
|
+
}
|
|
98
|
+
return error.response;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
async monitorResponse(closure) {
|
|
102
|
+
let trapAxiosException = true;
|
|
103
|
+
try {
|
|
104
|
+
const response = await closure();
|
|
105
|
+
trapAxiosException = false;
|
|
106
|
+
response.status < 300 ? this.onSuccess(response) : this.onFailure(response);
|
|
107
|
+
return response;
|
|
108
|
+
} catch (ex) {
|
|
109
|
+
this.handleMonitorResponseError(ex, trapAxiosException);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
async postEndpoint(endPoint = "", data, responseType) {
|
|
113
|
+
const response = await this.monitorResponse(async () => {
|
|
114
|
+
return await this.axios.post(`${this.resolveRoot()}${endPoint}${this.query}`, data);
|
|
115
|
+
});
|
|
116
|
+
return _ApiBase.shapeResponse(response, responseType);
|
|
117
|
+
}
|
|
118
|
+
async putEndpoint(endPoint = "", data, responseType) {
|
|
119
|
+
const response = await this.monitorResponse(async () => {
|
|
120
|
+
return await this.axios.put(`${this.resolveRoot()}${endPoint}${this.query}`, data);
|
|
121
|
+
});
|
|
122
|
+
return _ApiBase.shapeResponse(response, responseType);
|
|
123
|
+
}
|
|
124
|
+
resolveRoot() {
|
|
125
|
+
return `${this.config.apiDomain}${this.root}`;
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
// src/objToQuery.ts
|
|
130
|
+
var objToQuery = (obj) => {
|
|
131
|
+
return `?${Object.entries(obj).map(([key, value]) => {
|
|
132
|
+
return `${key}=${value}`;
|
|
133
|
+
}).filter((value) => value !== void 0).join("&")}`;
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
// src/Simple.ts
|
|
137
|
+
var ApiSimple = class extends ApiBase {
|
|
138
|
+
async delete(responseType) {
|
|
139
|
+
switch (responseType) {
|
|
140
|
+
case "tuple":
|
|
141
|
+
return await this.deleteEndpoint(void 0, "tuple");
|
|
142
|
+
default:
|
|
143
|
+
return await this.deleteEndpoint(void 0);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
async find(query = {}, responseType) {
|
|
147
|
+
switch (responseType) {
|
|
148
|
+
case "tuple":
|
|
149
|
+
return await this.getEndpoint(objToQuery(query), "tuple");
|
|
150
|
+
default:
|
|
151
|
+
return await this.getEndpoint(objToQuery(query));
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
async get(responseType) {
|
|
155
|
+
switch (responseType) {
|
|
156
|
+
case "tuple":
|
|
157
|
+
return await this.getEndpoint(void 0, "tuple");
|
|
158
|
+
default:
|
|
159
|
+
return await this.getEndpoint(void 0);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
async post(data, responseType) {
|
|
163
|
+
switch (responseType) {
|
|
164
|
+
case "tuple":
|
|
165
|
+
return await this.postEndpoint(void 0, data, "tuple");
|
|
166
|
+
default:
|
|
167
|
+
return await this.postEndpoint(void 0, data);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
async put(data, responseType) {
|
|
171
|
+
switch (responseType) {
|
|
172
|
+
case "tuple":
|
|
173
|
+
return await this.putEndpoint(void 0, data, "tuple");
|
|
174
|
+
default:
|
|
175
|
+
return await this.putEndpoint(void 0, data);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
// src/Api/Api.ts
|
|
181
|
+
var ArchivistApi = class extends ApiSimple {
|
|
182
|
+
huri(huri) {
|
|
183
|
+
const huriObj = typeof huri === "string" ? new import_huri.Huri(huri) : huri;
|
|
184
|
+
return new ApiSimple({
|
|
185
|
+
...this.config,
|
|
186
|
+
root: `${this.root}${huriObj.href}/`
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/Api/index.ts","../../../src/Api/Api.ts","../../../src/Base.ts","../../../src/objToQuery.ts","../../../src/Simple.ts"],"sourcesContent":["export * from './Api'\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 {\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":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,kBAAqB;;;ACUrB,mBAA0B;AAEnB,IAAM,UAAN,MAAM,SAAkE;AAAA,EACpE;AAAA,EACC;AAAA,EAEV,YAAY,QAAW;AACrB,SAAK,SAAS;AACd,SAAK,QAAQ,IAAI,uBAAU,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,OAAO,QAAQ;AAAA,EAC7B;AAAA,EAEA,OAAe,gBAAmB,QAAsC;AACtE,WAAO,CAAC,QAAQ,MAAM,MAAM,QAAQ,MAAM,MAAM;AAAA,EAClD;AAAA,EAEA,OAAe,cAA2B,UAAmD,cAAgC;AAC3H,UAAM,mBAAmB,SAA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A,EACH;AACF;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Api/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Api/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA"}
|