@iexec/web3mail 0.6.1 → 1.0.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.
Files changed (53) hide show
  1. package/package.json +8 -5
  2. package/src/index.ts +1 -0
  3. package/src/utils/errors.ts +24 -6
  4. package/src/utils/index.ts +1 -0
  5. package/src/utils/subgraphQuery.ts +8 -8
  6. package/src/utils/validators.ts +13 -1
  7. package/src/web3mail/IExecWeb3mail.ts +15 -7
  8. package/src/web3mail/fetchMyContacts.ts +18 -18
  9. package/src/web3mail/fetchUserContacts.ts +21 -6
  10. package/src/web3mail/sendEmail.ts +15 -4
  11. package/src/web3mail/types.ts +8 -1
  12. package/dist/config/config.d.ts +0 -11
  13. package/dist/config/config.js +0 -12
  14. package/dist/config/config.js.map +0 -1
  15. package/dist/index.d.ts +0 -3
  16. package/dist/index.js +0 -4
  17. package/dist/index.js.map +0 -1
  18. package/dist/utils/errors.d.ts +0 -5
  19. package/dist/utils/errors.js +0 -9
  20. package/dist/utils/errors.js.map +0 -1
  21. package/dist/utils/generateUniqueId.d.ts +0 -1
  22. package/dist/utils/generateUniqueId.js +0 -6
  23. package/dist/utils/generateUniqueId.js.map +0 -1
  24. package/dist/utils/getWeb3Provider.d.ts +0 -2
  25. package/dist/utils/getWeb3Provider.js +0 -3
  26. package/dist/utils/getWeb3Provider.js.map +0 -1
  27. package/dist/utils/ipfs-service.d.ts +0 -9
  28. package/dist/utils/ipfs-service.js +0 -29
  29. package/dist/utils/ipfs-service.js.map +0 -1
  30. package/dist/utils/paginate.d.ts +0 -5
  31. package/dist/utils/paginate.js +0 -23
  32. package/dist/utils/paginate.js.map +0 -1
  33. package/dist/utils/subgraphQuery.d.ts +0 -4
  34. package/dist/utils/subgraphQuery.js +0 -90
  35. package/dist/utils/subgraphQuery.js.map +0 -1
  36. package/dist/utils/validators.d.ts +0 -10
  37. package/dist/utils/validators.js +0 -27
  38. package/dist/utils/validators.js.map +0 -1
  39. package/dist/web3mail/IExecWeb3mail.d.ts +0 -15
  40. package/dist/web3mail/IExecWeb3mail.js +0 -40
  41. package/dist/web3mail/IExecWeb3mail.js.map +0 -1
  42. package/dist/web3mail/fetchMyContacts.d.ts +0 -2
  43. package/dist/web3mail/fetchMyContacts.js +0 -28
  44. package/dist/web3mail/fetchMyContacts.js.map +0 -1
  45. package/dist/web3mail/fetchUserContacts.d.ts +0 -2
  46. package/dist/web3mail/fetchUserContacts.js +0 -83
  47. package/dist/web3mail/fetchUserContacts.js.map +0 -1
  48. package/dist/web3mail/sendEmail.d.ts +0 -2
  49. package/dist/web3mail/sendEmail.js +0 -194
  50. package/dist/web3mail/sendEmail.js.map +0 -1
  51. package/dist/web3mail/types.d.ts +0 -96
  52. package/dist/web3mail/types.js +0 -2
  53. package/dist/web3mail/types.js.map +0 -1
@@ -1,96 +0,0 @@
1
- import { GraphQLClient } from 'graphql-request';
2
- import { EnhancedWallet, IExec } from 'iexec';
3
- import { IExecConfigOptions } from 'iexec/IExecConfig';
4
- export type Web3SignerProvider = EnhancedWallet;
5
- export type IExecConsumer = {
6
- iexec: IExec;
7
- };
8
- export type ENS = string;
9
- export type AddressOrENS = Address | ENS;
10
- export type Address = string;
11
- export type TimeStamp = string;
12
- export type Contact = {
13
- address: Address;
14
- owner: Address;
15
- accessGrantTimestamp: TimeStamp;
16
- };
17
- export type SendEmailParams = {
18
- emailSubject: string;
19
- emailContent: string;
20
- protectedData: Address;
21
- contentType?: string;
22
- senderName?: string;
23
- label?: string;
24
- workerpoolAddressOrEns?: AddressOrENS;
25
- dataMaxPrice?: number;
26
- appMaxPrice?: number;
27
- workerpoolMaxPrice?: number;
28
- };
29
- export type FetchUserContactsParams = {
30
- /**
31
- * Address of the user
32
- */
33
- userAddress: Address;
34
- };
35
- export type SendEmailResponse = {
36
- taskId: string;
37
- };
38
- /**
39
- * Internal props for querying the subgraph
40
- */
41
- export type ProtectedDataQuery = {
42
- id: string;
43
- };
44
- export type GraphQLResponse = {
45
- protectedDatas: ProtectedDataQuery[];
46
- };
47
- export type SubgraphConsumer = {
48
- graphQLClient: GraphQLClient;
49
- };
50
- /**
51
- * Configuration options for Web3Mail.
52
- */
53
- export type Web3MailConfigOptions = {
54
- /**
55
- * The Ethereum contract address or ENS (Ethereum Name Service) for the email sender dapp.
56
- * If not provided, the default web3mail address will be used.
57
- */
58
- dappAddressOrENS?: AddressOrENS;
59
- /**
60
- * The Ethereum contract address for the whitelist.
61
- * If not provided, the default whitelist smart contract address will be used.
62
- */
63
- dappWhitelistAddress?: Address;
64
- /**
65
- * The subgraph URL for querying data.
66
- * If not provided, the default data protector subgraph URL will be used.
67
- */
68
- dataProtectorSubgraph?: string;
69
- /**
70
- * Options specific to iExec integration.
71
- * If not provided, default iexec options will be used.
72
- */
73
- iexecOptions?: IExecConfigOptions;
74
- /**
75
- * The IPFS node URL.
76
- * If not provided, the default IPFS node URL will be used.
77
- */
78
- ipfsNode?: string;
79
- /**
80
- * The IPFS gateway URL.
81
- * If not provided, the default IPFS gateway URL will be used.
82
- */
83
- ipfsGateway?: string;
84
- };
85
- export type DappAddressConsumer = {
86
- dappAddressOrENS: AddressOrENS;
87
- };
88
- export type IpfsNodeConfigConsumer = {
89
- ipfsNode: string;
90
- };
91
- export type IpfsGatewayConfigConsumer = {
92
- ipfsGateway: string;
93
- };
94
- export type DappWhitelistAddressConsumer = {
95
- dappWhitelistAddress: string;
96
- };
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/web3mail/types.ts"],"names":[],"mappings":""}