@marcoappio/marco-config 11.0.13 → 11.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants/index.d.ts +7 -0
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/index.js +2 -0
- package/dist/constants/rules.d.ts +8 -0
- package/dist/constants/rules.d.ts.map +1 -0
- package/dist/constants/rules.js +12 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/schemas/id.d.ts +5 -0
- package/dist/schemas/id.d.ts.map +1 -1
- package/dist/schemas/id.js +1 -0
- package/dist/schemas/index.d.ts +442 -2
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +4 -1
- package/dist/schemas/models/index.d.ts +1 -0
- package/dist/schemas/models/index.d.ts.map +1 -1
- package/dist/schemas/models/index.js +1 -0
- package/dist/schemas/models/rule.d.ts +300 -0
- package/dist/schemas/models/rule.d.ts.map +1 -0
- package/dist/schemas/models/rule.js +79 -0
- package/dist/schemas/mutators/mutatorSchemas.d.ts +265 -0
- package/dist/schemas/mutators/mutatorSchemas.d.ts.map +1 -1
- package/dist/schemas/mutators/mutatorSchemas.js +24 -0
- package/dist/sdk/endpoints/private/models/account/getRules.d.ts +155 -0
- package/dist/sdk/endpoints/private/models/account/getRules.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/models/account/getRules.js +17 -0
- package/dist/sdk/endpoints/private/models/account/index.d.ts +1 -0
- package/dist/sdk/endpoints/private/models/account/index.d.ts.map +1 -1
- package/dist/sdk/endpoints/private/models/account/index.js +1 -0
- package/dist/sdk/endpoints/private/mutations/account/createRule.d.ts +170 -0
- package/dist/sdk/endpoints/private/mutations/account/createRule.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/account/createRule.js +20 -0
- package/dist/sdk/endpoints/private/mutations/account/deleteRule.d.ts +48 -0
- package/dist/sdk/endpoints/private/mutations/account/deleteRule.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/account/deleteRule.js +20 -0
- package/dist/sdk/endpoints/private/mutations/account/index.d.ts +5 -0
- package/dist/sdk/endpoints/private/mutations/account/index.d.ts.map +1 -1
- package/dist/sdk/endpoints/private/mutations/account/index.js +5 -0
- package/dist/sdk/endpoints/private/mutations/account/reorderRules.d.ts +48 -0
- package/dist/sdk/endpoints/private/mutations/account/reorderRules.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/account/reorderRules.js +20 -0
- package/dist/sdk/endpoints/private/mutations/account/setRuleEnabled.d.ts +54 -0
- package/dist/sdk/endpoints/private/mutations/account/setRuleEnabled.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/account/setRuleEnabled.js +21 -0
- package/dist/sdk/endpoints/private/mutations/account/updateRule.d.ts +175 -0
- package/dist/sdk/endpoints/private/mutations/account/updateRule.d.ts.map +1 -0
- package/dist/sdk/endpoints/private/mutations/account/updateRule.js +21 -0
- package/dist/sdk/index.d.ts +6 -0
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/validation/errors.d.ts +12 -0
- package/dist/sdk/validation/errors.d.ts.map +1 -1
- package/dist/sdk/validation/errors.js +5 -0
- package/dist/sdk/validation/index.d.ts +6 -0
- package/dist/sdk/validation/index.d.ts.map +1 -1
- package/dist/types/RuleActionType.d.ts +3 -0
- package/dist/types/RuleActionType.d.ts.map +1 -0
- package/dist/types/RuleActionType.js +10 -0
- package/dist/types/RuleConditionField.d.ts +3 -0
- package/dist/types/RuleConditionField.d.ts.map +1 -0
- package/dist/types/RuleConditionField.js +1 -0
- package/dist/types/RuleConditionOperator.d.ts +5 -0
- package/dist/types/RuleConditionOperator.d.ts.map +1 -0
- package/dist/types/RuleConditionOperator.js +2 -0
- package/dist/types/RuleDisabledReason.d.ts +3 -0
- package/dist/types/RuleDisabledReason.d.ts.map +1 -0
- package/dist/types/RuleDisabledReason.js +1 -0
- package/dist/types/RuleMatchMode.d.ts +3 -0
- package/dist/types/RuleMatchMode.d.ts.map +1 -0
- package/dist/types/RuleMatchMode.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 +5 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +5 -0
- package/dist/utils/labels/getInboxUnreadTotal/getInboxUnreadTotal.d.ts +8 -0
- package/dist/utils/labels/getInboxUnreadTotal/getInboxUnreadTotal.d.ts.map +1 -0
- package/dist/utils/labels/getInboxUnreadTotal/getInboxUnreadTotal.js +1 -0
- package/dist/utils/labels/getInboxUnreadTotal/index.d.ts +2 -0
- package/dist/utils/labels/getInboxUnreadTotal/index.d.ts.map +1 -0
- package/dist/utils/labels/getInboxUnreadTotal/index.js +1 -0
- package/dist/utils/labels/index.d.ts +5 -0
- package/dist/utils/labels/index.d.ts.map +1 -1
- package/dist/utils/labels/index.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
export declare const updateRule: import("../../../../..").EndpointConfig<"/v1/pv/models/account/:accountId/rules/update", v.ObjectSchema<{
|
|
3
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
4
|
+
readonly ruleId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "RuleId">]>, undefined>;
|
|
5
|
+
readonly actions: v.SchemaWithPipe<readonly [v.ArraySchema<v.VariantSchema<"type", [v.ObjectSchema<{
|
|
6
|
+
readonly type: v.LiteralSchema<"ARCHIVE", undefined>;
|
|
7
|
+
}, undefined>, v.ObjectSchema<{
|
|
8
|
+
readonly labelId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "LabelId">]>, undefined>;
|
|
9
|
+
readonly type: v.LiteralSchema<"MOVE_TO_FOLDER", undefined>;
|
|
10
|
+
}, undefined>, v.ObjectSchema<{
|
|
11
|
+
readonly labelId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "LabelId">]>, undefined>;
|
|
12
|
+
readonly type: v.LiteralSchema<"ADD_LABEL", undefined>;
|
|
13
|
+
}, undefined>, v.ObjectSchema<{
|
|
14
|
+
readonly type: v.LiteralSchema<"MARK_READ", undefined>;
|
|
15
|
+
}, undefined>, v.ObjectSchema<{
|
|
16
|
+
readonly type: v.LiteralSchema<"STAR", undefined>;
|
|
17
|
+
}, undefined>, v.ObjectSchema<{
|
|
18
|
+
readonly type: v.LiteralSchema<"TRASH", undefined>;
|
|
19
|
+
}, undefined>, v.ObjectSchema<{
|
|
20
|
+
readonly type: v.LiteralSchema<"MARK_SPAM", undefined>;
|
|
21
|
+
}, undefined>, v.ObjectSchema<{
|
|
22
|
+
readonly type: v.LiteralSchema<"MUTE_NOTIFICATION", undefined>;
|
|
23
|
+
}, undefined>], undefined>, undefined>, v.MinLengthAction<({
|
|
24
|
+
type: "ARCHIVE";
|
|
25
|
+
} | {
|
|
26
|
+
labelId: string & v.Brand<"LabelId">;
|
|
27
|
+
type: "MOVE_TO_FOLDER";
|
|
28
|
+
} | {
|
|
29
|
+
labelId: string & v.Brand<"LabelId">;
|
|
30
|
+
type: "ADD_LABEL";
|
|
31
|
+
} | {
|
|
32
|
+
type: "MARK_READ";
|
|
33
|
+
} | {
|
|
34
|
+
type: "STAR";
|
|
35
|
+
} | {
|
|
36
|
+
type: "TRASH";
|
|
37
|
+
} | {
|
|
38
|
+
type: "MARK_SPAM";
|
|
39
|
+
} | {
|
|
40
|
+
type: "MUTE_NOTIFICATION";
|
|
41
|
+
})[], 1, undefined>, v.MaxLengthAction<({
|
|
42
|
+
type: "ARCHIVE";
|
|
43
|
+
} | {
|
|
44
|
+
labelId: string & v.Brand<"LabelId">;
|
|
45
|
+
type: "MOVE_TO_FOLDER";
|
|
46
|
+
} | {
|
|
47
|
+
labelId: string & v.Brand<"LabelId">;
|
|
48
|
+
type: "ADD_LABEL";
|
|
49
|
+
} | {
|
|
50
|
+
type: "MARK_READ";
|
|
51
|
+
} | {
|
|
52
|
+
type: "STAR";
|
|
53
|
+
} | {
|
|
54
|
+
type: "TRASH";
|
|
55
|
+
} | {
|
|
56
|
+
type: "MARK_SPAM";
|
|
57
|
+
} | {
|
|
58
|
+
type: "MUTE_NOTIFICATION";
|
|
59
|
+
})[], number, undefined>]>;
|
|
60
|
+
readonly conditions: v.SchemaWithPipe<readonly [v.ArraySchema<v.VariantSchema<"field", [v.ObjectSchema<{
|
|
61
|
+
readonly field: v.LiteralSchema<"FROM", undefined>;
|
|
62
|
+
readonly operator: v.PicklistSchema<readonly ["CONTAINS", "IS", "DOMAIN_IS"], undefined>;
|
|
63
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
64
|
+
}, undefined>, v.ObjectSchema<{
|
|
65
|
+
readonly field: v.LiteralSchema<"TO_OR_CC", undefined>;
|
|
66
|
+
readonly operator: v.PicklistSchema<readonly ["CONTAINS", "IS", "DOMAIN_IS"], undefined>;
|
|
67
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
68
|
+
}, undefined>, v.ObjectSchema<{
|
|
69
|
+
readonly field: v.LiteralSchema<"SUBJECT", undefined>;
|
|
70
|
+
readonly operator: v.PicklistSchema<readonly ["CONTAINS", "IS"], undefined>;
|
|
71
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
72
|
+
}, undefined>, v.ObjectSchema<{
|
|
73
|
+
readonly field: v.LiteralSchema<"BODY", undefined>;
|
|
74
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
75
|
+
}, undefined>, v.ObjectSchema<{
|
|
76
|
+
readonly field: v.LiteralSchema<"HAS_ATTACHMENT", undefined>;
|
|
77
|
+
readonly value: v.BooleanSchema<undefined>;
|
|
78
|
+
}, undefined>, v.ObjectSchema<{
|
|
79
|
+
readonly field: v.LiteralSchema<"MAILING_LIST", undefined>;
|
|
80
|
+
readonly listId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
81
|
+
}, undefined>], undefined>, undefined>, v.MinLengthAction<({
|
|
82
|
+
field: "FROM";
|
|
83
|
+
operator: "CONTAINS" | "IS" | "DOMAIN_IS";
|
|
84
|
+
value: string;
|
|
85
|
+
} | {
|
|
86
|
+
field: "TO_OR_CC";
|
|
87
|
+
operator: "CONTAINS" | "IS" | "DOMAIN_IS";
|
|
88
|
+
value: string;
|
|
89
|
+
} | {
|
|
90
|
+
field: "SUBJECT";
|
|
91
|
+
operator: "CONTAINS" | "IS";
|
|
92
|
+
value: string;
|
|
93
|
+
} | {
|
|
94
|
+
field: "BODY";
|
|
95
|
+
value: string;
|
|
96
|
+
} | {
|
|
97
|
+
field: "HAS_ATTACHMENT";
|
|
98
|
+
value: boolean;
|
|
99
|
+
} | {
|
|
100
|
+
field: "MAILING_LIST";
|
|
101
|
+
listId: string | null;
|
|
102
|
+
})[], 1, undefined>, v.MaxLengthAction<({
|
|
103
|
+
field: "FROM";
|
|
104
|
+
operator: "CONTAINS" | "IS" | "DOMAIN_IS";
|
|
105
|
+
value: string;
|
|
106
|
+
} | {
|
|
107
|
+
field: "TO_OR_CC";
|
|
108
|
+
operator: "CONTAINS" | "IS" | "DOMAIN_IS";
|
|
109
|
+
value: string;
|
|
110
|
+
} | {
|
|
111
|
+
field: "SUBJECT";
|
|
112
|
+
operator: "CONTAINS" | "IS";
|
|
113
|
+
value: string;
|
|
114
|
+
} | {
|
|
115
|
+
field: "BODY";
|
|
116
|
+
value: string;
|
|
117
|
+
} | {
|
|
118
|
+
field: "HAS_ATTACHMENT";
|
|
119
|
+
value: boolean;
|
|
120
|
+
} | {
|
|
121
|
+
field: "MAILING_LIST";
|
|
122
|
+
listId: string | null;
|
|
123
|
+
})[], number, undefined>]>;
|
|
124
|
+
readonly match: v.PicklistSchema<readonly ["ALL", "ANY"], undefined>;
|
|
125
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
126
|
+
readonly stopProcessing: v.BooleanSchema<undefined>;
|
|
127
|
+
}, undefined>, v.GenericSchema | undefined, v.UnionSchema<[v.UnionSchema<[v.ObjectSchema<{
|
|
128
|
+
readonly data: v.ObjectSchema<{
|
|
129
|
+
readonly code: v.LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
|
|
130
|
+
}, undefined>;
|
|
131
|
+
readonly status: v.LiteralSchema<401, undefined>;
|
|
132
|
+
}, undefined>, v.ObjectSchema<{
|
|
133
|
+
readonly data: v.ObjectSchema<{
|
|
134
|
+
readonly code: v.LiteralSchema<"USER_NOT_FOUND", undefined>;
|
|
135
|
+
}, undefined>;
|
|
136
|
+
readonly status: v.LiteralSchema<404, undefined>;
|
|
137
|
+
}, undefined>, v.ObjectSchema<{
|
|
138
|
+
readonly data: v.ObjectSchema<{
|
|
139
|
+
readonly code: v.LiteralSchema<"ACCOUNT_NOT_FOUND", undefined>;
|
|
140
|
+
}, undefined>;
|
|
141
|
+
readonly status: v.LiteralSchema<404, undefined>;
|
|
142
|
+
}, undefined>, v.ObjectSchema<{
|
|
143
|
+
readonly data: v.ObjectSchema<{
|
|
144
|
+
readonly code: v.LiteralSchema<"RULE_NOT_FOUND", undefined>;
|
|
145
|
+
}, undefined>;
|
|
146
|
+
readonly status: v.LiteralSchema<404, undefined>;
|
|
147
|
+
}, undefined>, v.ObjectSchema<{
|
|
148
|
+
readonly data: v.ObjectSchema<{
|
|
149
|
+
readonly code: v.LiteralSchema<"LABEL_NOT_FOUND", undefined>;
|
|
150
|
+
}, undefined>;
|
|
151
|
+
readonly status: v.LiteralSchema<404, undefined>;
|
|
152
|
+
}, undefined>, v.ObjectSchema<{
|
|
153
|
+
readonly data: v.ObjectSchema<{
|
|
154
|
+
readonly code: v.LiteralSchema<"MUTATION_REJECTED", undefined>;
|
|
155
|
+
}, undefined>;
|
|
156
|
+
readonly status: v.LiteralSchema<409, undefined>;
|
|
157
|
+
}, undefined>, v.ObjectSchema<{
|
|
158
|
+
readonly data: v.ObjectSchema<{
|
|
159
|
+
readonly code: v.LiteralSchema<"VALIDATION_FAILED", undefined>;
|
|
160
|
+
readonly issues: v.ObjectSchema<{
|
|
161
|
+
readonly nested: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>, undefined>, undefined>;
|
|
162
|
+
readonly other: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
163
|
+
readonly root: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
164
|
+
}, undefined>;
|
|
165
|
+
}, undefined>;
|
|
166
|
+
readonly status: v.LiteralSchema<400, undefined>;
|
|
167
|
+
}, undefined>, v.ObjectSchema<{
|
|
168
|
+
readonly status: v.LiteralSchema<200, undefined>;
|
|
169
|
+
}, undefined>], undefined>, v.ObjectSchema<{
|
|
170
|
+
readonly data: v.ObjectSchema<{
|
|
171
|
+
readonly code: v.LiteralSchema<"REGION_NOT_SUPPORTED", undefined>;
|
|
172
|
+
}, undefined>;
|
|
173
|
+
readonly status: v.LiteralSchema<403, undefined>;
|
|
174
|
+
}, undefined>], undefined>>;
|
|
175
|
+
//# sourceMappingURL=updateRule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateRule.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/endpoints/private/mutations/account/updateRule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAc5B,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAgBrB,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
import { mutatorSchemas } from '../../../../../schemas';
|
|
3
|
+
import { createEndpoint } from '../../../../../sdk/endpoints/createEndpointConfig';
|
|
4
|
+
import { accountNotFoundErrorSchema, authFailedErrorSchema, labelNotFoundErrorSchema, mutationRejectedErrorSchema, ruleNotFoundErrorSchema, userNotFoundErrorSchema, validationFailedErrorSchema, } from '../../../../../sdk/validation/errors';
|
|
5
|
+
export const updateRule = createEndpoint({
|
|
6
|
+
body: mutatorSchemas.account.updateRule,
|
|
7
|
+
method: 'PATCH',
|
|
8
|
+
path: '/v1/pv/models/account/:accountId/rules/update',
|
|
9
|
+
response: v.union([
|
|
10
|
+
authFailedErrorSchema,
|
|
11
|
+
userNotFoundErrorSchema,
|
|
12
|
+
accountNotFoundErrorSchema,
|
|
13
|
+
ruleNotFoundErrorSchema,
|
|
14
|
+
labelNotFoundErrorSchema,
|
|
15
|
+
mutationRejectedErrorSchema,
|
|
16
|
+
validationFailedErrorSchema,
|
|
17
|
+
v.object({
|
|
18
|
+
status: v.literal(200),
|
|
19
|
+
}),
|
|
20
|
+
]),
|
|
21
|
+
});
|
package/dist/sdk/index.d.ts
CHANGED
|
@@ -638,6 +638,12 @@ export declare const marcoSDK: {
|
|
|
638
638
|
}, undefined>;
|
|
639
639
|
readonly status: import("valibot").LiteralSchema<403, undefined>;
|
|
640
640
|
}, undefined>;
|
|
641
|
+
readonly ruleNotFoundErrorSchema: import("valibot").ObjectSchema<{
|
|
642
|
+
readonly data: import("valibot").ObjectSchema<{
|
|
643
|
+
readonly code: import("valibot").LiteralSchema<"RULE_NOT_FOUND", undefined>;
|
|
644
|
+
}, undefined>;
|
|
645
|
+
readonly status: import("valibot").LiteralSchema<404, undefined>;
|
|
646
|
+
}, undefined>;
|
|
641
647
|
readonly taskNoteNotFoundErrorSchema: import("valibot").ObjectSchema<{
|
|
642
648
|
readonly data: import("valibot").ObjectSchema<{
|
|
643
649
|
readonly code: import("valibot").LiteralSchema<"TASK_NOTE_NOT_FOUND", undefined>;
|
package/dist/sdk/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGpB,CAAA"}
|
|
@@ -161,6 +161,12 @@ export declare const labelNotFoundErrorSchema: v.ObjectSchema<{
|
|
|
161
161
|
}, undefined>;
|
|
162
162
|
readonly status: v.LiteralSchema<404, undefined>;
|
|
163
163
|
}, undefined>;
|
|
164
|
+
export declare const ruleNotFoundErrorSchema: v.ObjectSchema<{
|
|
165
|
+
readonly data: v.ObjectSchema<{
|
|
166
|
+
readonly code: v.LiteralSchema<"RULE_NOT_FOUND", undefined>;
|
|
167
|
+
}, undefined>;
|
|
168
|
+
readonly status: v.LiteralSchema<404, undefined>;
|
|
169
|
+
}, undefined>;
|
|
164
170
|
export declare const aliasNotFoundErrorSchema: v.ObjectSchema<{
|
|
165
171
|
readonly data: v.ObjectSchema<{
|
|
166
172
|
readonly code: v.LiteralSchema<"ALIAS_NOT_FOUND", undefined>;
|
|
@@ -359,6 +365,12 @@ export declare const errors: {
|
|
|
359
365
|
}, undefined>;
|
|
360
366
|
readonly status: v.LiteralSchema<403, undefined>;
|
|
361
367
|
}, undefined>;
|
|
368
|
+
readonly ruleNotFoundErrorSchema: v.ObjectSchema<{
|
|
369
|
+
readonly data: v.ObjectSchema<{
|
|
370
|
+
readonly code: v.LiteralSchema<"RULE_NOT_FOUND", undefined>;
|
|
371
|
+
}, undefined>;
|
|
372
|
+
readonly status: v.LiteralSchema<404, undefined>;
|
|
373
|
+
}, undefined>;
|
|
362
374
|
readonly taskNoteNotFoundErrorSchema: v.ObjectSchema<{
|
|
363
375
|
readonly data: v.ObjectSchema<{
|
|
364
376
|
readonly code: v.LiteralSchema<"TASK_NOTE_NOT_FOUND", undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/sdk/validation/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,eAAO,MAAM,yBAAyB;;;;;aAGpC,CAAA;AAEF,eAAO,MAAM,0BAA0B;;;;;aAGrC,CAAA;AAEF,eAAO,MAAM,0BAA0B;;;;;aAGrC,CAAA;AAEF,eAAO,MAAM,8BAA8B;;;;;aAGzC,CAAA;AAEF,eAAO,MAAM,iCAAiC;;;;;aAG5C,CAAA;AAEF,eAAO,MAAM,uCAAuC;;;;;aAGlD,CAAA;AAEF,eAAO,MAAM,qBAAqB;;;;;aAGhC,CAAA;AAEF,eAAO,MAAM,uBAAuB;;;;;aAGlC,CAAA;AAEF,eAAO,MAAM,uBAAuB;;;;;aAGlC,CAAA;AAEF,eAAO,MAAM,gCAAgC;;;;;aAG3C,CAAA;AAEF,eAAO,MAAM,0BAA0B;;;;;aAGrC,CAAA;AAEF,eAAO,MAAM,6BAA6B;;;;;aAGxC,CAAA;AAEF,eAAO,MAAM,iCAAiC;;;;;aAG5C,CAAA;AAEF,eAAO,MAAM,iCAAiC;;;;;aAG5C,CAAA;AAEF,eAAO,MAAM,iCAAiC;;;;;aAG5C,CAAA;AAEF,eAAO,MAAM,0BAA0B;;;;;aAGrC,CAAA;AAEF,eAAO,MAAM,2BAA2B;;;;;aAGtC,CAAA;AAEF,eAAO,MAAM,4BAA4B;;;;;aAGv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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCT,CAAA"}
|
|
@@ -107,6 +107,10 @@ export const labelNotFoundErrorSchema = v.object({
|
|
|
107
107
|
data: v.object({ code: v.literal('LABEL_NOT_FOUND') }),
|
|
108
108
|
status: v.literal(404),
|
|
109
109
|
});
|
|
110
|
+
export const ruleNotFoundErrorSchema = v.object({
|
|
111
|
+
data: v.object({ code: v.literal('RULE_NOT_FOUND') }),
|
|
112
|
+
status: v.literal(404),
|
|
113
|
+
});
|
|
110
114
|
export const aliasNotFoundErrorSchema = v.object({
|
|
111
115
|
data: v.object({ code: v.literal('ALIAS_NOT_FOUND') }),
|
|
112
116
|
status: v.literal(404),
|
|
@@ -165,6 +169,7 @@ export const errors = {
|
|
|
165
169
|
messageNotFoundErrorSchema,
|
|
166
170
|
mutationRejectedErrorSchema,
|
|
167
171
|
regionNotSupportedErrorSchema,
|
|
172
|
+
ruleNotFoundErrorSchema,
|
|
168
173
|
taskNoteNotFoundErrorSchema,
|
|
169
174
|
taskNotFoundErrorSchema,
|
|
170
175
|
threadNotFoundErrorSchema,
|
|
@@ -156,6 +156,12 @@ export declare const validation: {
|
|
|
156
156
|
}, undefined>;
|
|
157
157
|
readonly status: import("valibot").LiteralSchema<403, undefined>;
|
|
158
158
|
}, undefined>;
|
|
159
|
+
readonly ruleNotFoundErrorSchema: import("valibot").ObjectSchema<{
|
|
160
|
+
readonly data: import("valibot").ObjectSchema<{
|
|
161
|
+
readonly code: import("valibot").LiteralSchema<"RULE_NOT_FOUND", undefined>;
|
|
162
|
+
}, undefined>;
|
|
163
|
+
readonly status: import("valibot").LiteralSchema<404, undefined>;
|
|
164
|
+
}, undefined>;
|
|
159
165
|
readonly taskNoteNotFoundErrorSchema: import("valibot").ObjectSchema<{
|
|
160
166
|
readonly data: import("valibot").ObjectSchema<{
|
|
161
167
|
readonly code: import("valibot").LiteralSchema<"TASK_NOTE_NOT_FOUND", undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sdk/validation/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sdk/validation/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAoB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RuleActionType.d.ts","sourceRoot":"","sources":["../../src/types/RuleActionType.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,qHASpB,CAAA;AAEV,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RuleConditionField.d.ts","sourceRoot":"","sources":["../../src/types/RuleConditionField.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,oFAAqF,CAAA;AAEvH,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const RULE_CONDITION_FIELDS = ['FROM', 'TO_OR_CC', 'SUBJECT', 'BODY', 'HAS_ATTACHMENT', 'MAILING_LIST'];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const RULE_ADDRESS_OPERATORS: readonly ["CONTAINS", "IS", "DOMAIN_IS"];
|
|
2
|
+
export declare const RULE_SUBJECT_OPERATORS: readonly ["CONTAINS", "IS"];
|
|
3
|
+
export type RuleAddressOperator = (typeof RULE_ADDRESS_OPERATORS)[number];
|
|
4
|
+
export type RuleSubjectOperator = (typeof RULE_SUBJECT_OPERATORS)[number];
|
|
5
|
+
//# sourceMappingURL=RuleConditionOperator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RuleConditionOperator.d.ts","sourceRoot":"","sources":["../../src/types/RuleConditionOperator.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,0CAA2C,CAAA;AAE9E,eAAO,MAAM,sBAAsB,6BAA8B,CAAA;AAEjE,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAA;AAEzE,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RuleDisabledReason.d.ts","sourceRoot":"","sources":["../../src/types/RuleDisabledReason.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,8BAA+B,CAAA;AAEjE,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const RULE_DISABLED_REASONS = ['LABEL_NOT_FOUND'];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RuleMatchMode.d.ts","sourceRoot":"","sources":["../../src/types/RuleMatchMode.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,yBAA0B,CAAA;AAEvD,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const RULE_MATCH_MODES = ['ALL', 'ANY'];
|
package/dist/types/SDKError.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type * as v from 'valibot';
|
|
2
2
|
import type { errors } from '../sdk/validation/errors';
|
|
3
|
-
export type SDKError = v.InferOutput<typeof errors.accountNotFoundErrorSchema> | v.InferOutput<typeof errors.aliasNotFoundErrorSchema> | v.InferOutput<typeof errors.attachmentNotFoundErrorSchema> | v.InferOutput<typeof errors.attachmentSizeMismatchErrorSchema> | v.InferOutput<typeof errors.attachmentStateInvalidErrorSchema> | v.InferOutput<typeof errors.attachmentUploadFailedErrorSchema> | v.InferOutput<typeof errors.authCodeExpiredErrorSchema> | v.InferOutput<typeof errors.authCodeInvalidErrorSchema> | v.InferOutput<typeof errors.authCodePreviouslyUsedErrorSchema> | v.InferOutput<typeof errors.authFailedErrorSchema> | v.InferOutput<typeof errors.authRefreshTokenInvalid> | v.InferOutput<typeof errors.authServerResponseUnexpectedErrorSchema> | v.InferOutput<typeof errors.authTooManyAttemptsErrorSchema> | v.InferOutput<typeof errors.contactNotFoundErrorSchema> | v.InferOutput<typeof errors.draftNotFoundErrorSchema> | v.InferOutput<typeof errors.fileTooLargeErrorSchema> | v.InferOutput<typeof errors.invalidFileTypeErrorSchema> | v.InferOutput<typeof errors.invalidImageDimensionsErrorSchema> | v.InferOutput<typeof errors.inviteNotFoundErrorSchema> | v.InferOutput<typeof errors.labelAlreadyExistsErrorSchema> | v.InferOutput<typeof errors.labelMoveConflictErrorSchema> | v.InferOutput<typeof errors.labelMoveEvidenceUnavailableErrorSchema> | v.InferOutput<typeof errors.labelNotFoundErrorSchema> | v.InferOutput<typeof errors.messageNotFoundErrorSchema> | v.InferOutput<typeof errors.mutationRejectedErrorSchema> | v.InferOutput<typeof errors.regionNotSupportedErrorSchema> | v.InferOutput<typeof errors.taskNoteNotFoundErrorSchema> | v.InferOutput<typeof errors.taskNotFoundErrorSchema> | v.InferOutput<typeof errors.threadNotFoundErrorSchema> | v.InferOutput<typeof errors.userMarkedForDeletionErrorSchema> | v.InferOutput<typeof errors.userNotFoundErrorSchema> | v.InferOutput<typeof errors.validationFailedErrorSchema> | v.InferOutput<typeof errors.viewNotFoundErrorSchema>;
|
|
3
|
+
export type SDKError = v.InferOutput<typeof errors.accountNotFoundErrorSchema> | v.InferOutput<typeof errors.aliasNotFoundErrorSchema> | v.InferOutput<typeof errors.attachmentNotFoundErrorSchema> | v.InferOutput<typeof errors.attachmentSizeMismatchErrorSchema> | v.InferOutput<typeof errors.attachmentStateInvalidErrorSchema> | v.InferOutput<typeof errors.attachmentUploadFailedErrorSchema> | v.InferOutput<typeof errors.authCodeExpiredErrorSchema> | v.InferOutput<typeof errors.authCodeInvalidErrorSchema> | v.InferOutput<typeof errors.authCodePreviouslyUsedErrorSchema> | v.InferOutput<typeof errors.authFailedErrorSchema> | v.InferOutput<typeof errors.authRefreshTokenInvalid> | v.InferOutput<typeof errors.authServerResponseUnexpectedErrorSchema> | v.InferOutput<typeof errors.authTooManyAttemptsErrorSchema> | v.InferOutput<typeof errors.contactNotFoundErrorSchema> | v.InferOutput<typeof errors.draftNotFoundErrorSchema> | v.InferOutput<typeof errors.fileTooLargeErrorSchema> | v.InferOutput<typeof errors.invalidFileTypeErrorSchema> | v.InferOutput<typeof errors.invalidImageDimensionsErrorSchema> | v.InferOutput<typeof errors.inviteNotFoundErrorSchema> | v.InferOutput<typeof errors.labelAlreadyExistsErrorSchema> | v.InferOutput<typeof errors.labelMoveConflictErrorSchema> | v.InferOutput<typeof errors.labelMoveEvidenceUnavailableErrorSchema> | v.InferOutput<typeof errors.labelNotFoundErrorSchema> | v.InferOutput<typeof errors.messageNotFoundErrorSchema> | v.InferOutput<typeof errors.mutationRejectedErrorSchema> | v.InferOutput<typeof errors.regionNotSupportedErrorSchema> | v.InferOutput<typeof errors.ruleNotFoundErrorSchema> | v.InferOutput<typeof errors.taskNoteNotFoundErrorSchema> | v.InferOutput<typeof errors.taskNotFoundErrorSchema> | v.InferOutput<typeof errors.threadNotFoundErrorSchema> | v.InferOutput<typeof errors.userMarkedForDeletionErrorSchema> | v.InferOutput<typeof errors.userNotFoundErrorSchema> | v.InferOutput<typeof errors.validationFailedErrorSchema> | v.InferOutput<typeof errors.viewNotFoundErrorSchema>;
|
|
4
4
|
//# sourceMappingURL=SDKError.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SDKError.d.ts","sourceRoot":"","sources":["../../src/types/SDKError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,CAAC,MAAM,SAAS,CAAA;AAEjC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAA;AAEjE,MAAM,MAAM,QAAQ,GAChB,CAAC,CAAC,WAAW,CAAC,OAAO,MAAM,CAAC,0BAA0B,CAAC,GACvD,CAAC,CAAC,WAAW,CAAC,OAAO,MAAM,CAAC,wBAAwB,CAAC,GACrD,CAAC,CAAC,WAAW,CAAC,OAAO,MAAM,CAAC,6BAA6B,CAAC,GAC1D,CAAC,CAAC,WAAW,CAAC,OAAO,MAAM,CAAC,iCAAiC,CAAC,GAC9D,CAAC,CAAC,WAAW,CAAC,OAAO,MAAM,CAAC,iCAAiC,CAAC,GAC9D,CAAC,CAAC,WAAW,CAAC,OAAO,MAAM,CAAC,iCAAiC,CAAC,GAC9D,CAAC,CAAC,WAAW,CAAC,OAAO,MAAM,CAAC,0BAA0B,CAAC,GACvD,CAAC,CAAC,WAAW,CAAC,OAAO,MAAM,CAAC,0BAA0B,CAAC,GACvD,CAAC,CAAC,WAAW,CAAC,OAAO,MAAM,CAAC,iCAAiC,CAAC,GAC9D,CAAC,CAAC,WAAW,CAAC,OAAO,MAAM,CAAC,qBAAqB,CAAC,GAClD,CAAC,CAAC,WAAW,CAAC,OAAO,MAAM,CAAC,uBAAuB,CAAC,GACpD,CAAC,CAAC,WAAW,CAAC,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AAC,uBAAuB,CAAC,CAAA"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -12,6 +12,11 @@ export * from './MarcoPlatform';
|
|
|
12
12
|
export * from './MessageRecipientType';
|
|
13
13
|
export * from './OAuthProvider';
|
|
14
14
|
export * from './PokeEvent';
|
|
15
|
+
export * from './RuleActionType';
|
|
16
|
+
export * from './RuleConditionField';
|
|
17
|
+
export * from './RuleConditionOperator';
|
|
18
|
+
export * from './RuleDisabledReason';
|
|
19
|
+
export * from './RuleMatchMode';
|
|
15
20
|
export * from './SDKError';
|
|
16
21
|
export * from './TaskSourceKind';
|
|
17
22
|
export * from './UserSettings';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,YAAY,CAAA;AAC1B,cAAc,+BAA+B,CAAA;AAC7C,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,wBAAwB,CAAA;AACtC,cAAc,sBAAsB,CAAA;AACpC,cAAc,mBAAmB,CAAA;AACjC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,wBAAwB,CAAA;AACtC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,YAAY,CAAA;AAC1B,cAAc,+BAA+B,CAAA;AAC7C,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,wBAAwB,CAAA;AACtC,cAAc,sBAAsB,CAAA;AACpC,cAAc,mBAAmB,CAAA;AACjC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,wBAAwB,CAAA;AACtC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA;AAChC,cAAc,sBAAsB,CAAA;AACpC,cAAc,yBAAyB,CAAA;AACvC,cAAc,sBAAsB,CAAA;AACpC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA"}
|
package/dist/types/index.js
CHANGED
|
@@ -12,6 +12,11 @@ export * from './MarcoPlatform';
|
|
|
12
12
|
export * from './MessageRecipientType';
|
|
13
13
|
export * from './OAuthProvider';
|
|
14
14
|
export * from './PokeEvent';
|
|
15
|
+
export * from './RuleActionType';
|
|
16
|
+
export * from './RuleConditionField';
|
|
17
|
+
export * from './RuleConditionOperator';
|
|
18
|
+
export * from './RuleDisabledReason';
|
|
19
|
+
export * from './RuleMatchMode';
|
|
15
20
|
export * from './SDKError';
|
|
16
21
|
export * from './TaskSourceKind';
|
|
17
22
|
export * from './UserSettings';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { LabelSpecialUse } from '../../../types';
|
|
2
|
+
type Label = {
|
|
3
|
+
specialUse: LabelSpecialUse | null;
|
|
4
|
+
unreadCount: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const getInboxUnreadTotal: (labels: readonly Label[]) => number;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=getInboxUnreadTotal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getInboxUnreadTotal.d.ts","sourceRoot":"","sources":["../../../../src/utils/labels/getInboxUnreadTotal/getInboxUnreadTotal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAE1D,KAAK,KAAK,GAAG;IACX,UAAU,EAAE,eAAe,GAAG,IAAI,CAAA;IAClC,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,eAAO,MAAM,mBAAmB,WAAY,SAAS,KAAK,EAAE,KAAG,MAC0B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const getInboxUnreadTotal = (labels) => labels.filter(x => x.specialUse === 'INBOX').reduce((acc, x) => acc + x.unreadCount, 0);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/labels/getInboxUnreadTotal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getInboxUnreadTotal } from './getInboxUnreadTotal';
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import type { LabelSpecialUse } from '../../types';
|
|
1
2
|
export declare const labelUtils: {
|
|
3
|
+
getInboxUnreadTotal: (labels: readonly {
|
|
4
|
+
specialUse: LabelSpecialUse | null;
|
|
5
|
+
unreadCount: number;
|
|
6
|
+
}[]) => number;
|
|
2
7
|
isGmailMailboxLocation: (gmailLabelId: string) => boolean;
|
|
3
8
|
specialUseOrdering: ("ARCHIVE" | "INBOX" | "SENT" | "SPAM" | "TRASH")[];
|
|
4
9
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/labels/index.ts"],"names":[],"mappings":"
|
|
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;AAO1D,eAAO,MAAM,UAAU;;;;;;;CAItB,CAAA"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { getInboxUnreadTotal } from './getInboxUnreadTotal';
|
|
1
2
|
import { isGmailMailboxLocation } from './isGmailMailboxLocation';
|
|
2
3
|
const labelSpecialUseOrdering = ['INBOX', 'SENT', 'SPAM', 'TRASH', 'ARCHIVE'];
|
|
3
4
|
export const labelUtils = {
|
|
5
|
+
getInboxUnreadTotal,
|
|
4
6
|
isGmailMailboxLocation,
|
|
5
7
|
specialUseOrdering: labelSpecialUseOrdering,
|
|
6
8
|
};
|