@marcoappio/marco-config 11.0.0 → 11.0.2

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.
@@ -1,4 +1,5 @@
1
1
  export declare const labelUtils: {
2
+ isGmailMailboxLocation: (gmailLabelId: string) => boolean;
2
3
  specialUseOrdering: ("ARCHIVE" | "INBOX" | "SENT" | "SPAM" | "TRASH")[];
3
4
  };
4
5
  //# 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":"AAMA,eAAO,MAAM,UAAU;;;CAGtB,CAAA"}
@@ -1,4 +1,6 @@
1
+ import { isGmailMailboxLocation } from './isGmailMailboxLocation';
1
2
  const labelSpecialUseOrdering = ['INBOX', 'SENT', 'SPAM', 'TRASH', 'ARCHIVE'];
2
3
  export const labelUtils = {
4
+ isGmailMailboxLocation,
3
5
  specialUseOrdering: labelSpecialUseOrdering,
4
6
  };
@@ -0,0 +1,2 @@
1
+ export { isGmailMailboxLocation } from './isGmailMailboxLocation';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/labels/isGmailMailboxLocation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA"}
@@ -0,0 +1 @@
1
+ export { isGmailMailboxLocation } from './isGmailMailboxLocation';
@@ -0,0 +1,2 @@
1
+ export declare const isGmailMailboxLocation: (gmailLabelId: string) => boolean;
2
+ //# sourceMappingURL=isGmailMailboxLocation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isGmailMailboxLocation.d.ts","sourceRoot":"","sources":["../../../../src/utils/labels/isGmailMailboxLocation/isGmailMailboxLocation.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,sBAAsB,iBAAkB,MAAM,KAAG,OACuB,CAAA"}
@@ -0,0 +1,20 @@
1
+ const gmailSystemLabelIds = new Set([
2
+ 'CATEGORY_FORUMS',
3
+ 'CATEGORY_PERSONAL',
4
+ 'CATEGORY_PROMOTIONS',
5
+ 'CATEGORY_SOCIAL',
6
+ 'CATEGORY_UPDATES',
7
+ 'CHAT',
8
+ 'DRAFT',
9
+ 'IMPORTANT',
10
+ 'INBOX',
11
+ 'SENT',
12
+ 'SPAM',
13
+ 'STARRED',
14
+ 'TRASH',
15
+ 'UNREAD',
16
+ ]);
17
+ const gmailMailboxLocationIds = new Set(['INBOX', 'SPAM', 'TRASH']);
18
+ // A Gmail message's mailbox location is Inbox, Spam, Trash or a user label. The other system labels describe the
19
+ // message (sent, importance, category) and stay on it when it moves.
20
+ export const isGmailMailboxLocation = (gmailLabelId) => gmailMailboxLocationIds.has(gmailLabelId) || !gmailSystemLabelIds.has(gmailLabelId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marcoappio/marco-config",
3
- "version": "11.0.0",
3
+ "version": "11.0.2",
4
4
  "author": "team@marcoapp.io",
5
5
  "main": "dist/index.js",
6
6
  "repository": "git@github.com:marcoappio/marco-config.git",