@marcoappio/marco-config 2.0.536 → 2.0.537
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/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/marcoPublicConfig.d.ts +5 -0
- package/dist/marcoPublicConfig.d.ts.map +1 -1
- package/dist/marcoPublicConfig.js +15 -0
- package/dist/schemas/boolean.d.ts +5 -0
- package/dist/schemas/boolean.d.ts.map +1 -0
- package/dist/schemas/boolean.js +4 -0
- package/dist/schemas/index.d.ts +257 -0
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +23 -0
- package/dist/schemas/models/account.d.ts +54 -0
- package/dist/schemas/models/account.d.ts.map +1 -0
- package/dist/schemas/models/account.js +33 -0
- package/dist/schemas/models/contact.d.ts +9 -0
- package/dist/schemas/models/contact.d.ts.map +1 -0
- package/dist/schemas/models/contact.js +8 -0
- package/dist/schemas/models/draft.d.ts +48 -0
- package/dist/schemas/models/draft.d.ts.map +1 -0
- package/dist/schemas/models/draft.js +35 -0
- package/dist/schemas/models/index.d.ts +6 -0
- package/dist/schemas/models/index.d.ts.map +1 -0
- package/dist/schemas/models/index.js +5 -0
- package/dist/schemas/models/thread.d.ts +122 -0
- package/dist/schemas/models/thread.d.ts.map +1 -0
- package/dist/schemas/models/thread.js +55 -0
- package/dist/schemas/models/user.d.ts +35 -0
- package/dist/schemas/models/user.d.ts.map +1 -0
- package/dist/schemas/models/user.js +24 -0
- package/dist/schemas/number.d.ts +2 -0
- package/dist/schemas/number.d.ts.map +1 -1
- package/dist/schemas/number.js +2 -0
- package/dist/schemas/paginatedResponse.d.ts +10 -0
- package/dist/schemas/paginatedResponse.d.ts.map +1 -0
- package/dist/schemas/paginatedResponse.js +5 -0
- package/dist/schemas/websocket.d.ts +12 -0
- package/dist/schemas/websocket.d.ts.map +1 -0
- package/dist/schemas/websocket.js +9 -0
- package/dist/sdk/endpoints/index.d.ts +14 -0
- package/dist/sdk/endpoints/index.d.ts.map +1 -1
- package/dist/sdk/endpoints/private/index.d.ts +14 -0
- package/dist/sdk/endpoints/private/index.d.ts.map +1 -1
- package/dist/sdk/endpoints/private/index.js +4 -0
- package/dist/sdk/endpoints/private/models/account/getAccounts.d.ts +68 -0
- package/dist/sdk/endpoints/private/models/account/getAccounts.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/models/account/getAccounts.js +26 -0
- package/dist/sdk/endpoints/private/models/account/index.d.ts +2 -0
- package/dist/sdk/endpoints/private/models/account/index.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/models/account/index.js +1 -0
- package/dist/sdk/endpoints/private/models/contact/getContacts.d.ts +41 -0
- package/dist/sdk/endpoints/private/models/contact/getContacts.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/models/contact/getContacts.js +26 -0
- package/dist/sdk/endpoints/private/models/contact/index.d.ts +2 -0
- package/dist/sdk/endpoints/private/models/contact/index.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/models/contact/index.js +1 -0
- package/dist/sdk/endpoints/private/models/draft/getDrafts.d.ts +62 -0
- package/dist/sdk/endpoints/private/models/draft/getDrafts.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/models/draft/getDrafts.js +25 -0
- package/dist/sdk/endpoints/private/models/draft/index.d.ts +2 -0
- package/dist/sdk/endpoints/private/models/draft/index.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/models/draft/index.js +1 -0
- package/dist/sdk/endpoints/private/models/index.d.ts +15 -0
- package/dist/sdk/endpoints/private/models/index.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/models/index.js +14 -0
- package/dist/sdk/endpoints/private/models/label/getLabels.d.ts +44 -0
- package/dist/sdk/endpoints/private/models/label/getLabels.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/models/label/getLabels.js +27 -0
- package/dist/sdk/endpoints/private/models/label/index.d.ts +2 -0
- package/dist/sdk/endpoints/private/models/label/index.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/models/label/index.js +1 -0
- package/dist/sdk/endpoints/private/models/thread/getThread.d.ts +62 -0
- package/dist/sdk/endpoints/private/models/thread/getThread.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/models/thread/getThread.js +17 -0
- package/dist/sdk/endpoints/private/models/thread/getThreadByMessageId.d.ts +62 -0
- package/dist/sdk/endpoints/private/models/thread/getThreadByMessageId.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/models/thread/getThreadByMessageId.js +17 -0
- package/dist/sdk/endpoints/private/models/thread/getThreadList.d.ts +55 -0
- package/dist/sdk/endpoints/private/models/thread/getThreadList.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/models/thread/getThreadList.js +30 -0
- package/dist/sdk/endpoints/private/models/thread/getThreads.d.ts +75 -0
- package/dist/sdk/endpoints/private/models/thread/getThreads.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/models/thread/getThreads.js +25 -0
- package/dist/sdk/endpoints/private/models/thread/index.d.ts +5 -0
- package/dist/sdk/endpoints/private/models/thread/index.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/models/thread/index.js +4 -0
- package/dist/sdk/endpoints/private/models/user/getUser.d.ts +33 -0
- package/dist/sdk/endpoints/private/models/user/getUser.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/models/user/getUser.js +16 -0
- package/dist/sdk/endpoints/private/models/user/index.d.ts +2 -0
- package/dist/sdk/endpoints/private/models/user/index.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/models/user/index.js +1 -0
- package/dist/sdk/endpoints/private/mutations/account/createAccount.d.ts +35 -0
- package/dist/sdk/endpoints/private/mutations/account/createAccount.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/account/createAccount.js +18 -0
- package/dist/sdk/endpoints/private/mutations/account/createAlias.d.ts +42 -0
- package/dist/sdk/endpoints/private/mutations/account/createAlias.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/account/createAlias.js +19 -0
- package/dist/sdk/endpoints/private/mutations/account/deleteAccount.d.ts +27 -0
- package/dist/sdk/endpoints/private/mutations/account/deleteAccount.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/account/deleteAccount.js +18 -0
- package/dist/sdk/endpoints/private/mutations/account/deleteAlias.d.ts +33 -0
- package/dist/sdk/endpoints/private/mutations/account/deleteAlias.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/account/deleteAlias.js +19 -0
- package/dist/sdk/endpoints/private/mutations/account/index.d.ts +10 -0
- package/dist/sdk/endpoints/private/mutations/account/index.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/account/index.js +9 -0
- package/dist/sdk/endpoints/private/mutations/account/setAliasName.d.ts +44 -0
- package/dist/sdk/endpoints/private/mutations/account/setAliasName.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/account/setAliasName.js +20 -0
- package/dist/sdk/endpoints/private/mutations/account/setAliasPrimary.d.ts +33 -0
- package/dist/sdk/endpoints/private/mutations/account/setAliasPrimary.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/account/setAliasPrimary.js +19 -0
- package/dist/sdk/endpoints/private/mutations/account/setConnectionConfigImap.d.ts +49 -0
- package/dist/sdk/endpoints/private/mutations/account/setConnectionConfigImap.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/account/setConnectionConfigImap.js +19 -0
- package/dist/sdk/endpoints/private/mutations/account/setConnectionConfigOauth.d.ts +42 -0
- package/dist/sdk/endpoints/private/mutations/account/setConnectionConfigOauth.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/account/setConnectionConfigOauth.js +19 -0
- package/dist/sdk/endpoints/private/mutations/account/setSettings.d.ts +39 -0
- package/dist/sdk/endpoints/private/mutations/account/setSettings.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/account/setSettings.js +19 -0
- package/dist/sdk/endpoints/private/mutations/draft/cancelSend.d.ts +28 -0
- package/dist/sdk/endpoints/private/mutations/draft/cancelSend.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/draft/cancelSend.js +18 -0
- package/dist/sdk/endpoints/private/mutations/draft/createAttachment.d.ts +45 -0
- package/dist/sdk/endpoints/private/mutations/draft/createAttachment.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/draft/createAttachment.js +19 -0
- package/dist/sdk/endpoints/private/mutations/draft/createDraft.d.ts +60 -0
- package/dist/sdk/endpoints/private/mutations/draft/createDraft.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/draft/createDraft.js +19 -0
- package/dist/sdk/endpoints/private/mutations/draft/deleteAttachment.d.ts +34 -0
- package/dist/sdk/endpoints/private/mutations/draft/deleteAttachment.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/draft/deleteAttachment.js +19 -0
- package/dist/sdk/endpoints/private/mutations/draft/deleteDraft.d.ts +27 -0
- package/dist/sdk/endpoints/private/mutations/draft/deleteDraft.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/draft/deleteDraft.js +18 -0
- package/dist/sdk/endpoints/private/mutations/draft/index.d.ts +10 -0
- package/dist/sdk/endpoints/private/mutations/draft/index.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/draft/index.js +9 -0
- package/dist/sdk/endpoints/private/mutations/draft/scheduleSend.d.ts +45 -0
- package/dist/sdk/endpoints/private/mutations/draft/scheduleSend.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/draft/scheduleSend.js +19 -0
- package/dist/sdk/endpoints/private/mutations/draft/setContent.d.ts +43 -0
- package/dist/sdk/endpoints/private/mutations/draft/setContent.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/draft/setContent.js +19 -0
- package/dist/sdk/endpoints/private/mutations/draft/setEnvelope.d.ts +85 -0
- package/dist/sdk/endpoints/private/mutations/draft/setEnvelope.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/draft/setEnvelope.js +19 -0
- package/dist/sdk/endpoints/private/mutations/draft/setFrom.d.ts +47 -0
- package/dist/sdk/endpoints/private/mutations/draft/setFrom.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/draft/setFrom.js +20 -0
- package/dist/sdk/endpoints/private/mutations/index.d.ts +11 -0
- package/dist/sdk/endpoints/private/mutations/index.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/index.js +10 -0
- package/dist/sdk/endpoints/private/mutations/thread/addLabel.d.ts +40 -0
- package/dist/sdk/endpoints/private/mutations/thread/addLabel.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/thread/addLabel.js +19 -0
- package/dist/sdk/endpoints/private/mutations/thread/deleteThreads.d.ts +34 -0
- package/dist/sdk/endpoints/private/mutations/thread/deleteThreads.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/thread/deleteThreads.js +18 -0
- package/dist/sdk/endpoints/private/mutations/thread/index.d.ts +10 -0
- package/dist/sdk/endpoints/private/mutations/thread/index.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/thread/index.js +9 -0
- package/dist/sdk/endpoints/private/mutations/thread/removeLabel.d.ts +40 -0
- package/dist/sdk/endpoints/private/mutations/thread/removeLabel.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/thread/removeLabel.js +19 -0
- package/dist/sdk/endpoints/private/mutations/thread/setArchive.d.ts +34 -0
- package/dist/sdk/endpoints/private/mutations/thread/setArchive.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/thread/setArchive.js +18 -0
- package/dist/sdk/endpoints/private/mutations/thread/setFlagged.d.ts +35 -0
- package/dist/sdk/endpoints/private/mutations/thread/setFlagged.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/thread/setFlagged.js +18 -0
- package/dist/sdk/endpoints/private/mutations/thread/setInbox.d.ts +34 -0
- package/dist/sdk/endpoints/private/mutations/thread/setInbox.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/thread/setInbox.js +18 -0
- package/dist/sdk/endpoints/private/mutations/thread/setSeen.d.ts +35 -0
- package/dist/sdk/endpoints/private/mutations/thread/setSeen.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/thread/setSeen.js +18 -0
- package/dist/sdk/endpoints/private/mutations/thread/setSpam.d.ts +34 -0
- package/dist/sdk/endpoints/private/mutations/thread/setSpam.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/thread/setSpam.js +18 -0
- package/dist/sdk/endpoints/private/mutations/thread/setTrash.d.ts +34 -0
- package/dist/sdk/endpoints/private/mutations/thread/setTrash.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/thread/setTrash.js +18 -0
- package/dist/sdk/endpoints/private/mutations/user/createView.d.ts +38 -0
- package/dist/sdk/endpoints/private/mutations/user/createView.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/user/createView.js +18 -0
- package/dist/sdk/endpoints/private/mutations/user/deletePushToken.d.ts +23 -0
- package/dist/sdk/endpoints/private/mutations/user/deletePushToken.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/user/deletePushToken.js +17 -0
- package/dist/sdk/endpoints/private/mutations/user/deleteView.d.ts +28 -0
- package/dist/sdk/endpoints/private/mutations/user/deleteView.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/user/deleteView.js +18 -0
- package/dist/sdk/endpoints/private/mutations/user/index.d.ts +7 -0
- package/dist/sdk/endpoints/private/mutations/user/index.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/user/index.js +6 -0
- package/dist/sdk/endpoints/private/mutations/user/setPushToken.d.ts +37 -0
- package/dist/sdk/endpoints/private/mutations/user/setPushToken.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/user/setPushToken.js +18 -0
- package/dist/sdk/endpoints/private/mutations/user/setSettingsName.d.ts +33 -0
- package/dist/sdk/endpoints/private/mutations/user/setSettingsName.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/user/setSettingsName.js +18 -0
- package/dist/sdk/endpoints/private/mutations/user/updateView.d.ts +43 -0
- package/dist/sdk/endpoints/private/mutations/user/updateView.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/user/updateView.js +19 -0
- package/dist/sdk/index.d.ts +50 -0
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/validation/errors.d.ts +72 -0
- package/dist/sdk/validation/errors.d.ts.map +1 -1
- package/dist/sdk/validation/errors.js +30 -0
- package/dist/sdk/validation/index.d.ts +36 -0
- package/dist/sdk/validation/index.d.ts.map +1 -1
- package/dist/types/PokeEvent.d.ts +6 -0
- package/dist/types/PokeEvent.d.ts.map +1 -0
- package/dist/types/PokeEvent.js +1 -0
- package/dist/types/SDKError.d.ts +1 -1
- package/dist/types/SDKError.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -0
- package/dist/zero/index.d.ts +926 -924
- package/dist/zero/index.d.ts.map +1 -1
- package/dist/zero/index.js +1 -0
- package/dist/zero/mutatorSchemas.d.ts +1 -1
- package/dist/zero/mutators.d.ts +281 -281
- package/dist/zero/queries.d.ts +281 -281
- package/dist/zero/schema.d.ts +281 -281
- package/dist/zero/schema.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
import { number } from '../../schemas/number';
|
|
3
|
+
import { string } from '../../schemas/string';
|
|
4
|
+
import { IMAP_CONNECTION_STATUSES, LABEL_SPECIAL_USES } from '../../types';
|
|
5
|
+
export const accountAliasSchema = v.object({
|
|
6
|
+
accountId: string.required(),
|
|
7
|
+
emailAddress: string.required(),
|
|
8
|
+
id: string.required(),
|
|
9
|
+
isPrimary: v.boolean(),
|
|
10
|
+
name: string.nullable(),
|
|
11
|
+
});
|
|
12
|
+
export const accountLabelSchema = v.object({
|
|
13
|
+
accountId: string.required(),
|
|
14
|
+
id: string.required(),
|
|
15
|
+
name: string.nullable(),
|
|
16
|
+
path: string.required(),
|
|
17
|
+
specialUse: v.nullable(v.picklist(LABEL_SPECIAL_USES)),
|
|
18
|
+
uidValidity: number.positiveInteger(),
|
|
19
|
+
unreadCount: number.positiveInteger(),
|
|
20
|
+
});
|
|
21
|
+
export const accountSchema = v.object({
|
|
22
|
+
aliases: v.optional(v.array(accountAliasSchema)),
|
|
23
|
+
color: string.required(),
|
|
24
|
+
displayName: string.nullable(),
|
|
25
|
+
id: string.required(),
|
|
26
|
+
imapConnectionStatus: v.picklist(IMAP_CONNECTION_STATUSES),
|
|
27
|
+
labels: v.optional(v.array(accountLabelSchema)),
|
|
28
|
+
mailProcessedCount: number.positiveInteger(),
|
|
29
|
+
mailTotalCount: number.positiveInteger(),
|
|
30
|
+
primaryAlias: v.optional(v.nullable(accountAliasSchema)),
|
|
31
|
+
primaryAliasId: string.nullable(),
|
|
32
|
+
userId: string.required(),
|
|
33
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
export declare const contactSchema: v.ObjectSchema<{
|
|
3
|
+
readonly emailAddress: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
4
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
5
|
+
readonly name: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
6
|
+
readonly userId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
7
|
+
}, undefined>;
|
|
8
|
+
export type Contact = v.InferOutput<typeof contactSchema>;
|
|
9
|
+
//# sourceMappingURL=contact.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contact.d.ts","sourceRoot":"","sources":["../../../src/schemas/models/contact.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAI5B,eAAO,MAAM,aAAa;;;;;aAKxB,CAAA;AAEF,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,aAAa,CAAC,CAAA"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
export declare const draftAttachmentSchema: v.ObjectSchema<{
|
|
3
|
+
readonly draftId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
4
|
+
readonly fileName: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
5
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
6
|
+
readonly mimeType: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
7
|
+
readonly status: v.PicklistSchema<readonly ["PENDING", "COMPLETE", "FAILED"], undefined>;
|
|
8
|
+
readonly totalSize: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
9
|
+
}, undefined>;
|
|
10
|
+
export declare const draftBodySchema: v.ObjectSchema<{
|
|
11
|
+
readonly bcc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
12
|
+
readonly cc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
13
|
+
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 384000, undefined>]>;
|
|
14
|
+
readonly to: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
15
|
+
}, undefined>;
|
|
16
|
+
export declare const draftSchema: v.ObjectSchema<{
|
|
17
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
18
|
+
readonly attachments: v.ArraySchema<v.ObjectSchema<{
|
|
19
|
+
readonly draftId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
20
|
+
readonly fileName: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
21
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
22
|
+
readonly mimeType: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
23
|
+
readonly status: v.PicklistSchema<readonly ["PENDING", "COMPLETE", "FAILED"], undefined>;
|
|
24
|
+
readonly totalSize: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
25
|
+
}, undefined>, undefined>;
|
|
26
|
+
readonly body: v.ObjectSchema<{
|
|
27
|
+
readonly bcc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
28
|
+
readonly cc: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
29
|
+
readonly content: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 384000, undefined>]>;
|
|
30
|
+
readonly to: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
31
|
+
}, undefined>;
|
|
32
|
+
readonly error: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
33
|
+
readonly fromAliasId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
34
|
+
readonly fromEmail: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
35
|
+
readonly fromName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
36
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
37
|
+
readonly referencedMessageId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
38
|
+
readonly scheduledFor: v.NullableSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, undefined>;
|
|
39
|
+
readonly status: v.PicklistSchema<readonly ["DRAFT", "SEND_REQUESTED", "SEND_IN_PROGRESS", "SEND_CONFIRMED", "SEND_FAILED"], undefined>;
|
|
40
|
+
readonly subject: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
41
|
+
readonly type: v.PicklistSchema<readonly ["NEW", "REPLY", "FORWARD"], undefined>;
|
|
42
|
+
readonly updatedAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
43
|
+
readonly userId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
44
|
+
}, undefined>;
|
|
45
|
+
export type Draft = v.InferOutput<typeof draftSchema>;
|
|
46
|
+
export type DraftAttachment = v.InferOutput<typeof draftAttachmentSchema>;
|
|
47
|
+
export type DraftBody = v.InferOutput<typeof draftBodySchema>;
|
|
48
|
+
//# sourceMappingURL=draft.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draft.d.ts","sourceRoot":"","sources":["../../../src/schemas/models/draft.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAM5B,eAAO,MAAM,qBAAqB;;;;;;;aAOhC,CAAA;AAEF,eAAO,MAAM,eAAe;;;;;aAK1B,CAAA;AAEF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAgBtB,CAAA;AAEF,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,WAAW,CAAC,CAAA;AACrD,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,qBAAqB,CAAC,CAAA;AACzE,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,eAAe,CAAC,CAAA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
import { number } from '../../schemas/number';
|
|
3
|
+
import { string } from '../../schemas/string';
|
|
4
|
+
import { DRAFT_ATTACHMENT_UPLOAD_STATUSES, DRAFT_STATUSES, DRAFT_TYPES } from '../../types';
|
|
5
|
+
export const draftAttachmentSchema = v.object({
|
|
6
|
+
draftId: string.required(),
|
|
7
|
+
fileName: string.required(),
|
|
8
|
+
id: string.required(),
|
|
9
|
+
mimeType: string.required(),
|
|
10
|
+
status: v.picklist(DRAFT_ATTACHMENT_UPLOAD_STATUSES),
|
|
11
|
+
totalSize: number.positiveInteger(),
|
|
12
|
+
});
|
|
13
|
+
export const draftBodySchema = v.object({
|
|
14
|
+
bcc: v.array(string.required()),
|
|
15
|
+
cc: v.array(string.required()),
|
|
16
|
+
content: v.pipe(v.string(), v.maxLength(384000)),
|
|
17
|
+
to: v.array(string.required()),
|
|
18
|
+
});
|
|
19
|
+
export const draftSchema = v.object({
|
|
20
|
+
accountId: string.required(),
|
|
21
|
+
attachments: v.array(draftAttachmentSchema),
|
|
22
|
+
body: draftBodySchema,
|
|
23
|
+
error: string.nullable(),
|
|
24
|
+
fromAliasId: string.nullable(),
|
|
25
|
+
fromEmail: string.required(),
|
|
26
|
+
fromName: string.nullable(),
|
|
27
|
+
id: string.required(),
|
|
28
|
+
referencedMessageId: string.nullable(),
|
|
29
|
+
scheduledFor: v.nullable(number.positiveInteger()),
|
|
30
|
+
status: v.picklist(DRAFT_STATUSES),
|
|
31
|
+
subject: string.nullable(),
|
|
32
|
+
type: v.picklist(DRAFT_TYPES),
|
|
33
|
+
updatedAt: number.positiveInteger(),
|
|
34
|
+
userId: string.required(),
|
|
35
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { type Account, type AccountAlias, type AccountLabel, accountAliasSchema, accountLabelSchema, accountSchema, } from './account';
|
|
2
|
+
export { type Contact, contactSchema } from './contact';
|
|
3
|
+
export { type Draft, type DraftAttachment, type DraftBody, draftAttachmentSchema, draftBodySchema, draftSchema, } from './draft';
|
|
4
|
+
export { type Thread, type ThreadMessage, type ThreadMessageAttachment, type ThreadMessageRecipient, threadFullSchema, threadListSchema, threadMessageAttachmentSchema, threadMessageRecipientSchema, threadMessageSchema, threadSchema, } from './thread';
|
|
5
|
+
export { type User, type UserPushNotificationToken, type UserView, userPushNotificationTokenSchema, userSchema, userViewSchema, } from './user';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/schemas/models/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,GACd,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,KAAK,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AACvD,OAAO,EACL,KAAK,KAAK,EACV,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,qBAAqB,EACrB,eAAe,EACf,WAAW,GACZ,MAAM,SAAS,CAAA;AAChB,OAAO,EACL,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,gBAAgB,EAChB,gBAAgB,EAChB,6BAA6B,EAC7B,4BAA4B,EAC5B,mBAAmB,EACnB,YAAY,GACb,MAAM,UAAU,CAAA;AACjB,OAAO,EACL,KAAK,IAAI,EACT,KAAK,yBAAyB,EAC9B,KAAK,QAAQ,EACb,+BAA+B,EAC/B,UAAU,EACV,cAAc,GACf,MAAM,QAAQ,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { accountAliasSchema, accountLabelSchema, accountSchema, } from './account';
|
|
2
|
+
export { contactSchema } from './contact';
|
|
3
|
+
export { draftAttachmentSchema, draftBodySchema, draftSchema, } from './draft';
|
|
4
|
+
export { threadFullSchema, threadListSchema, threadMessageAttachmentSchema, threadMessageRecipientSchema, threadMessageSchema, threadSchema, } from './thread';
|
|
5
|
+
export { userPushNotificationTokenSchema, userSchema, userViewSchema, } from './user';
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
export declare const threadMessageAttachmentSchema: v.ObjectSchema<{
|
|
3
|
+
readonly fileName: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
4
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
5
|
+
readonly mimeType: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
6
|
+
readonly size: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
7
|
+
readonly threadMessageId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
8
|
+
}, undefined>;
|
|
9
|
+
export declare const threadMessageRecipientSchema: v.ObjectSchema<{
|
|
10
|
+
readonly emailAddress: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
11
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
12
|
+
readonly name: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
13
|
+
readonly threadMessageId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
14
|
+
readonly type: v.PicklistSchema<readonly ["bcc", "cc", "to", "replyTo"], undefined>;
|
|
15
|
+
}, undefined>;
|
|
16
|
+
export declare const threadMessageSchema: v.ObjectSchema<{
|
|
17
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
18
|
+
readonly attachments: v.ArraySchema<v.ObjectSchema<{
|
|
19
|
+
readonly fileName: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
20
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
21
|
+
readonly mimeType: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
22
|
+
readonly size: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
23
|
+
readonly threadMessageId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
24
|
+
}, undefined>, undefined>;
|
|
25
|
+
readonly envelopeDate: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
26
|
+
readonly envelopeSubject: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
27
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
28
|
+
readonly previewText: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
29
|
+
readonly recipients: v.ArraySchema<v.ObjectSchema<{
|
|
30
|
+
readonly emailAddress: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
31
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
32
|
+
readonly name: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
33
|
+
readonly threadMessageId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
34
|
+
readonly type: v.PicklistSchema<readonly ["bcc", "cc", "to", "replyTo"], undefined>;
|
|
35
|
+
}, undefined>, undefined>;
|
|
36
|
+
readonly senderEmail: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
37
|
+
readonly senderName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
38
|
+
readonly threadId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
39
|
+
readonly unsubscribeUrl: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
40
|
+
}, undefined>;
|
|
41
|
+
export declare const threadSchema: v.ObjectSchema<{
|
|
42
|
+
accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
43
|
+
flagged: v.BooleanSchema<undefined>;
|
|
44
|
+
hasAttachments: v.BooleanSchema<undefined>;
|
|
45
|
+
id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
46
|
+
labelIdList: v.StringSchema<undefined>;
|
|
47
|
+
latestMessageDate: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
48
|
+
latestMessageId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
49
|
+
messageCount: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
50
|
+
previewText: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
51
|
+
seen: v.BooleanSchema<undefined>;
|
|
52
|
+
senderEmail: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
53
|
+
senderName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
54
|
+
subject: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
55
|
+
userId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
56
|
+
words: v.StringSchema<undefined>;
|
|
57
|
+
}, undefined>;
|
|
58
|
+
export declare const threadListSchema: v.ObjectSchema<{
|
|
59
|
+
accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
60
|
+
flagged: v.BooleanSchema<undefined>;
|
|
61
|
+
hasAttachments: v.BooleanSchema<undefined>;
|
|
62
|
+
id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
63
|
+
labelIdList: v.StringSchema<undefined>;
|
|
64
|
+
latestMessageDate: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
65
|
+
latestMessageId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
66
|
+
messageCount: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
67
|
+
previewText: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
68
|
+
seen: v.BooleanSchema<undefined>;
|
|
69
|
+
senderEmail: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
70
|
+
senderName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
71
|
+
subject: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
72
|
+
userId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
73
|
+
words: v.StringSchema<undefined>;
|
|
74
|
+
}, undefined>;
|
|
75
|
+
export declare const threadFullSchema: v.ObjectSchema<{
|
|
76
|
+
readonly messages: v.ArraySchema<v.ObjectSchema<{
|
|
77
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
78
|
+
readonly attachments: v.ArraySchema<v.ObjectSchema<{
|
|
79
|
+
readonly fileName: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
80
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
81
|
+
readonly mimeType: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
82
|
+
readonly size: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
83
|
+
readonly threadMessageId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
84
|
+
}, undefined>, undefined>;
|
|
85
|
+
readonly envelopeDate: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
86
|
+
readonly envelopeSubject: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
87
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
88
|
+
readonly previewText: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
89
|
+
readonly recipients: v.ArraySchema<v.ObjectSchema<{
|
|
90
|
+
readonly emailAddress: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
91
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
92
|
+
readonly name: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
93
|
+
readonly threadMessageId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
94
|
+
readonly type: v.PicklistSchema<readonly ["bcc", "cc", "to", "replyTo"], undefined>;
|
|
95
|
+
}, undefined>, undefined>;
|
|
96
|
+
readonly senderEmail: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
97
|
+
readonly senderName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
98
|
+
readonly threadId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
99
|
+
readonly unsubscribeUrl: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
100
|
+
}, undefined>, undefined>;
|
|
101
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
102
|
+
readonly flagged: v.BooleanSchema<undefined>;
|
|
103
|
+
readonly hasAttachments: v.BooleanSchema<undefined>;
|
|
104
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
105
|
+
readonly labelIdList: v.StringSchema<undefined>;
|
|
106
|
+
readonly latestMessageDate: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
107
|
+
readonly latestMessageId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
108
|
+
readonly messageCount: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
109
|
+
readonly previewText: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
110
|
+
readonly seen: v.BooleanSchema<undefined>;
|
|
111
|
+
readonly senderEmail: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
112
|
+
readonly senderName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
113
|
+
readonly subject: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
114
|
+
readonly userId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
115
|
+
readonly words: v.StringSchema<undefined>;
|
|
116
|
+
}, undefined>;
|
|
117
|
+
export type Thread = v.InferOutput<typeof threadFullSchema>;
|
|
118
|
+
export type ThreadListItem = v.InferOutput<typeof threadListSchema>;
|
|
119
|
+
export type ThreadMessage = v.InferOutput<typeof threadMessageSchema>;
|
|
120
|
+
export type ThreadMessageAttachment = v.InferOutput<typeof threadMessageAttachmentSchema>;
|
|
121
|
+
export type ThreadMessageRecipient = v.InferOutput<typeof threadMessageRecipientSchema>;
|
|
122
|
+
//# sourceMappingURL=thread.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thread.d.ts","sourceRoot":"","sources":["../../../src/schemas/models/thread.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAO5B,eAAO,MAAM,6BAA6B;;;;;;aAMxC,CAAA;AAEF,eAAO,MAAM,4BAA4B;;;;;;aAMvC,CAAA;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;aAY9B,CAAA;AAoBF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;aAA8B,CAAA;AAEvD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;aAAe,CAAA;AAE5C,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAG3B,CAAA;AAEF,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAC3D,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,gBAAgB,CAAC,CAAA;AACnE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,mBAAmB,CAAC,CAAA;AACrE,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,6BAA6B,CAAC,CAAA;AACzF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,4BAA4B,CAAC,CAAA"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
import { messages } from '../../constants/messages';
|
|
3
|
+
import { number } from '../../schemas/number';
|
|
4
|
+
import { string } from '../../schemas/string';
|
|
5
|
+
import { MESSAGE_RECIPIENT_TYPES } from '../../types';
|
|
6
|
+
export const threadMessageAttachmentSchema = v.object({
|
|
7
|
+
fileName: string.required(),
|
|
8
|
+
id: string.required(),
|
|
9
|
+
mimeType: string.required(),
|
|
10
|
+
size: number.positiveInteger(),
|
|
11
|
+
threadMessageId: string.required(),
|
|
12
|
+
});
|
|
13
|
+
export const threadMessageRecipientSchema = v.object({
|
|
14
|
+
emailAddress: string.required(),
|
|
15
|
+
id: string.required(),
|
|
16
|
+
name: string.nullable(),
|
|
17
|
+
threadMessageId: string.required(),
|
|
18
|
+
type: v.picklist(MESSAGE_RECIPIENT_TYPES),
|
|
19
|
+
});
|
|
20
|
+
export const threadMessageSchema = v.object({
|
|
21
|
+
accountId: string.required(),
|
|
22
|
+
attachments: v.array(threadMessageAttachmentSchema),
|
|
23
|
+
envelopeDate: number.positiveInteger(),
|
|
24
|
+
envelopeSubject: string.nullable(),
|
|
25
|
+
id: string.required(),
|
|
26
|
+
previewText: string.required(messages.PREVIEW_TEXT_MAX_LENGTH),
|
|
27
|
+
recipients: v.array(threadMessageRecipientSchema),
|
|
28
|
+
senderEmail: string.required(),
|
|
29
|
+
senderName: string.nullable(),
|
|
30
|
+
threadId: string.required(),
|
|
31
|
+
unsubscribeUrl: string.nullable(),
|
|
32
|
+
});
|
|
33
|
+
const threadBaseEntries = {
|
|
34
|
+
accountId: string.required(),
|
|
35
|
+
flagged: v.boolean(),
|
|
36
|
+
hasAttachments: v.boolean(),
|
|
37
|
+
id: string.required(),
|
|
38
|
+
labelIdList: v.string(),
|
|
39
|
+
latestMessageDate: number.positiveInteger(),
|
|
40
|
+
latestMessageId: string.required(),
|
|
41
|
+
messageCount: number.positiveInteger(),
|
|
42
|
+
previewText: string.required(messages.PREVIEW_TEXT_MAX_LENGTH),
|
|
43
|
+
seen: v.boolean(),
|
|
44
|
+
senderEmail: string.required(),
|
|
45
|
+
senderName: string.nullable(),
|
|
46
|
+
subject: string.nullable(),
|
|
47
|
+
userId: string.required(),
|
|
48
|
+
words: v.string(),
|
|
49
|
+
};
|
|
50
|
+
export const threadSchema = v.object(threadBaseEntries);
|
|
51
|
+
export const threadListSchema = threadSchema;
|
|
52
|
+
export const threadFullSchema = v.object({
|
|
53
|
+
...threadBaseEntries,
|
|
54
|
+
messages: v.array(threadMessageSchema),
|
|
55
|
+
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
export declare const userViewSchema: v.ObjectSchema<{
|
|
3
|
+
readonly aliasEmails: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
4
|
+
readonly icon: v.PicklistSchema<readonly [import("../../types").CustomViewIcon.AIRPLANE, import("../../types").CustomViewIcon.BELL, import("../../types").CustomViewIcon.BRIEFCASE, import("../../types").CustomViewIcon.CLOCK, import("../../types").CustomViewIcon.CREDIT_CARD, import("../../types").CustomViewIcon.HEART, import("../../types").CustomViewIcon.HOME, import("../../types").CustomViewIcon.KEY, import("../../types").CustomViewIcon.MOON, import("../../types").CustomViewIcon.PERSON, import("../../types").CustomViewIcon.SHOPPING_CART, import("../../types").CustomViewIcon.STAR], undefined>;
|
|
5
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
6
|
+
readonly name: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
7
|
+
}, undefined>;
|
|
8
|
+
export declare const userPushNotificationTokenSchema: v.ObjectSchema<{
|
|
9
|
+
readonly createdAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
10
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
11
|
+
readonly token: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
12
|
+
readonly userId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
13
|
+
}, undefined>;
|
|
14
|
+
export declare const userSchema: v.ObjectSchema<{
|
|
15
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
16
|
+
readonly name: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
17
|
+
readonly profilePicture: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
18
|
+
readonly pushNotificationTokens: v.ArraySchema<v.ObjectSchema<{
|
|
19
|
+
readonly createdAt: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
20
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
21
|
+
readonly token: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
22
|
+
readonly userId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
23
|
+
}, undefined>, undefined>;
|
|
24
|
+
readonly undoSendEnabled: v.BooleanSchema<undefined>;
|
|
25
|
+
readonly views: v.ArraySchema<v.ObjectSchema<{
|
|
26
|
+
readonly aliasEmails: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
27
|
+
readonly icon: v.PicklistSchema<readonly [import("../../types").CustomViewIcon.AIRPLANE, import("../../types").CustomViewIcon.BELL, import("../../types").CustomViewIcon.BRIEFCASE, import("../../types").CustomViewIcon.CLOCK, import("../../types").CustomViewIcon.CREDIT_CARD, import("../../types").CustomViewIcon.HEART, import("../../types").CustomViewIcon.HOME, import("../../types").CustomViewIcon.KEY, import("../../types").CustomViewIcon.MOON, import("../../types").CustomViewIcon.PERSON, import("../../types").CustomViewIcon.SHOPPING_CART, import("../../types").CustomViewIcon.STAR], undefined>;
|
|
28
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
29
|
+
readonly name: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
30
|
+
}, undefined>, undefined>;
|
|
31
|
+
}, undefined>;
|
|
32
|
+
export type User = v.InferOutput<typeof userSchema>;
|
|
33
|
+
export type UserView = v.InferOutput<typeof userViewSchema>;
|
|
34
|
+
export type UserPushNotificationToken = v.InferOutput<typeof userPushNotificationTokenSchema>;
|
|
35
|
+
//# sourceMappingURL=user.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../src/schemas/models/user.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAM5B,eAAO,MAAM,cAAc;;;;;aAKzB,CAAA;AAEF,eAAO,MAAM,+BAA+B;;;;;aAK1C,CAAA;AAEF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;aAOrB,CAAA;AAEF,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,UAAU,CAAC,CAAA;AACnD,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,cAAc,CAAC,CAAA;AAC3D,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,+BAA+B,CAAC,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
import { number } from '../../schemas/number';
|
|
3
|
+
import { string } from '../../schemas/string';
|
|
4
|
+
import { USER_SETTINGS_CUSTOM_VIEW_ICONS } from '../../types';
|
|
5
|
+
export const userViewSchema = v.object({
|
|
6
|
+
aliasEmails: v.array(string.required()),
|
|
7
|
+
icon: v.picklist(USER_SETTINGS_CUSTOM_VIEW_ICONS),
|
|
8
|
+
id: string.required(),
|
|
9
|
+
name: string.required(),
|
|
10
|
+
});
|
|
11
|
+
export const userPushNotificationTokenSchema = v.object({
|
|
12
|
+
createdAt: number.positiveInteger(),
|
|
13
|
+
id: string.required(),
|
|
14
|
+
token: string.required(),
|
|
15
|
+
userId: string.required(),
|
|
16
|
+
});
|
|
17
|
+
export const userSchema = v.object({
|
|
18
|
+
id: string.required(),
|
|
19
|
+
name: string.nullable(),
|
|
20
|
+
profilePicture: string.nullable(),
|
|
21
|
+
pushNotificationTokens: v.array(userPushNotificationTokenSchema),
|
|
22
|
+
undoSendEnabled: v.boolean(),
|
|
23
|
+
views: v.array(userViewSchema),
|
|
24
|
+
});
|
package/dist/schemas/number.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
2
|
export declare const number: {
|
|
3
|
+
fromString: () => v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.TransformAction<string, number>, v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
|
|
3
4
|
minMax: (min: number, max: number) => v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, number, undefined>, v.MaxValueAction<number, number, undefined>]>, undefined>;
|
|
4
5
|
nullable: () => v.NullableSchema<v.NumberSchema<undefined>, undefined>;
|
|
5
6
|
positiveInteger: () => v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
7
|
+
positiveIntegerFromString: () => v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.TransformAction<string, number>, v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
6
8
|
};
|
|
7
9
|
//# sourceMappingURL=number.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"number.d.ts","sourceRoot":"","sources":["../../src/schemas/number.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"number.d.ts","sourceRoot":"","sources":["../../src/schemas/number.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,eAAO,MAAM,MAAM;;kBASH,MAAM,OAAO,MAAM;;;;CAIlC,CAAA"}
|
package/dist/schemas/number.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
2
|
export const number = {
|
|
3
|
+
fromString: () => v.pipe(v.string(), v.nonEmpty(), v.transform(value => Number(value)), v.number(), v.finite()),
|
|
3
4
|
minMax: (min, max) => v.nonOptional(v.pipe(v.number(), v.minValue(min), v.maxValue(max))),
|
|
4
5
|
nullable: () => v.nullable(v.number()),
|
|
5
6
|
positiveInteger: () => v.nonOptional(v.pipe(v.number(), v.integer(), v.minValue(0))),
|
|
7
|
+
positiveIntegerFromString: () => v.pipe(number.fromString(), v.integer(), v.minValue(0)),
|
|
6
8
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
export declare const paginatedResponseSchema: <T extends v.GenericSchema>(itemSchema: T) => v.ObjectSchema<{
|
|
3
|
+
readonly items: v.ArraySchema<T, undefined>;
|
|
4
|
+
readonly nextCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
5
|
+
}, undefined>;
|
|
6
|
+
export type PaginatedResponse<T> = {
|
|
7
|
+
items: T[];
|
|
8
|
+
nextCursor: string | null;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=paginatedResponse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paginatedResponse.d.ts","sourceRoot":"","sources":["../../src/schemas/paginatedResponse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,eAAO,MAAM,uBAAuB,GAAI,CAAC,SAAS,CAAC,CAAC,aAAa,cAAc,CAAC;;;aAI5E,CAAA;AAEJ,MAAM,MAAM,iBAAiB,CAAC,CAAC,IAAI;IACjC,KAAK,EAAE,CAAC,EAAE,CAAA;IACV,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;CAC1B,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
export declare const pokeEventSchema: v.ObjectSchema<{
|
|
3
|
+
readonly event: v.LiteralSchema<"poke", undefined>;
|
|
4
|
+
readonly model: v.PicklistSchema<readonly ["user", "account", "contact", "draft", "thread", "label"], undefined>;
|
|
5
|
+
}, undefined>;
|
|
6
|
+
export declare const websocket: {
|
|
7
|
+
pokeEvent: v.ObjectSchema<{
|
|
8
|
+
readonly event: v.LiteralSchema<"poke", undefined>;
|
|
9
|
+
readonly model: v.PicklistSchema<readonly ["user", "account", "contact", "draft", "thread", "label"], undefined>;
|
|
10
|
+
}, undefined>;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=websocket.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"websocket.d.ts","sourceRoot":"","sources":["../../src/schemas/websocket.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAI5B,eAAO,MAAM,eAAe;;;aAG1B,CAAA;AAEF,eAAO,MAAM,SAAS;;;;;CAErB,CAAA"}
|
|
@@ -53,6 +53,20 @@ export declare const endpoints: {
|
|
|
53
53
|
readonly status: import("valibot").LiteralSchema<200, undefined>;
|
|
54
54
|
}, undefined>], undefined>>;
|
|
55
55
|
};
|
|
56
|
+
models: {
|
|
57
|
+
account: typeof import("./private/models/account");
|
|
58
|
+
contact: typeof import("./private/models/contact");
|
|
59
|
+
draft: typeof import("./private/models/draft");
|
|
60
|
+
label: typeof import("./private/models/label");
|
|
61
|
+
thread: typeof import("./private/models/thread");
|
|
62
|
+
user: typeof import("./private/models/user");
|
|
63
|
+
};
|
|
64
|
+
mutations: {
|
|
65
|
+
account: typeof import("./private/mutations/account");
|
|
66
|
+
draft: typeof import("./private/mutations/draft");
|
|
67
|
+
thread: typeof import("./private/mutations/thread");
|
|
68
|
+
user: typeof import("./private/mutations/user");
|
|
69
|
+
};
|
|
56
70
|
user: {
|
|
57
71
|
deleteUser: EndpointConfig<"/v1/pv/user", GenericSchema | undefined, GenericSchema | undefined, import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
|
|
58
72
|
readonly data: import("valibot").ObjectSchema<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sdk/endpoints/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE5C,OAAO,KAAK,EAAE,cAAc,EAAe,MAAM,qBAAqB,CAAA;AAWtE,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sdk/endpoints/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE5C,OAAO,KAAK,EAAE,cAAc,EAAe,MAAM,qBAAqB,CAAA;AAWtE,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGM,CAAA"}
|
|
@@ -50,6 +50,20 @@ export declare const privateGroup: {
|
|
|
50
50
|
readonly status: import("valibot").LiteralSchema<200, undefined>;
|
|
51
51
|
}, undefined>], undefined>>;
|
|
52
52
|
};
|
|
53
|
+
models: {
|
|
54
|
+
account: typeof import("./models/account");
|
|
55
|
+
contact: typeof import("./models/contact");
|
|
56
|
+
draft: typeof import("./models/draft");
|
|
57
|
+
label: typeof import("./models/label");
|
|
58
|
+
thread: typeof import("./models/thread");
|
|
59
|
+
user: typeof import("./models/user");
|
|
60
|
+
};
|
|
61
|
+
mutations: {
|
|
62
|
+
account: typeof import("./mutations/account");
|
|
63
|
+
draft: typeof import("./mutations/draft");
|
|
64
|
+
thread: typeof import("./mutations/thread");
|
|
65
|
+
user: typeof import("./mutations/user");
|
|
66
|
+
};
|
|
53
67
|
user: {
|
|
54
68
|
deleteUser: import("../../..").EndpointConfig<"/v1/pv/user", import("valibot").GenericSchema | undefined, import("valibot").GenericSchema | undefined, import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
|
|
55
69
|
readonly data: import("valibot").ObjectSchema<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sdk/endpoints/private/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sdk/endpoints/private/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMxB,CAAA"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { draftAttachment } from './draftAttachment';
|
|
2
2
|
import { emailMessage } from './emailMessage';
|
|
3
|
+
import { models } from './models';
|
|
4
|
+
import { mutations } from './mutations';
|
|
3
5
|
import { user } from './user';
|
|
4
6
|
export const privateGroup = {
|
|
5
7
|
draftAttachment,
|
|
6
8
|
emailMessage,
|
|
9
|
+
models,
|
|
10
|
+
mutations,
|
|
7
11
|
user,
|
|
8
12
|
};
|