wallaby-cash 3.3.0 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base.d.ts +4 -1
- package/dist/eth-crypto-utils/createIdentity.d.ts +0 -1
- package/dist/helpers/base64.d.ts +5 -4
- package/dist/index.cjs.js +333 -454
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +3 -9
- package/dist/index.esm.js +333 -454
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +313 -428
- package/dist/index.js.map +1 -1
- package/dist/lib/api/api.d.ts +2 -1
- package/dist/lib/auth/auth.service.d.ts +10 -2
- package/dist/lib/auth/passkey.service.base.d.ts +2 -1
- package/dist/lib/index.d.ts +0 -1
- package/dist/lib/swap/index.d.ts +2 -1
- package/dist/lib/system/index.d.ts +2 -1
- package/dist/lib/transactions/index.d.ts +2 -1
- package/dist/lib/utils/cipher.service.d.ts +6 -0
- package/dist/lib/utils/index.d.ts +2 -1
- package/dist/lib/utils/is-jwt-expired.d.ts +3 -3
- package/dist/lib/utils/ports.d.ts +22 -0
- package/dist/lib/wallet/wallet-data.service.d.ts +2 -1
- package/dist/lib/wallet/wallet-handlers.service.d.ts +20 -2
- package/dist/lib/wallet/wallet.service.d.ts +21 -3
- package/dist/package.json +1 -0
- package/dist/routes/auth.d.ts +5 -0
- package/dist/types/storage.d.ts +3 -1
- package/package.json +2 -1
- package/dist/lib/merchants/index.d.ts +0 -59
- package/dist/routes/merchants.d.ts +0 -48
package/dist/lib/api/api.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { WallabyConfig } from '../../types';
|
|
2
2
|
import { Base } from '../../base';
|
|
3
|
+
import { Ports } from '../utils/ports';
|
|
3
4
|
/**
|
|
4
5
|
* HttpApi provides direct access to all REST API endpoints.
|
|
5
6
|
* This class extends the Base class and includes the generated API client
|
|
@@ -14,5 +15,5 @@ export declare class HttpApi extends Base {
|
|
|
14
15
|
* @param config - The Wallaby configuration object
|
|
15
16
|
* @public
|
|
16
17
|
*/
|
|
17
|
-
constructor(config: WallabyConfig);
|
|
18
|
+
constructor(config: WallabyConfig, ports?: Partial<Ports>);
|
|
18
19
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Base } from '../../base';
|
|
2
|
+
import { Ports } from '../utils/ports';
|
|
2
3
|
import { SignatureMessageResponse, WallabyConfig, AuthenticationResponse, AsymmetricKeyPair, GetSignatureOptions, AuthenticationRequest } from '../../types';
|
|
3
|
-
import { GetPasskeyCredentialsData } from '../../generated/api';
|
|
4
|
+
import { GetPasskeyCredentialsData, IssueJWTTokenResponseDto } from '../../generated/api';
|
|
4
5
|
export declare class AuthService extends Base {
|
|
5
6
|
private passkeyService;
|
|
6
|
-
constructor(config: WallabyConfig);
|
|
7
|
+
constructor(config: WallabyConfig, ports?: Partial<Ports>);
|
|
7
8
|
/**
|
|
8
9
|
* @description
|
|
9
10
|
* This method is used to check if the user is on a device that supports PRF.
|
|
@@ -94,4 +95,11 @@ export declare class AuthService extends Base {
|
|
|
94
95
|
valid: boolean;
|
|
95
96
|
message?: string;
|
|
96
97
|
}>;
|
|
98
|
+
/**
|
|
99
|
+
* @description Exchanges the client JWT (set at SDK initialisation) for a
|
|
100
|
+
* Wallaby access + refresh token pair. Tokens are persisted to storage so
|
|
101
|
+
* subsequent SDK calls use them automatically.
|
|
102
|
+
* @returns {Promise<IssueJWTTokenResponseDto>} The issued access/refresh tokens and basic user info.
|
|
103
|
+
*/
|
|
104
|
+
exchangeClientToken(): Promise<IssueJWTTokenResponseDto>;
|
|
97
105
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AsymmetricKeyPair, Encrypted, SignatureMessageResponse, AuthenticationResponse, RequestOptions, RequestRoute } from '../../types';
|
|
2
|
+
import { Cipher } from '../utils/cipher.service';
|
|
2
3
|
import { StorageService } from '../utils/storage.service';
|
|
3
4
|
import { AuthService } from './auth.service';
|
|
4
5
|
export declare class PasskeyService {
|
|
@@ -7,7 +8,7 @@ export declare class PasskeyService {
|
|
|
7
8
|
private userId;
|
|
8
9
|
private request;
|
|
9
10
|
private authenticator;
|
|
10
|
-
constructor(userId: string, storageService: StorageService, request: <T = any>(route: RequestRoute, options?: RequestOptions) => Promise<T
|
|
11
|
+
constructor(userId: string, storageService: StorageService, request: <T = any>(route: RequestRoute, options?: RequestOptions) => Promise<T>, cipher?: Cipher);
|
|
11
12
|
private preparePasskeyRequestOptions;
|
|
12
13
|
private preparePasskeyCreationOptions;
|
|
13
14
|
/**
|
package/dist/lib/index.d.ts
CHANGED
package/dist/lib/swap/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Base } from '../../base';
|
|
2
|
+
import { Ports } from '../utils/ports';
|
|
2
3
|
import { WallabyConfig, SwapQuoteRequest, SwapQuoteResponse, ExecuteSwapRequest, ExecuteSwapResponse, GetSwapsRequest, GetSwapsResponse } from '../../types';
|
|
3
4
|
export declare class Swap extends Base {
|
|
4
5
|
private authService;
|
|
5
6
|
private walletService;
|
|
6
|
-
constructor(config: WallabyConfig);
|
|
7
|
+
constructor(config: WallabyConfig, ports?: Partial<Ports>);
|
|
7
8
|
/**
|
|
8
9
|
* Gets a swap quote between two assets, including fees, min output, and slippage limits.
|
|
9
10
|
*
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Base } from '../../base';
|
|
2
|
+
import { Ports } from '../utils/ports';
|
|
2
3
|
import { WallabyConfig, Blockchain, AssetConfig, User, BlockchainName } from '../../types';
|
|
3
4
|
export declare class System extends Base {
|
|
4
|
-
constructor(config: WallabyConfig);
|
|
5
|
+
constructor(config: WallabyConfig, ports?: Partial<Ports>);
|
|
5
6
|
/**
|
|
6
7
|
* @public
|
|
7
8
|
* Get all supported chains
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Base } from '../../base';
|
|
2
|
+
import { Ports } from '../utils/ports';
|
|
2
3
|
import { WallabyConfig, FeeEstimatesResponse, BlockchainName, GetPendingTransactionsRequest, GetPendingTransactionsResponse, ResolvePendingTransactionRequest, ResolvePendingTransactionResponse, TransactionResponse, FeeEstimateRequest } from '../../types';
|
|
3
4
|
import { DetectRestrictionResponseDto, GetRestrictionParams, GetTransactionsParams, GetTransactionsResponseDto } from '../../generated/api';
|
|
4
5
|
import { CreateAllowanceRequest, TransactionStatusResponse, TransferRequest } from '../../types';
|
|
5
6
|
export declare class Transactions extends Base {
|
|
6
7
|
private authService;
|
|
7
8
|
private walletService;
|
|
8
|
-
constructor(config: WallabyConfig);
|
|
9
|
+
constructor(config: WallabyConfig, ports?: Partial<Ports>);
|
|
9
10
|
/**
|
|
10
11
|
*
|
|
11
12
|
* @public
|
|
@@ -27,6 +27,12 @@ export declare class Cipher {
|
|
|
27
27
|
encryptWithMasterKey({ data }: {
|
|
28
28
|
data: string | object;
|
|
29
29
|
}): string;
|
|
30
|
+
/**
|
|
31
|
+
* @description Determines deterministically whether a stored value was wrapped by the master key,
|
|
32
|
+
* without inferring from decrypt behavior. Returns true for values carrying the version marker, or
|
|
33
|
+
* legacy crypto-js ciphertext stored before the marker existed. Everything else is treated as raw.
|
|
34
|
+
*/
|
|
35
|
+
isWrappedByMasterKey(value: string): boolean;
|
|
30
36
|
decryptWithMasterKey<T>({ cipherText }: {
|
|
31
37
|
cipherText: string;
|
|
32
38
|
}): string | T | undefined;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { UtilsResponse, PasswordValidatorResponse, WallabyConfig, RequestMethod } from '../../types';
|
|
2
2
|
import { Base } from '../../base';
|
|
3
|
+
import { Ports } from './ports';
|
|
3
4
|
export declare class Utils extends Base {
|
|
4
5
|
private auth;
|
|
5
|
-
constructor(config: WallabyConfig);
|
|
6
|
+
constructor(config: WallabyConfig, ports?: Partial<Ports>);
|
|
6
7
|
/**
|
|
7
8
|
*
|
|
8
9
|
* @param { string } password
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @param jwt - The JWT string to check. If null, the function will return true.
|
|
5
5
|
* @returns `true` if the JWT has expired or is null, otherwise `false`.
|
|
6
6
|
*/
|
|
7
|
-
export declare function jwtHasExpired(jwt: string | null): boolean;
|
|
7
|
+
export declare function jwtHasExpired(jwt: string | null, now?: () => number): boolean;
|
|
8
8
|
export declare function jwtHasSameUser(jwt: string | null, userId: string): boolean;
|
|
9
9
|
export declare function userIsMfaVerified(jwt: string): boolean;
|
|
10
10
|
/**
|
|
@@ -14,11 +14,11 @@ export declare function userIsMfaVerified(jwt: string): boolean;
|
|
|
14
14
|
* @param thresholdSeconds - Number of seconds before expiry to consider "near expiry".
|
|
15
15
|
* @returns `true` if the JWT expires within `thresholdSeconds` seconds, otherwise `false`.
|
|
16
16
|
*/
|
|
17
|
-
export declare function isJwtNearExpiry(jwt: string | null, thresholdSeconds: number): boolean;
|
|
17
|
+
export declare function isJwtNearExpiry(jwt: string | null, thresholdSeconds: number, now?: () => number): boolean;
|
|
18
18
|
/**
|
|
19
19
|
* Calculates the remaining time in milliseconds until a given JWT expires.
|
|
20
20
|
*
|
|
21
21
|
* @param jwt - The JWT string to decode and check.
|
|
22
22
|
* @returns The number of milliseconds until the JWT expires. If the JWT has already expired, the returned value will be less than or equal to 0.
|
|
23
23
|
*/
|
|
24
|
-
export declare function millisecondsToJWTTimeout(jwt: string): number;
|
|
24
|
+
export declare function millisecondsToJWTTimeout(jwt: string, now?: () => number): number;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Cipher } from './cipher.service';
|
|
2
|
+
/**
|
|
3
|
+
* Internal boundary ports injected into {@link Base} and the service tree.
|
|
4
|
+
*
|
|
5
|
+
* These are *not* part of the public SDK config. They exist so tests can supply
|
|
6
|
+
* in-memory fakes (a route-backed transport, a fixed clock, a stub cipher)
|
|
7
|
+
* instead of intercepting the network or relying on real crypto/time.
|
|
8
|
+
*
|
|
9
|
+
* Storage is intentionally absent: it already rides on `config.options.storage`,
|
|
10
|
+
* which propagates through every `new XService(config)` for free.
|
|
11
|
+
*
|
|
12
|
+
* Every port is optional; {@link Base} fills in the real adapter (global `fetch`,
|
|
13
|
+
* `Date.now`, `new Cipher()`) when a port is not provided.
|
|
14
|
+
*/
|
|
15
|
+
export interface Clock {
|
|
16
|
+
now(): number;
|
|
17
|
+
}
|
|
18
|
+
export interface Ports {
|
|
19
|
+
transport: typeof fetch;
|
|
20
|
+
clock: Clock;
|
|
21
|
+
cipher: Cipher;
|
|
22
|
+
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Base } from '../../base';
|
|
2
|
+
import { Ports } from '../utils/ports';
|
|
2
3
|
import { AddTokenToWalletRequest, BlockchainName, QueryUserRequest, QueryWalletRequest, TokenBalanceRequest, UpdateAssetRequest, WallabyConfig, WalletAddressesInfoEntry, AuthenticationResponse, AddTokenToWalletResponse, TokenBalanceResponse, TokenBalance, UpdateAssetResponse } from '../../types';
|
|
3
4
|
import { FetchBalanceData, GetAllWalletsFromUserIdData, GetAssetsByUserIdData, GetUserAssetsByWalletIdData } from '../../generated/api';
|
|
4
5
|
export declare class WalletDataService extends Base {
|
|
5
6
|
private walletService;
|
|
6
|
-
constructor(config: WallabyConfig);
|
|
7
|
+
constructor(config: WallabyConfig, ports?: Partial<Ports>);
|
|
7
8
|
/**
|
|
8
9
|
* @description Validates the wallet address info for a given blockchain.
|
|
9
10
|
* @param { WalletAddressesInfoEntry } walletAddressesInfo The wallet address info array containing addresses for different blockchains.
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Base } from '../../base';
|
|
2
|
+
import { Ports } from '../utils/ports';
|
|
2
3
|
import { ImportWalletRequest, CreateWalletRequest, Encrypted, WallabyConfig, ImportWalletResponse, RecoverWalletResponse, SymmetricEncrypted } from '../../types';
|
|
3
4
|
import { KeyShareDto } from '../../generated/api';
|
|
4
5
|
export declare class WalletHandlersService extends Base {
|
|
5
6
|
private authService;
|
|
6
|
-
constructor(config: WallabyConfig);
|
|
7
|
+
constructor(config: WallabyConfig, ports?: Partial<Ports>);
|
|
7
8
|
handleImportWallet(deviceAuthKeys: {
|
|
8
9
|
publicKey: string;
|
|
9
10
|
privateKey: string;
|
|
@@ -35,7 +36,23 @@ export declare class WalletHandlersService extends Base {
|
|
|
35
36
|
walletAddressesInfo: import("../../types").WalletAddressesInfoEntry[];
|
|
36
37
|
error?: any;
|
|
37
38
|
}>;
|
|
38
|
-
|
|
39
|
+
/**
|
|
40
|
+
* Encrypted share format contract (WAL-1467)
|
|
41
|
+
* --------------------------------------------------------------------------
|
|
42
|
+
* Every flow that ingests shares from the API (import, create, recover,
|
|
43
|
+
* addNewDevice) routes through here, so the contract is asserted in one place.
|
|
44
|
+
*
|
|
45
|
+
* The API returns the main device share as `shares[0]`, an ECIES payload
|
|
46
|
+
* ({ iv, ephemPublicKey, ciphertext, mac }) wrapped to the device public key,
|
|
47
|
+
* so it MUST peel with the device private key. `encryptedBackupShare` is an
|
|
48
|
+
* already-wrapped blob (ECIES or symmetric) that the device cannot decrypt, so
|
|
49
|
+
* it is stored as-is.
|
|
50
|
+
*
|
|
51
|
+
* We shape-assert every share (and the backup share) here, at ingestion, so a
|
|
52
|
+
* server-side wrapping change fails loudly now instead of silently breaking
|
|
53
|
+
* export/recovery later.
|
|
54
|
+
*/
|
|
55
|
+
handleKeySharesFromResponse({ walletId, shares, credentialsKeyPair, encryptedBackupShare, devicePrivateKey, }: {
|
|
39
56
|
walletId: string;
|
|
40
57
|
shares: KeyShareDto[];
|
|
41
58
|
credentialsKeyPair: {
|
|
@@ -43,6 +60,7 @@ export declare class WalletHandlersService extends Base {
|
|
|
43
60
|
privateKey: string;
|
|
44
61
|
};
|
|
45
62
|
encryptedBackupShare: Encrypted | SymmetricEncrypted;
|
|
63
|
+
devicePrivateKey: string;
|
|
46
64
|
}): Promise<Encrypted[]>;
|
|
47
65
|
handleSeedPhraseFromResponse({ walletId, encryptedSeed, devicePrivateKey, credentialsKeyPair, storeSeedPhrase, }: {
|
|
48
66
|
walletId: string;
|
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
import { Base } from '../../base';
|
|
2
|
+
import { Ports } from '../utils/ports';
|
|
2
3
|
import { CreateWalletRequest, CreateWalletResponse, Encrypted, WallabyConfig, ExportWalletRequest, ImportWalletRequest, AddNewDeviceRequest, RecoverWalletRequest, InitAddNewDeviceResponse, GenerateMissingAddressResponseDto, AuthenticationResponse, BlockchainName, ImportWalletResponse, RecoverWalletResponse } from '../../types';
|
|
3
4
|
export declare class WalletService extends Base {
|
|
4
5
|
private authService;
|
|
5
6
|
private handlers;
|
|
6
7
|
private passkeyService;
|
|
7
|
-
private
|
|
8
|
-
private
|
|
9
|
-
constructor(config: WallabyConfig);
|
|
8
|
+
private static readonly RATE_LIMIT_MAX;
|
|
9
|
+
private static readonly RATE_LIMIT_WINDOW_MS;
|
|
10
|
+
constructor(config: WallabyConfig, ports?: Partial<Ports>);
|
|
11
|
+
/**
|
|
12
|
+
* Reads the persisted sliding-window rate-limit state for a counter key.
|
|
13
|
+
* Returns a fresh window ({ count: 0 }) when none is stored or the window has expired.
|
|
14
|
+
*/
|
|
15
|
+
private getRateState;
|
|
16
|
+
/** Increments and persists the counter (resetting an expired window). Returns the new count. */
|
|
17
|
+
private recordRateAttempt;
|
|
18
|
+
/** Throws a 429 when the counter is already over the limit, without incrementing it. */
|
|
19
|
+
private assertUnderRateLimit;
|
|
10
20
|
/**
|
|
11
21
|
* @public
|
|
12
22
|
* @returns {boolean} Returns true if the device has a seed phrase.
|
|
@@ -155,6 +165,14 @@ export declare class WalletService extends Base {
|
|
|
155
165
|
authenticationOptions: AuthenticationResponse;
|
|
156
166
|
blockchainName?: BlockchainName;
|
|
157
167
|
}): Promise<GenerateMissingAddressResponseDto>;
|
|
168
|
+
/**
|
|
169
|
+
* Wraps handleUpdateToV2 with the standard user-facing error. All call sites that gate on
|
|
170
|
+
* `AuthType.Password` should go through here so the error message stays consistent.
|
|
171
|
+
*/
|
|
172
|
+
migrateToV2Safe({ password, walletId }: {
|
|
173
|
+
password: string;
|
|
174
|
+
walletId: string;
|
|
175
|
+
}): Promise<void>;
|
|
158
176
|
/**
|
|
159
177
|
* Detects and migrates legacy/v1 storage items to v2 format.
|
|
160
178
|
* This function should be called in methods that use password as input when v2 items are missing.
|
package/dist/package.json
CHANGED
package/dist/routes/auth.d.ts
CHANGED
package/dist/types/storage.d.ts
CHANGED
|
@@ -58,5 +58,7 @@ export declare enum V2KeyNames {
|
|
|
58
58
|
PrimaryDeviceKeyShare = "primary-device-key-share",
|
|
59
59
|
WallabyAuthPubKey = "wallaby-auth-pub-key",
|
|
60
60
|
MigrationVersion = "wsdk_migrated_with_version",
|
|
61
|
-
LastMigratedAt = "wsdk_last_migrated_at"
|
|
61
|
+
LastMigratedAt = "wsdk_last_migrated_at",
|
|
62
|
+
PasswordResetAttempts = "wsdk_password_reset_attempts",
|
|
63
|
+
MigrationAttempts = "wsdk_migration_attempts"
|
|
62
64
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wallaby-cash",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/WALLABY-WaaS/wallaby-sdk-js"
|
|
@@ -127,6 +127,7 @@
|
|
|
127
127
|
}
|
|
128
128
|
},
|
|
129
129
|
"overrides": {
|
|
130
|
+
"sigstore": "^4.1.1",
|
|
130
131
|
"@babel/core": "^7.29.6",
|
|
131
132
|
"lodash": "^4.18.0",
|
|
132
133
|
"@tootallnate/once": "^3.0.1",
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { Base } from '../../base';
|
|
2
|
-
import { WallabyConfig } from '../../types';
|
|
3
|
-
import { ListMerchantsResponse, Merchant, MerchantAsset, MerchantStatus } from '../../types/merchants';
|
|
4
|
-
export declare class Merchants extends Base {
|
|
5
|
-
constructor(config: WallabyConfig);
|
|
6
|
-
/**
|
|
7
|
-
* @description
|
|
8
|
-
* Retrieves the merchant ID from access token `aud` claim.
|
|
9
|
-
* Even though merchantId is possibly undefined. If an access token is not stored on device, the request will most likely
|
|
10
|
-
* not have it in headers and will fail with 401 regardless.
|
|
11
|
-
*
|
|
12
|
-
* @returns { string | undefined } Merchant ID
|
|
13
|
-
*/
|
|
14
|
-
private _getMerchantId;
|
|
15
|
-
/**
|
|
16
|
-
*
|
|
17
|
-
* @public
|
|
18
|
-
* List of all merchants in the system
|
|
19
|
-
* @returns { ListMerchantsResponse } Array of all merchants
|
|
20
|
-
*/
|
|
21
|
-
list(): Promise<ListMerchantsResponse>;
|
|
22
|
-
/**
|
|
23
|
-
*
|
|
24
|
-
* @public
|
|
25
|
-
* Allows to create a new merchant
|
|
26
|
-
* @returns { Merchant } Merchant data
|
|
27
|
-
*/
|
|
28
|
-
create({ name }: {
|
|
29
|
-
name: string;
|
|
30
|
-
}): Promise<Merchant>;
|
|
31
|
-
/**
|
|
32
|
-
*
|
|
33
|
-
* @public
|
|
34
|
-
* Allows to update merchant data
|
|
35
|
-
* @returns { Merchant } Merchant data
|
|
36
|
-
*/
|
|
37
|
-
update({ name, status }: {
|
|
38
|
-
name?: string;
|
|
39
|
-
status?: MerchantStatus;
|
|
40
|
-
}): Promise<Merchant>;
|
|
41
|
-
/**
|
|
42
|
-
*
|
|
43
|
-
* @public
|
|
44
|
-
* @returns { Merchant } Merchant data
|
|
45
|
-
*/
|
|
46
|
-
getMerchantData(): Promise<Merchant>;
|
|
47
|
-
/**
|
|
48
|
-
*
|
|
49
|
-
* @public
|
|
50
|
-
* @returns { MerchantAsset[] } List of merchant assets
|
|
51
|
-
*/
|
|
52
|
-
getAssets(): Promise<MerchantAsset[]>;
|
|
53
|
-
addAsset({ configId }: {
|
|
54
|
-
configId: string;
|
|
55
|
-
}): Promise<unknown>;
|
|
56
|
-
deleteAsset({ configId }: {
|
|
57
|
-
configId: string;
|
|
58
|
-
}): Promise<unknown>;
|
|
59
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { RequestMethod } from '../types';
|
|
2
|
-
export declare const MerchantsRoutes: {
|
|
3
|
-
create: {
|
|
4
|
-
fullPath: string;
|
|
5
|
-
method: RequestMethod;
|
|
6
|
-
requiresAccessToken: boolean;
|
|
7
|
-
};
|
|
8
|
-
update: {
|
|
9
|
-
fullPath: ({ merchantId }: {
|
|
10
|
-
merchantId: string;
|
|
11
|
-
}) => string;
|
|
12
|
-
method: RequestMethod;
|
|
13
|
-
requiresAccessToken: boolean;
|
|
14
|
-
};
|
|
15
|
-
getMerchantData: {
|
|
16
|
-
fullPath: ({ merchantId }: {
|
|
17
|
-
merchantId: string;
|
|
18
|
-
}) => string;
|
|
19
|
-
method: RequestMethod;
|
|
20
|
-
requiresAccessToken: boolean;
|
|
21
|
-
};
|
|
22
|
-
list: {
|
|
23
|
-
fullPath: string;
|
|
24
|
-
method: RequestMethod;
|
|
25
|
-
requiresAccessToken: boolean;
|
|
26
|
-
};
|
|
27
|
-
getAssets: {
|
|
28
|
-
fullPath: () => string;
|
|
29
|
-
method: RequestMethod;
|
|
30
|
-
requiresAccessToken: boolean;
|
|
31
|
-
};
|
|
32
|
-
addAsset: {
|
|
33
|
-
fullPath: ({ merchantId, configId }: {
|
|
34
|
-
merchantId: string;
|
|
35
|
-
configId: string;
|
|
36
|
-
}) => string;
|
|
37
|
-
method: RequestMethod;
|
|
38
|
-
requiresAccessToken: boolean;
|
|
39
|
-
};
|
|
40
|
-
deleteAsset: {
|
|
41
|
-
fullPath: ({ merchantId, configId }: {
|
|
42
|
-
merchantId: string;
|
|
43
|
-
configId: string;
|
|
44
|
-
}) => string;
|
|
45
|
-
method: RequestMethod;
|
|
46
|
-
requiresAccessToken: boolean;
|
|
47
|
-
};
|
|
48
|
-
};
|