@marcoappio/marco-config 2.0.407 → 2.0.409
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/constants/emailProvider.d.ts.map +1 -1
- package/dist/index.d.ts +3 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -3
- package/dist/marcoPublicConfig.d.ts +0 -6
- package/dist/marcoPublicConfig.d.ts.map +1 -1
- package/dist/marcoPublicConfig.js +15 -32
- package/dist/schemas/app.d.ts.map +1 -1
- package/dist/schemas/app.js +1 -5
- package/dist/schemas/drafts.d.ts.map +1 -1
- package/dist/schemas/drafts.js +1 -4
- package/dist/schemas/emailAccount.d.ts.map +1 -1
- package/dist/schemas/emailAccount.js +1 -4
- package/dist/schemas/labels.d.ts.map +1 -1
- package/dist/schemas/labels.js +1 -7
- package/dist/schemas/number.d.ts.map +1 -1
- package/dist/schemas/oauth.d.ts.map +1 -1
- package/dist/schemas/oauth.js +1 -4
- package/dist/schemas/pushNotifications.d.ts.map +1 -1
- package/dist/schemas/pushNotifications.js +1 -3
- package/dist/schemas/string.d.ts.map +1 -1
- package/dist/sdk/endpoints/createEndpointConfig.d.ts +2 -2
- package/dist/sdk/endpoints/createEndpointConfig.d.ts.map +1 -1
- package/dist/sdk/endpoints/index.d.ts +2 -1103
- package/dist/sdk/endpoints/index.d.ts.map +1 -1
- package/dist/sdk/endpoints/index.js +0 -2
- package/dist/sdk/endpoints/public/index.d.ts +0 -136
- package/dist/sdk/endpoints/public/index.d.ts.map +1 -1
- package/dist/sdk/endpoints/public/index.js +0 -2
- package/dist/sdk/index.d.ts +0 -1101
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/validation/utils/flattenRequirements/flattenRequirements.d.ts +1 -1
- package/dist/sdk/validation/utils/flattenRequirements/flattenRequirements.d.ts.map +1 -1
- package/dist/types/Endpoint.d.ts +2 -3
- package/dist/types/Endpoint.d.ts.map +1 -1
- package/dist/types/index.d.ts +0 -3
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +0 -3
- package/dist/utils/accounts/generateAccountColor.d.ts.map +1 -1
- package/dist/utils/accounts/generateAccountColor.js +12 -3
- package/dist/utils/stringPatch/stringPatch.d.ts +2 -2
- package/dist/utils/stringPatch/stringPatch.d.ts.map +1 -1
- package/dist/utils/stringPatch/stringPatch.test.js +2 -2
- package/package.json +38 -46
- package/.eslintrc.json +0 -294
- package/dist/clients/account.d.ts +0 -144
- package/dist/clients/account.d.ts.map +0 -1
- package/dist/clients/account.js +0 -93
- package/dist/clients/contact.d.ts +0 -14
- package/dist/clients/contact.d.ts.map +0 -1
- package/dist/clients/contact.js +0 -14
- package/dist/clients/draft.d.ts +0 -209
- package/dist/clients/draft.d.ts.map +0 -1
- package/dist/clients/draft.js +0 -145
- package/dist/clients/index.d.ts +0 -548
- package/dist/clients/index.d.ts.map +0 -1
- package/dist/clients/index.js +0 -13
- package/dist/clients/thread.d.ts +0 -134
- package/dist/clients/thread.d.ts.map +0 -1
- package/dist/clients/thread.js +0 -134
- package/dist/clients/user.d.ts +0 -53
- package/dist/clients/user.d.ts.map +0 -1
- package/dist/clients/user.js +0 -52
- package/dist/clients/utils/index.d.ts +0 -4
- package/dist/clients/utils/index.d.ts.map +0 -1
- package/dist/clients/utils/index.js +0 -4
- package/dist/clients/utils/labelSpecialUseOrdering.d.ts +0 -3
- package/dist/clients/utils/labelSpecialUseOrdering.d.ts.map +0 -1
- package/dist/clients/utils/labelSpecialUseOrdering.js +0 -7
- package/dist/sdk/endpoints/private/emailMessage/getEmailMessageAttachment.d.ts +0 -21
- package/dist/sdk/endpoints/private/emailMessage/getEmailMessageAttachment.d.ts.map +0 -1
- package/dist/sdk/endpoints/private/emailMessage/getEmailMessageAttachment.js +0 -16
- package/dist/sdk/endpoints/private/emailMessage/getEmailMessageHTML.d.ts +0 -19
- package/dist/sdk/endpoints/private/emailMessage/getEmailMessageHTML.d.ts.map +0 -1
- package/dist/sdk/endpoints/private/emailMessage/getEmailMessageHTML.js +0 -19
- package/dist/sdk/endpoints/private/emailMessage/index.d.ts +0 -39
- package/dist/sdk/endpoints/private/emailMessage/index.d.ts.map +0 -1
- package/dist/sdk/endpoints/private/emailMessage/index.js +0 -6
- package/dist/sdk/endpoints/private/index.d.ts +0 -966
- package/dist/sdk/endpoints/private/index.d.ts.map +0 -1
- package/dist/sdk/endpoints/private/index.js +0 -8
- package/dist/sdk/endpoints/private/sync/index.d.ts +0 -916
- package/dist/sdk/endpoints/private/sync/index.d.ts.map +0 -1
- package/dist/sdk/endpoints/private/sync/index.js +0 -3
- package/dist/sdk/endpoints/private/sync/pull/account.d.ts +0 -71
- package/dist/sdk/endpoints/private/sync/pull/account.d.ts.map +0 -1
- package/dist/sdk/endpoints/private/sync/pull/account.js +0 -33
- package/dist/sdk/endpoints/private/sync/pull/contact.d.ts +0 -56
- package/dist/sdk/endpoints/private/sync/pull/contact.d.ts.map +0 -1
- package/dist/sdk/endpoints/private/sync/pull/contact.js +0 -40
- package/dist/sdk/endpoints/private/sync/pull/draft.d.ts +0 -72
- package/dist/sdk/endpoints/private/sync/pull/draft.d.ts.map +0 -1
- package/dist/sdk/endpoints/private/sync/pull/draft.js +0 -36
- package/dist/sdk/endpoints/private/sync/pull/index.d.ts +0 -349
- package/dist/sdk/endpoints/private/sync/pull/index.d.ts.map +0 -1
- package/dist/sdk/endpoints/private/sync/pull/index.js +0 -6
- package/dist/sdk/endpoints/private/sync/pull/thread.d.ts +0 -100
- package/dist/sdk/endpoints/private/sync/pull/thread.d.ts.map +0 -1
- package/dist/sdk/endpoints/private/sync/pull/thread.js +0 -45
- package/dist/sdk/endpoints/private/sync/pull/user.d.ts +0 -57
- package/dist/sdk/endpoints/private/sync/pull/user.d.ts.map +0 -1
- package/dist/sdk/endpoints/private/sync/pull/user.js +0 -33
- package/dist/sdk/endpoints/private/sync/push/account.d.ts +0 -151
- package/dist/sdk/endpoints/private/sync/push/account.d.ts.map +0 -1
- package/dist/sdk/endpoints/private/sync/push/account.js +0 -73
- package/dist/sdk/endpoints/private/sync/push/draft.d.ts +0 -223
- package/dist/sdk/endpoints/private/sync/push/draft.d.ts.map +0 -1
- package/dist/sdk/endpoints/private/sync/push/draft.js +0 -91
- package/dist/sdk/endpoints/private/sync/push/index.d.ts +0 -566
- package/dist/sdk/endpoints/private/sync/push/index.d.ts.map +0 -1
- package/dist/sdk/endpoints/private/sync/push/index.js +0 -5
- package/dist/sdk/endpoints/private/sync/push/thread.d.ts +0 -133
- package/dist/sdk/endpoints/private/sync/push/thread.d.ts.map +0 -1
- package/dist/sdk/endpoints/private/sync/push/thread.js +0 -85
- package/dist/sdk/endpoints/private/sync/push/user.d.ts +0 -64
- package/dist/sdk/endpoints/private/sync/push/user.d.ts.map +0 -1
- package/dist/sdk/endpoints/private/sync/push/user.js +0 -43
- package/dist/sdk/endpoints/private/user/deleteUser.d.ts +0 -10
- package/dist/sdk/endpoints/private/user/deleteUser.d.ts.map +0 -1
- package/dist/sdk/endpoints/private/user/deleteUser.js +0 -13
- package/dist/sdk/endpoints/private/user/index.d.ts +0 -11
- package/dist/sdk/endpoints/private/user/index.d.ts.map +0 -1
- package/dist/sdk/endpoints/private/user/index.js +0 -4
- package/dist/sdk/endpoints/public/auth/index.d.ts +0 -137
- package/dist/sdk/endpoints/public/auth/index.d.ts.map +0 -1
- package/dist/sdk/endpoints/public/auth/index.js +0 -8
- package/dist/sdk/endpoints/public/auth/refreshAuth.d.ts +0 -41
- package/dist/sdk/endpoints/public/auth/refreshAuth.d.ts.map +0 -1
- package/dist/sdk/endpoints/public/auth/refreshAuth.js +0 -33
- package/dist/sdk/endpoints/public/auth/sendAuthCode.d.ts +0 -27
- package/dist/sdk/endpoints/public/auth/sendAuthCode.d.ts.map +0 -1
- package/dist/sdk/endpoints/public/auth/sendAuthCode.js +0 -19
- package/dist/sdk/endpoints/public/auth/verifyAuthCode.d.ts +0 -72
- package/dist/sdk/endpoints/public/auth/verifyAuthCode.d.ts.map +0 -1
- package/dist/sdk/endpoints/public/auth/verifyAuthCode.js +0 -40
- package/dist/types/MarcoClient.d.ts +0 -14
- package/dist/types/MarcoClient.d.ts.map +0 -1
- package/dist/types/MarcoClient.js +0 -1
- package/dist/types/SDKError.d.ts +0 -4
- package/dist/types/SDKError.d.ts.map +0 -1
- package/dist/types/SDKError.js +0 -1
- package/dist/types/WS.d.ts +0 -7
- package/dist/types/WS.d.ts.map +0 -1
- package/dist/types/WS.js +0 -1
package/dist/clients/draft.js
DELETED
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import * as v from 'valibot';
|
|
2
|
-
import { marcoSchemas } from '../schemas';
|
|
3
|
-
const draftStatusSchema = v.union([
|
|
4
|
-
v.literal('DRAFT'),
|
|
5
|
-
v.literal('SEND_REQUESTED'),
|
|
6
|
-
v.literal('SEND_CONFIRMED'),
|
|
7
|
-
v.literal('SEND_FAILED'),
|
|
8
|
-
]);
|
|
9
|
-
const draftTypeSchema = v.union([
|
|
10
|
-
v.literal('NEW'),
|
|
11
|
-
v.literal('REPLY'),
|
|
12
|
-
v.literal('FORWARD'),
|
|
13
|
-
]);
|
|
14
|
-
const bodySchema = v.object({
|
|
15
|
-
bcc: v.array(marcoSchemas.string.email()),
|
|
16
|
-
cc: v.array(marcoSchemas.string.email()),
|
|
17
|
-
content: v.pipe(v.string(), v.maxLength(384000)),
|
|
18
|
-
subject: marcoSchemas.string.nullable(),
|
|
19
|
-
to: v.array(marcoSchemas.string.email()),
|
|
20
|
-
});
|
|
21
|
-
const attachmentSchema = v.object({
|
|
22
|
-
failed: v.boolean(),
|
|
23
|
-
fileName: marcoSchemas.string.required(),
|
|
24
|
-
id: marcoSchemas.string.required(),
|
|
25
|
-
mimeType: marcoSchemas.string.required(),
|
|
26
|
-
totalChunks: marcoSchemas.number.positiveInteger(),
|
|
27
|
-
totalSize: marcoSchemas.number.positiveInteger(),
|
|
28
|
-
uploadedChunks: marcoSchemas.number.positiveInteger(),
|
|
29
|
-
});
|
|
30
|
-
const scheduledForSchema = v.nullable(marcoSchemas.number.positiveInteger());
|
|
31
|
-
const scheduleSchema = v.union([
|
|
32
|
-
v.object({
|
|
33
|
-
id: marcoSchemas.string.required(),
|
|
34
|
-
kind: v.literal('IMMEDIATE'),
|
|
35
|
-
undoMs: marcoSchemas.number.positiveInteger(),
|
|
36
|
-
updatedAt: marcoSchemas.number.positiveInteger(),
|
|
37
|
-
}),
|
|
38
|
-
v.object({
|
|
39
|
-
id: marcoSchemas.string.required(),
|
|
40
|
-
kind: v.literal('SCHEDULED'),
|
|
41
|
-
scheduledFor: marcoSchemas.number.positiveInteger(),
|
|
42
|
-
updatedAt: marcoSchemas.number.positiveInteger(),
|
|
43
|
-
}),
|
|
44
|
-
]);
|
|
45
|
-
const draftSchema = v.object({
|
|
46
|
-
attachments: v.array(attachmentSchema),
|
|
47
|
-
body: bodySchema,
|
|
48
|
-
emailAccountId: marcoSchemas.string.required(),
|
|
49
|
-
error: marcoSchemas.string.nullable(),
|
|
50
|
-
from: marcoSchemas.string.email(),
|
|
51
|
-
fromName: marcoSchemas.string.nullable(),
|
|
52
|
-
id: marcoSchemas.string.required(),
|
|
53
|
-
referencedMessageId: marcoSchemas.string.nullable(),
|
|
54
|
-
scheduledFor: scheduledForSchema,
|
|
55
|
-
status: draftStatusSchema,
|
|
56
|
-
type: draftTypeSchema,
|
|
57
|
-
updatedAt: marcoSchemas.number.positiveInteger(),
|
|
58
|
-
});
|
|
59
|
-
export const draft = {
|
|
60
|
-
model: draftSchema,
|
|
61
|
-
mutators: {
|
|
62
|
-
cancelSend: {
|
|
63
|
-
delta: v.object({
|
|
64
|
-
id: marcoSchemas.string.required(),
|
|
65
|
-
updatedAt: marcoSchemas.number.positiveInteger(),
|
|
66
|
-
}),
|
|
67
|
-
},
|
|
68
|
-
createAttachment: {
|
|
69
|
-
delta: v.object({
|
|
70
|
-
attachment: attachmentSchema,
|
|
71
|
-
id: marcoSchemas.string.required(),
|
|
72
|
-
updatedAt: marcoSchemas.number.positiveInteger(),
|
|
73
|
-
}),
|
|
74
|
-
},
|
|
75
|
-
createDraft: {
|
|
76
|
-
delta: draftSchema,
|
|
77
|
-
},
|
|
78
|
-
deleteAttachment: {
|
|
79
|
-
delta: v.object({
|
|
80
|
-
attachmentId: marcoSchemas.string.required(),
|
|
81
|
-
id: marcoSchemas.string.required(),
|
|
82
|
-
updatedAt: marcoSchemas.number.positiveInteger(),
|
|
83
|
-
}),
|
|
84
|
-
},
|
|
85
|
-
deleteDraft: {
|
|
86
|
-
delta: v.object({
|
|
87
|
-
id: marcoSchemas.string.required(),
|
|
88
|
-
}),
|
|
89
|
-
},
|
|
90
|
-
scheduleSend: {
|
|
91
|
-
delta: scheduleSchema,
|
|
92
|
-
},
|
|
93
|
-
// TODO: Remove/deprecate
|
|
94
|
-
sendDraft: {
|
|
95
|
-
delta: v.object({
|
|
96
|
-
id: marcoSchemas.string.required(),
|
|
97
|
-
updatedAt: marcoSchemas.number.positiveInteger(),
|
|
98
|
-
}),
|
|
99
|
-
},
|
|
100
|
-
setContent: {
|
|
101
|
-
delta: v.object({
|
|
102
|
-
id: marcoSchemas.string.required(),
|
|
103
|
-
patch: marcoSchemas.drafts.contentPatch.patch(),
|
|
104
|
-
updatedAt: marcoSchemas.number.positiveInteger(),
|
|
105
|
-
}),
|
|
106
|
-
},
|
|
107
|
-
setEnvelope: {
|
|
108
|
-
delta: v.object({
|
|
109
|
-
envelope: v.omit(bodySchema, ['content']),
|
|
110
|
-
id: marcoSchemas.string.required(),
|
|
111
|
-
updatedAt: marcoSchemas.number.positiveInteger(),
|
|
112
|
-
}),
|
|
113
|
-
},
|
|
114
|
-
setFrom: {
|
|
115
|
-
delta: v.object({
|
|
116
|
-
aliasId: marcoSchemas.string.required(),
|
|
117
|
-
emailAccountId: marcoSchemas.string.required(),
|
|
118
|
-
from: marcoSchemas.string.email(),
|
|
119
|
-
fromName: marcoSchemas.string.nullable(),
|
|
120
|
-
id: marcoSchemas.string.required(),
|
|
121
|
-
updatedAt: marcoSchemas.number.positiveInteger(),
|
|
122
|
-
}),
|
|
123
|
-
},
|
|
124
|
-
// TODO: Remove/deprecate
|
|
125
|
-
setScheduledFor: {
|
|
126
|
-
delta: v.object({
|
|
127
|
-
id: marcoSchemas.string.required(),
|
|
128
|
-
scheduledFor: scheduledForSchema,
|
|
129
|
-
updatedAt: marcoSchemas.number.positiveInteger(),
|
|
130
|
-
}),
|
|
131
|
-
},
|
|
132
|
-
uploadAttachmentChunk: {
|
|
133
|
-
delta: v.object({
|
|
134
|
-
attachmentId: marcoSchemas.string.required(),
|
|
135
|
-
chunk: v.pipe(v.string(), v.base64()),
|
|
136
|
-
chunkIndex: marcoSchemas.number.positiveInteger(),
|
|
137
|
-
id: marcoSchemas.string.required(),
|
|
138
|
-
}),
|
|
139
|
-
},
|
|
140
|
-
},
|
|
141
|
-
name: 'draft',
|
|
142
|
-
pullUrl: '/v1/pv/sync/pull/draft',
|
|
143
|
-
pushUrl: '/v1/pv/sync/push/draft',
|
|
144
|
-
schemaVersion: 'v1',
|
|
145
|
-
};
|