@marcoappio/marco-config 11.0.13 → 11.0.14
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/package.json +1 -1
|
@@ -20,6 +20,132 @@ export declare const mutatorSchemas: {
|
|
|
20
20
|
readonly labelId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "LabelId">]>, undefined>;
|
|
21
21
|
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
|
|
22
22
|
}, undefined>;
|
|
23
|
+
createRule: v.ObjectSchema<{
|
|
24
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
25
|
+
readonly ruleId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "RuleId">]>, undefined>;
|
|
26
|
+
readonly actions: v.SchemaWithPipe<readonly [v.ArraySchema<v.VariantSchema<"type", [v.ObjectSchema<{
|
|
27
|
+
readonly type: v.LiteralSchema<"ARCHIVE", undefined>;
|
|
28
|
+
}, undefined>, v.ObjectSchema<{
|
|
29
|
+
readonly labelId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "LabelId">]>, undefined>;
|
|
30
|
+
readonly type: v.LiteralSchema<"MOVE_TO_FOLDER", undefined>;
|
|
31
|
+
}, undefined>, v.ObjectSchema<{
|
|
32
|
+
readonly labelId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "LabelId">]>, undefined>;
|
|
33
|
+
readonly type: v.LiteralSchema<"ADD_LABEL", undefined>;
|
|
34
|
+
}, undefined>, v.ObjectSchema<{
|
|
35
|
+
readonly type: v.LiteralSchema<"MARK_READ", undefined>;
|
|
36
|
+
}, undefined>, v.ObjectSchema<{
|
|
37
|
+
readonly type: v.LiteralSchema<"STAR", undefined>;
|
|
38
|
+
}, undefined>, v.ObjectSchema<{
|
|
39
|
+
readonly type: v.LiteralSchema<"TRASH", undefined>;
|
|
40
|
+
}, undefined>, v.ObjectSchema<{
|
|
41
|
+
readonly type: v.LiteralSchema<"MARK_SPAM", undefined>;
|
|
42
|
+
}, undefined>, v.ObjectSchema<{
|
|
43
|
+
readonly type: v.LiteralSchema<"MUTE_NOTIFICATION", undefined>;
|
|
44
|
+
}, undefined>], undefined>, undefined>, v.MinLengthAction<({
|
|
45
|
+
type: "ARCHIVE";
|
|
46
|
+
} | {
|
|
47
|
+
labelId: string & v.Brand<"LabelId">;
|
|
48
|
+
type: "MOVE_TO_FOLDER";
|
|
49
|
+
} | {
|
|
50
|
+
labelId: string & v.Brand<"LabelId">;
|
|
51
|
+
type: "ADD_LABEL";
|
|
52
|
+
} | {
|
|
53
|
+
type: "MARK_READ";
|
|
54
|
+
} | {
|
|
55
|
+
type: "STAR";
|
|
56
|
+
} | {
|
|
57
|
+
type: "TRASH";
|
|
58
|
+
} | {
|
|
59
|
+
type: "MARK_SPAM";
|
|
60
|
+
} | {
|
|
61
|
+
type: "MUTE_NOTIFICATION";
|
|
62
|
+
})[], 1, undefined>, v.MaxLengthAction<({
|
|
63
|
+
type: "ARCHIVE";
|
|
64
|
+
} | {
|
|
65
|
+
labelId: string & v.Brand<"LabelId">;
|
|
66
|
+
type: "MOVE_TO_FOLDER";
|
|
67
|
+
} | {
|
|
68
|
+
labelId: string & v.Brand<"LabelId">;
|
|
69
|
+
type: "ADD_LABEL";
|
|
70
|
+
} | {
|
|
71
|
+
type: "MARK_READ";
|
|
72
|
+
} | {
|
|
73
|
+
type: "STAR";
|
|
74
|
+
} | {
|
|
75
|
+
type: "TRASH";
|
|
76
|
+
} | {
|
|
77
|
+
type: "MARK_SPAM";
|
|
78
|
+
} | {
|
|
79
|
+
type: "MUTE_NOTIFICATION";
|
|
80
|
+
})[], number, undefined>]>;
|
|
81
|
+
readonly conditions: v.SchemaWithPipe<readonly [v.ArraySchema<v.VariantSchema<"field", [v.ObjectSchema<{
|
|
82
|
+
readonly field: v.LiteralSchema<"FROM", undefined>;
|
|
83
|
+
readonly operator: v.PicklistSchema<readonly ["CONTAINS", "IS", "DOMAIN_IS"], undefined>;
|
|
84
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
85
|
+
}, undefined>, v.ObjectSchema<{
|
|
86
|
+
readonly field: v.LiteralSchema<"TO_OR_CC", undefined>;
|
|
87
|
+
readonly operator: v.PicklistSchema<readonly ["CONTAINS", "IS", "DOMAIN_IS"], undefined>;
|
|
88
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
89
|
+
}, undefined>, v.ObjectSchema<{
|
|
90
|
+
readonly field: v.LiteralSchema<"SUBJECT", undefined>;
|
|
91
|
+
readonly operator: v.PicklistSchema<readonly ["CONTAINS", "IS"], undefined>;
|
|
92
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
93
|
+
}, undefined>, v.ObjectSchema<{
|
|
94
|
+
readonly field: v.LiteralSchema<"BODY", undefined>;
|
|
95
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
96
|
+
}, undefined>, v.ObjectSchema<{
|
|
97
|
+
readonly field: v.LiteralSchema<"HAS_ATTACHMENT", undefined>;
|
|
98
|
+
readonly value: v.BooleanSchema<undefined>;
|
|
99
|
+
}, undefined>, v.ObjectSchema<{
|
|
100
|
+
readonly field: v.LiteralSchema<"MAILING_LIST", undefined>;
|
|
101
|
+
readonly listId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
102
|
+
}, undefined>], undefined>, undefined>, v.MinLengthAction<({
|
|
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
|
+
})[], 1, undefined>, v.MaxLengthAction<({
|
|
124
|
+
field: "FROM";
|
|
125
|
+
operator: "CONTAINS" | "IS" | "DOMAIN_IS";
|
|
126
|
+
value: string;
|
|
127
|
+
} | {
|
|
128
|
+
field: "TO_OR_CC";
|
|
129
|
+
operator: "CONTAINS" | "IS" | "DOMAIN_IS";
|
|
130
|
+
value: string;
|
|
131
|
+
} | {
|
|
132
|
+
field: "SUBJECT";
|
|
133
|
+
operator: "CONTAINS" | "IS";
|
|
134
|
+
value: string;
|
|
135
|
+
} | {
|
|
136
|
+
field: "BODY";
|
|
137
|
+
value: string;
|
|
138
|
+
} | {
|
|
139
|
+
field: "HAS_ATTACHMENT";
|
|
140
|
+
value: boolean;
|
|
141
|
+
} | {
|
|
142
|
+
field: "MAILING_LIST";
|
|
143
|
+
listId: string | null;
|
|
144
|
+
})[], number, undefined>]>;
|
|
145
|
+
readonly match: v.PicklistSchema<readonly ["ALL", "ANY"], undefined>;
|
|
146
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
147
|
+
readonly stopProcessing: v.BooleanSchema<undefined>;
|
|
148
|
+
}, undefined>;
|
|
23
149
|
deleteAccount: v.ObjectSchema<{
|
|
24
150
|
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
25
151
|
}, undefined>;
|
|
@@ -31,11 +157,19 @@ export declare const mutatorSchemas: {
|
|
|
31
157
|
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
32
158
|
readonly labelId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "LabelId">]>, undefined>;
|
|
33
159
|
}, undefined>;
|
|
160
|
+
deleteRule: v.ObjectSchema<{
|
|
161
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
162
|
+
readonly ruleId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "RuleId">]>, undefined>;
|
|
163
|
+
}, undefined>;
|
|
34
164
|
renameLabel: v.ObjectSchema<{
|
|
35
165
|
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
36
166
|
readonly labelId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "LabelId">]>, undefined>;
|
|
37
167
|
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
|
|
38
168
|
}, undefined>;
|
|
169
|
+
reorderRules: v.ObjectSchema<{
|
|
170
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
171
|
+
readonly ruleIds: v.SchemaWithPipe<readonly [v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "RuleId">]>, undefined>, undefined>, v.MaxLengthAction<(string & v.Brand<"RuleId">)[], number, undefined>, v.CheckAction<(string & v.Brand<"RuleId">)[], "Rule IDs must be unique">]>;
|
|
172
|
+
}, undefined>;
|
|
39
173
|
setAliasName: v.ObjectSchema<{
|
|
40
174
|
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
41
175
|
readonly aliasId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AliasId">]>, undefined>;
|
|
@@ -79,11 +213,142 @@ export declare const mutatorSchemas: {
|
|
|
79
213
|
readonly labelId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "LabelId">]>, undefined>;
|
|
80
214
|
readonly sidebarHidden: v.BooleanSchema<undefined>;
|
|
81
215
|
}, undefined>;
|
|
216
|
+
setRuleEnabled: v.ObjectSchema<{
|
|
217
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
218
|
+
readonly enabled: v.BooleanSchema<undefined>;
|
|
219
|
+
readonly ruleId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "RuleId">]>, undefined>;
|
|
220
|
+
}, undefined>;
|
|
82
221
|
setSettings: v.ObjectSchema<{
|
|
83
222
|
readonly color: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
84
223
|
readonly displayName: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
|
|
85
224
|
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
86
225
|
}, undefined>;
|
|
226
|
+
updateRule: v.ObjectSchema<{
|
|
227
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
228
|
+
readonly ruleId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "RuleId">]>, undefined>;
|
|
229
|
+
readonly actions: v.SchemaWithPipe<readonly [v.ArraySchema<v.VariantSchema<"type", [v.ObjectSchema<{
|
|
230
|
+
readonly type: v.LiteralSchema<"ARCHIVE", undefined>;
|
|
231
|
+
}, undefined>, v.ObjectSchema<{
|
|
232
|
+
readonly labelId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "LabelId">]>, undefined>;
|
|
233
|
+
readonly type: v.LiteralSchema<"MOVE_TO_FOLDER", undefined>;
|
|
234
|
+
}, undefined>, v.ObjectSchema<{
|
|
235
|
+
readonly labelId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "LabelId">]>, undefined>;
|
|
236
|
+
readonly type: v.LiteralSchema<"ADD_LABEL", undefined>;
|
|
237
|
+
}, undefined>, v.ObjectSchema<{
|
|
238
|
+
readonly type: v.LiteralSchema<"MARK_READ", undefined>;
|
|
239
|
+
}, undefined>, v.ObjectSchema<{
|
|
240
|
+
readonly type: v.LiteralSchema<"STAR", undefined>;
|
|
241
|
+
}, undefined>, v.ObjectSchema<{
|
|
242
|
+
readonly type: v.LiteralSchema<"TRASH", undefined>;
|
|
243
|
+
}, undefined>, v.ObjectSchema<{
|
|
244
|
+
readonly type: v.LiteralSchema<"MARK_SPAM", undefined>;
|
|
245
|
+
}, undefined>, v.ObjectSchema<{
|
|
246
|
+
readonly type: v.LiteralSchema<"MUTE_NOTIFICATION", undefined>;
|
|
247
|
+
}, undefined>], undefined>, undefined>, v.MinLengthAction<({
|
|
248
|
+
type: "ARCHIVE";
|
|
249
|
+
} | {
|
|
250
|
+
labelId: string & v.Brand<"LabelId">;
|
|
251
|
+
type: "MOVE_TO_FOLDER";
|
|
252
|
+
} | {
|
|
253
|
+
labelId: string & v.Brand<"LabelId">;
|
|
254
|
+
type: "ADD_LABEL";
|
|
255
|
+
} | {
|
|
256
|
+
type: "MARK_READ";
|
|
257
|
+
} | {
|
|
258
|
+
type: "STAR";
|
|
259
|
+
} | {
|
|
260
|
+
type: "TRASH";
|
|
261
|
+
} | {
|
|
262
|
+
type: "MARK_SPAM";
|
|
263
|
+
} | {
|
|
264
|
+
type: "MUTE_NOTIFICATION";
|
|
265
|
+
})[], 1, undefined>, v.MaxLengthAction<({
|
|
266
|
+
type: "ARCHIVE";
|
|
267
|
+
} | {
|
|
268
|
+
labelId: string & v.Brand<"LabelId">;
|
|
269
|
+
type: "MOVE_TO_FOLDER";
|
|
270
|
+
} | {
|
|
271
|
+
labelId: string & v.Brand<"LabelId">;
|
|
272
|
+
type: "ADD_LABEL";
|
|
273
|
+
} | {
|
|
274
|
+
type: "MARK_READ";
|
|
275
|
+
} | {
|
|
276
|
+
type: "STAR";
|
|
277
|
+
} | {
|
|
278
|
+
type: "TRASH";
|
|
279
|
+
} | {
|
|
280
|
+
type: "MARK_SPAM";
|
|
281
|
+
} | {
|
|
282
|
+
type: "MUTE_NOTIFICATION";
|
|
283
|
+
})[], number, undefined>]>;
|
|
284
|
+
readonly conditions: v.SchemaWithPipe<readonly [v.ArraySchema<v.VariantSchema<"field", [v.ObjectSchema<{
|
|
285
|
+
readonly field: v.LiteralSchema<"FROM", undefined>;
|
|
286
|
+
readonly operator: v.PicklistSchema<readonly ["CONTAINS", "IS", "DOMAIN_IS"], undefined>;
|
|
287
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
288
|
+
}, undefined>, v.ObjectSchema<{
|
|
289
|
+
readonly field: v.LiteralSchema<"TO_OR_CC", undefined>;
|
|
290
|
+
readonly operator: v.PicklistSchema<readonly ["CONTAINS", "IS", "DOMAIN_IS"], undefined>;
|
|
291
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
292
|
+
}, undefined>, v.ObjectSchema<{
|
|
293
|
+
readonly field: v.LiteralSchema<"SUBJECT", undefined>;
|
|
294
|
+
readonly operator: v.PicklistSchema<readonly ["CONTAINS", "IS"], undefined>;
|
|
295
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
296
|
+
}, undefined>, v.ObjectSchema<{
|
|
297
|
+
readonly field: v.LiteralSchema<"BODY", undefined>;
|
|
298
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
299
|
+
}, undefined>, v.ObjectSchema<{
|
|
300
|
+
readonly field: v.LiteralSchema<"HAS_ATTACHMENT", undefined>;
|
|
301
|
+
readonly value: v.BooleanSchema<undefined>;
|
|
302
|
+
}, undefined>, v.ObjectSchema<{
|
|
303
|
+
readonly field: v.LiteralSchema<"MAILING_LIST", undefined>;
|
|
304
|
+
readonly listId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
305
|
+
}, undefined>], undefined>, undefined>, v.MinLengthAction<({
|
|
306
|
+
field: "FROM";
|
|
307
|
+
operator: "CONTAINS" | "IS" | "DOMAIN_IS";
|
|
308
|
+
value: string;
|
|
309
|
+
} | {
|
|
310
|
+
field: "TO_OR_CC";
|
|
311
|
+
operator: "CONTAINS" | "IS" | "DOMAIN_IS";
|
|
312
|
+
value: string;
|
|
313
|
+
} | {
|
|
314
|
+
field: "SUBJECT";
|
|
315
|
+
operator: "CONTAINS" | "IS";
|
|
316
|
+
value: string;
|
|
317
|
+
} | {
|
|
318
|
+
field: "BODY";
|
|
319
|
+
value: string;
|
|
320
|
+
} | {
|
|
321
|
+
field: "HAS_ATTACHMENT";
|
|
322
|
+
value: boolean;
|
|
323
|
+
} | {
|
|
324
|
+
field: "MAILING_LIST";
|
|
325
|
+
listId: string | null;
|
|
326
|
+
})[], 1, undefined>, v.MaxLengthAction<({
|
|
327
|
+
field: "FROM";
|
|
328
|
+
operator: "CONTAINS" | "IS" | "DOMAIN_IS";
|
|
329
|
+
value: string;
|
|
330
|
+
} | {
|
|
331
|
+
field: "TO_OR_CC";
|
|
332
|
+
operator: "CONTAINS" | "IS" | "DOMAIN_IS";
|
|
333
|
+
value: string;
|
|
334
|
+
} | {
|
|
335
|
+
field: "SUBJECT";
|
|
336
|
+
operator: "CONTAINS" | "IS";
|
|
337
|
+
value: string;
|
|
338
|
+
} | {
|
|
339
|
+
field: "BODY";
|
|
340
|
+
value: string;
|
|
341
|
+
} | {
|
|
342
|
+
field: "HAS_ATTACHMENT";
|
|
343
|
+
value: boolean;
|
|
344
|
+
} | {
|
|
345
|
+
field: "MAILING_LIST";
|
|
346
|
+
listId: string | null;
|
|
347
|
+
})[], number, undefined>]>;
|
|
348
|
+
readonly match: v.PicklistSchema<readonly ["ALL", "ANY"], undefined>;
|
|
349
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
350
|
+
readonly stopProcessing: v.BooleanSchema<undefined>;
|
|
351
|
+
}, undefined>;
|
|
87
352
|
};
|
|
88
353
|
draft: {
|
|
89
354
|
cancelSend: v.ObjectSchema<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutatorSchemas.d.ts","sourceRoot":"","sources":["../../../src/schemas/mutators/mutatorSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"mutatorSchemas.d.ts","sourceRoot":"","sources":["../../../src/schemas/mutators/mutatorSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAuF5B,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyP1B,CAAA"}
|
|
@@ -4,6 +4,7 @@ import { DRAFT_STATUSES, DRAFT_TYPES, USER_SETTINGS_CUSTOM_VIEW_ICONS } from '..
|
|
|
4
4
|
import { emailAccount } from '../emailAccount';
|
|
5
5
|
import { id } from '../id';
|
|
6
6
|
import { draftAttachmentSchema } from '../models/draft';
|
|
7
|
+
import { ruleDefinitionSchema } from '../models/rule';
|
|
7
8
|
import { number } from '../number';
|
|
8
9
|
import { string } from '../string';
|
|
9
10
|
const accountAliasSchema = v.object({
|
|
@@ -74,6 +75,11 @@ export const mutatorSchemas = {
|
|
|
74
75
|
labelId: id.labelId.required(),
|
|
75
76
|
name: v.pipe(v.string(), v.nonEmpty(), v.maxLength(255)),
|
|
76
77
|
}),
|
|
78
|
+
createRule: v.object({
|
|
79
|
+
...ruleDefinitionSchema.entries,
|
|
80
|
+
accountId: id.accountId.required(),
|
|
81
|
+
ruleId: id.ruleId.required(),
|
|
82
|
+
}),
|
|
77
83
|
deleteAccount: v.object({
|
|
78
84
|
id: id.accountId.required(),
|
|
79
85
|
}),
|
|
@@ -85,11 +91,19 @@ export const mutatorSchemas = {
|
|
|
85
91
|
accountId: id.accountId.required(),
|
|
86
92
|
labelId: id.labelId.required(),
|
|
87
93
|
}),
|
|
94
|
+
deleteRule: v.object({
|
|
95
|
+
accountId: id.accountId.required(),
|
|
96
|
+
ruleId: id.ruleId.required(),
|
|
97
|
+
}),
|
|
88
98
|
renameLabel: v.object({
|
|
89
99
|
accountId: id.accountId.required(),
|
|
90
100
|
labelId: id.labelId.required(),
|
|
91
101
|
name: v.pipe(v.string(), v.nonEmpty(), v.maxLength(255)),
|
|
92
102
|
}),
|
|
103
|
+
reorderRules: v.object({
|
|
104
|
+
accountId: id.accountId.required(),
|
|
105
|
+
ruleIds: v.pipe(v.array(id.ruleId.required()), v.maxLength(marcoConstants.rules.maxRulesPerAccount), v.check(ruleIds => new Set(ruleIds).size === ruleIds.length, 'Rule IDs must be unique')),
|
|
106
|
+
}),
|
|
93
107
|
setAliasName: v.object({
|
|
94
108
|
accountId: id.accountId.required(),
|
|
95
109
|
aliasId: id.aliasId.required(),
|
|
@@ -117,11 +131,21 @@ export const mutatorSchemas = {
|
|
|
117
131
|
labelId: id.labelId.required(),
|
|
118
132
|
sidebarHidden: v.boolean(),
|
|
119
133
|
}),
|
|
134
|
+
setRuleEnabled: v.object({
|
|
135
|
+
accountId: id.accountId.required(),
|
|
136
|
+
enabled: v.boolean(),
|
|
137
|
+
ruleId: id.ruleId.required(),
|
|
138
|
+
}),
|
|
120
139
|
setSettings: v.object({
|
|
121
140
|
color: v.optional(string.nullable()),
|
|
122
141
|
displayName: v.optional(string.nullable()),
|
|
123
142
|
id: id.accountId.required(),
|
|
124
143
|
}),
|
|
144
|
+
updateRule: v.object({
|
|
145
|
+
...ruleDefinitionSchema.entries,
|
|
146
|
+
accountId: id.accountId.required(),
|
|
147
|
+
ruleId: id.ruleId.required(),
|
|
148
|
+
}),
|
|
125
149
|
},
|
|
126
150
|
draft: {
|
|
127
151
|
cancelSend: v.object({
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
export declare const getRules: import("../../../../..").EndpointConfig<"/v1/pv/models/account/:accountId/rules/list", v.GenericSchema | undefined, v.GenericSchema | undefined, v.UnionSchema<[v.UnionSchema<[v.ObjectSchema<{
|
|
3
|
+
readonly data: v.ObjectSchema<{
|
|
4
|
+
readonly code: v.LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
|
|
5
|
+
}, undefined>;
|
|
6
|
+
readonly status: v.LiteralSchema<401, undefined>;
|
|
7
|
+
}, undefined>, v.ObjectSchema<{
|
|
8
|
+
readonly data: v.ObjectSchema<{
|
|
9
|
+
readonly code: v.LiteralSchema<"USER_NOT_FOUND", undefined>;
|
|
10
|
+
}, undefined>;
|
|
11
|
+
readonly status: v.LiteralSchema<404, undefined>;
|
|
12
|
+
}, undefined>, v.ObjectSchema<{
|
|
13
|
+
readonly data: v.ObjectSchema<{
|
|
14
|
+
readonly code: v.LiteralSchema<"ACCOUNT_NOT_FOUND", undefined>;
|
|
15
|
+
}, undefined>;
|
|
16
|
+
readonly status: v.LiteralSchema<404, undefined>;
|
|
17
|
+
}, undefined>, v.ObjectSchema<{
|
|
18
|
+
readonly data: v.ArraySchema<v.ObjectSchema<{
|
|
19
|
+
readonly accountId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "AccountId">]>, undefined>;
|
|
20
|
+
readonly disabledReason: v.NullableSchema<v.PicklistSchema<readonly ["LABEL_NOT_FOUND"], undefined>, undefined>;
|
|
21
|
+
readonly enabled: v.BooleanSchema<undefined>;
|
|
22
|
+
readonly id: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "RuleId">]>, undefined>;
|
|
23
|
+
readonly lastMatchedAt: v.NullableSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, undefined>;
|
|
24
|
+
readonly matchCount: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
25
|
+
readonly actions: v.SchemaWithPipe<readonly [v.ArraySchema<v.VariantSchema<"type", [v.ObjectSchema<{
|
|
26
|
+
readonly type: v.LiteralSchema<"ARCHIVE", undefined>;
|
|
27
|
+
}, undefined>, v.ObjectSchema<{
|
|
28
|
+
readonly labelId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "LabelId">]>, undefined>;
|
|
29
|
+
readonly type: v.LiteralSchema<"MOVE_TO_FOLDER", undefined>;
|
|
30
|
+
}, undefined>, v.ObjectSchema<{
|
|
31
|
+
readonly labelId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "LabelId">]>, undefined>;
|
|
32
|
+
readonly type: v.LiteralSchema<"ADD_LABEL", undefined>;
|
|
33
|
+
}, undefined>, v.ObjectSchema<{
|
|
34
|
+
readonly type: v.LiteralSchema<"MARK_READ", undefined>;
|
|
35
|
+
}, undefined>, v.ObjectSchema<{
|
|
36
|
+
readonly type: v.LiteralSchema<"STAR", undefined>;
|
|
37
|
+
}, undefined>, v.ObjectSchema<{
|
|
38
|
+
readonly type: v.LiteralSchema<"TRASH", undefined>;
|
|
39
|
+
}, undefined>, v.ObjectSchema<{
|
|
40
|
+
readonly type: v.LiteralSchema<"MARK_SPAM", undefined>;
|
|
41
|
+
}, undefined>, v.ObjectSchema<{
|
|
42
|
+
readonly type: v.LiteralSchema<"MUTE_NOTIFICATION", undefined>;
|
|
43
|
+
}, undefined>], undefined>, undefined>, v.MinLengthAction<({
|
|
44
|
+
type: "ARCHIVE";
|
|
45
|
+
} | {
|
|
46
|
+
labelId: string & v.Brand<"LabelId">;
|
|
47
|
+
type: "MOVE_TO_FOLDER";
|
|
48
|
+
} | {
|
|
49
|
+
labelId: string & v.Brand<"LabelId">;
|
|
50
|
+
type: "ADD_LABEL";
|
|
51
|
+
} | {
|
|
52
|
+
type: "MARK_READ";
|
|
53
|
+
} | {
|
|
54
|
+
type: "STAR";
|
|
55
|
+
} | {
|
|
56
|
+
type: "TRASH";
|
|
57
|
+
} | {
|
|
58
|
+
type: "MARK_SPAM";
|
|
59
|
+
} | {
|
|
60
|
+
type: "MUTE_NOTIFICATION";
|
|
61
|
+
})[], 1, undefined>, v.MaxLengthAction<({
|
|
62
|
+
type: "ARCHIVE";
|
|
63
|
+
} | {
|
|
64
|
+
labelId: string & v.Brand<"LabelId">;
|
|
65
|
+
type: "MOVE_TO_FOLDER";
|
|
66
|
+
} | {
|
|
67
|
+
labelId: string & v.Brand<"LabelId">;
|
|
68
|
+
type: "ADD_LABEL";
|
|
69
|
+
} | {
|
|
70
|
+
type: "MARK_READ";
|
|
71
|
+
} | {
|
|
72
|
+
type: "STAR";
|
|
73
|
+
} | {
|
|
74
|
+
type: "TRASH";
|
|
75
|
+
} | {
|
|
76
|
+
type: "MARK_SPAM";
|
|
77
|
+
} | {
|
|
78
|
+
type: "MUTE_NOTIFICATION";
|
|
79
|
+
})[], number, undefined>]>;
|
|
80
|
+
readonly conditions: v.SchemaWithPipe<readonly [v.ArraySchema<v.VariantSchema<"field", [v.ObjectSchema<{
|
|
81
|
+
readonly field: v.LiteralSchema<"FROM", undefined>;
|
|
82
|
+
readonly operator: v.PicklistSchema<readonly ["CONTAINS", "IS", "DOMAIN_IS"], undefined>;
|
|
83
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
84
|
+
}, undefined>, v.ObjectSchema<{
|
|
85
|
+
readonly field: v.LiteralSchema<"TO_OR_CC", undefined>;
|
|
86
|
+
readonly operator: v.PicklistSchema<readonly ["CONTAINS", "IS", "DOMAIN_IS"], undefined>;
|
|
87
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
88
|
+
}, undefined>, v.ObjectSchema<{
|
|
89
|
+
readonly field: v.LiteralSchema<"SUBJECT", undefined>;
|
|
90
|
+
readonly operator: v.PicklistSchema<readonly ["CONTAINS", "IS"], undefined>;
|
|
91
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
92
|
+
}, undefined>, v.ObjectSchema<{
|
|
93
|
+
readonly field: v.LiteralSchema<"BODY", undefined>;
|
|
94
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
95
|
+
}, undefined>, v.ObjectSchema<{
|
|
96
|
+
readonly field: v.LiteralSchema<"HAS_ATTACHMENT", undefined>;
|
|
97
|
+
readonly value: v.BooleanSchema<undefined>;
|
|
98
|
+
}, undefined>, v.ObjectSchema<{
|
|
99
|
+
readonly field: v.LiteralSchema<"MAILING_LIST", undefined>;
|
|
100
|
+
readonly listId: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
101
|
+
}, undefined>], undefined>, undefined>, v.MinLengthAction<({
|
|
102
|
+
field: "FROM";
|
|
103
|
+
operator: "CONTAINS" | "IS" | "DOMAIN_IS";
|
|
104
|
+
value: string;
|
|
105
|
+
} | {
|
|
106
|
+
field: "TO_OR_CC";
|
|
107
|
+
operator: "CONTAINS" | "IS" | "DOMAIN_IS";
|
|
108
|
+
value: string;
|
|
109
|
+
} | {
|
|
110
|
+
field: "SUBJECT";
|
|
111
|
+
operator: "CONTAINS" | "IS";
|
|
112
|
+
value: string;
|
|
113
|
+
} | {
|
|
114
|
+
field: "BODY";
|
|
115
|
+
value: string;
|
|
116
|
+
} | {
|
|
117
|
+
field: "HAS_ATTACHMENT";
|
|
118
|
+
value: boolean;
|
|
119
|
+
} | {
|
|
120
|
+
field: "MAILING_LIST";
|
|
121
|
+
listId: string | null;
|
|
122
|
+
})[], 1, undefined>, v.MaxLengthAction<({
|
|
123
|
+
field: "FROM";
|
|
124
|
+
operator: "CONTAINS" | "IS" | "DOMAIN_IS";
|
|
125
|
+
value: string;
|
|
126
|
+
} | {
|
|
127
|
+
field: "TO_OR_CC";
|
|
128
|
+
operator: "CONTAINS" | "IS" | "DOMAIN_IS";
|
|
129
|
+
value: string;
|
|
130
|
+
} | {
|
|
131
|
+
field: "SUBJECT";
|
|
132
|
+
operator: "CONTAINS" | "IS";
|
|
133
|
+
value: string;
|
|
134
|
+
} | {
|
|
135
|
+
field: "BODY";
|
|
136
|
+
value: string;
|
|
137
|
+
} | {
|
|
138
|
+
field: "HAS_ATTACHMENT";
|
|
139
|
+
value: boolean;
|
|
140
|
+
} | {
|
|
141
|
+
field: "MAILING_LIST";
|
|
142
|
+
listId: string | null;
|
|
143
|
+
})[], number, undefined>]>;
|
|
144
|
+
readonly match: v.PicklistSchema<readonly ["ALL", "ANY"], undefined>;
|
|
145
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
146
|
+
readonly stopProcessing: v.BooleanSchema<undefined>;
|
|
147
|
+
}, undefined>, undefined>;
|
|
148
|
+
readonly status: v.LiteralSchema<200, undefined>;
|
|
149
|
+
}, undefined>], undefined>, v.ObjectSchema<{
|
|
150
|
+
readonly data: v.ObjectSchema<{
|
|
151
|
+
readonly code: v.LiteralSchema<"REGION_NOT_SUPPORTED", undefined>;
|
|
152
|
+
}, undefined>;
|
|
153
|
+
readonly status: v.LiteralSchema<403, undefined>;
|
|
154
|
+
}, undefined>], undefined>>;
|
|
155
|
+
//# sourceMappingURL=getRules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getRules.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/endpoints/private/models/account/getRules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAU5B,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAYnB,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
import { marcoSchemas } from '../../../../../schemas';
|
|
3
|
+
import { createEndpoint } from '../../../../../sdk/endpoints/createEndpointConfig';
|
|
4
|
+
import { accountNotFoundErrorSchema, authFailedErrorSchema, userNotFoundErrorSchema, } from '../../../../../sdk/validation/errors';
|
|
5
|
+
export const getRules = createEndpoint({
|
|
6
|
+
method: 'GET',
|
|
7
|
+
path: '/v1/pv/models/account/:accountId/rules/list',
|
|
8
|
+
response: v.union([
|
|
9
|
+
authFailedErrorSchema,
|
|
10
|
+
userNotFoundErrorSchema,
|
|
11
|
+
accountNotFoundErrorSchema,
|
|
12
|
+
v.object({
|
|
13
|
+
data: v.array(marcoSchemas.models.ruleSchema),
|
|
14
|
+
status: v.literal(200),
|
|
15
|
+
}),
|
|
16
|
+
]),
|
|
17
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/endpoints/private/models/account/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/endpoints/private/models/account/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA"}
|