@upcoming/bee-js 0.3.0 → 0.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/cjs/bee-dev.js +78 -0
- package/dist/cjs/bee.js +69 -113
- package/dist/cjs/feed/retrievable.js +4 -4
- package/dist/cjs/index.js +3 -1
- package/dist/cjs/modules/bytes.js +12 -4
- package/dist/cjs/modules/bzz.js +12 -27
- package/dist/cjs/modules/chunk.js +6 -3
- package/dist/cjs/modules/debug/connectivity.js +2 -1
- package/dist/cjs/modules/feed.js +1 -1
- package/dist/cjs/modules/grantee.js +9 -8
- package/dist/cjs/modules/pss.js +1 -1
- package/dist/cjs/modules/soc.js +4 -2
- package/dist/cjs/utils/collection.js +1 -1
- package/dist/cjs/utils/collection.node.js +0 -1
- package/dist/cjs/utils/expose.js +2 -1
- package/dist/cjs/utils/headers.js +61 -54
- package/dist/cjs/utils/http.js +9 -0
- package/dist/cjs/utils/tar-uploader.browser.js +2 -2
- package/dist/cjs/utils/tar-uploader.js +2 -2
- package/dist/cjs/utils/type.js +119 -191
- package/dist/index.browser.min.js +1 -1
- package/dist/index.browser.min.js.map +1 -1
- package/dist/mjs/bee-dev.js +98 -0
- package/dist/mjs/bee.js +75 -117
- package/dist/mjs/feed/retrievable.js +4 -4
- package/dist/mjs/index.js +2 -1
- package/dist/mjs/modules/bytes.js +13 -7
- package/dist/mjs/modules/bzz.js +9 -25
- package/dist/mjs/modules/chunk.js +7 -6
- package/dist/mjs/modules/debug/connectivity.js +1 -1
- package/dist/mjs/modules/feed.js +2 -2
- package/dist/mjs/modules/grantee.js +12 -11
- package/dist/mjs/modules/pss.js +2 -2
- package/dist/mjs/modules/soc.js +4 -4
- package/dist/mjs/utils/collection.js +1 -1
- package/dist/mjs/utils/collection.node.js +0 -1
- package/dist/mjs/utils/expose.js +1 -1
- package/dist/mjs/utils/headers.js +59 -50
- package/dist/mjs/utils/http.js +9 -0
- package/dist/mjs/utils/tar-uploader.browser.js +2 -2
- package/dist/mjs/utils/tar-uploader.js +2 -2
- package/dist/mjs/utils/type.js +202 -163
- package/dist/types/bee-dev.d.ts +5 -0
- package/dist/types/bee.d.ts +21 -21
- package/dist/types/feed/retrievable.d.ts +2 -2
- package/dist/types/index.d.ts +3 -1
- package/dist/types/modules/bytes.d.ts +4 -4
- package/dist/types/modules/bzz.d.ts +5 -10
- package/dist/types/modules/chunk.d.ts +2 -2
- package/dist/types/modules/debug/chequebook.d.ts +2 -2
- package/dist/types/modules/debug/connectivity.d.ts +2 -1
- package/dist/types/modules/grantee.d.ts +4 -4
- package/dist/types/types/debug.d.ts +0 -1
- package/dist/types/types/index.d.ts +12 -6
- package/dist/types/utils/collection.d.ts +1 -1
- package/dist/types/utils/collection.node.d.ts +0 -1
- package/dist/types/utils/expose.d.ts +1 -1
- package/dist/types/utils/headers.d.ts +2 -4
- package/dist/types/utils/tar-uploader.browser.d.ts +2 -2
- package/dist/types/utils/tar-uploader.d.ts +2 -2
- package/dist/types/utils/type.d.ts +12 -18
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BeeRequestOptions,
|
|
1
|
+
import type { BeeRequestOptions, DownloadOptions, RedundantUploadOptions, ReferenceInformation } from '../types';
|
|
2
2
|
import { UploadResult } from '../types';
|
|
3
3
|
import { Bytes } from '../utils/bytes';
|
|
4
4
|
import { BatchId, Reference } from '../utils/typed-bytes';
|
|
@@ -10,7 +10,7 @@ import { BatchId, Reference } from '../utils/typed-bytes';
|
|
|
10
10
|
* @param postageBatchId Postage BatchId that will be assigned to uploaded data
|
|
11
11
|
* @param options Additional options like tag, encryption, pinning
|
|
12
12
|
*/
|
|
13
|
-
export declare function upload(requestOptions: BeeRequestOptions, data: string | Uint8Array, postageBatchId: BatchId, options?:
|
|
13
|
+
export declare function upload(requestOptions: BeeRequestOptions, data: string | Uint8Array, postageBatchId: BatchId, options?: RedundantUploadOptions): Promise<UploadResult>;
|
|
14
14
|
/**
|
|
15
15
|
* Requests content length for a reference
|
|
16
16
|
*
|
|
@@ -24,11 +24,11 @@ export declare function head(requestOptions: BeeRequestOptions, reference: Refer
|
|
|
24
24
|
* @param requestOptions Options for making requests
|
|
25
25
|
* @param hash Bee content reference
|
|
26
26
|
*/
|
|
27
|
-
export declare function download(requestOptions: BeeRequestOptions, reference: Reference | Uint8Array | string, options?:
|
|
27
|
+
export declare function download(requestOptions: BeeRequestOptions, reference: Reference | Uint8Array | string, options?: DownloadOptions): Promise<Bytes>;
|
|
28
28
|
/**
|
|
29
29
|
* Download data as a readable stream
|
|
30
30
|
*
|
|
31
31
|
* @param requestOptions Options for making requests
|
|
32
32
|
* @param hash Bee content reference
|
|
33
33
|
*/
|
|
34
|
-
export declare function downloadReadable(requestOptions: BeeRequestOptions, reference: Reference | Uint8Array | string, options?:
|
|
34
|
+
export declare function downloadReadable(requestOptions: BeeRequestOptions, reference: Reference | Uint8Array | string, options?: DownloadOptions): Promise<ReadableStream<Uint8Array>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { Readable } from 'stream';
|
|
3
|
-
import { BeeRequestOptions, Collection, CollectionUploadOptions,
|
|
3
|
+
import { BeeRequestOptions, Collection, CollectionUploadOptions, DownloadOptions, FileData, FileUploadOptions, UploadResult } from '../types';
|
|
4
4
|
import { Bytes } from '../utils/bytes';
|
|
5
5
|
import { BatchId, Reference } from '../utils/typed-bytes';
|
|
6
6
|
/**
|
|
@@ -12,7 +12,7 @@ import { BatchId, Reference } from '../utils/typed-bytes';
|
|
|
12
12
|
* @param name Name that will be attached to the uploaded file. Wraps the data into manifest with set index document.
|
|
13
13
|
* @param options
|
|
14
14
|
*/
|
|
15
|
-
export declare function uploadFile(requestOptions: BeeRequestOptions, data: string | Uint8Array | Readable | ArrayBuffer, postageBatchId: BatchId, name?: string, options?: FileUploadOptions
|
|
15
|
+
export declare function uploadFile(requestOptions: BeeRequestOptions, data: string | Uint8Array | Readable | ArrayBuffer, postageBatchId: BatchId, name?: string, options?: FileUploadOptions): Promise<UploadResult>;
|
|
16
16
|
/**
|
|
17
17
|
* Download single file as a buffer
|
|
18
18
|
*
|
|
@@ -20,7 +20,7 @@ export declare function uploadFile(requestOptions: BeeRequestOptions, data: stri
|
|
|
20
20
|
* @param hash Bee file or collection hash
|
|
21
21
|
* @param path If hash is collection then this defines path to a single file in the collection
|
|
22
22
|
*/
|
|
23
|
-
export declare function downloadFile(requestOptions: BeeRequestOptions, reference: Reference | string | Uint8Array, path?: string, options?:
|
|
23
|
+
export declare function downloadFile(requestOptions: BeeRequestOptions, reference: Reference | string | Uint8Array, path?: string, options?: DownloadOptions): Promise<FileData<Bytes>>;
|
|
24
24
|
/**
|
|
25
25
|
* Download single file as a readable stream
|
|
26
26
|
*
|
|
@@ -28,13 +28,8 @@ export declare function downloadFile(requestOptions: BeeRequestOptions, referenc
|
|
|
28
28
|
* @param hash Bee file or collection hash
|
|
29
29
|
* @param path If hash is collection then this defines path to a single file in the collection
|
|
30
30
|
*/
|
|
31
|
-
export declare function downloadFileReadable(requestOptions: BeeRequestOptions, reference: Reference, path?: string, options?:
|
|
31
|
+
export declare function downloadFileReadable(requestOptions: BeeRequestOptions, reference: Reference, path?: string, options?: DownloadOptions): Promise<FileData<ReadableStream<Uint8Array>>>;
|
|
32
32
|
/*******************************************************************************************************************/
|
|
33
|
-
export interface CollectionUploadHeaders extends UploadHeaders {
|
|
34
|
-
'swarm-index-document'?: string;
|
|
35
|
-
'swarm-error-document'?: string;
|
|
36
|
-
}
|
|
37
|
-
export declare function extractCollectionUploadHeaders(postageBatchId: BatchId, options?: CollectionUploadOptions & UploadRedundancyOptions): CollectionUploadHeaders & UploadRedundancyOptions;
|
|
38
33
|
/**
|
|
39
34
|
* Upload collection
|
|
40
35
|
* @param requestOptions Options for making requests
|
|
@@ -42,4 +37,4 @@ export declare function extractCollectionUploadHeaders(postageBatchId: BatchId,
|
|
|
42
37
|
* @param postageBatchId Postage BatchId that will be assigned to uploaded data
|
|
43
38
|
* @param options
|
|
44
39
|
*/
|
|
45
|
-
export declare function uploadCollection(requestOptions: BeeRequestOptions, collection: Collection, postageBatchId: BatchId, options?: CollectionUploadOptions
|
|
40
|
+
export declare function uploadCollection(requestOptions: BeeRequestOptions, collection: Collection, postageBatchId: BatchId, options?: CollectionUploadOptions): Promise<UploadResult>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BeeRequestOptions, EnvelopeWithBatchId, UploadOptions, UploadResult } from '../types';
|
|
1
|
+
import type { BeeRequestOptions, DownloadOptions, EnvelopeWithBatchId, UploadOptions, UploadResult } from '../types';
|
|
2
2
|
import { BatchId, Reference } from '../utils/typed-bytes';
|
|
3
3
|
/**
|
|
4
4
|
* Upload chunk to a Bee node
|
|
@@ -20,4 +20,4 @@ export declare function upload(requestOptions: BeeRequestOptions, data: Uint8Arr
|
|
|
20
20
|
* @param hash Bee content reference
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
export declare function download(requestOptions: BeeRequestOptions, reference: Reference | string | Uint8Array): Promise<Uint8Array>;
|
|
23
|
+
export declare function download(requestOptions: BeeRequestOptions, reference: Reference | string | Uint8Array, options?: DownloadOptions): Promise<Uint8Array>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BeeRequestOptions,
|
|
1
|
+
import type { BeeRequestOptions, ChequebookAddressResponse, ChequebookBalanceResponse, LastCashoutActionResponse, LastChequesForPeerResponse, LastChequesResponse, NumberString, TransactionOptions } from '../../types';
|
|
2
2
|
import { PeerAddress, TransactionId } from '../../utils/typed-bytes';
|
|
3
3
|
/**
|
|
4
4
|
* Get the address of the chequebook contract used
|
|
@@ -26,7 +26,7 @@ export declare function getLastCashoutAction(requestOptions: BeeRequestOptions,
|
|
|
26
26
|
* @param peer Swarm address of peer
|
|
27
27
|
* @param options
|
|
28
28
|
*/
|
|
29
|
-
export declare function cashoutLastCheque(requestOptions: BeeRequestOptions, peer: PeerAddress, options?:
|
|
29
|
+
export declare function cashoutLastCheque(requestOptions: BeeRequestOptions, peer: PeerAddress, options?: TransactionOptions): Promise<TransactionId>;
|
|
30
30
|
/**
|
|
31
31
|
* Get last cheques for the peer
|
|
32
32
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BeeRequestOptions, NodeAddresses, Peer, PingResponse, RemovePeerResponse, Topology } from '../../types';
|
|
1
|
+
import type { BeeRequestOptions, Bin, NodeAddresses, Peer, PingResponse, RemovePeerResponse, Topology } from '../../types';
|
|
2
2
|
import { PeerAddress } from '../../utils/typed-bytes';
|
|
3
3
|
export declare function getNodeAddresses(requestOptions: BeeRequestOptions): Promise<NodeAddresses>;
|
|
4
4
|
export declare function getPeers(requestOptions: BeeRequestOptions): Promise<Peer[]>;
|
|
@@ -6,3 +6,4 @@ export declare function getBlocklist(requestOptions: BeeRequestOptions): Promise
|
|
|
6
6
|
export declare function removePeer(requestOptions: BeeRequestOptions, peer: PeerAddress): Promise<RemovePeerResponse>;
|
|
7
7
|
export declare function getTopology(requestOptions: BeeRequestOptions): Promise<Topology>;
|
|
8
8
|
export declare function pingPeer(requestOptions: BeeRequestOptions, peer: PeerAddress): Promise<PingResponse>;
|
|
9
|
+
export declare function asBin(value: unknown, name: string): Bin;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BeeRequestOptions, GetGranteesResult, GranteesResult } from '../types';
|
|
2
|
-
import { BatchId, Reference } from '../utils/typed-bytes';
|
|
2
|
+
import { BatchId, PublicKey, Reference } from '../utils/typed-bytes';
|
|
3
3
|
export declare function getGrantees(reference: Reference, requestOptions: BeeRequestOptions): Promise<GetGranteesResult>;
|
|
4
|
-
export declare function createGrantees(requestOptions: BeeRequestOptions, postageBatchId: BatchId, grantees:
|
|
4
|
+
export declare function createGrantees(requestOptions: BeeRequestOptions, postageBatchId: BatchId, grantees: PublicKey[]): Promise<GranteesResult>;
|
|
5
5
|
export declare function patchGrantees(postageBatchId: BatchId, reference: Reference, historyRef: Reference, grantees: {
|
|
6
|
-
add?:
|
|
7
|
-
revoke?:
|
|
6
|
+
add?: PublicKey[];
|
|
7
|
+
revoke?: PublicKey[];
|
|
8
8
|
}, requestOptions: BeeRequestOptions): Promise<GranteesResult>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { Optional } from 'cafe-utility';
|
|
1
2
|
import type { SingleOwnerChunk } from '../chunk/soc';
|
|
2
3
|
import type { FeedUploadOptions } from '../feed';
|
|
3
4
|
import type { FeedUpdateOptions, FetchFeedUpdateResponse } from '../modules/feed';
|
|
4
5
|
import { Bytes } from '../utils/bytes';
|
|
5
6
|
import type { BeeError } from '../utils/error';
|
|
6
|
-
import { BatchId, EthAddress, Identifier, PrivateKey, Reference, Topic, TransactionId } from '../utils/typed-bytes';
|
|
7
|
+
import { BatchId, EthAddress, Identifier, PrivateKey, PublicKey, Reference, Topic, TransactionId } from '../utils/typed-bytes';
|
|
7
8
|
export * from './debug';
|
|
8
9
|
export declare const SECTION_SIZE = 32;
|
|
9
10
|
export declare const BRANCHES = 128;
|
|
@@ -22,7 +23,7 @@ export declare const TAGS_LIMIT_MAX = 1000;
|
|
|
22
23
|
export declare const FEED_INDEX_HEX_LENGTH = 16;
|
|
23
24
|
export type BeeRequestOptions = {
|
|
24
25
|
baseURL?: string;
|
|
25
|
-
timeout?: number
|
|
26
|
+
timeout?: number;
|
|
26
27
|
headers?: Record<string, string>;
|
|
27
28
|
onRequest?: (request: BeeRequest) => void;
|
|
28
29
|
httpAgent?: unknown;
|
|
@@ -44,7 +45,7 @@ export interface GranteesResult {
|
|
|
44
45
|
export interface GetGranteesResult {
|
|
45
46
|
status: number;
|
|
46
47
|
statusText: string;
|
|
47
|
-
|
|
48
|
+
grantees: PublicKey[];
|
|
48
49
|
}
|
|
49
50
|
/**
|
|
50
51
|
* Result of upload calls.
|
|
@@ -61,7 +62,7 @@ export interface UploadResult {
|
|
|
61
62
|
/**
|
|
62
63
|
* History address of the uploaded data with ACT.
|
|
63
64
|
*/
|
|
64
|
-
historyAddress:
|
|
65
|
+
historyAddress: Optional<Reference>;
|
|
65
66
|
}
|
|
66
67
|
export interface UploadOptions {
|
|
67
68
|
/**
|
|
@@ -116,7 +117,7 @@ export declare enum RedundancyLevel {
|
|
|
116
117
|
INSANE = 3,
|
|
117
118
|
PARANOID = 4
|
|
118
119
|
}
|
|
119
|
-
export interface
|
|
120
|
+
export interface RedundantUploadOptions extends UploadOptions {
|
|
120
121
|
redundancyLevel?: RedundancyLevel;
|
|
121
122
|
}
|
|
122
123
|
/**
|
|
@@ -135,7 +136,7 @@ export declare enum RedundancyStrategy {
|
|
|
135
136
|
PROX = 2,
|
|
136
137
|
RACE = 3
|
|
137
138
|
}
|
|
138
|
-
export interface
|
|
139
|
+
export interface DownloadOptions {
|
|
139
140
|
/**
|
|
140
141
|
* Specify the retrieve strategy on redundant data.
|
|
141
142
|
*/
|
|
@@ -148,6 +149,9 @@ export interface DownloadRedundancyOptions {
|
|
|
148
149
|
* Specify the timeout for chunk retrieval. The default is 30 seconds.
|
|
149
150
|
*/
|
|
150
151
|
timeoutMs?: number;
|
|
152
|
+
actPublisher?: PublicKey | Uint8Array | string;
|
|
153
|
+
actHistoryAddress?: Reference | Uint8Array | string;
|
|
154
|
+
actTimestamp?: string | number;
|
|
151
155
|
}
|
|
152
156
|
export interface FileUploadOptions extends UploadOptions {
|
|
153
157
|
/**
|
|
@@ -162,6 +166,7 @@ export interface FileUploadOptions extends UploadOptions {
|
|
|
162
166
|
* @see [Bee API reference - `POST /bzz`](https://docs.ethswarm.org/api/#tag/BZZ/paths/~1bzz/post)
|
|
163
167
|
*/
|
|
164
168
|
contentType?: string;
|
|
169
|
+
redundancyLevel?: RedundancyLevel;
|
|
165
170
|
}
|
|
166
171
|
export interface CollectionUploadOptions extends UploadOptions {
|
|
167
172
|
/**
|
|
@@ -178,6 +183,7 @@ export interface CollectionUploadOptions extends UploadOptions {
|
|
|
178
183
|
* @see [Bee API reference - `POST /bzz`](https://docs.ethswarm.org/api/#tag/BZZ/paths/~1bzz/post)
|
|
179
184
|
*/
|
|
180
185
|
errorDocument?: string;
|
|
186
|
+
redundancyLevel?: RedundancyLevel;
|
|
181
187
|
}
|
|
182
188
|
export interface UploadHeaders {
|
|
183
189
|
'swarm-act'?: string;
|
|
@@ -2,7 +2,7 @@ import { Collection } from '../types';
|
|
|
2
2
|
export declare function isCollection(data: unknown): data is Collection;
|
|
3
3
|
export declare function assertCollection(data: unknown): asserts data is Collection;
|
|
4
4
|
export declare function makeFilePath(file: File): string;
|
|
5
|
-
export declare function makeCollectionFromFileList(fileList: FileList | File[]):
|
|
5
|
+
export declare function makeCollectionFromFileList(fileList: FileList | File[]): Collection;
|
|
6
6
|
/**
|
|
7
7
|
* Calculate cumulative size of files
|
|
8
8
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { getCollectionSize } from './collection';
|
|
1
|
+
export { getCollectionSize, makeCollectionFromFileList } from './collection';
|
|
2
2
|
export { getFolderSize } from './collection.node';
|
|
3
3
|
export { makeMaxTarget } from './pss';
|
|
4
4
|
export { approximateOverheadForRedundancyLevel, getRedundancyStat, getRedundancyStats } from './redundancy';
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EnvelopeWithBatchId, FileHeaders } from '../types';
|
|
2
2
|
import { BatchId } from './typed-bytes';
|
|
3
3
|
export declare function readFileHeaders(headers: Record<string, string>): FileHeaders;
|
|
4
|
-
export declare function
|
|
5
|
-
export declare function extractRedundantUploadHeaders(postageBatchId: BatchId, options?: UploadOptions & UploadRedundancyOptions): Record<string, string>;
|
|
6
|
-
export declare function extractDownloadHeaders(options?: DownloadRedundancyOptions): Record<string, string>;
|
|
4
|
+
export declare function prepareRequestHeaders(stamp: BatchId | Uint8Array | string | EnvelopeWithBatchId | null, nullableOptions?: unknown): Record<string, string>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { BeeRequestOptions, Collection, CollectionUploadOptions
|
|
1
|
+
import { BeeRequestOptions, Collection, CollectionUploadOptions } from '..';
|
|
2
2
|
import { BatchId } from './typed-bytes';
|
|
3
|
-
export declare function uploadTar(requestOptions: BeeRequestOptions, collection: Collection, postageBatchId: BatchId, options?: CollectionUploadOptions
|
|
3
|
+
export declare function uploadTar(requestOptions: BeeRequestOptions, collection: Collection, postageBatchId: BatchId, options?: CollectionUploadOptions): Promise<import("axios").AxiosResponse<unknown, any>>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { BeeRequestOptions, Collection, CollectionUploadOptions
|
|
1
|
+
import { BeeRequestOptions, Collection, CollectionUploadOptions } from '..';
|
|
2
2
|
import { BatchId } from './typed-bytes';
|
|
3
|
-
export declare function uploadTar(requestOptions: BeeRequestOptions, collection: Collection, postageBatchId: BatchId, options?: CollectionUploadOptions
|
|
3
|
+
export declare function uploadTar(requestOptions: BeeRequestOptions, collection: Collection, postageBatchId: BatchId, options?: CollectionUploadOptions): Promise<import("axios").AxiosResponse<unknown, any>>;
|
|
@@ -1,29 +1,23 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import * as stream from 'stream';
|
|
3
|
-
import { AllTagsOptions, BeeRequestOptions,
|
|
3
|
+
import { AllTagsOptions, BeeRequestOptions, CollectionUploadOptions, DownloadOptions, FileUploadOptions, GsocMessageHandler, NumberString, PostageBatchOptions, PssMessageHandler, RedundantUploadOptions, Tag, TransactionOptions, UploadOptions } from '../types';
|
|
4
4
|
export declare function isReadable(obj: unknown): obj is stream.Readable;
|
|
5
5
|
export declare function asNumberString(value: unknown, options?: {
|
|
6
6
|
name?: string;
|
|
7
7
|
min?: bigint;
|
|
8
8
|
max?: bigint;
|
|
9
9
|
}): NumberString;
|
|
10
|
-
export declare function
|
|
11
|
-
export declare function
|
|
12
|
-
export declare function
|
|
13
|
-
export declare function
|
|
14
|
-
export declare function
|
|
15
|
-
export declare function
|
|
16
|
-
export declare function assertNonNegativeInteger(value: unknown, name?: string): asserts value is number | NumberString;
|
|
17
|
-
export declare function assertRequestOptions(value: unknown, name?: string): asserts value is BeeRequestOptions;
|
|
18
|
-
export declare function assertUploadOptions(value: unknown, name?: string): asserts value is UploadOptions;
|
|
19
|
-
export declare function assertFileUploadOptions(value: unknown): asserts value is FileUploadOptions;
|
|
20
|
-
export declare function assertCollectionUploadOptions(value: unknown): asserts value is CollectionUploadOptions;
|
|
10
|
+
export declare function prepareBeeRequestOptions(value: unknown): BeeRequestOptions;
|
|
11
|
+
export declare function prepareDownloadOptions(value: unknown): DownloadOptions;
|
|
12
|
+
export declare function prepareUploadOptions(value: unknown, name?: string): UploadOptions;
|
|
13
|
+
export declare function prepareRedundantUploadOptions(value: unknown, name?: string): RedundantUploadOptions;
|
|
14
|
+
export declare function prepareFileUploadOptions(value: unknown): FileUploadOptions;
|
|
15
|
+
export declare function prepareCollectionUploadOptions(value: unknown): CollectionUploadOptions;
|
|
21
16
|
export declare function isTag(value: unknown): value is Tag;
|
|
22
|
-
export declare function
|
|
23
|
-
export declare function
|
|
24
|
-
export declare function
|
|
25
|
-
export declare function
|
|
26
|
-
export declare function assertCashoutOptions(value: unknown): asserts value is CashoutOptions;
|
|
17
|
+
export declare function preparePssMessageHandler(value: unknown): PssMessageHandler;
|
|
18
|
+
export declare function prepareGsocMessageHandler(value: unknown): GsocMessageHandler;
|
|
19
|
+
export declare function preparePostageBatchOptions(value: unknown): PostageBatchOptions;
|
|
20
|
+
export declare function prepareTransactionOptions(value: unknown, name?: string): TransactionOptions;
|
|
27
21
|
/**
|
|
28
22
|
* Check whether the given parameter is valid data to upload
|
|
29
23
|
* @param value
|
|
@@ -40,7 +34,7 @@ export declare function assertFileData(value: unknown): asserts value is string
|
|
|
40
34
|
* Checks whether optional options for AllTags query are valid
|
|
41
35
|
* @param options
|
|
42
36
|
*/
|
|
43
|
-
export declare function
|
|
37
|
+
export declare function prepareAllTagsOptions(value: unknown): AllTagsOptions;
|
|
44
38
|
/**
|
|
45
39
|
* Utility functions that return Tag UID
|
|
46
40
|
* @param tagUid
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@upcoming/bee-js",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Javascript client for Bee",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bee",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"axios": "^0.28.1",
|
|
66
|
-
"cafe-utility": "^27.
|
|
66
|
+
"cafe-utility": "^27.9.1",
|
|
67
67
|
"isomorphic-ws": "^4.0.1",
|
|
68
68
|
"semver": "^7.3.5",
|
|
69
69
|
"ws": "^8.7.0"
|