Skip to content

Commit 7a20180

Browse files
refactor: update types for bulk processing
- Remove PrepareBulkRequestResponse import (no longer needed) - Replace bulkRequest with grantedAccess array parameter - Make protectedData optional (required only for single processing) - Add maxProtectedDataPerTask parameter - Update SendTelegramParams documentation
1 parent a46ed8a commit 7a20180

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/web3telegram/types.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { PrepareBulkRequestResponse } from '@iexec/dataprotector';
21
import { EnhancedWallet } from 'iexec';
32
import { IExecConfigOptions } from 'iexec/IExecConfig';
43

@@ -39,12 +38,14 @@ export type Contact = {
3938
export type SendTelegramParams = {
4039
senderName?: string;
4140
telegramContent: string;
42-
protectedData: Address;
41+
protectedData?: Address;
4342
/**
44-
* Bulk request to process.
43+
* Granted access to process.
4544
* use prepareBulkRequest of dataprotector to create a bulk request.
45+
* if not provided, the single message will be processed.
4646
*/
47-
bulkRequest?: PrepareBulkRequestResponse;
47+
grantedAccess?: GrantedAccess[];
48+
maxProtectedDataPerTask?: number;
4849
label?: string;
4950
workerpoolAddressOrEns?: AddressOrENS;
5051
dataMaxPrice?: number;
@@ -58,6 +59,7 @@ export type FetchMyContactsParams = {
5859
* Get contacts for this specific user only
5960
*/
6061
isUserStrict?: boolean;
62+
bulkOnly?: boolean;
6163
};
6264

6365
export type FetchUserContactsParams = {

0 commit comments

Comments
 (0)