wapi-client 0.8.1 → 0.8.3
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/api/http-client.browser.cjs +4 -538
- package/dist/api/http-client.browser.js +4 -548
- package/dist/api/http-client.cjs +4 -14
- package/dist/api/http-client.js +2 -2
- package/dist/api/ws-client.cjs +1 -1
- package/dist/api/ws-client.js +1 -1
- package/dist/client.cjs +1 -1
- package/dist/client.js +1 -1
- package/dist/fns/create-access-token/create-access-token.browser.cjs +24 -1
- package/dist/fns/create-access-token/create-access-token.browser.js +24 -1
- package/dist/fns/create-access-token/create-access-token.cjs +24 -1
- package/dist/fns/create-access-token/create-access-token.enums.d.ts +14 -2
- package/dist/fns/create-access-token/create-access-token.js +24 -1
- package/dist/fns/create-access-token/create-access-token.schema.input.json +50 -1
- package/dist/lib/isomorphic/node/fetch.cjs +6732 -0
- package/dist/lib/isomorphic/node/fetch.d.ts +2 -0
- package/dist/lib/isomorphic/node/fetch.js +6731 -0
- package/dist/lib/isomorphic/web/fetch.browser.cjs +26 -0
- package/dist/lib/isomorphic/web/fetch.browser.js +6 -0
- package/dist/txs/create-access-token/create-access-token.schema.input.json +0 -6
- package/dist/types/index.d.ts +20 -3
- package/dist/wapi-client-web.iife.js +6 -7
- package/dist/wapi-client.iife.js +6 -7
- package/package.json +2 -2
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/lib/isomorphic/web/fetch.ts
|
|
20
|
+
var fetch_exports = {};
|
|
21
|
+
__export(fetch_exports, {
|
|
22
|
+
fetch: () => realFetch
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(fetch_exports);
|
|
25
|
+
var global = typeof globalThis !== "undefined" && globalThis || typeof self !== "undefined" && self || typeof global !== "undefined" && global;
|
|
26
|
+
var realFetch = global.fetch;
|
|
@@ -57,9 +57,6 @@
|
|
|
57
57
|
"expiresIn": {
|
|
58
58
|
"description": "JWT expiration time in minutes",
|
|
59
59
|
"type": "number"
|
|
60
|
-
},
|
|
61
|
-
"options": {
|
|
62
|
-
"$ref": "#/definitions/create_access_token_tx_options"
|
|
63
60
|
}
|
|
64
61
|
},
|
|
65
62
|
"required": ["scopes", "type", "expiresIn"],
|
|
@@ -74,9 +71,6 @@
|
|
|
74
71
|
"expiresIn": {
|
|
75
72
|
"description": "JWT expiration time in minutes",
|
|
76
73
|
"type": "number"
|
|
77
|
-
},
|
|
78
|
-
"options": {
|
|
79
|
-
"$ref": "#/definitions/create_access_token_tx_options"
|
|
80
74
|
}
|
|
81
75
|
},
|
|
82
76
|
"required": ["type", "expiresIn"],
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
2
|
/// <reference types="node" />
|
|
3
3
|
/// <reference types="node" />
|
|
4
4
|
declare module 'wapi-client/lib/ws-types' {
|
|
@@ -2947,7 +2947,19 @@ declare module 'wapi-client/txs/create-access-token/create-access-token.enums' {
|
|
|
2947
2947
|
}
|
|
2948
2948
|
}
|
|
2949
2949
|
declare module 'wapi-client/fns/create-access-token/create-access-token.enums' {
|
|
2950
|
-
import {
|
|
2950
|
+
import { CreateAccessTokenAdmin, CreateAccessTokenTxOptions, CreateAccessTokenForcedFilters, CreateAccessTokenTxOutput } from 'wapi-client/txs/create-access-token/create-access-token.enums';
|
|
2951
|
+
export interface CreateAccessTokenFnLimited {
|
|
2952
|
+
type: 'limited';
|
|
2953
|
+
scopes: ('aggregateTransfers' | 'findBalances' | 'findTokens' | 'findTransferGroups' | 'findTransfers' | 'findWallets' | 'aggregateTransferMany' | 'findBalanceMany' | 'findTokenMany' | 'findTransferGroupMany' | 'findTransferMany' | 'findWalletMany' | 'getBalance' | 'getBalanceHistory' | 'getStatistics' | 'getToken' | 'getTokenMany' | 'getTransfer' | 'getTransferGroup' | 'getWallet' | 'getWalletMany')[];
|
|
2954
|
+
/**
|
|
2955
|
+
* JWT expiration time in minutes
|
|
2956
|
+
*/
|
|
2957
|
+
expiresIn: number;
|
|
2958
|
+
/**
|
|
2959
|
+
* Forced filters for requests
|
|
2960
|
+
*/
|
|
2961
|
+
filters?: CreateAccessTokenForcedFilters;
|
|
2962
|
+
}
|
|
2951
2963
|
/**
|
|
2952
2964
|
* Optional flags for input
|
|
2953
2965
|
*/
|
|
@@ -2961,7 +2973,7 @@ declare module 'wapi-client/fns/create-access-token/create-access-token.enums' {
|
|
|
2961
2973
|
/**
|
|
2962
2974
|
* Properties of the token to create
|
|
2963
2975
|
*/
|
|
2964
|
-
token?:
|
|
2976
|
+
token?: CreateAccessTokenFnLimited | CreateAccessTokenAdmin;
|
|
2965
2977
|
options?: CreateAccessTokenFnOptions;
|
|
2966
2978
|
}
|
|
2967
2979
|
/**
|
|
@@ -8808,6 +8820,7 @@ export * from 'wapi-client/fns/update-wallet/update-wallet.enums';
|
|
|
8808
8820
|
export * from 'wapi-client/fns/update-wallet/update-wallet';
|
|
8809
8821
|
export * from 'wapi-client/lib/isomorphic/node/get-random-hex';
|
|
8810
8822
|
export * from 'wapi-client/lib/utils';
|
|
8823
|
+
export * from 'wapi-client/lib/isomorphic/node/fetch';
|
|
8811
8824
|
export * from 'wapi-client/api/http-client';
|
|
8812
8825
|
export * from 'wapi-client/txs/import-actions/import-actions.guards';
|
|
8813
8826
|
export * from 'wapi-client/txs/authentication-check/authentication-check.enums';
|
|
@@ -9002,6 +9015,10 @@ declare module 'wapi-client/lib/utils' {
|
|
|
9002
9015
|
export function isFutureDate(dateString: string): boolean;
|
|
9003
9016
|
export function isDateTime(str: string): boolean;
|
|
9004
9017
|
}
|
|
9018
|
+
declare module 'wapi-client/lib/isomorphic/node/fetch' {
|
|
9019
|
+
const fetchFn: (url: Parameters<typeof fetch>[0], options: Parameters<typeof fetch>[1]) => Promise<Response>;
|
|
9020
|
+
export { fetchFn as fetch };
|
|
9021
|
+
}
|
|
9005
9022
|
declare module 'wapi-client/api/http-client' {
|
|
9006
9023
|
import { WapiHttpConnectionOptions } from 'wapi-client/api/index';
|
|
9007
9024
|
import { JSONRPCRequest, JSONRPCResponse } from 'wapi-client/api/jsonrpc/jsonrpc.enums';
|