@xyo-network/api 2.20.43 → 2.20.44
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/cjs/Archivist/Account/Api.d.ts +18 -18
- package/dist/cjs/Archivist/Account/Api.js +14 -14
- package/dist/cjs/Archivist/Account/index.d.ts +1 -1
- package/dist/cjs/Archivist/Account/index.js +4 -4
- package/dist/cjs/Archivist/Api.d.ts +34 -33
- package/dist/cjs/Archivist/Api.js +68 -67
- package/dist/cjs/Archivist/Api.js.map +1 -1
- package/dist/cjs/Archivist/Archive/Api.d.ts +18 -18
- package/dist/cjs/Archivist/Archive/Api.js +39 -39
- package/dist/cjs/Archivist/Archive/Schema/Api.d.ts +7 -7
- package/dist/cjs/Archivist/Archive/Schema/Api.js +14 -14
- package/dist/cjs/Archivist/Archive/Schema/index.d.ts +1 -1
- package/dist/cjs/Archivist/Archive/Schema/index.js +4 -4
- package/dist/cjs/Archivist/Archive/Schemas/Api.d.ts +6 -6
- package/dist/cjs/Archivist/Archive/Schemas/Api.js +13 -13
- package/dist/cjs/Archivist/Archive/Schemas/index.d.ts +1 -1
- package/dist/cjs/Archivist/Archive/Schemas/index.js +4 -4
- package/dist/cjs/Archivist/Archive/Settings/Api.d.ts +6 -6
- package/dist/cjs/Archivist/Archive/Settings/Api.js +14 -14
- package/dist/cjs/Archivist/Archive/Settings/Key/Api.d.ts +5 -5
- package/dist/cjs/Archivist/Archive/Settings/Key/Api.js +10 -10
- package/dist/cjs/Archivist/Archive/Settings/Key/index.d.ts +1 -1
- package/dist/cjs/Archivist/Archive/Settings/Key/index.js +4 -4
- package/dist/cjs/Archivist/Archive/Settings/index.d.ts +2 -2
- package/dist/cjs/Archivist/Archive/Settings/index.js +5 -5
- package/dist/cjs/Archivist/Archive/index.d.ts +4 -4
- package/dist/cjs/Archivist/Archive/index.js +7 -7
- package/dist/cjs/Archivist/Archives/Api.d.ts +8 -8
- package/dist/cjs/Archivist/Archives/Api.js +15 -15
- package/dist/cjs/Archivist/Archives/index.d.ts +1 -1
- package/dist/cjs/Archivist/Archives/index.js +4 -4
- package/dist/cjs/Archivist/Block/Api.d.ts +8 -8
- package/dist/cjs/Archivist/Block/Api.js +11 -11
- package/dist/cjs/Archivist/Block/index.d.ts +1 -1
- package/dist/cjs/Archivist/Block/index.js +4 -4
- package/dist/cjs/Archivist/Node/Api.d.ts +20 -0
- package/dist/cjs/Archivist/Node/Api.js +57 -0
- package/dist/cjs/Archivist/Node/Api.js.map +1 -0
- package/dist/cjs/Archivist/Node/index.d.ts +1 -0
- package/dist/cjs/Archivist/Node/index.js +5 -0
- package/dist/cjs/Archivist/Node/index.js.map +1 -0
- package/dist/cjs/Archivist/Payload/Api.d.ts +40 -40
- package/dist/cjs/Archivist/Payload/Api.js +83 -83
- package/dist/cjs/Archivist/Payload/Schema/Api.d.ts +8 -8
- package/dist/cjs/Archivist/Payload/Schema/Api.js +13 -13
- package/dist/cjs/Archivist/Payload/Schema/index.d.ts +1 -1
- package/dist/cjs/Archivist/Payload/Schema/index.js +4 -4
- package/dist/cjs/Archivist/Payload/index.d.ts +2 -2
- package/dist/cjs/Archivist/Payload/index.js +5 -5
- package/dist/cjs/Archivist/index.d.ts +6 -6
- package/dist/cjs/Archivist/index.js +9 -9
- package/dist/cjs/Base.d.ts +33 -33
- package/dist/cjs/Base.js +146 -146
- package/dist/cjs/Diviner/LocationDiviner/LocationDivinerApi.d.ts +11 -11
- package/dist/cjs/Diviner/LocationDiviner/LocationDivinerApi.js +27 -27
- package/dist/cjs/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.d.ts +9 -9
- package/dist/cjs/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.js +23 -23
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.d.ts +4 -4
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.js +2 -2
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.ts +11 -11
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.js +9 -9
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.d.ts +2 -2
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.js +5 -5
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.ts +11 -11
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.js +9 -9
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.ts +1 -1
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.js +4 -4
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.d.ts +17 -17
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.js +2 -2
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.d.ts +4 -4
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.js +2 -2
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationQuerySchema.d.ts +5 -5
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationQuerySchema.js +12 -12
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.ts +7 -7
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.js +2 -2
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.ts +11 -11
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.js +9 -9
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.ts +2 -2
- package/dist/cjs/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.js +5 -5
- package/dist/cjs/Diviner/LocationDiviner/Queries/index.d.ts +6 -6
- package/dist/cjs/Diviner/LocationDiviner/Queries/index.js +9 -9
- package/dist/cjs/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.d.ts +13 -13
- package/dist/cjs/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.js +4 -4
- package/dist/cjs/Diviner/LocationDiviner/Witnesses/LocationWitness.d.ts +21 -21
- package/dist/cjs/Diviner/LocationDiviner/Witnesses/LocationWitness.js +4 -4
- package/dist/cjs/Diviner/LocationDiviner/Witnesses/index.d.ts +2 -2
- package/dist/cjs/Diviner/LocationDiviner/Witnesses/index.js +5 -5
- package/dist/cjs/Diviner/LocationDiviner/index.d.ts +4 -4
- package/dist/cjs/Diviner/LocationDiviner/index.js +7 -7
- package/dist/cjs/Diviner/LocationDiviner/models.d.ts +4 -4
- package/dist/cjs/Diviner/LocationDiviner/models.js +2 -2
- package/dist/cjs/Diviner/index.d.ts +1 -1
- package/dist/cjs/Diviner/index.js +4 -4
- package/dist/cjs/Simple.d.ts +21 -21
- package/dist/cjs/Simple.js +59 -59
- package/dist/cjs/Test/index.d.ts +2 -2
- package/dist/cjs/Test/index.js +5 -5
- package/dist/cjs/Test/testBoundWitness.d.ts +3 -3
- package/dist/cjs/Test/testBoundWitness.js +16 -16
- package/dist/cjs/Test/testPayload.d.ts +4 -4
- package/dist/cjs/Test/testPayload.js +18 -18
- package/dist/cjs/User/Api.d.ts +31 -31
- package/dist/cjs/User/Api.js +24 -24
- package/dist/cjs/User/index.d.ts +1 -1
- package/dist/cjs/User/index.js +4 -4
- package/dist/cjs/WithArchive.d.ts +3 -3
- package/dist/cjs/WithArchive.js +2 -2
- package/dist/cjs/index.d.ts +7 -7
- package/dist/cjs/index.js +10 -10
- package/dist/cjs/models/Api/Config.d.ts +24 -24
- package/dist/cjs/models/Api/Config.js +2 -2
- package/dist/cjs/models/Api/Envelope.d.ts +14 -14
- package/dist/cjs/models/Api/Envelope.js +2 -2
- package/dist/cjs/models/Api/Error.d.ts +4 -4
- package/dist/cjs/models/Api/Error.js +2 -2
- package/dist/cjs/models/Api/Reportable.d.ts +7 -7
- package/dist/cjs/models/Api/Reportable.js +2 -2
- package/dist/cjs/models/Api/Response.d.ts +7 -7
- package/dist/cjs/models/Api/Response.js +2 -2
- package/dist/cjs/models/Api/Warning.d.ts +1 -1
- package/dist/cjs/models/Api/Warning.js +2 -2
- package/dist/cjs/models/Api/index.d.ts +6 -6
- package/dist/cjs/models/Api/index.js +9 -9
- package/dist/cjs/models/Archive.d.ts +24 -24
- package/dist/cjs/models/Archive.js +2 -2
- package/dist/cjs/models/ArchiveKey.d.ts +5 -5
- package/dist/cjs/models/ArchiveKey.js +2 -2
- package/dist/cjs/models/ArchivePath.d.ts +3 -3
- package/dist/cjs/models/ArchivePath.js +2 -2
- package/dist/cjs/models/index.d.ts +4 -4
- package/dist/cjs/models/index.js +7 -7
- package/dist/cjs/objToQuery.d.ts +1 -1
- package/dist/cjs/objToQuery.js +12 -12
- package/dist/docs.json +4130 -4134
- package/dist/esm/Archivist/Account/Api.d.ts +18 -18
- package/dist/esm/Archivist/Account/Api.js +16 -16
- package/dist/esm/Archivist/Account/index.d.ts +1 -1
- package/dist/esm/Archivist/Account/index.js +1 -1
- package/dist/esm/Archivist/Api.d.ts +34 -33
- package/dist/esm/Archivist/Api.js +82 -81
- package/dist/esm/Archivist/Api.js.map +1 -1
- package/dist/esm/Archivist/Archive/Api.d.ts +18 -18
- package/dist/esm/Archivist/Archive/Api.js +50 -50
- package/dist/esm/Archivist/Archive/Schema/Api.d.ts +7 -7
- package/dist/esm/Archivist/Archive/Schema/Api.js +13 -13
- package/dist/esm/Archivist/Archive/Schema/index.d.ts +1 -1
- package/dist/esm/Archivist/Archive/Schema/index.js +1 -1
- package/dist/esm/Archivist/Archive/Schemas/Api.d.ts +6 -6
- package/dist/esm/Archivist/Archive/Schemas/Api.js +12 -12
- package/dist/esm/Archivist/Archive/Schemas/index.d.ts +1 -1
- package/dist/esm/Archivist/Archive/Schemas/index.js +1 -1
- package/dist/esm/Archivist/Archive/Settings/Api.d.ts +6 -6
- package/dist/esm/Archivist/Archive/Settings/Api.js +13 -13
- package/dist/esm/Archivist/Archive/Settings/Key/Api.d.ts +5 -5
- package/dist/esm/Archivist/Archive/Settings/Key/Api.js +9 -9
- package/dist/esm/Archivist/Archive/Settings/Key/index.d.ts +1 -1
- package/dist/esm/Archivist/Archive/Settings/Key/index.js +1 -1
- package/dist/esm/Archivist/Archive/Settings/index.d.ts +2 -2
- package/dist/esm/Archivist/Archive/Settings/index.js +2 -2
- package/dist/esm/Archivist/Archive/index.d.ts +4 -4
- package/dist/esm/Archivist/Archive/index.js +4 -4
- package/dist/esm/Archivist/Archives/Api.d.ts +8 -8
- package/dist/esm/Archivist/Archives/Api.js +14 -14
- package/dist/esm/Archivist/Archives/index.d.ts +1 -1
- package/dist/esm/Archivist/Archives/index.js +1 -1
- package/dist/esm/Archivist/Block/Api.d.ts +8 -8
- package/dist/esm/Archivist/Block/Api.js +10 -10
- package/dist/esm/Archivist/Block/index.d.ts +1 -1
- package/dist/esm/Archivist/Block/index.js +1 -1
- package/dist/esm/Archivist/Node/Api.d.ts +20 -0
- package/dist/esm/Archivist/Node/Api.js +53 -0
- package/dist/esm/Archivist/Node/Api.js.map +1 -0
- package/dist/esm/Archivist/Node/index.d.ts +1 -0
- package/dist/esm/Archivist/Node/index.js +2 -0
- package/dist/esm/Archivist/Node/index.js.map +1 -0
- package/dist/esm/Archivist/Payload/Api.d.ts +40 -40
- package/dist/esm/Archivist/Payload/Api.js +67 -67
- package/dist/esm/Archivist/Payload/Schema/Api.d.ts +8 -8
- package/dist/esm/Archivist/Payload/Schema/Api.js +12 -12
- package/dist/esm/Archivist/Payload/Schema/index.d.ts +1 -1
- package/dist/esm/Archivist/Payload/Schema/index.js +1 -1
- package/dist/esm/Archivist/Payload/index.d.ts +2 -2
- package/dist/esm/Archivist/Payload/index.js +2 -2
- package/dist/esm/Archivist/index.d.ts +6 -6
- package/dist/esm/Archivist/index.js +6 -6
- package/dist/esm/Base.d.ts +33 -33
- package/dist/esm/Base.js +128 -128
- package/dist/esm/Diviner/LocationDiviner/LocationDivinerApi.d.ts +11 -11
- package/dist/esm/Diviner/LocationDiviner/LocationDivinerApi.js +19 -19
- package/dist/esm/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.d.ts +9 -9
- package/dist/esm/Diviner/LocationDiviner/LocationDivinerApiResponseTransformer.js +17 -17
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.d.ts +4 -4
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapPointProperties.js +1 -1
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.ts +11 -11
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.js +5 -5
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.d.ts +2 -2
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/index.js +2 -2
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.d.ts +11 -11
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/LocationQuadkeyHeatmapQuery.js +5 -5
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.d.ts +1 -1
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationQuadkeyHeatmapQuery/index.js +1 -1
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.d.ts +17 -17
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationQueryCreationRequest.js +1 -1
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.d.ts +4 -4
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationQueryCreationResponse.js +1 -1
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationQuerySchema.d.ts +5 -5
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationQuerySchema.js +8 -8
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.d.ts +7 -7
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangePointProperties.js +1 -1
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.d.ts +11 -11
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/LocationTimeRangeQuery.js +5 -5
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.d.ts +2 -2
- package/dist/esm/Diviner/LocationDiviner/Queries/LocationTimeRangeQuery/index.js +2 -2
- package/dist/esm/Diviner/LocationDiviner/Queries/index.d.ts +6 -6
- package/dist/esm/Diviner/LocationDiviner/Queries/index.js +6 -6
- package/dist/esm/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.d.ts +13 -13
- package/dist/esm/Diviner/LocationDiviner/Witnesses/CurrentLocationWitness.js +1 -1
- package/dist/esm/Diviner/LocationDiviner/Witnesses/LocationWitness.d.ts +21 -21
- package/dist/esm/Diviner/LocationDiviner/Witnesses/LocationWitness.js +1 -1
- package/dist/esm/Diviner/LocationDiviner/Witnesses/index.d.ts +2 -2
- package/dist/esm/Diviner/LocationDiviner/Witnesses/index.js +2 -2
- package/dist/esm/Diviner/LocationDiviner/index.d.ts +4 -4
- package/dist/esm/Diviner/LocationDiviner/index.js +4 -4
- package/dist/esm/Diviner/LocationDiviner/models.d.ts +4 -4
- package/dist/esm/Diviner/LocationDiviner/models.js +1 -1
- package/dist/esm/Diviner/index.d.ts +1 -1
- package/dist/esm/Diviner/index.js +1 -1
- package/dist/esm/Simple.d.ts +21 -21
- package/dist/esm/Simple.js +44 -44
- package/dist/esm/Test/index.d.ts +2 -2
- package/dist/esm/Test/index.js +2 -2
- package/dist/esm/Test/testBoundWitness.d.ts +3 -3
- package/dist/esm/Test/testBoundWitness.js +13 -13
- package/dist/esm/Test/testPayload.d.ts +4 -4
- package/dist/esm/Test/testPayload.js +14 -14
- package/dist/esm/User/Api.d.ts +31 -31
- package/dist/esm/User/Api.js +26 -26
- package/dist/esm/User/index.d.ts +1 -1
- package/dist/esm/User/index.js +1 -1
- package/dist/esm/WithArchive.d.ts +3 -3
- package/dist/esm/WithArchive.js +1 -1
- package/dist/esm/index.d.ts +7 -7
- package/dist/esm/index.js +7 -7
- package/dist/esm/models/Api/Config.d.ts +24 -24
- package/dist/esm/models/Api/Config.js +1 -1
- package/dist/esm/models/Api/Envelope.d.ts +14 -14
- package/dist/esm/models/Api/Envelope.js +1 -1
- package/dist/esm/models/Api/Error.d.ts +4 -4
- package/dist/esm/models/Api/Error.js +1 -1
- package/dist/esm/models/Api/Reportable.d.ts +7 -7
- package/dist/esm/models/Api/Reportable.js +1 -1
- package/dist/esm/models/Api/Response.d.ts +7 -7
- package/dist/esm/models/Api/Response.js +1 -1
- package/dist/esm/models/Api/Warning.d.ts +1 -1
- package/dist/esm/models/Api/Warning.js +1 -1
- package/dist/esm/models/Api/index.d.ts +6 -6
- package/dist/esm/models/Api/index.js +6 -6
- package/dist/esm/models/Archive.d.ts +24 -24
- package/dist/esm/models/Archive.js +1 -1
- package/dist/esm/models/ArchiveKey.d.ts +5 -5
- package/dist/esm/models/ArchiveKey.js +1 -1
- package/dist/esm/models/ArchivePath.d.ts +3 -3
- package/dist/esm/models/ArchivePath.js +1 -1
- package/dist/esm/models/index.d.ts +4 -4
- package/dist/esm/models/index.js +4 -4
- package/dist/esm/objToQuery.d.ts +1 -1
- package/dist/esm/objToQuery.js +8 -8
- package/package.json +3 -3
- package/src/Archivist/Api.spec.ts +1 -26
- package/src/Archivist/Api.ts +4 -3
- package/src/Archivist/Node/Api.spec.ts +133 -0
- package/src/Archivist/Node/Api.ts +61 -0
- package/src/Archivist/Node/index.ts +1 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./Api"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./Schema"), exports);
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./Api"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./Schema"), exports);
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './Account';
|
|
2
|
-
export * from './Api';
|
|
3
|
-
export * from './Archive';
|
|
4
|
-
export * from './Archives';
|
|
5
|
-
export * from './Block';
|
|
6
|
-
export * from './Payload';
|
|
1
|
+
export * from './Account';
|
|
2
|
+
export * from './Api';
|
|
3
|
+
export * from './Archive';
|
|
4
|
+
export * from './Archives';
|
|
5
|
+
export * from './Block';
|
|
6
|
+
export * from './Payload';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./Account"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./Api"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./Archive"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./Archives"), exports);
|
|
8
|
-
tslib_1.__exportStar(require("./Block"), exports);
|
|
9
|
-
tslib_1.__exportStar(require("./Payload"), exports);
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./Account"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./Api"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./Archive"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./Archives"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./Block"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./Payload"), exports);
|
|
10
10
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/Base.d.ts
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { Axios } from 'axios';
|
|
2
|
-
import { XyoApiConfig, XyoApiEnvelope, XyoApiError, XyoApiReportable, XyoApiResponse, XyoApiResponseBody, XyoApiResponseTuple } from './models';
|
|
3
|
-
export declare class XyoApiBase<C extends XyoApiConfig = XyoApiConfig> implements XyoApiReportable {
|
|
4
|
-
readonly config: C;
|
|
5
|
-
protected axios: Axios;
|
|
6
|
-
constructor(config: C);
|
|
7
|
-
private axiosHeaders;
|
|
8
|
-
private axiosConfig;
|
|
9
|
-
onError(error: XyoApiError, depth?: number): void;
|
|
10
|
-
onFailure(response: XyoApiResponse, depth?: number): void;
|
|
11
|
-
onSuccess(response: XyoApiResponse, depth?: number): void;
|
|
12
|
-
protected get root(): string;
|
|
13
|
-
protected get query(): string;
|
|
14
|
-
private resolveRoot;
|
|
15
|
-
private static resolveResponse;
|
|
16
|
-
protected handleMonitorResponseError<T>(error: XyoApiError, trapAxiosException: boolean): XyoApiResponse<XyoApiEnvelope<T>, unknown> | undefined;
|
|
17
|
-
protected monitorResponse<T>(closure: () => Promise<XyoApiResponse<XyoApiEnvelope<T>>>): Promise<XyoApiResponse<XyoApiEnvelope<T>, unknown> | undefined>;
|
|
18
|
-
protected getEndpoint<T = unknown>(endPoint?: string): Promise<XyoApiResponseBody<T>>;
|
|
19
|
-
protected getEndpoint<T = unknown>(endPoint?: string, responseType?: 'body'): Promise<XyoApiResponseBody<T>>;
|
|
20
|
-
protected getEndpoint<T = unknown>(endPoint?: string, responseType?: 'tuple'): Promise<XyoApiResponseTuple<T>>;
|
|
21
|
-
protected postEndpoint<T = unknown, D = unknown>(endPoint?: string, data?: D): Promise<XyoApiResponseBody<T>>;
|
|
22
|
-
protected postEndpoint<T = unknown, D = unknown>(endPoint?: string, data?: D, responseType?: 'body'): Promise<XyoApiResponseBody<T>>;
|
|
23
|
-
protected postEndpoint<T = unknown, D = unknown>(endPoint?: string, data?: D, responseType?: 'tuple'): Promise<XyoApiResponseTuple<T>>;
|
|
24
|
-
protected putEndpoint<T = unknown, D = unknown>(endPoint?: string, data?: D): Promise<XyoApiResponseBody<T>>;
|
|
25
|
-
protected putEndpoint<T = unknown, D = unknown>(endPoint?: string, data?: D, responseType?: 'body'): Promise<XyoApiResponseBody<T>>;
|
|
26
|
-
protected putEndpoint<T = unknown, D = unknown>(endPoint?: string, data?: D, responseType?: 'tuple'): Promise<XyoApiResponseTuple<T>>;
|
|
27
|
-
protected deleteEndpoint<T = unknown>(endPoint?: string): Promise<XyoApiResponseBody<T>>;
|
|
28
|
-
protected deleteEndpoint<T = unknown>(endPoint?: string, responseType?: 'body'): Promise<XyoApiResponseBody<T>>;
|
|
29
|
-
protected deleteEndpoint<T = unknown>(endPoint?: string, responseType?: 'tuple'): Promise<XyoApiResponseTuple<T>>;
|
|
30
|
-
private static shapeResponse;
|
|
31
|
-
protected get headers(): Record<string, string>;
|
|
32
|
-
get authenticated(): boolean;
|
|
33
|
-
}
|
|
1
|
+
import { Axios } from 'axios';
|
|
2
|
+
import { XyoApiConfig, XyoApiEnvelope, XyoApiError, XyoApiReportable, XyoApiResponse, XyoApiResponseBody, XyoApiResponseTuple } from './models';
|
|
3
|
+
export declare class XyoApiBase<C extends XyoApiConfig = XyoApiConfig> implements XyoApiReportable {
|
|
4
|
+
readonly config: C;
|
|
5
|
+
protected axios: Axios;
|
|
6
|
+
constructor(config: C);
|
|
7
|
+
private axiosHeaders;
|
|
8
|
+
private axiosConfig;
|
|
9
|
+
onError(error: XyoApiError, depth?: number): void;
|
|
10
|
+
onFailure(response: XyoApiResponse, depth?: number): void;
|
|
11
|
+
onSuccess(response: XyoApiResponse, depth?: number): void;
|
|
12
|
+
protected get root(): string;
|
|
13
|
+
protected get query(): string;
|
|
14
|
+
private resolveRoot;
|
|
15
|
+
private static resolveResponse;
|
|
16
|
+
protected handleMonitorResponseError<T>(error: XyoApiError, trapAxiosException: boolean): XyoApiResponse<XyoApiEnvelope<T>, unknown> | undefined;
|
|
17
|
+
protected monitorResponse<T>(closure: () => Promise<XyoApiResponse<XyoApiEnvelope<T>>>): Promise<XyoApiResponse<XyoApiEnvelope<T>, unknown> | undefined>;
|
|
18
|
+
protected getEndpoint<T = unknown>(endPoint?: string): Promise<XyoApiResponseBody<T>>;
|
|
19
|
+
protected getEndpoint<T = unknown>(endPoint?: string, responseType?: 'body'): Promise<XyoApiResponseBody<T>>;
|
|
20
|
+
protected getEndpoint<T = unknown>(endPoint?: string, responseType?: 'tuple'): Promise<XyoApiResponseTuple<T>>;
|
|
21
|
+
protected postEndpoint<T = unknown, D = unknown>(endPoint?: string, data?: D): Promise<XyoApiResponseBody<T>>;
|
|
22
|
+
protected postEndpoint<T = unknown, D = unknown>(endPoint?: string, data?: D, responseType?: 'body'): Promise<XyoApiResponseBody<T>>;
|
|
23
|
+
protected postEndpoint<T = unknown, D = unknown>(endPoint?: string, data?: D, responseType?: 'tuple'): Promise<XyoApiResponseTuple<T>>;
|
|
24
|
+
protected putEndpoint<T = unknown, D = unknown>(endPoint?: string, data?: D): Promise<XyoApiResponseBody<T>>;
|
|
25
|
+
protected putEndpoint<T = unknown, D = unknown>(endPoint?: string, data?: D, responseType?: 'body'): Promise<XyoApiResponseBody<T>>;
|
|
26
|
+
protected putEndpoint<T = unknown, D = unknown>(endPoint?: string, data?: D, responseType?: 'tuple'): Promise<XyoApiResponseTuple<T>>;
|
|
27
|
+
protected deleteEndpoint<T = unknown>(endPoint?: string): Promise<XyoApiResponseBody<T>>;
|
|
28
|
+
protected deleteEndpoint<T = unknown>(endPoint?: string, responseType?: 'body'): Promise<XyoApiResponseBody<T>>;
|
|
29
|
+
protected deleteEndpoint<T = unknown>(endPoint?: string, responseType?: 'tuple'): Promise<XyoApiResponseTuple<T>>;
|
|
30
|
+
private static shapeResponse;
|
|
31
|
+
protected get headers(): Record<string, string>;
|
|
32
|
+
get authenticated(): boolean;
|
|
33
|
+
}
|
package/dist/cjs/Base.js
CHANGED
|
@@ -1,147 +1,147 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.XyoApiBase = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const axios_1 = require("axios");
|
|
6
|
-
const pako_1 = require("pako");
|
|
7
|
-
class XyoApiBase {
|
|
8
|
-
constructor(config) {
|
|
9
|
-
this.config = config;
|
|
10
|
-
this.axios = new axios_1.Axios(this.axiosConfig());
|
|
11
|
-
}
|
|
12
|
-
axiosHeaders() {
|
|
13
|
-
return Object.assign(Object.assign({}, this.headers), { Accept: 'application/json, text/plain, *.*', 'Content-Type': 'application/json' });
|
|
14
|
-
}
|
|
15
|
-
axiosConfig() {
|
|
16
|
-
return {
|
|
17
|
-
headers: this.axiosHeaders(),
|
|
18
|
-
transformRequest: (data, headers) => {
|
|
19
|
-
var _a;
|
|
20
|
-
const json = JSON.stringify(data);
|
|
21
|
-
if (headers && data) {
|
|
22
|
-
if (json.length > ((_a = this.config.compressionThreshold) !== null && _a !== void 0 ? _a : 1024)) {
|
|
23
|
-
headers['Content-Encoding'] = 'gzip';
|
|
24
|
-
return (0, pako_1.gzip)(JSON.stringify(data)).buffer;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
return JSON.stringify(data);
|
|
28
|
-
},
|
|
29
|
-
transformResponse: (data) => {
|
|
30
|
-
try {
|
|
31
|
-
return JSON.parse(data);
|
|
32
|
-
}
|
|
33
|
-
catch (ex) {
|
|
34
|
-
return null;
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
onError(error, depth = 0) {
|
|
40
|
-
var _a, _b, _c, _d;
|
|
41
|
-
(_b = (_a = this.config.reportableParent) === null || _a === void 0 ? void 0 : _a.onError) === null || _b === void 0 ? void 0 : _b.call(_a, error, depth + 1);
|
|
42
|
-
(_d = (_c = this.config).onError) === null || _d === void 0 ? void 0 : _d.call(_c, error, depth);
|
|
43
|
-
}
|
|
44
|
-
onFailure(response, depth = 0) {
|
|
45
|
-
var _a, _b, _c, _d;
|
|
46
|
-
(_b = (_a = this.config.reportableParent) === null || _a === void 0 ? void 0 : _a.onFailure) === null || _b === void 0 ? void 0 : _b.call(_a, response, depth + 1);
|
|
47
|
-
(_d = (_c = this.config).onFailure) === null || _d === void 0 ? void 0 : _d.call(_c, response, depth);
|
|
48
|
-
}
|
|
49
|
-
onSuccess(response, depth = 0) {
|
|
50
|
-
var _a, _b, _c, _d;
|
|
51
|
-
(_b = (_a = this.config.reportableParent) === null || _a === void 0 ? void 0 : _a.onSuccess) === null || _b === void 0 ? void 0 : _b.call(_a, response, depth + 1);
|
|
52
|
-
(_d = (_c = this.config).onSuccess) === null || _d === void 0 ? void 0 : _d.call(_c, response, depth);
|
|
53
|
-
}
|
|
54
|
-
get root() {
|
|
55
|
-
var _a;
|
|
56
|
-
return (_a = this.config.root) !== null && _a !== void 0 ? _a : '/';
|
|
57
|
-
}
|
|
58
|
-
get query() {
|
|
59
|
-
var _a;
|
|
60
|
-
return (_a = this.config.query) !== null && _a !== void 0 ? _a : '';
|
|
61
|
-
}
|
|
62
|
-
resolveRoot() {
|
|
63
|
-
return `${this.config.apiDomain}${this.root}`;
|
|
64
|
-
}
|
|
65
|
-
static resolveResponse(result) {
|
|
66
|
-
var _a;
|
|
67
|
-
return [(_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.data, result === null || result === void 0 ? void 0 : result.data, result];
|
|
68
|
-
}
|
|
69
|
-
handleMonitorResponseError(error, trapAxiosException) {
|
|
70
|
-
if (!error.isXyoError) {
|
|
71
|
-
throw error;
|
|
72
|
-
}
|
|
73
|
-
if (trapAxiosException) {
|
|
74
|
-
error.response ? this.onFailure(error.response) : this.onError(error);
|
|
75
|
-
if (this.config.throwFailure) {
|
|
76
|
-
throw error;
|
|
77
|
-
}
|
|
78
|
-
return error.response;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
monitorResponse(closure) {
|
|
82
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
83
|
-
//we use this to prevent accidental catching on exceptions in callbacks
|
|
84
|
-
let trapAxiosException = true;
|
|
85
|
-
try {
|
|
86
|
-
const response = yield closure();
|
|
87
|
-
trapAxiosException = false;
|
|
88
|
-
response.status < 300 ? this.onSuccess(response) : this.onFailure(response);
|
|
89
|
-
return response;
|
|
90
|
-
}
|
|
91
|
-
catch (ex) {
|
|
92
|
-
this.handleMonitorResponseError(ex, trapAxiosException);
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
getEndpoint(endPoint = '', responseType) {
|
|
97
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
98
|
-
const response = yield this.monitorResponse(() => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
99
|
-
return yield this.axios.get(`${this.resolveRoot()}${endPoint}${this.query}`);
|
|
100
|
-
}));
|
|
101
|
-
return XyoApiBase.shapeResponse(response, responseType);
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
postEndpoint(endPoint = '', data, responseType) {
|
|
105
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
106
|
-
const response = yield this.monitorResponse(() => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
107
|
-
return yield this.axios.post(`${this.resolveRoot()}${endPoint}${this.query}`, data);
|
|
108
|
-
}));
|
|
109
|
-
return XyoApiBase.shapeResponse(response, responseType);
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
putEndpoint(endPoint = '', data, responseType) {
|
|
113
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
114
|
-
const response = yield this.monitorResponse(() => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
115
|
-
return yield this.axios.put(`${this.resolveRoot()}${endPoint}${this.query}`, data);
|
|
116
|
-
}));
|
|
117
|
-
return XyoApiBase.shapeResponse(response, responseType);
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
deleteEndpoint(endPoint = '', responseType) {
|
|
121
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
122
|
-
const response = yield this.monitorResponse(() => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
123
|
-
return yield this.axios.delete(`${this.resolveRoot()}${endPoint}${this.query}`);
|
|
124
|
-
}));
|
|
125
|
-
return XyoApiBase.shapeResponse(response, responseType);
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
static shapeResponse(response, responseType) {
|
|
129
|
-
const resolvedResponse = XyoApiBase.resolveResponse(response);
|
|
130
|
-
return responseType === 'tuple' ? resolvedResponse : resolvedResponse[0];
|
|
131
|
-
}
|
|
132
|
-
get headers() {
|
|
133
|
-
const headers = {};
|
|
134
|
-
if (this.config.jwtToken) {
|
|
135
|
-
headers.Authorization = `Bearer ${this.config.jwtToken}`;
|
|
136
|
-
}
|
|
137
|
-
if (this.config.apiKey) {
|
|
138
|
-
headers['x-api-key'] = this.config.apiKey;
|
|
139
|
-
}
|
|
140
|
-
return headers;
|
|
141
|
-
}
|
|
142
|
-
get authenticated() {
|
|
143
|
-
return !!this.config.apiKey || !!this.config.jwtToken;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
exports.XyoApiBase = XyoApiBase;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.XyoApiBase = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const axios_1 = require("axios");
|
|
6
|
+
const pako_1 = require("pako");
|
|
7
|
+
class XyoApiBase {
|
|
8
|
+
constructor(config) {
|
|
9
|
+
this.config = config;
|
|
10
|
+
this.axios = new axios_1.Axios(this.axiosConfig());
|
|
11
|
+
}
|
|
12
|
+
axiosHeaders() {
|
|
13
|
+
return Object.assign(Object.assign({}, this.headers), { Accept: 'application/json, text/plain, *.*', 'Content-Type': 'application/json' });
|
|
14
|
+
}
|
|
15
|
+
axiosConfig() {
|
|
16
|
+
return {
|
|
17
|
+
headers: this.axiosHeaders(),
|
|
18
|
+
transformRequest: (data, headers) => {
|
|
19
|
+
var _a;
|
|
20
|
+
const json = JSON.stringify(data);
|
|
21
|
+
if (headers && data) {
|
|
22
|
+
if (json.length > ((_a = this.config.compressionThreshold) !== null && _a !== void 0 ? _a : 1024)) {
|
|
23
|
+
headers['Content-Encoding'] = 'gzip';
|
|
24
|
+
return (0, pako_1.gzip)(JSON.stringify(data)).buffer;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return JSON.stringify(data);
|
|
28
|
+
},
|
|
29
|
+
transformResponse: (data) => {
|
|
30
|
+
try {
|
|
31
|
+
return JSON.parse(data);
|
|
32
|
+
}
|
|
33
|
+
catch (ex) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
onError(error, depth = 0) {
|
|
40
|
+
var _a, _b, _c, _d;
|
|
41
|
+
(_b = (_a = this.config.reportableParent) === null || _a === void 0 ? void 0 : _a.onError) === null || _b === void 0 ? void 0 : _b.call(_a, error, depth + 1);
|
|
42
|
+
(_d = (_c = this.config).onError) === null || _d === void 0 ? void 0 : _d.call(_c, error, depth);
|
|
43
|
+
}
|
|
44
|
+
onFailure(response, depth = 0) {
|
|
45
|
+
var _a, _b, _c, _d;
|
|
46
|
+
(_b = (_a = this.config.reportableParent) === null || _a === void 0 ? void 0 : _a.onFailure) === null || _b === void 0 ? void 0 : _b.call(_a, response, depth + 1);
|
|
47
|
+
(_d = (_c = this.config).onFailure) === null || _d === void 0 ? void 0 : _d.call(_c, response, depth);
|
|
48
|
+
}
|
|
49
|
+
onSuccess(response, depth = 0) {
|
|
50
|
+
var _a, _b, _c, _d;
|
|
51
|
+
(_b = (_a = this.config.reportableParent) === null || _a === void 0 ? void 0 : _a.onSuccess) === null || _b === void 0 ? void 0 : _b.call(_a, response, depth + 1);
|
|
52
|
+
(_d = (_c = this.config).onSuccess) === null || _d === void 0 ? void 0 : _d.call(_c, response, depth);
|
|
53
|
+
}
|
|
54
|
+
get root() {
|
|
55
|
+
var _a;
|
|
56
|
+
return (_a = this.config.root) !== null && _a !== void 0 ? _a : '/';
|
|
57
|
+
}
|
|
58
|
+
get query() {
|
|
59
|
+
var _a;
|
|
60
|
+
return (_a = this.config.query) !== null && _a !== void 0 ? _a : '';
|
|
61
|
+
}
|
|
62
|
+
resolveRoot() {
|
|
63
|
+
return `${this.config.apiDomain}${this.root}`;
|
|
64
|
+
}
|
|
65
|
+
static resolveResponse(result) {
|
|
66
|
+
var _a;
|
|
67
|
+
return [(_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.data, result === null || result === void 0 ? void 0 : result.data, result];
|
|
68
|
+
}
|
|
69
|
+
handleMonitorResponseError(error, trapAxiosException) {
|
|
70
|
+
if (!error.isXyoError) {
|
|
71
|
+
throw error;
|
|
72
|
+
}
|
|
73
|
+
if (trapAxiosException) {
|
|
74
|
+
error.response ? this.onFailure(error.response) : this.onError(error);
|
|
75
|
+
if (this.config.throwFailure) {
|
|
76
|
+
throw error;
|
|
77
|
+
}
|
|
78
|
+
return error.response;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
monitorResponse(closure) {
|
|
82
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
//we use this to prevent accidental catching on exceptions in callbacks
|
|
84
|
+
let trapAxiosException = true;
|
|
85
|
+
try {
|
|
86
|
+
const response = yield closure();
|
|
87
|
+
trapAxiosException = false;
|
|
88
|
+
response.status < 300 ? this.onSuccess(response) : this.onFailure(response);
|
|
89
|
+
return response;
|
|
90
|
+
}
|
|
91
|
+
catch (ex) {
|
|
92
|
+
this.handleMonitorResponseError(ex, trapAxiosException);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
getEndpoint(endPoint = '', responseType) {
|
|
97
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
98
|
+
const response = yield this.monitorResponse(() => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
99
|
+
return yield this.axios.get(`${this.resolveRoot()}${endPoint}${this.query}`);
|
|
100
|
+
}));
|
|
101
|
+
return XyoApiBase.shapeResponse(response, responseType);
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
postEndpoint(endPoint = '', data, responseType) {
|
|
105
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
106
|
+
const response = yield this.monitorResponse(() => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
107
|
+
return yield this.axios.post(`${this.resolveRoot()}${endPoint}${this.query}`, data);
|
|
108
|
+
}));
|
|
109
|
+
return XyoApiBase.shapeResponse(response, responseType);
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
putEndpoint(endPoint = '', data, responseType) {
|
|
113
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
114
|
+
const response = yield this.monitorResponse(() => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
115
|
+
return yield this.axios.put(`${this.resolveRoot()}${endPoint}${this.query}`, data);
|
|
116
|
+
}));
|
|
117
|
+
return XyoApiBase.shapeResponse(response, responseType);
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
deleteEndpoint(endPoint = '', responseType) {
|
|
121
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
122
|
+
const response = yield this.monitorResponse(() => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
123
|
+
return yield this.axios.delete(`${this.resolveRoot()}${endPoint}${this.query}`);
|
|
124
|
+
}));
|
|
125
|
+
return XyoApiBase.shapeResponse(response, responseType);
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
static shapeResponse(response, responseType) {
|
|
129
|
+
const resolvedResponse = XyoApiBase.resolveResponse(response);
|
|
130
|
+
return responseType === 'tuple' ? resolvedResponse : resolvedResponse[0];
|
|
131
|
+
}
|
|
132
|
+
get headers() {
|
|
133
|
+
const headers = {};
|
|
134
|
+
if (this.config.jwtToken) {
|
|
135
|
+
headers.Authorization = `Bearer ${this.config.jwtToken}`;
|
|
136
|
+
}
|
|
137
|
+
if (this.config.apiKey) {
|
|
138
|
+
headers['x-api-key'] = this.config.apiKey;
|
|
139
|
+
}
|
|
140
|
+
return headers;
|
|
141
|
+
}
|
|
142
|
+
get authenticated() {
|
|
143
|
+
return !!this.config.apiKey || !!this.config.jwtToken;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
exports.XyoApiBase = XyoApiBase;
|
|
147
147
|
//# sourceMappingURL=Base.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ApiConfig } from '@xylabs/sdk-js';
|
|
2
|
-
import { GetLocationQueryResponse } from './models';
|
|
3
|
-
import { LocationQueryCreationResponse, SupportedLocationQueryCreationRequest } from './Queries';
|
|
4
|
-
declare class XyoLocationDivinerApi {
|
|
5
|
-
config: ApiConfig;
|
|
6
|
-
constructor(config: ApiConfig);
|
|
7
|
-
private get axiosRequestConfig();
|
|
8
|
-
getLocationQuery(hash: string): Promise<GetLocationQueryResponse>;
|
|
9
|
-
postLocationQuery(request: SupportedLocationQueryCreationRequest): Promise<LocationQueryCreationResponse>;
|
|
10
|
-
}
|
|
11
|
-
export { XyoLocationDivinerApi };
|
|
1
|
+
import { ApiConfig } from '@xylabs/sdk-js';
|
|
2
|
+
import { GetLocationQueryResponse } from './models';
|
|
3
|
+
import { LocationQueryCreationResponse, SupportedLocationQueryCreationRequest } from './Queries';
|
|
4
|
+
declare class XyoLocationDivinerApi {
|
|
5
|
+
config: ApiConfig;
|
|
6
|
+
constructor(config: ApiConfig);
|
|
7
|
+
private get axiosRequestConfig();
|
|
8
|
+
getLocationQuery(hash: string): Promise<GetLocationQueryResponse>;
|
|
9
|
+
postLocationQuery(request: SupportedLocationQueryCreationRequest): Promise<LocationQueryCreationResponse>;
|
|
10
|
+
}
|
|
11
|
+
export { XyoLocationDivinerApi };
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.XyoLocationDivinerApi = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const axios_1 = tslib_1.__importDefault(require("axios"));
|
|
6
|
-
const LocationDivinerApiResponseTransformer_1 = require("./LocationDivinerApiResponseTransformer");
|
|
7
|
-
class XyoLocationDivinerApi {
|
|
8
|
-
constructor(config) {
|
|
9
|
-
this.config = config;
|
|
10
|
-
}
|
|
11
|
-
get axiosRequestConfig() {
|
|
12
|
-
return {
|
|
13
|
-
transformResponse: (0, LocationDivinerApiResponseTransformer_1.getLocationDivinerApiResponseTransformer)(),
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
getLocationQuery(hash) {
|
|
17
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
18
|
-
return (yield axios_1.default.get(`${this.config.apiDomain}/location/query/${hash}`, this.axiosRequestConfig)).data;
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
postLocationQuery(request) {
|
|
22
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
23
|
-
return (yield axios_1.default.post(`${this.config.apiDomain}/location/query`, Object.assign({}, request), this.axiosRequestConfig)).data;
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
exports.XyoLocationDivinerApi = XyoLocationDivinerApi;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.XyoLocationDivinerApi = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const axios_1 = tslib_1.__importDefault(require("axios"));
|
|
6
|
+
const LocationDivinerApiResponseTransformer_1 = require("./LocationDivinerApiResponseTransformer");
|
|
7
|
+
class XyoLocationDivinerApi {
|
|
8
|
+
constructor(config) {
|
|
9
|
+
this.config = config;
|
|
10
|
+
}
|
|
11
|
+
get axiosRequestConfig() {
|
|
12
|
+
return {
|
|
13
|
+
transformResponse: (0, LocationDivinerApiResponseTransformer_1.getLocationDivinerApiResponseTransformer)(),
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
getLocationQuery(hash) {
|
|
17
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
18
|
+
return (yield axios_1.default.get(`${this.config.apiDomain}/location/query/${hash}`, this.axiosRequestConfig)).data;
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
postLocationQuery(request) {
|
|
22
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
return (yield axios_1.default.post(`${this.config.apiDomain}/location/query`, Object.assign({}, request), this.axiosRequestConfig)).data;
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.XyoLocationDivinerApi = XyoLocationDivinerApi;
|
|
28
28
|
//# sourceMappingURL=LocationDivinerApi.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { AxiosResponseTransformer } from 'axios';
|
|
2
|
-
export declare const locationDivinerApiResponseTransformer: AxiosResponseTransformer;
|
|
3
|
-
/**
|
|
4
|
-
* Gets the response transformers for the LocationDiviner API. Done as a method instead of a property
|
|
5
|
-
* to allow detection of dynamically added response transformers.
|
|
6
|
-
* @param axiosInstance The axios instance (defaults to the global instance if none provided)
|
|
7
|
-
* @returns the response transformers for the LocationDiviner API
|
|
8
|
-
*/
|
|
9
|
-
export declare const getLocationDivinerApiResponseTransformer: (axiosInstance?: import("axios").AxiosStatic) => AxiosResponseTransformer[];
|
|
1
|
+
import { AxiosResponseTransformer } from 'axios';
|
|
2
|
+
export declare const locationDivinerApiResponseTransformer: AxiosResponseTransformer;
|
|
3
|
+
/**
|
|
4
|
+
* Gets the response transformers for the LocationDiviner API. Done as a method instead of a property
|
|
5
|
+
* to allow detection of dynamically added response transformers.
|
|
6
|
+
* @param axiosInstance The axios instance (defaults to the global instance if none provided)
|
|
7
|
+
* @returns the response transformers for the LocationDiviner API
|
|
8
|
+
*/
|
|
9
|
+
export declare const getLocationDivinerApiResponseTransformer: (axiosInstance?: import("axios").AxiosStatic) => AxiosResponseTransformer[];
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getLocationDivinerApiResponseTransformer = exports.locationDivinerApiResponseTransformer = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const axios_1 = tslib_1.__importDefault(require("axios"));
|
|
6
|
-
const locationDivinerApiResponseTransformer = (data, _headers) => {
|
|
7
|
-
return data.data;
|
|
8
|
-
};
|
|
9
|
-
exports.locationDivinerApiResponseTransformer = locationDivinerApiResponseTransformer;
|
|
10
|
-
/**
|
|
11
|
-
* Gets the response transformers for the LocationDiviner API. Done as a method instead of a property
|
|
12
|
-
* to allow detection of dynamically added response transformers.
|
|
13
|
-
* @param axiosInstance The axios instance (defaults to the global instance if none provided)
|
|
14
|
-
* @returns the response transformers for the LocationDiviner API
|
|
15
|
-
*/
|
|
16
|
-
const getLocationDivinerApiResponseTransformer = (axiosInstance = axios_1.default) => {
|
|
17
|
-
// If there's any existing response transforms preserve them and
|
|
18
|
-
// append our response transform, otherwise just return ours
|
|
19
|
-
return axiosInstance.defaults.transformResponse
|
|
20
|
-
? [].concat(axiosInstance.defaults.transformResponse, exports.locationDivinerApiResponseTransformer)
|
|
21
|
-
: [exports.locationDivinerApiResponseTransformer];
|
|
22
|
-
};
|
|
23
|
-
exports.getLocationDivinerApiResponseTransformer = getLocationDivinerApiResponseTransformer;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getLocationDivinerApiResponseTransformer = exports.locationDivinerApiResponseTransformer = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const axios_1 = tslib_1.__importDefault(require("axios"));
|
|
6
|
+
const locationDivinerApiResponseTransformer = (data, _headers) => {
|
|
7
|
+
return data.data;
|
|
8
|
+
};
|
|
9
|
+
exports.locationDivinerApiResponseTransformer = locationDivinerApiResponseTransformer;
|
|
10
|
+
/**
|
|
11
|
+
* Gets the response transformers for the LocationDiviner API. Done as a method instead of a property
|
|
12
|
+
* to allow detection of dynamically added response transformers.
|
|
13
|
+
* @param axiosInstance The axios instance (defaults to the global instance if none provided)
|
|
14
|
+
* @returns the response transformers for the LocationDiviner API
|
|
15
|
+
*/
|
|
16
|
+
const getLocationDivinerApiResponseTransformer = (axiosInstance = axios_1.default) => {
|
|
17
|
+
// If there's any existing response transforms preserve them and
|
|
18
|
+
// append our response transform, otherwise just return ours
|
|
19
|
+
return axiosInstance.defaults.transformResponse
|
|
20
|
+
? [].concat(axiosInstance.defaults.transformResponse, exports.locationDivinerApiResponseTransformer)
|
|
21
|
+
: [exports.locationDivinerApiResponseTransformer];
|
|
22
|
+
};
|
|
23
|
+
exports.getLocationDivinerApiResponseTransformer = getLocationDivinerApiResponseTransformer;
|
|
24
24
|
//# sourceMappingURL=LocationDivinerApiResponseTransformer.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export interface LocationHeatmapPointProperties {
|
|
2
|
-
hash: string;
|
|
3
|
-
value: number;
|
|
4
|
-
}
|
|
1
|
+
export interface LocationHeatmapPointProperties {
|
|
2
|
+
hash: string;
|
|
3
|
+
value: number;
|
|
4
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=LocationHeatmapPointProperties.js.map
|
package/dist/cjs/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { LocationWitnessPayloadSchema } from '../../Witnesses';
|
|
2
|
-
export declare type LocationHeatmapQuerySchema = 'network.xyo.location.heatmap.query';
|
|
3
|
-
export declare const locationHeatmapQuerySchema: LocationHeatmapQuerySchema;
|
|
4
|
-
export declare type LocationHeatmapAnswerSchema = 'network.xyo.location.heatmap.answer';
|
|
5
|
-
export declare const locationHeatmapAnswerSchema: LocationHeatmapAnswerSchema;
|
|
6
|
-
export declare type LocationHeatmapQuery = {
|
|
7
|
-
startTime?: string;
|
|
8
|
-
stopTime?: string;
|
|
9
|
-
schema: LocationWitnessPayloadSchema;
|
|
10
|
-
};
|
|
11
|
-
export declare const isLocationHeatmapQuery: (query: Record<string, unknown>) => query is LocationHeatmapQuery;
|
|
1
|
+
import { LocationWitnessPayloadSchema } from '../../Witnesses';
|
|
2
|
+
export declare type LocationHeatmapQuerySchema = 'network.xyo.location.heatmap.query';
|
|
3
|
+
export declare const locationHeatmapQuerySchema: LocationHeatmapQuerySchema;
|
|
4
|
+
export declare type LocationHeatmapAnswerSchema = 'network.xyo.location.heatmap.answer';
|
|
5
|
+
export declare const locationHeatmapAnswerSchema: LocationHeatmapAnswerSchema;
|
|
6
|
+
export declare type LocationHeatmapQuery = {
|
|
7
|
+
startTime?: string;
|
|
8
|
+
stopTime?: string;
|
|
9
|
+
schema: LocationWitnessPayloadSchema;
|
|
10
|
+
};
|
|
11
|
+
export declare const isLocationHeatmapQuery: (query: Record<string, unknown>) => query is LocationHeatmapQuery;
|
package/dist/cjs/Diviner/LocationDiviner/Queries/LocationHeatmapQuery/LocationHeatmapQuery.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isLocationHeatmapQuery = exports.locationHeatmapAnswerSchema = exports.locationHeatmapQuerySchema = void 0;
|
|
4
|
-
exports.locationHeatmapQuerySchema = 'network.xyo.location.heatmap.query';
|
|
5
|
-
exports.locationHeatmapAnswerSchema = 'network.xyo.location.heatmap.answer';
|
|
6
|
-
const isLocationHeatmapQuery = (query) => {
|
|
7
|
-
return query && (query === null || query === void 0 ? void 0 : query.schema) === exports.locationHeatmapQuerySchema;
|
|
8
|
-
};
|
|
9
|
-
exports.isLocationHeatmapQuery = isLocationHeatmapQuery;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isLocationHeatmapQuery = exports.locationHeatmapAnswerSchema = exports.locationHeatmapQuerySchema = void 0;
|
|
4
|
+
exports.locationHeatmapQuerySchema = 'network.xyo.location.heatmap.query';
|
|
5
|
+
exports.locationHeatmapAnswerSchema = 'network.xyo.location.heatmap.answer';
|
|
6
|
+
const isLocationHeatmapQuery = (query) => {
|
|
7
|
+
return query && (query === null || query === void 0 ? void 0 : query.schema) === exports.locationHeatmapQuerySchema;
|
|
8
|
+
};
|
|
9
|
+
exports.isLocationHeatmapQuery = isLocationHeatmapQuery;
|
|
10
10
|
//# sourceMappingURL=LocationHeatmapQuery.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './LocationHeatmapPointProperties';
|
|
2
|
-
export * from './LocationHeatmapQuery';
|
|
1
|
+
export * from './LocationHeatmapPointProperties';
|
|
2
|
+
export * from './LocationHeatmapQuery';
|