@xyo-network/api-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 +638 -3
- package/dist/neutral/index.mjs +2 -2
- package/dist/neutral/index.mjs.map +1 -1
- package/package.json +13 -13
- package/src/Witness/Witness.ts +2 -2
- package/dist/neutral/Payload/Schema.d.ts +0 -5
- package/dist/neutral/Payload/Schema.d.ts.map +0 -1
- package/dist/neutral/Payload/identity/asApiCall.d.ts +0 -5
- package/dist/neutral/Payload/identity/asApiCall.d.ts.map +0 -1
- package/dist/neutral/Payload/identity/asApiCallBase64Result.d.ts +0 -20
- package/dist/neutral/Payload/identity/asApiCallBase64Result.d.ts.map +0 -1
- package/dist/neutral/Payload/identity/asApiCallResult.d.ts +0 -5
- package/dist/neutral/Payload/identity/asApiCallResult.d.ts.map +0 -1
- package/dist/neutral/Payload/identity/asApiCallXmlResult.d.ts +0 -20
- package/dist/neutral/Payload/identity/asApiCallXmlResult.d.ts.map +0 -1
- package/dist/neutral/Payload/identity/asApiUriCall.d.ts +0 -35
- package/dist/neutral/Payload/identity/asApiUriCall.d.ts.map +0 -1
- package/dist/neutral/Payload/identity/asApiUriTemplateCall.d.ts +0 -44
- package/dist/neutral/Payload/identity/asApiUriTemplateCall.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/isApiCall.d.ts +0 -3
- package/dist/neutral/Payload/identity/isApiCall.d.ts.map +0 -1
- package/dist/neutral/Payload/identity/isApiCallBase64Result.d.ts +0 -3
- package/dist/neutral/Payload/identity/isApiCallBase64Result.d.ts.map +0 -1
- package/dist/neutral/Payload/identity/isApiCallErrorResult.d.ts +0 -3
- package/dist/neutral/Payload/identity/isApiCallErrorResult.d.ts.map +0 -1
- package/dist/neutral/Payload/identity/isApiCallResult.d.ts +0 -3
- package/dist/neutral/Payload/identity/isApiCallResult.d.ts.map +0 -1
- package/dist/neutral/Payload/identity/isApiCallXmlResult.d.ts +0 -3
- package/dist/neutral/Payload/identity/isApiCallXmlResult.d.ts.map +0 -1
- package/dist/neutral/Payload/identity/isApiUriCall.d.ts +0 -3
- package/dist/neutral/Payload/identity/isApiUriCall.d.ts.map +0 -1
- package/dist/neutral/Payload/identity/isApiUriTemplateCall.d.ts +0 -3
- package/dist/neutral/Payload/identity/isApiUriTemplateCall.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/ApiCall.d.ts +0 -4
- package/dist/neutral/Payload/types/ApiCall.d.ts.map +0 -1
- package/dist/neutral/Payload/types/ApiCallBase64Result.d.ts +0 -11
- package/dist/neutral/Payload/types/ApiCallBase64Result.d.ts.map +0 -1
- package/dist/neutral/Payload/types/ApiCallErrorResult.d.ts +0 -9
- package/dist/neutral/Payload/types/ApiCallErrorResult.d.ts.map +0 -1
- package/dist/neutral/Payload/types/ApiCallFields.d.ts +0 -8
- package/dist/neutral/Payload/types/ApiCallFields.d.ts.map +0 -1
- package/dist/neutral/Payload/types/ApiCallJsonResult.d.ts +0 -103
- package/dist/neutral/Payload/types/ApiCallJsonResult.d.ts.map +0 -1
- package/dist/neutral/Payload/types/ApiCallResult.d.ts +0 -8
- package/dist/neutral/Payload/types/ApiCallResult.d.ts.map +0 -1
- package/dist/neutral/Payload/types/ApiCallXmlResult.d.ts +0 -9
- package/dist/neutral/Payload/types/ApiCallXmlResult.d.ts.map +0 -1
- package/dist/neutral/Payload/types/ApiUriCall.d.ts +0 -7
- package/dist/neutral/Payload/types/ApiUriCall.d.ts.map +0 -1
- package/dist/neutral/Payload/types/ApiUriTemplateCall.d.ts +0 -8
- package/dist/neutral/Payload/types/ApiUriTemplateCall.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/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 -14
- 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,638 @@
|
|
|
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 asApiCallPayload: {
|
|
13
|
+
<TType extends ApiCallPayload>(value: _store__xylabs_promise_npm_4_5_1_97d36b712b_package.AnyNonPromise, config?: _xylabs_object.TypeCheckConfig): TType | undefined;
|
|
14
|
+
<TType extends ApiCallPayload>(value: _store__xylabs_promise_npm_4_5_1_97d36b712b_package.AnyNonPromise, assert: _xylabs_object.StringOrAlertFunction<ApiCallPayload>, config?: _xylabs_object.TypeCheckConfig): TType;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
declare const asApiCallBase64Result: {
|
|
18
|
+
<TType extends _xylabs_object.DeepRestrictToStringKeys<{
|
|
19
|
+
schema: "network.xyo.api.call.result";
|
|
20
|
+
call: _xylabs_hex.Hash;
|
|
21
|
+
contentType: Exclude<Exclude<string, "application/json">, ApiCallXmlResult["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.api.call.result";
|
|
26
|
+
call: _xylabs_hex.Hash;
|
|
27
|
+
contentType: Exclude<Exclude<string, "application/json">, ApiCallXmlResult["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.api.call.result";
|
|
31
|
+
call: _xylabs_hex.Hash;
|
|
32
|
+
contentType: Exclude<Exclude<string, "application/json">, ApiCallXmlResult["contentType"]>;
|
|
33
|
+
data: string;
|
|
34
|
+
}>>, config?: _xylabs_object.TypeCheckConfig): TType;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
declare const asApiCallResult: {
|
|
38
|
+
<TType extends ApiCallResult>(value: _store__xylabs_promise_npm_4_5_1_97d36b712b_package.AnyNonPromise, config?: _xylabs_object.TypeCheckConfig): TType | undefined;
|
|
39
|
+
<TType extends ApiCallResult>(value: _store__xylabs_promise_npm_4_5_1_97d36b712b_package.AnyNonPromise, assert: _xylabs_object.StringOrAlertFunction<ApiCallResult>, config?: _xylabs_object.TypeCheckConfig): TType;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
declare const asApiCallXmlResult: {
|
|
43
|
+
<TType extends _xylabs_object.DeepRestrictToStringKeys<{
|
|
44
|
+
schema: "network.xyo.api.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.api.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.api.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 asApiUriCallPayload: {
|
|
63
|
+
<TType extends _xylabs_object.DeepRestrictToStringKeys<{
|
|
64
|
+
schema: "network.xyo.api.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.api.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.api.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 asApiUriTemplateCall: {
|
|
98
|
+
<TType extends _xylabs_object.DeepRestrictToStringKeys<{
|
|
99
|
+
schema: "network.xyo.api.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.api.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.api.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 ApiCallSchema = "network.xyo.api.call";
|
|
142
|
+
type ApiCallSchema = typeof ApiCallSchema;
|
|
143
|
+
declare const ApiCallResultSchema = "network.xyo.api.call.result";
|
|
144
|
+
type ApiCallResultSchema = typeof ApiCallResultSchema;
|
|
145
|
+
|
|
146
|
+
type Queries = Record<string, string>;
|
|
147
|
+
|
|
148
|
+
type Verb = 'get' | 'post';
|
|
149
|
+
|
|
150
|
+
interface ApiCallFields {
|
|
151
|
+
headers?: Record<string, string | undefined>;
|
|
152
|
+
queries?: Queries;
|
|
153
|
+
verb?: Verb;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
type ApiUriCallPayload = Payload<ApiCallFields & {
|
|
157
|
+
uri: string;
|
|
158
|
+
}, ApiCallSchema>;
|
|
159
|
+
|
|
160
|
+
type ApiUriTemplateCallPayload = Payload<ApiCallFields & {
|
|
161
|
+
params?: Record<string, string>;
|
|
162
|
+
uriTemplate?: string;
|
|
163
|
+
}, ApiCallSchema>;
|
|
164
|
+
|
|
165
|
+
type ApiCallPayload = ApiUriCallPayload | ApiUriTemplateCallPayload;
|
|
166
|
+
|
|
167
|
+
type ApiCallJsonResultType = JsonArray | JsonObject;
|
|
168
|
+
type ApiCallJsonResult<T extends ApiCallJsonResultType = ApiCallJsonResultType> = Payload<{
|
|
169
|
+
call: Hash;
|
|
170
|
+
contentType: 'application/json';
|
|
171
|
+
data: T;
|
|
172
|
+
}, ApiCallResultSchema>;
|
|
173
|
+
declare const isApiCallJsonResult: <T extends ApiCallJsonResultType = ApiCallJsonResultType>(x?: unknown | null) => x is ApiCallJsonResult<T>;
|
|
174
|
+
declare const asApiCallJsonResult: {
|
|
175
|
+
<TType extends _xylabs_object.DeepRestrictToStringKeys<{
|
|
176
|
+
schema: "network.xyo.api.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.api.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.api.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 ApiCallXmlResult = Payload<{
|
|
267
|
+
call: Hash;
|
|
268
|
+
contentType: 'application/xml' | 'text/xml';
|
|
269
|
+
data: string;
|
|
270
|
+
}, ApiCallResultSchema>;
|
|
271
|
+
|
|
272
|
+
type ApiCallBase64Result = Payload<{
|
|
273
|
+
call: Hash;
|
|
274
|
+
contentType: Exclude<Exclude<string, ApiCallJsonResult['contentType']>, ApiCallXmlResult['contentType']>;
|
|
275
|
+
data: string;
|
|
276
|
+
}, ApiCallResultSchema>;
|
|
277
|
+
|
|
278
|
+
interface HttpMeta {
|
|
279
|
+
code?: string;
|
|
280
|
+
status?: number;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
type ApiCallErrorResult = Payload<{
|
|
284
|
+
call: Hash;
|
|
285
|
+
http?: HttpMeta;
|
|
286
|
+
}, ApiCallResultSchema>;
|
|
287
|
+
|
|
288
|
+
type NewType = JsonObject;
|
|
289
|
+
type ApiCallResult<TJson extends JsonArray | JsonObject = JsonArray | NewType> = ApiCallBase64Result | ApiCallJsonResult<TJson> | ApiCallErrorResult;
|
|
290
|
+
|
|
291
|
+
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';
|
|
292
|
+
|
|
293
|
+
declare const isApiCallPayload: (x?: unknown | null) => x is ApiCallPayload;
|
|
294
|
+
|
|
295
|
+
declare const isApiCallBase64Result: (x?: unknown | null) => x is ApiCallBase64Result;
|
|
296
|
+
|
|
297
|
+
declare const isApiCallErrorResult: (value: unknown) => value is ApiCallErrorResult;
|
|
298
|
+
|
|
299
|
+
declare const isApiCallResult: (x?: unknown | null) => x is ApiCallResult;
|
|
300
|
+
|
|
301
|
+
declare const isApiCallXmlResult: (x?: unknown | null) => x is ApiCallXmlResult;
|
|
302
|
+
|
|
303
|
+
declare const isApiUriCallPayload: (value?: unknown) => value is ApiUriCallPayload;
|
|
304
|
+
|
|
305
|
+
declare const isApiUriTemplateCallPayload: (value?: unknown) => value is ApiUriTemplateCallPayload;
|
|
306
|
+
|
|
307
|
+
declare const ApiCallWitnessConfigSchema = "network.xyo.api.call.witness.config";
|
|
308
|
+
type ApiCallWitnessConfigSchema = typeof ApiCallWitnessConfigSchema;
|
|
309
|
+
|
|
310
|
+
type ApiCallWitnessConfigBase = WitnessConfig<{
|
|
311
|
+
accept?: MimeTypes;
|
|
312
|
+
headers?: Record<string, string | undefined>;
|
|
313
|
+
queries?: ApiCallPayload['queries'];
|
|
314
|
+
schema: ApiCallWitnessConfigSchema;
|
|
315
|
+
timeout?: number;
|
|
316
|
+
verb?: ApiCallPayload['verb'];
|
|
317
|
+
}>;
|
|
318
|
+
type ApiUriCallWitnessConfig = WitnessConfig<ApiCallWitnessConfigBase & {
|
|
319
|
+
uri: ApiUriCallPayload['uri'];
|
|
320
|
+
}>;
|
|
321
|
+
type ApiUriTemplateCallWitnessConfig = WitnessConfig<ApiCallWitnessConfigBase & {
|
|
322
|
+
params?: Record<string, string>;
|
|
323
|
+
uriTemplate: ApiUriTemplateCallPayload['uriTemplate'];
|
|
324
|
+
}>;
|
|
325
|
+
type ApiCallWitnessConfig = ApiUriCallWitnessConfig | ApiUriTemplateCallWitnessConfig | ApiCallWitnessConfigBase;
|
|
326
|
+
declare const isApiCallWitnessConfig: (x?: unknown | null) => x is ApiCallWitnessConfig;
|
|
327
|
+
declare const asApiCallWitnessConfig: {
|
|
328
|
+
<TType extends ApiCallWitnessConfig>(value: _store__xylabs_promise_npm_4_5_1_97d36b712b_package.AnyNonPromise, config?: _xylabs_object.TypeCheckConfig): TType | undefined;
|
|
329
|
+
<TType extends ApiCallWitnessConfig>(value: _store__xylabs_promise_npm_4_5_1_97d36b712b_package.AnyNonPromise, assert: _xylabs_object.StringOrAlertFunction<ApiCallWitnessConfig>, config?: _xylabs_object.TypeCheckConfig): TType;
|
|
330
|
+
};
|
|
331
|
+
declare const isApiUriCallWitnessConfig: (value?: unknown) => value is ApiUriCallWitnessConfig;
|
|
332
|
+
declare const asApiUriCallWitnessConfig: {
|
|
333
|
+
<TType extends _xylabs_object.DeepRestrictToStringKeys<{
|
|
334
|
+
schema: "network.xyo.api.call.witness.config";
|
|
335
|
+
headers?: {
|
|
336
|
+
[x: string]: string | undefined;
|
|
337
|
+
} | undefined;
|
|
338
|
+
queries?: {
|
|
339
|
+
[x: string]: string;
|
|
340
|
+
} | undefined;
|
|
341
|
+
verb?: Verb | undefined;
|
|
342
|
+
uri: ApiUriCallPayload["uri"];
|
|
343
|
+
readonly archiving?: {
|
|
344
|
+
readonly archivists?: string[] | undefined;
|
|
345
|
+
readonly queries?: string[] | undefined;
|
|
346
|
+
} | undefined;
|
|
347
|
+
readonly allowedQueries?: string[] | undefined;
|
|
348
|
+
readonly archivist?: _store__xyo_network_module_model_npm_3_8_5_6e76fd3a27_package.ModuleIdentifier | undefined;
|
|
349
|
+
readonly consoleLogger?: _store__xylabs_logger_npm_4_5_1_a411051254_package.LogLevel | undefined;
|
|
350
|
+
readonly labels?: {
|
|
351
|
+
[x: string]: string | undefined;
|
|
352
|
+
} | undefined;
|
|
353
|
+
readonly name?: _store__xyo_network_module_model_npm_3_8_5_6e76fd3a27_package.ModuleName | undefined;
|
|
354
|
+
readonly paging?: {
|
|
355
|
+
[x: string]: {
|
|
356
|
+
size?: number | undefined;
|
|
357
|
+
};
|
|
358
|
+
} | undefined;
|
|
359
|
+
readonly retry?: {
|
|
360
|
+
backoff?: number | undefined;
|
|
361
|
+
interval?: number | undefined;
|
|
362
|
+
retries?: number | undefined;
|
|
363
|
+
} | undefined;
|
|
364
|
+
readonly security?: {
|
|
365
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
366
|
+
readonly allowed?: {
|
|
367
|
+
[x: string]: (Lowercase<string> | Lowercase<string>[])[];
|
|
368
|
+
} | undefined;
|
|
369
|
+
readonly disallowed?: {
|
|
370
|
+
[x: string]: Lowercase<string>[];
|
|
371
|
+
} | undefined;
|
|
372
|
+
} | undefined;
|
|
373
|
+
readonly sign?: boolean | undefined;
|
|
374
|
+
readonly storeQueries?: boolean | undefined;
|
|
375
|
+
readonly timestamp?: boolean | undefined;
|
|
376
|
+
accept?: MimeTypes | undefined;
|
|
377
|
+
timeout?: number | undefined;
|
|
378
|
+
}>>(value: _store__xylabs_promise_npm_4_5_1_97d36b712b_package.AnyNonPromise, config?: _xylabs_object.TypeCheckConfig): TType | undefined;
|
|
379
|
+
<TType extends _xylabs_object.DeepRestrictToStringKeys<{
|
|
380
|
+
schema: "network.xyo.api.call.witness.config";
|
|
381
|
+
headers?: {
|
|
382
|
+
[x: string]: string | undefined;
|
|
383
|
+
} | undefined;
|
|
384
|
+
queries?: {
|
|
385
|
+
[x: string]: string;
|
|
386
|
+
} | undefined;
|
|
387
|
+
verb?: Verb | undefined;
|
|
388
|
+
uri: ApiUriCallPayload["uri"];
|
|
389
|
+
readonly archiving?: {
|
|
390
|
+
readonly archivists?: string[] | undefined;
|
|
391
|
+
readonly queries?: string[] | undefined;
|
|
392
|
+
} | undefined;
|
|
393
|
+
readonly allowedQueries?: string[] | undefined;
|
|
394
|
+
readonly archivist?: _store__xyo_network_module_model_npm_3_8_5_6e76fd3a27_package.ModuleIdentifier | undefined;
|
|
395
|
+
readonly consoleLogger?: _store__xylabs_logger_npm_4_5_1_a411051254_package.LogLevel | undefined;
|
|
396
|
+
readonly labels?: {
|
|
397
|
+
[x: string]: string | undefined;
|
|
398
|
+
} | undefined;
|
|
399
|
+
readonly name?: _store__xyo_network_module_model_npm_3_8_5_6e76fd3a27_package.ModuleName | undefined;
|
|
400
|
+
readonly paging?: {
|
|
401
|
+
[x: string]: {
|
|
402
|
+
size?: number | undefined;
|
|
403
|
+
};
|
|
404
|
+
} | undefined;
|
|
405
|
+
readonly retry?: {
|
|
406
|
+
backoff?: number | undefined;
|
|
407
|
+
interval?: number | undefined;
|
|
408
|
+
retries?: number | undefined;
|
|
409
|
+
} | undefined;
|
|
410
|
+
readonly security?: {
|
|
411
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
412
|
+
readonly allowed?: {
|
|
413
|
+
[x: string]: (Lowercase<string> | Lowercase<string>[])[];
|
|
414
|
+
} | undefined;
|
|
415
|
+
readonly disallowed?: {
|
|
416
|
+
[x: string]: Lowercase<string>[];
|
|
417
|
+
} | undefined;
|
|
418
|
+
} | undefined;
|
|
419
|
+
readonly sign?: boolean | undefined;
|
|
420
|
+
readonly storeQueries?: boolean | undefined;
|
|
421
|
+
readonly timestamp?: boolean | undefined;
|
|
422
|
+
accept?: MimeTypes | undefined;
|
|
423
|
+
timeout?: number | undefined;
|
|
424
|
+
}>>(value: _store__xylabs_promise_npm_4_5_1_97d36b712b_package.AnyNonPromise, assert: _xylabs_object.StringOrAlertFunction<_xylabs_object.DeepRestrictToStringKeys<{
|
|
425
|
+
schema: "network.xyo.api.call.witness.config";
|
|
426
|
+
headers?: {
|
|
427
|
+
[x: string]: string | undefined;
|
|
428
|
+
} | undefined;
|
|
429
|
+
queries?: {
|
|
430
|
+
[x: string]: string;
|
|
431
|
+
} | undefined;
|
|
432
|
+
verb?: Verb | undefined;
|
|
433
|
+
uri: ApiUriCallPayload["uri"];
|
|
434
|
+
readonly archiving?: {
|
|
435
|
+
readonly archivists?: string[] | undefined;
|
|
436
|
+
readonly queries?: string[] | undefined;
|
|
437
|
+
} | undefined;
|
|
438
|
+
readonly allowedQueries?: string[] | undefined;
|
|
439
|
+
readonly archivist?: _store__xyo_network_module_model_npm_3_8_5_6e76fd3a27_package.ModuleIdentifier | undefined;
|
|
440
|
+
readonly consoleLogger?: _store__xylabs_logger_npm_4_5_1_a411051254_package.LogLevel | undefined;
|
|
441
|
+
readonly labels?: {
|
|
442
|
+
[x: string]: string | undefined;
|
|
443
|
+
} | undefined;
|
|
444
|
+
readonly name?: _store__xyo_network_module_model_npm_3_8_5_6e76fd3a27_package.ModuleName | undefined;
|
|
445
|
+
readonly paging?: {
|
|
446
|
+
[x: string]: {
|
|
447
|
+
size?: number | undefined;
|
|
448
|
+
};
|
|
449
|
+
} | undefined;
|
|
450
|
+
readonly retry?: {
|
|
451
|
+
backoff?: number | undefined;
|
|
452
|
+
interval?: number | undefined;
|
|
453
|
+
retries?: number | undefined;
|
|
454
|
+
} | undefined;
|
|
455
|
+
readonly security?: {
|
|
456
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
457
|
+
readonly allowed?: {
|
|
458
|
+
[x: string]: (Lowercase<string> | Lowercase<string>[])[];
|
|
459
|
+
} | undefined;
|
|
460
|
+
readonly disallowed?: {
|
|
461
|
+
[x: string]: Lowercase<string>[];
|
|
462
|
+
} | undefined;
|
|
463
|
+
} | undefined;
|
|
464
|
+
readonly sign?: boolean | undefined;
|
|
465
|
+
readonly storeQueries?: boolean | undefined;
|
|
466
|
+
readonly timestamp?: boolean | undefined;
|
|
467
|
+
accept?: MimeTypes | undefined;
|
|
468
|
+
timeout?: number | undefined;
|
|
469
|
+
}>>, config?: _xylabs_object.TypeCheckConfig): TType;
|
|
470
|
+
};
|
|
471
|
+
declare const isApiUriTemplateCallWitnessConfig: (value?: unknown) => value is ApiUriTemplateCallWitnessConfig;
|
|
472
|
+
declare const asApiUriTemplateCallWitnessConfig: {
|
|
473
|
+
<TType extends _xylabs_object.DeepRestrictToStringKeys<{
|
|
474
|
+
schema: "network.xyo.api.call.witness.config";
|
|
475
|
+
headers?: {
|
|
476
|
+
[x: string]: string | undefined;
|
|
477
|
+
} | undefined;
|
|
478
|
+
queries?: {
|
|
479
|
+
[x: string]: string;
|
|
480
|
+
} | undefined;
|
|
481
|
+
verb?: Verb | undefined;
|
|
482
|
+
params?: {
|
|
483
|
+
[x: string]: string;
|
|
484
|
+
} | undefined;
|
|
485
|
+
uriTemplate: ApiUriTemplateCallPayload["uriTemplate"];
|
|
486
|
+
readonly archiving?: {
|
|
487
|
+
readonly archivists?: string[] | undefined;
|
|
488
|
+
readonly queries?: string[] | undefined;
|
|
489
|
+
} | undefined;
|
|
490
|
+
readonly allowedQueries?: string[] | undefined;
|
|
491
|
+
readonly archivist?: _store__xyo_network_module_model_npm_3_8_5_6e76fd3a27_package.ModuleIdentifier | undefined;
|
|
492
|
+
readonly consoleLogger?: _store__xylabs_logger_npm_4_5_1_a411051254_package.LogLevel | undefined;
|
|
493
|
+
readonly labels?: {
|
|
494
|
+
[x: string]: string | undefined;
|
|
495
|
+
} | undefined;
|
|
496
|
+
readonly name?: _store__xyo_network_module_model_npm_3_8_5_6e76fd3a27_package.ModuleName | undefined;
|
|
497
|
+
readonly paging?: {
|
|
498
|
+
[x: string]: {
|
|
499
|
+
size?: number | undefined;
|
|
500
|
+
};
|
|
501
|
+
} | undefined;
|
|
502
|
+
readonly retry?: {
|
|
503
|
+
backoff?: number | undefined;
|
|
504
|
+
interval?: number | undefined;
|
|
505
|
+
retries?: number | undefined;
|
|
506
|
+
} | undefined;
|
|
507
|
+
readonly security?: {
|
|
508
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
509
|
+
readonly allowed?: {
|
|
510
|
+
[x: string]: (Lowercase<string> | Lowercase<string>[])[];
|
|
511
|
+
} | undefined;
|
|
512
|
+
readonly disallowed?: {
|
|
513
|
+
[x: string]: Lowercase<string>[];
|
|
514
|
+
} | undefined;
|
|
515
|
+
} | undefined;
|
|
516
|
+
readonly sign?: boolean | undefined;
|
|
517
|
+
readonly storeQueries?: boolean | undefined;
|
|
518
|
+
readonly timestamp?: boolean | undefined;
|
|
519
|
+
accept?: MimeTypes | undefined;
|
|
520
|
+
timeout?: number | undefined;
|
|
521
|
+
}>>(value: _store__xylabs_promise_npm_4_5_1_97d36b712b_package.AnyNonPromise, config?: _xylabs_object.TypeCheckConfig): TType | undefined;
|
|
522
|
+
<TType extends _xylabs_object.DeepRestrictToStringKeys<{
|
|
523
|
+
schema: "network.xyo.api.call.witness.config";
|
|
524
|
+
headers?: {
|
|
525
|
+
[x: string]: string | undefined;
|
|
526
|
+
} | undefined;
|
|
527
|
+
queries?: {
|
|
528
|
+
[x: string]: string;
|
|
529
|
+
} | undefined;
|
|
530
|
+
verb?: Verb | undefined;
|
|
531
|
+
params?: {
|
|
532
|
+
[x: string]: string;
|
|
533
|
+
} | undefined;
|
|
534
|
+
uriTemplate: ApiUriTemplateCallPayload["uriTemplate"];
|
|
535
|
+
readonly archiving?: {
|
|
536
|
+
readonly archivists?: string[] | undefined;
|
|
537
|
+
readonly queries?: string[] | undefined;
|
|
538
|
+
} | undefined;
|
|
539
|
+
readonly allowedQueries?: string[] | undefined;
|
|
540
|
+
readonly archivist?: _store__xyo_network_module_model_npm_3_8_5_6e76fd3a27_package.ModuleIdentifier | undefined;
|
|
541
|
+
readonly consoleLogger?: _store__xylabs_logger_npm_4_5_1_a411051254_package.LogLevel | undefined;
|
|
542
|
+
readonly labels?: {
|
|
543
|
+
[x: string]: string | undefined;
|
|
544
|
+
} | undefined;
|
|
545
|
+
readonly name?: _store__xyo_network_module_model_npm_3_8_5_6e76fd3a27_package.ModuleName | undefined;
|
|
546
|
+
readonly paging?: {
|
|
547
|
+
[x: string]: {
|
|
548
|
+
size?: number | undefined;
|
|
549
|
+
};
|
|
550
|
+
} | undefined;
|
|
551
|
+
readonly retry?: {
|
|
552
|
+
backoff?: number | undefined;
|
|
553
|
+
interval?: number | undefined;
|
|
554
|
+
retries?: number | undefined;
|
|
555
|
+
} | undefined;
|
|
556
|
+
readonly security?: {
|
|
557
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
558
|
+
readonly allowed?: {
|
|
559
|
+
[x: string]: (Lowercase<string> | Lowercase<string>[])[];
|
|
560
|
+
} | undefined;
|
|
561
|
+
readonly disallowed?: {
|
|
562
|
+
[x: string]: Lowercase<string>[];
|
|
563
|
+
} | undefined;
|
|
564
|
+
} | undefined;
|
|
565
|
+
readonly sign?: boolean | undefined;
|
|
566
|
+
readonly storeQueries?: boolean | undefined;
|
|
567
|
+
readonly timestamp?: boolean | undefined;
|
|
568
|
+
accept?: MimeTypes | undefined;
|
|
569
|
+
timeout?: number | undefined;
|
|
570
|
+
}>>(value: _store__xylabs_promise_npm_4_5_1_97d36b712b_package.AnyNonPromise, assert: _xylabs_object.StringOrAlertFunction<_xylabs_object.DeepRestrictToStringKeys<{
|
|
571
|
+
schema: "network.xyo.api.call.witness.config";
|
|
572
|
+
headers?: {
|
|
573
|
+
[x: string]: string | undefined;
|
|
574
|
+
} | undefined;
|
|
575
|
+
queries?: {
|
|
576
|
+
[x: string]: string;
|
|
577
|
+
} | undefined;
|
|
578
|
+
verb?: Verb | undefined;
|
|
579
|
+
params?: {
|
|
580
|
+
[x: string]: string;
|
|
581
|
+
} | undefined;
|
|
582
|
+
uriTemplate: ApiUriTemplateCallPayload["uriTemplate"];
|
|
583
|
+
readonly archiving?: {
|
|
584
|
+
readonly archivists?: string[] | undefined;
|
|
585
|
+
readonly queries?: string[] | undefined;
|
|
586
|
+
} | undefined;
|
|
587
|
+
readonly allowedQueries?: string[] | undefined;
|
|
588
|
+
readonly archivist?: _store__xyo_network_module_model_npm_3_8_5_6e76fd3a27_package.ModuleIdentifier | undefined;
|
|
589
|
+
readonly consoleLogger?: _store__xylabs_logger_npm_4_5_1_a411051254_package.LogLevel | undefined;
|
|
590
|
+
readonly labels?: {
|
|
591
|
+
[x: string]: string | undefined;
|
|
592
|
+
} | undefined;
|
|
593
|
+
readonly name?: _store__xyo_network_module_model_npm_3_8_5_6e76fd3a27_package.ModuleName | undefined;
|
|
594
|
+
readonly paging?: {
|
|
595
|
+
[x: string]: {
|
|
596
|
+
size?: number | undefined;
|
|
597
|
+
};
|
|
598
|
+
} | undefined;
|
|
599
|
+
readonly retry?: {
|
|
600
|
+
backoff?: number | undefined;
|
|
601
|
+
interval?: number | undefined;
|
|
602
|
+
retries?: number | undefined;
|
|
603
|
+
} | undefined;
|
|
604
|
+
readonly security?: {
|
|
605
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
606
|
+
readonly allowed?: {
|
|
607
|
+
[x: string]: (Lowercase<string> | Lowercase<string>[])[];
|
|
608
|
+
} | undefined;
|
|
609
|
+
readonly disallowed?: {
|
|
610
|
+
[x: string]: Lowercase<string>[];
|
|
611
|
+
} | undefined;
|
|
612
|
+
} | undefined;
|
|
613
|
+
readonly sign?: boolean | undefined;
|
|
614
|
+
readonly storeQueries?: boolean | undefined;
|
|
615
|
+
readonly timestamp?: boolean | undefined;
|
|
616
|
+
accept?: MimeTypes | undefined;
|
|
617
|
+
timeout?: number | undefined;
|
|
618
|
+
}>>, config?: _xylabs_object.TypeCheckConfig): TType;
|
|
619
|
+
};
|
|
620
|
+
|
|
621
|
+
type ApiCallWitnessParams = WitnessParams<ApiCallWitnessConfig, {
|
|
622
|
+
headers?: Record<string, string | undefined>;
|
|
623
|
+
ipfsGateway?: string;
|
|
624
|
+
}>;
|
|
625
|
+
|
|
626
|
+
declare class ApiCallWitness<TParams extends ApiCallWitnessParams = ApiCallWitnessParams> extends AbstractWitness<TParams, ApiCallPayload, ApiCallResult> {
|
|
627
|
+
static readonly configSchemas: Schema[];
|
|
628
|
+
static readonly defaultConfigSchema: Schema;
|
|
629
|
+
get accept(): MimeTypes;
|
|
630
|
+
get ipfsGateway(): string | undefined;
|
|
631
|
+
get timeout(): number | undefined;
|
|
632
|
+
getFullUri(call?: ApiCallPayload): string;
|
|
633
|
+
getHeaders(headers?: Record<string, string | undefined>): Record<string, string | undefined>;
|
|
634
|
+
protected observeHandler(inPayloads?: ApiCallPayload[]): Promise<ApiCallResult[]>;
|
|
635
|
+
private httpGet;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
export { type ApiCallBase64Result, type ApiCallErrorResult, type ApiCallFields, type ApiCallJsonResult, type ApiCallJsonResultType, type ApiCallPayload, type ApiCallResult, ApiCallResultSchema, ApiCallSchema, ApiCallWitness, type ApiCallWitnessConfig, type ApiCallWitnessConfigBase, ApiCallWitnessConfigSchema, type ApiCallWitnessParams, type ApiCallXmlResult, type ApiUriCallPayload, type ApiUriCallWitnessConfig, type ApiUriTemplateCallPayload, type ApiUriTemplateCallWitnessConfig, type HttpMeta, type MimeTypes, type Queries, type Verb, asApiCallBase64Result, asApiCallJsonResult, asApiCallPayload, asApiCallResult, asApiCallWitnessConfig, asApiCallXmlResult, asApiUriCallPayload, asApiUriCallWitnessConfig, asApiUriTemplateCall, asApiUriTemplateCallWitnessConfig, isApiCallBase64Result, isApiCallErrorResult, isApiCallJsonResult, isApiCallPayload, isApiCallResult, isApiCallWitnessConfig, isApiCallXmlResult, isApiUriCallPayload, isApiUriCallWitnessConfig, isApiUriTemplateCallPayload, isApiUriTemplateCallWitnessConfig };
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -178,7 +178,7 @@ var ApiCallWitness = class extends AbstractWitness {
|
|
|
178
178
|
}
|
|
179
179
|
if (url) {
|
|
180
180
|
const queries = Object.entries({ ...configQueries, ...callQueries });
|
|
181
|
-
|
|
181
|
+
for (let [key, value] of queries) url?.searchParams.set(key, value);
|
|
182
182
|
return url.href;
|
|
183
183
|
}
|
|
184
184
|
throw new Error("Unable to determine uri. No uri/uriTemplate specified in either the call or config.");
|
|
@@ -218,7 +218,7 @@ var ApiCallWitness = class extends AbstractWitness {
|
|
|
218
218
|
throw error;
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
|
-
// eslint-disable-next-line complexity
|
|
221
|
+
// eslint-disable-next-line complexity, sonarjs/cognitive-complexity
|
|
222
222
|
async httpGet(url, call, headers) {
|
|
223
223
|
const result = {
|
|
224
224
|
call,
|