@xyo-network/http-call-witness 3.2.3 → 3.2.4
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/neutral/Payload/identity/asHttpCall.d.ts +2 -2
- package/dist/neutral/Payload/identity/asHttpCallBase64Result.d.ts +2 -2
- package/dist/neutral/Payload/identity/asHttpCallResult.d.ts +2 -2
- package/dist/neutral/Payload/identity/asHttpCallXmlResult.d.ts +2 -2
- package/dist/neutral/Payload/identity/asHttpUriCall.d.ts +2 -2
- package/dist/neutral/Payload/identity/asHttpUriTemplateCall.d.ts +2 -2
- package/dist/neutral/Payload/identity/isHttpCallBase64Result.d.ts.map +1 -1
- package/dist/neutral/Payload/identity/isHttpCallXmlResult.d.ts.map +1 -1
- package/dist/neutral/Payload/types/HttpCallJsonResult.d.ts +74 -74
- package/dist/neutral/Payload/types/HttpCallJsonResult.d.ts.map +1 -1
- package/dist/neutral/Witness/Config.d.ts +24 -24
- package/dist/neutral/index.mjs.map +1 -1
- package/package.json +17 -17
- package/src/Payload/identity/isHttpCallBase64Result.ts +2 -2
- package/src/Payload/identity/isHttpCallXmlResult.ts +2 -2
- package/src/Payload/types/HttpCallJsonResult.ts +2 -1
- package/src/Witness/Witness.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const asApiCall: {
|
|
2
|
-
<TType extends import("../index.ts").HttpCall>(value: import(".store/@xylabs-promise-npm-4.4.
|
|
3
|
-
<TType extends import("../index.ts").HttpCall>(value: import(".store/@xylabs-promise-npm-4.4.
|
|
2
|
+
<TType extends import("../index.ts").HttpCall>(value: import(".store/@xylabs-promise-npm-4.4.27-0f2723573b/package").AnyNonPromise, config?: import("@xylabs/object").TypeCheckConfig): TType | undefined;
|
|
3
|
+
<TType extends import("../index.ts").HttpCall>(value: import(".store/@xylabs-promise-npm-4.4.27-0f2723573b/package").AnyNonPromise, assert: import("@xylabs/object").StringOrAlertFunction<import("../index.ts").HttpCall>, config?: import("@xylabs/object").TypeCheckConfig): TType;
|
|
4
4
|
};
|
|
5
5
|
//# sourceMappingURL=asHttpCall.d.ts.map
|
|
@@ -4,13 +4,13 @@ export declare const asHttpCallBase64Result: {
|
|
|
4
4
|
call: import("@xylabs/hex").Hash;
|
|
5
5
|
contentType: Exclude<Exclude<string, "application/json">, import("../index.ts").HttpCallXmlResult["contentType"]>;
|
|
6
6
|
data: string;
|
|
7
|
-
}>>(value: import(".store/@xylabs-promise-npm-4.4.
|
|
7
|
+
}>>(value: import(".store/@xylabs-promise-npm-4.4.27-0f2723573b/package").AnyNonPromise, config?: import("@xylabs/object").TypeCheckConfig): TType | undefined;
|
|
8
8
|
<TType extends import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
9
9
|
schema: "network.xyo.http.call.result";
|
|
10
10
|
call: import("@xylabs/hex").Hash;
|
|
11
11
|
contentType: Exclude<Exclude<string, "application/json">, import("../index.ts").HttpCallXmlResult["contentType"]>;
|
|
12
12
|
data: string;
|
|
13
|
-
}>>(value: import(".store/@xylabs-promise-npm-4.4.
|
|
13
|
+
}>>(value: import(".store/@xylabs-promise-npm-4.4.27-0f2723573b/package").AnyNonPromise, assert: import("@xylabs/object").StringOrAlertFunction<import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
14
14
|
schema: "network.xyo.http.call.result";
|
|
15
15
|
call: import("@xylabs/hex").Hash;
|
|
16
16
|
contentType: Exclude<Exclude<string, "application/json">, import("../index.ts").HttpCallXmlResult["contentType"]>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const asHttpCallResult: {
|
|
2
|
-
<TType extends import("../index.ts").HttpCallResult>(value: import(".store/@xylabs-promise-npm-4.4.
|
|
3
|
-
<TType extends import("../index.ts").HttpCallResult>(value: import(".store/@xylabs-promise-npm-4.4.
|
|
2
|
+
<TType extends import("../index.ts").HttpCallResult>(value: import(".store/@xylabs-promise-npm-4.4.27-0f2723573b/package").AnyNonPromise, config?: import("@xylabs/object").TypeCheckConfig): TType | undefined;
|
|
3
|
+
<TType extends import("../index.ts").HttpCallResult>(value: import(".store/@xylabs-promise-npm-4.4.27-0f2723573b/package").AnyNonPromise, assert: import("@xylabs/object").StringOrAlertFunction<import("../index.ts").HttpCallResult>, config?: import("@xylabs/object").TypeCheckConfig): TType;
|
|
4
4
|
};
|
|
5
5
|
//# sourceMappingURL=asHttpCallResult.d.ts.map
|
|
@@ -4,13 +4,13 @@ export declare const asHttpCallXmlResult: {
|
|
|
4
4
|
call: import("@xylabs/hex").Hash;
|
|
5
5
|
contentType: "application/xml" | "text/xml";
|
|
6
6
|
data: string;
|
|
7
|
-
}>>(value: import(".store/@xylabs-promise-npm-4.4.
|
|
7
|
+
}>>(value: import(".store/@xylabs-promise-npm-4.4.27-0f2723573b/package").AnyNonPromise, config?: import("@xylabs/object").TypeCheckConfig): TType | undefined;
|
|
8
8
|
<TType extends import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
9
9
|
schema: "network.xyo.http.call.result";
|
|
10
10
|
call: import("@xylabs/hex").Hash;
|
|
11
11
|
contentType: "application/xml" | "text/xml";
|
|
12
12
|
data: string;
|
|
13
|
-
}>>(value: import(".store/@xylabs-promise-npm-4.4.
|
|
13
|
+
}>>(value: import(".store/@xylabs-promise-npm-4.4.27-0f2723573b/package").AnyNonPromise, assert: import("@xylabs/object").StringOrAlertFunction<import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
14
14
|
schema: "network.xyo.http.call.result";
|
|
15
15
|
call: import("@xylabs/hex").Hash;
|
|
16
16
|
contentType: "application/xml" | "text/xml";
|
|
@@ -9,7 +9,7 @@ export declare const asHttpUriCall: {
|
|
|
9
9
|
} | undefined;
|
|
10
10
|
verb?: import("../index.ts").Verb | undefined;
|
|
11
11
|
uri: string;
|
|
12
|
-
}>>(value: import(".store/@xylabs-promise-npm-4.4.
|
|
12
|
+
}>>(value: import(".store/@xylabs-promise-npm-4.4.27-0f2723573b/package").AnyNonPromise, config?: import("@xylabs/object").TypeCheckConfig): TType | undefined;
|
|
13
13
|
<TType extends import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
14
14
|
schema: "network.xyo.http.call";
|
|
15
15
|
headers?: {
|
|
@@ -20,7 +20,7 @@ export declare const asHttpUriCall: {
|
|
|
20
20
|
} | undefined;
|
|
21
21
|
verb?: import("../index.ts").Verb | undefined;
|
|
22
22
|
uri: string;
|
|
23
|
-
}>>(value: import(".store/@xylabs-promise-npm-4.4.
|
|
23
|
+
}>>(value: import(".store/@xylabs-promise-npm-4.4.27-0f2723573b/package").AnyNonPromise, assert: import("@xylabs/object").StringOrAlertFunction<import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
24
24
|
schema: "network.xyo.http.call";
|
|
25
25
|
headers?: {
|
|
26
26
|
[x: string]: string | undefined;
|
|
@@ -12,7 +12,7 @@ export declare const asHttpUriTemplateCall: {
|
|
|
12
12
|
[x: string]: string;
|
|
13
13
|
} | undefined;
|
|
14
14
|
uriTemplate?: string | undefined;
|
|
15
|
-
}>>(value: import(".store/@xylabs-promise-npm-4.4.
|
|
15
|
+
}>>(value: import(".store/@xylabs-promise-npm-4.4.27-0f2723573b/package").AnyNonPromise, config?: import("@xylabs/object").TypeCheckConfig): TType | undefined;
|
|
16
16
|
<TType extends import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
17
17
|
schema: "network.xyo.http.call";
|
|
18
18
|
headers?: {
|
|
@@ -26,7 +26,7 @@ export declare const asHttpUriTemplateCall: {
|
|
|
26
26
|
[x: string]: string;
|
|
27
27
|
} | undefined;
|
|
28
28
|
uriTemplate?: string | undefined;
|
|
29
|
-
}>>(value: import(".store/@xylabs-promise-npm-4.4.
|
|
29
|
+
}>>(value: import(".store/@xylabs-promise-npm-4.4.27-0f2723573b/package").AnyNonPromise, assert: import("@xylabs/object").StringOrAlertFunction<import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
30
30
|
schema: "network.xyo.http.call";
|
|
31
31
|
headers?: {
|
|
32
32
|
[x: string]: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isHttpCallBase64Result.d.ts","sourceRoot":"","sources":["../../../../src/Payload/identity/isHttpCallBase64Result.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"isHttpCallBase64Result.d.ts","sourceRoot":"","sources":["../../../../src/Payload/identity/isHttpCallBase64Result.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAkB,MAAM,mBAAmB,CAAA;AAE7E,eAAO,MAAM,sBAAsB,OAAQ,OAAO,GAAG,IAAI,KAAG,CAAC,IAAI,oBAEhE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isHttpCallXmlResult.d.ts","sourceRoot":"","sources":["../../../../src/Payload/identity/isHttpCallXmlResult.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"isHttpCallXmlResult.d.ts","sourceRoot":"","sources":["../../../../src/Payload/identity/isHttpCallXmlResult.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAkB,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAE1E,eAAO,MAAM,mBAAmB,OAAQ,OAAO,GAAG,IAAI,KAAG,CAAC,IAAI,iBAE7D,CAAA"}
|
|
@@ -14,90 +14,90 @@ export declare const asHttpCallJsonResult: {
|
|
|
14
14
|
schema: "network.xyo.http.call.result";
|
|
15
15
|
call: Hash;
|
|
16
16
|
contentType: "application/json";
|
|
17
|
-
data:
|
|
17
|
+
data: {
|
|
18
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
19
|
+
} | (string | number | boolean | {
|
|
20
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
21
|
+
} | (string | number | boolean | {
|
|
22
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
23
|
+
} | (string | number | boolean | {
|
|
24
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
25
|
+
} | (string | number | boolean | {
|
|
26
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
27
|
+
} | (string | number | boolean | {
|
|
28
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
29
|
+
} | (string | number | boolean | {
|
|
30
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
31
|
+
} | (string | number | boolean | {
|
|
32
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null;
|
|
33
|
+
} | (string | number | boolean | {
|
|
34
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null;
|
|
35
|
+
} | (string | number | boolean | {
|
|
36
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null;
|
|
37
|
+
} | (string | number | boolean | {
|
|
38
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null;
|
|
39
|
+
} | (string | number | boolean | {
|
|
18
40
|
[x: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null;
|
|
19
|
-
} | null)[] |
|
|
20
|
-
|
|
21
|
-
} | null)[] | {
|
|
22
|
-
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
23
|
-
} | null)[] | {
|
|
24
|
-
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
25
|
-
} | null)[] | {
|
|
26
|
-
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
27
|
-
} | null)[] | {
|
|
28
|
-
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
29
|
-
} | null)[] | {
|
|
30
|
-
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
31
|
-
} | null)[] | {
|
|
32
|
-
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
33
|
-
} | null)[] | {
|
|
34
|
-
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
35
|
-
} | null)[] | {
|
|
36
|
-
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
37
|
-
} | null)[] | {
|
|
38
|
-
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
39
|
-
} | null)[] | {
|
|
40
|
-
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
41
|
-
};
|
|
42
|
-
}>>(value: import(".store/@xylabs-promise-npm-4.4.26-eff161fa33/package").AnyNonPromise, config?: import("@xylabs/object").TypeCheckConfig): TType | undefined;
|
|
41
|
+
} | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[];
|
|
42
|
+
}>>(value: import(".store/@xylabs-promise-npm-4.4.27-0f2723573b/package").AnyNonPromise, config?: import("@xylabs/object").TypeCheckConfig): TType | undefined;
|
|
43
43
|
<TType extends import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
44
44
|
schema: "network.xyo.http.call.result";
|
|
45
45
|
call: Hash;
|
|
46
46
|
contentType: "application/json";
|
|
47
|
-
data:
|
|
47
|
+
data: {
|
|
48
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
49
|
+
} | (string | number | boolean | {
|
|
50
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
51
|
+
} | (string | number | boolean | {
|
|
52
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
53
|
+
} | (string | number | boolean | {
|
|
54
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
55
|
+
} | (string | number | boolean | {
|
|
56
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
57
|
+
} | (string | number | boolean | {
|
|
58
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
59
|
+
} | (string | number | boolean | {
|
|
60
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
61
|
+
} | (string | number | boolean | {
|
|
62
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null;
|
|
63
|
+
} | (string | number | boolean | {
|
|
64
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null;
|
|
65
|
+
} | (string | number | boolean | {
|
|
66
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null;
|
|
67
|
+
} | (string | number | boolean | {
|
|
68
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null;
|
|
69
|
+
} | (string | number | boolean | {
|
|
48
70
|
[x: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null;
|
|
49
|
-
} | null)[] |
|
|
50
|
-
|
|
51
|
-
} | null)[] | {
|
|
52
|
-
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
53
|
-
} | null)[] | {
|
|
54
|
-
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
55
|
-
} | null)[] | {
|
|
56
|
-
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
57
|
-
} | null)[] | {
|
|
58
|
-
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
59
|
-
} | null)[] | {
|
|
60
|
-
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
61
|
-
} | null)[] | {
|
|
62
|
-
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
63
|
-
} | null)[] | {
|
|
64
|
-
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
65
|
-
} | null)[] | {
|
|
66
|
-
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
67
|
-
} | null)[] | {
|
|
68
|
-
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
69
|
-
} | null)[] | {
|
|
70
|
-
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
71
|
-
};
|
|
72
|
-
}>>(value: import(".store/@xylabs-promise-npm-4.4.26-eff161fa33/package").AnyNonPromise, assert: import("@xylabs/object").StringOrAlertFunction<import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
71
|
+
} | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[];
|
|
72
|
+
}>>(value: import(".store/@xylabs-promise-npm-4.4.27-0f2723573b/package").AnyNonPromise, assert: import("@xylabs/object").StringOrAlertFunction<import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
73
73
|
schema: "network.xyo.http.call.result";
|
|
74
74
|
call: Hash;
|
|
75
75
|
contentType: "application/json";
|
|
76
|
-
data:
|
|
76
|
+
data: {
|
|
77
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
78
|
+
} | (string | number | boolean | {
|
|
79
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
80
|
+
} | (string | number | boolean | {
|
|
81
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
82
|
+
} | (string | number | boolean | {
|
|
83
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
84
|
+
} | (string | number | boolean | {
|
|
85
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
86
|
+
} | (string | number | boolean | {
|
|
87
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
88
|
+
} | (string | number | boolean | {
|
|
89
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
90
|
+
} | (string | number | boolean | {
|
|
91
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null;
|
|
92
|
+
} | (string | number | boolean | {
|
|
93
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null;
|
|
94
|
+
} | (string | number | boolean | {
|
|
95
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null;
|
|
96
|
+
} | (string | number | boolean | {
|
|
97
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null;
|
|
98
|
+
} | (string | number | boolean | {
|
|
77
99
|
[x: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null;
|
|
78
|
-
} | null)[] |
|
|
79
|
-
[x: string]: string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
80
|
-
} | null)[] | {
|
|
81
|
-
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
82
|
-
} | null)[] | {
|
|
83
|
-
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
84
|
-
} | null)[] | {
|
|
85
|
-
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
86
|
-
} | null)[] | {
|
|
87
|
-
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
88
|
-
} | null)[] | {
|
|
89
|
-
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
90
|
-
} | null)[] | {
|
|
91
|
-
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
92
|
-
} | null)[] | {
|
|
93
|
-
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
94
|
-
} | null)[] | {
|
|
95
|
-
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
96
|
-
} | null)[] | {
|
|
97
|
-
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
98
|
-
} | null)[] | {
|
|
99
|
-
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
100
|
-
};
|
|
100
|
+
} | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[];
|
|
101
101
|
}>>, config?: import("@xylabs/object").TypeCheckConfig): TType;
|
|
102
102
|
};
|
|
103
103
|
//# sourceMappingURL=HttpCallJsonResult.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpCallJsonResult.d.ts","sourceRoot":"","sources":["../../../../src/Payload/types/HttpCallJsonResult.ts"],"names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BAH+B,gBAAmB;CAYL,CAAA"}
|
|
@@ -19,8 +19,8 @@ export type HttpUriTemplateCallWitnessConfig = WitnessConfig<HttpCallWitnessConf
|
|
|
19
19
|
export type HttpCallWitnessConfig = HttpUriCallWitnessConfig | HttpUriTemplateCallWitnessConfig | HttpCallWitnessConfigBase;
|
|
20
20
|
export declare const isHttpCallWitnessConfig: (x?: unknown | null) => x is HttpCallWitnessConfig;
|
|
21
21
|
export declare const asHttpCallWitnessConfig: {
|
|
22
|
-
<TType extends HttpCallWitnessConfig>(value: import(".store/@xylabs-promise-npm-4.4.
|
|
23
|
-
<TType extends HttpCallWitnessConfig>(value: import(".store/@xylabs-promise-npm-4.4.
|
|
22
|
+
<TType extends HttpCallWitnessConfig>(value: import(".store/@xylabs-promise-npm-4.4.27-0f2723573b/package").AnyNonPromise, config?: import("@xylabs/object").TypeCheckConfig): TType | undefined;
|
|
23
|
+
<TType extends HttpCallWitnessConfig>(value: import(".store/@xylabs-promise-npm-4.4.27-0f2723573b/package").AnyNonPromise, assert: import("@xylabs/object").StringOrAlertFunction<HttpCallWitnessConfig>, config?: import("@xylabs/object").TypeCheckConfig): TType;
|
|
24
24
|
};
|
|
25
25
|
export declare const isHttpUriCallWitnessConfig: (value?: unknown) => value is HttpUriCallWitnessConfig;
|
|
26
26
|
export declare const asHttpUriCallWitnessConfig: {
|
|
@@ -39,12 +39,12 @@ export declare const asHttpUriCallWitnessConfig: {
|
|
|
39
39
|
readonly queries?: string[] | undefined;
|
|
40
40
|
} | undefined;
|
|
41
41
|
readonly allowedQueries?: string[] | undefined;
|
|
42
|
-
readonly archivist?: import(".store/@xyo-network-module-model-npm-3.6.
|
|
43
|
-
readonly consoleLogger?: import(".store/@xylabs-logger-npm-4.4.
|
|
42
|
+
readonly archivist?: import(".store/@xyo-network-module-model-npm-3.6.5-6111ef9554/package").ModuleIdentifier | undefined;
|
|
43
|
+
readonly consoleLogger?: import(".store/@xylabs-logger-npm-4.4.27-a063a79f7b/package").LogLevel | undefined;
|
|
44
44
|
readonly labels?: {
|
|
45
45
|
[x: string]: string | undefined;
|
|
46
46
|
} | undefined;
|
|
47
|
-
readonly name?: import(".store/@xyo-network-module-model-npm-3.6.
|
|
47
|
+
readonly name?: import(".store/@xyo-network-module-model-npm-3.6.5-6111ef9554/package").ModuleName | undefined;
|
|
48
48
|
readonly paging?: {
|
|
49
49
|
[x: string]: {
|
|
50
50
|
size?: number | undefined;
|
|
@@ -69,7 +69,7 @@ export declare const asHttpUriCallWitnessConfig: {
|
|
|
69
69
|
readonly timestamp?: boolean | undefined;
|
|
70
70
|
accept?: MimeTypes | undefined;
|
|
71
71
|
timeout?: number | undefined;
|
|
72
|
-
}>>(value: import(".store/@xylabs-promise-npm-4.4.
|
|
72
|
+
}>>(value: import(".store/@xylabs-promise-npm-4.4.27-0f2723573b/package").AnyNonPromise, config?: import("@xylabs/object").TypeCheckConfig): TType | undefined;
|
|
73
73
|
<TType extends import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
74
74
|
schema: "network.xyo.http.call.witness.config";
|
|
75
75
|
headers?: {
|
|
@@ -85,12 +85,12 @@ export declare const asHttpUriCallWitnessConfig: {
|
|
|
85
85
|
readonly queries?: string[] | undefined;
|
|
86
86
|
} | undefined;
|
|
87
87
|
readonly allowedQueries?: string[] | undefined;
|
|
88
|
-
readonly archivist?: import(".store/@xyo-network-module-model-npm-3.6.
|
|
89
|
-
readonly consoleLogger?: import(".store/@xylabs-logger-npm-4.4.
|
|
88
|
+
readonly archivist?: import(".store/@xyo-network-module-model-npm-3.6.5-6111ef9554/package").ModuleIdentifier | undefined;
|
|
89
|
+
readonly consoleLogger?: import(".store/@xylabs-logger-npm-4.4.27-a063a79f7b/package").LogLevel | undefined;
|
|
90
90
|
readonly labels?: {
|
|
91
91
|
[x: string]: string | undefined;
|
|
92
92
|
} | undefined;
|
|
93
|
-
readonly name?: import(".store/@xyo-network-module-model-npm-3.6.
|
|
93
|
+
readonly name?: import(".store/@xyo-network-module-model-npm-3.6.5-6111ef9554/package").ModuleName | undefined;
|
|
94
94
|
readonly paging?: {
|
|
95
95
|
[x: string]: {
|
|
96
96
|
size?: number | undefined;
|
|
@@ -115,7 +115,7 @@ export declare const asHttpUriCallWitnessConfig: {
|
|
|
115
115
|
readonly timestamp?: boolean | undefined;
|
|
116
116
|
accept?: MimeTypes | undefined;
|
|
117
117
|
timeout?: number | undefined;
|
|
118
|
-
}>>(value: import(".store/@xylabs-promise-npm-4.4.
|
|
118
|
+
}>>(value: import(".store/@xylabs-promise-npm-4.4.27-0f2723573b/package").AnyNonPromise, assert: import("@xylabs/object").StringOrAlertFunction<import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
119
119
|
schema: "network.xyo.http.call.witness.config";
|
|
120
120
|
headers?: {
|
|
121
121
|
[x: string]: string | undefined;
|
|
@@ -130,12 +130,12 @@ export declare const asHttpUriCallWitnessConfig: {
|
|
|
130
130
|
readonly queries?: string[] | undefined;
|
|
131
131
|
} | undefined;
|
|
132
132
|
readonly allowedQueries?: string[] | undefined;
|
|
133
|
-
readonly archivist?: import(".store/@xyo-network-module-model-npm-3.6.
|
|
134
|
-
readonly consoleLogger?: import(".store/@xylabs-logger-npm-4.4.
|
|
133
|
+
readonly archivist?: import(".store/@xyo-network-module-model-npm-3.6.5-6111ef9554/package").ModuleIdentifier | undefined;
|
|
134
|
+
readonly consoleLogger?: import(".store/@xylabs-logger-npm-4.4.27-a063a79f7b/package").LogLevel | undefined;
|
|
135
135
|
readonly labels?: {
|
|
136
136
|
[x: string]: string | undefined;
|
|
137
137
|
} | undefined;
|
|
138
|
-
readonly name?: import(".store/@xyo-network-module-model-npm-3.6.
|
|
138
|
+
readonly name?: import(".store/@xyo-network-module-model-npm-3.6.5-6111ef9554/package").ModuleName | undefined;
|
|
139
139
|
readonly paging?: {
|
|
140
140
|
[x: string]: {
|
|
141
141
|
size?: number | undefined;
|
|
@@ -182,12 +182,12 @@ export declare const asHttpUriTemplateCallWitnessConfig: {
|
|
|
182
182
|
readonly queries?: string[] | undefined;
|
|
183
183
|
} | undefined;
|
|
184
184
|
readonly allowedQueries?: string[] | undefined;
|
|
185
|
-
readonly archivist?: import(".store/@xyo-network-module-model-npm-3.6.
|
|
186
|
-
readonly consoleLogger?: import(".store/@xylabs-logger-npm-4.4.
|
|
185
|
+
readonly archivist?: import(".store/@xyo-network-module-model-npm-3.6.5-6111ef9554/package").ModuleIdentifier | undefined;
|
|
186
|
+
readonly consoleLogger?: import(".store/@xylabs-logger-npm-4.4.27-a063a79f7b/package").LogLevel | undefined;
|
|
187
187
|
readonly labels?: {
|
|
188
188
|
[x: string]: string | undefined;
|
|
189
189
|
} | undefined;
|
|
190
|
-
readonly name?: import(".store/@xyo-network-module-model-npm-3.6.
|
|
190
|
+
readonly name?: import(".store/@xyo-network-module-model-npm-3.6.5-6111ef9554/package").ModuleName | undefined;
|
|
191
191
|
readonly paging?: {
|
|
192
192
|
[x: string]: {
|
|
193
193
|
size?: number | undefined;
|
|
@@ -212,7 +212,7 @@ export declare const asHttpUriTemplateCallWitnessConfig: {
|
|
|
212
212
|
readonly timestamp?: boolean | undefined;
|
|
213
213
|
accept?: MimeTypes | undefined;
|
|
214
214
|
timeout?: number | undefined;
|
|
215
|
-
}>>(value: import(".store/@xylabs-promise-npm-4.4.
|
|
215
|
+
}>>(value: import(".store/@xylabs-promise-npm-4.4.27-0f2723573b/package").AnyNonPromise, config?: import("@xylabs/object").TypeCheckConfig): TType | undefined;
|
|
216
216
|
<TType extends import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
217
217
|
schema: "network.xyo.http.call.witness.config";
|
|
218
218
|
headers?: {
|
|
@@ -231,12 +231,12 @@ export declare const asHttpUriTemplateCallWitnessConfig: {
|
|
|
231
231
|
readonly queries?: string[] | undefined;
|
|
232
232
|
} | undefined;
|
|
233
233
|
readonly allowedQueries?: string[] | undefined;
|
|
234
|
-
readonly archivist?: import(".store/@xyo-network-module-model-npm-3.6.
|
|
235
|
-
readonly consoleLogger?: import(".store/@xylabs-logger-npm-4.4.
|
|
234
|
+
readonly archivist?: import(".store/@xyo-network-module-model-npm-3.6.5-6111ef9554/package").ModuleIdentifier | undefined;
|
|
235
|
+
readonly consoleLogger?: import(".store/@xylabs-logger-npm-4.4.27-a063a79f7b/package").LogLevel | undefined;
|
|
236
236
|
readonly labels?: {
|
|
237
237
|
[x: string]: string | undefined;
|
|
238
238
|
} | undefined;
|
|
239
|
-
readonly name?: import(".store/@xyo-network-module-model-npm-3.6.
|
|
239
|
+
readonly name?: import(".store/@xyo-network-module-model-npm-3.6.5-6111ef9554/package").ModuleName | undefined;
|
|
240
240
|
readonly paging?: {
|
|
241
241
|
[x: string]: {
|
|
242
242
|
size?: number | undefined;
|
|
@@ -261,7 +261,7 @@ export declare const asHttpUriTemplateCallWitnessConfig: {
|
|
|
261
261
|
readonly timestamp?: boolean | undefined;
|
|
262
262
|
accept?: MimeTypes | undefined;
|
|
263
263
|
timeout?: number | undefined;
|
|
264
|
-
}>>(value: import(".store/@xylabs-promise-npm-4.4.
|
|
264
|
+
}>>(value: import(".store/@xylabs-promise-npm-4.4.27-0f2723573b/package").AnyNonPromise, assert: import("@xylabs/object").StringOrAlertFunction<import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
265
265
|
schema: "network.xyo.http.call.witness.config";
|
|
266
266
|
headers?: {
|
|
267
267
|
[x: string]: string | undefined;
|
|
@@ -279,12 +279,12 @@ export declare const asHttpUriTemplateCallWitnessConfig: {
|
|
|
279
279
|
readonly queries?: string[] | undefined;
|
|
280
280
|
} | undefined;
|
|
281
281
|
readonly allowedQueries?: string[] | undefined;
|
|
282
|
-
readonly archivist?: import(".store/@xyo-network-module-model-npm-3.6.
|
|
283
|
-
readonly consoleLogger?: import(".store/@xylabs-logger-npm-4.4.
|
|
282
|
+
readonly archivist?: import(".store/@xyo-network-module-model-npm-3.6.5-6111ef9554/package").ModuleIdentifier | undefined;
|
|
283
|
+
readonly consoleLogger?: import(".store/@xylabs-logger-npm-4.4.27-a063a79f7b/package").LogLevel | undefined;
|
|
284
284
|
readonly labels?: {
|
|
285
285
|
[x: string]: string | undefined;
|
|
286
286
|
} | undefined;
|
|
287
|
-
readonly name?: import(".store/@xyo-network-module-model-npm-3.6.
|
|
287
|
+
readonly name?: import(".store/@xyo-network-module-model-npm-3.6.5-6111ef9554/package").ModuleName | undefined;
|
|
288
288
|
readonly paging?: {
|
|
289
289
|
[x: string]: {
|
|
290
290
|
size?: number | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Payload/identity/asHttpCall.ts","../../src/Payload/identity/isHttpCall.ts","../../src/Payload/Schema.ts","../../src/Payload/identity/asHttpCallBase64Result.ts","../../src/Payload/identity/isHttpCallBase64Result.ts","../../src/Payload/identity/asHttpCallResult.ts","../../src/Payload/identity/isHttpCallResult.ts","../../src/Payload/identity/asHttpCallXmlResult.ts","../../src/Payload/identity/isHttpCallXmlResult.ts","../../src/Payload/identity/asHttpUriCall.ts","../../src/Payload/identity/isHttpUriCall.ts","../../src/Payload/identity/asHttpUriTemplateCall.ts","../../src/Payload/identity/isHttpUriTemplateCall.ts","../../src/Payload/identity/isHttpCallErrorResult.ts","../../src/Payload/types/HttpCallJsonResult.ts","../../src/Witness/Config.ts","../../src/Witness/Schema.ts","../../src/Witness/Witness.ts","../../src/lib/checkIpfsUrl.ts"],"sourcesContent":["import { AsObjectFactory } from '@xylabs/object'\n\nimport { isHttpCall } from './isHttpCall.ts'\n\nexport const asApiCall = AsObjectFactory.create(isHttpCall)\n","import { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport { HttpCallSchema } from '../Schema.ts'\nimport type { HttpCall } from '../types/index.ts'\n\nexport const isHttpCall = isPayloadOfSchemaType<HttpCall>(HttpCallSchema)\n","export const HttpCallSchema = 'network.xyo.http.call'\nexport type HttpCallSchema = typeof HttpCallSchema\n\nexport const HttpCallResultSchema = `${HttpCallSchema}.result`\nexport type HttpCallResultSchema = typeof HttpCallResultSchema\n","import { AsObjectFactory } from '@xylabs/object'\n\nimport { isHttpCallBase64Result } from './isHttpCallBase64Result.ts'\n\nexport const asHttpCallBase64Result = AsObjectFactory.create(isHttpCallBase64Result)\n","import { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport { HttpCallResultSchema } from '../Schema.ts'\nimport type { HttpCallBase64Result } from '../types/index.ts'\n\nexport const isHttpCallBase64Result = (x?: unknown | null): x is HttpCallBase64Result => {\n return isPayloadOfSchemaType(HttpCallResultSchema)(x) && typeof (x as HttpCallBase64Result)?.data === 'string'\n}\n","import { AsObjectFactory } from '@xylabs/object'\n\nimport { isHttpCallResult } from './isHttpCallResult.ts'\n\nexport const asHttpCallResult = AsObjectFactory.create(isHttpCallResult)\n","import { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport { HttpCallResultSchema } from '../Schema.ts'\nimport type { HttpCallResult } from '../types/index.ts'\n\nexport const isHttpCallResult = isPayloadOfSchemaType<HttpCallResult>(HttpCallResultSchema)\n","import { AsObjectFactory } from '@xylabs/object'\n\nimport { isHttpCallXmlResult } from './isHttpCallXmlResult.ts'\n\nexport const asHttpCallXmlResult = AsObjectFactory.create(isHttpCallXmlResult)\n","import { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport { HttpCallResultSchema } from '../Schema.ts'\nimport type { HttpCallXmlResult } from '../types/index.ts'\n\nexport const isHttpCallXmlResult = (x?: unknown | null): x is HttpCallXmlResult => {\n return isPayloadOfSchemaType(HttpCallResultSchema)(x) && typeof (x as HttpCallXmlResult)?.data === 'string'\n}\n","import { AsObjectFactory } from '@xylabs/object'\n\nimport { isHttpUriCall } from './isHttpUriCall.ts'\n\nexport const asHttpUriCall = AsObjectFactory.create(isHttpUriCall)\n","import type { HttpUriCall } from '../types/index.ts'\nimport { isHttpCall } from './isHttpCall.ts'\n\nexport const isHttpUriCall = (value?: unknown): value is HttpUriCall => isHttpCall(value) && !!(value as HttpUriCall).uri\n","import { AsObjectFactory } from '@xylabs/object'\n\nimport { isHttpUriTemplateCall } from './isHttpUriTemplateCall.ts'\n\nexport const asHttpUriTemplateCall = AsObjectFactory.create(isHttpUriTemplateCall)\n","import type { HttpUriTemplateCall } from '../types/index.ts'\nimport { isHttpCall } from './isHttpCall.ts'\n\nexport const isHttpUriTemplateCall = (value?: unknown): value is HttpUriTemplateCall =>\n isHttpCall(value) && !!((value as HttpUriTemplateCall).uriTemplate || (value as HttpUriTemplateCall).params)\n","import { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport { HttpCallResultSchema } from '../Schema.ts'\nimport type { HttpCallErrorResult, HttpCallResult } from '../types/index.ts'\n\nexport const isHttpCallErrorResult = (value: unknown): value is HttpCallErrorResult =>\n !!isPayloadOfSchemaType<HttpCallResult>(HttpCallResultSchema) && ((value as HttpCallErrorResult).http?.status ?? 200) >= 400\n","import type { Hash } from '@xylabs/hex'\nimport type { JsonArray, JsonObject } from '@xylabs/object'\nimport { AsObjectFactory } from '@xylabs/object'\nimport type { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport { HttpCallResultSchema } from '../Schema.ts'\n\nexport type HttpCallJsonResultType = JsonArray | JsonObject\n\nexport type HttpCallJsonResult<T extends HttpCallJsonResultType = HttpCallJsonResultType> = Payload<\n {\n call: Hash\n contentType: 'application/json'\n data: T\n },\n HttpCallResultSchema\n>\n\nexport const isHttpCallJsonResult = <T extends HttpCallJsonResultType = HttpCallJsonResultType>(x?: unknown | null): x is HttpCallJsonResult<T> => {\n return isPayloadOfSchemaType(HttpCallResultSchema)(x) && (x as HttpCallJsonResult)?.contentType === 'application/json'\n}\nexport const asHttpCallJsonResult = AsObjectFactory.create(isHttpCallJsonResult)\n","import { AsObjectFactory } from '@xylabs/object'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\nimport type { WitnessConfig } from '@xyo-network/witness-model'\n\nimport type {\n HttpCall, HttpUriCall, HttpUriTemplateCall, MimeTypes,\n} from '../Payload/index.ts'\nimport { HttpCallWitnessConfigSchema } from './Schema.ts'\n\nexport type HttpCallWitnessConfigBase = WitnessConfig<{\n accept?: MimeTypes\n headers?: Record<string, string | undefined>\n queries?: HttpCall['queries']\n schema: HttpCallWitnessConfigSchema\n timeout?: number\n verb?: HttpCall['verb']\n}>\n\nexport type HttpUriCallWitnessConfig = WitnessConfig<\n HttpCallWitnessConfigBase & {\n uri: HttpUriCall['uri']\n }\n>\n\nexport type HttpUriTemplateCallWitnessConfig = WitnessConfig<\n HttpCallWitnessConfigBase & {\n params?: Record<string, string>\n uriTemplate: HttpUriTemplateCall['uriTemplate']\n }\n>\n\nexport type HttpCallWitnessConfig = HttpUriCallWitnessConfig | HttpUriTemplateCallWitnessConfig | HttpCallWitnessConfigBase\n\nexport const isHttpCallWitnessConfig = isPayloadOfSchemaType<HttpCallWitnessConfig>(HttpCallWitnessConfigSchema)\nexport const asHttpCallWitnessConfig = AsObjectFactory.create(isHttpCallWitnessConfig)\n\nexport const isHttpUriCallWitnessConfig = (value?: unknown): value is HttpUriCallWitnessConfig =>\n isHttpCallWitnessConfig(value) && !!(value as HttpUriCallWitnessConfig).uri\nexport const asHttpUriCallWitnessConfig = AsObjectFactory.create(isHttpUriCallWitnessConfig)\n\nexport const isHttpUriTemplateCallWitnessConfig = (value?: unknown): value is HttpUriTemplateCallWitnessConfig =>\n isHttpCallWitnessConfig(value) && !!(value as HttpUriTemplateCallWitnessConfig).uriTemplate\nexport const asHttpUriTemplateCallWitnessConfig = AsObjectFactory.create(isHttpUriTemplateCallWitnessConfig)\n","export const HttpCallWitnessConfigSchema = 'network.xyo.http.call.witness.config'\nexport type HttpCallWitnessConfigSchema = typeof HttpCallWitnessConfigSchema\n","/* eslint-disable max-statements */\nimport { assertEx } from '@xylabs/assert'\nimport { AxiosJson } from '@xylabs/axios'\nimport type { Hash } from '@xylabs/hex'\nimport { URL } from '@xylabs/url'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { PayloadHasher } from '@xyo-network/hash'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport type { Schema } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\nimport type { AxiosError } from 'axios'\nimport { Axios } from 'axios'\nimport { fromByteArray } from 'base64-js'\nimport fillTemplate from 'es6-dynamic-template'\n\nimport { checkIpfsUrl } from '../lib/index.ts'\nimport type {\n HttpCall,\n HttpCallBase64Result,\n HttpCallErrorResult,\n HttpCallJsonResult,\n HttpCallJsonResultType,\n HttpCallResult,\n HttpCallXmlResult,\n MimeTypes,\n} from '../Payload/index.ts'\nimport {\n asHttpUriCall,\n asHttpUriTemplateCall,\n HttpCallResultSchema,\n HttpCallSchema,\n} from '../Payload/index.ts'\nimport type { HttpCallHtmlResult } from '../Payload/types/index.ts'\nimport { asHttpUriCallWitnessConfig, asHttpUriTemplateCallWitnessConfig } from './Config.ts'\nimport type { HttpCallWitnessParams } from './Params.ts'\nimport { HttpCallWitnessConfigSchema } from './Schema.ts'\n\nexport class HttpCallWitness<TParams extends HttpCallWitnessParams = HttpCallWitnessParams> extends AbstractWitness<TParams, HttpCall, HttpCallResult> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, HttpCallWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = HttpCallWitnessConfigSchema\n\n get accept(): MimeTypes {\n return this.config.accept ?? 'application/json'\n }\n\n get ipfsGateway() {\n return this.params.ipfsGateway\n }\n\n get timeout() {\n return this.config.timeout\n }\n\n getFullUri(call?: HttpCall): string {\n const { uri: callUri } = asHttpUriCall(call) ?? {}\n const {\n uriTemplate: callUriTemplate, params: callParams, queries: callQueries,\n } = asHttpUriTemplateCall(call) ?? {}\n const { uri: configUri } = asHttpUriCallWitnessConfig(this.config) ?? {}\n const {\n uriTemplate: configUriTemplate, params: configParams, queries: configQueries,\n } = asHttpUriTemplateCallWitnessConfig(this.config) ?? {}\n\n const params = { ...configParams, ...callParams }\n\n let url: URL | undefined = undefined\n\n if (callUri) {\n url = new URL(callUri)\n } else if (callUriTemplate) {\n url = new URL(fillTemplate(callUriTemplate, params))\n } else if (configUri) {\n url = new URL(configUri)\n } else if (configUriTemplate) {\n url = new URL(fillTemplate(configUriTemplate, params))\n }\n\n if (url) {\n const queries = Object.entries({ ...configQueries, ...callQueries })\n queries.map(([key, value]) => url?.searchParams.set(key, value))\n return url.href\n }\n\n throw new Error('Unable to determine uri. No uri/uriTemplate specified in either the call or config.')\n }\n\n getHeaders(headers?: Record<string, string | undefined>): Record<string, string | undefined> {\n return {\n ...this.params.headers, ...this.config.headers, ...headers,\n }\n }\n\n protected override async observeHandler(inPayloads: HttpCall[] = []): Promise<HttpCallResult[]> {\n await this.started('throw')\n try {\n const observations = await Promise.all(\n inPayloads.filter(isPayloadOfSchemaType(HttpCallSchema)).map(async (call) => {\n const { verb: callVerb } = call\n const { verb: configVerb } = this.config\n const verb = callVerb ?? configVerb ?? 'get'\n const uri = this.getFullUri(call)\n\n const validatedUri = assertEx(checkIpfsUrl(uri, this.ipfsGateway), () => 'Invalid URI')\n\n if (verb === 'get') {\n return this.httpGet(validatedUri, (await PayloadBuilder.dataHash(call)))\n }\n\n const observation: HttpCallResult = {\n call: await PayloadHasher.hash(call),\n schema: HttpCallResultSchema,\n }\n return observation\n }),\n )\n return observations\n } catch (ex) {\n const error = ex as Error\n console.error(`Error [${this.config.name}]: ${error.message}`)\n console.log(error.stack)\n throw error\n }\n }\n\n // eslint-disable-next-line complexity\n private async httpGet(url: string, call: Hash, headers?: Record<string, string | undefined>): Promise<HttpCallResult> {\n const result: HttpCallResult = {\n call,\n schema: HttpCallResultSchema,\n }\n try {\n switch (this.accept) {\n case 'application/json': {\n const axios = new AxiosJson({\n headers: { ...this.getHeaders(headers), Accept: 'application/json' }, timeout: this.timeout, decompress: true,\n })\n const response = await axios.get<HttpCallJsonResultType>(url)\n if (response.status >= 200 && response.status < 300) {\n const jsonResult = result as HttpCallJsonResult\n jsonResult.data = response.data\n jsonResult.contentType = 'application/json'\n } else {\n const errorResult = result as HttpCallErrorResult\n errorResult.http = { status: response.status }\n }\n break\n }\n case 'application/xml':\n case 'text/xml': {\n const axios = new Axios({\n headers: { ...this.getHeaders(headers), Accept: this.accept },\n responseType: 'arraybuffer',\n decompress: true,\n timeout: this.timeout,\n })\n const response = await axios.get(url)\n if (response.status >= 200 && response.status < 300) {\n const xmlResult = result as HttpCallXmlResult\n xmlResult.data = Buffer.from(response.data, 'binary').toString('utf8')\n xmlResult.contentType = response.headers['content-type']?.toString() ?? 'application/xml'\n } else {\n const errorResult = result as HttpCallErrorResult\n errorResult.http = { status: response.status }\n }\n break\n }\n case 'text/html':{\n const axios = new Axios({\n headers: { ...this.getHeaders(headers), Accept: this.accept },\n responseType: 'text',\n decompress: true,\n timeout: this.timeout,\n })\n const response = await axios.get(url)\n if (response.status >= 200 && response.status < 300) {\n const htmlResult = result as HttpCallHtmlResult\n htmlResult.data = response.data\n htmlResult.contentType = response.headers['content-type']?.toString() ?? 'text/html'\n } else {\n const errorResult = result as HttpCallErrorResult\n errorResult.http = { status: response.status }\n }\n break\n }\n default: {\n const axios = new Axios({\n headers: this.params.headers, responseType: 'arraybuffer', timeout: this.timeout, decompress: true,\n })\n const response = await axios.get(url)\n if (response.status >= 200 && response.status < 300) {\n const jsonResult = result as HttpCallBase64Result\n jsonResult.data = fromByteArray(response.data)\n jsonResult.contentType = response.headers['content-type']?.toString() ?? 'application/octet-stream'\n } else {\n const errorResult = result as HttpCallErrorResult\n errorResult.http = { status: response.status }\n }\n break\n }\n }\n } catch (ex) {\n const axiosError = ex as AxiosError\n if (axiosError.isAxiosError) {\n if (axiosError?.response?.status !== undefined) {\n result.http = result.http ?? {}\n result.http.status = axiosError?.response?.status\n }\n if (axiosError?.code !== undefined) {\n result.http = result.http ?? {}\n result.http.code = axiosError?.code\n }\n return result\n } else {\n throw ex\n }\n }\n return result\n }\n}\n","import { assertEx } from '@xylabs/assert'\nimport { URL } from '@xylabs/url'\n\nconst allowIpfsIoRepair = true\n\n/**\n * Returns the equivalent IPFS gateway URL for the supplied URL.\n * @param urlToCheck The URL to check\n * @returns If the supplied URL is an IPFS URL, it converts the URL to the\n * equivalent IPFS gateway URL. Otherwise, returns the original URL.\n */\nexport const checkIpfsUrl = (urlToCheck: string, ipfsGateway?: string): string => {\n try {\n const url = new URL(urlToCheck)\n let protocol = url.protocol\n let host = url.host\n let path = url.pathname\n const query = url.search\n if (protocol === 'ipfs:') {\n protocol = 'https:'\n host = assertEx(ipfsGateway, () => 'No ipfsGateway provided')\n path = url.host === 'ipfs' ? `ipfs${path}` : `ipfs/${url.host}${path}`\n const root = `${protocol}//${host}/${path}`\n return query?.length > 0 ? `${root}?${query}` : root\n } else if (allowIpfsIoRepair && protocol === 'https' && host === 'ipfs.io') {\n protocol = 'https:'\n host = assertEx(ipfsGateway, () => 'No ipfsGateway provided')\n const pathParts = path.split('/')\n if (pathParts[0] === 'ipfs') {\n pathParts.shift()\n }\n path = pathParts.join('/')\n const root = `${protocol}//${host}/${path}`\n return query?.length > 0 ? `${root}?${query}` : root\n } else {\n return urlToCheck\n }\n } catch {\n // const error = ex as Error\n // console.error(`${error.name}:${error.message} [${urlToCheck}]`)\n // console.log(error.stack)\n return urlToCheck\n }\n}\n"],"mappings":";AAAA,SAAS,uBAAuB;;;ACAhC,SAAS,6BAA6B;;;ACA/B,IAAM,iBAAiB;AAGvB,IAAM,uBAAuB,GAAG,cAAc;;;ADE9C,IAAM,aAAa,sBAAgC,cAAc;;;ADDjE,IAAM,YAAY,gBAAgB,OAAO,UAAU;;;AGJ1D,SAAS,mBAAAA,wBAAuB;;;ACAhC,SAAS,yBAAAC,8BAA6B;AAK/B,IAAM,yBAAyB,CAAC,MAAkD;AACvF,SAAOC,uBAAsB,oBAAoB,EAAE,CAAC,KAAK,OAAQ,GAA4B,SAAS;AACxG;;;ADHO,IAAM,yBAAyBC,iBAAgB,OAAO,sBAAsB;;;AEJnF,SAAS,mBAAAC,wBAAuB;;;ACAhC,SAAS,yBAAAC,8B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ACT;AACF;","names":["AsObjectFactory","isPayloadOfSchemaType","isPayloadOfSchemaType","AsObjectFactory","AsObjectFactory","isPayloadOfSchemaType","isPayloadOfSchemaType","AsObjectFactory","AsObjectFactory","isPayloadOfSchemaType","isPayloadOfSchemaType","AsObjectFactory","AsObjectFactory","AsObjectFactory","AsObjectFactory","AsObjectFactory","isPayloadOfSchemaType","isPayloadOfSchemaType","AsObjectFactory","isPayloadOfSchemaType","isPayloadOfSchemaType","AsObjectFactory","AsObjectFactory","isPayloadOfSchemaType","isPayloadOfSchemaType","AsObjectFactory","assertEx","URL","isPayloadOfSchemaType","URL","isPayloadOfSchemaType","assertEx"]}
|
|
1
|
+
{"version":3,"sources":["../../src/Payload/identity/asHttpCall.ts","../../src/Payload/identity/isHttpCall.ts","../../src/Payload/Schema.ts","../../src/Payload/identity/asHttpCallBase64Result.ts","../../src/Payload/identity/isHttpCallBase64Result.ts","../../src/Payload/identity/asHttpCallResult.ts","../../src/Payload/identity/isHttpCallResult.ts","../../src/Payload/identity/asHttpCallXmlResult.ts","../../src/Payload/identity/isHttpCallXmlResult.ts","../../src/Payload/identity/asHttpUriCall.ts","../../src/Payload/identity/isHttpUriCall.ts","../../src/Payload/identity/asHttpUriTemplateCall.ts","../../src/Payload/identity/isHttpUriTemplateCall.ts","../../src/Payload/identity/isHttpCallErrorResult.ts","../../src/Payload/types/HttpCallJsonResult.ts","../../src/Witness/Config.ts","../../src/Witness/Schema.ts","../../src/Witness/Witness.ts","../../src/lib/checkIpfsUrl.ts"],"sourcesContent":["import { AsObjectFactory } from '@xylabs/object'\n\nimport { isHttpCall } from './isHttpCall.ts'\n\nexport const asApiCall = AsObjectFactory.create(isHttpCall)\n","import { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport { HttpCallSchema } from '../Schema.ts'\nimport type { HttpCall } from '../types/index.ts'\n\nexport const isHttpCall = isPayloadOfSchemaType<HttpCall>(HttpCallSchema)\n","export const HttpCallSchema = 'network.xyo.http.call'\nexport type HttpCallSchema = typeof HttpCallSchema\n\nexport const HttpCallResultSchema = `${HttpCallSchema}.result`\nexport type HttpCallResultSchema = typeof HttpCallResultSchema\n","import { AsObjectFactory } from '@xylabs/object'\n\nimport { isHttpCallBase64Result } from './isHttpCallBase64Result.ts'\n\nexport const asHttpCallBase64Result = AsObjectFactory.create(isHttpCallBase64Result)\n","import { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport { HttpCallResultSchema } from '../Schema.ts'\nimport type { HttpCallBase64Result, HttpCallResult } from '../types/index.ts'\n\nexport const isHttpCallBase64Result = (x?: unknown | null): x is HttpCallBase64Result => {\n return isPayloadOfSchemaType<HttpCallResult>(HttpCallResultSchema)(x) && typeof (x as HttpCallBase64Result)?.data === 'string'\n}\n","import { AsObjectFactory } from '@xylabs/object'\n\nimport { isHttpCallResult } from './isHttpCallResult.ts'\n\nexport const asHttpCallResult = AsObjectFactory.create(isHttpCallResult)\n","import { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport { HttpCallResultSchema } from '../Schema.ts'\nimport type { HttpCallResult } from '../types/index.ts'\n\nexport const isHttpCallResult = isPayloadOfSchemaType<HttpCallResult>(HttpCallResultSchema)\n","import { AsObjectFactory } from '@xylabs/object'\n\nimport { isHttpCallXmlResult } from './isHttpCallXmlResult.ts'\n\nexport const asHttpCallXmlResult = AsObjectFactory.create(isHttpCallXmlResult)\n","import { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport { HttpCallResultSchema } from '../Schema.ts'\nimport type { HttpCallResult, HttpCallXmlResult } from '../types/index.ts'\n\nexport const isHttpCallXmlResult = (x?: unknown | null): x is HttpCallXmlResult => {\n return isPayloadOfSchemaType<HttpCallResult>(HttpCallResultSchema)(x) && typeof (x as HttpCallXmlResult)?.data === 'string'\n}\n","import { AsObjectFactory } from '@xylabs/object'\n\nimport { isHttpUriCall } from './isHttpUriCall.ts'\n\nexport const asHttpUriCall = AsObjectFactory.create(isHttpUriCall)\n","import type { HttpUriCall } from '../types/index.ts'\nimport { isHttpCall } from './isHttpCall.ts'\n\nexport const isHttpUriCall = (value?: unknown): value is HttpUriCall => isHttpCall(value) && !!(value as HttpUriCall).uri\n","import { AsObjectFactory } from '@xylabs/object'\n\nimport { isHttpUriTemplateCall } from './isHttpUriTemplateCall.ts'\n\nexport const asHttpUriTemplateCall = AsObjectFactory.create(isHttpUriTemplateCall)\n","import type { HttpUriTemplateCall } from '../types/index.ts'\nimport { isHttpCall } from './isHttpCall.ts'\n\nexport const isHttpUriTemplateCall = (value?: unknown): value is HttpUriTemplateCall =>\n isHttpCall(value) && !!((value as HttpUriTemplateCall).uriTemplate || (value as HttpUriTemplateCall).params)\n","import { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport { HttpCallResultSchema } from '../Schema.ts'\nimport type { HttpCallErrorResult, HttpCallResult } from '../types/index.ts'\n\nexport const isHttpCallErrorResult = (value: unknown): value is HttpCallErrorResult =>\n !!isPayloadOfSchemaType<HttpCallResult>(HttpCallResultSchema) && ((value as HttpCallErrorResult).http?.status ?? 200) >= 400\n","import type { Hash } from '@xylabs/hex'\nimport type { JsonArray, JsonObject } from '@xylabs/object'\nimport { AsObjectFactory } from '@xylabs/object'\nimport type { Payload } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\n\nimport { HttpCallResultSchema } from '../Schema.ts'\nimport type { HttpCallResult } from './HttpCallResult.ts'\n\nexport type HttpCallJsonResultType = JsonArray | JsonObject\n\nexport type HttpCallJsonResult<T extends HttpCallJsonResultType = HttpCallJsonResultType> = Payload<\n {\n call: Hash\n contentType: 'application/json'\n data: T\n },\n HttpCallResultSchema\n>\n\nexport const isHttpCallJsonResult = <T extends HttpCallJsonResultType = HttpCallJsonResultType>(x?: unknown | null): x is HttpCallJsonResult<T> => {\n return isPayloadOfSchemaType<HttpCallResult>(HttpCallResultSchema)(x) && (x as HttpCallJsonResult)?.contentType === 'application/json'\n}\nexport const asHttpCallJsonResult = AsObjectFactory.create(isHttpCallJsonResult)\n","import { AsObjectFactory } from '@xylabs/object'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\nimport type { WitnessConfig } from '@xyo-network/witness-model'\n\nimport type {\n HttpCall, HttpUriCall, HttpUriTemplateCall, MimeTypes,\n} from '../Payload/index.ts'\nimport { HttpCallWitnessConfigSchema } from './Schema.ts'\n\nexport type HttpCallWitnessConfigBase = WitnessConfig<{\n accept?: MimeTypes\n headers?: Record<string, string | undefined>\n queries?: HttpCall['queries']\n schema: HttpCallWitnessConfigSchema\n timeout?: number\n verb?: HttpCall['verb']\n}>\n\nexport type HttpUriCallWitnessConfig = WitnessConfig<\n HttpCallWitnessConfigBase & {\n uri: HttpUriCall['uri']\n }\n>\n\nexport type HttpUriTemplateCallWitnessConfig = WitnessConfig<\n HttpCallWitnessConfigBase & {\n params?: Record<string, string>\n uriTemplate: HttpUriTemplateCall['uriTemplate']\n }\n>\n\nexport type HttpCallWitnessConfig = HttpUriCallWitnessConfig | HttpUriTemplateCallWitnessConfig | HttpCallWitnessConfigBase\n\nexport const isHttpCallWitnessConfig = isPayloadOfSchemaType<HttpCallWitnessConfig>(HttpCallWitnessConfigSchema)\nexport const asHttpCallWitnessConfig = AsObjectFactory.create(isHttpCallWitnessConfig)\n\nexport const isHttpUriCallWitnessConfig = (value?: unknown): value is HttpUriCallWitnessConfig =>\n isHttpCallWitnessConfig(value) && !!(value as HttpUriCallWitnessConfig).uri\nexport const asHttpUriCallWitnessConfig = AsObjectFactory.create(isHttpUriCallWitnessConfig)\n\nexport const isHttpUriTemplateCallWitnessConfig = (value?: unknown): value is HttpUriTemplateCallWitnessConfig =>\n isHttpCallWitnessConfig(value) && !!(value as HttpUriTemplateCallWitnessConfig).uriTemplate\nexport const asHttpUriTemplateCallWitnessConfig = AsObjectFactory.create(isHttpUriTemplateCallWitnessConfig)\n","export const HttpCallWitnessConfigSchema = 'network.xyo.http.call.witness.config'\nexport type HttpCallWitnessConfigSchema = typeof HttpCallWitnessConfigSchema\n","/* eslint-disable max-statements */\nimport { assertEx } from '@xylabs/assert'\nimport { AxiosJson } from '@xylabs/axios'\nimport type { Hash } from '@xylabs/hex'\nimport { URL } from '@xylabs/url'\nimport { AbstractWitness } from '@xyo-network/abstract-witness'\nimport { PayloadHasher } from '@xyo-network/hash'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport type { Schema } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\nimport type { AxiosError } from 'axios'\nimport { Axios } from 'axios'\nimport { fromByteArray } from 'base64-js'\nimport fillTemplate from 'es6-dynamic-template'\n\nimport { checkIpfsUrl } from '../lib/index.ts'\nimport type {\n HttpCall,\n HttpCallBase64Result,\n HttpCallErrorResult,\n HttpCallJsonResult,\n HttpCallJsonResultType,\n HttpCallResult,\n HttpCallXmlResult,\n MimeTypes,\n} from '../Payload/index.ts'\nimport {\n asHttpUriCall,\n asHttpUriTemplateCall,\n HttpCallResultSchema,\n HttpCallSchema,\n} from '../Payload/index.ts'\nimport type { HttpCallHtmlResult } from '../Payload/types/index.ts'\nimport { asHttpUriCallWitnessConfig, asHttpUriTemplateCallWitnessConfig } from './Config.ts'\nimport type { HttpCallWitnessParams } from './Params.ts'\nimport { HttpCallWitnessConfigSchema } from './Schema.ts'\n\nexport class HttpCallWitness<TParams extends HttpCallWitnessParams = HttpCallWitnessParams> extends AbstractWitness<TParams, HttpCall, HttpCallResult> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, HttpCallWitnessConfigSchema]\n static override readonly defaultConfigSchema: Schema = HttpCallWitnessConfigSchema\n\n get accept(): MimeTypes {\n return this.config.accept ?? 'application/json'\n }\n\n get ipfsGateway() {\n return this.params.ipfsGateway\n }\n\n get timeout() {\n return this.config.timeout\n }\n\n getFullUri(call?: HttpCall): string {\n const { uri: callUri } = asHttpUriCall(call) ?? {}\n const {\n uriTemplate: callUriTemplate, params: callParams, queries: callQueries,\n } = asHttpUriTemplateCall(call) ?? {}\n const { uri: configUri } = asHttpUriCallWitnessConfig(this.config) ?? {}\n const {\n uriTemplate: configUriTemplate, params: configParams, queries: configQueries,\n } = asHttpUriTemplateCallWitnessConfig(this.config) ?? {}\n\n const params = { ...configParams, ...callParams }\n\n let url: URL | undefined = undefined\n\n if (callUri) {\n url = new URL(callUri)\n } else if (callUriTemplate) {\n url = new URL(fillTemplate(callUriTemplate, params))\n } else if (configUri) {\n url = new URL(configUri)\n } else if (configUriTemplate) {\n url = new URL(fillTemplate(configUriTemplate, params))\n }\n\n if (url) {\n const queries = Object.entries({ ...configQueries, ...callQueries })\n queries.map(([key, value]) => url?.searchParams.set(key, value))\n return url.href\n }\n\n throw new Error('Unable to determine uri. No uri/uriTemplate specified in either the call or config.')\n }\n\n getHeaders(headers?: Record<string, string | undefined>): Record<string, string | undefined> {\n return {\n ...this.params.headers, ...this.config.headers, ...headers,\n }\n }\n\n protected override async observeHandler(inPayloads: HttpCall[] = []): Promise<HttpCallResult[]> {\n await this.started('throw')\n try {\n const observations = await Promise.all(\n inPayloads.filter(isPayloadOfSchemaType<HttpCall>(HttpCallSchema)).map(async (call) => {\n const { verb: callVerb } = call\n const { verb: configVerb } = this.config\n const verb = callVerb ?? configVerb ?? 'get'\n const uri = this.getFullUri(call)\n\n const validatedUri = assertEx(checkIpfsUrl(uri, this.ipfsGateway), () => 'Invalid URI')\n\n if (verb === 'get') {\n return this.httpGet(validatedUri, (await PayloadBuilder.dataHash(call)))\n }\n\n const observation: HttpCallResult = {\n call: await PayloadHasher.hash(call),\n schema: HttpCallResultSchema,\n }\n return observation\n }),\n )\n return observations\n } catch (ex) {\n const error = ex as Error\n console.error(`Error [${this.config.name}]: ${error.message}`)\n console.log(error.stack)\n throw error\n }\n }\n\n // eslint-disable-next-line complexity\n private async httpGet(url: string, call: Hash, headers?: Record<string, string | undefined>): Promise<HttpCallResult> {\n const result: HttpCallResult = {\n call,\n schema: HttpCallResultSchema,\n }\n try {\n switch (this.accept) {\n case 'application/json': {\n const axios = new AxiosJson({\n headers: { ...this.getHeaders(headers), Accept: 'application/json' }, timeout: this.timeout, decompress: true,\n })\n const response = await axios.get<HttpCallJsonResultType>(url)\n if (response.status >= 200 && response.status < 300) {\n const jsonResult = result as HttpCallJsonResult\n jsonResult.data = response.data\n jsonResult.contentType = 'application/json'\n } else {\n const errorResult = result as HttpCallErrorResult\n errorResult.http = { status: response.status }\n }\n break\n }\n case 'application/xml':\n case 'text/xml': {\n const axios = new Axios({\n headers: { ...this.getHeaders(headers), Accept: this.accept },\n responseType: 'arraybuffer',\n decompress: true,\n timeout: this.timeout,\n })\n const response = await axios.get(url)\n if (response.status >= 200 && response.status < 300) {\n const xmlResult = result as HttpCallXmlResult\n xmlResult.data = Buffer.from(response.data, 'binary').toString('utf8')\n xmlResult.contentType = response.headers['content-type']?.toString() ?? 'application/xml'\n } else {\n const errorResult = result as HttpCallErrorResult\n errorResult.http = { status: response.status }\n }\n break\n }\n case 'text/html':{\n const axios = new Axios({\n headers: { ...this.getHeaders(headers), Accept: this.accept },\n responseType: 'text',\n decompress: true,\n timeout: this.timeout,\n })\n const response = await axios.get(url)\n if (response.status >= 200 && response.status < 300) {\n const htmlResult = result as HttpCallHtmlResult\n htmlResult.data = response.data\n htmlResult.contentType = response.headers['content-type']?.toString() ?? 'text/html'\n } else {\n const errorResult = result as HttpCallErrorResult\n errorResult.http = { status: response.status }\n }\n break\n }\n default: {\n const axios = new Axios({\n headers: this.params.headers, responseType: 'arraybuffer', timeout: this.timeout, decompress: true,\n })\n const response = await axios.get(url)\n if (response.status >= 200 && response.status < 300) {\n const jsonResult = result as HttpCallBase64Result\n jsonResult.data = fromByteArray(response.data)\n jsonResult.contentType = response.headers['content-type']?.toString() ?? 'application/octet-stream'\n } else {\n const errorResult = result as HttpCallErrorResult\n errorResult.http = { status: response.status }\n }\n break\n }\n }\n } catch (ex) {\n const axiosError = ex as AxiosError\n if (axiosError.isAxiosError) {\n if (axiosError?.response?.status !== undefined) {\n result.http = result.http ?? {}\n result.http.status = axiosError?.response?.status\n }\n if (axiosError?.code !== undefined) {\n result.http = result.http ?? {}\n result.http.code = axiosError?.code\n }\n return result\n } else {\n throw ex\n }\n }\n return result\n }\n}\n","import { assertEx } from '@xylabs/assert'\nimport { URL } from '@xylabs/url'\n\nconst allowIpfsIoRepair = true\n\n/**\n * Returns the equivalent IPFS gateway URL for the supplied URL.\n * @param urlToCheck The URL to check\n * @returns If the supplied URL is an IPFS URL, it converts the URL to the\n * equivalent IPFS gateway URL. Otherwise, returns the original URL.\n */\nexport const checkIpfsUrl = (urlToCheck: string, ipfsGateway?: string): string => {\n try {\n const url = new URL(urlToCheck)\n let protocol = url.protocol\n let host = url.host\n let path = url.pathname\n const query = url.search\n if (protocol === 'ipfs:') {\n protocol = 'https:'\n host = assertEx(ipfsGateway, () => 'No ipfsGateway provided')\n path = url.host === 'ipfs' ? `ipfs${path}` : `ipfs/${url.host}${path}`\n const root = `${protocol}//${host}/${path}`\n return query?.length > 0 ? `${root}?${query}` : root\n } else if (allowIpfsIoRepair && protocol === 'https' && host === 'ipfs.io') {\n protocol = 'https:'\n host = assertEx(ipfsGateway, () => 'No ipfsGateway provided')\n const pathParts = path.split('/')\n if (pathParts[0] === 'ipfs') {\n pathParts.shift()\n }\n path = pathParts.join('/')\n const root = `${protocol}//${host}/${path}`\n return query?.length > 0 ? `${root}?${query}` : root\n } else {\n return urlToCheck\n }\n } catch {\n // const error = ex as Error\n // console.error(`${error.name}:${error.message} [${urlToCheck}]`)\n // console.log(error.stack)\n return urlToCheck\n }\n}\n"],"mappings":";AAAA,SAAS,uBAAuB;;;ACAhC,SAAS,6BAA6B;;;ACA/B,IAAM,iBAAiB;AAGvB,IAAM,uBAAuB,GAAG,cAAc;;;ADE9C,IAAM,aAAa,sBAAgC,cAAc;;;ADDjE,IAAM,YAAY,gBAAgB,OAAO,UAAU;;;AGJ1D,SAAS,mBAAAA,wBAAuB;;;ACAhC,SAAS,yBAAAC,8BAA6B;AAK/B,IAAM,yBAAyB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C7C;AACA,YAAI,YAAY,SAAS,QAAW;AAClC,iBAAO,OAAO,OAAO,QAAQ,CAAC;AAC9B,iBAAO,KAAK,OAAO,YAAY;AAAA,QACjC;AACA,eAAO;AAAA,MACT,OAAO;AACL,cAAM;AAAA,MACR;AAAA,IACF;AACA,WAAO;AAAA,EACT;AACF;","names":["AsObjectFactory","isPayloadOfSchemaType","isPayloadOfSchemaType","AsObjectFactory","AsObjectFactory","isPayloadOfSchemaType","isPayloadOfSchemaType","AsObjectFactory","AsObjectFactory","isPayloadOfSchemaType","isPayloadOfSchemaType","AsObjectFactory","AsObjectFactory","AsObjectFactory","AsObjectFactory","AsObjectFactory","isPayloadOfSchemaType","isPayloadOfSchemaType","AsObjectFactory","isPayloadOfSchemaType","isPayloadOfSchemaType","AsObjectFactory","AsObjectFactory","isPayloadOfSchemaType","isPayloadOfSchemaType","AsObjectFactory","assertEx","URL","isPayloadOfSchemaType","URL","isPayloadOfSchemaType","assertEx"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/http-call-witness",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.4",
|
|
4
4
|
"description": "Typescript/Javascript Plugins for XYO Platform",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -29,16 +29,16 @@
|
|
|
29
29
|
"module": "dist/neutral/index.mjs",
|
|
30
30
|
"types": "dist/neutral/index.d.ts",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@xylabs/assert": "^4.4.
|
|
33
|
-
"@xylabs/axios": "^4.4.
|
|
34
|
-
"@xylabs/hex": "^4.4.
|
|
35
|
-
"@xylabs/object": "^4.4.
|
|
36
|
-
"@xylabs/url": "^4.4.
|
|
37
|
-
"@xyo-network/abstract-witness": "^3.6.
|
|
38
|
-
"@xyo-network/hash": "^3.6.
|
|
39
|
-
"@xyo-network/payload-builder": "^3.6.
|
|
40
|
-
"@xyo-network/payload-model": "^3.6.
|
|
41
|
-
"@xyo-network/witness-model": "^3.6.
|
|
32
|
+
"@xylabs/assert": "^4.4.27",
|
|
33
|
+
"@xylabs/axios": "^4.4.27",
|
|
34
|
+
"@xylabs/hex": "^4.4.27",
|
|
35
|
+
"@xylabs/object": "^4.4.27",
|
|
36
|
+
"@xylabs/url": "^4.4.27",
|
|
37
|
+
"@xyo-network/abstract-witness": "^3.6.5",
|
|
38
|
+
"@xyo-network/hash": "^3.6.5",
|
|
39
|
+
"@xyo-network/payload-builder": "^3.6.5",
|
|
40
|
+
"@xyo-network/payload-model": "^3.6.5",
|
|
41
|
+
"@xyo-network/witness-model": "^3.6.5",
|
|
42
42
|
"axios": "^1.7.9",
|
|
43
43
|
"base64-js": "^1.5.1",
|
|
44
44
|
"es6-dynamic-template": "^2.0.0"
|
|
@@ -46,12 +46,12 @@
|
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@xylabs/ts-scripts-yarn3": "^4.2.6",
|
|
48
48
|
"@xylabs/tsconfig": "^4.2.6",
|
|
49
|
-
"@xylabs/vitest-extended": "^4.4.
|
|
50
|
-
"@xyo-network/account": "^3.6.
|
|
51
|
-
"@xyo-network/manifest": "^3.6.
|
|
52
|
-
"@xyo-network/module-factory-locator": "^3.6.
|
|
53
|
-
"@xyo-network/module-model": "^3.6.
|
|
54
|
-
"@xyo-network/sentinel-model": "^3.6.
|
|
49
|
+
"@xylabs/vitest-extended": "^4.4.27",
|
|
50
|
+
"@xyo-network/account": "^3.6.5",
|
|
51
|
+
"@xyo-network/manifest": "^3.6.5",
|
|
52
|
+
"@xyo-network/module-factory-locator": "^3.6.5",
|
|
53
|
+
"@xyo-network/module-model": "^3.6.5",
|
|
54
|
+
"@xyo-network/sentinel-model": "^3.6.5",
|
|
55
55
|
"ethers": "^6.13.4",
|
|
56
56
|
"typescript": "^5.7.2",
|
|
57
57
|
"vitest": "^2.1.8"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { isPayloadOfSchemaType } from '@xyo-network/payload-model'
|
|
2
2
|
|
|
3
3
|
import { HttpCallResultSchema } from '../Schema.ts'
|
|
4
|
-
import type { HttpCallBase64Result } from '../types/index.ts'
|
|
4
|
+
import type { HttpCallBase64Result, HttpCallResult } from '../types/index.ts'
|
|
5
5
|
|
|
6
6
|
export const isHttpCallBase64Result = (x?: unknown | null): x is HttpCallBase64Result => {
|
|
7
|
-
return isPayloadOfSchemaType(HttpCallResultSchema)(x) && typeof (x as HttpCallBase64Result)?.data === 'string'
|
|
7
|
+
return isPayloadOfSchemaType<HttpCallResult>(HttpCallResultSchema)(x) && typeof (x as HttpCallBase64Result)?.data === 'string'
|
|
8
8
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { isPayloadOfSchemaType } from '@xyo-network/payload-model'
|
|
2
2
|
|
|
3
3
|
import { HttpCallResultSchema } from '../Schema.ts'
|
|
4
|
-
import type { HttpCallXmlResult } from '../types/index.ts'
|
|
4
|
+
import type { HttpCallResult, HttpCallXmlResult } from '../types/index.ts'
|
|
5
5
|
|
|
6
6
|
export const isHttpCallXmlResult = (x?: unknown | null): x is HttpCallXmlResult => {
|
|
7
|
-
return isPayloadOfSchemaType(HttpCallResultSchema)(x) && typeof (x as HttpCallXmlResult)?.data === 'string'
|
|
7
|
+
return isPayloadOfSchemaType<HttpCallResult>(HttpCallResultSchema)(x) && typeof (x as HttpCallXmlResult)?.data === 'string'
|
|
8
8
|
}
|
|
@@ -5,6 +5,7 @@ import type { Payload } from '@xyo-network/payload-model'
|
|
|
5
5
|
import { isPayloadOfSchemaType } from '@xyo-network/payload-model'
|
|
6
6
|
|
|
7
7
|
import { HttpCallResultSchema } from '../Schema.ts'
|
|
8
|
+
import type { HttpCallResult } from './HttpCallResult.ts'
|
|
8
9
|
|
|
9
10
|
export type HttpCallJsonResultType = JsonArray | JsonObject
|
|
10
11
|
|
|
@@ -18,6 +19,6 @@ export type HttpCallJsonResult<T extends HttpCallJsonResultType = HttpCallJsonRe
|
|
|
18
19
|
>
|
|
19
20
|
|
|
20
21
|
export const isHttpCallJsonResult = <T extends HttpCallJsonResultType = HttpCallJsonResultType>(x?: unknown | null): x is HttpCallJsonResult<T> => {
|
|
21
|
-
return isPayloadOfSchemaType(HttpCallResultSchema)(x) && (x as HttpCallJsonResult)?.contentType === 'application/json'
|
|
22
|
+
return isPayloadOfSchemaType<HttpCallResult>(HttpCallResultSchema)(x) && (x as HttpCallJsonResult)?.contentType === 'application/json'
|
|
22
23
|
}
|
|
23
24
|
export const asHttpCallJsonResult = AsObjectFactory.create(isHttpCallJsonResult)
|
package/src/Witness/Witness.ts
CHANGED
|
@@ -94,7 +94,7 @@ export class HttpCallWitness<TParams extends HttpCallWitnessParams = HttpCallWit
|
|
|
94
94
|
await this.started('throw')
|
|
95
95
|
try {
|
|
96
96
|
const observations = await Promise.all(
|
|
97
|
-
inPayloads.filter(isPayloadOfSchemaType(HttpCallSchema)).map(async (call) => {
|
|
97
|
+
inPayloads.filter(isPayloadOfSchemaType<HttpCall>(HttpCallSchema)).map(async (call) => {
|
|
98
98
|
const { verb: callVerb } = call
|
|
99
99
|
const { verb: configVerb } = this.config
|
|
100
100
|
const verb = callVerb ?? configVerb ?? 'get'
|