bitbadgesjs-sdk 0.3.192 → 0.3.194

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.
@@ -107,90 +107,84 @@ class BitBadgesAddressList extends docs_js_1.AddressListDoc {
107
107
  }
108
108
  static async GetAddressLists(api, payload) {
109
109
  try {
110
- const validateRes = (input => {
111
- const errors = [];
112
- const __is = input => {
113
- const $io0 = input => Array.isArray(input.listsToFetch) && input.listsToFetch.every(elem => "object" === typeof elem && null !== elem && $io1(elem));
114
- const $io1 = input => "string" === typeof input.listId && (undefined === input.viewsToFetch || Array.isArray(input.viewsToFetch) && input.viewsToFetch.every(elem => "object" === typeof elem && null !== elem && $io2(elem))) && (undefined === input.fetchPrivateParams || "boolean" === typeof input.fetchPrivateParams);
115
- const $io2 = input => "string" === typeof input.viewId && "listActivity" === input.viewType && "string" === typeof input.bookmark;
116
- return "object" === typeof input && null !== input && $io0(input);
117
- };
110
+ const validateRes = (() => { const $io0 = input => Array.isArray(input.listsToFetch) && input.listsToFetch.every(elem => "object" === typeof elem && null !== elem && $io1(elem)); const $io1 = input => "string" === typeof input.listId && (undefined === input.viewsToFetch || Array.isArray(input.viewsToFetch) && input.viewsToFetch.every(elem => "object" === typeof elem && null !== elem && $io2(elem))) && (undefined === input.fetchPrivateParams || "boolean" === typeof input.fetchPrivateParams); const $io2 = input => "string" === typeof input.viewId && "listActivity" === input.viewType && "string" === typeof input.bookmark; const $vo0 = (input, _path, _exceptionable = true) => [(Array.isArray(input.listsToFetch) || $report(_exceptionable, {
111
+ path: _path + ".listsToFetch",
112
+ expected: "Array<__type>",
113
+ value: input.listsToFetch
114
+ })) && input.listsToFetch.map((elem, _index3) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
115
+ path: _path + ".listsToFetch[" + _index3 + "]",
116
+ expected: "__type",
117
+ value: elem
118
+ })) && $vo1(elem, _path + ".listsToFetch[" + _index3 + "]", true && _exceptionable) || $report(_exceptionable, {
119
+ path: _path + ".listsToFetch[" + _index3 + "]",
120
+ expected: "__type",
121
+ value: elem
122
+ })).every(flag => flag) || $report(_exceptionable, {
123
+ path: _path + ".listsToFetch",
124
+ expected: "Array<__type>",
125
+ value: input.listsToFetch
126
+ })].every(flag => flag); const $vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.listId || $report(_exceptionable, {
127
+ path: _path + ".listId",
128
+ expected: "string",
129
+ value: input.listId
130
+ }), undefined === input.viewsToFetch || (Array.isArray(input.viewsToFetch) || $report(_exceptionable, {
131
+ path: _path + ".viewsToFetch",
132
+ expected: "(Array<__type>.o1 | undefined)",
133
+ value: input.viewsToFetch
134
+ })) && input.viewsToFetch.map((elem, _index4) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
135
+ path: _path + ".viewsToFetch[" + _index4 + "]",
136
+ expected: "__type.o1",
137
+ value: elem
138
+ })) && $vo2(elem, _path + ".viewsToFetch[" + _index4 + "]", true && _exceptionable) || $report(_exceptionable, {
139
+ path: _path + ".viewsToFetch[" + _index4 + "]",
140
+ expected: "__type.o1",
141
+ value: elem
142
+ })).every(flag => flag) || $report(_exceptionable, {
143
+ path: _path + ".viewsToFetch",
144
+ expected: "(Array<__type>.o1 | undefined)",
145
+ value: input.viewsToFetch
146
+ }), undefined === input.fetchPrivateParams || "boolean" === typeof input.fetchPrivateParams || $report(_exceptionable, {
147
+ path: _path + ".fetchPrivateParams",
148
+ expected: "(boolean | undefined)",
149
+ value: input.fetchPrivateParams
150
+ })].every(flag => flag); const $vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.viewId || $report(_exceptionable, {
151
+ path: _path + ".viewId",
152
+ expected: "string",
153
+ value: input.viewId
154
+ }), "listActivity" === input.viewType || $report(_exceptionable, {
155
+ path: _path + ".viewType",
156
+ expected: "\"listActivity\"",
157
+ value: input.viewType
158
+ }), "string" === typeof input.bookmark || $report(_exceptionable, {
159
+ path: _path + ".bookmark",
160
+ expected: "string",
161
+ value: input.bookmark
162
+ })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && $io0(input); let errors; let $report; return input => {
118
163
  if (false === __is(input)) {
119
- const $report = typia_1.default.validate.report(errors);
120
- ((input, _path, _exceptionable = true) => {
121
- const $vo0 = (input, _path, _exceptionable = true) => [(Array.isArray(input.listsToFetch) || $report(_exceptionable, {
122
- path: _path + ".listsToFetch",
123
- expected: "Array<__type>",
124
- value: input.listsToFetch
125
- })) && input.listsToFetch.map((elem, _index1) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
126
- path: _path + ".listsToFetch[" + _index1 + "]",
127
- expected: "__type",
128
- value: elem
129
- })) && $vo1(elem, _path + ".listsToFetch[" + _index1 + "]", true && _exceptionable) || $report(_exceptionable, {
130
- path: _path + ".listsToFetch[" + _index1 + "]",
131
- expected: "__type",
132
- value: elem
133
- })).every(flag => flag) || $report(_exceptionable, {
134
- path: _path + ".listsToFetch",
135
- expected: "Array<__type>",
136
- value: input.listsToFetch
137
- })].every(flag => flag);
138
- const $vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.listId || $report(_exceptionable, {
139
- path: _path + ".listId",
140
- expected: "string",
141
- value: input.listId
142
- }), undefined === input.viewsToFetch || (Array.isArray(input.viewsToFetch) || $report(_exceptionable, {
143
- path: _path + ".viewsToFetch",
144
- expected: "(Array<__type>.o1 | undefined)",
145
- value: input.viewsToFetch
146
- })) && input.viewsToFetch.map((elem, _index2) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
147
- path: _path + ".viewsToFetch[" + _index2 + "]",
148
- expected: "__type.o1",
149
- value: elem
150
- })) && $vo2(elem, _path + ".viewsToFetch[" + _index2 + "]", true && _exceptionable) || $report(_exceptionable, {
151
- path: _path + ".viewsToFetch[" + _index2 + "]",
152
- expected: "__type.o1",
153
- value: elem
154
- })).every(flag => flag) || $report(_exceptionable, {
155
- path: _path + ".viewsToFetch",
156
- expected: "(Array<__type>.o1 | undefined)",
157
- value: input.viewsToFetch
158
- }), undefined === input.fetchPrivateParams || "boolean" === typeof input.fetchPrivateParams || $report(_exceptionable, {
159
- path: _path + ".fetchPrivateParams",
160
- expected: "(boolean | undefined)",
161
- value: input.fetchPrivateParams
162
- })].every(flag => flag);
163
- const $vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.viewId || $report(_exceptionable, {
164
- path: _path + ".viewId",
165
- expected: "string",
166
- value: input.viewId
167
- }), "listActivity" === input.viewType || $report(_exceptionable, {
168
- path: _path + ".viewType",
169
- expected: "\"listActivity\"",
170
- value: input.viewType
171
- }), "string" === typeof input.bookmark || $report(_exceptionable, {
172
- path: _path + ".bookmark",
173
- expected: "string",
174
- value: input.bookmark
175
- })].every(flag => flag);
176
- return ("object" === typeof input && null !== input || $report(true, {
177
- path: _path + "",
178
- expected: "GetAddressListsPayload",
179
- value: input
180
- })) && $vo0(input, _path + "", true) || $report(true, {
181
- path: _path + "",
182
- expected: "GetAddressListsPayload",
183
- value: input
184
- });
185
- })(input, "$input", true);
164
+ errors = [];
165
+ $report = typia_1.default.validate.report(errors);
166
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || $report(true, {
167
+ path: _path + "",
168
+ expected: "GetAddressListsPayload",
169
+ value: input
170
+ })) && $vo0(input, _path + "", true) || $report(true, {
171
+ path: _path + "",
172
+ expected: "GetAddressListsPayload",
173
+ value: input
174
+ }))(input, "$input", true);
175
+ const success = 0 === errors.length;
176
+ return {
177
+ success,
178
+ errors,
179
+ data: success ? input : undefined
180
+ };
186
181
  }
187
- const success = 0 === errors.length;
188
182
  return {
189
- success,
190
- errors,
191
- data: success ? input : undefined
183
+ success: true,
184
+ errors: [],
185
+ data: input
192
186
  };
193
- })(payload ?? {});
187
+ }; })()(payload ?? {});
194
188
  if (!validateRes.success) {
195
189
  throw new Error('Invalid payload: ' + JSON.stringify(validateRes.errors));
196
190
  }
@@ -204,236 +198,222 @@ class BitBadgesAddressList extends docs_js_1.AddressListDoc {
204
198
  }
205
199
  static async CreateAddressList(api, payload) {
206
200
  try {
207
- const validateRes = (input => {
208
- const errors = [];
209
- const __is = input => {
210
- const $io0 = input => Array.isArray(input.addressLists) && input.addressLists.every(elem => "object" === typeof elem && null !== elem && $io1(elem));
211
- const $io1 = input => "string" === typeof input.listId && (Array.isArray(input.addresses) && input.addresses.every(elem => "string" === typeof elem)) && "boolean" === typeof input.whitelist && "string" === typeof input.uri && "string" === typeof input.customData && (undefined === input.createdBy || "string" === typeof input.createdBy) && (undefined === input.aliasAddress || "string" === typeof input.aliasAddress) && (undefined === input.updateAddresses || "boolean" === typeof input.updateAddresses) && (undefined === input.private || "boolean" === typeof input.private) && (undefined === input.viewableWithLink || "boolean" === typeof input.viewableWithLink) && (Array.isArray(input.claims) && input.claims.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
212
- const $io2 = input => "string" === typeof input.claimId && (Array.isArray(input.plugins) && input.plugins.every(elem => "object" === typeof elem && null !== elem && $io3(elem))) && (undefined === input.approach || "string" === typeof input.approach);
213
- const $io3 = input => "object" === typeof input.publicState && null !== input.publicState && false === Array.isArray(input.publicState) && $io4(input.publicState) && (undefined === input.privateState || "object" === typeof input.privateState && null !== input.privateState && false === Array.isArray(input.privateState) && $io4(input.privateState)) && (undefined === input.resetState || "boolean" === typeof input.resetState) && (undefined === input.newState || "object" === typeof input.newState && null !== input.newState && false === Array.isArray(input.newState) && $io4(input.newState)) && (undefined === input.onlyUpdateProvidedNewState || "boolean" === typeof input.onlyUpdateProvidedNewState) && "string" === typeof input.instanceId && "string" === typeof input.pluginId && "string" === typeof input.version && ("object" === typeof input.publicParams && null !== input.publicParams && false === Array.isArray(input.publicParams) && $io4(input.publicParams)) && ("object" === typeof input.privateParams && null !== input.privateParams && true) && (undefined === input.metadata || "object" === typeof input.metadata && null !== input.metadata && $io6(input.metadata));
214
- const $io4 = input => Object.keys(input).every(key => {
215
- const value = input[key];
216
- if (undefined === value)
217
- return true;
201
+ const validateRes = (() => { const $join = typia_1.default.validate.join; const $io0 = input => Array.isArray(input.addressLists) && input.addressLists.every(elem => "object" === typeof elem && null !== elem && $io1(elem)); const $io1 = input => "string" === typeof input.listId && (Array.isArray(input.addresses) && input.addresses.every(elem => "string" === typeof elem)) && "boolean" === typeof input.whitelist && "string" === typeof input.uri && "string" === typeof input.customData && (undefined === input.createdBy || "string" === typeof input.createdBy) && (undefined === input.aliasAddress || "string" === typeof input.aliasAddress) && (undefined === input.updateAddresses || "boolean" === typeof input.updateAddresses) && (undefined === input.private || "boolean" === typeof input.private) && (undefined === input.viewableWithLink || "boolean" === typeof input.viewableWithLink) && (Array.isArray(input.claims) && input.claims.every(elem => "object" === typeof elem && null !== elem && $io2(elem))); const $io2 = input => "string" === typeof input.claimId && (Array.isArray(input.plugins) && input.plugins.every(elem => "object" === typeof elem && null !== elem && $io3(elem))) && (undefined === input.approach || "string" === typeof input.approach); const $io3 = input => "object" === typeof input.publicState && null !== input.publicState && false === Array.isArray(input.publicState) && $io4(input.publicState) && (undefined === input.privateState || "object" === typeof input.privateState && null !== input.privateState && false === Array.isArray(input.privateState) && $io4(input.privateState)) && (undefined === input.resetState || "boolean" === typeof input.resetState) && (undefined === input.newState || "object" === typeof input.newState && null !== input.newState && false === Array.isArray(input.newState) && $io4(input.newState)) && (undefined === input.onlyUpdateProvidedNewState || "boolean" === typeof input.onlyUpdateProvidedNewState) && "string" === typeof input.instanceId && "string" === typeof input.pluginId && "string" === typeof input.version && ("object" === typeof input.publicParams && null !== input.publicParams && false === Array.isArray(input.publicParams) && $io4(input.publicParams)) && ("object" === typeof input.privateParams && null !== input.privateParams && false === Array.isArray(input.privateParams) && $io5(input.privateParams)) && (undefined === input.metadata || "object" === typeof input.metadata && null !== input.metadata && $io6(input.metadata)); const $io4 = input => Object.keys(input).every(key => {
202
+ const value = input[key];
203
+ if (undefined === value)
204
+ return true;
205
+ return true;
206
+ }); const $io5 = input => true; const $io6 = input => "string" === typeof input.name && "string" === typeof input.description; const $vo0 = (input, _path, _exceptionable = true) => [(Array.isArray(input.addressLists) || $report(_exceptionable, {
207
+ path: _path + ".addressLists",
208
+ expected: "Array<iAddressListCreateObject>",
209
+ value: input.addressLists
210
+ })) && input.addressLists.map((elem, _index5) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
211
+ path: _path + ".addressLists[" + _index5 + "]",
212
+ expected: "iAddressListCreateObject",
213
+ value: elem
214
+ })) && $vo1(elem, _path + ".addressLists[" + _index5 + "]", true && _exceptionable) || $report(_exceptionable, {
215
+ path: _path + ".addressLists[" + _index5 + "]",
216
+ expected: "iAddressListCreateObject",
217
+ value: elem
218
+ })).every(flag => flag) || $report(_exceptionable, {
219
+ path: _path + ".addressLists",
220
+ expected: "Array<iAddressListCreateObject>",
221
+ value: input.addressLists
222
+ })].every(flag => flag); const $vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.listId || $report(_exceptionable, {
223
+ path: _path + ".listId",
224
+ expected: "string",
225
+ value: input.listId
226
+ }), (Array.isArray(input.addresses) || $report(_exceptionable, {
227
+ path: _path + ".addresses",
228
+ expected: "Array<string>",
229
+ value: input.addresses
230
+ })) && input.addresses.map((elem, _index6) => "string" === typeof elem || $report(_exceptionable, {
231
+ path: _path + ".addresses[" + _index6 + "]",
232
+ expected: "string",
233
+ value: elem
234
+ })).every(flag => flag) || $report(_exceptionable, {
235
+ path: _path + ".addresses",
236
+ expected: "Array<string>",
237
+ value: input.addresses
238
+ }), "boolean" === typeof input.whitelist || $report(_exceptionable, {
239
+ path: _path + ".whitelist",
240
+ expected: "boolean",
241
+ value: input.whitelist
242
+ }), "string" === typeof input.uri || $report(_exceptionable, {
243
+ path: _path + ".uri",
244
+ expected: "string",
245
+ value: input.uri
246
+ }), "string" === typeof input.customData || $report(_exceptionable, {
247
+ path: _path + ".customData",
248
+ expected: "string",
249
+ value: input.customData
250
+ }), undefined === input.createdBy || "string" === typeof input.createdBy || $report(_exceptionable, {
251
+ path: _path + ".createdBy",
252
+ expected: "(string | undefined)",
253
+ value: input.createdBy
254
+ }), undefined === input.aliasAddress || "string" === typeof input.aliasAddress || $report(_exceptionable, {
255
+ path: _path + ".aliasAddress",
256
+ expected: "(string | undefined)",
257
+ value: input.aliasAddress
258
+ }), undefined === input.updateAddresses || "boolean" === typeof input.updateAddresses || $report(_exceptionable, {
259
+ path: _path + ".updateAddresses",
260
+ expected: "(boolean | undefined)",
261
+ value: input.updateAddresses
262
+ }), undefined === input.private || "boolean" === typeof input.private || $report(_exceptionable, {
263
+ path: _path + ".private",
264
+ expected: "(boolean | undefined)",
265
+ value: input.private
266
+ }), undefined === input.viewableWithLink || "boolean" === typeof input.viewableWithLink || $report(_exceptionable, {
267
+ path: _path + ".viewableWithLink",
268
+ expected: "(boolean | undefined)",
269
+ value: input.viewableWithLink
270
+ }), (Array.isArray(input.claims) || $report(_exceptionable, {
271
+ path: _path + ".claims",
272
+ expected: "Array<__type>",
273
+ value: input.claims
274
+ })) && input.claims.map((elem, _index7) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
275
+ path: _path + ".claims[" + _index7 + "]",
276
+ expected: "__type",
277
+ value: elem
278
+ })) && $vo2(elem, _path + ".claims[" + _index7 + "]", true && _exceptionable) || $report(_exceptionable, {
279
+ path: _path + ".claims[" + _index7 + "]",
280
+ expected: "__type",
281
+ value: elem
282
+ })).every(flag => flag) || $report(_exceptionable, {
283
+ path: _path + ".claims",
284
+ expected: "Array<__type>",
285
+ value: input.claims
286
+ })].every(flag => flag); const $vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.claimId || $report(_exceptionable, {
287
+ path: _path + ".claimId",
288
+ expected: "string",
289
+ value: input.claimId
290
+ }), (Array.isArray(input.plugins) || $report(_exceptionable, {
291
+ path: _path + ".plugins",
292
+ expected: "Array<IntegrationPluginDetails<string>>",
293
+ value: input.plugins
294
+ })) && input.plugins.map((elem, _index8) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
295
+ path: _path + ".plugins[" + _index8 + "]",
296
+ expected: "IntegrationPluginDetails<string>",
297
+ value: elem
298
+ })) && $vo3(elem, _path + ".plugins[" + _index8 + "]", true && _exceptionable) || $report(_exceptionable, {
299
+ path: _path + ".plugins[" + _index8 + "]",
300
+ expected: "IntegrationPluginDetails<string>",
301
+ value: elem
302
+ })).every(flag => flag) || $report(_exceptionable, {
303
+ path: _path + ".plugins",
304
+ expected: "Array<IntegrationPluginDetails<string>>",
305
+ value: input.plugins
306
+ }), undefined === input.approach || "string" === typeof input.approach || $report(_exceptionable, {
307
+ path: _path + ".approach",
308
+ expected: "(string | undefined)",
309
+ value: input.approach
310
+ })].every(flag => flag); const $vo3 = (input, _path, _exceptionable = true) => [("object" === typeof input.publicState && null !== input.publicState && false === Array.isArray(input.publicState) || $report(_exceptionable, {
311
+ path: _path + ".publicState",
312
+ expected: "Record<string, any>",
313
+ value: input.publicState
314
+ })) && $vo4(input.publicState, _path + ".publicState", true && _exceptionable) || $report(_exceptionable, {
315
+ path: _path + ".publicState",
316
+ expected: "Record<string, any>",
317
+ value: input.publicState
318
+ }), undefined === input.privateState || ("object" === typeof input.privateState && null !== input.privateState && false === Array.isArray(input.privateState) || $report(_exceptionable, {
319
+ path: _path + ".privateState",
320
+ expected: "(Record<string, any> | undefined)",
321
+ value: input.privateState
322
+ })) && $vo4(input.privateState, _path + ".privateState", true && _exceptionable) || $report(_exceptionable, {
323
+ path: _path + ".privateState",
324
+ expected: "(Record<string, any> | undefined)",
325
+ value: input.privateState
326
+ }), undefined === input.resetState || "boolean" === typeof input.resetState || $report(_exceptionable, {
327
+ path: _path + ".resetState",
328
+ expected: "(boolean | undefined)",
329
+ value: input.resetState
330
+ }), undefined === input.newState || ("object" === typeof input.newState && null !== input.newState && false === Array.isArray(input.newState) || $report(_exceptionable, {
331
+ path: _path + ".newState",
332
+ expected: "(Record<string, any> | undefined)",
333
+ value: input.newState
334
+ })) && $vo4(input.newState, _path + ".newState", true && _exceptionable) || $report(_exceptionable, {
335
+ path: _path + ".newState",
336
+ expected: "(Record<string, any> | undefined)",
337
+ value: input.newState
338
+ }), undefined === input.onlyUpdateProvidedNewState || "boolean" === typeof input.onlyUpdateProvidedNewState || $report(_exceptionable, {
339
+ path: _path + ".onlyUpdateProvidedNewState",
340
+ expected: "(boolean | undefined)",
341
+ value: input.onlyUpdateProvidedNewState
342
+ }), "string" === typeof input.instanceId || $report(_exceptionable, {
343
+ path: _path + ".instanceId",
344
+ expected: "string",
345
+ value: input.instanceId
346
+ }), "string" === typeof input.pluginId || $report(_exceptionable, {
347
+ path: _path + ".pluginId",
348
+ expected: "string",
349
+ value: input.pluginId
350
+ }), "string" === typeof input.version || $report(_exceptionable, {
351
+ path: _path + ".version",
352
+ expected: "string",
353
+ value: input.version
354
+ }), ("object" === typeof input.publicParams && null !== input.publicParams && false === Array.isArray(input.publicParams) || $report(_exceptionable, {
355
+ path: _path + ".publicParams",
356
+ expected: "Record<string, any>",
357
+ value: input.publicParams
358
+ })) && $vo4(input.publicParams, _path + ".publicParams", true && _exceptionable) || $report(_exceptionable, {
359
+ path: _path + ".publicParams",
360
+ expected: "Record<string, any>",
361
+ value: input.publicParams
362
+ }), ("object" === typeof input.privateParams && null !== input.privateParams && false === Array.isArray(input.privateParams) || $report(_exceptionable, {
363
+ path: _path + ".privateParams",
364
+ expected: "__type.o1",
365
+ value: input.privateParams
366
+ })) && $vo5(input.privateParams, _path + ".privateParams", true && _exceptionable) || $report(_exceptionable, {
367
+ path: _path + ".privateParams",
368
+ expected: "__type.o1",
369
+ value: input.privateParams
370
+ }), undefined === input.metadata || ("object" === typeof input.metadata && null !== input.metadata || $report(_exceptionable, {
371
+ path: _path + ".metadata",
372
+ expected: "(__type.o2 | undefined)",
373
+ value: input.metadata
374
+ })) && $vo6(input.metadata, _path + ".metadata", true && _exceptionable) || $report(_exceptionable, {
375
+ path: _path + ".metadata",
376
+ expected: "(__type.o2 | undefined)",
377
+ value: input.metadata
378
+ })].every(flag => flag); const $vo4 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
379
+ const value = input[key];
380
+ if (undefined === value)
218
381
  return true;
219
- });
220
- const $io6 = input => "string" === typeof input.name && "string" === typeof input.description;
221
- return "object" === typeof input && null !== input && $io0(input);
222
- };
382
+ return true;
383
+ }).every(flag => flag)].every(flag => flag); const $vo5 = (input, _path, _exceptionable = true) => true; const $vo6 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || $report(_exceptionable, {
384
+ path: _path + ".name",
385
+ expected: "string",
386
+ value: input.name
387
+ }), "string" === typeof input.description || $report(_exceptionable, {
388
+ path: _path + ".description",
389
+ expected: "string",
390
+ value: input.description
391
+ })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && $io0(input); let errors; let $report; return input => {
223
392
  if (false === __is(input)) {
224
- const $report = typia_1.default.validate.report(errors);
225
- ((input, _path, _exceptionable = true) => {
226
- const $join = typia_1.default.validate.join;
227
- const $vo0 = (input, _path, _exceptionable = true) => [(Array.isArray(input.addressLists) || $report(_exceptionable, {
228
- path: _path + ".addressLists",
229
- expected: "Array<iAddressListCreateObject>",
230
- value: input.addressLists
231
- })) && input.addressLists.map((elem, _index1) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
232
- path: _path + ".addressLists[" + _index1 + "]",
233
- expected: "iAddressListCreateObject",
234
- value: elem
235
- })) && $vo1(elem, _path + ".addressLists[" + _index1 + "]", true && _exceptionable) || $report(_exceptionable, {
236
- path: _path + ".addressLists[" + _index1 + "]",
237
- expected: "iAddressListCreateObject",
238
- value: elem
239
- })).every(flag => flag) || $report(_exceptionable, {
240
- path: _path + ".addressLists",
241
- expected: "Array<iAddressListCreateObject>",
242
- value: input.addressLists
243
- })].every(flag => flag);
244
- const $vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.listId || $report(_exceptionable, {
245
- path: _path + ".listId",
246
- expected: "string",
247
- value: input.listId
248
- }), (Array.isArray(input.addresses) || $report(_exceptionable, {
249
- path: _path + ".addresses",
250
- expected: "Array<string>",
251
- value: input.addresses
252
- })) && input.addresses.map((elem, _index2) => "string" === typeof elem || $report(_exceptionable, {
253
- path: _path + ".addresses[" + _index2 + "]",
254
- expected: "string",
255
- value: elem
256
- })).every(flag => flag) || $report(_exceptionable, {
257
- path: _path + ".addresses",
258
- expected: "Array<string>",
259
- value: input.addresses
260
- }), "boolean" === typeof input.whitelist || $report(_exceptionable, {
261
- path: _path + ".whitelist",
262
- expected: "boolean",
263
- value: input.whitelist
264
- }), "string" === typeof input.uri || $report(_exceptionable, {
265
- path: _path + ".uri",
266
- expected: "string",
267
- value: input.uri
268
- }), "string" === typeof input.customData || $report(_exceptionable, {
269
- path: _path + ".customData",
270
- expected: "string",
271
- value: input.customData
272
- }), undefined === input.createdBy || "string" === typeof input.createdBy || $report(_exceptionable, {
273
- path: _path + ".createdBy",
274
- expected: "(string | undefined)",
275
- value: input.createdBy
276
- }), undefined === input.aliasAddress || "string" === typeof input.aliasAddress || $report(_exceptionable, {
277
- path: _path + ".aliasAddress",
278
- expected: "(string | undefined)",
279
- value: input.aliasAddress
280
- }), undefined === input.updateAddresses || "boolean" === typeof input.updateAddresses || $report(_exceptionable, {
281
- path: _path + ".updateAddresses",
282
- expected: "(boolean | undefined)",
283
- value: input.updateAddresses
284
- }), undefined === input.private || "boolean" === typeof input.private || $report(_exceptionable, {
285
- path: _path + ".private",
286
- expected: "(boolean | undefined)",
287
- value: input.private
288
- }), undefined === input.viewableWithLink || "boolean" === typeof input.viewableWithLink || $report(_exceptionable, {
289
- path: _path + ".viewableWithLink",
290
- expected: "(boolean | undefined)",
291
- value: input.viewableWithLink
292
- }), (Array.isArray(input.claims) || $report(_exceptionable, {
293
- path: _path + ".claims",
294
- expected: "Array<__type>",
295
- value: input.claims
296
- })) && input.claims.map((elem, _index3) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
297
- path: _path + ".claims[" + _index3 + "]",
298
- expected: "__type",
299
- value: elem
300
- })) && $vo2(elem, _path + ".claims[" + _index3 + "]", true && _exceptionable) || $report(_exceptionable, {
301
- path: _path + ".claims[" + _index3 + "]",
302
- expected: "__type",
303
- value: elem
304
- })).every(flag => flag) || $report(_exceptionable, {
305
- path: _path + ".claims",
306
- expected: "Array<__type>",
307
- value: input.claims
308
- })].every(flag => flag);
309
- const $vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.claimId || $report(_exceptionable, {
310
- path: _path + ".claimId",
311
- expected: "string",
312
- value: input.claimId
313
- }), (Array.isArray(input.plugins) || $report(_exceptionable, {
314
- path: _path + ".plugins",
315
- expected: "Array<IntegrationPluginDetails<string>>",
316
- value: input.plugins
317
- })) && input.plugins.map((elem, _index4) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
318
- path: _path + ".plugins[" + _index4 + "]",
319
- expected: "IntegrationPluginDetails<string>",
320
- value: elem
321
- })) && $vo3(elem, _path + ".plugins[" + _index4 + "]", true && _exceptionable) || $report(_exceptionable, {
322
- path: _path + ".plugins[" + _index4 + "]",
323
- expected: "IntegrationPluginDetails<string>",
324
- value: elem
325
- })).every(flag => flag) || $report(_exceptionable, {
326
- path: _path + ".plugins",
327
- expected: "Array<IntegrationPluginDetails<string>>",
328
- value: input.plugins
329
- }), undefined === input.approach || "string" === typeof input.approach || $report(_exceptionable, {
330
- path: _path + ".approach",
331
- expected: "(string | undefined)",
332
- value: input.approach
333
- })].every(flag => flag);
334
- const $vo3 = (input, _path, _exceptionable = true) => [("object" === typeof input.publicState && null !== input.publicState && false === Array.isArray(input.publicState) || $report(_exceptionable, {
335
- path: _path + ".publicState",
336
- expected: "Record<string, any>",
337
- value: input.publicState
338
- })) && $vo4(input.publicState, _path + ".publicState", true && _exceptionable) || $report(_exceptionable, {
339
- path: _path + ".publicState",
340
- expected: "Record<string, any>",
341
- value: input.publicState
342
- }), undefined === input.privateState || ("object" === typeof input.privateState && null !== input.privateState && false === Array.isArray(input.privateState) || $report(_exceptionable, {
343
- path: _path + ".privateState",
344
- expected: "(Record<string, any> | undefined)",
345
- value: input.privateState
346
- })) && $vo4(input.privateState, _path + ".privateState", true && _exceptionable) || $report(_exceptionable, {
347
- path: _path + ".privateState",
348
- expected: "(Record<string, any> | undefined)",
349
- value: input.privateState
350
- }), undefined === input.resetState || "boolean" === typeof input.resetState || $report(_exceptionable, {
351
- path: _path + ".resetState",
352
- expected: "(boolean | undefined)",
353
- value: input.resetState
354
- }), undefined === input.newState || ("object" === typeof input.newState && null !== input.newState && false === Array.isArray(input.newState) || $report(_exceptionable, {
355
- path: _path + ".newState",
356
- expected: "(Record<string, any> | undefined)",
357
- value: input.newState
358
- })) && $vo4(input.newState, _path + ".newState", true && _exceptionable) || $report(_exceptionable, {
359
- path: _path + ".newState",
360
- expected: "(Record<string, any> | undefined)",
361
- value: input.newState
362
- }), undefined === input.onlyUpdateProvidedNewState || "boolean" === typeof input.onlyUpdateProvidedNewState || $report(_exceptionable, {
363
- path: _path + ".onlyUpdateProvidedNewState",
364
- expected: "(boolean | undefined)",
365
- value: input.onlyUpdateProvidedNewState
366
- }), "string" === typeof input.instanceId || $report(_exceptionable, {
367
- path: _path + ".instanceId",
368
- expected: "string",
369
- value: input.instanceId
370
- }), "string" === typeof input.pluginId || $report(_exceptionable, {
371
- path: _path + ".pluginId",
372
- expected: "string",
373
- value: input.pluginId
374
- }), "string" === typeof input.version || $report(_exceptionable, {
375
- path: _path + ".version",
376
- expected: "string",
377
- value: input.version
378
- }), ("object" === typeof input.publicParams && null !== input.publicParams && false === Array.isArray(input.publicParams) || $report(_exceptionable, {
379
- path: _path + ".publicParams",
380
- expected: "Record<string, any>",
381
- value: input.publicParams
382
- })) && $vo4(input.publicParams, _path + ".publicParams", true && _exceptionable) || $report(_exceptionable, {
383
- path: _path + ".publicParams",
384
- expected: "Record<string, any>",
385
- value: input.publicParams
386
- }), ("object" === typeof input.privateParams && null !== input.privateParams && false === Array.isArray(input.privateParams) || $report(_exceptionable, {
387
- path: _path + ".privateParams",
388
- expected: "__type.o1",
389
- value: input.privateParams
390
- })) && $vo5(input.privateParams, _path + ".privateParams", true && _exceptionable) || $report(_exceptionable, {
391
- path: _path + ".privateParams",
392
- expected: "__type.o1",
393
- value: input.privateParams
394
- }), undefined === input.metadata || ("object" === typeof input.metadata && null !== input.metadata || $report(_exceptionable, {
395
- path: _path + ".metadata",
396
- expected: "(__type.o2 | undefined)",
397
- value: input.metadata
398
- })) && $vo6(input.metadata, _path + ".metadata", true && _exceptionable) || $report(_exceptionable, {
399
- path: _path + ".metadata",
400
- expected: "(__type.o2 | undefined)",
401
- value: input.metadata
402
- })].every(flag => flag);
403
- const $vo4 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
404
- const value = input[key];
405
- if (undefined === value)
406
- return true;
407
- return true;
408
- }).every(flag => flag)].every(flag => flag);
409
- const $vo5 = (input, _path, _exceptionable = true) => true;
410
- const $vo6 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || $report(_exceptionable, {
411
- path: _path + ".name",
412
- expected: "string",
413
- value: input.name
414
- }), "string" === typeof input.description || $report(_exceptionable, {
415
- path: _path + ".description",
416
- expected: "string",
417
- value: input.description
418
- })].every(flag => flag);
419
- return ("object" === typeof input && null !== input || $report(true, {
420
- path: _path + "",
421
- expected: "CreateAddressListsPayload",
422
- value: input
423
- })) && $vo0(input, _path + "", true) || $report(true, {
424
- path: _path + "",
425
- expected: "CreateAddressListsPayload",
426
- value: input
427
- });
428
- })(input, "$input", true);
393
+ errors = [];
394
+ $report = typia_1.default.validate.report(errors);
395
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || $report(true, {
396
+ path: _path + "",
397
+ expected: "CreateAddressListsPayload",
398
+ value: input
399
+ })) && $vo0(input, _path + "", true) || $report(true, {
400
+ path: _path + "",
401
+ expected: "CreateAddressListsPayload",
402
+ value: input
403
+ }))(input, "$input", true);
404
+ const success = 0 === errors.length;
405
+ return {
406
+ success,
407
+ errors,
408
+ data: success ? input : undefined
409
+ };
429
410
  }
430
- const success = 0 === errors.length;
431
411
  return {
432
- success,
433
- errors,
434
- data: success ? input : undefined
412
+ success: true,
413
+ errors: [],
414
+ data: input
435
415
  };
436
- })(payload ?? {});
416
+ }; })()(payload ?? {});
437
417
  if (!validateRes.success) {
438
418
  throw new Error('Invalid payload: ' + JSON.stringify(validateRes.errors));
439
419
  }
@@ -447,236 +427,222 @@ class BitBadgesAddressList extends docs_js_1.AddressListDoc {
447
427
  }
448
428
  static async UpdateAddressList(api, payload) {
449
429
  try {
450
- const validateRes = (input => {
451
- const errors = [];
452
- const __is = input => {
453
- const $io0 = input => Array.isArray(input.addressLists) && input.addressLists.every(elem => "object" === typeof elem && null !== elem && $io1(elem));
454
- const $io1 = input => "string" === typeof input.listId && (Array.isArray(input.addresses) && input.addresses.every(elem => "string" === typeof elem)) && "boolean" === typeof input.whitelist && "string" === typeof input.uri && "string" === typeof input.customData && (undefined === input.createdBy || "string" === typeof input.createdBy) && (undefined === input.aliasAddress || "string" === typeof input.aliasAddress) && (undefined === input.updateAddresses || "boolean" === typeof input.updateAddresses) && (undefined === input.private || "boolean" === typeof input.private) && (undefined === input.viewableWithLink || "boolean" === typeof input.viewableWithLink) && (Array.isArray(input.claims) && input.claims.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
455
- const $io2 = input => "string" === typeof input.claimId && (Array.isArray(input.plugins) && input.plugins.every(elem => "object" === typeof elem && null !== elem && $io3(elem))) && (undefined === input.approach || "string" === typeof input.approach);
456
- const $io3 = input => "object" === typeof input.publicState && null !== input.publicState && false === Array.isArray(input.publicState) && $io4(input.publicState) && (undefined === input.privateState || "object" === typeof input.privateState && null !== input.privateState && false === Array.isArray(input.privateState) && $io4(input.privateState)) && (undefined === input.resetState || "boolean" === typeof input.resetState) && (undefined === input.newState || "object" === typeof input.newState && null !== input.newState && false === Array.isArray(input.newState) && $io4(input.newState)) && (undefined === input.onlyUpdateProvidedNewState || "boolean" === typeof input.onlyUpdateProvidedNewState) && "string" === typeof input.instanceId && "string" === typeof input.pluginId && "string" === typeof input.version && ("object" === typeof input.publicParams && null !== input.publicParams && false === Array.isArray(input.publicParams) && $io4(input.publicParams)) && ("object" === typeof input.privateParams && null !== input.privateParams && true) && (undefined === input.metadata || "object" === typeof input.metadata && null !== input.metadata && $io6(input.metadata));
457
- const $io4 = input => Object.keys(input).every(key => {
458
- const value = input[key];
459
- if (undefined === value)
460
- return true;
430
+ const validateRes = (() => { const $join = typia_1.default.validate.join; const $io0 = input => Array.isArray(input.addressLists) && input.addressLists.every(elem => "object" === typeof elem && null !== elem && $io1(elem)); const $io1 = input => "string" === typeof input.listId && (Array.isArray(input.addresses) && input.addresses.every(elem => "string" === typeof elem)) && "boolean" === typeof input.whitelist && "string" === typeof input.uri && "string" === typeof input.customData && (undefined === input.createdBy || "string" === typeof input.createdBy) && (undefined === input.aliasAddress || "string" === typeof input.aliasAddress) && (undefined === input.updateAddresses || "boolean" === typeof input.updateAddresses) && (undefined === input.private || "boolean" === typeof input.private) && (undefined === input.viewableWithLink || "boolean" === typeof input.viewableWithLink) && (Array.isArray(input.claims) && input.claims.every(elem => "object" === typeof elem && null !== elem && $io2(elem))); const $io2 = input => "string" === typeof input.claimId && (Array.isArray(input.plugins) && input.plugins.every(elem => "object" === typeof elem && null !== elem && $io3(elem))) && (undefined === input.approach || "string" === typeof input.approach); const $io3 = input => "object" === typeof input.publicState && null !== input.publicState && false === Array.isArray(input.publicState) && $io4(input.publicState) && (undefined === input.privateState || "object" === typeof input.privateState && null !== input.privateState && false === Array.isArray(input.privateState) && $io4(input.privateState)) && (undefined === input.resetState || "boolean" === typeof input.resetState) && (undefined === input.newState || "object" === typeof input.newState && null !== input.newState && false === Array.isArray(input.newState) && $io4(input.newState)) && (undefined === input.onlyUpdateProvidedNewState || "boolean" === typeof input.onlyUpdateProvidedNewState) && "string" === typeof input.instanceId && "string" === typeof input.pluginId && "string" === typeof input.version && ("object" === typeof input.publicParams && null !== input.publicParams && false === Array.isArray(input.publicParams) && $io4(input.publicParams)) && ("object" === typeof input.privateParams && null !== input.privateParams && false === Array.isArray(input.privateParams) && $io5(input.privateParams)) && (undefined === input.metadata || "object" === typeof input.metadata && null !== input.metadata && $io6(input.metadata)); const $io4 = input => Object.keys(input).every(key => {
431
+ const value = input[key];
432
+ if (undefined === value)
433
+ return true;
434
+ return true;
435
+ }); const $io5 = input => true; const $io6 = input => "string" === typeof input.name && "string" === typeof input.description; const $vo0 = (input, _path, _exceptionable = true) => [(Array.isArray(input.addressLists) || $report(_exceptionable, {
436
+ path: _path + ".addressLists",
437
+ expected: "Array<iAddressListCreateObject>",
438
+ value: input.addressLists
439
+ })) && input.addressLists.map((elem, _index5) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
440
+ path: _path + ".addressLists[" + _index5 + "]",
441
+ expected: "iAddressListCreateObject",
442
+ value: elem
443
+ })) && $vo1(elem, _path + ".addressLists[" + _index5 + "]", true && _exceptionable) || $report(_exceptionable, {
444
+ path: _path + ".addressLists[" + _index5 + "]",
445
+ expected: "iAddressListCreateObject",
446
+ value: elem
447
+ })).every(flag => flag) || $report(_exceptionable, {
448
+ path: _path + ".addressLists",
449
+ expected: "Array<iAddressListCreateObject>",
450
+ value: input.addressLists
451
+ })].every(flag => flag); const $vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.listId || $report(_exceptionable, {
452
+ path: _path + ".listId",
453
+ expected: "string",
454
+ value: input.listId
455
+ }), (Array.isArray(input.addresses) || $report(_exceptionable, {
456
+ path: _path + ".addresses",
457
+ expected: "Array<string>",
458
+ value: input.addresses
459
+ })) && input.addresses.map((elem, _index6) => "string" === typeof elem || $report(_exceptionable, {
460
+ path: _path + ".addresses[" + _index6 + "]",
461
+ expected: "string",
462
+ value: elem
463
+ })).every(flag => flag) || $report(_exceptionable, {
464
+ path: _path + ".addresses",
465
+ expected: "Array<string>",
466
+ value: input.addresses
467
+ }), "boolean" === typeof input.whitelist || $report(_exceptionable, {
468
+ path: _path + ".whitelist",
469
+ expected: "boolean",
470
+ value: input.whitelist
471
+ }), "string" === typeof input.uri || $report(_exceptionable, {
472
+ path: _path + ".uri",
473
+ expected: "string",
474
+ value: input.uri
475
+ }), "string" === typeof input.customData || $report(_exceptionable, {
476
+ path: _path + ".customData",
477
+ expected: "string",
478
+ value: input.customData
479
+ }), undefined === input.createdBy || "string" === typeof input.createdBy || $report(_exceptionable, {
480
+ path: _path + ".createdBy",
481
+ expected: "(string | undefined)",
482
+ value: input.createdBy
483
+ }), undefined === input.aliasAddress || "string" === typeof input.aliasAddress || $report(_exceptionable, {
484
+ path: _path + ".aliasAddress",
485
+ expected: "(string | undefined)",
486
+ value: input.aliasAddress
487
+ }), undefined === input.updateAddresses || "boolean" === typeof input.updateAddresses || $report(_exceptionable, {
488
+ path: _path + ".updateAddresses",
489
+ expected: "(boolean | undefined)",
490
+ value: input.updateAddresses
491
+ }), undefined === input.private || "boolean" === typeof input.private || $report(_exceptionable, {
492
+ path: _path + ".private",
493
+ expected: "(boolean | undefined)",
494
+ value: input.private
495
+ }), undefined === input.viewableWithLink || "boolean" === typeof input.viewableWithLink || $report(_exceptionable, {
496
+ path: _path + ".viewableWithLink",
497
+ expected: "(boolean | undefined)",
498
+ value: input.viewableWithLink
499
+ }), (Array.isArray(input.claims) || $report(_exceptionable, {
500
+ path: _path + ".claims",
501
+ expected: "Array<__type>",
502
+ value: input.claims
503
+ })) && input.claims.map((elem, _index7) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
504
+ path: _path + ".claims[" + _index7 + "]",
505
+ expected: "__type",
506
+ value: elem
507
+ })) && $vo2(elem, _path + ".claims[" + _index7 + "]", true && _exceptionable) || $report(_exceptionable, {
508
+ path: _path + ".claims[" + _index7 + "]",
509
+ expected: "__type",
510
+ value: elem
511
+ })).every(flag => flag) || $report(_exceptionable, {
512
+ path: _path + ".claims",
513
+ expected: "Array<__type>",
514
+ value: input.claims
515
+ })].every(flag => flag); const $vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.claimId || $report(_exceptionable, {
516
+ path: _path + ".claimId",
517
+ expected: "string",
518
+ value: input.claimId
519
+ }), (Array.isArray(input.plugins) || $report(_exceptionable, {
520
+ path: _path + ".plugins",
521
+ expected: "Array<IntegrationPluginDetails<string>>",
522
+ value: input.plugins
523
+ })) && input.plugins.map((elem, _index8) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
524
+ path: _path + ".plugins[" + _index8 + "]",
525
+ expected: "IntegrationPluginDetails<string>",
526
+ value: elem
527
+ })) && $vo3(elem, _path + ".plugins[" + _index8 + "]", true && _exceptionable) || $report(_exceptionable, {
528
+ path: _path + ".plugins[" + _index8 + "]",
529
+ expected: "IntegrationPluginDetails<string>",
530
+ value: elem
531
+ })).every(flag => flag) || $report(_exceptionable, {
532
+ path: _path + ".plugins",
533
+ expected: "Array<IntegrationPluginDetails<string>>",
534
+ value: input.plugins
535
+ }), undefined === input.approach || "string" === typeof input.approach || $report(_exceptionable, {
536
+ path: _path + ".approach",
537
+ expected: "(string | undefined)",
538
+ value: input.approach
539
+ })].every(flag => flag); const $vo3 = (input, _path, _exceptionable = true) => [("object" === typeof input.publicState && null !== input.publicState && false === Array.isArray(input.publicState) || $report(_exceptionable, {
540
+ path: _path + ".publicState",
541
+ expected: "Record<string, any>",
542
+ value: input.publicState
543
+ })) && $vo4(input.publicState, _path + ".publicState", true && _exceptionable) || $report(_exceptionable, {
544
+ path: _path + ".publicState",
545
+ expected: "Record<string, any>",
546
+ value: input.publicState
547
+ }), undefined === input.privateState || ("object" === typeof input.privateState && null !== input.privateState && false === Array.isArray(input.privateState) || $report(_exceptionable, {
548
+ path: _path + ".privateState",
549
+ expected: "(Record<string, any> | undefined)",
550
+ value: input.privateState
551
+ })) && $vo4(input.privateState, _path + ".privateState", true && _exceptionable) || $report(_exceptionable, {
552
+ path: _path + ".privateState",
553
+ expected: "(Record<string, any> | undefined)",
554
+ value: input.privateState
555
+ }), undefined === input.resetState || "boolean" === typeof input.resetState || $report(_exceptionable, {
556
+ path: _path + ".resetState",
557
+ expected: "(boolean | undefined)",
558
+ value: input.resetState
559
+ }), undefined === input.newState || ("object" === typeof input.newState && null !== input.newState && false === Array.isArray(input.newState) || $report(_exceptionable, {
560
+ path: _path + ".newState",
561
+ expected: "(Record<string, any> | undefined)",
562
+ value: input.newState
563
+ })) && $vo4(input.newState, _path + ".newState", true && _exceptionable) || $report(_exceptionable, {
564
+ path: _path + ".newState",
565
+ expected: "(Record<string, any> | undefined)",
566
+ value: input.newState
567
+ }), undefined === input.onlyUpdateProvidedNewState || "boolean" === typeof input.onlyUpdateProvidedNewState || $report(_exceptionable, {
568
+ path: _path + ".onlyUpdateProvidedNewState",
569
+ expected: "(boolean | undefined)",
570
+ value: input.onlyUpdateProvidedNewState
571
+ }), "string" === typeof input.instanceId || $report(_exceptionable, {
572
+ path: _path + ".instanceId",
573
+ expected: "string",
574
+ value: input.instanceId
575
+ }), "string" === typeof input.pluginId || $report(_exceptionable, {
576
+ path: _path + ".pluginId",
577
+ expected: "string",
578
+ value: input.pluginId
579
+ }), "string" === typeof input.version || $report(_exceptionable, {
580
+ path: _path + ".version",
581
+ expected: "string",
582
+ value: input.version
583
+ }), ("object" === typeof input.publicParams && null !== input.publicParams && false === Array.isArray(input.publicParams) || $report(_exceptionable, {
584
+ path: _path + ".publicParams",
585
+ expected: "Record<string, any>",
586
+ value: input.publicParams
587
+ })) && $vo4(input.publicParams, _path + ".publicParams", true && _exceptionable) || $report(_exceptionable, {
588
+ path: _path + ".publicParams",
589
+ expected: "Record<string, any>",
590
+ value: input.publicParams
591
+ }), ("object" === typeof input.privateParams && null !== input.privateParams && false === Array.isArray(input.privateParams) || $report(_exceptionable, {
592
+ path: _path + ".privateParams",
593
+ expected: "__type.o1",
594
+ value: input.privateParams
595
+ })) && $vo5(input.privateParams, _path + ".privateParams", true && _exceptionable) || $report(_exceptionable, {
596
+ path: _path + ".privateParams",
597
+ expected: "__type.o1",
598
+ value: input.privateParams
599
+ }), undefined === input.metadata || ("object" === typeof input.metadata && null !== input.metadata || $report(_exceptionable, {
600
+ path: _path + ".metadata",
601
+ expected: "(__type.o2 | undefined)",
602
+ value: input.metadata
603
+ })) && $vo6(input.metadata, _path + ".metadata", true && _exceptionable) || $report(_exceptionable, {
604
+ path: _path + ".metadata",
605
+ expected: "(__type.o2 | undefined)",
606
+ value: input.metadata
607
+ })].every(flag => flag); const $vo4 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
608
+ const value = input[key];
609
+ if (undefined === value)
461
610
  return true;
462
- });
463
- const $io6 = input => "string" === typeof input.name && "string" === typeof input.description;
464
- return "object" === typeof input && null !== input && $io0(input);
465
- };
611
+ return true;
612
+ }).every(flag => flag)].every(flag => flag); const $vo5 = (input, _path, _exceptionable = true) => true; const $vo6 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || $report(_exceptionable, {
613
+ path: _path + ".name",
614
+ expected: "string",
615
+ value: input.name
616
+ }), "string" === typeof input.description || $report(_exceptionable, {
617
+ path: _path + ".description",
618
+ expected: "string",
619
+ value: input.description
620
+ })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && $io0(input); let errors; let $report; return input => {
466
621
  if (false === __is(input)) {
467
- const $report = typia_1.default.validate.report(errors);
468
- ((input, _path, _exceptionable = true) => {
469
- const $join = typia_1.default.validate.join;
470
- const $vo0 = (input, _path, _exceptionable = true) => [(Array.isArray(input.addressLists) || $report(_exceptionable, {
471
- path: _path + ".addressLists",
472
- expected: "Array<iAddressListCreateObject>",
473
- value: input.addressLists
474
- })) && input.addressLists.map((elem, _index1) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
475
- path: _path + ".addressLists[" + _index1 + "]",
476
- expected: "iAddressListCreateObject",
477
- value: elem
478
- })) && $vo1(elem, _path + ".addressLists[" + _index1 + "]", true && _exceptionable) || $report(_exceptionable, {
479
- path: _path + ".addressLists[" + _index1 + "]",
480
- expected: "iAddressListCreateObject",
481
- value: elem
482
- })).every(flag => flag) || $report(_exceptionable, {
483
- path: _path + ".addressLists",
484
- expected: "Array<iAddressListCreateObject>",
485
- value: input.addressLists
486
- })].every(flag => flag);
487
- const $vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.listId || $report(_exceptionable, {
488
- path: _path + ".listId",
489
- expected: "string",
490
- value: input.listId
491
- }), (Array.isArray(input.addresses) || $report(_exceptionable, {
492
- path: _path + ".addresses",
493
- expected: "Array<string>",
494
- value: input.addresses
495
- })) && input.addresses.map((elem, _index2) => "string" === typeof elem || $report(_exceptionable, {
496
- path: _path + ".addresses[" + _index2 + "]",
497
- expected: "string",
498
- value: elem
499
- })).every(flag => flag) || $report(_exceptionable, {
500
- path: _path + ".addresses",
501
- expected: "Array<string>",
502
- value: input.addresses
503
- }), "boolean" === typeof input.whitelist || $report(_exceptionable, {
504
- path: _path + ".whitelist",
505
- expected: "boolean",
506
- value: input.whitelist
507
- }), "string" === typeof input.uri || $report(_exceptionable, {
508
- path: _path + ".uri",
509
- expected: "string",
510
- value: input.uri
511
- }), "string" === typeof input.customData || $report(_exceptionable, {
512
- path: _path + ".customData",
513
- expected: "string",
514
- value: input.customData
515
- }), undefined === input.createdBy || "string" === typeof input.createdBy || $report(_exceptionable, {
516
- path: _path + ".createdBy",
517
- expected: "(string | undefined)",
518
- value: input.createdBy
519
- }), undefined === input.aliasAddress || "string" === typeof input.aliasAddress || $report(_exceptionable, {
520
- path: _path + ".aliasAddress",
521
- expected: "(string | undefined)",
522
- value: input.aliasAddress
523
- }), undefined === input.updateAddresses || "boolean" === typeof input.updateAddresses || $report(_exceptionable, {
524
- path: _path + ".updateAddresses",
525
- expected: "(boolean | undefined)",
526
- value: input.updateAddresses
527
- }), undefined === input.private || "boolean" === typeof input.private || $report(_exceptionable, {
528
- path: _path + ".private",
529
- expected: "(boolean | undefined)",
530
- value: input.private
531
- }), undefined === input.viewableWithLink || "boolean" === typeof input.viewableWithLink || $report(_exceptionable, {
532
- path: _path + ".viewableWithLink",
533
- expected: "(boolean | undefined)",
534
- value: input.viewableWithLink
535
- }), (Array.isArray(input.claims) || $report(_exceptionable, {
536
- path: _path + ".claims",
537
- expected: "Array<__type>",
538
- value: input.claims
539
- })) && input.claims.map((elem, _index3) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
540
- path: _path + ".claims[" + _index3 + "]",
541
- expected: "__type",
542
- value: elem
543
- })) && $vo2(elem, _path + ".claims[" + _index3 + "]", true && _exceptionable) || $report(_exceptionable, {
544
- path: _path + ".claims[" + _index3 + "]",
545
- expected: "__type",
546
- value: elem
547
- })).every(flag => flag) || $report(_exceptionable, {
548
- path: _path + ".claims",
549
- expected: "Array<__type>",
550
- value: input.claims
551
- })].every(flag => flag);
552
- const $vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.claimId || $report(_exceptionable, {
553
- path: _path + ".claimId",
554
- expected: "string",
555
- value: input.claimId
556
- }), (Array.isArray(input.plugins) || $report(_exceptionable, {
557
- path: _path + ".plugins",
558
- expected: "Array<IntegrationPluginDetails<string>>",
559
- value: input.plugins
560
- })) && input.plugins.map((elem, _index4) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
561
- path: _path + ".plugins[" + _index4 + "]",
562
- expected: "IntegrationPluginDetails<string>",
563
- value: elem
564
- })) && $vo3(elem, _path + ".plugins[" + _index4 + "]", true && _exceptionable) || $report(_exceptionable, {
565
- path: _path + ".plugins[" + _index4 + "]",
566
- expected: "IntegrationPluginDetails<string>",
567
- value: elem
568
- })).every(flag => flag) || $report(_exceptionable, {
569
- path: _path + ".plugins",
570
- expected: "Array<IntegrationPluginDetails<string>>",
571
- value: input.plugins
572
- }), undefined === input.approach || "string" === typeof input.approach || $report(_exceptionable, {
573
- path: _path + ".approach",
574
- expected: "(string | undefined)",
575
- value: input.approach
576
- })].every(flag => flag);
577
- const $vo3 = (input, _path, _exceptionable = true) => [("object" === typeof input.publicState && null !== input.publicState && false === Array.isArray(input.publicState) || $report(_exceptionable, {
578
- path: _path + ".publicState",
579
- expected: "Record<string, any>",
580
- value: input.publicState
581
- })) && $vo4(input.publicState, _path + ".publicState", true && _exceptionable) || $report(_exceptionable, {
582
- path: _path + ".publicState",
583
- expected: "Record<string, any>",
584
- value: input.publicState
585
- }), undefined === input.privateState || ("object" === typeof input.privateState && null !== input.privateState && false === Array.isArray(input.privateState) || $report(_exceptionable, {
586
- path: _path + ".privateState",
587
- expected: "(Record<string, any> | undefined)",
588
- value: input.privateState
589
- })) && $vo4(input.privateState, _path + ".privateState", true && _exceptionable) || $report(_exceptionable, {
590
- path: _path + ".privateState",
591
- expected: "(Record<string, any> | undefined)",
592
- value: input.privateState
593
- }), undefined === input.resetState || "boolean" === typeof input.resetState || $report(_exceptionable, {
594
- path: _path + ".resetState",
595
- expected: "(boolean | undefined)",
596
- value: input.resetState
597
- }), undefined === input.newState || ("object" === typeof input.newState && null !== input.newState && false === Array.isArray(input.newState) || $report(_exceptionable, {
598
- path: _path + ".newState",
599
- expected: "(Record<string, any> | undefined)",
600
- value: input.newState
601
- })) && $vo4(input.newState, _path + ".newState", true && _exceptionable) || $report(_exceptionable, {
602
- path: _path + ".newState",
603
- expected: "(Record<string, any> | undefined)",
604
- value: input.newState
605
- }), undefined === input.onlyUpdateProvidedNewState || "boolean" === typeof input.onlyUpdateProvidedNewState || $report(_exceptionable, {
606
- path: _path + ".onlyUpdateProvidedNewState",
607
- expected: "(boolean | undefined)",
608
- value: input.onlyUpdateProvidedNewState
609
- }), "string" === typeof input.instanceId || $report(_exceptionable, {
610
- path: _path + ".instanceId",
611
- expected: "string",
612
- value: input.instanceId
613
- }), "string" === typeof input.pluginId || $report(_exceptionable, {
614
- path: _path + ".pluginId",
615
- expected: "string",
616
- value: input.pluginId
617
- }), "string" === typeof input.version || $report(_exceptionable, {
618
- path: _path + ".version",
619
- expected: "string",
620
- value: input.version
621
- }), ("object" === typeof input.publicParams && null !== input.publicParams && false === Array.isArray(input.publicParams) || $report(_exceptionable, {
622
- path: _path + ".publicParams",
623
- expected: "Record<string, any>",
624
- value: input.publicParams
625
- })) && $vo4(input.publicParams, _path + ".publicParams", true && _exceptionable) || $report(_exceptionable, {
626
- path: _path + ".publicParams",
627
- expected: "Record<string, any>",
628
- value: input.publicParams
629
- }), ("object" === typeof input.privateParams && null !== input.privateParams && false === Array.isArray(input.privateParams) || $report(_exceptionable, {
630
- path: _path + ".privateParams",
631
- expected: "__type.o1",
632
- value: input.privateParams
633
- })) && $vo5(input.privateParams, _path + ".privateParams", true && _exceptionable) || $report(_exceptionable, {
634
- path: _path + ".privateParams",
635
- expected: "__type.o1",
636
- value: input.privateParams
637
- }), undefined === input.metadata || ("object" === typeof input.metadata && null !== input.metadata || $report(_exceptionable, {
638
- path: _path + ".metadata",
639
- expected: "(__type.o2 | undefined)",
640
- value: input.metadata
641
- })) && $vo6(input.metadata, _path + ".metadata", true && _exceptionable) || $report(_exceptionable, {
642
- path: _path + ".metadata",
643
- expected: "(__type.o2 | undefined)",
644
- value: input.metadata
645
- })].every(flag => flag);
646
- const $vo4 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
647
- const value = input[key];
648
- if (undefined === value)
649
- return true;
650
- return true;
651
- }).every(flag => flag)].every(flag => flag);
652
- const $vo5 = (input, _path, _exceptionable = true) => true;
653
- const $vo6 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || $report(_exceptionable, {
654
- path: _path + ".name",
655
- expected: "string",
656
- value: input.name
657
- }), "string" === typeof input.description || $report(_exceptionable, {
658
- path: _path + ".description",
659
- expected: "string",
660
- value: input.description
661
- })].every(flag => flag);
662
- return ("object" === typeof input && null !== input || $report(true, {
663
- path: _path + "",
664
- expected: "UpdateAddressListsPayload",
665
- value: input
666
- })) && $vo0(input, _path + "", true) || $report(true, {
667
- path: _path + "",
668
- expected: "UpdateAddressListsPayload",
669
- value: input
670
- });
671
- })(input, "$input", true);
622
+ errors = [];
623
+ $report = typia_1.default.validate.report(errors);
624
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || $report(true, {
625
+ path: _path + "",
626
+ expected: "UpdateAddressListsPayload",
627
+ value: input
628
+ })) && $vo0(input, _path + "", true) || $report(true, {
629
+ path: _path + "",
630
+ expected: "UpdateAddressListsPayload",
631
+ value: input
632
+ }))(input, "$input", true);
633
+ const success = 0 === errors.length;
634
+ return {
635
+ success,
636
+ errors,
637
+ data: success ? input : undefined
638
+ };
672
639
  }
673
- const success = 0 === errors.length;
674
640
  return {
675
- success,
676
- errors,
677
- data: success ? input : undefined
641
+ success: true,
642
+ errors: [],
643
+ data: input
678
644
  };
679
- })(payload ?? {});
645
+ }; })()(payload ?? {});
680
646
  if (!validateRes.success) {
681
647
  throw new Error('Invalid payload: ' + JSON.stringify(validateRes.errors));
682
648
  }
@@ -690,46 +656,44 @@ class BitBadgesAddressList extends docs_js_1.AddressListDoc {
690
656
  }
691
657
  static async DeleteAddressList(api, payload) {
692
658
  try {
693
- const validateRes = (input => {
694
- const errors = [];
695
- const __is = input => {
696
- const $io0 = input => Array.isArray(input.listIds) && input.listIds.every(elem => "string" === typeof elem);
697
- return "object" === typeof input && null !== input && $io0(input);
698
- };
659
+ const validateRes = (() => { const $io0 = input => Array.isArray(input.listIds) && input.listIds.every(elem => "string" === typeof elem); const $vo0 = (input, _path, _exceptionable = true) => [(Array.isArray(input.listIds) || $report(_exceptionable, {
660
+ path: _path + ".listIds",
661
+ expected: "Array<string>",
662
+ value: input.listIds
663
+ })) && input.listIds.map((elem, _index2) => "string" === typeof elem || $report(_exceptionable, {
664
+ path: _path + ".listIds[" + _index2 + "]",
665
+ expected: "string",
666
+ value: elem
667
+ })).every(flag => flag) || $report(_exceptionable, {
668
+ path: _path + ".listIds",
669
+ expected: "Array<string>",
670
+ value: input.listIds
671
+ })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && $io0(input); let errors; let $report; return input => {
699
672
  if (false === __is(input)) {
700
- const $report = typia_1.default.validate.report(errors);
701
- ((input, _path, _exceptionable = true) => {
702
- const $vo0 = (input, _path, _exceptionable = true) => [(Array.isArray(input.listIds) || $report(_exceptionable, {
703
- path: _path + ".listIds",
704
- expected: "Array<string>",
705
- value: input.listIds
706
- })) && input.listIds.map((elem, _index1) => "string" === typeof elem || $report(_exceptionable, {
707
- path: _path + ".listIds[" + _index1 + "]",
708
- expected: "string",
709
- value: elem
710
- })).every(flag => flag) || $report(_exceptionable, {
711
- path: _path + ".listIds",
712
- expected: "Array<string>",
713
- value: input.listIds
714
- })].every(flag => flag);
715
- return ("object" === typeof input && null !== input || $report(true, {
716
- path: _path + "",
717
- expected: "DeleteAddressListsPayload",
718
- value: input
719
- })) && $vo0(input, _path + "", true) || $report(true, {
720
- path: _path + "",
721
- expected: "DeleteAddressListsPayload",
722
- value: input
723
- });
724
- })(input, "$input", true);
673
+ errors = [];
674
+ $report = typia_1.default.validate.report(errors);
675
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || $report(true, {
676
+ path: _path + "",
677
+ expected: "DeleteAddressListsPayload",
678
+ value: input
679
+ })) && $vo0(input, _path + "", true) || $report(true, {
680
+ path: _path + "",
681
+ expected: "DeleteAddressListsPayload",
682
+ value: input
683
+ }))(input, "$input", true);
684
+ const success = 0 === errors.length;
685
+ return {
686
+ success,
687
+ errors,
688
+ data: success ? input : undefined
689
+ };
725
690
  }
726
- const success = 0 === errors.length;
727
691
  return {
728
- success,
729
- errors,
730
- data: success ? input : undefined
692
+ success: true,
693
+ errors: [],
694
+ data: input
731
695
  };
732
- })(payload ?? {});
696
+ }; })()(payload ?? {});
733
697
  if (!validateRes.success) {
734
698
  throw new Error('Invalid payload: ' + JSON.stringify(validateRes.errors));
735
699
  }