@xyo-network/http-call-witness 6.0.3 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/README.md +5 -0
  2. package/dist/neutral/Payload/identity/asHttpCall.d.ts +38 -1
  3. package/dist/neutral/Payload/identity/asHttpCall.d.ts.map +1 -1
  4. package/dist/neutral/Payload/identity/asHttpCallBase64Result.d.ts +18 -1
  5. package/dist/neutral/Payload/identity/asHttpCallBase64Result.d.ts.map +1 -1
  6. package/dist/neutral/Payload/identity/asHttpCallResult.d.ts +50 -1
  7. package/dist/neutral/Payload/identity/asHttpCallResult.d.ts.map +1 -1
  8. package/dist/neutral/Payload/identity/asHttpCallXmlResult.d.ts +18 -1
  9. package/dist/neutral/Payload/identity/asHttpCallXmlResult.d.ts.map +1 -1
  10. package/dist/neutral/Payload/identity/asHttpUriCall.d.ts +20 -1
  11. package/dist/neutral/Payload/identity/asHttpUriCall.d.ts.map +1 -1
  12. package/dist/neutral/Payload/identity/asHttpUriTemplateCall.d.ts +22 -1
  13. package/dist/neutral/Payload/identity/asHttpUriTemplateCall.d.ts.map +1 -1
  14. package/dist/neutral/Payload/identity/isHttpCall.d.ts +18 -2
  15. package/dist/neutral/Payload/identity/isHttpCall.d.ts.map +1 -1
  16. package/dist/neutral/Payload/identity/isHttpCallBase64Result.d.ts +8 -2
  17. package/dist/neutral/Payload/identity/isHttpCallBase64Result.d.ts.map +1 -1
  18. package/dist/neutral/Payload/identity/isHttpCallErrorResult.d.ts +10 -2
  19. package/dist/neutral/Payload/identity/isHttpCallErrorResult.d.ts.map +1 -1
  20. package/dist/neutral/Payload/identity/isHttpCallResult.d.ts +24 -2
  21. package/dist/neutral/Payload/identity/isHttpCallResult.d.ts.map +1 -1
  22. package/dist/neutral/Payload/identity/isHttpCallXmlResult.d.ts +8 -2
  23. package/dist/neutral/Payload/identity/isHttpCallXmlResult.d.ts.map +1 -1
  24. package/dist/neutral/Payload/identity/isHttpUriCall.d.ts +9 -2
  25. package/dist/neutral/Payload/identity/isHttpUriCall.d.ts.map +1 -1
  26. package/dist/neutral/Payload/identity/isHttpUriTemplateCall.d.ts +10 -2
  27. package/dist/neutral/Payload/identity/isHttpUriTemplateCall.d.ts.map +1 -1
  28. package/dist/neutral/Payload/types/HttpCall.d.ts +26 -3
  29. package/dist/neutral/Payload/types/HttpCall.d.ts.map +1 -1
  30. package/dist/neutral/Payload/types/HttpCallBase64Result.d.ts +10 -10
  31. package/dist/neutral/Payload/types/HttpCallBase64Result.d.ts.map +1 -1
  32. package/dist/neutral/Payload/types/HttpCallErrorResult.d.ts +12 -8
  33. package/dist/neutral/Payload/types/HttpCallErrorResult.d.ts.map +1 -1
  34. package/dist/neutral/Payload/types/HttpCallFields.d.ts +10 -7
  35. package/dist/neutral/Payload/types/HttpCallFields.d.ts.map +1 -1
  36. package/dist/neutral/Payload/types/HttpCallHtmlResult.d.ts +10 -8
  37. package/dist/neutral/Payload/types/HttpCallHtmlResult.d.ts.map +1 -1
  38. package/dist/neutral/Payload/types/HttpCallJsonResult.d.ts +30 -8
  39. package/dist/neutral/Payload/types/HttpCallJsonResult.d.ts.map +1 -1
  40. package/dist/neutral/Payload/types/HttpCallResult.d.ts +27 -5
  41. package/dist/neutral/Payload/types/HttpCallResult.d.ts.map +1 -1
  42. package/dist/neutral/Payload/types/HttpCallXmlResult.d.ts +10 -8
  43. package/dist/neutral/Payload/types/HttpCallXmlResult.d.ts.map +1 -1
  44. package/dist/neutral/Payload/types/HttpMeta.d.ts +6 -4
  45. package/dist/neutral/Payload/types/HttpMeta.d.ts.map +1 -1
  46. package/dist/neutral/Payload/types/HttpUriCall.d.ts +14 -6
  47. package/dist/neutral/Payload/types/HttpUriCall.d.ts.map +1 -1
  48. package/dist/neutral/Payload/types/HttpUriTemplateCall.d.ts +15 -7
  49. package/dist/neutral/Payload/types/HttpUriTemplateCall.d.ts.map +1 -1
  50. package/dist/neutral/Payload/types/MimeTypes.d.ts +15 -1
  51. package/dist/neutral/Payload/types/MimeTypes.d.ts.map +1 -1
  52. package/dist/neutral/Payload/types/Queries.d.ts +3 -1
  53. package/dist/neutral/Payload/types/Queries.d.ts.map +1 -1
  54. package/dist/neutral/Payload/types/Verb.d.ts +6 -1
  55. package/dist/neutral/Payload/types/Verb.d.ts.map +1 -1
  56. package/dist/neutral/Witness/Config.d.ts.map +1 -1
  57. package/dist/neutral/Witness/Witness.d.ts.map +1 -1
  58. package/dist/neutral/index.mjs +206 -64
  59. package/dist/neutral/index.mjs.map +4 -4
  60. package/package.json +17 -22
package/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ [![logo][]](https://xyo.network)
2
+
1
3
  # @xyo-network/http-call-witness
2
4
 
3
5
  [![npm][npm-badge]][npm-link]
@@ -36,9 +38,12 @@ bun add {{name}}
36
38
 
37
39
  See the [LICENSE](LICENSE) file for license rights and limitations (LGPL-3.0-only).
38
40
 
41
+ ## Credits
39
42
 
43
+ [Made with 🔥 and ❄️ by XYO Foundation](https://xyo.network)
40
44
 
41
45
  [npm-badge]: https://img.shields.io/npm/v/@xyo-network/http-call-witness.svg
42
46
  [npm-link]: https://www.npmjs.com/package/@xyo-network/http-call-witness
43
47
  [license-badge]: https://img.shields.io/npm/l/@xyo-network/http-call-witness.svg
44
48
  [license-link]: https://github.com/xylabs/sdk-js/blob/main/LICENSE
49
+ [logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
@@ -1,2 +1,39 @@
1
- export declare const asApiCall: import("@xylabs/sdk-js").AsTypeFunction<import("../index.ts").HttpCall>;
1
+ export declare const asHttpCall: {
2
+ <T>(value: T): (T & ({
3
+ schema: "network.xyo.http.call" & {
4
+ readonly __schema: true;
5
+ };
6
+ uri: string;
7
+ headers?: Record<string, string | undefined> | undefined;
8
+ queries?: Record<string, string> | undefined;
9
+ verb?: "get" | "post" | undefined;
10
+ } | {
11
+ schema: "network.xyo.http.call" & {
12
+ readonly __schema: true;
13
+ };
14
+ params?: Record<string, string> | undefined;
15
+ uriTemplate?: string | undefined;
16
+ headers?: Record<string, string | undefined> | undefined;
17
+ queries?: Record<string, string> | undefined;
18
+ verb?: "get" | "post" | undefined;
19
+ })) | undefined;
20
+ <T>(value: T, assert: import("@xylabs/sdk-js").ZodFactoryConfig): T & ({
21
+ schema: "network.xyo.http.call" & {
22
+ readonly __schema: true;
23
+ };
24
+ uri: string;
25
+ headers?: Record<string, string | undefined> | undefined;
26
+ queries?: Record<string, string> | undefined;
27
+ verb?: "get" | "post" | undefined;
28
+ } | {
29
+ schema: "network.xyo.http.call" & {
30
+ readonly __schema: true;
31
+ };
32
+ params?: Record<string, string> | undefined;
33
+ uriTemplate?: string | undefined;
34
+ headers?: Record<string, string | undefined> | undefined;
35
+ queries?: Record<string, string> | undefined;
36
+ verb?: "get" | "post" | undefined;
37
+ });
38
+ };
2
39
  //# sourceMappingURL=asHttpCall.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"asHttpCall.d.ts","sourceRoot":"","sources":["../../../../src/Payload/identity/asHttpCall.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,SAAS,yEAAqC,CAAA"}
1
+ {"version":3,"file":"asHttpCall.d.ts","sourceRoot":"","sources":["../../../../src/Payload/identity/asHttpCall.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAA0C,CAAA"}
@@ -1,2 +1,19 @@
1
- export declare const asHttpCallBase64Result: import("@xylabs/sdk-js").AsTypeFunction<import("../index.ts").HttpCallBase64Result>;
1
+ export declare const asHttpCallBase64Result: {
2
+ <T>(value: T): (T & {
3
+ schema: string & {
4
+ readonly __schema: true;
5
+ };
6
+ call: import("@xylabs/sdk-js").BrandedHash;
7
+ contentType: string;
8
+ data: string;
9
+ }) | undefined;
10
+ <T>(value: T, assert: import("@xylabs/sdk-js").ZodFactoryConfig): T & {
11
+ schema: string & {
12
+ readonly __schema: true;
13
+ };
14
+ call: import("@xylabs/sdk-js").BrandedHash;
15
+ contentType: string;
16
+ data: string;
17
+ };
18
+ };
2
19
  //# sourceMappingURL=asHttpCallBase64Result.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"asHttpCallBase64Result.d.ts","sourceRoot":"","sources":["../../../../src/Payload/identity/asHttpCallBase64Result.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,sBAAsB,qFAAiD,CAAA"}
1
+ {"version":3,"file":"asHttpCallBase64Result.d.ts","sourceRoot":"","sources":["../../../../src/Payload/identity/asHttpCallBase64Result.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;CAAkE,CAAA"}
@@ -1,2 +1,51 @@
1
- export declare const asHttpCallResult: import("@xylabs/sdk-js").AsTypeFunction<import("../index.ts").HttpCallResult>;
1
+ export declare const asHttpCallResult: {
2
+ <T>(value: T): (T & ({
3
+ schema: string & {
4
+ readonly __schema: true;
5
+ };
6
+ call: import("@xylabs/sdk-js").BrandedHash;
7
+ contentType: string;
8
+ data: string;
9
+ } | {
10
+ schema: string & {
11
+ readonly __schema: true;
12
+ };
13
+ call: import("@xylabs/sdk-js").BrandedHash;
14
+ http?: {
15
+ code?: string | undefined;
16
+ status?: number | undefined;
17
+ } | undefined;
18
+ } | {
19
+ schema: string & {
20
+ readonly __schema: true;
21
+ };
22
+ call: import("@xylabs/sdk-js").BrandedHash;
23
+ contentType: "application/json";
24
+ data: import("../index.ts").HttpCallJsonResultType;
25
+ })) | undefined;
26
+ <T>(value: T, assert: import("@xylabs/sdk-js").ZodFactoryConfig): T & ({
27
+ schema: string & {
28
+ readonly __schema: true;
29
+ };
30
+ call: import("@xylabs/sdk-js").BrandedHash;
31
+ contentType: string;
32
+ data: string;
33
+ } | {
34
+ schema: string & {
35
+ readonly __schema: true;
36
+ };
37
+ call: import("@xylabs/sdk-js").BrandedHash;
38
+ http?: {
39
+ code?: string | undefined;
40
+ status?: number | undefined;
41
+ } | undefined;
42
+ } | {
43
+ schema: string & {
44
+ readonly __schema: true;
45
+ };
46
+ call: import("@xylabs/sdk-js").BrandedHash;
47
+ contentType: "application/json";
48
+ data: import("../index.ts").HttpCallJsonResultType;
49
+ });
50
+ };
2
51
  //# sourceMappingURL=asHttpCallResult.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"asHttpCallResult.d.ts","sourceRoot":"","sources":["../../../../src/Payload/identity/asHttpCallResult.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,gBAAgB,+EAA2C,CAAA"}
1
+ {"version":3,"file":"asHttpCallResult.d.ts","sourceRoot":"","sources":["../../../../src/Payload/identity/asHttpCallResult.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAsD,CAAA"}
@@ -1,2 +1,19 @@
1
- export declare const asHttpCallXmlResult: import("@xylabs/sdk-js").AsTypeFunction<import("../index.ts").HttpCallXmlResult>;
1
+ export declare const asHttpCallXmlResult: {
2
+ <T>(value: T): (T & {
3
+ schema: string & {
4
+ readonly __schema: true;
5
+ };
6
+ call: import("@xylabs/sdk-js").BrandedHash;
7
+ contentType: "application/xml" | "text/xml";
8
+ data: string;
9
+ }) | undefined;
10
+ <T>(value: T, assert: import("@xylabs/sdk-js").ZodFactoryConfig): T & {
11
+ schema: string & {
12
+ readonly __schema: true;
13
+ };
14
+ call: import("@xylabs/sdk-js").BrandedHash;
15
+ contentType: "application/xml" | "text/xml";
16
+ data: string;
17
+ };
18
+ };
2
19
  //# sourceMappingURL=asHttpCallXmlResult.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"asHttpCallXmlResult.d.ts","sourceRoot":"","sources":["../../../../src/Payload/identity/asHttpCallXmlResult.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,mBAAmB,kFAA8C,CAAA"}
1
+ {"version":3,"file":"asHttpCallXmlResult.d.ts","sourceRoot":"","sources":["../../../../src/Payload/identity/asHttpCallXmlResult.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;CAA4D,CAAA"}
@@ -1,2 +1,21 @@
1
- export declare const asHttpUriCall: import("@xylabs/sdk-js").AsTypeFunction<import("../index.ts").HttpUriCall>;
1
+ export declare const asHttpUriCall: {
2
+ <T>(value: T): (T & {
3
+ schema: "network.xyo.http.call" & {
4
+ readonly __schema: true;
5
+ };
6
+ uri: string;
7
+ headers?: Record<string, string | undefined> | undefined;
8
+ queries?: Record<string, string> | undefined;
9
+ verb?: "get" | "post" | undefined;
10
+ }) | undefined;
11
+ <T>(value: T, assert: import("@xylabs/sdk-js").ZodFactoryConfig): T & {
12
+ schema: "network.xyo.http.call" & {
13
+ readonly __schema: true;
14
+ };
15
+ uri: string;
16
+ headers?: Record<string, string | undefined> | undefined;
17
+ queries?: Record<string, string> | undefined;
18
+ verb?: "get" | "post" | undefined;
19
+ };
20
+ };
2
21
  //# sourceMappingURL=asHttpUriCall.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"asHttpUriCall.d.ts","sourceRoot":"","sources":["../../../../src/Payload/identity/asHttpUriCall.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa,4EAAwC,CAAA"}
1
+ {"version":3,"file":"asHttpUriCall.d.ts","sourceRoot":"","sources":["../../../../src/Payload/identity/asHttpUriCall.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;CAAgD,CAAA"}
@@ -1,2 +1,23 @@
1
- export declare const asHttpUriTemplateCall: import("@xylabs/sdk-js").AsTypeFunction<import("../index.ts").HttpUriTemplateCall>;
1
+ export declare const asHttpUriTemplateCall: {
2
+ <T>(value: T): (T & {
3
+ schema: "network.xyo.http.call" & {
4
+ readonly __schema: true;
5
+ };
6
+ params?: Record<string, string> | undefined;
7
+ uriTemplate?: string | undefined;
8
+ headers?: Record<string, string | undefined> | undefined;
9
+ queries?: Record<string, string> | undefined;
10
+ verb?: "get" | "post" | undefined;
11
+ }) | undefined;
12
+ <T>(value: T, assert: import("@xylabs/sdk-js").ZodFactoryConfig): T & {
13
+ schema: "network.xyo.http.call" & {
14
+ readonly __schema: true;
15
+ };
16
+ params?: Record<string, string> | undefined;
17
+ uriTemplate?: string | undefined;
18
+ headers?: Record<string, string | undefined> | undefined;
19
+ queries?: Record<string, string> | undefined;
20
+ verb?: "get" | "post" | undefined;
21
+ };
22
+ };
2
23
  //# sourceMappingURL=asHttpUriTemplateCall.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"asHttpUriTemplateCall.d.ts","sourceRoot":"","sources":["../../../../src/Payload/identity/asHttpUriTemplateCall.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,qBAAqB,oFAAgD,CAAA"}
1
+ {"version":3,"file":"asHttpUriTemplateCall.d.ts","sourceRoot":"","sources":["../../../../src/Payload/identity/asHttpUriTemplateCall.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;CAAgE,CAAA"}
@@ -1,3 +1,19 @@
1
- import type { HttpCall } from '../types/index.ts';
2
- export declare const isHttpCall: (x?: unknown) => x is HttpCall;
1
+ export declare const isHttpCall: <T>(value: T) => value is T & ({
2
+ schema: "network.xyo.http.call" & {
3
+ readonly __schema: true;
4
+ };
5
+ uri: string;
6
+ headers?: Record<string, string | undefined> | undefined;
7
+ queries?: Record<string, string> | undefined;
8
+ verb?: "get" | "post" | undefined;
9
+ } | {
10
+ schema: "network.xyo.http.call" & {
11
+ readonly __schema: true;
12
+ };
13
+ params?: Record<string, string> | undefined;
14
+ uriTemplate?: string | undefined;
15
+ headers?: Record<string, string | undefined> | undefined;
16
+ queries?: Record<string, string> | undefined;
17
+ verb?: "get" | "post" | undefined;
18
+ });
3
19
  //# sourceMappingURL=isHttpCall.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"isHttpCall.d.ts","sourceRoot":"","sources":["../../../../src/Payload/identity/isHttpCall.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAEjD,eAAO,MAAM,UAAU,gCAAkD,CAAA"}
1
+ {"version":3,"file":"isHttpCall.d.ts","sourceRoot":"","sources":["../../../../src/Payload/identity/isHttpCall.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;EAA4B,CAAA"}
@@ -1,3 +1,9 @@
1
- import type { HttpCallBase64Result } from '../types/index.ts';
2
- export declare const isHttpCallBase64Result: (x?: unknown) => x is HttpCallBase64Result;
1
+ export declare const isHttpCallBase64Result: <T>(value: T) => value is T & {
2
+ schema: string & {
3
+ readonly __schema: true;
4
+ };
5
+ call: import("@xylabs/sdk-js").BrandedHash;
6
+ contentType: string;
7
+ data: string;
8
+ };
3
9
  //# sourceMappingURL=isHttpCallBase64Result.d.ts.map
@@ -1 +1 @@
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,GAAI,IAAI,OAAO,KAAG,CAAC,IAAI,oBAEzD,CAAA"}
1
+ {"version":3,"file":"isHttpCallBase64Result.d.ts","sourceRoot":"","sources":["../../../../src/Payload/identity/isHttpCallBase64Result.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,sBAAsB;;;;;;;CAAwC,CAAA"}
@@ -1,3 +1,11 @@
1
- import type { HttpCallErrorResult } from '../types/index.ts';
2
- export declare const isHttpCallErrorResult: (value: unknown) => value is HttpCallErrorResult;
1
+ export declare const isHttpCallErrorResult: <T>(value: T) => value is T & {
2
+ schema: string & {
3
+ readonly __schema: true;
4
+ };
5
+ call: import("@xylabs/sdk-js").BrandedHash;
6
+ http?: {
7
+ code?: string | undefined;
8
+ status?: number | undefined;
9
+ } | undefined;
10
+ };
3
11
  //# sourceMappingURL=isHttpCallErrorResult.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"isHttpCallErrorResult.d.ts","sourceRoot":"","sources":["../../../../src/Payload/identity/isHttpCallErrorResult.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAkB,MAAM,mBAAmB,CAAA;AAE5E,eAAO,MAAM,qBAAqB,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,mBAC8D,CAAA"}
1
+ {"version":3,"file":"isHttpCallErrorResult.d.ts","sourceRoot":"","sources":["../../../../src/Payload/identity/isHttpCallErrorResult.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,qBAAqB;;;;;;;;;CAA4F,CAAA"}
@@ -1,3 +1,25 @@
1
- import type { HttpCallResult } from '../types/index.ts';
2
- export declare const isHttpCallResult: (x?: unknown) => x is HttpCallResult;
1
+ export declare const isHttpCallResult: <T>(value: T) => value is T & ({
2
+ schema: string & {
3
+ readonly __schema: true;
4
+ };
5
+ call: import("@xylabs/sdk-js").BrandedHash;
6
+ contentType: string;
7
+ data: string;
8
+ } | {
9
+ schema: string & {
10
+ readonly __schema: true;
11
+ };
12
+ call: import("@xylabs/sdk-js").BrandedHash;
13
+ http?: {
14
+ code?: string | undefined;
15
+ status?: number | undefined;
16
+ } | undefined;
17
+ } | {
18
+ schema: string & {
19
+ readonly __schema: true;
20
+ };
21
+ call: import("@xylabs/sdk-js").BrandedHash;
22
+ contentType: "application/json";
23
+ data: import("../index.ts").HttpCallJsonResultType;
24
+ });
3
25
  //# sourceMappingURL=isHttpCallResult.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"isHttpCallResult.d.ts","sourceRoot":"","sources":["../../../../src/Payload/identity/isHttpCallResult.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAEvD,eAAO,MAAM,gBAAgB,sCAA8D,CAAA"}
1
+ {"version":3,"file":"isHttpCallResult.d.ts","sourceRoot":"","sources":["../../../../src/Payload/identity/isHttpCallResult.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;EAAkC,CAAA"}
@@ -1,3 +1,9 @@
1
- import type { HttpCallXmlResult } from '../types/index.ts';
2
- export declare const isHttpCallXmlResult: (x?: unknown) => x is HttpCallXmlResult;
1
+ export declare const isHttpCallXmlResult: <T>(value: T) => value is T & {
2
+ schema: string & {
3
+ readonly __schema: true;
4
+ };
5
+ call: import("@xylabs/sdk-js").BrandedHash;
6
+ contentType: "application/xml" | "text/xml";
7
+ data: string;
8
+ };
3
9
  //# sourceMappingURL=isHttpCallXmlResult.d.ts.map
@@ -1 +1 @@
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,GAAI,IAAI,OAAO,KAAG,CAAC,IAAI,iBAEtD,CAAA"}
1
+ {"version":3,"file":"isHttpCallXmlResult.d.ts","sourceRoot":"","sources":["../../../../src/Payload/identity/isHttpCallXmlResult.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,mBAAmB;;;;;;;CAAqC,CAAA"}
@@ -1,3 +1,10 @@
1
- import type { HttpUriCall } from '../types/index.ts';
2
- export declare const isHttpUriCall: (value?: unknown) => value is HttpUriCall;
1
+ export declare const isHttpUriCall: <T>(value: T) => value is T & {
2
+ schema: "network.xyo.http.call" & {
3
+ readonly __schema: true;
4
+ };
5
+ uri: string;
6
+ headers?: Record<string, string | undefined> | undefined;
7
+ queries?: Record<string, string> | undefined;
8
+ verb?: "get" | "post" | undefined;
9
+ };
3
10
  //# sourceMappingURL=isHttpUriCall.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"isHttpUriCall.d.ts","sourceRoot":"","sources":["../../../../src/Payload/identity/isHttpUriCall.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAGpD,eAAO,MAAM,aAAa,GAAI,QAAQ,OAAO,KAAG,KAAK,IAAI,WAAgE,CAAA"}
1
+ {"version":3,"file":"isHttpUriCall.d.ts","sourceRoot":"","sources":["../../../../src/Payload/identity/isHttpUriCall.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa;;;;;;;;CAA+B,CAAA"}
@@ -1,3 +1,11 @@
1
- import type { HttpUriTemplateCall } from '../types/index.ts';
2
- export declare const isHttpUriTemplateCall: (value?: unknown) => value is HttpUriTemplateCall;
1
+ export declare const isHttpUriTemplateCall: <T>(value: T) => value is T & {
2
+ schema: "network.xyo.http.call" & {
3
+ readonly __schema: true;
4
+ };
5
+ params?: Record<string, string> | undefined;
6
+ uriTemplate?: string | undefined;
7
+ headers?: Record<string, string | undefined> | undefined;
8
+ queries?: Record<string, string> | undefined;
9
+ verb?: "get" | "post" | undefined;
10
+ };
3
11
  //# sourceMappingURL=isHttpUriTemplateCall.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"isHttpUriTemplateCall.d.ts","sourceRoot":"","sources":["../../../../src/Payload/identity/isHttpUriTemplateCall.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAG5D,eAAO,MAAM,qBAAqB,GAAI,QAAQ,OAAO,KAAG,KAAK,IAAI,mBAC+C,CAAA"}
1
+ {"version":3,"file":"isHttpUriTemplateCall.d.ts","sourceRoot":"","sources":["../../../../src/Payload/identity/isHttpUriTemplateCall.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,qBAAqB;;;;;;;;;CAAkH,CAAA"}
@@ -1,4 +1,27 @@
1
- import type { HttpUriCall } from './HttpUriCall.ts';
2
- import type { HttpUriTemplateCall } from './HttpUriTemplateCall.ts';
3
- export type HttpCall = HttpUriCall | HttpUriTemplateCall;
1
+ import * as z from 'zod/mini';
2
+ export declare const HttpCallZod: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
3
+ schema: z.ZodMiniLiteral<"network.xyo.http.call" & {
4
+ readonly __schema: true;
5
+ }>;
6
+ uri: z.ZodMiniString<string>;
7
+ headers: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniOptional<z.ZodMiniString<string>>>>;
8
+ queries: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>>;
9
+ verb: z.ZodMiniOptional<z.ZodMiniEnum<{
10
+ get: "get";
11
+ post: "post";
12
+ }>>;
13
+ }, z.core.$strip>, z.ZodMiniObject<{
14
+ schema: z.ZodMiniLiteral<"network.xyo.http.call" & {
15
+ readonly __schema: true;
16
+ }>;
17
+ params: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>>;
18
+ uriTemplate: z.ZodMiniOptional<z.ZodMiniString<string>>;
19
+ headers: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniOptional<z.ZodMiniString<string>>>>;
20
+ queries: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>>;
21
+ verb: z.ZodMiniOptional<z.ZodMiniEnum<{
22
+ get: "get";
23
+ post: "post";
24
+ }>>;
25
+ }, z.core.$strip>]>;
26
+ export type HttpCall = z.infer<typeof HttpCallZod>;
4
27
  //# sourceMappingURL=HttpCall.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"HttpCall.d.ts","sourceRoot":"","sources":["../../../../src/Payload/types/HttpCall.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAEnE,MAAM,MAAM,QAAQ,GAAG,WAAW,GAAG,mBAAmB,CAAA"}
1
+ {"version":3,"file":"HttpCall.d.ts","sourceRoot":"","sources":["../../../../src/Payload/types/HttpCall.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAK7B,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;mBAAoD,CAAA;AAE5E,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAA"}
@@ -1,11 +1,11 @@
1
- import type { Hash } from '@xylabs/sdk-js';
2
- import type { Payload } from '@xyo-network/sdk-js';
3
- import type { HttpCallResultSchema } from '../Schema.ts';
4
- import type { HttpCallJsonResult } from './HttpCallJsonResult.ts';
5
- import type { HttpCallXmlResult } from './HttpCallXmlResult.ts';
6
- export type HttpCallBase64Result = Payload<{
7
- call: Hash;
8
- contentType: Exclude<Exclude<string, HttpCallJsonResult['contentType']>, HttpCallXmlResult['contentType']>;
9
- data: string;
10
- }, HttpCallResultSchema>;
1
+ import * as z from 'zod/mini';
2
+ export declare const HttpCallBase64ResultZod: z.ZodMiniObject<{
3
+ schema: z.ZodMiniLiteral<string & {
4
+ readonly __schema: true;
5
+ }>;
6
+ call: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("@xylabs/sdk-js").BrandedHash, string>>;
7
+ contentType: z.ZodMiniString<string>;
8
+ data: z.ZodMiniString<string>;
9
+ }, z.core.$strip>;
10
+ export type HttpCallBase64Result = z.infer<typeof HttpCallBase64ResultZod>;
11
11
  //# sourceMappingURL=HttpCallBase64Result.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"HttpCallBase64Result.d.ts","sourceRoot":"","sources":["../../../../src/Payload/types/HttpCallBase64Result.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAElD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AACjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE/D,MAAM,MAAM,oBAAoB,GAAG,OAAO,CACxC;IACE,IAAI,EAAE,IAAI,CAAA;IACV,WAAW,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,kBAAkB,CAAC,aAAa,CAAC,CAAC,EAAE,iBAAiB,CAAC,aAAa,CAAC,CAAC,CAAA;IAC1G,IAAI,EAAE,MAAM,CAAA;CACb,EACD,oBAAoB,CACrB,CAAA"}
1
+ {"version":3,"file":"HttpCallBase64Result.d.ts","sourceRoot":"","sources":["../../../../src/Payload/types/HttpCallBase64Result.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAI7B,eAAO,MAAM,uBAAuB;;;;;;;iBAIlC,CAAA;AAEF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA"}
@@ -1,9 +1,13 @@
1
- import type { Hash } from '@xylabs/sdk-js';
2
- import type { Payload } from '@xyo-network/sdk-js';
3
- import type { HttpCallResultSchema } from '../Schema.ts';
4
- import type { HttpMeta } from './HttpMeta.ts';
5
- export type HttpCallErrorResult = Payload<{
6
- call: Hash;
7
- http?: HttpMeta;
8
- }, HttpCallResultSchema>;
1
+ import * as z from 'zod/mini';
2
+ export declare const HttpCallErrorResultZod: z.ZodMiniObject<{
3
+ schema: z.ZodMiniLiteral<string & {
4
+ readonly __schema: true;
5
+ }>;
6
+ call: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("@xylabs/sdk-js").BrandedHash, string>>;
7
+ http: z.ZodMiniOptional<z.ZodMiniObject<{
8
+ code: z.ZodMiniOptional<z.ZodMiniString<string>>;
9
+ status: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
10
+ }, z.core.$strip>>;
11
+ }, z.core.$strip>;
12
+ export type HttpCallErrorResult = z.infer<typeof HttpCallErrorResultZod>;
9
13
  //# sourceMappingURL=HttpCallErrorResult.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"HttpCallErrorResult.d.ts","sourceRoot":"","sources":["../../../../src/Payload/types/HttpCallErrorResult.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAElD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAE7C,MAAM,MAAM,mBAAmB,GAAG,OAAO,CACvC;IACE,IAAI,EAAE,IAAI,CAAA;IACV,IAAI,CAAC,EAAE,QAAQ,CAAA;CAChB,EACD,oBAAoB,CACrB,CAAA"}
1
+ {"version":3,"file":"HttpCallErrorResult.d.ts","sourceRoot":"","sources":["../../../../src/Payload/types/HttpCallErrorResult.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAK7B,eAAO,MAAM,sBAAsB;;;;;;;;;iBAGjC,CAAA;AAEF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA"}
@@ -1,8 +1,11 @@
1
- import type { Queries } from './Queries.ts';
2
- import type { Verb } from './Verb.ts';
3
- export interface HttpCallFields {
4
- headers?: Record<string, string | undefined>;
5
- queries?: Queries;
6
- verb?: Verb;
7
- }
1
+ import * as z from 'zod/mini';
2
+ export declare const HttpCallFieldsZod: z.ZodMiniObject<{
3
+ headers: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniOptional<z.ZodMiniString<string>>>>;
4
+ queries: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>>;
5
+ verb: z.ZodMiniOptional<z.ZodMiniEnum<{
6
+ get: "get";
7
+ post: "post";
8
+ }>>;
9
+ }, z.core.$strip>;
10
+ export type HttpCallFields = z.infer<typeof HttpCallFieldsZod>;
8
11
  //# sourceMappingURL=HttpCallFields.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"HttpCallFields.d.ts","sourceRoot":"","sources":["../../../../src/Payload/types/HttpCallFields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAErC,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAA;IAC5C,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,CAAC,EAAE,IAAI,CAAA;CACZ"}
1
+ {"version":3,"file":"HttpCallFields.d.ts","sourceRoot":"","sources":["../../../../src/Payload/types/HttpCallFields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAK7B,eAAO,MAAM,iBAAiB;;;;;;;iBAI5B,CAAA;AAEF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA"}
@@ -1,9 +1,11 @@
1
- import type { Hash } from '@xylabs/sdk-js';
2
- import type { Payload } from '@xyo-network/sdk-js';
3
- import type { HttpCallResultSchema } from '../Schema.ts';
4
- export type HttpCallHtmlResult = Payload<{
5
- call: Hash;
6
- contentType: 'text/html';
7
- data: string;
8
- }, HttpCallResultSchema>;
1
+ import * as z from 'zod/mini';
2
+ export declare const HttpCallHtmlResultZod: z.ZodMiniObject<{
3
+ schema: z.ZodMiniLiteral<string & {
4
+ readonly __schema: true;
5
+ }>;
6
+ call: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("@xylabs/sdk-js").BrandedHash, string>>;
7
+ contentType: z.ZodMiniLiteral<"text/html">;
8
+ data: z.ZodMiniString<string>;
9
+ }, z.core.$strip>;
10
+ export type HttpCallHtmlResult = z.infer<typeof HttpCallHtmlResultZod>;
9
11
  //# sourceMappingURL=HttpCallHtmlResult.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"HttpCallHtmlResult.d.ts","sourceRoot":"","sources":["../../../../src/Payload/types/HttpCallHtmlResult.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAElD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AAExD,MAAM,MAAM,kBAAkB,GAAG,OAAO,CACtC;IACE,IAAI,EAAE,IAAI,CAAA;IACV,WAAW,EAAE,WAAW,CAAA;IACxB,IAAI,EAAE,MAAM,CAAA;CACb,EACD,oBAAoB,CACrB,CAAA"}
1
+ {"version":3,"file":"HttpCallHtmlResult.d.ts","sourceRoot":"","sources":["../../../../src/Payload/types/HttpCallHtmlResult.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAI7B,eAAO,MAAM,qBAAqB;;;;;;;iBAIhC,CAAA;AAEF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA"}
@@ -1,12 +1,34 @@
1
- import type { Hash, JsonArray, JsonObject } from '@xylabs/sdk-js';
2
- import type { Payload } from '@xyo-network/sdk-js';
3
- import { HttpCallResultSchema } from '../Schema.ts';
1
+ import type { JsonArray, JsonObject } from '@xylabs/sdk-js';
2
+ import * as z from 'zod/mini';
4
3
  export type HttpCallJsonResultType = JsonArray | JsonObject;
5
- export type HttpCallJsonResult<T extends HttpCallJsonResultType = HttpCallJsonResultType> = Payload<{
6
- call: Hash;
7
- contentType: 'application/json';
4
+ export declare const HttpCallJsonResultZod: z.ZodMiniObject<{
5
+ schema: z.ZodMiniLiteral<string & {
6
+ readonly __schema: true;
7
+ }>;
8
+ call: z.ZodMiniPipe<z.ZodMiniString<string>, z.ZodMiniTransform<import("@xylabs/sdk-js").BrandedHash, string>>;
9
+ contentType: z.ZodMiniLiteral<"application/json">;
10
+ data: z.ZodMiniCustom<HttpCallJsonResultType, HttpCallJsonResultType>;
11
+ }, z.core.$strip>;
12
+ export type HttpCallJsonResult<T extends HttpCallJsonResultType = HttpCallJsonResultType> = Omit<z.infer<typeof HttpCallJsonResultZod>, 'data'> & {
8
13
  data: T;
9
- }, HttpCallResultSchema>;
14
+ };
10
15
  export declare const isHttpCallJsonResult: <T extends HttpCallJsonResultType = HttpCallJsonResultType>(x?: unknown) => x is HttpCallJsonResult<T>;
11
- export declare const asHttpCallJsonResult: import("@xylabs/sdk-js").AsTypeFunction<HttpCallJsonResult<HttpCallJsonResultType>>;
16
+ export declare const asHttpCallJsonResult: {
17
+ <T>(value: T): (T & {
18
+ schema: string & {
19
+ readonly __schema: true;
20
+ };
21
+ call: import("@xylabs/sdk-js").BrandedHash;
22
+ contentType: "application/json";
23
+ data: HttpCallJsonResultType;
24
+ }) | undefined;
25
+ <T>(value: T, assert: import("@xylabs/sdk-js").ZodFactoryConfig): T & {
26
+ schema: string & {
27
+ readonly __schema: true;
28
+ };
29
+ call: import("@xylabs/sdk-js").BrandedHash;
30
+ contentType: "application/json";
31
+ data: HttpCallJsonResultType;
32
+ };
33
+ };
12
34
  //# sourceMappingURL=HttpCallJsonResult.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"HttpCallJsonResult.d.ts","sourceRoot":"","sources":["../../../../src/Payload/types/HttpCallJsonResult.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,IAAI,EAAE,SAAS,EAAE,UAAU,EAC5B,MAAM,gBAAgB,CAAA;AAEvB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAGlD,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AAGnD,MAAM,MAAM,sBAAsB,GAAG,SAAS,GAAG,UAAU,CAAA;AAE3D,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,sBAAsB,GAAG,sBAAsB,IAAI,OAAO,CACjG;IACE,IAAI,EAAE,IAAI,CAAA;IACV,WAAW,EAAE,kBAAkB,CAAA;IAC/B,IAAI,EAAE,CAAC,CAAA;CACR,EACD,oBAAoB,CACrB,CAAA;AAED,eAAO,MAAM,oBAAoB,GAAI,CAAC,SAAS,sBAAsB,GAAG,sBAAsB,EAAE,IAAI,OAAO,KAAG,CAAC,IAAI,kBAAkB,CAAC,CAAC,CAEtI,CAAA;AACD,eAAO,MAAM,oBAAoB,qFAA+C,CAAA"}
1
+ {"version":3,"file":"HttpCallJsonResult.d.ts","sourceRoot":"","sources":["../../../../src/Payload/types/HttpCallJsonResult.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAK3D,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAI7B,MAAM,MAAM,sBAAsB,GAAG,SAAS,GAAG,UAAU,CAAA;AAE3D,eAAO,MAAM,qBAAqB;;;;;;;iBAIhC,CAAA;AAEF,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,sBAAsB,GAAG,sBAAsB,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,EAAE,MAAM,CAAC,GAAG;IAChJ,IAAI,EAAE,CAAC,CAAA;CACR,CAAA;AAID,eAAO,MAAM,oBAAoB,GAAI,CAAC,SAAS,sBAAsB,GAAG,sBAAsB,EAAE,IAAI,OAAO,KAAG,CAAC,IAAI,kBAAkB,CAAC,CAAC,CAC5H,CAAA;AACX,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;CAA8D,CAAA"}