react-native-email-imap-smtp 0.3.5 → 0.3.6
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/lib/module/index.js
CHANGED
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","require","impl","OS","Error","module","exports","imapConnect","imapDisconnect","imapListMailboxes","imapSelectMailbox","imapRefreshMailbox","imapFetchFolders","imapCreateFolder","imapDeleteFolder","imapRenameFolder","imapSubscribeFolder","imapUnsubscribeFolder","imapFetchEmails","imapFetchEmailByUID","imapSearchEmails","imapMarkAsRead","imapMarkAsFlagged","imapMoveEmails","imapCopyEmails","imapDeleteEmails","imapExpunge","imapFetchAttachments","imapFetchAllAttachments","imapIdle","imapStopIdle","imapGetQuota","imapAppendMessage","smtpConnect","smtpDisconnect","smtpSendMail","smtpVerifyConnection","setProxyUrl","getProxyUrl","ImapNotConnectedError","SmtpNotConnectedError"],"sourceRoot":"..\\..\\src","sources":["index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;
|
|
1
|
+
{"version":3,"names":["Platform","require","impl","OS","Error","module","exports","imapConnect","imapDisconnect","imapListMailboxes","imapSelectMailbox","imapRefreshMailbox","imapFetchFolders","imapCreateFolder","imapDeleteFolder","imapRenameFolder","imapSubscribeFolder","imapUnsubscribeFolder","imapFetchEmails","imapFetchEmailByUID","imapSearchEmails","imapMarkAsRead","imapMarkAsFlagged","imapMoveEmails","imapCopyEmails","imapDeleteEmails","imapExpunge","imapFetchAttachments","imapFetchAllAttachments","imapIdle","imapStopIdle","imapGetQuota","imapAppendMessage","smtpConnect","smtpDisconnect","smtpSendMail","smtpVerifyConnection","setProxyUrl","getProxyUrl","ImapNotConnectedError","SmtpNotConnectedError"],"sourceRoot":"..\\..\\src","sources":["index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAM;EAAEA;A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AClBC,cAAc,EAAEtB,IAAI,CAACsB,cAGH;EAClBC,gBAAgB,EAAEvB,IAAI,CAACuB,gBAEoB;EAC3CC,WAAW,EAAExB,IAAI,CAACwB,WAAkC;EACpDC,oBAAoB,EAAEzB,IAAI,CAACyB,oBAGsB;EACjDC,uBAAuB,EAAE1B,IAAI,CAAC0B,uBAEc;EAC5CC,QAAQ,EAAE3B,IAAI,CAAC2B,QAEG;EAClBC,YAAY,EAAE5B,IAAI,CAAC4B,YAAmC;EACtDC,YAAY,EAAE7B,IAAI,CAAC6B,YAEsB;EACzCC,iBAAiB,EAAE9B,IAAI,CAAC8B,iBAIoB;EAE5C;;EAEAC,WAAW,EAAE/B,IAAI,CAAC+B,WAEkC;EACpDC,cAAc,EAAEhC,IAAI,CAACgC,cAAqC;EAC1DC,YAAY,EAAEjC,IAAI,CAACiC,YAE2B;EAC9CC,oBAAoB,EAAElC,IAAI,CAACkC,oBAA8C;EAEzE;;EAEAC,WAAW,EAAEnC,IAAI,CAACmC,WAAkD;EACpEC,WAAW,EAAEpC,IAAI,CAACoC,WAAyC;EAE3D;AACF;AACA;AACA;EACEC,qBAAqB,EAAErC,IAAI,CAACqC,qBACG;EAE/B;AACF;AACA;AACA;EACEC,qBAAqB,EAAEtC,IAAI,CAACsC;AAE9B,CAAC","ignoreList":[]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare const Platform: any;
|
|
2
|
+
declare let impl: any;
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AASA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AASA,QAAA,MAAQ,QAAQ,KAA4B,CAAC;AAI7C,QAAA,IAAI,IAAI,EAAE,GAAG,CAAC"}
|
package/package.json
CHANGED
package/src/index.tsx
CHANGED
|
@@ -7,48 +7,6 @@
|
|
|
7
7
|
// Web / other → web.ts → throws not-supported
|
|
8
8
|
// ============================================================
|
|
9
9
|
|
|
10
|
-
import type {
|
|
11
|
-
IMAPConfig,
|
|
12
|
-
SMTPConfig,
|
|
13
|
-
IMAPConnectionResult,
|
|
14
|
-
SMTPConnectionResult,
|
|
15
|
-
Mailbox,
|
|
16
|
-
MailboxStatus,
|
|
17
|
-
Folder,
|
|
18
|
-
Email,
|
|
19
|
-
Attachment,
|
|
20
|
-
FetchEmailsOptions,
|
|
21
|
-
SearchCriteria,
|
|
22
|
-
BatchResult,
|
|
23
|
-
IMAPNotification,
|
|
24
|
-
QuotaInfo,
|
|
25
|
-
AppendResult,
|
|
26
|
-
SendMailOptions,
|
|
27
|
-
SendMailResult,
|
|
28
|
-
EmailError,
|
|
29
|
-
} from './types';
|
|
30
|
-
|
|
31
|
-
export type {
|
|
32
|
-
IMAPConfig,
|
|
33
|
-
SMTPConfig,
|
|
34
|
-
IMAPConnectionResult,
|
|
35
|
-
SMTPConnectionResult,
|
|
36
|
-
Mailbox,
|
|
37
|
-
MailboxStatus,
|
|
38
|
-
Folder,
|
|
39
|
-
Email,
|
|
40
|
-
Attachment,
|
|
41
|
-
FetchEmailsOptions,
|
|
42
|
-
SearchCriteria,
|
|
43
|
-
BatchResult,
|
|
44
|
-
IMAPNotification,
|
|
45
|
-
QuotaInfo,
|
|
46
|
-
AppendResult,
|
|
47
|
-
SendMailOptions,
|
|
48
|
-
SendMailResult,
|
|
49
|
-
EmailError,
|
|
50
|
-
};
|
|
51
|
-
|
|
52
10
|
const { Platform } = require('react-native');
|
|
53
11
|
|
|
54
12
|
// ─── Platform-aware module resolution ──────────────────────
|
|
@@ -75,16 +33,22 @@ module.exports = {
|
|
|
75
33
|
// ─── IMAP exports ───────────────────────────────────────────
|
|
76
34
|
|
|
77
35
|
imapConnect: impl.imapConnect as (
|
|
78
|
-
config: IMAPConfig
|
|
79
|
-
) => Promise<IMAPConnectionResult>,
|
|
36
|
+
config: import('./types').IMAPConfig
|
|
37
|
+
) => Promise<import('./types').IMAPConnectionResult>,
|
|
80
38
|
imapDisconnect: impl.imapDisconnect as () => Promise<void>,
|
|
81
|
-
imapListMailboxes: impl.imapListMailboxes as () => Promise<
|
|
39
|
+
imapListMailboxes: impl.imapListMailboxes as () => Promise<
|
|
40
|
+
import('./types').Mailbox[]
|
|
41
|
+
>,
|
|
82
42
|
imapSelectMailbox: impl.imapSelectMailbox as (
|
|
83
43
|
mailbox: string,
|
|
84
44
|
readOnly?: boolean
|
|
85
|
-
) => Promise<MailboxStatus>,
|
|
86
|
-
imapRefreshMailbox: impl.imapRefreshMailbox as () => Promise<
|
|
87
|
-
|
|
45
|
+
) => Promise<import('./types').MailboxStatus>,
|
|
46
|
+
imapRefreshMailbox: impl.imapRefreshMailbox as () => Promise<
|
|
47
|
+
import('./types').MailboxStatus
|
|
48
|
+
>,
|
|
49
|
+
imapFetchFolders: impl.imapFetchFolders as () => Promise<
|
|
50
|
+
import('./types').Folder[]
|
|
51
|
+
>,
|
|
88
52
|
imapCreateFolder: impl.imapCreateFolder as (
|
|
89
53
|
folderName: string
|
|
90
54
|
) => Promise<void>,
|
|
@@ -102,14 +66,14 @@ module.exports = {
|
|
|
102
66
|
folderName: string
|
|
103
67
|
) => Promise<void>,
|
|
104
68
|
imapFetchEmails: impl.imapFetchEmails as (
|
|
105
|
-
options: FetchEmailsOptions
|
|
106
|
-
) => Promise<Email[]>,
|
|
69
|
+
options: import('./types').FetchEmailsOptions
|
|
70
|
+
) => Promise<import('./types').Email[]>,
|
|
107
71
|
imapFetchEmailByUID: impl.imapFetchEmailByUID as (
|
|
108
72
|
uid: number
|
|
109
|
-
) => Promise<Email | null>,
|
|
73
|
+
) => Promise<import('./types').Email | null>,
|
|
110
74
|
imapSearchEmails: impl.imapSearchEmails as (
|
|
111
|
-
criteria: SearchCriteria
|
|
112
|
-
) => Promise<Email[]>,
|
|
75
|
+
criteria: import('./types').SearchCriteria
|
|
76
|
+
) => Promise<import('./types').Email[]>,
|
|
113
77
|
imapMarkAsRead: impl.imapMarkAsRead as (
|
|
114
78
|
uids: number[],
|
|
115
79
|
silent?: boolean
|
|
@@ -128,35 +92,37 @@ module.exports = {
|
|
|
128
92
|
) => Promise<void>,
|
|
129
93
|
imapDeleteEmails: impl.imapDeleteEmails as (
|
|
130
94
|
uids: number[]
|
|
131
|
-
) => Promise<BatchResult>,
|
|
95
|
+
) => Promise<import('./types').BatchResult>,
|
|
132
96
|
imapExpunge: impl.imapExpunge as () => Promise<void>,
|
|
133
97
|
imapFetchAttachments: impl.imapFetchAttachments as (
|
|
134
98
|
uid: number,
|
|
135
99
|
partId: string
|
|
136
|
-
) => Promise<Attachment | null>,
|
|
100
|
+
) => Promise<import('./types').Attachment | null>,
|
|
137
101
|
imapFetchAllAttachments: impl.imapFetchAllAttachments as (
|
|
138
102
|
uid: number
|
|
139
|
-
) => Promise<Attachment[]>,
|
|
103
|
+
) => Promise<import('./types').Attachment[]>,
|
|
140
104
|
imapIdle: impl.imapIdle as (
|
|
141
|
-
callback: (notification: IMAPNotification) => void
|
|
105
|
+
callback: (notification: import('./types').IMAPNotification) => void
|
|
142
106
|
) => Promise<void>,
|
|
143
107
|
imapStopIdle: impl.imapStopIdle as () => Promise<void>,
|
|
144
|
-
imapGetQuota: impl.imapGetQuota as (
|
|
108
|
+
imapGetQuota: impl.imapGetQuota as (
|
|
109
|
+
root?: string
|
|
110
|
+
) => Promise<import('./types').QuotaInfo>,
|
|
145
111
|
imapAppendMessage: impl.imapAppendMessage as (
|
|
146
112
|
mailbox: string,
|
|
147
113
|
rawMimeData: ArrayBuffer,
|
|
148
114
|
flags?: string[]
|
|
149
|
-
) => Promise<AppendResult>,
|
|
115
|
+
) => Promise<import('./types').AppendResult>,
|
|
150
116
|
|
|
151
117
|
// ─── SMTP exports ──────────────────────────────────────────
|
|
152
118
|
|
|
153
119
|
smtpConnect: impl.smtpConnect as (
|
|
154
|
-
config: SMTPConfig
|
|
155
|
-
) => Promise<SMTPConnectionResult>,
|
|
120
|
+
config: import('./types').SMTPConfig
|
|
121
|
+
) => Promise<import('./types').SMTPConnectionResult>,
|
|
156
122
|
smtpDisconnect: impl.smtpDisconnect as () => Promise<void>,
|
|
157
123
|
smtpSendMail: impl.smtpSendMail as (
|
|
158
|
-
options: SendMailOptions
|
|
159
|
-
) => Promise<SendMailResult>,
|
|
124
|
+
options: import('./types').SendMailOptions
|
|
125
|
+
) => Promise<import('./types').SendMailResult>,
|
|
160
126
|
smtpVerifyConnection: impl.smtpVerifyConnection as () => Promise<boolean>,
|
|
161
127
|
|
|
162
128
|
// ─── Web 专属导出(原生平台为 undefined) ─────────────────
|