@xyo-network/http-call-witness 3.4.0 → 3.4.1
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/index.d.ts +644 -3
- package/dist/neutral/index.mjs +3 -1
- package/dist/neutral/index.mjs.map +1 -1
- package/package.json +14 -14
- package/src/Witness/Witness.ts +3 -1
- package/dist/neutral/Payload/Schema.d.ts +0 -5
- package/dist/neutral/Payload/Schema.d.ts.map +0 -1
- package/dist/neutral/Payload/identity/asHttpCall.d.ts +0 -5
- package/dist/neutral/Payload/identity/asHttpCall.d.ts.map +0 -1
- package/dist/neutral/Payload/identity/asHttpCallBase64Result.d.ts +0 -20
- package/dist/neutral/Payload/identity/asHttpCallBase64Result.d.ts.map +0 -1
- package/dist/neutral/Payload/identity/asHttpCallResult.d.ts +0 -5
- package/dist/neutral/Payload/identity/asHttpCallResult.d.ts.map +0 -1
- package/dist/neutral/Payload/identity/asHttpCallXmlResult.d.ts +0 -20
- package/dist/neutral/Payload/identity/asHttpCallXmlResult.d.ts.map +0 -1
- package/dist/neutral/Payload/identity/asHttpUriCall.d.ts +0 -35
- package/dist/neutral/Payload/identity/asHttpUriCall.d.ts.map +0 -1
- package/dist/neutral/Payload/identity/asHttpUriTemplateCall.d.ts +0 -44
- package/dist/neutral/Payload/identity/asHttpUriTemplateCall.d.ts.map +0 -1
- package/dist/neutral/Payload/identity/index.d.ts +0 -14
- package/dist/neutral/Payload/identity/index.d.ts.map +0 -1
- package/dist/neutral/Payload/identity/isHttpCall.d.ts +0 -3
- package/dist/neutral/Payload/identity/isHttpCall.d.ts.map +0 -1
- package/dist/neutral/Payload/identity/isHttpCallBase64Result.d.ts +0 -3
- package/dist/neutral/Payload/identity/isHttpCallBase64Result.d.ts.map +0 -1
- package/dist/neutral/Payload/identity/isHttpCallErrorResult.d.ts +0 -3
- package/dist/neutral/Payload/identity/isHttpCallErrorResult.d.ts.map +0 -1
- package/dist/neutral/Payload/identity/isHttpCallResult.d.ts +0 -3
- package/dist/neutral/Payload/identity/isHttpCallResult.d.ts.map +0 -1
- package/dist/neutral/Payload/identity/isHttpCallXmlResult.d.ts +0 -3
- package/dist/neutral/Payload/identity/isHttpCallXmlResult.d.ts.map +0 -1
- package/dist/neutral/Payload/identity/isHttpUriCall.d.ts +0 -3
- package/dist/neutral/Payload/identity/isHttpUriCall.d.ts.map +0 -1
- package/dist/neutral/Payload/identity/isHttpUriTemplateCall.d.ts +0 -3
- package/dist/neutral/Payload/identity/isHttpUriTemplateCall.d.ts.map +0 -1
- package/dist/neutral/Payload/index.d.ts +0 -4
- package/dist/neutral/Payload/index.d.ts.map +0 -1
- package/dist/neutral/Payload/types/HttpCall.d.ts +0 -4
- package/dist/neutral/Payload/types/HttpCall.d.ts.map +0 -1
- package/dist/neutral/Payload/types/HttpCallBase64Result.d.ts +0 -11
- package/dist/neutral/Payload/types/HttpCallBase64Result.d.ts.map +0 -1
- package/dist/neutral/Payload/types/HttpCallErrorResult.d.ts +0 -9
- package/dist/neutral/Payload/types/HttpCallErrorResult.d.ts.map +0 -1
- package/dist/neutral/Payload/types/HttpCallFields.d.ts +0 -8
- package/dist/neutral/Payload/types/HttpCallFields.d.ts.map +0 -1
- package/dist/neutral/Payload/types/HttpCallHtmlResult.d.ts +0 -9
- package/dist/neutral/Payload/types/HttpCallHtmlResult.d.ts.map +0 -1
- package/dist/neutral/Payload/types/HttpCallJsonResult.d.ts +0 -103
- package/dist/neutral/Payload/types/HttpCallJsonResult.d.ts.map +0 -1
- package/dist/neutral/Payload/types/HttpCallResult.d.ts +0 -8
- package/dist/neutral/Payload/types/HttpCallResult.d.ts.map +0 -1
- package/dist/neutral/Payload/types/HttpCallXmlResult.d.ts +0 -9
- package/dist/neutral/Payload/types/HttpCallXmlResult.d.ts.map +0 -1
- package/dist/neutral/Payload/types/HttpMeta.d.ts +0 -5
- package/dist/neutral/Payload/types/HttpMeta.d.ts.map +0 -1
- package/dist/neutral/Payload/types/HttpUriCall.d.ts +0 -7
- package/dist/neutral/Payload/types/HttpUriCall.d.ts.map +0 -1
- package/dist/neutral/Payload/types/HttpUriTemplateCall.d.ts +0 -8
- package/dist/neutral/Payload/types/HttpUriTemplateCall.d.ts.map +0 -1
- package/dist/neutral/Payload/types/MimeTypes.d.ts +0 -2
- package/dist/neutral/Payload/types/MimeTypes.d.ts.map +0 -1
- package/dist/neutral/Payload/types/Queries.d.ts +0 -2
- package/dist/neutral/Payload/types/Queries.d.ts.map +0 -1
- package/dist/neutral/Payload/types/Verb.d.ts +0 -2
- package/dist/neutral/Payload/types/Verb.d.ts.map +0 -1
- package/dist/neutral/Payload/types/index.d.ts +0 -15
- package/dist/neutral/Payload/types/index.d.ts.map +0 -1
- package/dist/neutral/Witness/Config.d.ts +0 -314
- package/dist/neutral/Witness/Config.d.ts.map +0 -1
- package/dist/neutral/Witness/Params.d.ts +0 -7
- package/dist/neutral/Witness/Params.d.ts.map +0 -1
- package/dist/neutral/Witness/Schema.d.ts +0 -3
- package/dist/neutral/Witness/Schema.d.ts.map +0 -1
- package/dist/neutral/Witness/Witness.d.ts +0 -16
- package/dist/neutral/Witness/Witness.d.ts.map +0 -1
- package/dist/neutral/Witness/index.d.ts +0 -5
- package/dist/neutral/Witness/index.d.ts.map +0 -1
- package/dist/neutral/index.d.ts.map +0 -1
- package/dist/neutral/lib/checkIpfsUrl.d.ts +0 -8
- package/dist/neutral/lib/checkIpfsUrl.d.ts.map +0 -1
- package/dist/neutral/lib/index.d.ts +0 -2
- package/dist/neutral/lib/index.d.ts.map +0 -1
package/dist/neutral/index.d.ts
CHANGED
|
@@ -1,3 +1,644 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import * as _xylabs_object from '@xylabs/object';
|
|
2
|
+
import { JsonArray, JsonObject } from '@xylabs/object';
|
|
3
|
+
import * as _store__xylabs_promise_npm_4_5_1_97d36b712b_package from '.store/@xylabs-promise-npm-4.5.1-97d36b712b/package';
|
|
4
|
+
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
5
|
+
import * as _xylabs_hex from '@xylabs/hex';
|
|
6
|
+
import { Hash } from '@xylabs/hex';
|
|
7
|
+
import * as _store__xylabs_logger_npm_4_5_1_a411051254_package from '.store/@xylabs-logger-npm-4.5.1-a411051254/package';
|
|
8
|
+
import * as _store__xyo_network_module_model_npm_3_8_5_6e76fd3a27_package from '.store/@xyo-network-module-model-npm-3.8.5-6e76fd3a27/package';
|
|
9
|
+
import { WitnessConfig, WitnessParams } from '@xyo-network/witness-model';
|
|
10
|
+
import { AbstractWitness } from '@xyo-network/abstract-witness';
|
|
11
|
+
|
|
12
|
+
declare const asApiCall: {
|
|
13
|
+
<TType extends HttpCall>(value: _store__xylabs_promise_npm_4_5_1_97d36b712b_package.AnyNonPromise, config?: _xylabs_object.TypeCheckConfig): TType | undefined;
|
|
14
|
+
<TType extends HttpCall>(value: _store__xylabs_promise_npm_4_5_1_97d36b712b_package.AnyNonPromise, assert: _xylabs_object.StringOrAlertFunction<HttpCall>, config?: _xylabs_object.TypeCheckConfig): TType;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
declare const asHttpCallBase64Result: {
|
|
18
|
+
<TType extends _xylabs_object.DeepRestrictToStringKeys<{
|
|
19
|
+
schema: "network.xyo.http.call.result";
|
|
20
|
+
call: _xylabs_hex.Hash;
|
|
21
|
+
contentType: Exclude<Exclude<string, "application/json">, HttpCallXmlResult["contentType"]>;
|
|
22
|
+
data: string;
|
|
23
|
+
}>>(value: _store__xylabs_promise_npm_4_5_1_97d36b712b_package.AnyNonPromise, config?: _xylabs_object.TypeCheckConfig): TType | undefined;
|
|
24
|
+
<TType extends _xylabs_object.DeepRestrictToStringKeys<{
|
|
25
|
+
schema: "network.xyo.http.call.result";
|
|
26
|
+
call: _xylabs_hex.Hash;
|
|
27
|
+
contentType: Exclude<Exclude<string, "application/json">, HttpCallXmlResult["contentType"]>;
|
|
28
|
+
data: string;
|
|
29
|
+
}>>(value: _store__xylabs_promise_npm_4_5_1_97d36b712b_package.AnyNonPromise, assert: _xylabs_object.StringOrAlertFunction<_xylabs_object.DeepRestrictToStringKeys<{
|
|
30
|
+
schema: "network.xyo.http.call.result";
|
|
31
|
+
call: _xylabs_hex.Hash;
|
|
32
|
+
contentType: Exclude<Exclude<string, "application/json">, HttpCallXmlResult["contentType"]>;
|
|
33
|
+
data: string;
|
|
34
|
+
}>>, config?: _xylabs_object.TypeCheckConfig): TType;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
declare const asHttpCallResult: {
|
|
38
|
+
<TType extends HttpCallResult>(value: _store__xylabs_promise_npm_4_5_1_97d36b712b_package.AnyNonPromise, config?: _xylabs_object.TypeCheckConfig): TType | undefined;
|
|
39
|
+
<TType extends HttpCallResult>(value: _store__xylabs_promise_npm_4_5_1_97d36b712b_package.AnyNonPromise, assert: _xylabs_object.StringOrAlertFunction<HttpCallResult>, config?: _xylabs_object.TypeCheckConfig): TType;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
declare const asHttpCallXmlResult: {
|
|
43
|
+
<TType extends _xylabs_object.DeepRestrictToStringKeys<{
|
|
44
|
+
schema: "network.xyo.http.call.result";
|
|
45
|
+
call: _xylabs_hex.Hash;
|
|
46
|
+
contentType: "application/xml" | "text/xml";
|
|
47
|
+
data: string;
|
|
48
|
+
}>>(value: _store__xylabs_promise_npm_4_5_1_97d36b712b_package.AnyNonPromise, config?: _xylabs_object.TypeCheckConfig): TType | undefined;
|
|
49
|
+
<TType extends _xylabs_object.DeepRestrictToStringKeys<{
|
|
50
|
+
schema: "network.xyo.http.call.result";
|
|
51
|
+
call: _xylabs_hex.Hash;
|
|
52
|
+
contentType: "application/xml" | "text/xml";
|
|
53
|
+
data: string;
|
|
54
|
+
}>>(value: _store__xylabs_promise_npm_4_5_1_97d36b712b_package.AnyNonPromise, assert: _xylabs_object.StringOrAlertFunction<_xylabs_object.DeepRestrictToStringKeys<{
|
|
55
|
+
schema: "network.xyo.http.call.result";
|
|
56
|
+
call: _xylabs_hex.Hash;
|
|
57
|
+
contentType: "application/xml" | "text/xml";
|
|
58
|
+
data: string;
|
|
59
|
+
}>>, config?: _xylabs_object.TypeCheckConfig): TType;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
declare const asHttpUriCall: {
|
|
63
|
+
<TType extends _xylabs_object.DeepRestrictToStringKeys<{
|
|
64
|
+
schema: "network.xyo.http.call";
|
|
65
|
+
headers?: {
|
|
66
|
+
[x: string]: string | undefined;
|
|
67
|
+
} | undefined;
|
|
68
|
+
queries?: {
|
|
69
|
+
[x: string]: string;
|
|
70
|
+
} | undefined;
|
|
71
|
+
verb?: Verb | undefined;
|
|
72
|
+
uri: string;
|
|
73
|
+
}>>(value: _store__xylabs_promise_npm_4_5_1_97d36b712b_package.AnyNonPromise, config?: _xylabs_object.TypeCheckConfig): TType | undefined;
|
|
74
|
+
<TType extends _xylabs_object.DeepRestrictToStringKeys<{
|
|
75
|
+
schema: "network.xyo.http.call";
|
|
76
|
+
headers?: {
|
|
77
|
+
[x: string]: string | undefined;
|
|
78
|
+
} | undefined;
|
|
79
|
+
queries?: {
|
|
80
|
+
[x: string]: string;
|
|
81
|
+
} | undefined;
|
|
82
|
+
verb?: Verb | undefined;
|
|
83
|
+
uri: string;
|
|
84
|
+
}>>(value: _store__xylabs_promise_npm_4_5_1_97d36b712b_package.AnyNonPromise, assert: _xylabs_object.StringOrAlertFunction<_xylabs_object.DeepRestrictToStringKeys<{
|
|
85
|
+
schema: "network.xyo.http.call";
|
|
86
|
+
headers?: {
|
|
87
|
+
[x: string]: string | undefined;
|
|
88
|
+
} | undefined;
|
|
89
|
+
queries?: {
|
|
90
|
+
[x: string]: string;
|
|
91
|
+
} | undefined;
|
|
92
|
+
verb?: Verb | undefined;
|
|
93
|
+
uri: string;
|
|
94
|
+
}>>, config?: _xylabs_object.TypeCheckConfig): TType;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
declare const asHttpUriTemplateCall: {
|
|
98
|
+
<TType extends _xylabs_object.DeepRestrictToStringKeys<{
|
|
99
|
+
schema: "network.xyo.http.call";
|
|
100
|
+
headers?: {
|
|
101
|
+
[x: string]: string | undefined;
|
|
102
|
+
} | undefined;
|
|
103
|
+
queries?: {
|
|
104
|
+
[x: string]: string;
|
|
105
|
+
} | undefined;
|
|
106
|
+
verb?: Verb | undefined;
|
|
107
|
+
params?: {
|
|
108
|
+
[x: string]: string;
|
|
109
|
+
} | undefined;
|
|
110
|
+
uriTemplate?: string | undefined;
|
|
111
|
+
}>>(value: _store__xylabs_promise_npm_4_5_1_97d36b712b_package.AnyNonPromise, config?: _xylabs_object.TypeCheckConfig): TType | undefined;
|
|
112
|
+
<TType extends _xylabs_object.DeepRestrictToStringKeys<{
|
|
113
|
+
schema: "network.xyo.http.call";
|
|
114
|
+
headers?: {
|
|
115
|
+
[x: string]: string | undefined;
|
|
116
|
+
} | undefined;
|
|
117
|
+
queries?: {
|
|
118
|
+
[x: string]: string;
|
|
119
|
+
} | undefined;
|
|
120
|
+
verb?: Verb | undefined;
|
|
121
|
+
params?: {
|
|
122
|
+
[x: string]: string;
|
|
123
|
+
} | undefined;
|
|
124
|
+
uriTemplate?: string | undefined;
|
|
125
|
+
}>>(value: _store__xylabs_promise_npm_4_5_1_97d36b712b_package.AnyNonPromise, assert: _xylabs_object.StringOrAlertFunction<_xylabs_object.DeepRestrictToStringKeys<{
|
|
126
|
+
schema: "network.xyo.http.call";
|
|
127
|
+
headers?: {
|
|
128
|
+
[x: string]: string | undefined;
|
|
129
|
+
} | undefined;
|
|
130
|
+
queries?: {
|
|
131
|
+
[x: string]: string;
|
|
132
|
+
} | undefined;
|
|
133
|
+
verb?: Verb | undefined;
|
|
134
|
+
params?: {
|
|
135
|
+
[x: string]: string;
|
|
136
|
+
} | undefined;
|
|
137
|
+
uriTemplate?: string | undefined;
|
|
138
|
+
}>>, config?: _xylabs_object.TypeCheckConfig): TType;
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
declare const HttpCallSchema = "network.xyo.http.call";
|
|
142
|
+
type HttpCallSchema = typeof HttpCallSchema;
|
|
143
|
+
declare const HttpCallResultSchema = "network.xyo.http.call.result";
|
|
144
|
+
type HttpCallResultSchema = typeof HttpCallResultSchema;
|
|
145
|
+
|
|
146
|
+
type Queries = Record<string, string>;
|
|
147
|
+
|
|
148
|
+
type Verb = 'get' | 'post';
|
|
149
|
+
|
|
150
|
+
interface HttpCallFields {
|
|
151
|
+
headers?: Record<string, string | undefined>;
|
|
152
|
+
queries?: Queries;
|
|
153
|
+
verb?: Verb;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
type HttpUriCall = Payload<HttpCallFields & {
|
|
157
|
+
uri: string;
|
|
158
|
+
}, HttpCallSchema>;
|
|
159
|
+
|
|
160
|
+
type HttpUriTemplateCall = Payload<HttpCallFields & {
|
|
161
|
+
params?: Record<string, string>;
|
|
162
|
+
uriTemplate?: string;
|
|
163
|
+
}, HttpCallSchema>;
|
|
164
|
+
|
|
165
|
+
type HttpCall = HttpUriCall | HttpUriTemplateCall;
|
|
166
|
+
|
|
167
|
+
type HttpCallJsonResultType = JsonArray | JsonObject;
|
|
168
|
+
type HttpCallJsonResult<T extends HttpCallJsonResultType = HttpCallJsonResultType> = Payload<{
|
|
169
|
+
call: Hash;
|
|
170
|
+
contentType: 'application/json';
|
|
171
|
+
data: T;
|
|
172
|
+
}, HttpCallResultSchema>;
|
|
173
|
+
declare const isHttpCallJsonResult: <T extends HttpCallJsonResultType = HttpCallJsonResultType>(x?: unknown | null) => x is HttpCallJsonResult<T>;
|
|
174
|
+
declare const asHttpCallJsonResult: {
|
|
175
|
+
<TType extends _xylabs_object.DeepRestrictToStringKeys<{
|
|
176
|
+
schema: "network.xyo.http.call.result";
|
|
177
|
+
call: Hash;
|
|
178
|
+
contentType: "application/json";
|
|
179
|
+
data: {
|
|
180
|
+
[x: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
181
|
+
} | (string | number | boolean | {
|
|
182
|
+
[x: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
183
|
+
} | (string | number | boolean | {
|
|
184
|
+
[x: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
185
|
+
} | (string | number | boolean | {
|
|
186
|
+
[x: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
187
|
+
} | (string | number | boolean | {
|
|
188
|
+
[x: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
189
|
+
} | (string | number | boolean | {
|
|
190
|
+
[x: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
191
|
+
} | (string | number | boolean | {
|
|
192
|
+
[x: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
193
|
+
} | (string | number | boolean | {
|
|
194
|
+
[x: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null;
|
|
195
|
+
} | (string | number | boolean | {
|
|
196
|
+
[x: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null;
|
|
197
|
+
} | (string | number | boolean | {
|
|
198
|
+
[x: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null;
|
|
199
|
+
} | (string | number | boolean | {
|
|
200
|
+
[x: string]: string | number | boolean | any | (string | number | boolean | any | any | null)[] | null;
|
|
201
|
+
} | (string | number | boolean | {
|
|
202
|
+
[x: string]: string | number | boolean | any | any | null;
|
|
203
|
+
} | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[];
|
|
204
|
+
}>>(value: _store__xylabs_promise_npm_4_5_1_97d36b712b_package.AnyNonPromise, config?: _xylabs_object.TypeCheckConfig): TType | undefined;
|
|
205
|
+
<TType extends _xylabs_object.DeepRestrictToStringKeys<{
|
|
206
|
+
schema: "network.xyo.http.call.result";
|
|
207
|
+
call: Hash;
|
|
208
|
+
contentType: "application/json";
|
|
209
|
+
data: {
|
|
210
|
+
[x: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
211
|
+
} | (string | number | boolean | {
|
|
212
|
+
[x: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
213
|
+
} | (string | number | boolean | {
|
|
214
|
+
[x: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
215
|
+
} | (string | number | boolean | {
|
|
216
|
+
[x: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
217
|
+
} | (string | number | boolean | {
|
|
218
|
+
[x: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
219
|
+
} | (string | number | boolean | {
|
|
220
|
+
[x: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
221
|
+
} | (string | number | boolean | {
|
|
222
|
+
[x: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
223
|
+
} | (string | number | boolean | {
|
|
224
|
+
[x: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null;
|
|
225
|
+
} | (string | number | boolean | {
|
|
226
|
+
[x: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null;
|
|
227
|
+
} | (string | number | boolean | {
|
|
228
|
+
[x: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null;
|
|
229
|
+
} | (string | number | boolean | {
|
|
230
|
+
[x: string]: string | number | boolean | any | (string | number | boolean | any | any | null)[] | null;
|
|
231
|
+
} | (string | number | boolean | {
|
|
232
|
+
[x: string]: string | number | boolean | any | any | null;
|
|
233
|
+
} | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[];
|
|
234
|
+
}>>(value: _store__xylabs_promise_npm_4_5_1_97d36b712b_package.AnyNonPromise, assert: _xylabs_object.StringOrAlertFunction<_xylabs_object.DeepRestrictToStringKeys<{
|
|
235
|
+
schema: "network.xyo.http.call.result";
|
|
236
|
+
call: Hash;
|
|
237
|
+
contentType: "application/json";
|
|
238
|
+
data: {
|
|
239
|
+
[x: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
240
|
+
} | (string | number | boolean | {
|
|
241
|
+
[x: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
242
|
+
} | (string | number | boolean | {
|
|
243
|
+
[x: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
244
|
+
} | (string | number | boolean | {
|
|
245
|
+
[x: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
246
|
+
} | (string | number | boolean | {
|
|
247
|
+
[x: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
248
|
+
} | (string | number | boolean | {
|
|
249
|
+
[x: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
250
|
+
} | (string | number | boolean | {
|
|
251
|
+
[x: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
252
|
+
} | (string | number | boolean | {
|
|
253
|
+
[x: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null;
|
|
254
|
+
} | (string | number | boolean | {
|
|
255
|
+
[x: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null;
|
|
256
|
+
} | (string | number | boolean | {
|
|
257
|
+
[x: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null;
|
|
258
|
+
} | (string | number | boolean | {
|
|
259
|
+
[x: string]: string | number | boolean | any | (string | number | boolean | any | any | null)[] | null;
|
|
260
|
+
} | (string | number | boolean | {
|
|
261
|
+
[x: string]: string | number | boolean | any | any | null;
|
|
262
|
+
} | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[];
|
|
263
|
+
}>>, config?: _xylabs_object.TypeCheckConfig): TType;
|
|
264
|
+
};
|
|
265
|
+
|
|
266
|
+
type HttpCallXmlResult = Payload<{
|
|
267
|
+
call: Hash;
|
|
268
|
+
contentType: 'application/xml' | 'text/xml';
|
|
269
|
+
data: string;
|
|
270
|
+
}, HttpCallResultSchema>;
|
|
271
|
+
|
|
272
|
+
type HttpCallBase64Result = Payload<{
|
|
273
|
+
call: Hash;
|
|
274
|
+
contentType: Exclude<Exclude<string, HttpCallJsonResult['contentType']>, HttpCallXmlResult['contentType']>;
|
|
275
|
+
data: string;
|
|
276
|
+
}, HttpCallResultSchema>;
|
|
277
|
+
|
|
278
|
+
interface HttpMeta {
|
|
279
|
+
code?: string;
|
|
280
|
+
status?: number;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
type HttpCallErrorResult = Payload<{
|
|
284
|
+
call: Hash;
|
|
285
|
+
http?: HttpMeta;
|
|
286
|
+
}, HttpCallResultSchema>;
|
|
287
|
+
|
|
288
|
+
type HttpCallHtmlResult = Payload<{
|
|
289
|
+
call: Hash;
|
|
290
|
+
contentType: 'text/html';
|
|
291
|
+
data: string;
|
|
292
|
+
}, HttpCallResultSchema>;
|
|
293
|
+
|
|
294
|
+
type NewType = JsonObject;
|
|
295
|
+
type HttpCallResult<TJson extends JsonArray | JsonObject = JsonArray | NewType> = HttpCallBase64Result | HttpCallJsonResult<TJson> | HttpCallErrorResult;
|
|
296
|
+
|
|
297
|
+
type MimeTypes = 'application/json' | 'application/octet-stream' | 'application/pdf' | 'application/xhtml+xml' | 'application/xml' | 'image/gif' | 'image/jpeg' | 'image/png' | 'text/html' | 'text/plain' | 'text/xml';
|
|
298
|
+
|
|
299
|
+
declare const isHttpCall: (x?: unknown | null) => x is HttpCall;
|
|
300
|
+
|
|
301
|
+
declare const isHttpCallBase64Result: (x?: unknown | null) => x is HttpCallBase64Result;
|
|
302
|
+
|
|
303
|
+
declare const isHttpCallErrorResult: (value: unknown) => value is HttpCallErrorResult;
|
|
304
|
+
|
|
305
|
+
declare const isHttpCallResult: (x?: unknown | null) => x is HttpCallResult;
|
|
306
|
+
|
|
307
|
+
declare const isHttpCallXmlResult: (x?: unknown | null) => x is HttpCallXmlResult;
|
|
308
|
+
|
|
309
|
+
declare const isHttpUriCall: (value?: unknown) => value is HttpUriCall;
|
|
310
|
+
|
|
311
|
+
declare const isHttpUriTemplateCall: (value?: unknown) => value is HttpUriTemplateCall;
|
|
312
|
+
|
|
313
|
+
declare const HttpCallWitnessConfigSchema = "network.xyo.http.call.witness.config";
|
|
314
|
+
type HttpCallWitnessConfigSchema = typeof HttpCallWitnessConfigSchema;
|
|
315
|
+
|
|
316
|
+
type HttpCallWitnessConfigBase = WitnessConfig<{
|
|
317
|
+
accept?: MimeTypes;
|
|
318
|
+
headers?: Record<string, string | undefined>;
|
|
319
|
+
queries?: HttpCall['queries'];
|
|
320
|
+
schema: HttpCallWitnessConfigSchema;
|
|
321
|
+
timeout?: number;
|
|
322
|
+
verb?: HttpCall['verb'];
|
|
323
|
+
}>;
|
|
324
|
+
type HttpUriCallWitnessConfig = WitnessConfig<HttpCallWitnessConfigBase & {
|
|
325
|
+
uri: HttpUriCall['uri'];
|
|
326
|
+
}>;
|
|
327
|
+
type HttpUriTemplateCallWitnessConfig = WitnessConfig<HttpCallWitnessConfigBase & {
|
|
328
|
+
params?: Record<string, string>;
|
|
329
|
+
uriTemplate: HttpUriTemplateCall['uriTemplate'];
|
|
330
|
+
}>;
|
|
331
|
+
type HttpCallWitnessConfig = HttpUriCallWitnessConfig | HttpUriTemplateCallWitnessConfig | HttpCallWitnessConfigBase;
|
|
332
|
+
declare const isHttpCallWitnessConfig: (x?: unknown | null) => x is HttpCallWitnessConfig;
|
|
333
|
+
declare const asHttpCallWitnessConfig: {
|
|
334
|
+
<TType extends HttpCallWitnessConfig>(value: _store__xylabs_promise_npm_4_5_1_97d36b712b_package.AnyNonPromise, config?: _xylabs_object.TypeCheckConfig): TType | undefined;
|
|
335
|
+
<TType extends HttpCallWitnessConfig>(value: _store__xylabs_promise_npm_4_5_1_97d36b712b_package.AnyNonPromise, assert: _xylabs_object.StringOrAlertFunction<HttpCallWitnessConfig>, config?: _xylabs_object.TypeCheckConfig): TType;
|
|
336
|
+
};
|
|
337
|
+
declare const isHttpUriCallWitnessConfig: (value?: unknown) => value is HttpUriCallWitnessConfig;
|
|
338
|
+
declare const asHttpUriCallWitnessConfig: {
|
|
339
|
+
<TType extends _xylabs_object.DeepRestrictToStringKeys<{
|
|
340
|
+
schema: "network.xyo.http.call.witness.config";
|
|
341
|
+
headers?: {
|
|
342
|
+
[x: string]: string | undefined;
|
|
343
|
+
} | undefined;
|
|
344
|
+
queries?: {
|
|
345
|
+
[x: string]: string;
|
|
346
|
+
} | undefined;
|
|
347
|
+
verb?: Verb | undefined;
|
|
348
|
+
uri: HttpUriCall["uri"];
|
|
349
|
+
readonly archiving?: {
|
|
350
|
+
readonly archivists?: string[] | undefined;
|
|
351
|
+
readonly queries?: string[] | undefined;
|
|
352
|
+
} | undefined;
|
|
353
|
+
readonly allowedQueries?: string[] | undefined;
|
|
354
|
+
readonly archivist?: _store__xyo_network_module_model_npm_3_8_5_6e76fd3a27_package.ModuleIdentifier | undefined;
|
|
355
|
+
readonly consoleLogger?: _store__xylabs_logger_npm_4_5_1_a411051254_package.LogLevel | undefined;
|
|
356
|
+
readonly labels?: {
|
|
357
|
+
[x: string]: string | undefined;
|
|
358
|
+
} | undefined;
|
|
359
|
+
readonly name?: _store__xyo_network_module_model_npm_3_8_5_6e76fd3a27_package.ModuleName | undefined;
|
|
360
|
+
readonly paging?: {
|
|
361
|
+
[x: string]: {
|
|
362
|
+
size?: number | undefined;
|
|
363
|
+
};
|
|
364
|
+
} | undefined;
|
|
365
|
+
readonly retry?: {
|
|
366
|
+
backoff?: number | undefined;
|
|
367
|
+
interval?: number | undefined;
|
|
368
|
+
retries?: number | undefined;
|
|
369
|
+
} | undefined;
|
|
370
|
+
readonly security?: {
|
|
371
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
372
|
+
readonly allowed?: {
|
|
373
|
+
[x: string]: (Lowercase<string> | Lowercase<string>[])[];
|
|
374
|
+
} | undefined;
|
|
375
|
+
readonly disallowed?: {
|
|
376
|
+
[x: string]: Lowercase<string>[];
|
|
377
|
+
} | undefined;
|
|
378
|
+
} | undefined;
|
|
379
|
+
readonly sign?: boolean | undefined;
|
|
380
|
+
readonly storeQueries?: boolean | undefined;
|
|
381
|
+
readonly timestamp?: boolean | undefined;
|
|
382
|
+
accept?: MimeTypes | undefined;
|
|
383
|
+
timeout?: number | undefined;
|
|
384
|
+
}>>(value: _store__xylabs_promise_npm_4_5_1_97d36b712b_package.AnyNonPromise, config?: _xylabs_object.TypeCheckConfig): TType | undefined;
|
|
385
|
+
<TType extends _xylabs_object.DeepRestrictToStringKeys<{
|
|
386
|
+
schema: "network.xyo.http.call.witness.config";
|
|
387
|
+
headers?: {
|
|
388
|
+
[x: string]: string | undefined;
|
|
389
|
+
} | undefined;
|
|
390
|
+
queries?: {
|
|
391
|
+
[x: string]: string;
|
|
392
|
+
} | undefined;
|
|
393
|
+
verb?: Verb | undefined;
|
|
394
|
+
uri: HttpUriCall["uri"];
|
|
395
|
+
readonly archiving?: {
|
|
396
|
+
readonly archivists?: string[] | undefined;
|
|
397
|
+
readonly queries?: string[] | undefined;
|
|
398
|
+
} | undefined;
|
|
399
|
+
readonly allowedQueries?: string[] | undefined;
|
|
400
|
+
readonly archivist?: _store__xyo_network_module_model_npm_3_8_5_6e76fd3a27_package.ModuleIdentifier | undefined;
|
|
401
|
+
readonly consoleLogger?: _store__xylabs_logger_npm_4_5_1_a411051254_package.LogLevel | undefined;
|
|
402
|
+
readonly labels?: {
|
|
403
|
+
[x: string]: string | undefined;
|
|
404
|
+
} | undefined;
|
|
405
|
+
readonly name?: _store__xyo_network_module_model_npm_3_8_5_6e76fd3a27_package.ModuleName | undefined;
|
|
406
|
+
readonly paging?: {
|
|
407
|
+
[x: string]: {
|
|
408
|
+
size?: number | undefined;
|
|
409
|
+
};
|
|
410
|
+
} | undefined;
|
|
411
|
+
readonly retry?: {
|
|
412
|
+
backoff?: number | undefined;
|
|
413
|
+
interval?: number | undefined;
|
|
414
|
+
retries?: number | undefined;
|
|
415
|
+
} | undefined;
|
|
416
|
+
readonly security?: {
|
|
417
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
418
|
+
readonly allowed?: {
|
|
419
|
+
[x: string]: (Lowercase<string> | Lowercase<string>[])[];
|
|
420
|
+
} | undefined;
|
|
421
|
+
readonly disallowed?: {
|
|
422
|
+
[x: string]: Lowercase<string>[];
|
|
423
|
+
} | undefined;
|
|
424
|
+
} | undefined;
|
|
425
|
+
readonly sign?: boolean | undefined;
|
|
426
|
+
readonly storeQueries?: boolean | undefined;
|
|
427
|
+
readonly timestamp?: boolean | undefined;
|
|
428
|
+
accept?: MimeTypes | undefined;
|
|
429
|
+
timeout?: number | undefined;
|
|
430
|
+
}>>(value: _store__xylabs_promise_npm_4_5_1_97d36b712b_package.AnyNonPromise, assert: _xylabs_object.StringOrAlertFunction<_xylabs_object.DeepRestrictToStringKeys<{
|
|
431
|
+
schema: "network.xyo.http.call.witness.config";
|
|
432
|
+
headers?: {
|
|
433
|
+
[x: string]: string | undefined;
|
|
434
|
+
} | undefined;
|
|
435
|
+
queries?: {
|
|
436
|
+
[x: string]: string;
|
|
437
|
+
} | undefined;
|
|
438
|
+
verb?: Verb | undefined;
|
|
439
|
+
uri: HttpUriCall["uri"];
|
|
440
|
+
readonly archiving?: {
|
|
441
|
+
readonly archivists?: string[] | undefined;
|
|
442
|
+
readonly queries?: string[] | undefined;
|
|
443
|
+
} | undefined;
|
|
444
|
+
readonly allowedQueries?: string[] | undefined;
|
|
445
|
+
readonly archivist?: _store__xyo_network_module_model_npm_3_8_5_6e76fd3a27_package.ModuleIdentifier | undefined;
|
|
446
|
+
readonly consoleLogger?: _store__xylabs_logger_npm_4_5_1_a411051254_package.LogLevel | undefined;
|
|
447
|
+
readonly labels?: {
|
|
448
|
+
[x: string]: string | undefined;
|
|
449
|
+
} | undefined;
|
|
450
|
+
readonly name?: _store__xyo_network_module_model_npm_3_8_5_6e76fd3a27_package.ModuleName | undefined;
|
|
451
|
+
readonly paging?: {
|
|
452
|
+
[x: string]: {
|
|
453
|
+
size?: number | undefined;
|
|
454
|
+
};
|
|
455
|
+
} | undefined;
|
|
456
|
+
readonly retry?: {
|
|
457
|
+
backoff?: number | undefined;
|
|
458
|
+
interval?: number | undefined;
|
|
459
|
+
retries?: number | undefined;
|
|
460
|
+
} | undefined;
|
|
461
|
+
readonly security?: {
|
|
462
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
463
|
+
readonly allowed?: {
|
|
464
|
+
[x: string]: (Lowercase<string> | Lowercase<string>[])[];
|
|
465
|
+
} | undefined;
|
|
466
|
+
readonly disallowed?: {
|
|
467
|
+
[x: string]: Lowercase<string>[];
|
|
468
|
+
} | undefined;
|
|
469
|
+
} | undefined;
|
|
470
|
+
readonly sign?: boolean | undefined;
|
|
471
|
+
readonly storeQueries?: boolean | undefined;
|
|
472
|
+
readonly timestamp?: boolean | undefined;
|
|
473
|
+
accept?: MimeTypes | undefined;
|
|
474
|
+
timeout?: number | undefined;
|
|
475
|
+
}>>, config?: _xylabs_object.TypeCheckConfig): TType;
|
|
476
|
+
};
|
|
477
|
+
declare const isHttpUriTemplateCallWitnessConfig: (value?: unknown) => value is HttpUriTemplateCallWitnessConfig;
|
|
478
|
+
declare const asHttpUriTemplateCallWitnessConfig: {
|
|
479
|
+
<TType extends _xylabs_object.DeepRestrictToStringKeys<{
|
|
480
|
+
schema: "network.xyo.http.call.witness.config";
|
|
481
|
+
headers?: {
|
|
482
|
+
[x: string]: string | undefined;
|
|
483
|
+
} | undefined;
|
|
484
|
+
queries?: {
|
|
485
|
+
[x: string]: string;
|
|
486
|
+
} | undefined;
|
|
487
|
+
verb?: Verb | undefined;
|
|
488
|
+
params?: {
|
|
489
|
+
[x: string]: string;
|
|
490
|
+
} | undefined;
|
|
491
|
+
uriTemplate: HttpUriTemplateCall["uriTemplate"];
|
|
492
|
+
readonly archiving?: {
|
|
493
|
+
readonly archivists?: string[] | undefined;
|
|
494
|
+
readonly queries?: string[] | undefined;
|
|
495
|
+
} | undefined;
|
|
496
|
+
readonly allowedQueries?: string[] | undefined;
|
|
497
|
+
readonly archivist?: _store__xyo_network_module_model_npm_3_8_5_6e76fd3a27_package.ModuleIdentifier | undefined;
|
|
498
|
+
readonly consoleLogger?: _store__xylabs_logger_npm_4_5_1_a411051254_package.LogLevel | undefined;
|
|
499
|
+
readonly labels?: {
|
|
500
|
+
[x: string]: string | undefined;
|
|
501
|
+
} | undefined;
|
|
502
|
+
readonly name?: _store__xyo_network_module_model_npm_3_8_5_6e76fd3a27_package.ModuleName | undefined;
|
|
503
|
+
readonly paging?: {
|
|
504
|
+
[x: string]: {
|
|
505
|
+
size?: number | undefined;
|
|
506
|
+
};
|
|
507
|
+
} | undefined;
|
|
508
|
+
readonly retry?: {
|
|
509
|
+
backoff?: number | undefined;
|
|
510
|
+
interval?: number | undefined;
|
|
511
|
+
retries?: number | undefined;
|
|
512
|
+
} | undefined;
|
|
513
|
+
readonly security?: {
|
|
514
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
515
|
+
readonly allowed?: {
|
|
516
|
+
[x: string]: (Lowercase<string> | Lowercase<string>[])[];
|
|
517
|
+
} | undefined;
|
|
518
|
+
readonly disallowed?: {
|
|
519
|
+
[x: string]: Lowercase<string>[];
|
|
520
|
+
} | undefined;
|
|
521
|
+
} | undefined;
|
|
522
|
+
readonly sign?: boolean | undefined;
|
|
523
|
+
readonly storeQueries?: boolean | undefined;
|
|
524
|
+
readonly timestamp?: boolean | undefined;
|
|
525
|
+
accept?: MimeTypes | undefined;
|
|
526
|
+
timeout?: number | undefined;
|
|
527
|
+
}>>(value: _store__xylabs_promise_npm_4_5_1_97d36b712b_package.AnyNonPromise, config?: _xylabs_object.TypeCheckConfig): TType | undefined;
|
|
528
|
+
<TType extends _xylabs_object.DeepRestrictToStringKeys<{
|
|
529
|
+
schema: "network.xyo.http.call.witness.config";
|
|
530
|
+
headers?: {
|
|
531
|
+
[x: string]: string | undefined;
|
|
532
|
+
} | undefined;
|
|
533
|
+
queries?: {
|
|
534
|
+
[x: string]: string;
|
|
535
|
+
} | undefined;
|
|
536
|
+
verb?: Verb | undefined;
|
|
537
|
+
params?: {
|
|
538
|
+
[x: string]: string;
|
|
539
|
+
} | undefined;
|
|
540
|
+
uriTemplate: HttpUriTemplateCall["uriTemplate"];
|
|
541
|
+
readonly archiving?: {
|
|
542
|
+
readonly archivists?: string[] | undefined;
|
|
543
|
+
readonly queries?: string[] | undefined;
|
|
544
|
+
} | undefined;
|
|
545
|
+
readonly allowedQueries?: string[] | undefined;
|
|
546
|
+
readonly archivist?: _store__xyo_network_module_model_npm_3_8_5_6e76fd3a27_package.ModuleIdentifier | undefined;
|
|
547
|
+
readonly consoleLogger?: _store__xylabs_logger_npm_4_5_1_a411051254_package.LogLevel | undefined;
|
|
548
|
+
readonly labels?: {
|
|
549
|
+
[x: string]: string | undefined;
|
|
550
|
+
} | undefined;
|
|
551
|
+
readonly name?: _store__xyo_network_module_model_npm_3_8_5_6e76fd3a27_package.ModuleName | undefined;
|
|
552
|
+
readonly paging?: {
|
|
553
|
+
[x: string]: {
|
|
554
|
+
size?: number | undefined;
|
|
555
|
+
};
|
|
556
|
+
} | undefined;
|
|
557
|
+
readonly retry?: {
|
|
558
|
+
backoff?: number | undefined;
|
|
559
|
+
interval?: number | undefined;
|
|
560
|
+
retries?: number | undefined;
|
|
561
|
+
} | undefined;
|
|
562
|
+
readonly security?: {
|
|
563
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
564
|
+
readonly allowed?: {
|
|
565
|
+
[x: string]: (Lowercase<string> | Lowercase<string>[])[];
|
|
566
|
+
} | undefined;
|
|
567
|
+
readonly disallowed?: {
|
|
568
|
+
[x: string]: Lowercase<string>[];
|
|
569
|
+
} | undefined;
|
|
570
|
+
} | undefined;
|
|
571
|
+
readonly sign?: boolean | undefined;
|
|
572
|
+
readonly storeQueries?: boolean | undefined;
|
|
573
|
+
readonly timestamp?: boolean | undefined;
|
|
574
|
+
accept?: MimeTypes | undefined;
|
|
575
|
+
timeout?: number | undefined;
|
|
576
|
+
}>>(value: _store__xylabs_promise_npm_4_5_1_97d36b712b_package.AnyNonPromise, assert: _xylabs_object.StringOrAlertFunction<_xylabs_object.DeepRestrictToStringKeys<{
|
|
577
|
+
schema: "network.xyo.http.call.witness.config";
|
|
578
|
+
headers?: {
|
|
579
|
+
[x: string]: string | undefined;
|
|
580
|
+
} | undefined;
|
|
581
|
+
queries?: {
|
|
582
|
+
[x: string]: string;
|
|
583
|
+
} | undefined;
|
|
584
|
+
verb?: Verb | undefined;
|
|
585
|
+
params?: {
|
|
586
|
+
[x: string]: string;
|
|
587
|
+
} | undefined;
|
|
588
|
+
uriTemplate: HttpUriTemplateCall["uriTemplate"];
|
|
589
|
+
readonly archiving?: {
|
|
590
|
+
readonly archivists?: string[] | undefined;
|
|
591
|
+
readonly queries?: string[] | undefined;
|
|
592
|
+
} | undefined;
|
|
593
|
+
readonly allowedQueries?: string[] | undefined;
|
|
594
|
+
readonly archivist?: _store__xyo_network_module_model_npm_3_8_5_6e76fd3a27_package.ModuleIdentifier | undefined;
|
|
595
|
+
readonly consoleLogger?: _store__xylabs_logger_npm_4_5_1_a411051254_package.LogLevel | undefined;
|
|
596
|
+
readonly labels?: {
|
|
597
|
+
[x: string]: string | undefined;
|
|
598
|
+
} | undefined;
|
|
599
|
+
readonly name?: _store__xyo_network_module_model_npm_3_8_5_6e76fd3a27_package.ModuleName | undefined;
|
|
600
|
+
readonly paging?: {
|
|
601
|
+
[x: string]: {
|
|
602
|
+
size?: number | undefined;
|
|
603
|
+
};
|
|
604
|
+
} | undefined;
|
|
605
|
+
readonly retry?: {
|
|
606
|
+
backoff?: number | undefined;
|
|
607
|
+
interval?: number | undefined;
|
|
608
|
+
retries?: number | undefined;
|
|
609
|
+
} | undefined;
|
|
610
|
+
readonly security?: {
|
|
611
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
612
|
+
readonly allowed?: {
|
|
613
|
+
[x: string]: (Lowercase<string> | Lowercase<string>[])[];
|
|
614
|
+
} | undefined;
|
|
615
|
+
readonly disallowed?: {
|
|
616
|
+
[x: string]: Lowercase<string>[];
|
|
617
|
+
} | undefined;
|
|
618
|
+
} | undefined;
|
|
619
|
+
readonly sign?: boolean | undefined;
|
|
620
|
+
readonly storeQueries?: boolean | undefined;
|
|
621
|
+
readonly timestamp?: boolean | undefined;
|
|
622
|
+
accept?: MimeTypes | undefined;
|
|
623
|
+
timeout?: number | undefined;
|
|
624
|
+
}>>, config?: _xylabs_object.TypeCheckConfig): TType;
|
|
625
|
+
};
|
|
626
|
+
|
|
627
|
+
type HttpCallWitnessParams = WitnessParams<HttpCallWitnessConfig, {
|
|
628
|
+
headers?: Record<string, string | undefined>;
|
|
629
|
+
ipfsGateway?: string;
|
|
630
|
+
}>;
|
|
631
|
+
|
|
632
|
+
declare class HttpCallWitness<TParams extends HttpCallWitnessParams = HttpCallWitnessParams> extends AbstractWitness<TParams, HttpCall, HttpCallResult> {
|
|
633
|
+
static readonly configSchemas: Schema[];
|
|
634
|
+
static readonly defaultConfigSchema: Schema;
|
|
635
|
+
get accept(): MimeTypes;
|
|
636
|
+
get ipfsGateway(): string | undefined;
|
|
637
|
+
get timeout(): number | undefined;
|
|
638
|
+
getFullUri(call?: HttpCall): string;
|
|
639
|
+
getHeaders(headers?: Record<string, string | undefined>): Record<string, string | undefined>;
|
|
640
|
+
protected observeHandler(inPayloads?: HttpCall[]): Promise<HttpCallResult[]>;
|
|
641
|
+
private httpGet;
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
export { type HttpCall, type HttpCallBase64Result, type HttpCallErrorResult, type HttpCallFields, type HttpCallHtmlResult, type HttpCallJsonResult, type HttpCallJsonResultType, type HttpCallResult, HttpCallResultSchema, HttpCallSchema, HttpCallWitness, type HttpCallWitnessConfig, type HttpCallWitnessConfigBase, HttpCallWitnessConfigSchema, type HttpCallWitnessParams, type HttpCallXmlResult, type HttpMeta, type HttpUriCall, type HttpUriCallWitnessConfig, type HttpUriTemplateCall, type HttpUriTemplateCallWitnessConfig, type MimeTypes, type Queries, type Verb, asApiCall, asHttpCallBase64Result, asHttpCallJsonResult, asHttpCallResult, asHttpCallWitnessConfig, asHttpCallXmlResult, asHttpUriCall, asHttpUriCallWitnessConfig, asHttpUriTemplateCall, asHttpUriTemplateCallWitnessConfig, isHttpCall, isHttpCallBase64Result, isHttpCallErrorResult, isHttpCallJsonResult, isHttpCallResult, isHttpCallWitnessConfig, isHttpCallXmlResult, isHttpUriCall, isHttpUriCallWitnessConfig, isHttpUriTemplateCall, isHttpUriTemplateCallWitnessConfig };
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -179,7 +179,9 @@ var HttpCallWitness = class extends AbstractWitness {
|
|
|
179
179
|
}
|
|
180
180
|
if (url) {
|
|
181
181
|
const queries = Object.entries({ ...configQueries, ...callQueries });
|
|
182
|
-
|
|
182
|
+
for (let [key, value] of queries) {
|
|
183
|
+
url?.searchParams.set(key, value);
|
|
184
|
+
}
|
|
183
185
|
return url.href;
|
|
184
186
|
}
|
|
185
187
|
throw new Error("Unable to determine uri. No uri/uriTemplate specified in either the call or config.");
|