graze-client 0.2.3 → 0.3.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/cjs/GrazeClient.js +71 -0
- package/build/cjs/GrazeClient.js.map +1 -0
- package/build/cjs/builder.js +91 -0
- package/build/cjs/builder.js.map +1 -0
- package/build/cjs/index.js +48 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/schema/UpdateAlgorithmPayload.js +117 -0
- package/build/cjs/schema/UpdateAlgorithmPayload.js.map +1 -0
- package/build/cjs/schema/index.js +28 -0
- package/build/cjs/schema/index.js.map +1 -0
- package/build/cjs/schema/shared.js +69 -0
- package/build/cjs/schema/shared.js.map +1 -0
- package/build/dts/GrazeClient.d.ts +22 -22
- package/build/dts/builder.d.ts +42 -0
- package/build/dts/builder.d.ts.map +1 -0
- package/build/dts/schema/UpdateAlgorithmPayload.d.ts +27 -3
- package/build/dts/schema/UpdateAlgorithmPayload.d.ts.map +1 -1
- package/build/esm/GrazeClient.js +52 -58
- package/build/esm/GrazeClient.js.map +1 -1
- package/build/esm/builder.js +85 -0
- package/build/esm/builder.js.map +1 -0
- package/build/esm/index.js +35 -35
- package/build/esm/index.js.map +1 -1
- package/build/esm/schema/UpdateAlgorithmPayload.js +78 -68
- package/build/esm/schema/UpdateAlgorithmPayload.js.map +1 -1
- package/build/esm/schema/index.js.map +1 -1
- package/build/esm/schema/shared.js +51 -51
- package/build/esm/schema/shared.js.map +1 -1
- package/package.json +6 -14
- package/src/builder.ts +119 -0
- package/src/schema/UpdateAlgorithmPayload.ts +14 -2
|
@@ -1,89 +1,99 @@
|
|
|
1
1
|
import { Schema as S } from "effect";
|
|
2
2
|
// ------------------- Primitives ---------------------------------
|
|
3
3
|
export const ListUri = S.String;
|
|
4
|
-
export const AttributeName = S.Union(S.Literal("text"), S.Literal("reply"), S.Literal("embed.images[*].alt"), S.Literal("embed.alt"), S.Literal("embed"), S.Literal("embed.external.uri"), S.Literal("embed.external.title"), S.Literal("embed.external.description"));
|
|
5
|
-
export const AttributeComparison = S.Literal("==");
|
|
4
|
+
export const AttributeName = /*#__PURE__*/S.Union(/*#__PURE__*/S.Literal("text"), /*#__PURE__*/S.Literal("reply"), /*#__PURE__*/S.Literal("embed.images[*].alt"), /*#__PURE__*/S.Literal("embed.alt"), /*#__PURE__*/S.Literal("embed"), /*#__PURE__*/S.Literal("embed.external.uri"), /*#__PURE__*/S.Literal("embed.external.title"), /*#__PURE__*/S.Literal("embed.external.description"));
|
|
5
|
+
export const AttributeComparison = /*#__PURE__*/S.Literal("==", "!=", ">", "<", ">=", "<=");
|
|
6
6
|
export const AttributeValue = S.Null;
|
|
7
|
-
export const Filter = S.Union(S.suspend(() => And), S.suspend(() => Or), S.suspend(() => ListMemberFilter), S.suspend(() => AttributeCompare), S.suspend(() => RegexMatches), S.suspend(() => RegexNegationMatches), S.suspend(() => ContentModerationBlock), S.suspend(() => EntityExcludesLabels), S.suspend(() => EmbedType));
|
|
8
|
-
export const Or = S.Struct({
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
|
|
7
|
+
export const Filter = /*#__PURE__*/S.Union(/*#__PURE__*/S.suspend(() => And), /*#__PURE__*/S.suspend(() => Or), /*#__PURE__*/S.suspend(() => ListMemberFilter), /*#__PURE__*/S.suspend(() => AttributeCompare), /*#__PURE__*/S.suspend(() => RegexMatches), /*#__PURE__*/S.suspend(() => RegexNegationMatches), /*#__PURE__*/S.suspend(() => ContentModerationBlock), /*#__PURE__*/S.suspend(() => EntityExcludesLabels), /*#__PURE__*/S.suspend(() => EmbedType), /*#__PURE__*/S.suspend(() => SocialGraph));
|
|
8
|
+
export const Or = /*#__PURE__*/S.Struct({
|
|
9
|
+
or: /*#__PURE__*/S.Array(Filter)
|
|
10
|
+
});
|
|
11
|
+
export const And = /*#__PURE__*/S.Struct({
|
|
12
|
+
and: /*#__PURE__*/S.Array(Filter)
|
|
13
|
+
});
|
|
14
|
+
export const ListMemberFilter = /*#__PURE__*/S.Struct({
|
|
15
|
+
list_member: /*#__PURE__*/S.Tuple(ListUri, /*#__PURE__*/S.Literal("in", "not_in"))
|
|
16
|
+
});
|
|
17
|
+
export const AttributeCompare = /*#__PURE__*/S.Struct({
|
|
18
|
+
attribute_compare: /*#__PURE__*/S.Tuple(AttributeName, AttributeComparison, AttributeValue)
|
|
19
|
+
});
|
|
20
|
+
const RegexMatchBase = /*#__PURE__*/S.Tuple(AttributeName, /*#__PURE__*/S.String.annotations({
|
|
21
|
+
title: "Regex Pattern",
|
|
22
|
+
description: "The source of the regex pattern to match against."
|
|
23
|
+
}), /*#__PURE__*/S.Boolean.annotations({
|
|
24
|
+
title: "Case Insensitive?",
|
|
25
|
+
description: "True if the regex should be case insensitive."
|
|
22
26
|
}));
|
|
23
|
-
export const RegexMatches = S.Struct({
|
|
24
|
-
|
|
27
|
+
export const RegexMatches = /*#__PURE__*/S.Struct({
|
|
28
|
+
regex_matches: RegexMatchBase
|
|
25
29
|
});
|
|
26
|
-
export const RegexNegationMatches = S.Struct({
|
|
27
|
-
|
|
30
|
+
export const RegexNegationMatches = /*#__PURE__*/S.Struct({
|
|
31
|
+
regex_negation_matches: RegexMatchBase
|
|
28
32
|
});
|
|
29
|
-
export const ContentModerationBlock = S.Struct({
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
export const ContentModerationBlock = /*#__PURE__*/S.Struct({
|
|
34
|
+
content_moderation: /*#__PURE__*/S.Tuple(/*#__PURE__*/S.Literal("OK"), /*#__PURE__*/S.Literal(">="), /*#__PURE__*/S.Number.annotations({
|
|
35
|
+
title: "Threshold",
|
|
36
|
+
description: "The threshold for content moderation."
|
|
37
|
+
}))
|
|
34
38
|
});
|
|
35
|
-
export const EntityExcludesLabels = S.Struct({
|
|
36
|
-
|
|
39
|
+
export const EntityExcludesLabels = /*#__PURE__*/S.Struct({
|
|
40
|
+
entity_excludes: /*#__PURE__*/S.Tuple(/*#__PURE__*/S.Literal("labels"), /*#__PURE__*/S.Tuple(/*#__PURE__*/S.Literal("porn"), /*#__PURE__*/S.Literal("sexual"), /*#__PURE__*/S.Literal("nudity")))
|
|
37
41
|
});
|
|
38
|
-
export const EmbedType = S.Struct({
|
|
39
|
-
|
|
42
|
+
export const EmbedType = /*#__PURE__*/S.Struct({
|
|
43
|
+
embed_type: /*#__PURE__*/S.Tuple(/*#__PURE__*/S.Literal("==", "!="), /*#__PURE__*/S.Literal("video", "image", "link", "post", "gif", "image_group"))
|
|
44
|
+
});
|
|
45
|
+
export const SocialGraph = /*#__PURE__*/S.Struct({
|
|
46
|
+
social_graph: /*#__PURE__*/S.Tuple(S.String, /*#__PURE__*/S.Literal("in", "not_in"), /*#__PURE__*/S.Literal("follows", "followers"))
|
|
40
47
|
});
|
|
41
48
|
// ---------------------- Sort Settings -----------------------------
|
|
42
|
-
export const SortSettings = S.Struct({
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
export const SortSettings = /*#__PURE__*/S.Struct({
|
|
50
|
+
time_window: S.Number,
|
|
51
|
+
decay_penalty: S.Number,
|
|
52
|
+
like_count_multiplier: S.Number,
|
|
53
|
+
reply_count_multiplier: S.Number,
|
|
54
|
+
repost_count_multiplier: S.Number,
|
|
55
|
+
reader_like_count_multiplier: S.Number,
|
|
56
|
+
reader_reply_count_multiplier: S.Number,
|
|
57
|
+
reader_repost_count_multiplier: S.Number
|
|
51
58
|
});
|
|
52
59
|
// ---------------------- Form Data ---------------------------------
|
|
53
|
-
export const DisplayName = S.String.annotations({
|
|
54
|
-
|
|
60
|
+
export const DisplayName = /*#__PURE__*/S.String.annotations({
|
|
61
|
+
description: "The public name of the feed."
|
|
55
62
|
});
|
|
56
|
-
export const RecordName = S.String.annotations({
|
|
57
|
-
|
|
63
|
+
export const RecordName = /*#__PURE__*/S.String.annotations({
|
|
64
|
+
description: "The slug of the feed url."
|
|
58
65
|
});
|
|
59
|
-
export const Description = S.String.annotations({
|
|
60
|
-
|
|
66
|
+
export const Description = /*#__PURE__*/S.String.annotations({
|
|
67
|
+
description: "The description to be shown to users of the feed."
|
|
61
68
|
});
|
|
62
|
-
export const Order = S.Union(S.Literal("new"), S.Literal("trending"), S.Literal("blend"));
|
|
69
|
+
export const Order = /*#__PURE__*/S.Union(/*#__PURE__*/S.Literal("new"), /*#__PURE__*/S.Literal("trending"), /*#__PURE__*/S.Literal("blend"));
|
|
63
70
|
export const FeedId = S.NumberFromString;
|
|
64
71
|
export const UserId = S.NumberFromString;
|
|
65
|
-
export const AlgorithmManifest = S.Struct({
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
});
|
|
69
|
-
export const Metadata = S.Struct({
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
})
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
72
|
+
export const AlgorithmManifest = /*#__PURE__*/S.Struct({
|
|
73
|
+
filter: Filter,
|
|
74
|
+
sort_settings: /*#__PURE__*/S.optional(SortSettings)
|
|
75
|
+
});
|
|
76
|
+
export const Metadata = /*#__PURE__*/S.Struct({
|
|
77
|
+
document: /*#__PURE__*/S.optional(S.Unknown),
|
|
78
|
+
schema: /*#__PURE__*/S.optional(/*#__PURE__*/S.Struct({
|
|
79
|
+
schemaVersion: /*#__PURE__*/S.Literal(2),
|
|
80
|
+
sequences: /*#__PURE__*/S.Record({
|
|
81
|
+
key: S.String,
|
|
82
|
+
value: S.Number
|
|
83
|
+
})
|
|
84
|
+
})),
|
|
85
|
+
session: /*#__PURE__*/S.optional(S.Unknown)
|
|
86
|
+
});
|
|
87
|
+
export const FullForm = /*#__PURE__*/S.Struct({
|
|
88
|
+
id: FeedId,
|
|
89
|
+
user_id: UserId,
|
|
90
|
+
file: /*#__PURE__*/S.optional(S.Unknown),
|
|
91
|
+
display_name: DisplayName,
|
|
92
|
+
record_name: RecordName,
|
|
93
|
+
description: /*#__PURE__*/S.optional(Description),
|
|
94
|
+
order: Order,
|
|
95
|
+
algorithm_manifest: /*#__PURE__*/S.parseJson(AlgorithmManifest),
|
|
96
|
+
metadata: /*#__PURE__*/S.optional(/*#__PURE__*/S.parseJson(Metadata))
|
|
87
97
|
});
|
|
88
98
|
/**
|
|
89
99
|
* Actual structure of FormData
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateAlgorithmPayload.js","
|
|
1
|
+
{"version":3,"file":"UpdateAlgorithmPayload.js","names":["Schema","S","ListUri","String","AttributeName","Union","Literal","AttributeComparison","AttributeValue","Null","Filter","suspend","And","Or","ListMemberFilter","AttributeCompare","RegexMatches","RegexNegationMatches","ContentModerationBlock","EntityExcludesLabels","EmbedType","SocialGraph","Struct","or","Array","and","list_member","Tuple","attribute_compare","RegexMatchBase","annotations","title","description","Boolean","regex_matches","regex_negation_matches","content_moderation","Number","entity_excludes","embed_type","social_graph","SortSettings","time_window","decay_penalty","like_count_multiplier","reply_count_multiplier","repost_count_multiplier","reader_like_count_multiplier","reader_reply_count_multiplier","reader_repost_count_multiplier","DisplayName","RecordName","Description","Order","FeedId","NumberFromString","UserId","AlgorithmManifest","filter","sort_settings","optional","Metadata","document","Unknown","schema","schemaVersion","sequences","Record","key","value","session","FullForm","id","user_id","file","display_name","record_name","order","algorithm_manifest","parseJson","metadata"],"sources":["../../../src/schema/UpdateAlgorithmPayload.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,MAAM,IAAIC,CAAC,QAAQ,QAAQ;AAEpC;AAEA,OAAO,MAAMC,OAAO,GAAGD,CAAC,CAAC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;IAC3B4D,SAAS,eAAEjE,CAAC,CAACkE,MAAM,CAAC;MAAEC,GAAG,EAAEnE,CAAC,CAACE,MAAM;MAAEkE,KAAK,EAAEpE,CAAC,CAACoC;IAAM,CAAE;GACvD,CAAC,CACH;EACDiC,OAAO,eAAErE,CAAC,CAAC2D,QAAQ,CAAC3D,CAAC,CAAC8D,OAAO;CAC9B,CAAC;AAGF,OAAO,MAAMQ,QAAQ,gBAAGtE,CAAC,CAACqB,MAAM,CAAC;EAC/BkD,EAAE,EAAElB,MAAM;EACVmB,OAAO,EAAEjB,MAAM;EACfkB,IAAI,eAAEzE,CAAC,CAAC2D,QAAQ,CAAC3D,CAAC,CAAC8D,OAAO,CAAC;EAC3BY,YAAY,EAAEzB,WAAW;EACzB0B,WAAW,EAAEzB,UAAU;EACvBnB,WAAW,eAAE/B,CAAC,CAAC2D,QAAQ,CAACR,WAAW,CAAC;EACpCyB,KAAK,EAAExB,KAAK;EACZyB,kBAAkB,eAAE7E,CAAC,CAAC8E,SAAS,CAACtB,iBAAiB,CAAC;EAClDuB,QAAQ,eAAE/E,CAAC,CAAC2D,QAAQ,cAAC3D,CAAC,CAAC8E,SAAS,CAAClB,QAAQ,CAAC;CAC3C,CAAC;AAIF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/schema/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc,aAAa;AAC3B,cAAc,6BAA6B","ignoreList":[]}
|
|
@@ -1,63 +1,63 @@
|
|
|
1
1
|
import { Schema as S } from "effect";
|
|
2
|
-
export const PartialAlgorithm = S.Struct({
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
2
|
+
export const PartialAlgorithm = /*#__PURE__*/S.Struct({
|
|
3
|
+
algorithm_uri: S.String,
|
|
4
|
+
algorithm_manifest_id: /*#__PURE__*/S.Union(S.Null, S.Number),
|
|
5
|
+
draft_algorithm_manifest_id: S.Number,
|
|
6
|
+
record_name: S.String,
|
|
7
|
+
display_name: S.String,
|
|
8
|
+
description: S.String,
|
|
9
|
+
feed_did: S.String,
|
|
10
|
+
avatar_url: /*#__PURE__*/S.Union(S.String, S.Null),
|
|
11
|
+
cpm_cents: /*#__PURE__*/S.Union(S.Number, S.Null),
|
|
12
|
+
deleted: S.Boolean,
|
|
13
|
+
active: S.Boolean,
|
|
14
|
+
public: S.Boolean,
|
|
15
|
+
monetization_available: S.Boolean,
|
|
16
|
+
status: /*#__PURE__*/S.Union(S.String, S.Null),
|
|
17
|
+
unique_operator_ids: /*#__PURE__*/S.Array(S.Number),
|
|
18
|
+
user_id: S.Number,
|
|
19
|
+
id: S.Number,
|
|
20
|
+
created_at: S.DateFromString,
|
|
21
|
+
updated_at: S.DateFromString,
|
|
22
|
+
deleted_at: /*#__PURE__*/S.Union(S.DateFromString, S.Null)
|
|
23
23
|
});
|
|
24
24
|
const Stats = S.Unknown;
|
|
25
25
|
const LatestError = S.Unknown;
|
|
26
|
-
const FullAlgorithm = S.Struct({
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
const FullAlgorithm = /*#__PURE__*/S.Struct({
|
|
27
|
+
...PartialAlgorithm.fields,
|
|
28
|
+
stats: Stats,
|
|
29
|
+
latest_error: LatestError,
|
|
30
|
+
latest_compute_cycle: S.Unknown,
|
|
31
|
+
subscriber_lists: S.Unknown
|
|
32
32
|
});
|
|
33
|
-
const FullAlgorithmWithManifest = S.Struct({
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
const FullAlgorithmWithManifest = /*#__PURE__*/S.Struct({
|
|
34
|
+
...FullAlgorithm.fields,
|
|
35
|
+
draft_algorithm_manifest: S.Unknown,
|
|
36
|
+
algorithm_manifest: S.Unknown
|
|
37
37
|
});
|
|
38
|
-
export const AlgoUpdateResponse = S.Struct({
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
export const AlgoUpdateResponse = /*#__PURE__*/S.Struct({
|
|
39
|
+
message: S.String,
|
|
40
|
+
algorithm: PartialAlgorithm
|
|
41
41
|
});
|
|
42
|
-
export const GetAlgoResponse = S.parseJson(FullAlgorithmWithManifest);
|
|
43
|
-
export const HidePostBody = S.Struct({
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
export const GetAlgoResponse = /*#__PURE__*/S.parseJson(FullAlgorithmWithManifest);
|
|
43
|
+
export const HidePostBody = /*#__PURE__*/S.Struct({
|
|
44
|
+
algo_id: S.Number,
|
|
45
|
+
at_uri: S.String
|
|
46
46
|
});
|
|
47
47
|
// ----------------------- Get Algorithms Response -----------------------
|
|
48
|
-
export const AlgorithWithStats = S.Struct({
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
export const AlgorithWithStats = /*#__PURE__*/S.Struct({
|
|
49
|
+
...PartialAlgorithm.fields,
|
|
50
|
+
stats: /*#__PURE__*/S.Struct({
|
|
51
|
+
page_renders: S.Number,
|
|
52
|
+
unique_users: S.Number,
|
|
53
|
+
post_renders: S.Number
|
|
54
|
+
})
|
|
55
55
|
});
|
|
56
|
-
export const GetAlgorithmsResponse = S.Struct({
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
56
|
+
export const GetAlgorithmsResponse = /*#__PURE__*/S.Struct({
|
|
57
|
+
page: S.Number,
|
|
58
|
+
page_size: S.Number,
|
|
59
|
+
total_items: S.Number,
|
|
60
|
+
total_pages: S.Number,
|
|
61
|
+
user_algos: /*#__PURE__*/S.Array(AlgorithWithStats)
|
|
62
62
|
});
|
|
63
63
|
//# sourceMappingURL=shared.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.js","
|
|
1
|
+
{"version":3,"file":"shared.js","names":["Schema","S","PartialAlgorithm","Struct","algorithm_uri","String","algorithm_manifest_id","Union","Null","Number","draft_algorithm_manifest_id","record_name","display_name","description","feed_did","avatar_url","cpm_cents","deleted","Boolean","active","public","monetization_available","status","unique_operator_ids","Array","user_id","id","created_at","DateFromString","updated_at","deleted_at","Stats","Unknown","LatestError","FullAlgorithm","fields","stats","latest_error","latest_compute_cycle","subscriber_lists","FullAlgorithmWithManifest","draft_algorithm_manifest","algorithm_manifest","AlgoUpdateResponse","message","algorithm","GetAlgoResponse","parseJson","HidePostBody","algo_id","at_uri","AlgorithWithStats","page_renders","unique_users","post_renders","GetAlgorithmsResponse","page","page_size","total_items","total_pages","user_algos"],"sources":["../../../src/schema/shared.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,MAAM,IAAIC,CAAC,QAAQ,QAAQ;AAEpC,OAAO,MAAMC,gBAAgB,gBAAGD,CAAC,CAACE,MAAM,CAAC;EACvCC,aAAa,EAAEH,CAAC,CAACI,MAAM;EACvBC,qBAAqB,eAAEL,CAAC,CAACM,KAAK,CAACN,CAAC,CAACO,IAAI,EAAEP,CAAC,CAACQ,MAAM,CAAC;EAChDC,2BAA2B,EAAET,CAAC,CAACQ,MAAM;EACrCE,WAAW,EAAEV,CAAC,CAACI,MAAM;EACrBO,YAAY,EAAEX,CAAC,CAACI,MAAM;EACtBQ,WAAW,EAAEZ,CAAC,CAACI,MAAM;EACrBS,QAAQ,EAAEb,CAAC,CAACI,MAAM;EAClBU,UAAU,eAAEd,CAAC,CAACM,KAAK,CAACN,CAAC,CAACI,MAAM,EAAEJ,CAAC,CAACO,IAAI,CAAC;EACrCQ,SAAS,eAAEf,CAAC,CAACM,KAAK,CAACN,CAAC,CAACQ,MAAM,EAAER,CAAC,CAACO,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AACI,MAAM;EACjBwC,SAAS,EAAE3C;CACZ,CAAC;AAGF,OAAO,MAAM4C,eAAe,gBAAG7C,CAAC,CAAC8C,SAAS,CAACP,yBAAyB,CAAC;AAGrE,OAAO,MAAMQ,YAAY,gBAAG/C,CAAC,CAACE,MAAM,CAAC;EACnC8C,OAAO,EAAEhD,CAAC,CAACQ,MAAM;EACjByC,MAAM,EAAEjD,CAAC,CAACI;CACX,CAAC;AAGF;AAEA,OAAO,MAAM8C,iBAAiB,gBAAGlD,CAAC,CAACE,MAAM,CAAC;EACxC,GAAGD,gBAAgB,CAACiC,MAAM;EAC1BC,KAAK,eAAEnC,CAAC,CAACE,MAAM,CAAC;IACdiD,YAAY,EAAEnD,CAAC,CAACQ,MAAM;IACtB4C,YAAY,EAAEpD,CAAC,CAACQ,MAAM;IACtB6C,YAAY,EAAErD,CAAC,CAACQ;GACjB;CACF,CAAC;AAEF,OAAO,MAAM8C,qBAAqB,gBAAGtD,CAAC,CAACE,MAAM,CAAC;EAC5CqD,IAAI,EAAEvD,CAAC,CAACQ,MAAM;EACdgD,SAAS,EAAExD,CAAC,CAACQ,MAAM;EACnBiD,WAAW,EAAEzD,CAAC,CAACQ,MAAM;EACrBkD,WAAW,EAAE1D,CAAC,CAACQ,MAAM;EACrBmD,UAAU,eAAE3D,CAAC,CAACuB,KAAK,CAAC2B,iBAAiB;CACtC,CAAC","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graze-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "A Typescript Graze API client.",
|
|
@@ -30,6 +30,10 @@
|
|
|
30
30
|
"./schema": {
|
|
31
31
|
"import": "./build/esm/schema/index.js",
|
|
32
32
|
"types": "./build/dts/schema/index.d.ts"
|
|
33
|
+
},
|
|
34
|
+
"./builder": {
|
|
35
|
+
"import": "./build/esm/builder/index.js",
|
|
36
|
+
"types": "./build/dts/builder/index.d.ts"
|
|
33
37
|
}
|
|
34
38
|
},
|
|
35
39
|
"scripts": {
|
|
@@ -44,7 +48,7 @@
|
|
|
44
48
|
"test": "vitest",
|
|
45
49
|
"coverage": "vitest --coverage",
|
|
46
50
|
"changeset-version": "changeset version",
|
|
47
|
-
"changeset-publish": "bun build && TEST_DIST= bun vitest && changeset publish"
|
|
51
|
+
"changeset-publish": "bun run build && TEST_DIST= bun vitest --run && changeset publish"
|
|
48
52
|
},
|
|
49
53
|
"dependencies": {
|
|
50
54
|
"@effect/platform": "^0.75.1",
|
|
@@ -79,18 +83,6 @@
|
|
|
79
83
|
"typescript": "^5.6.2",
|
|
80
84
|
"vitest": "^2.0.5"
|
|
81
85
|
},
|
|
82
|
-
"effect": {
|
|
83
|
-
"generateExports": {
|
|
84
|
-
"include": [
|
|
85
|
-
"**/*.ts"
|
|
86
|
-
]
|
|
87
|
-
},
|
|
88
|
-
"generateIndex": {
|
|
89
|
-
"include": [
|
|
90
|
-
"**/*.ts"
|
|
91
|
-
]
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
86
|
"patchedDependencies": {
|
|
95
87
|
"@changesets/get-github-info@0.6.0": "patches/@changesets__get-github-info@0.6.0.patch",
|
|
96
88
|
"babel-plugin-annotate-pure-calls@0.4.0": "patches/babel-plugin-annotate-pure-calls@0.4.0.patch"
|
package/src/builder.ts
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AttributeComparison,
|
|
3
|
+
AttributeName,
|
|
4
|
+
AttributeValue,
|
|
5
|
+
ContentModerationBlock,
|
|
6
|
+
Filter,
|
|
7
|
+
ListMemberFilter,
|
|
8
|
+
RegexMatches,
|
|
9
|
+
RegexNegationMatches,
|
|
10
|
+
SocialGraph,
|
|
11
|
+
} from "./schema/index.js";
|
|
12
|
+
|
|
13
|
+
const and = (...filters: Filter[]) => {
|
|
14
|
+
const flatFilters: Filter[] = [];
|
|
15
|
+
filters.forEach((f) => {
|
|
16
|
+
if ("and" in f) {
|
|
17
|
+
// Automatically flatten nested ands.
|
|
18
|
+
flatFilters.push(...f.and);
|
|
19
|
+
} else {
|
|
20
|
+
flatFilters.push(f);
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
return { and: flatFilters };
|
|
24
|
+
};
|
|
25
|
+
const or = (...filters: Filter[]) => {
|
|
26
|
+
const flatFilters: Filter[] = [];
|
|
27
|
+
filters.forEach((f) => {
|
|
28
|
+
if ("or" in f) {
|
|
29
|
+
flatFilters.push(...f.or);
|
|
30
|
+
} else {
|
|
31
|
+
flatFilters.push(f);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
return { or: flatFilters };
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const regexMatches = (
|
|
38
|
+
attribute: RegexMatches["regex_matches"][0],
|
|
39
|
+
regex: string
|
|
40
|
+
): RegexMatches => ({
|
|
41
|
+
regex_matches: [attribute, regex, true],
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
const regexNegationMatches = (
|
|
45
|
+
attribute: RegexNegationMatches["regex_negation_matches"][0],
|
|
46
|
+
regex: string
|
|
47
|
+
): RegexNegationMatches => ({
|
|
48
|
+
regex_negation_matches: [attribute, regex, true],
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
const isListMember = (uri: string): ListMemberFilter => ({
|
|
52
|
+
list_member: [uri, "in"],
|
|
53
|
+
});
|
|
54
|
+
const isNotListMember = (uri: string): ListMemberFilter => ({
|
|
55
|
+
list_member: [uri, "not_in"],
|
|
56
|
+
});
|
|
57
|
+
const socialGraph = (
|
|
58
|
+
identifier: string,
|
|
59
|
+
op: SocialGraph["social_graph"][1],
|
|
60
|
+
relation: SocialGraph["social_graph"][2]
|
|
61
|
+
): SocialGraph => ({
|
|
62
|
+
social_graph: [identifier, op, relation],
|
|
63
|
+
});
|
|
64
|
+
const posterIsFollowedBy = (identifier: string) =>
|
|
65
|
+
socialGraph(identifier, "in", "followers");
|
|
66
|
+
const posterFollows = (identifier: string) =>
|
|
67
|
+
socialGraph(identifier, "in", "follows");
|
|
68
|
+
const posterIsNotFollowedBy = (identifier: string) =>
|
|
69
|
+
socialGraph(identifier, "not_in", "followers");
|
|
70
|
+
const posterDoesNotFollow = (identifier: string) =>
|
|
71
|
+
socialGraph(identifier, "not_in", "follows");
|
|
72
|
+
|
|
73
|
+
const hasVideo: Filter = {
|
|
74
|
+
embed_type: ["==", "video"],
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
const hasNoNSFWLabels: Filter = {
|
|
78
|
+
entity_excludes: ["labels", ["porn", "sexual", "nudity"]],
|
|
79
|
+
};
|
|
80
|
+
const attributeCompare = (
|
|
81
|
+
attr: AttributeName,
|
|
82
|
+
op: AttributeComparison,
|
|
83
|
+
value: AttributeValue
|
|
84
|
+
): Filter => ({
|
|
85
|
+
attribute_compare: [attr, op, value],
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
const isPost: Filter = attributeCompare("reply", "==", null);
|
|
89
|
+
const isReply: Filter = attributeCompare("reply", "!=", null);
|
|
90
|
+
|
|
91
|
+
const isContentOk = (threshold: number = 0.9): ContentModerationBlock => ({
|
|
92
|
+
content_moderation: ["OK", ">=", threshold],
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
export const Algo = {
|
|
96
|
+
filter: (...filters: Filter[]): { filter: Filter } => ({
|
|
97
|
+
filter: and(...filters),
|
|
98
|
+
}),
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
export const F = {
|
|
102
|
+
and,
|
|
103
|
+
or,
|
|
104
|
+
regexMatches,
|
|
105
|
+
regexNegationMatches,
|
|
106
|
+
attributeCompare,
|
|
107
|
+
isListMember,
|
|
108
|
+
isNotListMember,
|
|
109
|
+
socialGraph,
|
|
110
|
+
posterIsFollowedBy,
|
|
111
|
+
posterFollows,
|
|
112
|
+
posterIsNotFollowedBy,
|
|
113
|
+
posterDoesNotFollow,
|
|
114
|
+
hasVideo,
|
|
115
|
+
hasNoNSFWLabels,
|
|
116
|
+
isPost,
|
|
117
|
+
isReply,
|
|
118
|
+
isContentOk,
|
|
119
|
+
};
|
|
@@ -32,7 +32,8 @@ export type Filter =
|
|
|
32
32
|
| RegexNegationMatches
|
|
33
33
|
| ContentModerationBlock
|
|
34
34
|
| EntityExcludesLabels
|
|
35
|
-
| EmbedType
|
|
35
|
+
| EmbedType
|
|
36
|
+
| SocialGraph;
|
|
36
37
|
|
|
37
38
|
export type And = Readonly<{ and: ReadonlyArray<Filter> }>;
|
|
38
39
|
export type Or = Readonly<{ or: ReadonlyArray<Filter> }>;
|
|
@@ -64,6 +65,9 @@ export type EmbedType = Readonly<{
|
|
|
64
65
|
"video" | "image" | "link" | "post" | "gif" | "image_group"
|
|
65
66
|
];
|
|
66
67
|
}>;
|
|
68
|
+
export type SocialGraph = Readonly<{
|
|
69
|
+
social_graph: readonly [string, "in" | "not_in", "follows" | "followers"];
|
|
70
|
+
}>;
|
|
67
71
|
|
|
68
72
|
export const Filter = S.Union(
|
|
69
73
|
S.suspend((): S.Schema<And> => And),
|
|
@@ -74,7 +78,8 @@ export const Filter = S.Union(
|
|
|
74
78
|
S.suspend((): S.Schema<RegexNegationMatches> => RegexNegationMatches),
|
|
75
79
|
S.suspend((): S.Schema<ContentModerationBlock> => ContentModerationBlock),
|
|
76
80
|
S.suspend((): S.Schema<EntityExcludesLabels> => EntityExcludesLabels),
|
|
77
|
-
S.suspend((): S.Schema<EmbedType> => EmbedType)
|
|
81
|
+
S.suspend((): S.Schema<EmbedType> => EmbedType),
|
|
82
|
+
S.suspend((): S.Schema<SocialGraph> => SocialGraph)
|
|
78
83
|
);
|
|
79
84
|
|
|
80
85
|
export const Or = S.Struct({ or: S.Array(Filter) });
|
|
@@ -128,6 +133,13 @@ export const EmbedType = S.Struct({
|
|
|
128
133
|
S.Literal("video", "image", "link", "post", "gif", "image_group")
|
|
129
134
|
),
|
|
130
135
|
});
|
|
136
|
+
export const SocialGraph = S.Struct({
|
|
137
|
+
social_graph: S.Tuple(
|
|
138
|
+
S.String,
|
|
139
|
+
S.Literal("in", "not_in"),
|
|
140
|
+
S.Literal("follows", "followers")
|
|
141
|
+
),
|
|
142
|
+
});
|
|
131
143
|
|
|
132
144
|
// ---------------------- Sort Settings -----------------------------
|
|
133
145
|
|