@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
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
export declare const createRule: import("../../../../..").EndpointConfig<"/v1/pv/models/account/:accountId/rules/create", 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<"LABEL_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<"MUTATION_REJECTED", undefined>;
|
|
150
|
+
}, undefined>;
|
|
151
|
+
readonly status: v.LiteralSchema<409, undefined>;
|
|
152
|
+
}, undefined>, v.ObjectSchema<{
|
|
153
|
+
readonly data: v.ObjectSchema<{
|
|
154
|
+
readonly code: v.LiteralSchema<"VALIDATION_FAILED", undefined>;
|
|
155
|
+
readonly issues: v.ObjectSchema<{
|
|
156
|
+
readonly nested: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>, undefined>, undefined>;
|
|
157
|
+
readonly other: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
158
|
+
readonly root: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
159
|
+
}, undefined>;
|
|
160
|
+
}, undefined>;
|
|
161
|
+
readonly status: v.LiteralSchema<400, undefined>;
|
|
162
|
+
}, undefined>, v.ObjectSchema<{
|
|
163
|
+
readonly status: v.LiteralSchema<201, undefined>;
|
|
164
|
+
}, undefined>], undefined>, v.ObjectSchema<{
|
|
165
|
+
readonly data: v.ObjectSchema<{
|
|
166
|
+
readonly code: v.LiteralSchema<"REGION_NOT_SUPPORTED", undefined>;
|
|
167
|
+
}, undefined>;
|
|
168
|
+
readonly status: v.LiteralSchema<403, undefined>;
|
|
169
|
+
}, undefined>], undefined>>;
|
|
170
|
+
//# sourceMappingURL=createRule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createRule.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/endpoints/private/mutations/account/createRule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAa5B,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAerB,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
import { mutatorSchemas } from '../../../../../schemas';
|
|
3
|
+
import { createEndpoint } from '../../../../../sdk/endpoints/createEndpointConfig';
|
|
4
|
+
import { accountNotFoundErrorSchema, authFailedErrorSchema, labelNotFoundErrorSchema, mutationRejectedErrorSchema, userNotFoundErrorSchema, validationFailedErrorSchema, } from '../../../../../sdk/validation/errors';
|
|
5
|
+
export const createRule = createEndpoint({
|
|
6
|
+
body: mutatorSchemas.account.createRule,
|
|
7
|
+
method: 'POST',
|
|
8
|
+
path: '/v1/pv/models/account/:accountId/rules/create',
|
|
9
|
+
response: v.union([
|
|
10
|
+
authFailedErrorSchema,
|
|
11
|
+
userNotFoundErrorSchema,
|
|
12
|
+
accountNotFoundErrorSchema,
|
|
13
|
+
labelNotFoundErrorSchema,
|
|
14
|
+
mutationRejectedErrorSchema,
|
|
15
|
+
validationFailedErrorSchema,
|
|
16
|
+
v.object({
|
|
17
|
+
status: v.literal(201),
|
|
18
|
+
}),
|
|
19
|
+
]),
|
|
20
|
+
});
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
export declare const deleteRule: import("../../../../..").EndpointConfig<"/v1/pv/models/account/:accountId/rules/delete", 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
|
+
}, undefined>, v.GenericSchema | undefined, v.UnionSchema<[v.UnionSchema<[v.ObjectSchema<{
|
|
6
|
+
readonly data: v.ObjectSchema<{
|
|
7
|
+
readonly code: v.LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
|
|
8
|
+
}, undefined>;
|
|
9
|
+
readonly status: v.LiteralSchema<401, undefined>;
|
|
10
|
+
}, undefined>, v.ObjectSchema<{
|
|
11
|
+
readonly data: v.ObjectSchema<{
|
|
12
|
+
readonly code: v.LiteralSchema<"USER_NOT_FOUND", undefined>;
|
|
13
|
+
}, undefined>;
|
|
14
|
+
readonly status: v.LiteralSchema<404, undefined>;
|
|
15
|
+
}, undefined>, v.ObjectSchema<{
|
|
16
|
+
readonly data: v.ObjectSchema<{
|
|
17
|
+
readonly code: v.LiteralSchema<"ACCOUNT_NOT_FOUND", undefined>;
|
|
18
|
+
}, undefined>;
|
|
19
|
+
readonly status: v.LiteralSchema<404, undefined>;
|
|
20
|
+
}, undefined>, v.ObjectSchema<{
|
|
21
|
+
readonly data: v.ObjectSchema<{
|
|
22
|
+
readonly code: v.LiteralSchema<"RULE_NOT_FOUND", undefined>;
|
|
23
|
+
}, undefined>;
|
|
24
|
+
readonly status: v.LiteralSchema<404, undefined>;
|
|
25
|
+
}, undefined>, v.ObjectSchema<{
|
|
26
|
+
readonly data: v.ObjectSchema<{
|
|
27
|
+
readonly code: v.LiteralSchema<"MUTATION_REJECTED", undefined>;
|
|
28
|
+
}, undefined>;
|
|
29
|
+
readonly status: v.LiteralSchema<409, undefined>;
|
|
30
|
+
}, undefined>, v.ObjectSchema<{
|
|
31
|
+
readonly data: v.ObjectSchema<{
|
|
32
|
+
readonly code: v.LiteralSchema<"VALIDATION_FAILED", undefined>;
|
|
33
|
+
readonly issues: v.ObjectSchema<{
|
|
34
|
+
readonly nested: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>, undefined>, undefined>;
|
|
35
|
+
readonly other: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
36
|
+
readonly root: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
37
|
+
}, undefined>;
|
|
38
|
+
}, undefined>;
|
|
39
|
+
readonly status: v.LiteralSchema<400, undefined>;
|
|
40
|
+
}, undefined>, v.ObjectSchema<{
|
|
41
|
+
readonly status: v.LiteralSchema<204, undefined>;
|
|
42
|
+
}, undefined>], undefined>, v.ObjectSchema<{
|
|
43
|
+
readonly data: v.ObjectSchema<{
|
|
44
|
+
readonly code: v.LiteralSchema<"REGION_NOT_SUPPORTED", undefined>;
|
|
45
|
+
}, undefined>;
|
|
46
|
+
readonly status: v.LiteralSchema<403, undefined>;
|
|
47
|
+
}, undefined>], undefined>>;
|
|
48
|
+
//# sourceMappingURL=deleteRule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteRule.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/endpoints/private/mutations/account/deleteRule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAa5B,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAerB,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
import { mutatorSchemas } from '../../../../../schemas';
|
|
3
|
+
import { createEndpoint } from '../../../../../sdk/endpoints/createEndpointConfig';
|
|
4
|
+
import { accountNotFoundErrorSchema, authFailedErrorSchema, mutationRejectedErrorSchema, ruleNotFoundErrorSchema, userNotFoundErrorSchema, validationFailedErrorSchema, } from '../../../../../sdk/validation/errors';
|
|
5
|
+
export const deleteRule = createEndpoint({
|
|
6
|
+
body: mutatorSchemas.account.deleteRule,
|
|
7
|
+
method: 'DELETE',
|
|
8
|
+
path: '/v1/pv/models/account/:accountId/rules/delete',
|
|
9
|
+
response: v.union([
|
|
10
|
+
authFailedErrorSchema,
|
|
11
|
+
userNotFoundErrorSchema,
|
|
12
|
+
accountNotFoundErrorSchema,
|
|
13
|
+
ruleNotFoundErrorSchema,
|
|
14
|
+
mutationRejectedErrorSchema,
|
|
15
|
+
validationFailedErrorSchema,
|
|
16
|
+
v.object({
|
|
17
|
+
status: v.literal(204),
|
|
18
|
+
}),
|
|
19
|
+
]),
|
|
20
|
+
});
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
export { createAccount } from './createAccount';
|
|
2
2
|
export { createAlias } from './createAlias';
|
|
3
3
|
export { createLabel } from './createLabel';
|
|
4
|
+
export { createRule } from './createRule';
|
|
4
5
|
export { deleteAccount } from './deleteAccount';
|
|
5
6
|
export { deleteAlias } from './deleteAlias';
|
|
6
7
|
export { deleteLabel } from './deleteLabel';
|
|
8
|
+
export { deleteRule } from './deleteRule';
|
|
7
9
|
export { renameLabel } from './renameLabel';
|
|
10
|
+
export { reorderRules } from './reorderRules';
|
|
8
11
|
export { setAliasName } from './setAliasName';
|
|
9
12
|
export { setAliasPrimary } from './setAliasPrimary';
|
|
10
13
|
export { setAliasSignature } from './setAliasSignature';
|
|
11
14
|
export { setConnectionConfigImap } from './setConnectionConfigImap';
|
|
12
15
|
export { setConnectionConfigOauth } from './setConnectionConfigOauth';
|
|
13
16
|
export { setLabelSidebarHidden } from './setLabelSidebarHidden';
|
|
17
|
+
export { setRuleEnabled } from './setRuleEnabled';
|
|
14
18
|
export { setSettings } from './setSettings';
|
|
19
|
+
export { updateRule } from './updateRule';
|
|
15
20
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/endpoints/private/mutations/account/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/endpoints/private/mutations/account/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA"}
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
export { createAccount } from './createAccount';
|
|
2
2
|
export { createAlias } from './createAlias';
|
|
3
3
|
export { createLabel } from './createLabel';
|
|
4
|
+
export { createRule } from './createRule';
|
|
4
5
|
export { deleteAccount } from './deleteAccount';
|
|
5
6
|
export { deleteAlias } from './deleteAlias';
|
|
6
7
|
export { deleteLabel } from './deleteLabel';
|
|
8
|
+
export { deleteRule } from './deleteRule';
|
|
7
9
|
export { renameLabel } from './renameLabel';
|
|
10
|
+
export { reorderRules } from './reorderRules';
|
|
8
11
|
export { setAliasName } from './setAliasName';
|
|
9
12
|
export { setAliasPrimary } from './setAliasPrimary';
|
|
10
13
|
export { setAliasSignature } from './setAliasSignature';
|
|
11
14
|
export { setConnectionConfigImap } from './setConnectionConfigImap';
|
|
12
15
|
export { setConnectionConfigOauth } from './setConnectionConfigOauth';
|
|
13
16
|
export { setLabelSidebarHidden } from './setLabelSidebarHidden';
|
|
17
|
+
export { setRuleEnabled } from './setRuleEnabled';
|
|
14
18
|
export { setSettings } from './setSettings';
|
|
19
|
+
export { updateRule } from './updateRule';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
export declare const reorderRules: import("../../../../..").EndpointConfig<"/v1/pv/models/account/:accountId/rules/reorder", 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 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">]>;
|
|
5
|
+
}, undefined>, v.GenericSchema | undefined, v.UnionSchema<[v.UnionSchema<[v.ObjectSchema<{
|
|
6
|
+
readonly data: v.ObjectSchema<{
|
|
7
|
+
readonly code: v.LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
|
|
8
|
+
}, undefined>;
|
|
9
|
+
readonly status: v.LiteralSchema<401, undefined>;
|
|
10
|
+
}, undefined>, v.ObjectSchema<{
|
|
11
|
+
readonly data: v.ObjectSchema<{
|
|
12
|
+
readonly code: v.LiteralSchema<"USER_NOT_FOUND", undefined>;
|
|
13
|
+
}, undefined>;
|
|
14
|
+
readonly status: v.LiteralSchema<404, undefined>;
|
|
15
|
+
}, undefined>, v.ObjectSchema<{
|
|
16
|
+
readonly data: v.ObjectSchema<{
|
|
17
|
+
readonly code: v.LiteralSchema<"ACCOUNT_NOT_FOUND", undefined>;
|
|
18
|
+
}, undefined>;
|
|
19
|
+
readonly status: v.LiteralSchema<404, undefined>;
|
|
20
|
+
}, undefined>, v.ObjectSchema<{
|
|
21
|
+
readonly data: v.ObjectSchema<{
|
|
22
|
+
readonly code: v.LiteralSchema<"RULE_NOT_FOUND", undefined>;
|
|
23
|
+
}, undefined>;
|
|
24
|
+
readonly status: v.LiteralSchema<404, undefined>;
|
|
25
|
+
}, undefined>, v.ObjectSchema<{
|
|
26
|
+
readonly data: v.ObjectSchema<{
|
|
27
|
+
readonly code: v.LiteralSchema<"MUTATION_REJECTED", undefined>;
|
|
28
|
+
}, undefined>;
|
|
29
|
+
readonly status: v.LiteralSchema<409, undefined>;
|
|
30
|
+
}, undefined>, v.ObjectSchema<{
|
|
31
|
+
readonly data: v.ObjectSchema<{
|
|
32
|
+
readonly code: v.LiteralSchema<"VALIDATION_FAILED", undefined>;
|
|
33
|
+
readonly issues: v.ObjectSchema<{
|
|
34
|
+
readonly nested: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>, undefined>, undefined>;
|
|
35
|
+
readonly other: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
36
|
+
readonly root: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
37
|
+
}, undefined>;
|
|
38
|
+
}, undefined>;
|
|
39
|
+
readonly status: v.LiteralSchema<400, undefined>;
|
|
40
|
+
}, undefined>, v.ObjectSchema<{
|
|
41
|
+
readonly status: v.LiteralSchema<200, undefined>;
|
|
42
|
+
}, undefined>], undefined>, v.ObjectSchema<{
|
|
43
|
+
readonly data: v.ObjectSchema<{
|
|
44
|
+
readonly code: v.LiteralSchema<"REGION_NOT_SUPPORTED", undefined>;
|
|
45
|
+
}, undefined>;
|
|
46
|
+
readonly status: v.LiteralSchema<403, undefined>;
|
|
47
|
+
}, undefined>], undefined>>;
|
|
48
|
+
//# sourceMappingURL=reorderRules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reorderRules.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/endpoints/private/mutations/account/reorderRules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAa5B,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAevB,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
import { mutatorSchemas } from '../../../../../schemas';
|
|
3
|
+
import { createEndpoint } from '../../../../../sdk/endpoints/createEndpointConfig';
|
|
4
|
+
import { accountNotFoundErrorSchema, authFailedErrorSchema, mutationRejectedErrorSchema, ruleNotFoundErrorSchema, userNotFoundErrorSchema, validationFailedErrorSchema, } from '../../../../../sdk/validation/errors';
|
|
5
|
+
export const reorderRules = createEndpoint({
|
|
6
|
+
body: mutatorSchemas.account.reorderRules,
|
|
7
|
+
method: 'PATCH',
|
|
8
|
+
path: '/v1/pv/models/account/:accountId/rules/reorder',
|
|
9
|
+
response: v.union([
|
|
10
|
+
authFailedErrorSchema,
|
|
11
|
+
userNotFoundErrorSchema,
|
|
12
|
+
accountNotFoundErrorSchema,
|
|
13
|
+
ruleNotFoundErrorSchema,
|
|
14
|
+
mutationRejectedErrorSchema,
|
|
15
|
+
validationFailedErrorSchema,
|
|
16
|
+
v.object({
|
|
17
|
+
status: v.literal(200),
|
|
18
|
+
}),
|
|
19
|
+
]),
|
|
20
|
+
});
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
export declare const setRuleEnabled: import("../../../../..").EndpointConfig<"/v1/pv/models/account/:accountId/rules/set-enabled", 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 enabled: v.BooleanSchema<undefined>;
|
|
5
|
+
readonly ruleId: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>, v.BrandAction<string, "RuleId">]>, undefined>;
|
|
6
|
+
}, undefined>, v.GenericSchema | undefined, v.UnionSchema<[v.UnionSchema<[v.ObjectSchema<{
|
|
7
|
+
readonly data: v.ObjectSchema<{
|
|
8
|
+
readonly code: v.LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
|
|
9
|
+
}, undefined>;
|
|
10
|
+
readonly status: v.LiteralSchema<401, undefined>;
|
|
11
|
+
}, undefined>, v.ObjectSchema<{
|
|
12
|
+
readonly data: v.ObjectSchema<{
|
|
13
|
+
readonly code: v.LiteralSchema<"USER_NOT_FOUND", undefined>;
|
|
14
|
+
}, undefined>;
|
|
15
|
+
readonly status: v.LiteralSchema<404, undefined>;
|
|
16
|
+
}, undefined>, v.ObjectSchema<{
|
|
17
|
+
readonly data: v.ObjectSchema<{
|
|
18
|
+
readonly code: v.LiteralSchema<"ACCOUNT_NOT_FOUND", undefined>;
|
|
19
|
+
}, undefined>;
|
|
20
|
+
readonly status: v.LiteralSchema<404, undefined>;
|
|
21
|
+
}, undefined>, v.ObjectSchema<{
|
|
22
|
+
readonly data: v.ObjectSchema<{
|
|
23
|
+
readonly code: v.LiteralSchema<"RULE_NOT_FOUND", undefined>;
|
|
24
|
+
}, undefined>;
|
|
25
|
+
readonly status: v.LiteralSchema<404, undefined>;
|
|
26
|
+
}, undefined>, v.ObjectSchema<{
|
|
27
|
+
readonly data: v.ObjectSchema<{
|
|
28
|
+
readonly code: v.LiteralSchema<"LABEL_NOT_FOUND", undefined>;
|
|
29
|
+
}, undefined>;
|
|
30
|
+
readonly status: v.LiteralSchema<404, undefined>;
|
|
31
|
+
}, undefined>, v.ObjectSchema<{
|
|
32
|
+
readonly data: v.ObjectSchema<{
|
|
33
|
+
readonly code: v.LiteralSchema<"MUTATION_REJECTED", undefined>;
|
|
34
|
+
}, undefined>;
|
|
35
|
+
readonly status: v.LiteralSchema<409, undefined>;
|
|
36
|
+
}, undefined>, v.ObjectSchema<{
|
|
37
|
+
readonly data: v.ObjectSchema<{
|
|
38
|
+
readonly code: v.LiteralSchema<"VALIDATION_FAILED", undefined>;
|
|
39
|
+
readonly issues: v.ObjectSchema<{
|
|
40
|
+
readonly nested: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>, undefined>, undefined>;
|
|
41
|
+
readonly other: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
42
|
+
readonly root: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
43
|
+
}, undefined>;
|
|
44
|
+
}, undefined>;
|
|
45
|
+
readonly status: v.LiteralSchema<400, undefined>;
|
|
46
|
+
}, undefined>, v.ObjectSchema<{
|
|
47
|
+
readonly status: v.LiteralSchema<200, undefined>;
|
|
48
|
+
}, undefined>], undefined>, v.ObjectSchema<{
|
|
49
|
+
readonly data: v.ObjectSchema<{
|
|
50
|
+
readonly code: v.LiteralSchema<"REGION_NOT_SUPPORTED", undefined>;
|
|
51
|
+
}, undefined>;
|
|
52
|
+
readonly status: v.LiteralSchema<403, undefined>;
|
|
53
|
+
}, undefined>], undefined>>;
|
|
54
|
+
//# sourceMappingURL=setRuleEnabled.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setRuleEnabled.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/endpoints/private/mutations/account/setRuleEnabled.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAc5B,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAgBzB,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 setRuleEnabled = createEndpoint({
|
|
6
|
+
body: mutatorSchemas.account.setRuleEnabled,
|
|
7
|
+
method: 'PATCH',
|
|
8
|
+
path: '/v1/pv/models/account/:accountId/rules/set-enabled',
|
|
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
|
+
});
|