graze-client 0.8.0 → 0.9.0
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/build/dts/GrazeClient.d.ts +368 -242
- package/build/dts/GrazeClient.d.ts.map +1 -1
- package/build/dts/builder.d.ts +8 -8
- package/build/dts/builder.d.ts.map +1 -1
- package/build/dts/common.d.ts +2 -3
- package/build/dts/common.d.ts.map +1 -1
- package/build/dts/index.d.ts +13 -13
- package/build/dts/index.d.ts.map +1 -1
- package/build/dts/schema/Post.d.ts +52 -52
- package/build/dts/schema/StickyPosts.d.ts +55 -56
- package/build/dts/schema/StickyPosts.d.ts.map +1 -1
- package/build/dts/schema/UpdateAlgorithmPayload.d.ts +187 -163
- package/build/dts/schema/UpdateAlgorithmPayload.d.ts.map +1 -1
- package/build/dts/schema/shared.d.ts +127 -127
- package/build/dts/schema/shared.d.ts.map +1 -1
- package/build/dts/stickyposts.d.ts +80 -78
- package/build/dts/stickyposts.d.ts.map +1 -1
- package/build/esm/GrazeClient.js +45 -29
- package/build/esm/GrazeClient.js.map +1 -1
- package/build/esm/builder.js +2 -2
- package/build/esm/builder.js.map +1 -1
- package/build/esm/common.js +4 -3
- package/build/esm/common.js.map +1 -1
- package/build/esm/index.js +8 -5
- package/build/esm/index.js.map +1 -1
- package/build/esm/schema/Post.js +6 -6
- package/build/esm/schema/Post.js.map +1 -1
- package/build/esm/schema/StickyPosts.js +2 -3
- package/build/esm/schema/StickyPosts.js.map +1 -1
- package/build/esm/schema/UpdateAlgorithmPayload.js +116 -39
- package/build/esm/schema/UpdateAlgorithmPayload.js.map +1 -1
- package/build/esm/schema/shared.js +6 -6
- package/build/esm/schema/shared.js.map +1 -1
- package/build/esm/stickyposts.js +28 -13
- package/build/esm/stickyposts.js.map +1 -1
- package/package.json +8 -10
- package/src/GrazeClient.ts +55 -47
- package/src/builder.ts +14 -14
- package/src/common.ts +4 -9
- package/src/index.ts +24 -19
- package/src/schema/Post.ts +6 -6
- package/src/schema/StickyPosts.ts +3 -7
- package/src/schema/UpdateAlgorithmPayload.ts +80 -67
- package/src/schema/shared.ts +6 -6
- package/src/stickyposts.ts +44 -23
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Schema as S } from "effect";
|
|
2
|
-
export declare const ListUri:
|
|
2
|
+
export declare const ListUri: S.String;
|
|
3
3
|
export type ListUri = typeof ListUri.Type;
|
|
4
|
-
export declare const AttributeName: S.Union<[S.Literal<
|
|
4
|
+
export declare const AttributeName: S.Union<readonly [S.Literal<"text">, S.Literal<"reply">, S.Literal<"embed.images[*].alt">, S.Literal<"embed.media.images[*].alt">, S.Literal<"embed.alt">, S.Literal<"embed">, S.Literal<"embed.external.uri">, S.Literal<"embed.external.title">, S.Literal<"embed.external.description">, S.Literal<"embed.media.external.uri">, S.Literal<"embed.media.external.title">, S.Literal<"embed.media.external.description">, S.Literal<"embed.record.uri">, S.Literal<"langs[*]">, S.Literal<"labels.values[*].val">, S.Literal<"facets[*].features[*].uri">, S.Literal<"hydrated_metadata.user.did">, S.Literal<"hydrated_metadata.user.handle">, S.Literal<"hydrated_metadata.user.description">, S.Literal<"hydrated_metadata.user.display_name">, S.Literal<"hydrated_metadata.user.labels">, S.Literal<"hydrated_metadata.mentions.display_name">]>;
|
|
5
5
|
export type AttributeName = typeof AttributeName.Type;
|
|
6
|
-
export declare const AttributeComparison: S.
|
|
6
|
+
export declare const AttributeComparison: S.Literals<readonly ["==", "!=", ">", "<", ">=", "<="]>;
|
|
7
7
|
export type AttributeComparison = typeof AttributeComparison.Type;
|
|
8
|
-
export declare const AttributeValue:
|
|
8
|
+
export declare const AttributeValue: S.Null;
|
|
9
9
|
export type AttributeValue = typeof AttributeValue.Type;
|
|
10
|
-
export declare const PostType: S.
|
|
10
|
+
export declare const PostType: S.Literals<readonly ["reply", "quote"]>;
|
|
11
11
|
export type PostType = typeof PostType.Type;
|
|
12
12
|
export type Filter = And | Or | ListMemberFilter | AttributeCompare | RegexMatches | RegexNegationMatches | TextMatchesAny | TextMatchesNone | ContentModerationBlock | EntityExcludesLabels | EmbedType | SocialGraph | PostTypeFilter;
|
|
13
13
|
export type And = Readonly<{
|
|
@@ -36,10 +36,10 @@ export type RegexNegationMatches = Readonly<{
|
|
|
36
36
|
regex_negation_matches: readonly [AttributeName, string, boolean];
|
|
37
37
|
}>;
|
|
38
38
|
export type TextMatchesAny = Readonly<{
|
|
39
|
-
regex_any: readonly [AttributeName,
|
|
39
|
+
regex_any: readonly [AttributeName, ReadonlyArray<string>, boolean, boolean];
|
|
40
40
|
}>;
|
|
41
41
|
export type TextMatchesNone = Readonly<{
|
|
42
|
-
regex_none: readonly [AttributeName,
|
|
42
|
+
regex_none: readonly [AttributeName, ReadonlyArray<string>, boolean, boolean];
|
|
43
43
|
}>;
|
|
44
44
|
export type ContentModerationBlock = Readonly<{
|
|
45
45
|
content_moderation: readonly ["OK", ">=", number];
|
|
@@ -56,357 +56,381 @@ export type EmbedType = Readonly<{
|
|
|
56
56
|
export type SocialGraph = Readonly<{
|
|
57
57
|
social_graph: readonly [string, "in" | "not_in", "follows" | "followers"];
|
|
58
58
|
}>;
|
|
59
|
-
export declare const Filter: S.Union<[S.suspend<Readonly<{
|
|
59
|
+
export declare const Filter: S.Union<readonly [S.suspend<S.Codec<Readonly<{
|
|
60
60
|
and: ReadonlyArray<Filter>;
|
|
61
61
|
}>, Readonly<{
|
|
62
62
|
and: ReadonlyArray<Filter>;
|
|
63
|
-
}>, never
|
|
63
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
64
64
|
or: ReadonlyArray<Filter>;
|
|
65
65
|
}>, Readonly<{
|
|
66
66
|
or: ReadonlyArray<Filter>;
|
|
67
|
-
}>, never
|
|
67
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
68
68
|
list_member: readonly [ListUri, "in" | "not_in"];
|
|
69
69
|
}>, Readonly<{
|
|
70
70
|
list_member: readonly [ListUri, "in" | "not_in"];
|
|
71
|
-
}>, never
|
|
71
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
72
72
|
attribute_compare: readonly [AttributeName, AttributeComparison, AttributeValue];
|
|
73
73
|
}>, Readonly<{
|
|
74
74
|
attribute_compare: readonly [AttributeName, AttributeComparison, AttributeValue];
|
|
75
|
-
}>, never
|
|
75
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
76
76
|
regex_matches: readonly [AttributeName, string, boolean];
|
|
77
77
|
}>, Readonly<{
|
|
78
78
|
regex_matches: readonly [AttributeName, string, boolean];
|
|
79
|
-
}>, never
|
|
79
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
80
80
|
regex_negation_matches: readonly [AttributeName, string, boolean];
|
|
81
81
|
}>, Readonly<{
|
|
82
82
|
regex_negation_matches: readonly [AttributeName, string, boolean];
|
|
83
|
-
}>, never
|
|
84
|
-
regex_any: readonly [AttributeName,
|
|
83
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
84
|
+
regex_any: readonly [AttributeName, ReadonlyArray<string>, boolean, boolean];
|
|
85
85
|
}>, Readonly<{
|
|
86
|
-
regex_any: readonly [AttributeName,
|
|
87
|
-
}>, never
|
|
88
|
-
regex_none: readonly [AttributeName,
|
|
86
|
+
regex_any: readonly [AttributeName, ReadonlyArray<string>, boolean, boolean];
|
|
87
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
88
|
+
regex_none: readonly [AttributeName, ReadonlyArray<string>, boolean, boolean];
|
|
89
89
|
}>, Readonly<{
|
|
90
|
-
regex_none: readonly [AttributeName,
|
|
91
|
-
}>, never
|
|
90
|
+
regex_none: readonly [AttributeName, ReadonlyArray<string>, boolean, boolean];
|
|
91
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
92
92
|
content_moderation: readonly ["OK", ">=", number];
|
|
93
93
|
}>, Readonly<{
|
|
94
94
|
content_moderation: readonly ["OK", ">=", number];
|
|
95
|
-
}>, never
|
|
95
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
96
96
|
entity_excludes: readonly ["labels", readonly ["porn", "sexual", "nudity"]];
|
|
97
97
|
}>, Readonly<{
|
|
98
98
|
entity_excludes: readonly ["labels", readonly ["porn", "sexual", "nudity"]];
|
|
99
|
-
}>, never
|
|
99
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
100
100
|
embed_type: readonly ["==" | "!=", "video" | "image" | "link" | "post" | "gif" | "image_group"];
|
|
101
101
|
}>, Readonly<{
|
|
102
102
|
embed_type: readonly ["==" | "!=", "video" | "image" | "link" | "post" | "gif" | "image_group"];
|
|
103
|
-
}>, never
|
|
103
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
104
104
|
social_graph: readonly [string, "in" | "not_in", "follows" | "followers"];
|
|
105
105
|
}>, Readonly<{
|
|
106
106
|
social_graph: readonly [string, "in" | "not_in", "follows" | "followers"];
|
|
107
|
-
}>, never
|
|
107
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
108
108
|
post_type: readonly ["in" | "not_in", ReadonlyArray<PostType>];
|
|
109
109
|
}>, Readonly<{
|
|
110
110
|
post_type: readonly ["in" | "not_in", ReadonlyArray<PostType>];
|
|
111
|
-
}>, never
|
|
111
|
+
}>, never, never>>]>;
|
|
112
112
|
export declare const Or: S.Struct<{
|
|
113
|
-
or: S
|
|
113
|
+
readonly or: S.$Array<S.Union<readonly [S.suspend<S.Codec<Readonly<{
|
|
114
114
|
and: ReadonlyArray<Filter>;
|
|
115
115
|
}>, Readonly<{
|
|
116
116
|
and: ReadonlyArray<Filter>;
|
|
117
|
-
}>, never
|
|
117
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
118
118
|
or: ReadonlyArray<Filter>;
|
|
119
119
|
}>, Readonly<{
|
|
120
120
|
or: ReadonlyArray<Filter>;
|
|
121
|
-
}>, never
|
|
121
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
122
122
|
list_member: readonly [ListUri, "in" | "not_in"];
|
|
123
123
|
}>, Readonly<{
|
|
124
124
|
list_member: readonly [ListUri, "in" | "not_in"];
|
|
125
|
-
}>, never
|
|
125
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
126
126
|
attribute_compare: readonly [AttributeName, AttributeComparison, AttributeValue];
|
|
127
127
|
}>, Readonly<{
|
|
128
128
|
attribute_compare: readonly [AttributeName, AttributeComparison, AttributeValue];
|
|
129
|
-
}>, never
|
|
129
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
130
130
|
regex_matches: readonly [AttributeName, string, boolean];
|
|
131
131
|
}>, Readonly<{
|
|
132
132
|
regex_matches: readonly [AttributeName, string, boolean];
|
|
133
|
-
}>, never
|
|
133
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
134
134
|
regex_negation_matches: readonly [AttributeName, string, boolean];
|
|
135
135
|
}>, Readonly<{
|
|
136
136
|
regex_negation_matches: readonly [AttributeName, string, boolean];
|
|
137
|
-
}>, never
|
|
138
|
-
regex_any: readonly [AttributeName,
|
|
137
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
138
|
+
regex_any: readonly [AttributeName, ReadonlyArray<string>, boolean, boolean];
|
|
139
139
|
}>, Readonly<{
|
|
140
|
-
regex_any: readonly [AttributeName,
|
|
141
|
-
}>, never
|
|
142
|
-
regex_none: readonly [AttributeName,
|
|
140
|
+
regex_any: readonly [AttributeName, ReadonlyArray<string>, boolean, boolean];
|
|
141
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
142
|
+
regex_none: readonly [AttributeName, ReadonlyArray<string>, boolean, boolean];
|
|
143
143
|
}>, Readonly<{
|
|
144
|
-
regex_none: readonly [AttributeName,
|
|
145
|
-
}>, never
|
|
144
|
+
regex_none: readonly [AttributeName, ReadonlyArray<string>, boolean, boolean];
|
|
145
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
146
146
|
content_moderation: readonly ["OK", ">=", number];
|
|
147
147
|
}>, Readonly<{
|
|
148
148
|
content_moderation: readonly ["OK", ">=", number];
|
|
149
|
-
}>, never
|
|
149
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
150
150
|
entity_excludes: readonly ["labels", readonly ["porn", "sexual", "nudity"]];
|
|
151
151
|
}>, Readonly<{
|
|
152
152
|
entity_excludes: readonly ["labels", readonly ["porn", "sexual", "nudity"]];
|
|
153
|
-
}>, never
|
|
153
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
154
154
|
embed_type: readonly ["==" | "!=", "video" | "image" | "link" | "post" | "gif" | "image_group"];
|
|
155
155
|
}>, Readonly<{
|
|
156
156
|
embed_type: readonly ["==" | "!=", "video" | "image" | "link" | "post" | "gif" | "image_group"];
|
|
157
|
-
}>, never
|
|
157
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
158
158
|
social_graph: readonly [string, "in" | "not_in", "follows" | "followers"];
|
|
159
159
|
}>, Readonly<{
|
|
160
160
|
social_graph: readonly [string, "in" | "not_in", "follows" | "followers"];
|
|
161
|
-
}>, never
|
|
161
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
162
162
|
post_type: readonly ["in" | "not_in", ReadonlyArray<PostType>];
|
|
163
163
|
}>, Readonly<{
|
|
164
164
|
post_type: readonly ["in" | "not_in", ReadonlyArray<PostType>];
|
|
165
|
-
}>, never
|
|
165
|
+
}>, never, never>>]>>;
|
|
166
166
|
}>;
|
|
167
167
|
export declare const And: S.Struct<{
|
|
168
|
-
and: S
|
|
168
|
+
readonly and: S.$Array<S.Union<readonly [S.suspend<S.Codec<Readonly<{
|
|
169
169
|
and: ReadonlyArray<Filter>;
|
|
170
170
|
}>, Readonly<{
|
|
171
171
|
and: ReadonlyArray<Filter>;
|
|
172
|
-
}>, never
|
|
172
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
173
173
|
or: ReadonlyArray<Filter>;
|
|
174
174
|
}>, Readonly<{
|
|
175
175
|
or: ReadonlyArray<Filter>;
|
|
176
|
-
}>, never
|
|
176
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
177
177
|
list_member: readonly [ListUri, "in" | "not_in"];
|
|
178
178
|
}>, Readonly<{
|
|
179
179
|
list_member: readonly [ListUri, "in" | "not_in"];
|
|
180
|
-
}>, never
|
|
180
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
181
181
|
attribute_compare: readonly [AttributeName, AttributeComparison, AttributeValue];
|
|
182
182
|
}>, Readonly<{
|
|
183
183
|
attribute_compare: readonly [AttributeName, AttributeComparison, AttributeValue];
|
|
184
|
-
}>, never
|
|
184
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
185
185
|
regex_matches: readonly [AttributeName, string, boolean];
|
|
186
186
|
}>, Readonly<{
|
|
187
187
|
regex_matches: readonly [AttributeName, string, boolean];
|
|
188
|
-
}>, never
|
|
188
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
189
189
|
regex_negation_matches: readonly [AttributeName, string, boolean];
|
|
190
190
|
}>, Readonly<{
|
|
191
191
|
regex_negation_matches: readonly [AttributeName, string, boolean];
|
|
192
|
-
}>, never
|
|
193
|
-
regex_any: readonly [AttributeName,
|
|
192
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
193
|
+
regex_any: readonly [AttributeName, ReadonlyArray<string>, boolean, boolean];
|
|
194
194
|
}>, Readonly<{
|
|
195
|
-
regex_any: readonly [AttributeName,
|
|
196
|
-
}>, never
|
|
197
|
-
regex_none: readonly [AttributeName,
|
|
195
|
+
regex_any: readonly [AttributeName, ReadonlyArray<string>, boolean, boolean];
|
|
196
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
197
|
+
regex_none: readonly [AttributeName, ReadonlyArray<string>, boolean, boolean];
|
|
198
198
|
}>, Readonly<{
|
|
199
|
-
regex_none: readonly [AttributeName,
|
|
200
|
-
}>, never
|
|
199
|
+
regex_none: readonly [AttributeName, ReadonlyArray<string>, boolean, boolean];
|
|
200
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
201
201
|
content_moderation: readonly ["OK", ">=", number];
|
|
202
202
|
}>, Readonly<{
|
|
203
203
|
content_moderation: readonly ["OK", ">=", number];
|
|
204
|
-
}>, never
|
|
204
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
205
205
|
entity_excludes: readonly ["labels", readonly ["porn", "sexual", "nudity"]];
|
|
206
206
|
}>, Readonly<{
|
|
207
207
|
entity_excludes: readonly ["labels", readonly ["porn", "sexual", "nudity"]];
|
|
208
|
-
}>, never
|
|
208
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
209
209
|
embed_type: readonly ["==" | "!=", "video" | "image" | "link" | "post" | "gif" | "image_group"];
|
|
210
210
|
}>, Readonly<{
|
|
211
211
|
embed_type: readonly ["==" | "!=", "video" | "image" | "link" | "post" | "gif" | "image_group"];
|
|
212
|
-
}>, never
|
|
212
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
213
213
|
social_graph: readonly [string, "in" | "not_in", "follows" | "followers"];
|
|
214
214
|
}>, Readonly<{
|
|
215
215
|
social_graph: readonly [string, "in" | "not_in", "follows" | "followers"];
|
|
216
|
-
}>, never
|
|
216
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
217
217
|
post_type: readonly ["in" | "not_in", ReadonlyArray<PostType>];
|
|
218
218
|
}>, Readonly<{
|
|
219
219
|
post_type: readonly ["in" | "not_in", ReadonlyArray<PostType>];
|
|
220
|
-
}>, never
|
|
220
|
+
}>, never, never>>]>>;
|
|
221
221
|
}>;
|
|
222
222
|
export declare const PostTypeFilter: S.Struct<{
|
|
223
|
-
post_type: S.Tuple<[S.
|
|
223
|
+
readonly post_type: S.Tuple<readonly [S.Literals<readonly ["in", "not_in"]>, S.$Array<S.Literals<readonly ["reply", "quote"]>>]>;
|
|
224
224
|
}>;
|
|
225
225
|
export declare const ListMemberFilter: S.Struct<{
|
|
226
|
-
list_member: S.Tuple<[
|
|
226
|
+
readonly list_member: S.Tuple<readonly [S.String, S.Literals<readonly ["in", "not_in"]>]>;
|
|
227
227
|
}>;
|
|
228
228
|
export declare const AttributeCompare: S.Struct<{
|
|
229
|
-
attribute_compare: S.Tuple<[S.Union<[S.Literal<
|
|
229
|
+
readonly attribute_compare: S.Tuple<readonly [S.Union<readonly [S.Literal<"text">, S.Literal<"reply">, S.Literal<"embed.images[*].alt">, S.Literal<"embed.media.images[*].alt">, S.Literal<"embed.alt">, S.Literal<"embed">, S.Literal<"embed.external.uri">, S.Literal<"embed.external.title">, S.Literal<"embed.external.description">, S.Literal<"embed.media.external.uri">, S.Literal<"embed.media.external.title">, S.Literal<"embed.media.external.description">, S.Literal<"embed.record.uri">, S.Literal<"langs[*]">, S.Literal<"labels.values[*].val">, S.Literal<"facets[*].features[*].uri">, S.Literal<"hydrated_metadata.user.did">, S.Literal<"hydrated_metadata.user.handle">, S.Literal<"hydrated_metadata.user.description">, S.Literal<"hydrated_metadata.user.display_name">, S.Literal<"hydrated_metadata.user.labels">, S.Literal<"hydrated_metadata.mentions.display_name">]>, S.Literals<readonly ["==", "!=", ">", "<", ">=", "<="]>, S.Null]>;
|
|
230
230
|
}>;
|
|
231
231
|
export declare const RegexMatches: S.Struct<{
|
|
232
|
-
regex_matches: S.Tuple<[S.Union<[S.Literal<
|
|
232
|
+
readonly regex_matches: S.Tuple<readonly [S.Union<readonly [S.Literal<"text">, S.Literal<"reply">, S.Literal<"embed.images[*].alt">, S.Literal<"embed.media.images[*].alt">, S.Literal<"embed.alt">, S.Literal<"embed">, S.Literal<"embed.external.uri">, S.Literal<"embed.external.title">, S.Literal<"embed.external.description">, S.Literal<"embed.media.external.uri">, S.Literal<"embed.media.external.title">, S.Literal<"embed.media.external.description">, S.Literal<"embed.record.uri">, S.Literal<"langs[*]">, S.Literal<"labels.values[*].val">, S.Literal<"facets[*].features[*].uri">, S.Literal<"hydrated_metadata.user.did">, S.Literal<"hydrated_metadata.user.handle">, S.Literal<"hydrated_metadata.user.description">, S.Literal<"hydrated_metadata.user.display_name">, S.Literal<"hydrated_metadata.user.labels">, S.Literal<"hydrated_metadata.mentions.display_name">]>, S.String, S.Boolean]>;
|
|
233
233
|
}>;
|
|
234
234
|
export declare const RegexNegationMatches: S.Struct<{
|
|
235
|
-
regex_negation_matches: S.Tuple<[S.Union<[S.Literal<
|
|
235
|
+
readonly regex_negation_matches: S.Tuple<readonly [S.Union<readonly [S.Literal<"text">, S.Literal<"reply">, S.Literal<"embed.images[*].alt">, S.Literal<"embed.media.images[*].alt">, S.Literal<"embed.alt">, S.Literal<"embed">, S.Literal<"embed.external.uri">, S.Literal<"embed.external.title">, S.Literal<"embed.external.description">, S.Literal<"embed.media.external.uri">, S.Literal<"embed.media.external.title">, S.Literal<"embed.media.external.description">, S.Literal<"embed.record.uri">, S.Literal<"langs[*]">, S.Literal<"labels.values[*].val">, S.Literal<"facets[*].features[*].uri">, S.Literal<"hydrated_metadata.user.did">, S.Literal<"hydrated_metadata.user.handle">, S.Literal<"hydrated_metadata.user.description">, S.Literal<"hydrated_metadata.user.display_name">, S.Literal<"hydrated_metadata.user.labels">, S.Literal<"hydrated_metadata.mentions.display_name">]>, S.String, S.Boolean]>;
|
|
236
236
|
}>;
|
|
237
237
|
export declare const TextMatchesAny: S.Struct<{
|
|
238
|
-
regex_any: S.Tuple<[S.Union<[S.Literal<
|
|
238
|
+
readonly regex_any: S.Tuple<readonly [S.Union<readonly [S.Literal<"text">, S.Literal<"reply">, S.Literal<"embed.images[*].alt">, S.Literal<"embed.media.images[*].alt">, S.Literal<"embed.alt">, S.Literal<"embed">, S.Literal<"embed.external.uri">, S.Literal<"embed.external.title">, S.Literal<"embed.external.description">, S.Literal<"embed.media.external.uri">, S.Literal<"embed.media.external.title">, S.Literal<"embed.media.external.description">, S.Literal<"embed.record.uri">, S.Literal<"langs[*]">, S.Literal<"labels.values[*].val">, S.Literal<"facets[*].features[*].uri">, S.Literal<"hydrated_metadata.user.did">, S.Literal<"hydrated_metadata.user.handle">, S.Literal<"hydrated_metadata.user.description">, S.Literal<"hydrated_metadata.user.display_name">, S.Literal<"hydrated_metadata.user.labels">, S.Literal<"hydrated_metadata.mentions.display_name">]>, S.$Array<S.String>, S.Boolean, S.Boolean]>;
|
|
239
239
|
}>;
|
|
240
240
|
export declare const TextMatchesNone: S.Struct<{
|
|
241
|
-
regex_none: S.Tuple<[S.Union<[S.Literal<
|
|
241
|
+
readonly regex_none: S.Tuple<readonly [S.Union<readonly [S.Literal<"text">, S.Literal<"reply">, S.Literal<"embed.images[*].alt">, S.Literal<"embed.media.images[*].alt">, S.Literal<"embed.alt">, S.Literal<"embed">, S.Literal<"embed.external.uri">, S.Literal<"embed.external.title">, S.Literal<"embed.external.description">, S.Literal<"embed.media.external.uri">, S.Literal<"embed.media.external.title">, S.Literal<"embed.media.external.description">, S.Literal<"embed.record.uri">, S.Literal<"langs[*]">, S.Literal<"labels.values[*].val">, S.Literal<"facets[*].features[*].uri">, S.Literal<"hydrated_metadata.user.did">, S.Literal<"hydrated_metadata.user.handle">, S.Literal<"hydrated_metadata.user.description">, S.Literal<"hydrated_metadata.user.display_name">, S.Literal<"hydrated_metadata.user.labels">, S.Literal<"hydrated_metadata.mentions.display_name">]>, S.$Array<S.String>, S.Boolean, S.Boolean]>;
|
|
242
242
|
}>;
|
|
243
243
|
export declare const ContentModerationBlock: S.Struct<{
|
|
244
|
-
content_moderation: S.Tuple<[S.Literal<
|
|
244
|
+
readonly content_moderation: S.Tuple<readonly [S.Literal<"OK">, S.Literal<">=">, S.Number]>;
|
|
245
245
|
}>;
|
|
246
246
|
export declare const EntityExcludesLabels: S.Struct<{
|
|
247
|
-
entity_excludes: S.Tuple<[S.Literal<
|
|
247
|
+
readonly entity_excludes: S.Tuple<readonly [S.Literal<"labels">, S.Tuple<readonly [S.Literal<"porn">, S.Literal<"sexual">, S.Literal<"nudity">]>]>;
|
|
248
248
|
}>;
|
|
249
249
|
export declare const EmbedType: S.Struct<{
|
|
250
|
-
embed_type: S.Tuple<[S.
|
|
250
|
+
readonly embed_type: S.Tuple<readonly [S.Literals<readonly ["==", "!="]>, S.Literals<readonly ["video", "image", "link", "post", "gif", "image_group"]>]>;
|
|
251
251
|
}>;
|
|
252
252
|
export declare const SocialGraph: S.Struct<{
|
|
253
|
-
social_graph: S.Tuple<[
|
|
253
|
+
readonly social_graph: S.Tuple<readonly [S.String, S.Literals<readonly ["in", "not_in"]>, S.Literals<readonly ["follows", "followers"]>]>;
|
|
254
254
|
}>;
|
|
255
255
|
export declare const SortSettings: S.Struct<{
|
|
256
|
-
time_window:
|
|
257
|
-
decay_penalty:
|
|
258
|
-
like_count_multiplier:
|
|
259
|
-
reply_count_multiplier:
|
|
260
|
-
repost_count_multiplier:
|
|
261
|
-
reader_like_count_multiplier:
|
|
262
|
-
reader_reply_count_multiplier:
|
|
263
|
-
reader_repost_count_multiplier:
|
|
256
|
+
readonly time_window: S.Number;
|
|
257
|
+
readonly decay_penalty: S.Number;
|
|
258
|
+
readonly like_count_multiplier: S.Number;
|
|
259
|
+
readonly reply_count_multiplier: S.Number;
|
|
260
|
+
readonly repost_count_multiplier: S.Number;
|
|
261
|
+
readonly reader_like_count_multiplier: S.Number;
|
|
262
|
+
readonly reader_reply_count_multiplier: S.Number;
|
|
263
|
+
readonly reader_repost_count_multiplier: S.Number;
|
|
264
264
|
}>;
|
|
265
265
|
export type SortSettings = typeof SortSettings.Type;
|
|
266
|
-
export declare const DisplayName: S.
|
|
266
|
+
export declare const DisplayName: S.String;
|
|
267
267
|
export type DisplayName = typeof DisplayName.Type;
|
|
268
|
-
export declare const RecordName: S.
|
|
268
|
+
export declare const RecordName: S.String;
|
|
269
269
|
export type RecordName = typeof RecordName.Type;
|
|
270
|
-
export declare const Description: S.
|
|
270
|
+
export declare const Description: S.String;
|
|
271
271
|
export type Description = typeof Description.Type;
|
|
272
|
-
export declare const Order: S.Union<[S.Literal<
|
|
272
|
+
export declare const Order: S.Union<readonly [S.Literal<"new">, S.Literal<"trending">, S.Literal<"blend">, S.Literal<"hackernews">, S.Literal<"old">]>;
|
|
273
273
|
export type Order = typeof Order.Type;
|
|
274
|
-
export declare const FeedId:
|
|
274
|
+
export declare const FeedId: S.NumberFromString;
|
|
275
275
|
export type FeedId = typeof FeedId.Type;
|
|
276
|
-
export declare const UserId:
|
|
276
|
+
export declare const UserId: S.NumberFromString;
|
|
277
277
|
export type UserId = typeof UserId.Type;
|
|
278
278
|
export declare const AlgorithmManifest: S.Struct<{
|
|
279
|
-
filter: S.Union<[S.suspend<Readonly<{
|
|
279
|
+
readonly filter: S.Union<readonly [S.suspend<S.Codec<Readonly<{
|
|
280
280
|
and: ReadonlyArray<Filter>;
|
|
281
281
|
}>, Readonly<{
|
|
282
282
|
and: ReadonlyArray<Filter>;
|
|
283
|
-
}>, never
|
|
283
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
284
284
|
or: ReadonlyArray<Filter>;
|
|
285
285
|
}>, Readonly<{
|
|
286
286
|
or: ReadonlyArray<Filter>;
|
|
287
|
-
}>, never
|
|
287
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
288
288
|
list_member: readonly [ListUri, "in" | "not_in"];
|
|
289
289
|
}>, Readonly<{
|
|
290
290
|
list_member: readonly [ListUri, "in" | "not_in"];
|
|
291
|
-
}>, never
|
|
291
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
292
292
|
attribute_compare: readonly [AttributeName, AttributeComparison, AttributeValue];
|
|
293
293
|
}>, Readonly<{
|
|
294
294
|
attribute_compare: readonly [AttributeName, AttributeComparison, AttributeValue];
|
|
295
|
-
}>, never
|
|
295
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
296
296
|
regex_matches: readonly [AttributeName, string, boolean];
|
|
297
297
|
}>, Readonly<{
|
|
298
298
|
regex_matches: readonly [AttributeName, string, boolean];
|
|
299
|
-
}>, never
|
|
299
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
300
300
|
regex_negation_matches: readonly [AttributeName, string, boolean];
|
|
301
301
|
}>, Readonly<{
|
|
302
302
|
regex_negation_matches: readonly [AttributeName, string, boolean];
|
|
303
|
-
}>, never
|
|
304
|
-
regex_any: readonly [AttributeName,
|
|
303
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
304
|
+
regex_any: readonly [AttributeName, ReadonlyArray<string>, boolean, boolean];
|
|
305
305
|
}>, Readonly<{
|
|
306
|
-
regex_any: readonly [AttributeName,
|
|
307
|
-
}>, never
|
|
308
|
-
regex_none: readonly [AttributeName,
|
|
306
|
+
regex_any: readonly [AttributeName, ReadonlyArray<string>, boolean, boolean];
|
|
307
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
308
|
+
regex_none: readonly [AttributeName, ReadonlyArray<string>, boolean, boolean];
|
|
309
309
|
}>, Readonly<{
|
|
310
|
-
regex_none: readonly [AttributeName,
|
|
311
|
-
}>, never
|
|
310
|
+
regex_none: readonly [AttributeName, ReadonlyArray<string>, boolean, boolean];
|
|
311
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
312
312
|
content_moderation: readonly ["OK", ">=", number];
|
|
313
313
|
}>, Readonly<{
|
|
314
314
|
content_moderation: readonly ["OK", ">=", number];
|
|
315
|
-
}>, never
|
|
315
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
316
316
|
entity_excludes: readonly ["labels", readonly ["porn", "sexual", "nudity"]];
|
|
317
317
|
}>, Readonly<{
|
|
318
318
|
entity_excludes: readonly ["labels", readonly ["porn", "sexual", "nudity"]];
|
|
319
|
-
}>, never
|
|
319
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
320
320
|
embed_type: readonly ["==" | "!=", "video" | "image" | "link" | "post" | "gif" | "image_group"];
|
|
321
321
|
}>, Readonly<{
|
|
322
322
|
embed_type: readonly ["==" | "!=", "video" | "image" | "link" | "post" | "gif" | "image_group"];
|
|
323
|
-
}>, never
|
|
323
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
324
324
|
social_graph: readonly [string, "in" | "not_in", "follows" | "followers"];
|
|
325
325
|
}>, Readonly<{
|
|
326
326
|
social_graph: readonly [string, "in" | "not_in", "follows" | "followers"];
|
|
327
|
-
}>, never
|
|
327
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
328
328
|
post_type: readonly ["in" | "not_in", ReadonlyArray<PostType>];
|
|
329
329
|
}>, Readonly<{
|
|
330
330
|
post_type: readonly ["in" | "not_in", ReadonlyArray<PostType>];
|
|
331
|
-
}>, never
|
|
332
|
-
sort_settings: S.optional<S.Struct<{
|
|
333
|
-
time_window:
|
|
334
|
-
decay_penalty:
|
|
335
|
-
like_count_multiplier:
|
|
336
|
-
reply_count_multiplier:
|
|
337
|
-
repost_count_multiplier:
|
|
338
|
-
reader_like_count_multiplier:
|
|
339
|
-
reader_reply_count_multiplier:
|
|
340
|
-
reader_repost_count_multiplier:
|
|
331
|
+
}>, never, never>>]>;
|
|
332
|
+
readonly sort_settings: S.optional<S.Struct<{
|
|
333
|
+
readonly time_window: S.Number;
|
|
334
|
+
readonly decay_penalty: S.Number;
|
|
335
|
+
readonly like_count_multiplier: S.Number;
|
|
336
|
+
readonly reply_count_multiplier: S.Number;
|
|
337
|
+
readonly repost_count_multiplier: S.Number;
|
|
338
|
+
readonly reader_like_count_multiplier: S.Number;
|
|
339
|
+
readonly reader_reply_count_multiplier: S.Number;
|
|
340
|
+
readonly reader_repost_count_multiplier: S.Number;
|
|
341
341
|
}>>;
|
|
342
342
|
}>;
|
|
343
343
|
export type AlgorithmManifest = typeof AlgorithmManifest.Type;
|
|
344
344
|
export declare const Metadata: S.Struct<{
|
|
345
|
-
document: S.optional<
|
|
346
|
-
schema: S.optional<S.Struct<{
|
|
347
|
-
schemaVersion: S.Literal<
|
|
348
|
-
sequences: S
|
|
345
|
+
readonly document: S.optional<S.Unknown>;
|
|
346
|
+
readonly schema: S.optional<S.Struct<{
|
|
347
|
+
readonly schemaVersion: S.Literal<2>;
|
|
348
|
+
readonly sequences: S.$Record<S.String, S.Number>;
|
|
349
349
|
}>>;
|
|
350
|
-
session: S.optional<
|
|
350
|
+
readonly session: S.optional<S.Unknown>;
|
|
351
351
|
}>;
|
|
352
352
|
export type Metadata = typeof Metadata.Type;
|
|
353
353
|
export declare const FullForm: S.Struct<{
|
|
354
|
-
id:
|
|
355
|
-
user_id:
|
|
356
|
-
file: S.optional<
|
|
357
|
-
display_name: S.
|
|
358
|
-
record_name: S.
|
|
359
|
-
description: S.optional<S.
|
|
360
|
-
order: S.Union<[S.Literal<
|
|
361
|
-
algorithm_manifest: S.
|
|
362
|
-
readonly filter: Readonly<{
|
|
354
|
+
readonly id: S.NumberFromString;
|
|
355
|
+
readonly user_id: S.NumberFromString;
|
|
356
|
+
readonly file: S.optional<S.Unknown>;
|
|
357
|
+
readonly display_name: S.String;
|
|
358
|
+
readonly record_name: S.String;
|
|
359
|
+
readonly description: S.optional<S.String>;
|
|
360
|
+
readonly order: S.Union<readonly [S.Literal<"new">, S.Literal<"trending">, S.Literal<"blend">, S.Literal<"hackernews">, S.Literal<"old">]>;
|
|
361
|
+
readonly algorithm_manifest: S.fromJsonString<S.Struct<{
|
|
362
|
+
readonly filter: S.Union<readonly [S.suspend<S.Codec<Readonly<{
|
|
363
363
|
and: ReadonlyArray<Filter>;
|
|
364
|
-
}
|
|
364
|
+
}>, Readonly<{
|
|
365
|
+
and: ReadonlyArray<Filter>;
|
|
366
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
367
|
+
or: ReadonlyArray<Filter>;
|
|
368
|
+
}>, Readonly<{
|
|
365
369
|
or: ReadonlyArray<Filter>;
|
|
366
|
-
}
|
|
370
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
371
|
+
list_member: readonly [ListUri, "in" | "not_in"];
|
|
372
|
+
}>, Readonly<{
|
|
367
373
|
list_member: readonly [ListUri, "in" | "not_in"];
|
|
368
|
-
}
|
|
374
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
369
375
|
attribute_compare: readonly [AttributeName, AttributeComparison, AttributeValue];
|
|
370
|
-
}
|
|
376
|
+
}>, Readonly<{
|
|
377
|
+
attribute_compare: readonly [AttributeName, AttributeComparison, AttributeValue];
|
|
378
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
379
|
+
regex_matches: readonly [AttributeName, string, boolean];
|
|
380
|
+
}>, Readonly<{
|
|
371
381
|
regex_matches: readonly [AttributeName, string, boolean];
|
|
372
|
-
}
|
|
382
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
383
|
+
regex_negation_matches: readonly [AttributeName, string, boolean];
|
|
384
|
+
}>, Readonly<{
|
|
373
385
|
regex_negation_matches: readonly [AttributeName, string, boolean];
|
|
374
|
-
}
|
|
375
|
-
regex_any: readonly [AttributeName,
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
}
|
|
386
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
387
|
+
regex_any: readonly [AttributeName, ReadonlyArray<string>, boolean, boolean];
|
|
388
|
+
}>, Readonly<{
|
|
389
|
+
regex_any: readonly [AttributeName, ReadonlyArray<string>, boolean, boolean];
|
|
390
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
391
|
+
regex_none: readonly [AttributeName, ReadonlyArray<string>, boolean, boolean];
|
|
392
|
+
}>, Readonly<{
|
|
393
|
+
regex_none: readonly [AttributeName, ReadonlyArray<string>, boolean, boolean];
|
|
394
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
379
395
|
content_moderation: readonly ["OK", ">=", number];
|
|
380
|
-
}
|
|
396
|
+
}>, Readonly<{
|
|
397
|
+
content_moderation: readonly ["OK", ">=", number];
|
|
398
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
399
|
+
entity_excludes: readonly ["labels", readonly ["porn", "sexual", "nudity"]];
|
|
400
|
+
}>, Readonly<{
|
|
381
401
|
entity_excludes: readonly ["labels", readonly ["porn", "sexual", "nudity"]];
|
|
382
|
-
}
|
|
402
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
403
|
+
embed_type: readonly ["==" | "!=", "video" | "image" | "link" | "post" | "gif" | "image_group"];
|
|
404
|
+
}>, Readonly<{
|
|
383
405
|
embed_type: readonly ["==" | "!=", "video" | "image" | "link" | "post" | "gif" | "image_group"];
|
|
384
|
-
}
|
|
406
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
385
407
|
social_graph: readonly [string, "in" | "not_in", "follows" | "followers"];
|
|
386
|
-
}
|
|
408
|
+
}>, Readonly<{
|
|
409
|
+
social_graph: readonly [string, "in" | "not_in", "follows" | "followers"];
|
|
410
|
+
}>, never, never>>, S.suspend<S.Codec<Readonly<{
|
|
411
|
+
post_type: readonly ["in" | "not_in", ReadonlyArray<PostType>];
|
|
412
|
+
}>, Readonly<{
|
|
387
413
|
post_type: readonly ["in" | "not_in", ReadonlyArray<PostType>];
|
|
388
|
-
}>;
|
|
389
|
-
readonly sort_settings
|
|
390
|
-
readonly time_window:
|
|
391
|
-
readonly decay_penalty:
|
|
392
|
-
readonly like_count_multiplier:
|
|
393
|
-
readonly reply_count_multiplier:
|
|
394
|
-
readonly repost_count_multiplier:
|
|
395
|
-
readonly reader_like_count_multiplier:
|
|
396
|
-
readonly reader_reply_count_multiplier:
|
|
397
|
-
readonly reader_repost_count_multiplier:
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
metadata: S.optional<S.
|
|
401
|
-
readonly document
|
|
402
|
-
readonly schema
|
|
403
|
-
readonly schemaVersion: 2
|
|
404
|
-
readonly sequences:
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
readonly session?: unknown;
|
|
409
|
-
}, string, never>>;
|
|
414
|
+
}>, never, never>>]>;
|
|
415
|
+
readonly sort_settings: S.optional<S.Struct<{
|
|
416
|
+
readonly time_window: S.Number;
|
|
417
|
+
readonly decay_penalty: S.Number;
|
|
418
|
+
readonly like_count_multiplier: S.Number;
|
|
419
|
+
readonly reply_count_multiplier: S.Number;
|
|
420
|
+
readonly repost_count_multiplier: S.Number;
|
|
421
|
+
readonly reader_like_count_multiplier: S.Number;
|
|
422
|
+
readonly reader_reply_count_multiplier: S.Number;
|
|
423
|
+
readonly reader_repost_count_multiplier: S.Number;
|
|
424
|
+
}>>;
|
|
425
|
+
}>>;
|
|
426
|
+
readonly metadata: S.optional<S.fromJsonString<S.Struct<{
|
|
427
|
+
readonly document: S.optional<S.Unknown>;
|
|
428
|
+
readonly schema: S.optional<S.Struct<{
|
|
429
|
+
readonly schemaVersion: S.Literal<2>;
|
|
430
|
+
readonly sequences: S.$Record<S.String, S.Number>;
|
|
431
|
+
}>>;
|
|
432
|
+
readonly session: S.optional<S.Unknown>;
|
|
433
|
+
}>>>;
|
|
410
434
|
}>;
|
|
411
435
|
export type FullForm = typeof FullForm.Type;
|
|
412
436
|
export type EncodedFullForm = typeof FullForm.Encoded;
|