@devvit/protos 0.11.1-next-2024-10-14-083c5c632.0 → 0.11.1-next-2024-10-14-9dfef9528.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/index.d.ts +1 -1
- package/index.d.ts.map +1 -1
- package/index.js +1 -1
- package/meta.min.json +11 -9
- package/package.json +6 -6
- package/protos.min.js +1 -1
- package/protos.min.js.map +3 -3
- package/schema/.snootobuf/deps/devvit/data/api/v1alpha/delivery.proto +21 -2
- package/schema/.snootobuf/deps/devvit/data/api/v1alpha/filter.proto +2 -3
- package/schema/.snootobuf/deps/devvit/events/v1alpha/events.proto +36 -0
- package/schema/.snootobuf/deps/devvit/reddit/v2alpha/userv2.proto +1 -0
- package/schema/.snootobuf/deps/devvit/triggers/v1alpha/triggers.proto +9 -1
- package/schema/.snootobuf/deps/evaluator/evaluator.proto +32 -27
- package/schema/.snootobuf/deps/reddit/devvit/subreddit/v1/context_action.proto +48 -0
- package/schema/.snootobuf/deps/reddit/devvit/subreddit/v1/manifest.proto +70 -0
- package/schema/.snootobuf/deps/reddit/devvit/subreddit/v1/service.proto +11 -0
- package/schema/devvit/actor/automation/v1alpha/event_handlers.proto +8 -0
- package/schema/devvit/plugin/redditapi/newmodmail/newmodmail_svc.proto +1 -1
- package/schema/snootobuf.devenv.lock +1177 -137
- package/schema/snootobuf.lock +1179 -137
- package/schema/snootobuf.redditapi.lock +1177 -137
- package/schema/snootobuf.ts.lock +1177 -137
- package/schema/snootobuf.yaml +2 -2
- package/types/devvit/actor/automation/v1alpha/event_handlers.d.ts +415 -1
- package/types/devvit/actor/automation/v1alpha/event_handlers.d.ts.map +1 -1
- package/types/devvit/actor/automation/v1alpha/event_handlers.js +55 -1
- package/types/devvit/actor/automation/v1alpha/event_handlers.twirp-client.d.ts +33 -1
- package/types/devvit/actor/automation/v1alpha/event_handlers.twirp-client.d.ts.map +1 -1
- package/types/devvit/actor/automation/v1alpha/event_handlers.twirp-client.js +45 -1
- package/types/devvit/actor/automation/v1alpha/event_handlers.twirp.d.ts +17 -1
- package/types/devvit/actor/automation/v1alpha/event_handlers.twirp.d.ts.map +1 -1
- package/types/devvit/actor/automation/v1alpha/event_handlers.twirp.js +177 -1
- package/types/devvit/events/v1alpha/events.d.ts +32 -0
- package/types/devvit/events/v1alpha/events.d.ts.map +1 -1
- package/types/devvit/events/v1alpha/events.js +226 -0
- package/types/devvit/gateway/v1alpha/triggers.d.ts +714 -50
- package/types/devvit/gateway/v1alpha/triggers.d.ts.map +1 -1
- package/types/devvit/plugin/redditapi/newmodmail/newmodmail_svc.js +1 -1
- package/types/devvit/reddit/v2alpha/userv2.d.ts +1 -0
- package/types/devvit/reddit/v2alpha/userv2.d.ts.map +1 -1
- package/types/devvit/reddit/v2alpha/userv2.js +15 -0
- package/types/devvit/triggers/v1alpha/triggers.d.ts +4 -2
- package/types/devvit/triggers/v1alpha/triggers.d.ts.map +1 -1
- package/types/devvit/triggers/v1alpha/triggers.js +41 -1
@@ -384,6 +384,12 @@ message PostFirehose {
|
|
384
384
|
(devvit.options.trigger_evt_path) = "post.gallery_images",
|
385
385
|
(openapi.field_example) = "['http://i.redd.it/btosxb4kw47d1.jpg', 'http://i.redd.it/btosxb4kw47d1.jpg']"
|
386
386
|
];
|
387
|
+
|
388
|
+
// Whether this post has been approved. This will only be present if true
|
389
|
+
bool approved = 29 [
|
390
|
+
(devvit.options.trigger_evt_path) = "post.is_approved",
|
391
|
+
(openapi.field_example) = "true"
|
392
|
+
];
|
387
393
|
// removed fields
|
388
394
|
reserved 7, 8;
|
389
395
|
reserved "trending_score", "toxicity_score";
|
@@ -626,6 +632,7 @@ message CommentFirehose {
|
|
626
632
|
(openapi.field_example) = "/r/RedditEng/comments/1798o2e/comment/k5kbkod/"
|
627
633
|
];
|
628
634
|
// Comment element types, which can be animated-gif, img, text, link, or a combination of types, such as ['animated-gif', 'text', 'link']. Note that animated-gif and img cannot be combined.
|
635
|
+
// This field is blank for COMMENT_EDIT events. Use the element types from the original COMMENT_CREATE event.
|
629
636
|
repeated string element_types = 12 [
|
630
637
|
(devvit.options.trigger_evt_path) = "comment.element_types",
|
631
638
|
(devvit.options.im_path) = "comment.element_types",
|
@@ -683,10 +690,10 @@ message SubredditFirehose {
|
|
683
690
|
(openapi.field_example) = "true"
|
684
691
|
];
|
685
692
|
|
686
|
-
//
|
693
|
+
// The type of the subreddit: PUBLIC, RESTRICTED, USER;
|
687
694
|
devvit.reddit.v2alpha.SubredditType type = 9 [
|
688
695
|
(devvit.options.trigger_evt_path) = "subreddit.type",
|
689
|
-
(
|
696
|
+
(openapi.field_example) = "PUBLIC"
|
690
697
|
];
|
691
698
|
|
692
699
|
// removed fields
|
@@ -748,6 +755,18 @@ message UserFirehose {
|
|
748
755
|
(openapi.field_example) = "Dog lover, foodie, and tech enthusiast."
|
749
756
|
];
|
750
757
|
|
758
|
+
// Whether this user has been banned. This will only be present if true
|
759
|
+
bool banned = 13 [
|
760
|
+
(devvit.options.trigger_evt_path) = "user.banned",
|
761
|
+
(openapi.field_example) = "true"
|
762
|
+
];
|
763
|
+
|
764
|
+
// Whether this user has been suspended. This will only be present if true
|
765
|
+
bool suspended = 14 [
|
766
|
+
(devvit.options.trigger_evt_path) = "user.suspended",
|
767
|
+
(openapi.field_example) = "true"
|
768
|
+
];
|
769
|
+
|
751
770
|
// removed fields
|
752
771
|
reserved 3, 5, 6;
|
753
772
|
reserved "account_age", "community_karma", "reputation_score";
|
@@ -36,12 +36,11 @@ message FirehoseFilterData {
|
|
36
36
|
// custom value set by our own services
|
37
37
|
bool sexually_explicit = 7;
|
38
38
|
repeated string media_ids = 8;
|
39
|
-
string language_code = 9;
|
40
39
|
string thumbnail_url = 10;
|
41
40
|
|
42
41
|
// removed fields
|
43
|
-
reserved 11;
|
44
|
-
reserved "media_object_oembed_type";
|
42
|
+
reserved 9, 11;
|
43
|
+
reserved "language_code", "media_object_oembed_type";
|
45
44
|
}
|
46
45
|
|
47
46
|
message CommentFilterData {
|
@@ -352,6 +352,42 @@ message Vote {
|
|
352
352
|
reserved "thing_id", "upvotes", "downvotes";
|
353
353
|
}
|
354
354
|
|
355
|
+
message AutomoderatorFilterPost {
|
356
|
+
option (devvit.options.trigger) = {
|
357
|
+
source: "automoderator"
|
358
|
+
action: "filter"
|
359
|
+
noun: "post"
|
360
|
+
};
|
361
|
+
|
362
|
+
devvit.reddit.v2alpha.PostV2 post = 1 [(devvit.options.v2_event_path) = "target_post.id"];
|
363
|
+
|
364
|
+
google.protobuf.Timestamp removed_at = 2 [(devvit.options.v2_event_path) = "endpoint_timestamp"];
|
365
|
+
|
366
|
+
string reason = 3 [(devvit.options.v2_event_path) = "action_info.reason"];
|
367
|
+
|
368
|
+
string author = 4 [(devvit.options.v2_event_path) = "target_user.id"];
|
369
|
+
|
370
|
+
devvit.reddit.v2alpha.SubredditV2 subreddit = 5;
|
371
|
+
}
|
372
|
+
|
373
|
+
message AutomoderatorFilterComment {
|
374
|
+
option (devvit.options.trigger) = {
|
375
|
+
source: "automoderator"
|
376
|
+
action: "filter"
|
377
|
+
noun: "comment"
|
378
|
+
};
|
379
|
+
|
380
|
+
devvit.reddit.v2alpha.CommentV2 comment = 1 [(devvit.options.v2_event_path) = "target_comment.id"];
|
381
|
+
|
382
|
+
google.protobuf.Timestamp removed_at = 2 [(devvit.options.v2_event_path) = "endpoint_timestamp"];
|
383
|
+
|
384
|
+
string reason = 3 [(devvit.options.v2_event_path) = "action_info.reason"];
|
385
|
+
|
386
|
+
string author = 4 [(devvit.options.v2_event_path) = "target_user.id"];
|
387
|
+
|
388
|
+
devvit.reddit.v2alpha.SubredditV2 subreddit = 5;
|
389
|
+
}
|
390
|
+
|
355
391
|
message PostNsfwUpdate {
|
356
392
|
option (devvit.options.trigger) = {
|
357
393
|
source: "moderator"
|
@@ -149,6 +149,14 @@ message TriggerEvent {
|
|
149
149
|
devvit.events.v1alpha.PostSpoilerUpdate spoiler_post_update = 121 [(devvit.options.deliver_to) = {
|
150
150
|
to: [GATEWAY]
|
151
151
|
}];
|
152
|
-
|
152
|
+
|
153
|
+
devvit.events.v1alpha.AutomoderatorFilterPost automoderator_filter_post = 122 [(devvit.options.deliver_to) = {
|
154
|
+
to: [GATEWAY]
|
155
|
+
}];
|
156
|
+
|
157
|
+
devvit.events.v1alpha.AutomoderatorFilterComment automoderator_filter_comment = 123 [(devvit.options.deliver_to) = {
|
158
|
+
to: [GATEWAY]
|
159
|
+
}];
|
160
|
+
// NEXT: 124
|
153
161
|
}
|
154
162
|
}
|
@@ -3,8 +3,10 @@ syntax = "proto3";
|
|
3
3
|
package evaluator;
|
4
4
|
|
5
5
|
import "devvit/data/api/v1alpha/filter.proto";
|
6
|
+
import "devvit/events/v1alpha/events.proto";
|
6
7
|
import "devvit/options/options.proto";
|
7
8
|
import "devvit/reddit/v2alpha/subredditv2.proto";
|
9
|
+
import "devvit/reddit/v2alpha/userv2.proto";
|
8
10
|
import "google/protobuf/timestamp.proto";
|
9
11
|
import "google/protobuf/wrappers.proto";
|
10
12
|
import "reddit/coreplatform/common/v1/media.proto";
|
@@ -42,7 +44,20 @@ message IntermediateModel {
|
|
42
44
|
|
43
45
|
Subreddit subreddit = 7;
|
44
46
|
FirehoseFilterData filter_data = 8;
|
45
|
-
|
47
|
+
User author = 9;
|
48
|
+
DeletedInfo delete_info = 10;
|
49
|
+
//NEXT: 11
|
50
|
+
}
|
51
|
+
|
52
|
+
message Subreddit {
|
53
|
+
string id = 1;
|
54
|
+
string name = 2;
|
55
|
+
google.protobuf.Timestamp last_hydrated = 4;
|
56
|
+
devvit.reddit.v2alpha.SubredditType type = 5;
|
57
|
+
devvit.reddit.v2alpha.SubredditRating rating = 6;
|
58
|
+
bool spam = 7;
|
59
|
+
bool quarantined = 8;
|
60
|
+
bool hydrated = 9;
|
46
61
|
}
|
47
62
|
|
48
63
|
message SafetyInfo {
|
@@ -97,12 +112,17 @@ message Comment {
|
|
97
112
|
string permalink = 9;
|
98
113
|
int32 score = 10;
|
99
114
|
bool spam = 12;
|
100
|
-
bool
|
115
|
+
bool deleted = 13;
|
101
116
|
//Used for safety
|
102
117
|
repeated string media_ids = 11;
|
118
|
+
|
103
119
|
//TODO: Add fields for filtering
|
104
120
|
}
|
105
|
-
|
121
|
+
message DeletedInfo {
|
122
|
+
google.protobuf.Timestamp deleted_at = 1;
|
123
|
+
devvit.events.v1alpha.EventSource source = 2;
|
124
|
+
devvit.events.v1alpha.DeletionReason reason = 3;
|
125
|
+
}
|
106
126
|
message FirehoseFilterData {
|
107
127
|
devvit.options.FirehoseEvent event = 1;
|
108
128
|
string subreddit_id = 2;
|
@@ -122,34 +142,18 @@ message FirehoseFilterData {
|
|
122
142
|
bool sexually_explicit = 13;
|
123
143
|
}
|
124
144
|
|
125
|
-
message
|
126
|
-
map<string, double> versions = 1;
|
127
|
-
double score = 2;
|
128
|
-
}
|
129
|
-
|
130
|
-
message Subreddit {
|
131
|
-
//Fields needed to generate a SubredditFirehose
|
145
|
+
message User {
|
132
146
|
string id = 1;
|
133
147
|
string name = 2;
|
134
|
-
bool
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
devvit.reddit.v2alpha.SubredditType subreddit_type = 7;
|
139
|
-
bool quarantined = 8;
|
140
|
-
bool spam = 9;
|
141
|
-
devvit.reddit.v2alpha.SubredditRating rating = 10;
|
148
|
+
bool spam = 3;
|
149
|
+
bool banned = 4;
|
150
|
+
bool hydrated = 5;
|
151
|
+
google.protobuf.Timestamp last_hydrated = 6;
|
142
152
|
}
|
143
153
|
|
144
|
-
message
|
145
|
-
|
146
|
-
|
147
|
-
string icon_image = 2;
|
148
|
-
string id = 3;
|
149
|
-
string karma = 4;
|
150
|
-
string name = 5;
|
151
|
-
string snoovatar_image = 6;
|
152
|
-
string url = 7;
|
154
|
+
message SafetyTag {
|
155
|
+
map<string, double> versions = 1;
|
156
|
+
double score = 2;
|
153
157
|
}
|
154
158
|
|
155
159
|
message UserFlair {
|
@@ -192,6 +196,7 @@ message Post {
|
|
192
196
|
string author_id = 28;
|
193
197
|
FirehoseFilterData filter_data = 29;
|
194
198
|
bool unlisted = 30;
|
199
|
+
bool deleted = 31;
|
195
200
|
|
196
201
|
//TODO: Add relevant fields to create a FirehoseComment
|
197
202
|
//TODO: Add fields for filtering
|
@@ -0,0 +1,48 @@
|
|
1
|
+
syntax = "proto3";
|
2
|
+
|
3
|
+
package reddit.devvit.subreddit.v1;
|
4
|
+
|
5
|
+
option go_package = "github.snooguts.net/reddit/devplatform-api/go/grpc/devvit/subreddit/v1;devvit_subreddit_manifest";
|
6
|
+
|
7
|
+
message ContextActionList {
|
8
|
+
repeated ContextActionDescription actions = 1;
|
9
|
+
}
|
10
|
+
|
11
|
+
// Describes a single action provided by an Actor
|
12
|
+
message ContextActionDescription {
|
13
|
+
// Dev-specified ID for this action to determine which one was called in OnAction
|
14
|
+
string action_id = 1;
|
15
|
+
// User-facing name for this action (i.e.: text in the overflow menu)
|
16
|
+
string name = 2;
|
17
|
+
// Short, user-facing secondary text to describe what this action is going to do
|
18
|
+
string description = 3;
|
19
|
+
// Flags to determine in which contexts this action should be displayed
|
20
|
+
ContextActionAllowedContexts contexts = 4;
|
21
|
+
// Flags to determine what kind of user can see this action
|
22
|
+
ContextActionAllowedUsers users = 5;
|
23
|
+
// Filters to apply to actions in post context
|
24
|
+
optional ContextActionPostFilters post_filters = 6;
|
25
|
+
}
|
26
|
+
|
27
|
+
// Which contexts an action should be applied to
|
28
|
+
message ContextActionAllowedContexts {
|
29
|
+
bool post = 1;
|
30
|
+
bool comment = 2;
|
31
|
+
bool subreddit = 3;
|
32
|
+
}
|
33
|
+
|
34
|
+
// Restrict access to specific user groups
|
35
|
+
message ContextActionAllowedUsers {
|
36
|
+
// Moderator only
|
37
|
+
bool moderator = 1;
|
38
|
+
// Member of the subreddit where the Actor is installed
|
39
|
+
bool member = 2;
|
40
|
+
// Logged out users can perform this action
|
41
|
+
bool logged_out = 3;
|
42
|
+
}
|
43
|
+
|
44
|
+
// Filters for post actions
|
45
|
+
message ContextActionPostFilters {
|
46
|
+
// If true, only display action for posts created by the app itself, otherwise for all posts
|
47
|
+
optional bool current_app = 1;
|
48
|
+
}
|
@@ -0,0 +1,70 @@
|
|
1
|
+
syntax = "proto3";
|
2
|
+
|
3
|
+
package reddit.devvit.subreddit.v1;
|
4
|
+
|
5
|
+
import "reddit/devvit/subreddit/v1/context_action.proto";
|
6
|
+
|
7
|
+
option go_package = "github.snooguts.net/reddit/devplatform-api/go/grpc/devvit/subreddit/v1;devvit_subreddit_manifest";
|
8
|
+
|
9
|
+
message DevvitSubredditManifestRequest {
|
10
|
+
// t5_ subreddit id, eg 't5_bogzxg'
|
11
|
+
string subreddit = 1;
|
12
|
+
}
|
13
|
+
|
14
|
+
message DevvitSubredditManifest {
|
15
|
+
// List of all context actions available in the Subreddit
|
16
|
+
repeated SubredditContextActions context_actions = 1;
|
17
|
+
// List of all app installations in the Subreddit
|
18
|
+
repeated Installation installations = 2;
|
19
|
+
repeated ErrorMessage errors = 3;
|
20
|
+
}
|
21
|
+
|
22
|
+
message SubredditContextActions {
|
23
|
+
// The hostname corresponding to the context actions, eg '7c65897c-d3d1-4070-9db3-25402e093d37.sf-local-app.main.devvit-gateway.reddit.com'
|
24
|
+
string hostname = 1;
|
25
|
+
// Return value from ContextAction.GetActions()
|
26
|
+
ContextActionList actions = 2;
|
27
|
+
}
|
28
|
+
|
29
|
+
message Installation {
|
30
|
+
// Installation unique identifier, eg 'b4d7a045-5771-410a-b8ca-bd21eb869578'
|
31
|
+
string installation_id = 1;
|
32
|
+
// The installation's public api version, eg '0.10.24' or '0.11.0-next-2024-08-28-c7054fdb3.0'
|
33
|
+
string public_api_version = 2;
|
34
|
+
// The name of the host running this installation, eg '7c65897c-d3d1-4070-9db3-25402e093d37.sf-local-app.main.devvit-gateway.reddit.com'
|
35
|
+
string hostname = 3;
|
36
|
+
// Specific information about the app in this installation
|
37
|
+
App app = 4;
|
38
|
+
}
|
39
|
+
|
40
|
+
message App {
|
41
|
+
// App unique identifier, eg '04adab23-60c0-467d-9958-948cea1ff6be'
|
42
|
+
string id = 1;
|
43
|
+
// App slug, eg 'my-devvit-app'
|
44
|
+
string slug = 2;
|
45
|
+
// App name, eg 'My Devvit App'
|
46
|
+
string name = 3;
|
47
|
+
// The visibility of the app (PUBLIC, PRIVATE, or UNLISTED)
|
48
|
+
AppVisibility visibility = 4;
|
49
|
+
// Information about the app owner
|
50
|
+
AppOwner owner = 5;
|
51
|
+
// The app version, eg '1.2.3'
|
52
|
+
string version = 6;
|
53
|
+
}
|
54
|
+
|
55
|
+
message AppOwner {
|
56
|
+
// t2_ userId of the app owner, eg 't2_11t51216bu'
|
57
|
+
string user_id = 1;
|
58
|
+
// Username of the app owner, eg 'slowcooked99'
|
59
|
+
string user_name = 2;
|
60
|
+
}
|
61
|
+
|
62
|
+
enum AppVisibility {
|
63
|
+
PUBLIC = 0;
|
64
|
+
PRIVATE = 1;
|
65
|
+
UNLISTED = 2;
|
66
|
+
}
|
67
|
+
|
68
|
+
message ErrorMessage {
|
69
|
+
string message = 1;
|
70
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
syntax = "proto3";
|
2
|
+
|
3
|
+
package reddit.devvit.subreddit.v1;
|
4
|
+
|
5
|
+
import "reddit/devvit/subreddit/v1/manifest.proto";
|
6
|
+
|
7
|
+
option go_package = "github.snooguts.net/reddit/devplatform-api/go/grpc/devvit/subreddit/v1;devvit_subreddit_manifest";
|
8
|
+
|
9
|
+
service DevvitSubredditService {
|
10
|
+
rpc GetDevvitSubredditManifest(DevvitSubredditManifestRequest) returns (DevvitSubredditManifest) {}
|
11
|
+
}
|
@@ -95,3 +95,11 @@ service OnPostNsfwUpdate {
|
|
95
95
|
service OnPostSpoilerUpdate {
|
96
96
|
rpc OnPostSpoilerUpdate(devvit.events.v1alpha.PostSpoilerUpdate) returns (HandlerResult);
|
97
97
|
}
|
98
|
+
|
99
|
+
service OnAutomoderatorFilterPost {
|
100
|
+
rpc OnAutomoderatorFilterPost(devvit.events.v1alpha.AutomoderatorFilterPost) returns (HandlerResult);
|
101
|
+
}
|
102
|
+
|
103
|
+
service OnAutomoderatorFilterComment {
|
104
|
+
rpc OnAutomoderatorFilterComment(devvit.events.v1alpha.AutomoderatorFilterComment) returns (HandlerResult);
|
105
|
+
}
|
@@ -80,7 +80,7 @@ service NewModmail {
|
|
80
80
|
rpc MuteConversation(MuteConversationRequest) returns (MuteConversationResponse) {
|
81
81
|
option (devvit.plugin.redditapi.common.api_client_config).method = 'POST';
|
82
82
|
option (devvit.plugin.redditapi.common.api_client_config).path = '/api/mod/conversations/{conversation_id}/mute';
|
83
|
-
option (devvit.plugin.redditapi.common.api_client_config).request_body_type =
|
83
|
+
option (devvit.plugin.redditapi.common.api_client_config).request_body_type = FORM_SNAKE;
|
84
84
|
}
|
85
85
|
|
86
86
|
// https://www.reddit.com/dev/api#POST_api_mod_conversations_:conversation_id_temp_ban
|