@devvit/protos 0.11.1-next-2024-10-17-5b38dbbd6.0 → 0.11.1-next-2024-10-18-af9e73134.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 (42) hide show
  1. package/package.json +4 -4
  2. package/schema/devvit/gql/subreddit_manifest.proto +89 -0
  3. package/schema/devvit/gql/subreddit_metadata.proto +11 -0
  4. package/schema/devvit/plugin/builder/builder.proto +5 -1
  5. package/schema/devvit/plugin/buildpack/buildpack_common.proto +5 -2
  6. package/schema/devvit/runtime/bundle.proto +8 -0
  7. package/schema/snootobuf.devenv.lock +2623 -507
  8. package/schema/snootobuf.lock +2066 -136
  9. package/schema/snootobuf.redditapi.lock +2065 -136
  10. package/schema/snootobuf.ts.lock +2066 -136
  11. package/types/devvit/dev_portal/dev_portal.d.ts +4 -0
  12. package/types/devvit/dev_portal/dev_portal.d.ts.map +1 -1
  13. package/types/devvit/gateway/resolvers.d.ts +2 -0
  14. package/types/devvit/gateway/resolvers.d.ts.map +1 -1
  15. package/types/devvit/gql/subreddit_manifest.d.ts +148 -0
  16. package/types/devvit/gql/subreddit_manifest.d.ts.map +1 -0
  17. package/types/devvit/gql/subreddit_manifest.js +702 -0
  18. package/types/devvit/gql/subreddit_metadata.d.ts +3 -0
  19. package/types/devvit/gql/subreddit_metadata.d.ts.map +1 -1
  20. package/types/devvit/plugin/builder/builder.d.ts +2 -1
  21. package/types/devvit/plugin/builder/builder.d.ts.map +1 -1
  22. package/types/devvit/plugin/builder/builder.js +12 -15
  23. package/types/devvit/plugin/buildpack/buildpack.d.ts +12 -8
  24. package/types/devvit/plugin/buildpack/buildpack.d.ts.map +1 -1
  25. package/types/devvit/plugin/buildpack/buildpack_common.d.ts +2 -2
  26. package/types/devvit/plugin/buildpack/buildpack_common.d.ts.map +1 -1
  27. package/types/devvit/plugin/buildpack/buildpack_common.js +10 -12
  28. package/types/devvit/plugin/linker/linker.d.ts +2 -0
  29. package/types/devvit/plugin/linker/linker.d.ts.map +1 -1
  30. package/types/devvit/plugin/linker/resolver.d.ts +2 -0
  31. package/types/devvit/plugin/linker/resolver.d.ts.map +1 -1
  32. package/types/devvit/runtime/actor/bootstrap.d.ts +2 -0
  33. package/types/devvit/runtime/actor/bootstrap.d.ts.map +1 -1
  34. package/types/devvit/runtime/actor/runtime.d.ts +2 -0
  35. package/types/devvit/runtime/actor/runtime.d.ts.map +1 -1
  36. package/types/devvit/runtime/actor/supervisor.d.ts +2 -0
  37. package/types/devvit/runtime/actor/supervisor.d.ts.map +1 -1
  38. package/types/devvit/runtime/bundle.d.ts +10 -0
  39. package/types/devvit/runtime/bundle.d.ts.map +1 -1
  40. package/types/devvit/runtime/bundle.js +47 -1
  41. package/types/devvit/service/bundle_service.d.ts +4 -0
  42. package/types/devvit/service/bundle_service.d.ts.map +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devvit/protos",
3
- "version": "0.11.1-next-2024-10-17-5b38dbbd6.0",
3
+ "version": "0.11.1-next-2024-10-18-af9e73134.0",
4
4
  "license": "BSD-3-Clause",
5
5
  "repository": {
6
6
  "type": "git",
@@ -45,8 +45,8 @@
45
45
  },
46
46
  "devDependencies": {
47
47
  "@ampproject/filesize": "4.3.0",
48
- "@devvit/repo-tools": "0.11.1-next-2024-10-17-5b38dbbd6.0",
49
- "@devvit/tsconfig": "0.11.1-next-2024-10-17-5b38dbbd6.0",
48
+ "@devvit/repo-tools": "0.11.1-next-2024-10-18-af9e73134.0",
49
+ "@devvit/tsconfig": "0.11.1-next-2024-10-18-af9e73134.0",
50
50
  "@protobuf-ts/plugin": "2.9.3",
51
51
  "@types/long": "4.0.2",
52
52
  "chokidar-cli": "3.0.0",
@@ -80,5 +80,5 @@
80
80
  ]
81
81
  }
82
82
  },
83
- "gitHead": "59a2a08980359342e7e0c681c97fc27aac2e8ac1"
83
+ "gitHead": "e53dc77180038ee9f2d9570834eb3b2bee9d30b4"
84
84
  }
@@ -0,0 +1,89 @@
1
+ syntax = "proto3";
2
+
3
+ package devvit.gql;
4
+
5
+ // These types correspond to the GraphQL schemas defined in graphql-go/subgraph/devplatform.
6
+ // These are not used for over-the-wire proto serialization, only for type checking.
7
+
8
+ option go_package = "github.snooguts.net/reddit/reddit-devplatform-monorepo/go-common/generated/protos/types/devvit/gql";
9
+ option java_package = "com.reddit.devvit.gql";
10
+
11
+ // Type returned by GraphQL when requesting a Subreddit with the `devvit` field
12
+ message DevvitSubredditManifest {
13
+ // List of all context actions available in the Subreddit
14
+ repeated DevvitContextActions context_actions = 1;
15
+ // List of all app installations in the Subreddit
16
+ repeated DevvitInstallation installations = 2;
17
+ }
18
+
19
+ message DevvitContextActions {
20
+ repeated DevvitContextAction actions = 1;
21
+ // Installation hostname these context actions correspond to, e.g. '7c65897c-d3d1-4070-9db3-25402e093d37.sf-local-app.main.devvit-gateway.reddit.com'
22
+ string hostname = 2;
23
+ }
24
+
25
+ message DevvitContextAction {
26
+ // Which contexts this action should be displayed in
27
+ repeated DevvitContextType context_types = 1;
28
+ // Short, user-facing secondary text to describe what this action is going to do
29
+ string description = 2;
30
+ string id = 3;
31
+ // Whether this action should be displayed for only app-created posts
32
+ bool is_only_for_app_created_posts = 4;
33
+ // User-visible name for the action
34
+ string name = 5;
35
+ // What kind of user can see this action
36
+ repeated DevvitUserType user_types = 6;
37
+ }
38
+
39
+ enum DevvitContextType {
40
+ POST = 0;
41
+ COMMENT = 1;
42
+ SUBREDDIT = 2;
43
+ }
44
+
45
+ enum DevvitUserType {
46
+ MODERATOR = 0;
47
+ MEMBER = 1;
48
+ LOGGED_OUT = 2;
49
+ }
50
+
51
+ message DevvitInstallation {
52
+ // Application config
53
+ DevvitApp app = 1;
54
+ // Hostname to invoke this application at, e.g. '7c65897c-d3d1-4070-9db3-25402e093d37.sf-local-app.main.devvit-gateway.reddit.com'
55
+ string hostname = 2;
56
+ // Installation unique identifier as a UUID
57
+ string id = 3;
58
+ // Version of @devvit/public-api this app was built against, e.g. '0.10.24' or '0.11.0-next-2024-08-28-c7054fdb3.0'
59
+ string public_api_version = 4;
60
+ }
61
+
62
+ message DevvitApp {
63
+ // App unique identifier as a UUID
64
+ string id = 1;
65
+ // Human readable name for the app, e.g. 'My Devvit App'
66
+ string name = 2;
67
+ // Redditor who created this app.
68
+ Redditor owner = 3;
69
+ // App slug, e.g. 'my-devvit-app'
70
+ string slug = 4;
71
+ // Developer-provided app version, e.g. '1.0.0'
72
+ string version = 5;
73
+ // Visibility of the app
74
+ DevvitAppVisibility visibility = 6;
75
+ }
76
+
77
+ // Reddit user type from GraphQL. This has more fields in GraphQL, but
78
+ // this represents the ones we're populating from the GQL/Devvit integration.
79
+ message Redditor {
80
+ // t2_* userid
81
+ string id = 1;
82
+ string display_name = 2;
83
+ }
84
+
85
+ enum DevvitAppVisibility {
86
+ PUBLIC = 0;
87
+ PRIVATE = 1;
88
+ UNLISTED = 2;
89
+ }
@@ -8,7 +8,16 @@ import "devvit/runtime/bundle.proto";
8
8
  option go_package = "github.snooguts.net/reddit/reddit-devplatform-monorepo/go-common/generated/protos/types/devvit/gql";
9
9
  option java_package = "com.reddit.devvit.gql";
10
10
 
11
+ // THESE TYPES ARE DEPRECATED.
12
+ //
13
+ // This file contains types for the Subreddit.devPlatformMetadata field, which is (as of 2024Q4)
14
+ // the old way to fetch Devvit metadata for a subreddit.
15
+ //
16
+ // For the newer types, see subreddit_manifest.proto.
17
+
11
18
  message SubredditContextActions {
19
+ option deprecated = true;
20
+
12
21
  // LinkedBundle.hostname
13
22
  string actor_hostname = 1;
14
23
  // Return value from ContextAction.GetActions()
@@ -20,6 +29,8 @@ message SubredditContextActions {
20
29
  // base64-encoded in Subreddit.devPlatformMetadata
21
30
  // ([ex](https://gql.reddit.com/?queryGz=eJw1y7EKg0AMANBfKTfpct07dnOoCH5AiU2kES8JXizIcf9eF5e3vZL3aSNE9k5mfR49JGrk5BGyk31JlPFt%2BxTaEmNUuY1XKEi%2FYQWfdUsvckBwaBIn8sPODmYrf8BZ5b5kldDWWv89vSpI&operationName=)).
22
31
  message DevvitSubredditMetadata {
32
+ option deprecated = true;
33
+
23
34
  message AppInfo {
24
35
  // Unique identifier
25
36
  string slug = 1;
@@ -8,9 +8,13 @@ import "devvit/runtime/bundle.proto";
8
8
  option go_package = "github.snooguts.net/reddit/reddit-devplatform-monorepo/go-common/generated/protos/types/devvit/plugin/builder";
9
9
 
10
10
  message BuildResponse {
11
- devvit.runtime.LinkedBundle bundle = 1;
11
+ // Compiled bundles, differentiated by TargetRuntime
12
+ repeated devvit.runtime.LinkedBundle bundles = 4;
12
13
  repeated devvit.plugin.buildpack.CompileLog errors = 2;
13
14
  repeated devvit.plugin.buildpack.CompileLog warnings = 3;
15
+
16
+ reserved 1;
17
+ reserved "bundle";
14
18
  }
15
19
 
16
20
  service Builder {
@@ -111,10 +111,13 @@ message CompileLogLineDetail {
111
111
  }
112
112
 
113
113
  message CompileResponse {
114
- // This bundle may be present even when the build was erroneous.
115
- Bundle bundle = 1;
114
+ // Compiled bundles, differentiated by TargetRuntime
115
+ repeated Bundle bundles = 4;
116
116
  repeated CompileLog errors = 2;
117
117
  repeated CompileLog warnings = 3;
118
+
119
+ reserved 1;
120
+ reserved "bundle";
118
121
  }
119
122
 
120
123
  enum Minify {
@@ -124,6 +124,12 @@ message LinkedBundle {
124
124
  map<string, string> products = 11;
125
125
  }
126
126
 
127
+ enum TargetRuntime {
128
+ UNIVERSAL = 0;
129
+ CLIENT = 1;
130
+ // SERVER = 2;
131
+ }
132
+
127
133
  // Detail about the tooling used to construct a LinkedBundle.
128
134
  message BuildInfo {
129
135
  // When the LinkedBundle was built.
@@ -134,4 +140,6 @@ message BuildInfo {
134
140
  // @devvit/public-api → 4.5.6
135
141
  // node → 7.8.9
136
142
  map<string, string> dependencies = 2;
143
+ // Where the bundle can be executed
144
+ TargetRuntime target_runtime = 3;
137
145
  }