@xyo-network/api 2.20.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +165 -0
- package/README.md +79 -0
- package/babel.config.json +5 -0
- package/dist/cjs/Archivist/Account/Api.d.ts +18 -0
- package/dist/cjs/Archivist/Account/Api.js +15 -0
- package/dist/cjs/Archivist/Account/Api.js.map +1 -0
- package/dist/cjs/Archivist/Account/index.d.ts +1 -0
- package/dist/cjs/Archivist/Account/index.js +5 -0
- package/dist/cjs/Archivist/Account/index.js.map +1 -0
- package/dist/cjs/Archivist/Api.d.ts +27 -0
- package/dist/cjs/Archivist/Api.js +60 -0
- package/dist/cjs/Archivist/Api.js.map +1 -0
- package/dist/cjs/Archivist/Archive/Api.d.ts +18 -0
- package/dist/cjs/Archivist/Archive/Api.js +40 -0
- package/dist/cjs/Archivist/Archive/Api.js.map +1 -0
- package/dist/cjs/Archivist/Archive/Schema/Api.d.ts +7 -0
- package/dist/cjs/Archivist/Archive/Schema/Api.js +15 -0
- package/dist/cjs/Archivist/Archive/Schema/Api.js.map +1 -0
- package/dist/cjs/Archivist/Archive/Schema/index.d.ts +1 -0
- package/dist/cjs/Archivist/Archive/Schema/index.js +5 -0
- package/dist/cjs/Archivist/Archive/Schema/index.js.map +1 -0
- package/dist/cjs/Archivist/Archive/Schemas/Api.d.ts +6 -0
- package/dist/cjs/Archivist/Archive/Schemas/Api.js +14 -0
- package/dist/cjs/Archivist/Archive/Schemas/Api.js.map +1 -0
- package/dist/cjs/Archivist/Archive/Schemas/index.d.ts +1 -0
- package/dist/cjs/Archivist/Archive/Schemas/index.js +5 -0
- package/dist/cjs/Archivist/Archive/Schemas/index.js.map +1 -0
- package/dist/cjs/Archivist/Archive/Settings/Api.d.ts +6 -0
- package/dist/cjs/Archivist/Archive/Settings/Api.js +15 -0
- package/dist/cjs/Archivist/Archive/Settings/Api.js.map +1 -0
- package/dist/cjs/Archivist/Archive/Settings/Key/Api.d.ts +5 -0
- package/dist/cjs/Archivist/Archive/Settings/Key/Api.js +11 -0
- package/dist/cjs/Archivist/Archive/Settings/Key/Api.js.map +1 -0
- package/dist/cjs/Archivist/Archive/Settings/Key/index.d.ts +1 -0
- package/dist/cjs/Archivist/Archive/Settings/Key/index.js +5 -0
- package/dist/cjs/Archivist/Archive/Settings/Key/index.js.map +1 -0
- package/dist/cjs/Archivist/Archive/Settings/index.d.ts +2 -0
- package/dist/cjs/Archivist/Archive/Settings/index.js +6 -0
- package/dist/cjs/Archivist/Archive/Settings/index.js.map +1 -0
- package/dist/cjs/Archivist/Archive/index.d.ts +4 -0
- package/dist/cjs/Archivist/Archive/index.js +8 -0
- package/dist/cjs/Archivist/Archive/index.js.map +1 -0
- package/dist/cjs/Archivist/Archives/Api.d.ts +8 -0
- package/dist/cjs/Archivist/Archives/Api.js +16 -0
- package/dist/cjs/Archivist/Archives/Api.js.map +1 -0
- package/dist/cjs/Archivist/Archives/index.d.ts +1 -0
- package/dist/cjs/Archivist/Archives/index.js +5 -0
- package/dist/cjs/Archivist/Archives/index.js.map +1 -0
- package/dist/cjs/Archivist/Block/Api.d.ts +8 -0
- package/dist/cjs/Archivist/Block/Api.js +12 -0
- package/dist/cjs/Archivist/Block/Api.js.map +1 -0
- package/dist/cjs/Archivist/Block/index.d.ts +1 -0
- package/dist/cjs/Archivist/Block/index.js +5 -0
- package/dist/cjs/Archivist/Block/index.js.map +1 -0
- package/dist/cjs/Archivist/Payload/Api.d.ts +40 -0
- package/dist/cjs/Archivist/Payload/Api.js +84 -0
- package/dist/cjs/Archivist/Payload/Api.js.map +1 -0
- package/dist/cjs/Archivist/Payload/Schema/Api.d.ts +8 -0
- package/dist/cjs/Archivist/Payload/Schema/Api.js +14 -0
- package/dist/cjs/Archivist/Payload/Schema/Api.js.map +1 -0
- package/dist/cjs/Archivist/Payload/Schema/index.d.ts +1 -0
- package/dist/cjs/Archivist/Payload/Schema/index.js +5 -0
- package/dist/cjs/Archivist/Payload/Schema/index.js.map +1 -0
- package/dist/cjs/Archivist/Payload/index.d.ts +2 -0
- package/dist/cjs/Archivist/Payload/index.js +6 -0
- package/dist/cjs/Archivist/Payload/index.js.map +1 -0
- package/dist/cjs/Archivist/index.d.ts +6 -0
- package/dist/cjs/Archivist/index.js +10 -0
- package/dist/cjs/Archivist/index.js.map +1 -0
- package/dist/cjs/Base.d.ts +33 -0
- package/dist/cjs/Base.js +147 -0
- package/dist/cjs/Base.js.map +1 -0
- package/dist/cjs/Diviner/LocationDiviner/LocationDivinerApi.d.ts +11 -0
- package/dist/cjs/Diviner/LocationDiviner/LocationDivinerApi.js +28 -0
- package/dist/cjs/Diviner/LocationDiviner/LocationDivinerApi.js.map +1 -0
- package/dist/cjs/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.d.ts +9 -0
- package/dist/cjs/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.js +24 -0
- package/dist/cjs/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.js.map +1 -0
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.d.ts +4 -0
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.js +3 -0
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.js.map +1 -0
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.ts +11 -0
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.js +10 -0
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.js.map +1 -0
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.d.ts +2 -0
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.js +6 -0
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.js.map +1 -0
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.ts +11 -0
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.js +10 -0
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.js.map +1 -0
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.ts +1 -0
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.js +5 -0
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.js.map +1 -0
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.d.ts +17 -0
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.js +3 -0
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.js.map +1 -0
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.d.ts +4 -0
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.js +3 -0
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.js.map +1 -0
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationQuerySchema.d.ts +5 -0
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationQuerySchema.js +13 -0
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationQuerySchema.js.map +1 -0
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.ts +7 -0
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.js +3 -0
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.js.map +1 -0
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.ts +11 -0
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.js +10 -0
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.js.map +1 -0
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.ts +2 -0
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.js +6 -0
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.js.map +1 -0
- package/dist/cjs/Diviner/LocationDiviner/Queries/index.d.ts +6 -0
- package/dist/cjs/Diviner/LocationDiviner/Queries/index.js +10 -0
- package/dist/cjs/Diviner/LocationDiviner/Queries/index.js.map +1 -0
- package/dist/cjs/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.d.ts +13 -0
- package/dist/cjs/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.js +5 -0
- package/dist/cjs/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.js.map +1 -0
- package/dist/cjs/Diviner/LocationDiviner/Witnesses/LocationWitness.d.ts +21 -0
- package/dist/cjs/Diviner/LocationDiviner/Witnesses/LocationWitness.js +5 -0
- package/dist/cjs/Diviner/LocationDiviner/Witnesses/LocationWitness.js.map +1 -0
- package/dist/cjs/Diviner/LocationDiviner/Witnesses/index.d.ts +2 -0
- package/dist/cjs/Diviner/LocationDiviner/Witnesses/index.js +6 -0
- package/dist/cjs/Diviner/LocationDiviner/Witnesses/index.js.map +1 -0
- package/dist/cjs/Diviner/LocationDiviner/index.d.ts +4 -0
- package/dist/cjs/Diviner/LocationDiviner/index.js +8 -0
- package/dist/cjs/Diviner/LocationDiviner/index.js.map +1 -0
- package/dist/cjs/Diviner/LocationDiviner/models.d.ts +4 -0
- package/dist/cjs/Diviner/LocationDiviner/models.js +3 -0
- package/dist/cjs/Diviner/LocationDiviner/models.js.map +1 -0
- package/dist/cjs/Diviner/index.d.ts +1 -0
- package/dist/cjs/Diviner/index.js +5 -0
- package/dist/cjs/Diviner/index.js.map +1 -0
- package/dist/cjs/Simple.d.ts +21 -0
- package/dist/cjs/Simple.js +60 -0
- package/dist/cjs/Simple.js.map +1 -0
- package/dist/cjs/Test/index.d.ts +2 -0
- package/dist/cjs/Test/index.js +6 -0
- package/dist/cjs/Test/index.js.map +1 -0
- package/dist/cjs/Test/testBoundWitness.d.ts +3 -0
- package/dist/cjs/Test/testBoundWitness.js +17 -0
- package/dist/cjs/Test/testBoundWitness.js.map +1 -0
- package/dist/cjs/Test/testPayload.d.ts +4 -0
- package/dist/cjs/Test/testPayload.js +19 -0
- package/dist/cjs/Test/testPayload.js.map +1 -0
- package/dist/cjs/User/Api.d.ts +31 -0
- package/dist/cjs/User/Api.js +25 -0
- package/dist/cjs/User/Api.js.map +1 -0
- package/dist/cjs/User/index.d.ts +1 -0
- package/dist/cjs/User/index.js +5 -0
- package/dist/cjs/User/index.js.map +1 -0
- package/dist/cjs/WithArchive.d.ts +3 -0
- package/dist/cjs/WithArchive.js +3 -0
- package/dist/cjs/WithArchive.js.map +1 -0
- package/dist/cjs/index.d.ts +7 -0
- package/dist/cjs/index.js +11 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/models/Api/Config.d.ts +24 -0
- package/dist/cjs/models/Api/Config.js +3 -0
- package/dist/cjs/models/Api/Config.js.map +1 -0
- package/dist/cjs/models/Api/Envelope.d.ts +14 -0
- package/dist/cjs/models/Api/Envelope.js +3 -0
- package/dist/cjs/models/Api/Envelope.js.map +1 -0
- package/dist/cjs/models/Api/Error.d.ts +4 -0
- package/dist/cjs/models/Api/Error.js +3 -0
- package/dist/cjs/models/Api/Error.js.map +1 -0
- package/dist/cjs/models/Api/Reportable.d.ts +7 -0
- package/dist/cjs/models/Api/Reportable.js +3 -0
- package/dist/cjs/models/Api/Reportable.js.map +1 -0
- package/dist/cjs/models/Api/Response.d.ts +7 -0
- package/dist/cjs/models/Api/Response.js +3 -0
- package/dist/cjs/models/Api/Response.js.map +1 -0
- package/dist/cjs/models/Api/Warning.d.ts +1 -0
- package/dist/cjs/models/Api/Warning.js +3 -0
- package/dist/cjs/models/Api/Warning.js.map +1 -0
- package/dist/cjs/models/Api/index.d.ts +6 -0
- package/dist/cjs/models/Api/index.js +10 -0
- package/dist/cjs/models/Api/index.js.map +1 -0
- package/dist/cjs/models/Archive.d.ts +24 -0
- package/dist/cjs/models/Archive.js +3 -0
- package/dist/cjs/models/Archive.js.map +1 -0
- package/dist/cjs/models/ArchiveKey.d.ts +5 -0
- package/dist/cjs/models/ArchiveKey.js +3 -0
- package/dist/cjs/models/ArchiveKey.js.map +1 -0
- package/dist/cjs/models/ArchivePath.d.ts +3 -0
- package/dist/cjs/models/ArchivePath.js +3 -0
- package/dist/cjs/models/ArchivePath.js.map +1 -0
- package/dist/cjs/models/index.d.ts +4 -0
- package/dist/cjs/models/index.js +8 -0
- package/dist/cjs/models/index.js.map +1 -0
- package/dist/cjs/objToQuery.d.ts +1 -0
- package/dist/cjs/objToQuery.js +13 -0
- package/dist/cjs/objToQuery.js.map +1 -0
- package/dist/docs.json +44344 -0
- package/dist/esm/Archivist/Account/Api.d.ts +18 -0
- package/dist/esm/Archivist/Account/Api.js +17 -0
- package/dist/esm/Archivist/Account/Api.js.map +1 -0
- package/dist/esm/Archivist/Account/index.d.ts +1 -0
- package/dist/esm/Archivist/Account/index.js +2 -0
- package/dist/esm/Archivist/Account/index.js.map +1 -0
- package/dist/esm/Archivist/Api.d.ts +27 -0
- package/dist/esm/Archivist/Api.js +71 -0
- package/dist/esm/Archivist/Api.js.map +1 -0
- package/dist/esm/Archivist/Archive/Api.d.ts +18 -0
- package/dist/esm/Archivist/Archive/Api.js +51 -0
- package/dist/esm/Archivist/Archive/Api.js.map +1 -0
- package/dist/esm/Archivist/Archive/Schema/Api.d.ts +7 -0
- package/dist/esm/Archivist/Archive/Schema/Api.js +14 -0
- package/dist/esm/Archivist/Archive/Schema/Api.js.map +1 -0
- package/dist/esm/Archivist/Archive/Schema/index.d.ts +1 -0
- package/dist/esm/Archivist/Archive/Schema/index.js +2 -0
- package/dist/esm/Archivist/Archive/Schema/index.js.map +1 -0
- package/dist/esm/Archivist/Archive/Schemas/Api.d.ts +6 -0
- package/dist/esm/Archivist/Archive/Schemas/Api.js +13 -0
- package/dist/esm/Archivist/Archive/Schemas/Api.js.map +1 -0
- package/dist/esm/Archivist/Archive/Schemas/index.d.ts +1 -0
- package/dist/esm/Archivist/Archive/Schemas/index.js +2 -0
- package/dist/esm/Archivist/Archive/Schemas/index.js.map +1 -0
- package/dist/esm/Archivist/Archive/Settings/Api.d.ts +6 -0
- package/dist/esm/Archivist/Archive/Settings/Api.js +14 -0
- package/dist/esm/Archivist/Archive/Settings/Api.js.map +1 -0
- package/dist/esm/Archivist/Archive/Settings/Key/Api.d.ts +5 -0
- package/dist/esm/Archivist/Archive/Settings/Key/Api.js +10 -0
- package/dist/esm/Archivist/Archive/Settings/Key/Api.js.map +1 -0
- package/dist/esm/Archivist/Archive/Settings/Key/index.d.ts +1 -0
- package/dist/esm/Archivist/Archive/Settings/Key/index.js +2 -0
- package/dist/esm/Archivist/Archive/Settings/Key/index.js.map +1 -0
- package/dist/esm/Archivist/Archive/Settings/index.d.ts +2 -0
- package/dist/esm/Archivist/Archive/Settings/index.js +3 -0
- package/dist/esm/Archivist/Archive/Settings/index.js.map +1 -0
- package/dist/esm/Archivist/Archive/index.d.ts +4 -0
- package/dist/esm/Archivist/Archive/index.js +5 -0
- package/dist/esm/Archivist/Archive/index.js.map +1 -0
- package/dist/esm/Archivist/Archives/Api.d.ts +8 -0
- package/dist/esm/Archivist/Archives/Api.js +15 -0
- package/dist/esm/Archivist/Archives/Api.js.map +1 -0
- package/dist/esm/Archivist/Archives/index.d.ts +1 -0
- package/dist/esm/Archivist/Archives/index.js +2 -0
- package/dist/esm/Archivist/Archives/index.js.map +1 -0
- package/dist/esm/Archivist/Block/Api.d.ts +8 -0
- package/dist/esm/Archivist/Block/Api.js +11 -0
- package/dist/esm/Archivist/Block/Api.js.map +1 -0
- package/dist/esm/Archivist/Block/index.d.ts +1 -0
- package/dist/esm/Archivist/Block/index.js +2 -0
- package/dist/esm/Archivist/Block/index.js.map +1 -0
- package/dist/esm/Archivist/Payload/Api.d.ts +40 -0
- package/dist/esm/Archivist/Payload/Api.js +68 -0
- package/dist/esm/Archivist/Payload/Api.js.map +1 -0
- package/dist/esm/Archivist/Payload/Schema/Api.d.ts +8 -0
- package/dist/esm/Archivist/Payload/Schema/Api.js +13 -0
- package/dist/esm/Archivist/Payload/Schema/Api.js.map +1 -0
- package/dist/esm/Archivist/Payload/Schema/index.d.ts +1 -0
- package/dist/esm/Archivist/Payload/Schema/index.js +2 -0
- package/dist/esm/Archivist/Payload/Schema/index.js.map +1 -0
- package/dist/esm/Archivist/Payload/index.d.ts +2 -0
- package/dist/esm/Archivist/Payload/index.js +3 -0
- package/dist/esm/Archivist/Payload/index.js.map +1 -0
- package/dist/esm/Archivist/index.d.ts +6 -0
- package/dist/esm/Archivist/index.js +7 -0
- package/dist/esm/Archivist/index.js.map +1 -0
- package/dist/esm/Base.d.ts +33 -0
- package/dist/esm/Base.js +129 -0
- package/dist/esm/Base.js.map +1 -0
- package/dist/esm/Diviner/LocationDiviner/LocationDivinerApi.d.ts +11 -0
- package/dist/esm/Diviner/LocationDiviner/LocationDivinerApi.js +20 -0
- package/dist/esm/Diviner/LocationDiviner/LocationDivinerApi.js.map +1 -0
- package/dist/esm/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.d.ts +9 -0
- package/dist/esm/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.js +18 -0
- package/dist/esm/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.js.map +1 -0
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.d.ts +4 -0
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.js +2 -0
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.js.map +1 -0
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.ts +11 -0
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.js +6 -0
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.js.map +1 -0
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.d.ts +2 -0
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.js +3 -0
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.js.map +1 -0
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.ts +11 -0
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.js +6 -0
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.js.map +1 -0
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.ts +1 -0
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.js +2 -0
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.js.map +1 -0
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.d.ts +17 -0
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.js +2 -0
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.js.map +1 -0
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.d.ts +4 -0
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.js +2 -0
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.js.map +1 -0
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationQuerySchema.d.ts +5 -0
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationQuerySchema.js +9 -0
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationQuerySchema.js.map +1 -0
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.ts +7 -0
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.js +2 -0
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.js.map +1 -0
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.ts +11 -0
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.js +6 -0
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.js.map +1 -0
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.ts +2 -0
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.js +3 -0
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.js.map +1 -0
- package/dist/esm/Diviner/LocationDiviner/Queries/index.d.ts +6 -0
- package/dist/esm/Diviner/LocationDiviner/Queries/index.js +7 -0
- package/dist/esm/Diviner/LocationDiviner/Queries/index.js.map +1 -0
- package/dist/esm/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.d.ts +13 -0
- package/dist/esm/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.js +2 -0
- package/dist/esm/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.js.map +1 -0
- package/dist/esm/Diviner/LocationDiviner/Witnesses/LocationWitness.d.ts +21 -0
- package/dist/esm/Diviner/LocationDiviner/Witnesses/LocationWitness.js +2 -0
- package/dist/esm/Diviner/LocationDiviner/Witnesses/LocationWitness.js.map +1 -0
- package/dist/esm/Diviner/LocationDiviner/Witnesses/index.d.ts +2 -0
- package/dist/esm/Diviner/LocationDiviner/Witnesses/index.js +3 -0
- package/dist/esm/Diviner/LocationDiviner/Witnesses/index.js.map +1 -0
- package/dist/esm/Diviner/LocationDiviner/index.d.ts +4 -0
- package/dist/esm/Diviner/LocationDiviner/index.js +5 -0
- package/dist/esm/Diviner/LocationDiviner/index.js.map +1 -0
- package/dist/esm/Diviner/LocationDiviner/models.d.ts +4 -0
- package/dist/esm/Diviner/LocationDiviner/models.js +2 -0
- package/dist/esm/Diviner/LocationDiviner/models.js.map +1 -0
- package/dist/esm/Diviner/index.d.ts +1 -0
- package/dist/esm/Diviner/index.js +2 -0
- package/dist/esm/Diviner/index.js.map +1 -0
- package/dist/esm/Simple.d.ts +21 -0
- package/dist/esm/Simple.js +45 -0
- package/dist/esm/Simple.js.map +1 -0
- package/dist/esm/Test/index.d.ts +2 -0
- package/dist/esm/Test/index.js +3 -0
- package/dist/esm/Test/index.js.map +1 -0
- package/dist/esm/Test/testBoundWitness.d.ts +3 -0
- package/dist/esm/Test/testBoundWitness.js +14 -0
- package/dist/esm/Test/testBoundWitness.js.map +1 -0
- package/dist/esm/Test/testPayload.d.ts +4 -0
- package/dist/esm/Test/testPayload.js +15 -0
- package/dist/esm/Test/testPayload.js.map +1 -0
- package/dist/esm/User/Api.d.ts +31 -0
- package/dist/esm/User/Api.js +27 -0
- package/dist/esm/User/Api.js.map +1 -0
- package/dist/esm/User/index.d.ts +1 -0
- package/dist/esm/User/index.js +2 -0
- package/dist/esm/User/index.js.map +1 -0
- package/dist/esm/WithArchive.d.ts +3 -0
- package/dist/esm/WithArchive.js +2 -0
- package/dist/esm/WithArchive.js.map +1 -0
- package/dist/esm/index.d.ts +7 -0
- package/dist/esm/index.js +8 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/models/Api/Config.d.ts +24 -0
- package/dist/esm/models/Api/Config.js +2 -0
- package/dist/esm/models/Api/Config.js.map +1 -0
- package/dist/esm/models/Api/Envelope.d.ts +14 -0
- package/dist/esm/models/Api/Envelope.js +2 -0
- package/dist/esm/models/Api/Envelope.js.map +1 -0
- package/dist/esm/models/Api/Error.d.ts +4 -0
- package/dist/esm/models/Api/Error.js +2 -0
- package/dist/esm/models/Api/Error.js.map +1 -0
- package/dist/esm/models/Api/Reportable.d.ts +7 -0
- package/dist/esm/models/Api/Reportable.js +2 -0
- package/dist/esm/models/Api/Reportable.js.map +1 -0
- package/dist/esm/models/Api/Response.d.ts +7 -0
- package/dist/esm/models/Api/Response.js +2 -0
- package/dist/esm/models/Api/Response.js.map +1 -0
- package/dist/esm/models/Api/Warning.d.ts +1 -0
- package/dist/esm/models/Api/Warning.js +2 -0
- package/dist/esm/models/Api/Warning.js.map +1 -0
- package/dist/esm/models/Api/index.d.ts +6 -0
- package/dist/esm/models/Api/index.js +7 -0
- package/dist/esm/models/Api/index.js.map +1 -0
- package/dist/esm/models/Archive.d.ts +24 -0
- package/dist/esm/models/Archive.js +2 -0
- package/dist/esm/models/Archive.js.map +1 -0
- package/dist/esm/models/ArchiveKey.d.ts +5 -0
- package/dist/esm/models/ArchiveKey.js +2 -0
- package/dist/esm/models/ArchiveKey.js.map +1 -0
- package/dist/esm/models/ArchivePath.d.ts +3 -0
- package/dist/esm/models/ArchivePath.js +2 -0
- package/dist/esm/models/ArchivePath.js.map +1 -0
- package/dist/esm/models/index.d.ts +4 -0
- package/dist/esm/models/index.js +5 -0
- package/dist/esm/models/index.js.map +1 -0
- package/dist/esm/objToQuery.d.ts +1 -0
- package/dist/esm/objToQuery.js +9 -0
- package/dist/esm/objToQuery.js.map +1 -0
- package/jest.config.cjs +25 -0
- package/package.json +118 -0
- package/rollup.config.js +5 -0
- package/src/Archivist/Account/Api.spec.ts +71 -0
- package/src/Archivist/Account/Api.ts +32 -0
- package/src/Archivist/Account/index.ts +1 -0
- package/src/Archivist/Api.spec.ts +219 -0
- package/src/Archivist/Api.ts +89 -0
- package/src/Archivist/ApiUtil.spec.ts +37 -0
- package/src/Archivist/Archive/Api.ts +60 -0
- package/src/Archivist/Archive/Schema/Api.spec.ts +23 -0
- package/src/Archivist/Archive/Schema/Api.ts +17 -0
- package/src/Archivist/Archive/Schema/index.ts +1 -0
- package/src/Archivist/Archive/Schemas/Api.spec.ts +23 -0
- package/src/Archivist/Archive/Schemas/Api.ts +16 -0
- package/src/Archivist/Archive/Schemas/index.ts +1 -0
- package/src/Archivist/Archive/Settings/Api.ts +15 -0
- package/src/Archivist/Archive/Settings/Key/Api.ts +11 -0
- package/src/Archivist/Archive/Settings/Key/index.ts +1 -0
- package/src/Archivist/Archive/Settings/index.ts +2 -0
- package/src/Archivist/Archive/index.ts +4 -0
- package/src/Archivist/Archives/Api.ts +17 -0
- package/src/Archivist/Archives/index.ts +1 -0
- package/src/Archivist/Block/Api.ts +18 -0
- package/src/Archivist/Block/index.ts +1 -0
- package/src/Archivist/Payload/Api.spec.ts +61 -0
- package/src/Archivist/Payload/Api.ts +102 -0
- package/src/Archivist/Payload/Schema/Api.spec.ts +59 -0
- package/src/Archivist/Payload/Schema/Api.ts +18 -0
- package/src/Archivist/Payload/Schema/index.ts +1 -0
- package/src/Archivist/Payload/index.ts +2 -0
- package/src/Archivist/index.ts +6 -0
- package/src/Base.ts +175 -0
- package/src/Diviner/LocationDiviner/LocationDivinerApi.spec.ts +101 -0
- package/src/Diviner/LocationDiviner/LocationDivinerApi.ts +29 -0
- package/src/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.ts +19 -0
- package/src/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.ts +4 -0
- package/src/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.ts +17 -0
- package/src/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.ts +2 -0
- package/src/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.ts +15 -0
- package/src/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.ts +1 -0
- package/src/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.ts +21 -0
- package/src/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.ts +5 -0
- package/src/Diviner/LocationDiviner/Queries/LocationQuerySchema.ts +15 -0
- package/src/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.ts +8 -0
- package/src/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.ts +18 -0
- package/src/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.ts +2 -0
- package/src/Diviner/LocationDiviner/Queries/index.ts +6 -0
- package/src/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.ts +16 -0
- package/src/Diviner/LocationDiviner/Witnesses/LocationWitness.ts +25 -0
- package/src/Diviner/LocationDiviner/Witnesses/index.ts +2 -0
- package/src/Diviner/LocationDiviner/index.ts +4 -0
- package/src/Diviner/LocationDiviner/models.ts +4 -0
- package/src/Diviner/index.ts +1 -0
- package/src/Simple.ts +69 -0
- package/src/Test/index.ts +2 -0
- package/src/Test/testBoundWitness.ts +16 -0
- package/src/Test/testPayload.ts +17 -0
- package/src/User/Api.spec.ts +41 -0
- package/src/User/Api.ts +39 -0
- package/src/User/index.ts +1 -0
- package/src/WithArchive.ts +3 -0
- package/src/index.ts +7 -0
- package/src/models/Api/Config.ts +35 -0
- package/src/models/Api/Envelope.ts +18 -0
- package/src/models/Api/Error.ts +6 -0
- package/src/models/Api/Reportable.ts +10 -0
- package/src/models/Api/Response.ts +13 -0
- package/src/models/Api/Warning.ts +1 -0
- package/src/models/Api/index.ts +6 -0
- package/src/models/Archive.ts +28 -0
- package/src/models/ArchiveKey.ts +5 -0
- package/src/models/ArchivePath.ts +3 -0
- package/src/models/index.ts +4 -0
- package/src/objToQuery.ts +8 -0
- package/typedoc.json +10 -0
package/package.json
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
{
|
|
2
|
+
"author": {
|
|
3
|
+
"email": "support@xyo.network",
|
|
4
|
+
"name": "XYO Development Team",
|
|
5
|
+
"url": "https://xyo.network"
|
|
6
|
+
},
|
|
7
|
+
"bugs": {
|
|
8
|
+
"email": "support@xyo.network",
|
|
9
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/issues"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@ethersproject/providers": "^5.6.5",
|
|
13
|
+
"@xylabs/sdk-js": "^2.5.5",
|
|
14
|
+
"@xyo-network/core": "^2.20.15",
|
|
15
|
+
"@xyo-network/ethers-wrappers": "^2.6.17",
|
|
16
|
+
"@xyo-network/sdk-xyo-mongo-js": "^2.2.7",
|
|
17
|
+
"@xyo-network/sdk-xyo-typechain": "^1.0.3",
|
|
18
|
+
"ajv": "^8.11.0",
|
|
19
|
+
"axios": "^0.27.2",
|
|
20
|
+
"bn.js": "^5.2.0",
|
|
21
|
+
"bowser": "^2.11.0",
|
|
22
|
+
"elliptic": "^6.5.4",
|
|
23
|
+
"keccak256": "^1.0.6",
|
|
24
|
+
"lodash": "^4.17.21",
|
|
25
|
+
"lru-cache": "^7.10.1",
|
|
26
|
+
"mongodb": "^4.6.0",
|
|
27
|
+
"neo4j-driver": "^4.4.5",
|
|
28
|
+
"neo4j-driver-core": "^4.4.5",
|
|
29
|
+
"pako": "^2.0.4",
|
|
30
|
+
"randombytes": "^2.1.0",
|
|
31
|
+
"sha.js": "^2.4.11",
|
|
32
|
+
"systeminformation": "^5.11.15",
|
|
33
|
+
"ua-parser-js": "^1.0.2",
|
|
34
|
+
"uuid": "^8.3.2"
|
|
35
|
+
},
|
|
36
|
+
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@babel/core": "^7.17.10",
|
|
39
|
+
"@babel/preset-env": "^7.17.10",
|
|
40
|
+
"@types/bn.js": "^5.1.0",
|
|
41
|
+
"@types/elliptic": "^6.4.14",
|
|
42
|
+
"@types/jest": "^27.5.1",
|
|
43
|
+
"@types/json-schema": "^7.0.11",
|
|
44
|
+
"@types/lodash": "^4.14.182",
|
|
45
|
+
"@types/lru-cache": "^7.6.1",
|
|
46
|
+
"@types/node": "^17.0.32",
|
|
47
|
+
"@types/pako": "^1.0.3",
|
|
48
|
+
"@types/randombytes": "^2.0.0",
|
|
49
|
+
"@types/sha.js": "^2.4.0",
|
|
50
|
+
"@types/ua-parser-js": "^0.7.36",
|
|
51
|
+
"@types/uuid": "^8.3.4",
|
|
52
|
+
"@xylabs/eslint-config": "^2.3.22",
|
|
53
|
+
"@xylabs/rollup-config": "^1.1.17",
|
|
54
|
+
"@xylabs/ts-scripts": "^1.0.66",
|
|
55
|
+
"@xylabs/tsconfig": "^1.0.13",
|
|
56
|
+
"babel-jest": "^28.1.0",
|
|
57
|
+
"copyfiles": "^2.4.1",
|
|
58
|
+
"dotenv": "^16.0.1",
|
|
59
|
+
"eslint": "^8.15.0",
|
|
60
|
+
"ethers": "^5.6.5",
|
|
61
|
+
"jest": "^28.1.0",
|
|
62
|
+
"jest-environment-jsdom": "^28.1.0",
|
|
63
|
+
"jest-sorted": "^1.0.14",
|
|
64
|
+
"license-checker": "^25.0.1",
|
|
65
|
+
"npm-package-json-lint": "^6.3.0",
|
|
66
|
+
"npm-package-json-lint-config-default": "^5.0.0",
|
|
67
|
+
"rimraf": "^3.0.2",
|
|
68
|
+
"rollbar": "^2.25.0",
|
|
69
|
+
"rollup": "^2.72.1",
|
|
70
|
+
"ts-jest": "^28.0.2",
|
|
71
|
+
"ts-node": "^10.7.0",
|
|
72
|
+
"tslib": "^2.4.0",
|
|
73
|
+
"typedoc": "^0.22.15",
|
|
74
|
+
"typescript": "^4.6.4"
|
|
75
|
+
},
|
|
76
|
+
"browser": "dist/esm/index.js",
|
|
77
|
+
"docs": "dist/docs.json",
|
|
78
|
+
"exports": {
|
|
79
|
+
".": {
|
|
80
|
+
"node": {
|
|
81
|
+
"import": "./dist/esm/index.js",
|
|
82
|
+
"require": "./dist/cjs/index.js"
|
|
83
|
+
},
|
|
84
|
+
"browser": {
|
|
85
|
+
"import": "./dist/esm/index.js",
|
|
86
|
+
"require": "./dist/cjs/index.js"
|
|
87
|
+
},
|
|
88
|
+
"default": "./dist/esm/index.js"
|
|
89
|
+
},
|
|
90
|
+
"./dist/docs.json": {
|
|
91
|
+
"default": "./dist/docs.json"
|
|
92
|
+
},
|
|
93
|
+
"./package.json": "./package.json"
|
|
94
|
+
},
|
|
95
|
+
"main": "dist/cjs/index.js",
|
|
96
|
+
"module": "dist/esm/index.js",
|
|
97
|
+
"homepage": "https://xyo.network",
|
|
98
|
+
"license": "LGPL-3.0-only",
|
|
99
|
+
"name": "@xyo-network/api",
|
|
100
|
+
"publishConfig": {
|
|
101
|
+
"access": "public"
|
|
102
|
+
},
|
|
103
|
+
"repository": {
|
|
104
|
+
"type": "git",
|
|
105
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js.git"
|
|
106
|
+
},
|
|
107
|
+
"scripts": {
|
|
108
|
+
"deploy": "yarn deploy3",
|
|
109
|
+
"lint-pkg": "npmPkgJsonLint .",
|
|
110
|
+
"build": "yarn clean && tsc -p tsconfig.build.cjs.json && tsc -p tsconfig.build.esm.json && yarn gen:docs",
|
|
111
|
+
"gen:docs": "typedoc ./src/index.ts --json ./dist/docs.json --tsconfig ./tsconfig.json",
|
|
112
|
+
"license": "yarn license-checker --exclude \"MIT, ISC, Apache-2.0, BSD, BSD-2-Clause, CC-BY-4.0, Unlicense, CC-BY-3.0, CC0-1.0\""
|
|
113
|
+
},
|
|
114
|
+
"sideEffects": true,
|
|
115
|
+
"types": "dist/esm/index.d.ts",
|
|
116
|
+
"version": "2.20.15",
|
|
117
|
+
"packageManager": "yarn@3.1.1"
|
|
118
|
+
}
|
package/rollup.config.js
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { typeOf, XyoAccount } from '@xyo-network/core'
|
|
2
|
+
|
|
3
|
+
import { XyoApiConfig, XyoApiError } from '../../models'
|
|
4
|
+
import { XyoArchivistApi } from '../Api'
|
|
5
|
+
import { XyoAccountApi } from './Api'
|
|
6
|
+
|
|
7
|
+
const timeout = 20000
|
|
8
|
+
const config: XyoApiConfig = {
|
|
9
|
+
apiDomain: process.env.API_DOMAIN || 'http://localhost:8080',
|
|
10
|
+
jwtToken: process.env.JWT_TOKEN || undefined,
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
//const describeSkipIfNoToken = config.jwtToken ? describe : describe.skip
|
|
14
|
+
|
|
15
|
+
describe('XyoAuthApi', () => {
|
|
16
|
+
describe('get', () => {
|
|
17
|
+
it('returns a new XyoWalletApi', () => {
|
|
18
|
+
const api = new XyoAccountApi(config)
|
|
19
|
+
expect(api).toBeDefined()
|
|
20
|
+
})
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
describe('challenge', function () {
|
|
24
|
+
it(
|
|
25
|
+
'success',
|
|
26
|
+
async () => {
|
|
27
|
+
const api = new XyoArchivistApi(config)
|
|
28
|
+
try {
|
|
29
|
+
const account = XyoAccount.random()
|
|
30
|
+
const [data, envelope, response] = await api.account(account.addressValue.hex).challenge.post(undefined, 'tuple')
|
|
31
|
+
expect(response.status).toBe(200)
|
|
32
|
+
expect(envelope.error).toBeUndefined()
|
|
33
|
+
expect(typeOf(data?.state)).toBe('string')
|
|
34
|
+
} catch (ex) {
|
|
35
|
+
const error = ex as XyoApiError
|
|
36
|
+
console.log(JSON.stringify(error.response?.data, null, 2))
|
|
37
|
+
throw ex
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
timeout
|
|
41
|
+
)
|
|
42
|
+
})
|
|
43
|
+
|
|
44
|
+
/*describe('verify', function () {
|
|
45
|
+
it(
|
|
46
|
+
'success',
|
|
47
|
+
async () => {
|
|
48
|
+
const api = new XyoArchivistApi(config)
|
|
49
|
+
try {
|
|
50
|
+
const address = XyoAddress.random()
|
|
51
|
+
const challenge = (await api.wallet(address.address).challenge.post(undefined))
|
|
52
|
+
const message = assertEx(challenge?.state)
|
|
53
|
+
const [data, envelope, response] = await api
|
|
54
|
+
.wallet(`0x${address.address}`)
|
|
55
|
+
.verify.post(
|
|
56
|
+
[{ message: assertEx(challenge?.state), signature: `0x${address.signKeccakMessage(message)}` }],
|
|
57
|
+
'tuple'
|
|
58
|
+
)
|
|
59
|
+
expect(response.status).toBe(200)
|
|
60
|
+
expect(envelope.error).toBeUndefined()
|
|
61
|
+
expect(data?.length).toBe(1)
|
|
62
|
+
} catch (ex) {
|
|
63
|
+
const error = ex as AxiosError
|
|
64
|
+
console.log(JSON.stringify(error.response?.data, null, 2))
|
|
65
|
+
throw ex
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
timeout
|
|
69
|
+
)
|
|
70
|
+
})*/
|
|
71
|
+
})
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { XyoApiBase } from '../../Base'
|
|
2
|
+
import { XyoApiSimple } from '../../Simple'
|
|
3
|
+
|
|
4
|
+
export interface XyoAccountChallenge {
|
|
5
|
+
/** @field Server specific state identifier [out] */
|
|
6
|
+
state?: string
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface XyoAccountVerify {
|
|
10
|
+
/** @field Message that was signed [in] */
|
|
11
|
+
message: string
|
|
12
|
+
/** @field Signature [in] */
|
|
13
|
+
signature: string
|
|
14
|
+
/** @field Token generated by server [out] */
|
|
15
|
+
token?: string
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export class XyoAccountApi extends XyoApiBase {
|
|
19
|
+
public get challenge() {
|
|
20
|
+
return new XyoApiSimple<XyoAccountChallenge>({
|
|
21
|
+
...this.config,
|
|
22
|
+
root: `${this.root}challenge/`,
|
|
23
|
+
})
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
public get verify() {
|
|
27
|
+
return new XyoApiSimple<XyoAccountVerify>({
|
|
28
|
+
...this.config,
|
|
29
|
+
root: `${this.root}verify/`,
|
|
30
|
+
})
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Api'
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { XyoAccount, XyoBoundWitness, XyoBoundWitnessBuilder } from '@xyo-network/core'
|
|
2
|
+
import { config } from 'dotenv'
|
|
3
|
+
|
|
4
|
+
import { XyoApiConfig, XyoApiError } from '../models'
|
|
5
|
+
import { testPayload } from '../Test'
|
|
6
|
+
import { XyoArchivistApi } from './Api'
|
|
7
|
+
import { getNewArchive, getRandomArchiveName } from './ApiUtil.spec'
|
|
8
|
+
|
|
9
|
+
config()
|
|
10
|
+
|
|
11
|
+
const configData: XyoApiConfig = {
|
|
12
|
+
apiDomain: process.env.API_DOMAIN || 'https://beta.api.archivist.xyo.network',
|
|
13
|
+
apiKey: process.env.API_KEY || undefined,
|
|
14
|
+
jwtToken: process.env.JWT_TOKEN || undefined,
|
|
15
|
+
onError: (error) => console.error(`Error: ${JSON.stringify(error)}`),
|
|
16
|
+
onFailure: (response) => response, //console.error(`Failure: ${response.statusText} [${response.status}] [${JSON.stringify(response.data)}]`),
|
|
17
|
+
onSuccess: (response) => response, //console.log(`Success: ${response.statusText} [${response.status}] [${JSON.stringify(response.data)}]`),
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const describeSkipIfNoToken = configData.jwtToken || configData.apiKey ? describe : describe.skip
|
|
21
|
+
|
|
22
|
+
describe('postBoundWitness', () => {
|
|
23
|
+
it.each([true, false])('posts a single bound witness', async (inlinePayloads) => {
|
|
24
|
+
const builder = new XyoBoundWitnessBuilder({ inlinePayloads }).witness(XyoAccount.random()).payload(testPayload)
|
|
25
|
+
const api = new XyoArchivistApi(configData)
|
|
26
|
+
const boundWitness: XyoBoundWitness = builder.build()
|
|
27
|
+
try {
|
|
28
|
+
const response = await api.archives.archive().block.post([boundWitness])
|
|
29
|
+
|
|
30
|
+
expect(response?.length).toEqual(1)
|
|
31
|
+
} catch (ex) {
|
|
32
|
+
const error = ex as XyoApiError
|
|
33
|
+
console.log(JSON.stringify(error.response?.data, null, 2))
|
|
34
|
+
throw ex
|
|
35
|
+
}
|
|
36
|
+
})
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
describe('postBoundWitnesses', () => {
|
|
40
|
+
it.each([true, false])('posts multiple bound witnesses', async (inlinePayloads) => {
|
|
41
|
+
const builder = new XyoBoundWitnessBuilder({ inlinePayloads }).witness(XyoAccount.random()).payload(testPayload)
|
|
42
|
+
const api = new XyoArchivistApi(configData)
|
|
43
|
+
const json = builder.build()
|
|
44
|
+
const boundWitnesses: XyoBoundWitness[] = [json, json]
|
|
45
|
+
|
|
46
|
+
//TODO: We are casting the result here since the server has not yet been updated to return the actual saved data
|
|
47
|
+
|
|
48
|
+
try {
|
|
49
|
+
const response = await api.archives.archive().block.post(boundWitnesses)
|
|
50
|
+
expect(response?.length).toEqual(2)
|
|
51
|
+
} catch (ex) {
|
|
52
|
+
const error = ex as XyoApiError
|
|
53
|
+
console.log(JSON.stringify(error, null, 2))
|
|
54
|
+
throw ex
|
|
55
|
+
}
|
|
56
|
+
})
|
|
57
|
+
})
|
|
58
|
+
|
|
59
|
+
describeSkipIfNoToken('XyoArchivistApi', () => {
|
|
60
|
+
describe('get', () => {
|
|
61
|
+
it('returns a new XyoArchivistApi', () => {
|
|
62
|
+
const api = new XyoArchivistApi(configData)
|
|
63
|
+
expect(api).toBeDefined()
|
|
64
|
+
})
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
describe('getArchives', function () {
|
|
68
|
+
let archive = ''
|
|
69
|
+
beforeEach(() => {
|
|
70
|
+
archive = getRandomArchiveName()
|
|
71
|
+
})
|
|
72
|
+
it('gets an array of archives owned', async () => {
|
|
73
|
+
const api = new XyoArchivistApi(configData)
|
|
74
|
+
try {
|
|
75
|
+
await api.archives.archive(archive).put()
|
|
76
|
+
const archives = await api.archives.get()
|
|
77
|
+
expect(Array.isArray(archives)).toBe(true)
|
|
78
|
+
const archiveNames = archives?.map((x) => x.archive)
|
|
79
|
+
expect(archiveNames).toContain(archive)
|
|
80
|
+
} catch (ex) {
|
|
81
|
+
const error = ex as XyoApiError
|
|
82
|
+
console.log(JSON.stringify(error.response?.data, null, 2))
|
|
83
|
+
throw ex
|
|
84
|
+
}
|
|
85
|
+
})
|
|
86
|
+
})
|
|
87
|
+
|
|
88
|
+
describe('getArchive', function () {
|
|
89
|
+
let archive = ''
|
|
90
|
+
beforeEach(() => {
|
|
91
|
+
archive = getRandomArchiveName()
|
|
92
|
+
})
|
|
93
|
+
it('gets the archive', async () => {
|
|
94
|
+
const api = new XyoArchivistApi(configData)
|
|
95
|
+
try {
|
|
96
|
+
await api.archives.archive(archive).get()
|
|
97
|
+
const response = await api.archives.archive(archive).get()
|
|
98
|
+
expect(response?.archive).toBe(archive)
|
|
99
|
+
} catch (ex) {
|
|
100
|
+
const error = ex as XyoApiError
|
|
101
|
+
console.log(JSON.stringify(error.response?.data, null, 2))
|
|
102
|
+
throw ex
|
|
103
|
+
}
|
|
104
|
+
})
|
|
105
|
+
})
|
|
106
|
+
|
|
107
|
+
describe('putArchive', function () {
|
|
108
|
+
let archive = ''
|
|
109
|
+
beforeEach(() => {
|
|
110
|
+
archive = getRandomArchiveName()
|
|
111
|
+
})
|
|
112
|
+
it('returns the archive owned', async () => {
|
|
113
|
+
const api = new XyoArchivistApi(configData)
|
|
114
|
+
try {
|
|
115
|
+
const response = await api.archives.archive(archive).put()
|
|
116
|
+
expect(response?.archive).toEqual(archive)
|
|
117
|
+
} catch (ex) {
|
|
118
|
+
const error = ex as XyoApiError
|
|
119
|
+
console.log(JSON.stringify(error.response?.data, null, 2))
|
|
120
|
+
throw ex
|
|
121
|
+
}
|
|
122
|
+
})
|
|
123
|
+
})
|
|
124
|
+
|
|
125
|
+
describe('getArchiveKeys', function () {
|
|
126
|
+
it('Returns the keys for the archive', async () => {
|
|
127
|
+
try {
|
|
128
|
+
const archive = getRandomArchiveName()
|
|
129
|
+
const api = new XyoArchivistApi({ ...configData })
|
|
130
|
+
const archiveApi = api.archives.archive(archive)
|
|
131
|
+
await archiveApi.put()
|
|
132
|
+
const key = await archiveApi.settings.key.post()
|
|
133
|
+
const response = await archiveApi.settings.key.get()
|
|
134
|
+
expect(response?.length).toEqual(1)
|
|
135
|
+
expect(response?.[0]).toEqual(key)
|
|
136
|
+
} catch (ex) {
|
|
137
|
+
const error = ex as XyoApiError
|
|
138
|
+
console.log(JSON.stringify(error.response?.data, null, 2))
|
|
139
|
+
throw ex
|
|
140
|
+
}
|
|
141
|
+
})
|
|
142
|
+
})
|
|
143
|
+
|
|
144
|
+
describe('postArchiveKey', function () {
|
|
145
|
+
it('Creates an archive key', async () => {
|
|
146
|
+
try {
|
|
147
|
+
const archive = getRandomArchiveName()
|
|
148
|
+
const api = new XyoArchivistApi({ ...configData })
|
|
149
|
+
const archiveApi = api.archives.archive(archive)
|
|
150
|
+
await archiveApi.put()
|
|
151
|
+
const response = await archiveApi.settings.key.post()
|
|
152
|
+
expect(response?.keys.length).toBe(1)
|
|
153
|
+
} catch (ex) {
|
|
154
|
+
const error = ex as XyoApiError
|
|
155
|
+
console.log(JSON.stringify(error.response?.data, null, 2))
|
|
156
|
+
throw ex
|
|
157
|
+
}
|
|
158
|
+
})
|
|
159
|
+
})
|
|
160
|
+
|
|
161
|
+
describe('findBoundWitnessesStats', function () {
|
|
162
|
+
it('returns stats for boundwitness', async () => {
|
|
163
|
+
let api = new XyoArchivistApi(configData)
|
|
164
|
+
try {
|
|
165
|
+
api = new XyoArchivistApi({ ...configData })
|
|
166
|
+
const stats = await api.archives.archive().block.stats.get()
|
|
167
|
+
expect(stats?.count).toBeGreaterThan(0)
|
|
168
|
+
} catch (ex) {
|
|
169
|
+
const error = ex as XyoApiError
|
|
170
|
+
console.log(JSON.stringify(error.response?.data, null, 2))
|
|
171
|
+
throw ex
|
|
172
|
+
}
|
|
173
|
+
})
|
|
174
|
+
})
|
|
175
|
+
|
|
176
|
+
describe('findBoundWitnessesBefore', function () {
|
|
177
|
+
it('returns bound witnesses from before the timestamp', async () => {
|
|
178
|
+
let api = new XyoArchivistApi(configData)
|
|
179
|
+
try {
|
|
180
|
+
api = new XyoArchivistApi({ ...configData })
|
|
181
|
+
const boundWitness = new XyoBoundWitnessBuilder().witness(XyoAccount.random()).build()
|
|
182
|
+
await api.archives.archive().block.post([boundWitness])
|
|
183
|
+
const timestamp = Date.now() + 10000
|
|
184
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
185
|
+
const response = await api.archives.archive('temp').block.findBefore(timestamp)
|
|
186
|
+
expect(response?.length).toBe(1)
|
|
187
|
+
const actual = response?.[0]
|
|
188
|
+
expect(actual?._timestamp).toBeTruthy()
|
|
189
|
+
expect(actual?._timestamp).toBeLessThan(timestamp)
|
|
190
|
+
} catch (ex) {
|
|
191
|
+
const error = ex as XyoApiError
|
|
192
|
+
console.log(JSON.stringify(error.response?.data, null, 2))
|
|
193
|
+
throw ex
|
|
194
|
+
}
|
|
195
|
+
})
|
|
196
|
+
})
|
|
197
|
+
|
|
198
|
+
describe('findBoundWitnessesAfter', function () {
|
|
199
|
+
it('returns bound witnesses from before the timestamp', async () => {
|
|
200
|
+
let api = new XyoArchivistApi(configData)
|
|
201
|
+
try {
|
|
202
|
+
const archive = await getNewArchive(api)
|
|
203
|
+
api = new XyoArchivistApi({ ...configData })
|
|
204
|
+
const boundWitness = new XyoBoundWitnessBuilder().witness(XyoAccount.random()).build()
|
|
205
|
+
await api.archives.archive(archive).block.post([boundWitness])
|
|
206
|
+
const timestamp = Date.now() - 10000
|
|
207
|
+
const response = await api.archives.archive(archive).block.find({ order: 'asc', timestamp })
|
|
208
|
+
expect(response?.length).toBe(1)
|
|
209
|
+
const actual = response?.[0]
|
|
210
|
+
expect(actual?._timestamp).toBeTruthy()
|
|
211
|
+
expect(actual?._timestamp).toBeGreaterThan(timestamp)
|
|
212
|
+
} catch (ex) {
|
|
213
|
+
const error = ex as XyoApiError
|
|
214
|
+
console.log(JSON.stringify(error.response?.data, null, 2))
|
|
215
|
+
throw ex
|
|
216
|
+
}
|
|
217
|
+
})
|
|
218
|
+
})
|
|
219
|
+
})
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { Huri, XyoAddressValue, XyoDataLike, XyoPayload } from '@xyo-network/core'
|
|
2
|
+
|
|
3
|
+
import { XyoApiBase } from '../Base'
|
|
4
|
+
import { XyoApiResponseBody, XyoApiResponseTuple, XyoApiResponseTupleOrBody, XyoApiResponseType } from '../models'
|
|
5
|
+
import { XyoApiSimple } from '../Simple'
|
|
6
|
+
import { XyoUserApi } from '../User'
|
|
7
|
+
import { XyoAccountApi } from './Account'
|
|
8
|
+
import { XyoArchivistArchiveApi } from './Archive'
|
|
9
|
+
import { XyoArchivistArchivesApi } from './Archives'
|
|
10
|
+
|
|
11
|
+
export class XyoArchivistApi extends XyoApiBase {
|
|
12
|
+
private _archives?: XyoArchivistArchivesApi
|
|
13
|
+
public get archives(): XyoArchivistArchivesApi {
|
|
14
|
+
this._archives =
|
|
15
|
+
this._archives ??
|
|
16
|
+
new XyoArchivistArchivesApi({
|
|
17
|
+
...this.config,
|
|
18
|
+
root: `${this.root}archive/`,
|
|
19
|
+
})
|
|
20
|
+
return this._archives
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
private _stats?: XyoApiSimple<unknown[]>
|
|
24
|
+
public get stats() {
|
|
25
|
+
this._stats =
|
|
26
|
+
this._stats ??
|
|
27
|
+
new XyoApiSimple<unknown[]>({
|
|
28
|
+
...this.config,
|
|
29
|
+
root: `${this.root}stats/`,
|
|
30
|
+
})
|
|
31
|
+
return this._stats
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
private _user?: XyoUserApi
|
|
35
|
+
public get user(): XyoUserApi {
|
|
36
|
+
this._user =
|
|
37
|
+
this._user ??
|
|
38
|
+
new XyoUserApi({
|
|
39
|
+
...this.config,
|
|
40
|
+
root: `${this.root}user/`,
|
|
41
|
+
})
|
|
42
|
+
return this._user
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
public archive(archive = 'temp') {
|
|
46
|
+
const pureArchive = archive.toLowerCase()
|
|
47
|
+
return new XyoArchivistArchiveApi({
|
|
48
|
+
...this.config,
|
|
49
|
+
root: `${this.root}archive/${pureArchive}/`,
|
|
50
|
+
})
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** @deprecated use account instead */
|
|
54
|
+
public wallet(address: XyoDataLike) {
|
|
55
|
+
return this.account(address)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
public account(address: XyoDataLike) {
|
|
59
|
+
return new XyoAccountApi({
|
|
60
|
+
...this.config,
|
|
61
|
+
root: `${this.root}wallet/${new XyoAddressValue(address).hex}/`,
|
|
62
|
+
})
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
public huri(huri: Huri | string) {
|
|
66
|
+
const huriObj = typeof huri === 'string' ? new Huri(huri) : huri
|
|
67
|
+
return new XyoApiSimple<XyoPayload>({
|
|
68
|
+
...this.config,
|
|
69
|
+
root: `${this.root}${huriObj.href}/`,
|
|
70
|
+
})
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/** @deprecated use huri(huri) instead */
|
|
74
|
+
public async get(huri: Huri | string): Promise<XyoApiResponseBody<XyoPayload>>
|
|
75
|
+
/** @deprecated use huri(huri) instead */
|
|
76
|
+
public async get(huri: Huri | string, responseType?: 'body'): Promise<XyoApiResponseBody<XyoPayload>>
|
|
77
|
+
/** @deprecated use huri(huri) instead */
|
|
78
|
+
public async get(huri: Huri | string, responseType?: 'tuple'): Promise<XyoApiResponseTuple<XyoPayload>>
|
|
79
|
+
/** @deprecated use huri(huri) instead */
|
|
80
|
+
public async get(huri: Huri | string, responseType?: XyoApiResponseType): Promise<XyoApiResponseTupleOrBody<XyoPayload>> {
|
|
81
|
+
const huriObj = typeof huri === 'string' ? new Huri(huri) : huri
|
|
82
|
+
switch (responseType) {
|
|
83
|
+
case 'tuple':
|
|
84
|
+
return await this.getEndpoint(huriObj.href, 'tuple')
|
|
85
|
+
default:
|
|
86
|
+
return await this.getEndpoint(huriObj.href, 'body')
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { XyoAccount } from '@xyo-network/core'
|
|
2
|
+
import { Wallet } from 'ethers'
|
|
3
|
+
import { v4 } from 'uuid'
|
|
4
|
+
|
|
5
|
+
import { XyoArchivistApi } from './Api'
|
|
6
|
+
|
|
7
|
+
test('Must have tests defined', () => {
|
|
8
|
+
expect(true).toBeTruthy()
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
export const getRandomArchiveName = (): string => {
|
|
12
|
+
const randomString = (Math.random() + 1).toString(36).substring(7).toLowerCase()
|
|
13
|
+
return `test-archive-${randomString}`
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const getNewArchive = async (api: XyoArchivistApi) => {
|
|
17
|
+
const account = XyoAccount.random()
|
|
18
|
+
const address = new Wallet(account.private.bytes)
|
|
19
|
+
const challenge = await api.account(account.public).challenge.post()
|
|
20
|
+
expect(challenge?.state).toBeTruthy()
|
|
21
|
+
const message = challenge?.state || ''
|
|
22
|
+
const signature = await address.signMessage(message)
|
|
23
|
+
const verify = await api.account(account.public).verify.post({ message, signature })
|
|
24
|
+
expect(verify?.token).toBeTruthy()
|
|
25
|
+
const jwtToken = verify?.token || ''
|
|
26
|
+
const authenticatedApi = new XyoArchivistApi({ ...api.config, jwtToken })
|
|
27
|
+
const name = getRandomArchiveName()
|
|
28
|
+
const response = await authenticatedApi.archives.archive(name).put()
|
|
29
|
+
const archive = response?.archive
|
|
30
|
+
expect(archive).toBeTruthy()
|
|
31
|
+
return archive || ''
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export const testSchemaPrefix = 'network.xyo.schema.test.'
|
|
35
|
+
export const getSchemaName = (): string => {
|
|
36
|
+
return `${testSchemaPrefix}${v4()}`
|
|
37
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { XyoArchive } from '../../models'
|
|
2
|
+
import { XyoApiSimple } from '../../Simple'
|
|
3
|
+
import { XyoArchivistArchiveBlockApi } from '../Block'
|
|
4
|
+
import { XyoArchivistPayloadApi } from '../Payload'
|
|
5
|
+
import { XyoArchivistArchiveSchemaApi } from './Schema'
|
|
6
|
+
import { XyoArchivistArchiveSchemasApi } from './Schemas'
|
|
7
|
+
import { XyoArchivistArchiveSettingsApi } from './Settings'
|
|
8
|
+
|
|
9
|
+
export class XyoArchivistArchiveApi extends XyoApiSimple<XyoArchive> {
|
|
10
|
+
private _block?: XyoArchivistArchiveBlockApi
|
|
11
|
+
public get block(): XyoArchivistArchiveBlockApi {
|
|
12
|
+
this._block =
|
|
13
|
+
this._block ??
|
|
14
|
+
new XyoArchivistArchiveBlockApi({
|
|
15
|
+
...this.config,
|
|
16
|
+
root: `${this.root}block/`,
|
|
17
|
+
})
|
|
18
|
+
return this._block
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
private _payload?: XyoArchivistPayloadApi
|
|
22
|
+
public get payload(): XyoArchivistPayloadApi {
|
|
23
|
+
this._payload =
|
|
24
|
+
this._payload ??
|
|
25
|
+
new XyoArchivistPayloadApi({
|
|
26
|
+
...this.config,
|
|
27
|
+
root: `${this.root}payload/`,
|
|
28
|
+
})
|
|
29
|
+
return this._payload
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
private _settings?: XyoArchivistArchiveSettingsApi
|
|
33
|
+
public get settings(): XyoArchivistArchiveSettingsApi {
|
|
34
|
+
this._settings =
|
|
35
|
+
this._settings ??
|
|
36
|
+
new XyoArchivistArchiveSettingsApi({
|
|
37
|
+
...this.config,
|
|
38
|
+
root: `${this.root}settings/`,
|
|
39
|
+
})
|
|
40
|
+
return this._settings
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
private _schemas?: XyoArchivistArchiveSchemasApi
|
|
44
|
+
public get schemas(): XyoArchivistArchiveSchemasApi {
|
|
45
|
+
this._schemas =
|
|
46
|
+
this._schemas ??
|
|
47
|
+
new XyoArchivistArchiveSchemasApi({
|
|
48
|
+
...this.config,
|
|
49
|
+
root: `${this.root}schema/`,
|
|
50
|
+
})
|
|
51
|
+
return this._schemas
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
public schema(schema: string): XyoArchivistArchiveSchemaApi {
|
|
55
|
+
return new XyoArchivistArchiveSchemaApi({
|
|
56
|
+
...this.config,
|
|
57
|
+
root: `${this.root}schema/${schema}/`,
|
|
58
|
+
})
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { XyoApiConfig } from '../../../models'
|
|
2
|
+
import { XyoArchivistApi } from '../../Api'
|
|
3
|
+
|
|
4
|
+
const config: XyoApiConfig = {
|
|
5
|
+
apiDomain: process.env.API_DOMAIN || 'http://localhost:8080',
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
describe('XyoArchivistSchemaApi', () => {
|
|
9
|
+
describe('schema', () => {
|
|
10
|
+
it('calculates the correct path', () => {
|
|
11
|
+
const api = new XyoArchivistApi(config)
|
|
12
|
+
const path = api.archive('foo').schema('foo.bar.baz').config.root
|
|
13
|
+
expect(path).toBe('/archive/foo/schema/foo.bar.baz/')
|
|
14
|
+
})
|
|
15
|
+
})
|
|
16
|
+
describe('recent', () => {
|
|
17
|
+
it('calculates the correct path', () => {
|
|
18
|
+
const api = new XyoArchivistApi(config)
|
|
19
|
+
const path = api.archive('foo').schema('foo.bar.baz').recent.config.root
|
|
20
|
+
expect(path).toBe('/archive/foo/schema/foo.bar.baz/recent/')
|
|
21
|
+
})
|
|
22
|
+
})
|
|
23
|
+
})
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { XyoPayload } from '@xyo-network/core'
|
|
2
|
+
|
|
3
|
+
import { XyoApiBase } from '../../../Base'
|
|
4
|
+
import { XyoApiSimple } from '../../../Simple'
|
|
5
|
+
|
|
6
|
+
export class XyoArchivistArchiveSchemaApi extends XyoApiBase {
|
|
7
|
+
private _recent?: XyoApiSimple<XyoPayload[]>
|
|
8
|
+
public get recent(): XyoApiSimple<XyoPayload[]> {
|
|
9
|
+
this._recent =
|
|
10
|
+
this._recent ??
|
|
11
|
+
new XyoApiSimple<XyoPayload[]>({
|
|
12
|
+
...this.config,
|
|
13
|
+
root: `${this.root}recent/`,
|
|
14
|
+
})
|
|
15
|
+
return this._recent
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Api'
|