@xyo-network/api 2.20.39 → 2.20.42
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 +33 -27
- package/dist/cjs/Archivist/Api.js +67 -59
- 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/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 +4120 -4005
- 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 +33 -27
- package/dist/esm/Archivist/Api.js +81 -70
- 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/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 +2 -2
- package/src/Archivist/Api.spec.ts +26 -1
- package/src/Archivist/Api.ts +13 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { XyoApiReportable } from './Reportable';
|
|
2
|
-
interface XyoApiConfig extends XyoApiReportable {
|
|
3
|
-
/** @description The domain where the api is located */
|
|
4
|
-
apiDomain: string;
|
|
5
|
-
/** @deprecated use the jwtToken instead*/
|
|
6
|
-
userid?: string;
|
|
7
|
-
/** @description The jwtToken of the currently logged in user */
|
|
8
|
-
jwtToken?: string;
|
|
9
|
-
/** @description The apiKey used for authentication */
|
|
10
|
-
apiKey?: string;
|
|
11
|
-
/** @description The location in the API tree where this API object is mounted */
|
|
12
|
-
root?: string;
|
|
13
|
-
/** @description The query string, if any, that is added to the end of every request */
|
|
14
|
-
query?: string;
|
|
15
|
-
/** @description Threshold for Content-Size to cause automatic gzip of request body [default = 1024] */
|
|
16
|
-
compressionThreshold?: number;
|
|
17
|
-
/** @description Throw on failures */
|
|
18
|
-
throwFailure?: boolean;
|
|
19
|
-
/** @description Throw on error */
|
|
20
|
-
throwError?: boolean;
|
|
21
|
-
/** @description Parent that should also report events from this api */
|
|
22
|
-
reportableParent?: XyoApiReportable;
|
|
23
|
-
}
|
|
24
|
-
export type { XyoApiConfig };
|
|
1
|
+
import { XyoApiReportable } from './Reportable';
|
|
2
|
+
interface XyoApiConfig extends XyoApiReportable {
|
|
3
|
+
/** @description The domain where the api is located */
|
|
4
|
+
apiDomain: string;
|
|
5
|
+
/** @deprecated use the jwtToken instead*/
|
|
6
|
+
userid?: string;
|
|
7
|
+
/** @description The jwtToken of the currently logged in user */
|
|
8
|
+
jwtToken?: string;
|
|
9
|
+
/** @description The apiKey used for authentication */
|
|
10
|
+
apiKey?: string;
|
|
11
|
+
/** @description The location in the API tree where this API object is mounted */
|
|
12
|
+
root?: string;
|
|
13
|
+
/** @description The query string, if any, that is added to the end of every request */
|
|
14
|
+
query?: string;
|
|
15
|
+
/** @description Threshold for Content-Size to cause automatic gzip of request body [default = 1024] */
|
|
16
|
+
compressionThreshold?: number;
|
|
17
|
+
/** @description Throw on failures */
|
|
18
|
+
throwFailure?: boolean;
|
|
19
|
+
/** @description Throw on error */
|
|
20
|
+
throwError?: boolean;
|
|
21
|
+
/** @description Parent that should also report events from this api */
|
|
22
|
+
reportableParent?: XyoApiReportable;
|
|
23
|
+
}
|
|
24
|
+
export type { XyoApiConfig };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=Config.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { XyoApiError } from './Error';
|
|
2
|
-
import { XyoApiWarning } from './Warning';
|
|
3
|
-
export interface XyoApiEnvelopeBase {
|
|
4
|
-
warning?: XyoApiWarning[];
|
|
5
|
-
}
|
|
6
|
-
export interface XyoApiEnvelopeSuccess<T> extends XyoApiEnvelopeBase {
|
|
7
|
-
data: T;
|
|
8
|
-
error: never;
|
|
9
|
-
}
|
|
10
|
-
export interface XyoApiEnvelopeError extends XyoApiEnvelopeBase {
|
|
11
|
-
data: never;
|
|
12
|
-
error: XyoApiError[];
|
|
13
|
-
}
|
|
14
|
-
export declare type XyoApiEnvelope<T> = XyoApiEnvelopeSuccess<T> | XyoApiEnvelopeError;
|
|
1
|
+
import { XyoApiError } from './Error';
|
|
2
|
+
import { XyoApiWarning } from './Warning';
|
|
3
|
+
export interface XyoApiEnvelopeBase {
|
|
4
|
+
warning?: XyoApiWarning[];
|
|
5
|
+
}
|
|
6
|
+
export interface XyoApiEnvelopeSuccess<T> extends XyoApiEnvelopeBase {
|
|
7
|
+
data: T;
|
|
8
|
+
error: never;
|
|
9
|
+
}
|
|
10
|
+
export interface XyoApiEnvelopeError extends XyoApiEnvelopeBase {
|
|
11
|
+
data: never;
|
|
12
|
+
error: XyoApiError[];
|
|
13
|
+
}
|
|
14
|
+
export declare type XyoApiEnvelope<T> = XyoApiEnvelopeSuccess<T> | XyoApiEnvelopeError;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=Envelope.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AxiosError } from 'axios';
|
|
2
|
-
export interface XyoApiError<T = any, D = any> extends AxiosError<T, D> {
|
|
3
|
-
isXyoError: true;
|
|
4
|
-
}
|
|
1
|
+
import { AxiosError } from 'axios';
|
|
2
|
+
export interface XyoApiError<T = any, D = any> extends AxiosError<T, D> {
|
|
3
|
+
isXyoError: true;
|
|
4
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=Error.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { XyoApiError } from './Error';
|
|
2
|
-
import { XyoApiResponse } from './Response';
|
|
3
|
-
export interface XyoApiReportable {
|
|
4
|
-
onError?: (error: XyoApiError, depth: number) => void;
|
|
5
|
-
onFailure?: (response: XyoApiResponse, depth: number) => void;
|
|
6
|
-
onSuccess?: (response: XyoApiResponse, depth: number) => void;
|
|
7
|
-
}
|
|
1
|
+
import { XyoApiError } from './Error';
|
|
2
|
+
import { XyoApiResponse } from './Response';
|
|
3
|
+
export interface XyoApiReportable {
|
|
4
|
+
onError?: (error: XyoApiError, depth: number) => void;
|
|
5
|
+
onFailure?: (response: XyoApiResponse, depth: number) => void;
|
|
6
|
+
onSuccess?: (response: XyoApiResponse, depth: number) => void;
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=Reportable.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AxiosResponse } from 'axios';
|
|
2
|
-
import { XyoApiEnvelope } from './Envelope';
|
|
3
|
-
export declare type XyoApiResponse<T = unknown, D = unknown> = AxiosResponse<T, D>;
|
|
4
|
-
export declare type XyoApiResponseBody<T> = T | undefined;
|
|
5
|
-
export declare type XyoApiResponseTuple<T> = [T | undefined, XyoApiEnvelope<T | undefined>, XyoApiResponse<XyoApiEnvelope<T | undefined>>];
|
|
6
|
-
export declare type XyoApiResponseTupleOrBody<T> = XyoApiResponseTuple<T> | XyoApiResponseBody<T>;
|
|
7
|
-
export declare type XyoApiResponseType = 'body' | 'tuple';
|
|
1
|
+
import { AxiosResponse } from 'axios';
|
|
2
|
+
import { XyoApiEnvelope } from './Envelope';
|
|
3
|
+
export declare type XyoApiResponse<T = unknown, D = unknown> = AxiosResponse<T, D>;
|
|
4
|
+
export declare type XyoApiResponseBody<T> = T | undefined;
|
|
5
|
+
export declare type XyoApiResponseTuple<T> = [T | undefined, XyoApiEnvelope<T | undefined>, XyoApiResponse<XyoApiEnvelope<T | undefined>>];
|
|
6
|
+
export declare type XyoApiResponseTupleOrBody<T> = XyoApiResponseTuple<T> | XyoApiResponseBody<T>;
|
|
7
|
+
export declare type XyoApiResponseType = 'body' | 'tuple';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=Response.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare type XyoApiWarning = Error;
|
|
1
|
+
export declare type XyoApiWarning = Error;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=Warning.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './Config';
|
|
2
|
-
export * from './Envelope';
|
|
3
|
-
export * from './Error';
|
|
4
|
-
export * from './Reportable';
|
|
5
|
-
export * from './Response';
|
|
6
|
-
export * from './Warning';
|
|
1
|
+
export * from './Config';
|
|
2
|
+
export * from './Envelope';
|
|
3
|
+
export * from './Error';
|
|
4
|
+
export * from './Reportable';
|
|
5
|
+
export * from './Response';
|
|
6
|
+
export * from './Warning';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from './Config';
|
|
2
|
-
export * from './Envelope';
|
|
3
|
-
export * from './Error';
|
|
4
|
-
export * from './Reportable';
|
|
5
|
-
export * from './Response';
|
|
6
|
-
export * from './Warning';
|
|
1
|
+
export * from './Config';
|
|
2
|
+
export * from './Envelope';
|
|
3
|
+
export * from './Error';
|
|
4
|
+
export * from './Reportable';
|
|
5
|
+
export * from './Response';
|
|
6
|
+
export * from './Warning';
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { XyoArchivePath } from './ArchivePath';
|
|
2
|
-
export declare type AccessLevel = 'public' | 'private' | 'none';
|
|
3
|
-
export declare type AccessType = 'read' | 'remove' | 'create' | 'list';
|
|
4
|
-
export declare type ExpirationWindow = 'create' | 'read';
|
|
5
|
-
export interface XyoAccessControl {
|
|
6
|
-
access?: Record<AccessType, AccessLevel>;
|
|
7
|
-
expiration?: {
|
|
8
|
-
window?: ExpirationWindow;
|
|
9
|
-
delay?: number;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
export interface XyoAccessControls {
|
|
13
|
-
/**
|
|
14
|
-
* Set access controls on a per schema basis.
|
|
15
|
-
* '*' can be used as a wildcard
|
|
16
|
-
* Access control is set from a generic to specific direction if
|
|
17
|
-
* multiple wildcard versions apply to a schema
|
|
18
|
-
*/
|
|
19
|
-
schema?: Record<string, XyoAccessControl>;
|
|
20
|
-
}
|
|
21
|
-
export interface XyoArchive extends XyoArchivePath {
|
|
22
|
-
user?: string;
|
|
23
|
-
accessControl?: XyoAccessControl | boolean;
|
|
24
|
-
}
|
|
1
|
+
import { XyoArchivePath } from './ArchivePath';
|
|
2
|
+
export declare type AccessLevel = 'public' | 'private' | 'none';
|
|
3
|
+
export declare type AccessType = 'read' | 'remove' | 'create' | 'list';
|
|
4
|
+
export declare type ExpirationWindow = 'create' | 'read';
|
|
5
|
+
export interface XyoAccessControl {
|
|
6
|
+
access?: Record<AccessType, AccessLevel>;
|
|
7
|
+
expiration?: {
|
|
8
|
+
window?: ExpirationWindow;
|
|
9
|
+
delay?: number;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export interface XyoAccessControls {
|
|
13
|
+
/**
|
|
14
|
+
* Set access controls on a per schema basis.
|
|
15
|
+
* '*' can be used as a wildcard
|
|
16
|
+
* Access control is set from a generic to specific direction if
|
|
17
|
+
* multiple wildcard versions apply to a schema
|
|
18
|
+
*/
|
|
19
|
+
schema?: Record<string, XyoAccessControl>;
|
|
20
|
+
}
|
|
21
|
+
export interface XyoArchive extends XyoArchivePath {
|
|
22
|
+
user?: string;
|
|
23
|
+
accessControl?: XyoAccessControl | boolean;
|
|
24
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=Archive.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export interface XyoArchiveKey {
|
|
2
|
-
archive: string;
|
|
3
|
-
created?: number;
|
|
4
|
-
key: string;
|
|
5
|
-
}
|
|
1
|
+
export interface XyoArchiveKey {
|
|
2
|
+
archive: string;
|
|
3
|
+
created?: number;
|
|
4
|
+
key: string;
|
|
5
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=ArchiveKey.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export interface XyoArchivePath {
|
|
2
|
-
archive: string;
|
|
3
|
-
}
|
|
1
|
+
export interface XyoArchivePath {
|
|
2
|
+
archive: string;
|
|
3
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=ArchivePath.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './Api';
|
|
2
|
-
export * from './Archive';
|
|
3
|
-
export * from './ArchiveKey';
|
|
4
|
-
export * from './ArchivePath';
|
|
1
|
+
export * from './Api';
|
|
2
|
+
export * from './Archive';
|
|
3
|
+
export * from './ArchiveKey';
|
|
4
|
+
export * from './ArchivePath';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './Api';
|
|
2
|
-
export * from './Archive';
|
|
3
|
-
export * from './ArchiveKey';
|
|
4
|
-
export * from './ArchivePath';
|
|
1
|
+
export * from './Api';
|
|
2
|
+
export * from './Archive';
|
|
3
|
+
export * from './ArchiveKey';
|
|
4
|
+
export * from './ArchivePath';
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/objToQuery.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const objToQuery: (obj: Record<string, string | number | undefined>) => string;
|
|
1
|
+
export declare const objToQuery: (obj: Record<string, string | number | undefined>) => string;
|
package/dist/esm/objToQuery.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export const objToQuery = (obj) => {
|
|
2
|
-
return `?${Object.entries(obj)
|
|
3
|
-
.map(([key, value]) => {
|
|
4
|
-
return `${key}=${value}`;
|
|
5
|
-
})
|
|
6
|
-
.filter((value) => value !== undefined)
|
|
7
|
-
.join('&')}`;
|
|
8
|
-
};
|
|
1
|
+
export const objToQuery = (obj) => {
|
|
2
|
+
return `?${Object.entries(obj)
|
|
3
|
+
.map(([key, value]) => {
|
|
4
|
+
return `${key}=${value}`;
|
|
5
|
+
})
|
|
6
|
+
.filter((value) => value !== undefined)
|
|
7
|
+
.join('&')}`;
|
|
8
|
+
};
|
|
9
9
|
//# sourceMappingURL=objToQuery.js.map
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@xylabs/sdk-js": "^2.5.7",
|
|
13
|
-
"@xyo-network/core": "^2.20.
|
|
13
|
+
"@xyo-network/core": "^2.20.42",
|
|
14
14
|
"axios": "^0.27.2",
|
|
15
15
|
"pako": "^2.0.4",
|
|
16
16
|
"uuid": "^8.3.2"
|
|
@@ -67,6 +67,6 @@
|
|
|
67
67
|
},
|
|
68
68
|
"sideEffects": true,
|
|
69
69
|
"types": "dist/esm/index.d.ts",
|
|
70
|
-
"version": "2.20.
|
|
70
|
+
"version": "2.20.42",
|
|
71
71
|
"packageManager": "yarn@3.1.1"
|
|
72
72
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { XyoAccount, XyoBoundWitness, XyoBoundWitnessBuilder } from '@xyo-network/core'
|
|
1
|
+
import { XyoAccount, XyoBoundWitness, XyoBoundWitnessBuilder, XyoPayload, XyoPayloadBuilder } from '@xyo-network/core'
|
|
2
2
|
import { config } from 'dotenv'
|
|
3
3
|
|
|
4
4
|
import { XyoApiConfig, XyoApiError } from '../models'
|
|
@@ -56,6 +56,31 @@ describe('postBoundWitnesses', () => {
|
|
|
56
56
|
})
|
|
57
57
|
})
|
|
58
58
|
|
|
59
|
+
describe('node', () => {
|
|
60
|
+
describe('with archive', () => {
|
|
61
|
+
it('calculates the correct path', () => {
|
|
62
|
+
const api = new XyoArchivistApi(configData)
|
|
63
|
+
const path = api.node().config.root
|
|
64
|
+
expect(path).toBe('/')
|
|
65
|
+
})
|
|
66
|
+
})
|
|
67
|
+
describe('without archive', () => {
|
|
68
|
+
it('calculates the correct path', () => {
|
|
69
|
+
const archive = 'foo'
|
|
70
|
+
const api = new XyoArchivistApi(configData)
|
|
71
|
+
const path = api.node(archive).config.root
|
|
72
|
+
expect(path).toBe(`/${archive}/`)
|
|
73
|
+
})
|
|
74
|
+
it('posts to the root', () => {
|
|
75
|
+
const api = new XyoArchivistApi(configData)
|
|
76
|
+
const p: XyoPayload<{ foo: string }> = new XyoPayloadBuilder<XyoPayload<{ foo: string }>>({ schema: 'foo' }).fields({ foo: 'bar' }).build()
|
|
77
|
+
const bw: XyoBoundWitness = new XyoBoundWitnessBuilder({ inlinePayloads: true }).payload(p).build()
|
|
78
|
+
const path = api.node('foo').post(bw)
|
|
79
|
+
expect(path).toBe('/foo/')
|
|
80
|
+
})
|
|
81
|
+
})
|
|
82
|
+
})
|
|
83
|
+
|
|
59
84
|
describeSkipIfNoToken('XyoArchivistApi', () => {
|
|
60
85
|
describe('get', () => {
|
|
61
86
|
it('returns a new XyoArchivistApi', () => {
|
package/src/Archivist/Api.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Huri, XyoAddressValue, XyoDataLike, XyoPayload } from '@xyo-network/core'
|
|
1
|
+
import { Huri, XyoAddressValue, XyoBoundWitness, XyoDataLike, XyoPayload } from '@xyo-network/core'
|
|
2
2
|
|
|
3
3
|
import { XyoApiBase } from '../Base'
|
|
4
4
|
import { XyoApiResponseBody, XyoApiResponseTuple, XyoApiResponseTupleOrBody, XyoApiResponseType } from '../models'
|
|
@@ -70,6 +70,18 @@ export class XyoArchivistApi extends XyoApiBase {
|
|
|
70
70
|
})
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
/**
|
|
74
|
+
* Issues commands/queries as XyoBoundWitness wrapped XyoPayloads against a Node in the network
|
|
75
|
+
* @param archive Optional, the archive to issue the requests against
|
|
76
|
+
* @returns Confirmation for the request, as a BoundWitness, from the network Node
|
|
77
|
+
*/
|
|
78
|
+
public node<TResponse extends XyoBoundWitness, TData extends XyoBoundWitness = TResponse>(archive?: string) {
|
|
79
|
+
return new XyoApiSimple<TResponse, TData>({
|
|
80
|
+
...this.config,
|
|
81
|
+
root: archive ? `${this.root}${archive}/` : this.root,
|
|
82
|
+
})
|
|
83
|
+
}
|
|
84
|
+
|
|
73
85
|
/** @deprecated use huri(huri) instead */
|
|
74
86
|
public async get(huri: Huri | string): Promise<XyoApiResponseBody<XyoPayload>>
|
|
75
87
|
/** @deprecated use huri(huri) instead */
|