@marcoappio/marco-config 4.0.15 → 4.0.16

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 (54) hide show
  1. package/dist/appwrite/appwrite.d.ts.map +1 -1
  2. package/dist/appwrite/appwrite.js +15 -23
  3. package/dist/appwrite/appwrite.test.js +31 -11
  4. package/dist/index.d.ts +1 -1
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +1 -1
  7. package/dist/index.test.js +11 -0
  8. package/dist/schemas/app.d.ts +1 -1
  9. package/dist/schemas/app.js +1 -1
  10. package/dist/schemas/emailAccount.d.ts +4 -4
  11. package/dist/schemas/emailAccount.d.ts.map +1 -1
  12. package/dist/schemas/emailAccount.js +5 -5
  13. package/dist/schemas/index.d.ts +9 -27
  14. package/dist/schemas/index.d.ts.map +1 -1
  15. package/dist/schemas/index.js +1 -2
  16. package/dist/schemas/models/index.d.ts +1 -1
  17. package/dist/schemas/models/index.d.ts.map +1 -1
  18. package/dist/schemas/models/index.js +1 -1
  19. package/dist/schemas/models/thread.d.ts +1 -19
  20. package/dist/schemas/models/thread.d.ts.map +1 -1
  21. package/dist/schemas/models/thread.js +0 -1
  22. package/dist/schemas/models/user.d.ts +1 -1
  23. package/dist/schemas/models/user.test.js +7 -0
  24. package/dist/schemas/oauth.d.ts +1 -1
  25. package/dist/schemas/oauth.js +1 -1
  26. package/dist/schemas/pushNotifications.d.ts +2 -2
  27. package/dist/schemas/pushNotifications.d.ts.map +1 -1
  28. package/dist/schemas/pushNotifications.js +1 -2
  29. package/dist/schemas/schemaValues.test.d.ts +2 -0
  30. package/dist/schemas/schemaValues.test.d.ts.map +1 -0
  31. package/dist/schemas/schemaValues.test.js +21 -0
  32. package/dist/types/UserSettings.d.ts +16 -15
  33. package/dist/types/UserSettings.d.ts.map +1 -1
  34. package/dist/types/UserSettings.js +15 -29
  35. package/dist/utils/accounts/index.d.ts +1 -3
  36. package/dist/utils/accounts/index.d.ts.map +1 -1
  37. package/dist/utils/accounts/index.js +1 -4
  38. package/dist/utils/index.d.ts +3 -3
  39. package/dist/utils/index.d.ts.map +1 -1
  40. package/dist/utils/index.js +3 -3
  41. package/dist/utils/labels/index.d.ts +2 -3
  42. package/dist/utils/labels/index.d.ts.map +1 -1
  43. package/dist/utils/labels/index.js +1 -4
  44. package/dist/utils/threads/index.d.ts +2 -4
  45. package/dist/utils/threads/index.d.ts.map +1 -1
  46. package/dist/utils/threads/index.js +2 -6
  47. package/dist/utils/threads/parseLabelIdList/parseLabelIdList.test.js +1 -1
  48. package/package.json +1 -1
  49. package/dist/utils/threads/parseLabelIdList/index.d.ts +0 -2
  50. package/dist/utils/threads/parseLabelIdList/index.d.ts.map +0 -1
  51. package/dist/utils/threads/parseLabelIdList/index.js +0 -1
  52. package/dist/utils/threads/processSearchTerm/index.d.ts +0 -2
  53. package/dist/utils/threads/processSearchTerm/index.d.ts.map +0 -1
  54. package/dist/utils/threads/processSearchTerm/index.js +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"appwrite.d.ts","sourceRoot":"","sources":["../../src/appwrite/appwrite.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAC7C,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAyB5B,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAC7J,YAAY,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAA;AAEtF,YAAY,EAAE,uBAAuB,EAAE,4BAA4B,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAC/J,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAC5B,KAAK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;;;;;;;;;;;;;;;;;;;;;;;;CA4CT,CAAA"}
@@ -22,34 +22,26 @@ const messageRecipientSchema = v.strictObject({
22
22
  });
23
23
  const messageRecipientsSchema = v.pipe(v.string(), v.parseJson(), v.array(messageRecipientSchema));
24
24
  const appwriteEnvironments = ['development', 'production', 'staging'];
25
- const appwriteDeployments = {
26
- development: {
27
- applicationUrl: 'https://app.staging.marcoapp.io',
28
- endpoint: 'https://nyc.cloud.appwrite.io/v1',
29
- oauthClientIds: {
30
- google: '338197922176-oml1o2iputhhu3vijgue9h8sbfq17qme.apps.googleusercontent.com',
31
- microsoft: 'd34106a5-5210-417e-bf38-6ddbe3aa91a7',
32
- },
33
- projectId: 'marco',
25
+ const createSharedDeployment = () => ({
26
+ oauthClientIds: {
27
+ google: '338197922176-oml1o2iputhhu3vijgue9h8sbfq17qme.apps.googleusercontent.com',
28
+ microsoft: 'd34106a5-5210-417e-bf38-6ddbe3aa91a7',
34
29
  },
30
+ projectId: 'marco',
31
+ });
32
+ const createStagingDeployment = () => ({
33
+ ...createSharedDeployment(),
34
+ applicationUrl: 'https://app.staging.marcoapp.io',
35
+ endpoint: 'https://nyc.cloud.appwrite.io/v1',
36
+ });
37
+ const appwriteDeployments = {
38
+ development: createStagingDeployment(),
35
39
  production: {
40
+ ...createSharedDeployment(),
36
41
  applicationUrl: 'https://app.marcoapp.io',
37
42
  endpoint: 'https://platform.marcoapp.io/v1',
38
- oauthClientIds: {
39
- google: '338197922176-oml1o2iputhhu3vijgue9h8sbfq17qme.apps.googleusercontent.com',
40
- microsoft: 'd34106a5-5210-417e-bf38-6ddbe3aa91a7',
41
- },
42
- projectId: 'marco',
43
- },
44
- staging: {
45
- applicationUrl: 'https://app.staging.marcoapp.io',
46
- endpoint: 'https://nyc.cloud.appwrite.io/v1',
47
- oauthClientIds: {
48
- google: '338197922176-oml1o2iputhhu3vijgue9h8sbfq17qme.apps.googleusercontent.com',
49
- microsoft: 'd34106a5-5210-417e-bf38-6ddbe3aa91a7',
50
- },
51
- projectId: 'marco',
52
43
  },
44
+ staging: createStagingDeployment(),
53
45
  };
54
46
  export const appwrite = {
55
47
  dataSchemas: appwriteDataSchemas,
@@ -343,19 +343,39 @@ const pollShardCoordinatorSchema = Object.entries(appwrite.rowSchemas).find(([ta
343
343
  describe('appwrite', () => {
344
344
  it('publishes the production browser and OAuth configuration', () => {
345
345
  expect(appwrite.environments).toEqual(['development', 'production', 'staging']);
346
- expect(appwrite.deployments.production).toEqual({
347
- applicationUrl: 'https://app.marcoapp.io',
348
- endpoint: 'https://platform.marcoapp.io/v1',
349
- oauthClientIds: {
350
- google: '338197922176-oml1o2iputhhu3vijgue9h8sbfq17qme.apps.googleusercontent.com',
351
- microsoft: 'd34106a5-5210-417e-bf38-6ddbe3aa91a7',
346
+ expect(appwrite.deployments).toEqual({
347
+ development: {
348
+ applicationUrl: 'https://app.staging.marcoapp.io',
349
+ endpoint: 'https://nyc.cloud.appwrite.io/v1',
350
+ oauthClientIds: {
351
+ google: '338197922176-oml1o2iputhhu3vijgue9h8sbfq17qme.apps.googleusercontent.com',
352
+ microsoft: 'd34106a5-5210-417e-bf38-6ddbe3aa91a7',
353
+ },
354
+ projectId: 'marco',
355
+ },
356
+ production: {
357
+ applicationUrl: 'https://app.marcoapp.io',
358
+ endpoint: 'https://platform.marcoapp.io/v1',
359
+ oauthClientIds: {
360
+ google: '338197922176-oml1o2iputhhu3vijgue9h8sbfq17qme.apps.googleusercontent.com',
361
+ microsoft: 'd34106a5-5210-417e-bf38-6ddbe3aa91a7',
362
+ },
363
+ projectId: 'marco',
364
+ },
365
+ staging: {
366
+ applicationUrl: 'https://app.staging.marcoapp.io',
367
+ endpoint: 'https://nyc.cloud.appwrite.io/v1',
368
+ oauthClientIds: {
369
+ google: '338197922176-oml1o2iputhhu3vijgue9h8sbfq17qme.apps.googleusercontent.com',
370
+ microsoft: 'd34106a5-5210-417e-bf38-6ddbe3aa91a7',
371
+ },
372
+ projectId: 'marco',
352
373
  },
353
- projectId: 'marco',
354
- });
355
- expect(appwrite.deployments.staging.oauthClientIds).toEqual({
356
- google: '338197922176-oml1o2iputhhu3vijgue9h8sbfq17qme.apps.googleusercontent.com',
357
- microsoft: 'd34106a5-5210-417e-bf38-6ddbe3aa91a7',
358
374
  });
375
+ expect(appwrite.deployments.development).not.toBe(appwrite.deployments.staging);
376
+ expect(appwrite.deployments.development.oauthClientIds).not.toBe(appwrite.deployments.staging.oauthClientIds);
377
+ expect(appwrite.deployments.development.oauthClientIds).not.toBe(appwrite.deployments.production.oauthClientIds);
378
+ expect(appwrite.deployments.production.oauthClientIds).not.toBe(appwrite.deployments.staging.oauthClientIds);
359
379
  });
360
380
  it('exports the approved resource identifiers', () => {
361
381
  expect(appwrite.ids).toEqual({
package/dist/index.d.ts CHANGED
@@ -2,5 +2,5 @@ export { type AppwriteCommandError, type AppwriteCommandKind, type AppwriteComma
2
2
  export { marcoConstants } from './constants';
3
3
  export { type Account, type AccountAlias, type AccountId, type AccountLabel, type AliasId, type AttachmentId, type Contact, type ContactId, type Draft, type DraftAttachment, type DraftBody, type DraftId, type JobId, type LabelId, type MessageId, marcoSchemas, type PushNotificationTokenId, type RecipientId, type Thread, type ThreadId, type ThreadMessage, type ThreadMessageAttachment, type ThreadMessageRecipient, type UserId, type UserView, type ViewId, } from './schemas';
4
4
  export * from './types';
5
- export { accountUtils, labelUtils, threadsUtils } from './utils';
5
+ export { generateAccountColor, labelSpecialUseOrdering, parseLabelIdList, processSearchTerm } from './utils';
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACv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,EACb,QAAQ,EACR,cAAc,EACd,qBAAqB,EACrB,gBAAgB,EAChB,mBAAmB,EACnB,iBAAiB,EACjB,4BAA4B,EAC5B,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,EACrB,cAAc,EACd,aAAa,EACb,oBAAoB,EACpB,WAAW,EACX,UAAU,EACV,SAAS,EACT,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EAChB,4BAA4B,EAC5B,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,eAAe,EACf,oBAAoB,EACpB,eAAe,GAChB,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,SAAS,EACd,KAAK,KAAK,EACV,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,SAAS,EACd,YAAY,EACZ,KAAK,uBAAuB,EAC5B,KAAK,WAAW,EAChB,KAAK,MAAM,EACX,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,MAAM,EACX,KAAK,QAAQ,EACb,KAAK,MAAM,GACZ,MAAM,WAAW,CAAA;AAClB,cAAc,SAAS,CAAA;AACvB,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA"}
package/dist/index.js CHANGED
@@ -2,4 +2,4 @@ export { accountProviders, accountStates, appwrite, appwriteAvatar, appwriteComm
2
2
  export { marcoConstants } from './constants';
3
3
  export { marcoSchemas, } from './schemas';
4
4
  export * from './types';
5
- export { accountUtils, labelUtils, threadsUtils } from './utils';
5
+ export { generateAccountColor, labelSpecialUseOrdering, parseLabelIdList, processSearchTerm } from './utils';
@@ -32,6 +32,17 @@ describe('public exports', () => {
32
32
  expect('enum' in config.marcoSchemas.string).toBe(false);
33
33
  expect('matches' in config.marcoSchemas.string).toBe(false);
34
34
  expect('optional' in config.marcoSchemas.string).toBe(false);
35
+ expect('threadListSchema' in config.marcoSchemas.models).toBe(false);
36
+ });
37
+ it('exports utility functions directly without wrapper objects', async () => {
38
+ const config = await import('./index');
39
+ expect(config.generateAccountColor).toBeTypeOf('function');
40
+ expect(config.labelSpecialUseOrdering).toEqual(['INBOX', 'SENT', 'SPAM', 'TRASH', 'ARCHIVE']);
41
+ expect(config.parseLabelIdList).toBeTypeOf('function');
42
+ expect(config.processSearchTerm).toBeTypeOf('function');
43
+ expect('accountUtils' in config).toBe(false);
44
+ expect('labelUtils' in config).toBe(false);
45
+ expect('threadsUtils' in config).toBe(false);
35
46
  });
36
47
  it('omits the Railway REST constants', async () => {
37
48
  const config = await import('./index');
@@ -1,5 +1,5 @@
1
1
  import * as v from 'valibot';
2
2
  export declare const app: {
3
- platform: () => v.PicklistSchema<readonly ["ios", "osx", "web"], undefined>;
3
+ platform: v.PicklistSchema<readonly ["ios", "osx", "web"], undefined>;
4
4
  };
5
5
  //# sourceMappingURL=app.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import * as v from 'valibot';
2
2
  import { MARCO_PLATFORM } from '../types';
3
3
  export const app = {
4
- platform: () => v.picklist(MARCO_PLATFORM),
4
+ platform: v.picklist(MARCO_PLATFORM),
5
5
  };
@@ -1,7 +1,7 @@
1
1
  import * as v from 'valibot';
2
2
  export { socketTypeSchema } from './scalars';
3
3
  export declare const emailAccount: {
4
- connectionConfigImapRaw: () => v.ObjectSchema<{
4
+ connectionConfigImapRaw: v.ObjectSchema<{
5
5
  readonly imapHost: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
6
6
  readonly imapPassword: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
7
7
  readonly imapPort: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>, v.MaxValueAction<number, 65535, undefined>]>;
@@ -13,12 +13,12 @@ export declare const emailAccount: {
13
13
  readonly smtpSocketType: v.PicklistSchema<readonly ["SSL", "STARTTLS"], undefined>;
14
14
  readonly smtpUser: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
15
15
  }, undefined>;
16
- connectionConfigOauth: () => v.ObjectSchema<{
16
+ connectionConfigOauth: v.ObjectSchema<{
17
17
  readonly code: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
18
18
  readonly provider: v.PicklistSchema<readonly ["GOOGLE", "OUTLOOK"], undefined>;
19
19
  readonly user: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
20
20
  }, undefined>;
21
- imapConnectionStatus: () => v.PicklistSchema<readonly ["AWAITING_CONNECTION", "CONNECTED", "CONNECTION_FAILED_AUTHENTICATION_ERROR", "CONNECTION_FAILED_CONNECTION_ERROR", "CONNECTION_FAILED_OAUTH_EXCHANGE_ERROR", "CONNECTION_FAILED_QUOTA_ERROR", "CONNECTION_FAILED_UNKNOWN_ERROR"], undefined>;
22
- socketTypeSchema: () => v.PicklistSchema<readonly ["SSL", "STARTTLS"], undefined>;
21
+ imapConnectionStatus: v.PicklistSchema<readonly ["AWAITING_CONNECTION", "CONNECTED", "CONNECTION_FAILED_AUTHENTICATION_ERROR", "CONNECTION_FAILED_CONNECTION_ERROR", "CONNECTION_FAILED_OAUTH_EXCHANGE_ERROR", "CONNECTION_FAILED_QUOTA_ERROR", "CONNECTION_FAILED_UNKNOWN_ERROR"], undefined>;
22
+ socketTypeSchema: v.PicklistSchema<readonly ["SSL", "STARTTLS"], undefined>;
23
23
  };
24
24
  //# sourceMappingURL=emailAccount.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"emailAccount.d.ts","sourceRoot":"","sources":["../../src/schemas/emailAccount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAQ5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAE5C,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;CAsBxB,CAAA"}
1
+ {"version":3,"file":"emailAccount.d.ts","sourceRoot":"","sources":["../../src/schemas/emailAccount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAQ5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAE5C,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;CAoBxB,CAAA"}
@@ -5,7 +5,7 @@ import { portSchema, socketTypeSchema } from './scalars';
5
5
  import { string } from './string';
6
6
  export { socketTypeSchema } from './scalars';
7
7
  export const emailAccount = {
8
- connectionConfigImapRaw: () => v.object({
8
+ connectionConfigImapRaw: v.object({
9
9
  imapHost: string.required(4096),
10
10
  imapPassword: string.required(4096),
11
11
  imapPort: portSchema,
@@ -17,11 +17,11 @@ export const emailAccount = {
17
17
  smtpSocketType: socketTypeSchema,
18
18
  smtpUser: string.required(4096),
19
19
  }),
20
- connectionConfigOauth: () => v.object({
20
+ connectionConfigOauth: v.object({
21
21
  code: string.required(4096),
22
- provider: oauth.provider(),
22
+ provider: oauth.provider,
23
23
  user: string.required(4096),
24
24
  }),
25
- imapConnectionStatus: () => v.picklist(IMAP_CONNECTION_STATUSES),
26
- socketTypeSchema: () => socketTypeSchema,
25
+ imapConnectionStatus: v.picklist(IMAP_CONNECTION_STATUSES),
26
+ socketTypeSchema,
27
27
  };
@@ -2,7 +2,7 @@ export type { AccountId, AliasId, AttachmentId, ContactId, DraftId, JobId, Label
2
2
  export type { Account, AccountAlias, AccountLabel, Contact, Draft, DraftAttachment, DraftBody, Thread, ThreadMessage, ThreadMessageAttachment, ThreadMessageRecipient, UserView, } from './models';
3
3
  export declare const marcoSchemas: {
4
4
  app: {
5
- platform: () => import("valibot").PicklistSchema<readonly ["ios", "osx", "web"], undefined>;
5
+ platform: import("valibot").PicklistSchema<readonly ["ios", "osx", "web"], undefined>;
6
6
  };
7
7
  auth: {
8
8
  code: import("valibot").ObjectSchema<{
@@ -12,7 +12,7 @@ export declare const marcoSchemas: {
12
12
  }, undefined>;
13
13
  };
14
14
  emailAccount: {
15
- connectionConfigImapRaw: () => import("valibot").ObjectSchema<{
15
+ connectionConfigImapRaw: import("valibot").ObjectSchema<{
16
16
  readonly imapHost: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
17
17
  readonly imapPassword: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
18
18
  readonly imapPort: import("valibot").SchemaWithPipe<readonly [import("valibot").SchemaWithPipe<readonly [import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>, import("valibot").MinValueAction<number, 1, undefined>]>, import("valibot").MaxValueAction<number, 65535, undefined>]>;
@@ -24,13 +24,13 @@ export declare const marcoSchemas: {
24
24
  readonly smtpSocketType: import("valibot").PicklistSchema<readonly ["SSL", "STARTTLS"], undefined>;
25
25
  readonly smtpUser: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
26
26
  }, undefined>;
27
- connectionConfigOauth: () => import("valibot").ObjectSchema<{
27
+ connectionConfigOauth: import("valibot").ObjectSchema<{
28
28
  readonly code: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
29
29
  readonly provider: import("valibot").PicklistSchema<readonly ["GOOGLE", "OUTLOOK"], undefined>;
30
30
  readonly user: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
31
31
  }, undefined>;
32
- imapConnectionStatus: () => import("valibot").PicklistSchema<readonly ["AWAITING_CONNECTION", "CONNECTED", "CONNECTION_FAILED_AUTHENTICATION_ERROR", "CONNECTION_FAILED_CONNECTION_ERROR", "CONNECTION_FAILED_OAUTH_EXCHANGE_ERROR", "CONNECTION_FAILED_QUOTA_ERROR", "CONNECTION_FAILED_UNKNOWN_ERROR"], undefined>;
33
- socketTypeSchema: () => import("valibot").PicklistSchema<readonly ["SSL", "STARTTLS"], undefined>;
32
+ imapConnectionStatus: import("valibot").PicklistSchema<readonly ["AWAITING_CONNECTION", "CONNECTED", "CONNECTION_FAILED_AUTHENTICATION_ERROR", "CONNECTION_FAILED_CONNECTION_ERROR", "CONNECTION_FAILED_OAUTH_EXCHANGE_ERROR", "CONNECTION_FAILED_QUOTA_ERROR", "CONNECTION_FAILED_UNKNOWN_ERROR"], undefined>;
33
+ socketTypeSchema: import("valibot").PicklistSchema<readonly ["SSL", "STARTTLS"], undefined>;
34
34
  };
35
35
  id: {
36
36
  accountId: {
@@ -231,24 +231,6 @@ export declare const marcoSchemas: {
231
231
  readonly userId: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>, import("valibot").BrandAction<string, "UserId">]>, undefined>;
232
232
  readonly words: import("valibot").StringSchema<undefined>;
233
233
  }, undefined>;
234
- threadListSchema: import("valibot").ObjectSchema<{
235
- accountId: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>, import("valibot").BrandAction<string, "AccountId">]>, undefined>;
236
- flagged: import("valibot").BooleanSchema<undefined>;
237
- hasAttachments: import("valibot").BooleanSchema<undefined>;
238
- id: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>, import("valibot").BrandAction<string, "ThreadId">]>, undefined>;
239
- labelIdList: import("valibot").StringSchema<undefined>;
240
- latestMessageDate: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>, import("valibot").MinValueAction<number, 1, undefined>]>, undefined>;
241
- latestMessageId: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>, import("valibot").BrandAction<string, "MessageId">]>, undefined>;
242
- messageCount: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>, import("valibot").MinValueAction<number, 0, undefined>]>, undefined>;
243
- previewText: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
244
- seen: import("valibot").BooleanSchema<undefined>;
245
- senderEmail: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").RfcEmailAction<string, undefined>]>, import("valibot").MaxLengthAction<string, 320, undefined>]>, undefined>;
246
- senderName: import("valibot").NullableSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
247
- snoozedUntil: import("valibot").NullableSchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>, import("valibot").MinValueAction<number, 1, undefined>]>, undefined>, undefined>;
248
- subject: import("valibot").NullableSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
249
- userId: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>, import("valibot").BrandAction<string, "UserId">]>, undefined>;
250
- words: import("valibot").StringSchema<undefined>;
251
- }, undefined>;
252
234
  threadMessageAttachmentSchema: import("valibot").ObjectSchema<{
253
235
  readonly fileName: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
254
236
  readonly id: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>, import("valibot").BrandAction<string, "AttachmentId">]>, undefined>;
@@ -308,7 +290,7 @@ export declare const marcoSchemas: {
308
290
  }, undefined>;
309
291
  userViewSchema: import("valibot").ObjectSchema<{
310
292
  readonly aliasIds: import("valibot").ArraySchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>, import("valibot").BrandAction<string, "AliasId">]>, undefined>, undefined>;
311
- readonly icon: import("valibot").PicklistSchema<readonly [import("..").CustomViewIcon.AIRPLANE, import("..").CustomViewIcon.BELL, import("..").CustomViewIcon.BRIEFCASE, import("..").CustomViewIcon.CLOCK, import("..").CustomViewIcon.CREDIT_CARD, import("..").CustomViewIcon.HEART, import("..").CustomViewIcon.HOME, import("..").CustomViewIcon.KEY, import("..").CustomViewIcon.MOON, import("..").CustomViewIcon.PERSON, import("..").CustomViewIcon.SHOPPING_CART, import("..").CustomViewIcon.STAR], undefined>;
293
+ readonly icon: import("valibot").PicklistSchema<readonly import("..").CustomViewIcon[], undefined>;
312
294
  readonly id: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>, import("valibot").BrandAction<string, "ViewId">]>, undefined>;
313
295
  readonly name: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
314
296
  }, undefined>;
@@ -319,16 +301,16 @@ export declare const marcoSchemas: {
319
301
  positiveInteger: () => import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>, import("valibot").MinValueAction<number, 1, undefined>]>, undefined>;
320
302
  };
321
303
  oauth: {
322
- provider: () => import("valibot").PicklistSchema<readonly ["GOOGLE", "OUTLOOK"], undefined>;
304
+ provider: import("valibot").PicklistSchema<readonly ["GOOGLE", "OUTLOOK"], undefined>;
323
305
  };
324
306
  pushNotifications: {
325
- payload: import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
307
+ payload: import("valibot").ObjectSchema<{
326
308
  readonly data: import("valibot").ObjectSchema<{
327
309
  readonly messageId: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>, import("valibot").BrandAction<string, "MessageId">]>, undefined>;
328
310
  readonly threadId: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>, import("valibot").BrandAction<string, "ThreadId">]>, undefined>;
329
311
  }, undefined>;
330
312
  readonly event: import("valibot").LiteralSchema<"EMAIL_RECEIVED", undefined>;
331
- }, undefined>], undefined>;
313
+ }, undefined>;
332
314
  };
333
315
  string: {
334
316
  email: () => import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").RfcEmailAction<string, undefined>]>, undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAyBA,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAC3K,YAAY,EACV,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,KAAK,EACL,eAAe,EACf,SAAS,EACT,MAAM,EACN,aAAa,EACb,uBAAuB,EACvB,sBAAsB,EACtB,QAAQ,GACT,MAAM,UAAU,CAAA;AAEjB,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;CAwBxB,CAAA"}
@@ -2,7 +2,7 @@ import { app } from './app';
2
2
  import { auth } from './auth';
3
3
  import { emailAccount } from './emailAccount';
4
4
  import { id } from './id';
5
- import { accountAliasSchema, accountLabelSchema, accountSchema, contactSchema, draftAttachmentSchema, draftBodySchema, draftSchema, threadFullSchema, threadListSchema, threadMessageAttachmentSchema, threadMessageRecipientSchema, threadMessageSchema, threadSchema, userViewSchema, } from './models';
5
+ import { accountAliasSchema, accountLabelSchema, accountSchema, contactSchema, draftAttachmentSchema, draftBodySchema, draftSchema, threadFullSchema, threadMessageAttachmentSchema, threadMessageRecipientSchema, threadMessageSchema, threadSchema, userViewSchema, } from './models';
6
6
  import { number } from './number';
7
7
  import { oauth } from './oauth';
8
8
  import { pushNotifications } from './pushNotifications';
@@ -21,7 +21,6 @@ export const marcoSchemas = {
21
21
  draftBodySchema,
22
22
  draftSchema,
23
23
  threadFullSchema,
24
- threadListSchema,
25
24
  threadMessageAttachmentSchema,
26
25
  threadMessageRecipientSchema,
27
26
  threadMessageSchema,
@@ -1,6 +1,6 @@
1
1
  export { type Account, type AccountAlias, type AccountLabel, accountAliasSchema, accountLabelSchema, accountSchema } from './account';
2
2
  export { type Contact, contactSchema } from './contact';
3
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';
4
+ export { type Thread, type ThreadMessage, type ThreadMessageAttachment, type ThreadMessageRecipient, threadFullSchema, threadMessageAttachmentSchema, threadMessageRecipientSchema, threadMessageSchema, threadSchema, } from './thread';
5
5
  export { type UserView, userViewSchema } from './user';
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/schemas/models/index.ts"],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,cAAc,EAAE,MAAM,QAAQ,CAAA"}
@@ -1,5 +1,5 @@
1
1
  export { accountAliasSchema, accountLabelSchema, accountSchema } from './account';
2
2
  export { contactSchema } from './contact';
3
3
  export { draftAttachmentSchema, draftBodySchema, draftSchema } from './draft';
4
- export { threadFullSchema, threadListSchema, threadMessageAttachmentSchema, threadMessageRecipientSchema, threadMessageSchema, threadSchema, } from './thread';
4
+ export { threadFullSchema, threadMessageAttachmentSchema, threadMessageRecipientSchema, threadMessageSchema, threadSchema, } from './thread';
5
5
  export { userViewSchema } from './user';
@@ -56,24 +56,6 @@ export declare const threadSchema: v.ObjectSchema<{
56
56
  userId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "UserId">]>, undefined>;
57
57
  words: v.StringSchema<undefined>;
58
58
  }, undefined>;
59
- export declare const threadListSchema: v.ObjectSchema<{
60
- accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
61
- flagged: v.BooleanSchema<undefined>;
62
- hasAttachments: v.BooleanSchema<undefined>;
63
- id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "ThreadId">]>, undefined>;
64
- labelIdList: v.StringSchema<undefined>;
65
- latestMessageDate: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>, undefined>;
66
- latestMessageId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "MessageId">]>, undefined>;
67
- messageCount: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
68
- previewText: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
69
- seen: v.BooleanSchema<undefined>;
70
- senderEmail: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RfcEmailAction<string, undefined>]>, v.MaxLengthAction<string, 320, undefined>]>, undefined>;
71
- senderName: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
72
- snoozedUntil: v.NullableSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>, undefined>, undefined>;
73
- subject: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
74
- userId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "UserId">]>, undefined>;
75
- words: v.StringSchema<undefined>;
76
- }, undefined>;
77
59
  export declare const threadFullSchema: v.ObjectSchema<{
78
60
  readonly messages: v.ArraySchema<v.ObjectSchema<{
79
61
  readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
@@ -118,7 +100,7 @@ export declare const threadFullSchema: v.ObjectSchema<{
118
100
  readonly words: v.StringSchema<undefined>;
119
101
  }, undefined>;
120
102
  export type Thread = v.InferOutput<typeof threadFullSchema>;
121
- export type ThreadListItem = v.InferOutput<typeof threadListSchema>;
103
+ export type ThreadListItem = v.InferOutput<typeof threadSchema>;
122
104
  export type ThreadMessage = v.InferOutput<typeof threadMessageSchema>;
123
105
  export type ThreadMessageAttachment = v.InferOutput<typeof threadMessageAttachmentSchema>;
124
106
  export type ThreadMessageRecipient = v.InferOutput<typeof threadMessageRecipientSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"thread.d.ts","sourceRoot":"","sources":["../../../src/schemas/models/thread.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAQ5B,eAAO,MAAM,6BAA6B;;;;;;aAMxC,CAAA;AAEF,eAAO,MAAM,4BAA4B;;;;;;aAMvC,CAAA;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;aAY9B,CAAA;AAqBF,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"}
1
+ {"version":3,"file":"thread.d.ts","sourceRoot":"","sources":["../../../src/schemas/models/thread.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAQ5B,eAAO,MAAM,6BAA6B;;;;;;aAMxC,CAAA;AAEF,eAAO,MAAM,4BAA4B;;;;;;aAMvC,CAAA;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;aAY9B,CAAA;AAqBF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;aAA8B,CAAA;AAEvD,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,YAAY,CAAC,CAAA;AAC/D,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"}
@@ -50,7 +50,6 @@ const threadBaseEntries = {
50
50
  words: v.string(),
51
51
  };
52
52
  export const threadSchema = v.object(threadBaseEntries);
53
- export const threadListSchema = threadSchema;
54
53
  export const threadFullSchema = v.object({
55
54
  ...threadBaseEntries,
56
55
  messages: v.array(threadMessageSchema),
@@ -1,7 +1,7 @@
1
1
  import * as v from 'valibot';
2
2
  export declare const userViewSchema: v.ObjectSchema<{
3
3
  readonly aliasIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AliasId">]>, 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>;
4
+ readonly icon: v.PicklistSchema<readonly import("../../types").CustomViewIcon[], undefined>;
5
5
  readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "ViewId">]>, undefined>;
6
6
  readonly name: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
7
7
  }, undefined>;
@@ -1,5 +1,6 @@
1
1
  import { describe, expect, it } from 'bun:test';
2
2
  import * as v from 'valibot';
3
+ import { CustomViewIcon, USER_SETTINGS_CUSTOM_VIEW_ICONS } from '../../types';
3
4
  import { userViewSchema } from './user';
4
5
  describe('userViewSchema', () => {
5
6
  it('keys saved views by stable alias IDs', () => {
@@ -8,4 +9,10 @@ describe('userViewSchema', () => {
8
9
  expect(v.safeParse(userViewSchema, view).success).toBe(true);
9
10
  expect(v.safeParse(userViewSchema, legacyView).success).toBe(false);
10
11
  });
12
+ it('derives the ordered custom-view icon collection from enum-style values', () => {
13
+ expect(CustomViewIcon.STAR).toBe('STAR');
14
+ expect(USER_SETTINGS_CUSTOM_VIEW_ICONS).toEqual(['AIRPLANE', 'BELL', 'BRIEFCASE', 'CLOCK', 'CREDIT_CARD', 'HEART', 'HOME', 'KEY', 'MOON', 'PERSON', 'SHOPPING_CART', 'STAR']);
15
+ expect(USER_SETTINGS_CUSTOM_VIEW_ICONS).toEqual(Object.values(CustomViewIcon));
16
+ expect(Object.isFrozen(USER_SETTINGS_CUSTOM_VIEW_ICONS)).toBe(true);
17
+ });
11
18
  });
@@ -1,5 +1,5 @@
1
1
  import * as v from 'valibot';
2
2
  export declare const oauth: {
3
- provider: () => v.PicklistSchema<readonly ["GOOGLE", "OUTLOOK"], undefined>;
3
+ provider: v.PicklistSchema<readonly ["GOOGLE", "OUTLOOK"], undefined>;
4
4
  };
5
5
  //# sourceMappingURL=oauth.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import * as v from 'valibot';
2
2
  import { OAUTH_PROVIDERS } from '../types';
3
3
  export const oauth = {
4
- provider: () => v.picklist(OAUTH_PROVIDERS),
4
+ provider: v.picklist(OAUTH_PROVIDERS),
5
5
  };
@@ -1,11 +1,11 @@
1
1
  import * as v from 'valibot';
2
2
  export declare const pushNotifications: {
3
- payload: v.UnionSchema<[v.ObjectSchema<{
3
+ payload: v.ObjectSchema<{
4
4
  readonly data: v.ObjectSchema<{
5
5
  readonly messageId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "MessageId">]>, undefined>;
6
6
  readonly threadId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "ThreadId">]>, undefined>;
7
7
  }, undefined>;
8
8
  readonly event: v.LiteralSchema<"EMAIL_RECEIVED", undefined>;
9
- }, undefined>], undefined>;
9
+ }, undefined>;
10
10
  };
11
11
  //# sourceMappingURL=pushNotifications.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pushNotifications.d.ts","sourceRoot":"","sources":["../../src/schemas/pushNotifications.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAc5B,eAAO,MAAM,iBAAiB;;;;;;;;CAE7B,CAAA"}
1
+ {"version":3,"file":"pushNotifications.d.ts","sourceRoot":"","sources":["../../src/schemas/pushNotifications.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAY5B,eAAO,MAAM,iBAAiB;;;;;;;;CAE7B,CAAA"}
@@ -7,7 +7,6 @@ const pushNotificationEmailReceivedPayload = v.object({
7
7
  }),
8
8
  event: v.literal('EMAIL_RECEIVED'),
9
9
  });
10
- const pushNotificationPayload = v.union([pushNotificationEmailReceivedPayload]);
11
10
  export const pushNotifications = {
12
- payload: pushNotificationPayload,
11
+ payload: pushNotificationEmailReceivedPayload,
13
12
  };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=schemaValues.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemaValues.test.d.ts","sourceRoot":"","sources":["../../src/schemas/schemaValues.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,21 @@
1
+ import { describe, expect, it } from 'bun:test';
2
+ import * as v from 'valibot';
3
+ import { marcoSchemas } from './index';
4
+ describe('immutable schema values', () => {
5
+ it('publishes parameterless schemas as reusable values', () => {
6
+ expect(v.safeParse(marcoSchemas.app.platform, 'ios').success).toBe(true);
7
+ expect(v.safeParse(marcoSchemas.oauth.provider, 'GOOGLE').success).toBe(true);
8
+ expect(v.safeParse(marcoSchemas.emailAccount.imapConnectionStatus, 'CONNECTED').success).toBe(true);
9
+ expect(v.safeParse(marcoSchemas.emailAccount.socketTypeSchema, 'SSL').success).toBe(true);
10
+ expect(marcoSchemas.app.platform.type).toBe('picklist');
11
+ expect(marcoSchemas.oauth.provider.type).toBe('picklist');
12
+ expect(marcoSchemas.emailAccount.connectionConfigImapRaw.type).toBe('object');
13
+ expect(marcoSchemas.emailAccount.connectionConfigOauth.type).toBe('object');
14
+ });
15
+ it('parses the single supported push payload without a wrapper union', () => {
16
+ const payload = { data: { messageId: 'message-1', threadId: 'thread-1' }, event: 'EMAIL_RECEIVED' };
17
+ expect(v.safeParse(marcoSchemas.pushNotifications.payload, payload).success).toBe(true);
18
+ expect(v.safeParse(marcoSchemas.pushNotifications.payload, { ...payload, event: 'UNKNOWN' }).success).toBe(false);
19
+ expect(marcoSchemas.pushNotifications.payload.type).toBe('object');
20
+ });
21
+ });
@@ -1,17 +1,18 @@
1
- export declare enum CustomViewIcon {
2
- AIRPLANE = "AIRPLANE",
3
- BELL = "BELL",
4
- BRIEFCASE = "BRIEFCASE",
5
- CLOCK = "CLOCK",
6
- CREDIT_CARD = "CREDIT_CARD",
7
- HEART = "HEART",
8
- HOME = "HOME",
9
- KEY = "KEY",
10
- MOON = "MOON",
11
- PERSON = "PERSON",
12
- SHOPPING_CART = "SHOPPING_CART",
13
- STAR = "STAR"
14
- }
15
- export declare const USER_SETTINGS_CUSTOM_VIEW_ICONS: readonly [CustomViewIcon.AIRPLANE, CustomViewIcon.BELL, CustomViewIcon.BRIEFCASE, CustomViewIcon.CLOCK, CustomViewIcon.CREDIT_CARD, CustomViewIcon.HEART, CustomViewIcon.HOME, CustomViewIcon.KEY, CustomViewIcon.MOON, CustomViewIcon.PERSON, CustomViewIcon.SHOPPING_CART, CustomViewIcon.STAR];
1
+ export declare const CustomViewIcon: {
2
+ readonly AIRPLANE: "AIRPLANE";
3
+ readonly BELL: "BELL";
4
+ readonly BRIEFCASE: "BRIEFCASE";
5
+ readonly CLOCK: "CLOCK";
6
+ readonly CREDIT_CARD: "CREDIT_CARD";
7
+ readonly HEART: "HEART";
8
+ readonly HOME: "HOME";
9
+ readonly KEY: "KEY";
10
+ readonly MOON: "MOON";
11
+ readonly PERSON: "PERSON";
12
+ readonly SHOPPING_CART: "SHOPPING_CART";
13
+ readonly STAR: "STAR";
14
+ };
15
+ export type CustomViewIcon = (typeof CustomViewIcon)[keyof typeof CustomViewIcon];
16
+ export declare const USER_SETTINGS_CUSTOM_VIEW_ICONS: readonly CustomViewIcon[];
16
17
  export type UserSettingsCustomViewIcon = (typeof USER_SETTINGS_CUSTOM_VIEW_ICONS)[number];
17
18
  //# sourceMappingURL=UserSettings.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UserSettings.d.ts","sourceRoot":"","sources":["../../src/types/UserSettings.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc;IACxB,QAAQ,aAAa;IACrB,IAAI,SAAS;IACb,SAAS,cAAc;IACvB,KAAK,UAAU;IACf,WAAW,gBAAgB;IAC3B,KAAK,UAAU;IACf,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,aAAa,kBAAkB;IAC/B,IAAI,SAAS;CACd;AAED,eAAO,MAAM,+BAA+B,mSAalC,CAAA;AAEV,MAAM,MAAM,0BAA0B,GAAG,CAAC,OAAO,+BAA+B,CAAC,CAAC,MAAM,CAAC,CAAA"}
1
+ {"version":3,"file":"UserSettings.d.ts","sourceRoot":"","sources":["../../src/types/UserSettings.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;;;;;;;;;;;CAajB,CAAA;AAEV,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAA;AAEjF,eAAO,MAAM,+BAA+B,EAAE,SAAS,cAAc,EAAiD,CAAA;AAEtH,MAAM,MAAM,0BAA0B,GAAG,CAAC,OAAO,+BAA+B,CAAC,CAAC,MAAM,CAAC,CAAA"}
@@ -1,29 +1,15 @@
1
- export var CustomViewIcon;
2
- (function (CustomViewIcon) {
3
- CustomViewIcon["AIRPLANE"] = "AIRPLANE";
4
- CustomViewIcon["BELL"] = "BELL";
5
- CustomViewIcon["BRIEFCASE"] = "BRIEFCASE";
6
- CustomViewIcon["CLOCK"] = "CLOCK";
7
- CustomViewIcon["CREDIT_CARD"] = "CREDIT_CARD";
8
- CustomViewIcon["HEART"] = "HEART";
9
- CustomViewIcon["HOME"] = "HOME";
10
- CustomViewIcon["KEY"] = "KEY";
11
- CustomViewIcon["MOON"] = "MOON";
12
- CustomViewIcon["PERSON"] = "PERSON";
13
- CustomViewIcon["SHOPPING_CART"] = "SHOPPING_CART";
14
- CustomViewIcon["STAR"] = "STAR";
15
- })(CustomViewIcon || (CustomViewIcon = {}));
16
- export const USER_SETTINGS_CUSTOM_VIEW_ICONS = [
17
- CustomViewIcon.AIRPLANE,
18
- CustomViewIcon.BELL,
19
- CustomViewIcon.BRIEFCASE,
20
- CustomViewIcon.CLOCK,
21
- CustomViewIcon.CREDIT_CARD,
22
- CustomViewIcon.HEART,
23
- CustomViewIcon.HOME,
24
- CustomViewIcon.KEY,
25
- CustomViewIcon.MOON,
26
- CustomViewIcon.PERSON,
27
- CustomViewIcon.SHOPPING_CART,
28
- CustomViewIcon.STAR,
29
- ];
1
+ export const CustomViewIcon = {
2
+ AIRPLANE: 'AIRPLANE',
3
+ BELL: 'BELL',
4
+ BRIEFCASE: 'BRIEFCASE',
5
+ CLOCK: 'CLOCK',
6
+ CREDIT_CARD: 'CREDIT_CARD',
7
+ HEART: 'HEART',
8
+ HOME: 'HOME',
9
+ KEY: 'KEY',
10
+ MOON: 'MOON',
11
+ PERSON: 'PERSON',
12
+ SHOPPING_CART: 'SHOPPING_CART',
13
+ STAR: 'STAR',
14
+ };
15
+ export const USER_SETTINGS_CUSTOM_VIEW_ICONS = Object.freeze(Object.values(CustomViewIcon));
@@ -1,4 +1,2 @@
1
- export declare const accountUtils: {
2
- generateColor: (emailAddress: string) => string;
3
- };
1
+ export { generateAccountColor } from './generateAccountColor';
4
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/accounts/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY;;CAExB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/accounts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA"}
@@ -1,4 +1 @@
1
- import { generateAccountColor } from './generateAccountColor';
2
- export const accountUtils = {
3
- generateColor: generateAccountColor,
4
- };
1
+ export { generateAccountColor } from './generateAccountColor';
@@ -1,4 +1,4 @@
1
- export { accountUtils } from './accounts';
2
- export { labelUtils } from './labels';
3
- export { threadsUtils } from './threads';
1
+ export { generateAccountColor } from './accounts';
2
+ export { labelSpecialUseOrdering } from './labels';
3
+ export { parseLabelIdList, processSearchTerm } from './threads';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAA;AAClD,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA"}
@@ -1,3 +1,3 @@
1
- export { accountUtils } from './accounts';
2
- export { labelUtils } from './labels';
3
- export { threadsUtils } from './threads';
1
+ export { generateAccountColor } from './accounts';
2
+ export { labelSpecialUseOrdering } from './labels';
3
+ export { parseLabelIdList, processSearchTerm } from './threads';
@@ -1,4 +1,3 @@
1
- export declare const labelUtils: {
2
- specialUseOrdering: ("ARCHIVE" | "INBOX" | "SENT" | "SPAM" | "TRASH")[];
3
- };
1
+ import type { LabelSpecialUse } from '../../types';
2
+ export declare const labelSpecialUseOrdering: readonly LabelSpecialUse[];
4
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/labels/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,UAAU;;CAEtB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/labels/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAE1D,eAAO,MAAM,uBAAuB,EAAE,SAAS,eAAe,EAAkD,CAAA"}
@@ -1,4 +1 @@
1
- const labelSpecialUseOrdering = ['INBOX', 'SENT', 'SPAM', 'TRASH', 'ARCHIVE'];
2
- export const labelUtils = {
3
- specialUseOrdering: labelSpecialUseOrdering,
4
- };
1
+ export const labelSpecialUseOrdering = ['INBOX', 'SENT', 'SPAM', 'TRASH', 'ARCHIVE'];
@@ -1,5 +1,3 @@
1
- export declare const threadsUtils: {
2
- parseLabelIdList: (labelIdList: string) => string[];
3
- processSearchTerm: (term: string) => string[];
4
- };
1
+ export { parseLabelIdList } from './parseLabelIdList/parseLabelIdList';
2
+ export { processSearchTerm } from './processSearchTerm/processSearchTerm';
5
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/threads/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY;;;CAGxB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/threads/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAA;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAA"}
@@ -1,6 +1,2 @@
1
- import { parseLabelIdList } from './parseLabelIdList';
2
- import { processSearchTerm } from './processSearchTerm';
3
- export const threadsUtils = {
4
- parseLabelIdList,
5
- processSearchTerm,
6
- };
1
+ export { parseLabelIdList } from './parseLabelIdList/parseLabelIdList';
2
+ export { processSearchTerm } from './processSearchTerm/processSearchTerm';
@@ -1,5 +1,5 @@
1
1
  import { describe, expect, it } from 'bun:test';
2
- import { parseLabelIdList } from './index';
2
+ import { parseLabelIdList } from './parseLabelIdList';
3
3
  describe('parseLabelIdList', () => {
4
4
  const testCases = [
5
5
  { description: 'parses space-separated IDs', expected: ['id1', 'id2', 'id3'], input: ' id1 id2 id3 ' },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marcoappio/marco-config",
3
- "version": "4.0.15",
3
+ "version": "4.0.16",
4
4
  "author": "team@marcoapp.io",
5
5
  "main": "dist/index.js",
6
6
  "repository": "git@github.com:marcoappio/marco-config.git",
@@ -1,2 +0,0 @@
1
- export { parseLabelIdList } from './parseLabelIdList';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/threads/parseLabelIdList/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA"}
@@ -1 +0,0 @@
1
- export { parseLabelIdList } from './parseLabelIdList';
@@ -1,2 +0,0 @@
1
- export { processSearchTerm } from './processSearchTerm';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/threads/processSearchTerm/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA"}
@@ -1 +0,0 @@
1
- export { processSearchTerm } from './processSearchTerm';