@devvit/protos 0.12.0-next-2025-03-31-fec8fadd5.0 → 0.12.0-next-2025-04-10-2ee75c532.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.
Files changed (39) hide show
  1. package/index.d.ts +2 -0
  2. package/index.d.ts.map +1 -1
  3. package/index.js +1 -0
  4. package/meta.min.json +35 -5
  5. package/package.json +5 -5
  6. package/protos.min.js +1 -1
  7. package/protos.min.js.map +4 -4
  8. package/schema/devvit/actor/webbit/webbit.proto +34 -0
  9. package/schema/devvit/dev_portal/nutrition/nutrition.proto +2 -0
  10. package/schema/devvit/plugin/useractions/useractions.proto +18 -0
  11. package/schema/devvit/ui/effects/web_view/v1alpha/post_message.proto +19 -1
  12. package/schema/snootobuf.devenv.lock +1390 -91
  13. package/schema/snootobuf.lock +1394 -91
  14. package/schema/snootobuf.redditapi.lock +1386 -91
  15. package/schema/snootobuf.ts.lock +1392 -91
  16. package/types/devvit/actor/webbit/webbit.d.ts +131 -0
  17. package/types/devvit/actor/webbit/webbit.d.ts.map +1 -0
  18. package/types/devvit/actor/webbit/webbit.js +485 -0
  19. package/types/devvit/actor/webbit/webbit.twirp-client.d.ts +19 -0
  20. package/types/devvit/actor/webbit/webbit.twirp-client.d.ts.map +1 -0
  21. package/types/devvit/actor/webbit/webbit.twirp-client.js +23 -0
  22. package/types/devvit/actor/webbit/webbit.twirp.d.ts +12 -0
  23. package/types/devvit/actor/webbit/webbit.twirp.d.ts.map +1 -0
  24. package/types/devvit/actor/webbit/webbit.twirp.js +88 -0
  25. package/types/devvit/dev_portal/nutrition/nutrition.d.ts +2 -0
  26. package/types/devvit/dev_portal/nutrition/nutrition.d.ts.map +1 -1
  27. package/types/devvit/dev_portal/nutrition/nutrition.js +7 -0
  28. package/types/devvit/plugin/useractions/useractions.d.ts +576 -0
  29. package/types/devvit/plugin/useractions/useractions.d.ts.map +1 -0
  30. package/types/devvit/plugin/useractions/useractions.js +66 -0
  31. package/types/devvit/plugin/useractions/useractions.twirp-client.d.ts +25 -0
  32. package/types/devvit/plugin/useractions/useractions.twirp-client.d.ts.map +1 -0
  33. package/types/devvit/plugin/useractions/useractions.twirp-client.js +47 -0
  34. package/types/devvit/plugin/useractions/useractions.twirp.d.ts +16 -0
  35. package/types/devvit/plugin/useractions/useractions.twirp.d.ts.map +1 -0
  36. package/types/devvit/plugin/useractions/useractions.twirp.js +222 -0
  37. package/types/devvit/ui/effects/web_view/v1alpha/post_message.d.ts +29 -0
  38. package/types/devvit/ui/effects/web_view/v1alpha/post_message.d.ts.map +1 -1
  39. package/types/devvit/ui/effects/web_view/v1alpha/post_message.js +108 -0
@@ -0,0 +1,34 @@
1
+ syntax = "proto3";
2
+
3
+ package devvit.actor.webbit;
4
+
5
+ option go_package = "github.snooguts.net/reddit/reddit-devplatform-monorepo/go-common/generated/protos/types/devvit/actor/webbit";
6
+ option java_package = "com.reddit.devvit.actor.webbit";
7
+
8
+ message WebbitHttpRequest {
9
+ HttpMethod method = 1;
10
+ string path = 2;
11
+ map<string, string> headers = 3;
12
+ bytes body = 4;
13
+ }
14
+
15
+ message WebbitHttpResponse {
16
+ int32 status_code = 1;
17
+ map<string, string> headers = 2;
18
+ bytes body = 3;
19
+ }
20
+
21
+ service WebbitServer {
22
+ rpc Request(WebbitHttpRequest) returns (WebbitHttpResponse);
23
+ }
24
+
25
+ enum HttpMethod {
26
+ HTTP_METHOD_UNSPECIFIED = 0;
27
+ POST = 1;
28
+ GET = 2;
29
+ HEAD = 3;
30
+ PUT = 4;
31
+ DELETE = 5;
32
+ PATCH = 6;
33
+ OPTIONS = 7;
34
+ }
@@ -59,4 +59,6 @@ enum NutritionCategory {
59
59
  // App can create a custom experience.
60
60
  // Note: CUSTOM_POST is a subset of UI: if CUSTOM_POST is set then UI is set also.
61
61
  CUSTOM_POST = 13;
62
+ // App may call Reddit APIs on behalf of the User.
63
+ USER_ACTIONS = 14;
62
64
  }
@@ -0,0 +1,18 @@
1
+ syntax = "proto3";
2
+
3
+ package devvit.plugin.useractions;
4
+
5
+ import "devvit/plugin/redditapi/linksandcomments/linksandcomments_msg.proto";
6
+
7
+ option go_package = "github.snooguts.net/reddit/reddit-devplatform-monorepo/go-common/generated/protos/types/devvit/plugin/useractions";
8
+ option java_package = "com.reddit.devvit.plugin.useractions";
9
+
10
+ // Service for performing actions on behalf of the User.
11
+ service UserActions {
12
+ // Submit a new Comment on behalf of the User
13
+ rpc Comment(devvit.plugin.redditapi.linksandcomments.CommentRequest) returns (devvit.plugin.redditapi.linksandcomments.JsonWrappedComment);
14
+ // Create a new Post on behalf of the User
15
+ rpc Submit(devvit.plugin.redditapi.linksandcomments.SubmitRequest) returns (devvit.plugin.redditapi.linksandcomments.SubmitResponse);
16
+ // Create a new custom Post on behalf of the User
17
+ rpc SubmitCustomPost(devvit.plugin.redditapi.linksandcomments.SubmitRequest) returns (devvit.plugin.redditapi.linksandcomments.SubmitResponse);
18
+ }
@@ -7,7 +7,25 @@ import "google/protobuf/struct.proto";
7
7
  option go_package = "github.snooguts.net/reddit/reddit-devplatform-monorepo/go-common/generated/protos/types/devvit/ui/effects/web_view/v1alpha";
8
8
  option java_package = "com.reddit.devvit.ui.effects.web_view.v1alpha";
9
9
 
10
- // Each message described here will be converted to a Struct and sent to a WebView wrapped in a WebViewPostMessage:
10
+ enum WebViewInternalMessageScope {
11
+ // Message is intended for the client only
12
+ CLIENT = 0;
13
+ }
14
+
15
+ // Internal message, sent by web-view-scripts via postMessage
16
+ // type: devvit-internal
17
+ message WebViewInternalMessage {
18
+ string type = 1;
19
+ // Scope of the message, used to determine where the message should be sent
20
+ WebViewInternalMessageScope scope = 2;
21
+
22
+ oneof options {
23
+ // Origin: devvit-analytics
24
+ google.protobuf.Struct analytics = 3;
25
+ }
26
+ }
27
+
28
+ // Each message described below here will be converted to a Struct and sent to a WebView wrapped in a WebViewPostMessage:
11
29
  // Example, sending WebViewAppMessage:
12
30
  // {
13
31
  // type: 'devvit-message',