@devvit/protos 0.12.1-next-2025-08-25-18-37-07-407f1e009.0 → 0.12.1-next-2025-08-25-20-31-24-ed3784f8b.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/json/devvit/ui/effects/web_view/v1alpha/context.d.ts +12 -0
- package/json/devvit/ui/effects/web_view/v1alpha/context.d.ts.map +1 -1
- package/meta.min.json +9 -4
- package/package.json +4 -4
- package/protos.min.js +1 -1
- package/protos.min.js.map +3 -3
- package/schema/.snootobuf/deps/devvit/ui/effects/web_view/v1alpha/context.proto +14 -0
- package/schema/devvit/ui/effects/web_view/v1alpha/context.proto +14 -0
- package/schema/snootobuf.lock +0 -0
- package/schema/snootobuf.redditapi.lock +0 -0
- package/types/devvit/ui/effects/web_view/v1alpha/context.d.ts +21 -0
- package/types/devvit/ui/effects/web_view/v1alpha/context.d.ts.map +1 -1
- package/types/devvit/ui/effects/web_view/v1alpha/context.js +124 -0
@@ -3,6 +3,7 @@ syntax = "proto3";
|
|
3
3
|
package devvit.ui.effects.web_view.v1alpha;
|
4
4
|
|
5
5
|
import "google/protobuf/struct.proto";
|
6
|
+
import "reddit/devvit/app_permission/v1/app_permission.proto";
|
6
7
|
|
7
8
|
option go_package = "github.snooguts.net/reddit/reddit-devplatform-monorepo/go-common/generated/protos/types/devvit/ui/effects/web_view/v1alpha";
|
8
9
|
option java_package = "com.reddit.devvit.ui.effects.web_view.v1alpha";
|
@@ -40,6 +41,9 @@ message BridgeContext {
|
|
40
41
|
// `@devvit/ui-renderer` version.
|
41
42
|
SemVer shreddit_version = 8;
|
42
43
|
}
|
44
|
+
|
45
|
+
// Data required for the "run as user" feature.
|
46
|
+
AppPermissionState app_permission_state = 9;
|
43
47
|
}
|
44
48
|
|
45
49
|
/** Inline height of post. */
|
@@ -148,3 +152,13 @@ message SplashPostData {
|
|
148
152
|
reserved 6, 8;
|
149
153
|
reserved "entry_uri", "height";
|
150
154
|
}
|
155
|
+
|
156
|
+
// Data required for the "run as user" feature.
|
157
|
+
message AppPermissionState {
|
158
|
+
// If the app has been granted or revoked all the scopes.
|
159
|
+
.reddit.devvit.app_permission.v1.ConsentStatus consent_status = 1;
|
160
|
+
// Scopes that has been granted or revoked by the user.
|
161
|
+
repeated .reddit.devvit.app_permission.v1.Scope granted_scopes = 2;
|
162
|
+
// Scopes that the app has requested.
|
163
|
+
repeated .reddit.devvit.app_permission.v1.Scope requested_scopes = 3;
|
164
|
+
}
|
@@ -3,6 +3,7 @@ syntax = "proto3";
|
|
3
3
|
package devvit.ui.effects.web_view.v1alpha;
|
4
4
|
|
5
5
|
import "google/protobuf/struct.proto";
|
6
|
+
import "reddit/devvit/app_permission/v1/app_permission.proto";
|
6
7
|
|
7
8
|
option go_package = "github.snooguts.net/reddit/reddit-devplatform-monorepo/go-common/generated/protos/types/devvit/ui/effects/web_view/v1alpha";
|
8
9
|
option java_package = "com.reddit.devvit.ui.effects.web_view.v1alpha";
|
@@ -40,6 +41,9 @@ message BridgeContext {
|
|
40
41
|
// `@devvit/ui-renderer` version.
|
41
42
|
SemVer shreddit_version = 8;
|
42
43
|
}
|
44
|
+
|
45
|
+
// Data required for the "run as user" feature.
|
46
|
+
AppPermissionState app_permission_state = 9;
|
43
47
|
}
|
44
48
|
|
45
49
|
/** Inline height of post. */
|
@@ -148,3 +152,13 @@ message SplashPostData {
|
|
148
152
|
reserved 6, 8;
|
149
153
|
reserved "entry_uri", "height";
|
150
154
|
}
|
155
|
+
|
156
|
+
// Data required for the "run as user" feature.
|
157
|
+
message AppPermissionState {
|
158
|
+
// If the app has been granted or revoked all the scopes.
|
159
|
+
.reddit.devvit.app_permission.v1.ConsentStatus consent_status = 1;
|
160
|
+
// Scopes that has been granted or revoked by the user.
|
161
|
+
repeated .reddit.devvit.app_permission.v1.Scope granted_scopes = 2;
|
162
|
+
// Scopes that the app has requested.
|
163
|
+
repeated .reddit.devvit.app_permission.v1.Scope requested_scopes = 3;
|
164
|
+
}
|
package/schema/snootobuf.lock
CHANGED
Binary file
|
Binary file
|
@@ -5,6 +5,7 @@
|
|
5
5
|
* @packageDocumentation
|
6
6
|
*/
|
7
7
|
import _m0 from "protobufjs/minimal.js";
|
8
|
+
import { ConsentStatus, Scope } from "../../../../../reddit/devvit/app_permission/v1/app_permission.js";
|
8
9
|
/** The user client hosting the web view. */
|
9
10
|
export declare enum Client {
|
10
11
|
CLIENT_UNSPECIFIED = 0,
|
@@ -65,6 +66,8 @@ export interface BridgeContext {
|
|
65
66
|
nativeVersion?: NativeClientVersion | undefined;
|
66
67
|
/** `@devvit/ui-renderer` version. */
|
67
68
|
shredditVersion?: SemVer | undefined;
|
69
|
+
/** Data required for the "run as user" feature. */
|
70
|
+
appPermissionState?: AppPermissionState | undefined;
|
68
71
|
}
|
69
72
|
/** Android or iOS client version. Unavailable for web clients. */
|
70
73
|
export interface NativeClientVersion {
|
@@ -187,6 +190,15 @@ export interface SplashPostData {
|
|
187
190
|
/** Large text naming the post. Eg. `'What is this?'`. */
|
188
191
|
title?: string | undefined;
|
189
192
|
}
|
193
|
+
/** Data required for the "run as user" feature. */
|
194
|
+
export interface AppPermissionState {
|
195
|
+
/** If the app has been granted or revoked all the scopes. */
|
196
|
+
consentStatus: ConsentStatus;
|
197
|
+
/** Scopes that has been granted or revoked by the user. */
|
198
|
+
grantedScopes: Scope[];
|
199
|
+
/** Scopes that the app has requested. */
|
200
|
+
requestedScopes: Scope[];
|
201
|
+
}
|
190
202
|
export declare const BridgeContext: {
|
191
203
|
$type: "devvit.ui.effects.web_view.v1alpha.BridgeContext";
|
192
204
|
encode(message: BridgeContext, writer?: _m0.Writer): _m0.Writer;
|
@@ -259,6 +271,15 @@ export declare const SplashPostData: {
|
|
259
271
|
create(base?: DeepPartial<SplashPostData>): SplashPostData;
|
260
272
|
fromPartial(object: DeepPartial<SplashPostData>): SplashPostData;
|
261
273
|
};
|
274
|
+
export declare const AppPermissionState: {
|
275
|
+
$type: "devvit.ui.effects.web_view.v1alpha.AppPermissionState";
|
276
|
+
encode(message: AppPermissionState, writer?: _m0.Writer): _m0.Writer;
|
277
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): AppPermissionState;
|
278
|
+
fromJSON(object: any): AppPermissionState;
|
279
|
+
toJSON(message: AppPermissionState): unknown;
|
280
|
+
create(base?: DeepPartial<AppPermissionState>): AppPermissionState;
|
281
|
+
fromPartial(object: DeepPartial<AppPermissionState>): AppPermissionState;
|
282
|
+
};
|
262
283
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
263
284
|
type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
264
285
|
[K in keyof T]?: DeepPartial<T[K]>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../../../../src/types/devvit/ui/effects/web_view/v1alpha/context.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,GAAG,MAAM,uBAAuB,CAAC;
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../../../../src/types/devvit/ui/effects/web_view/v1alpha/context.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,GAAG,MAAM,uBAAuB,CAAC;AAExC,OAAO,EACL,aAAa,EAGb,KAAK,EAGN,MAAM,kEAAkE,CAAC;AAG1E,4CAA4C;AAC5C,oBAAY,MAAM;IAChB,kBAAkB,IAAI;IACtB,OAAO,IAAI;IACX,GAAG,IAAI;IACP,QAAQ,IAAI;IACZ,YAAY,KAAK;CAClB;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,GAAG,GAAG,MAAM,CAmBlD;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAcnD;AAED;;;;GAIG;AACH,oBAAY,MAAM;IAChB,kBAAkB,IAAI;IACtB,OA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../../../../../google/protobuf/struct.js";
|
10
|
+
import { consentStatusFromJSON, consentStatusToJSON, scopeFromJSON, scopeToJSON, } from "../../../../../reddit/devvit/app_permission/v1/app_permission.js";
|
10
11
|
import { messageTypeRegistry } from "../../../../../typeRegistry.js";
|
11
12
|
/** The user client hosting the web view. */
|
12
13
|
export var Client;
|
@@ -104,6 +105,7 @@ function createBaseBridgeContext() {
|
|
104
105
|
client: 0,
|
105
106
|
nativeVersion: undefined,
|
106
107
|
shredditVersion: undefined,
|
108
|
+
appPermissionState: undefined,
|
107
109
|
};
|
108
110
|
}
|
109
111
|
export const BridgeContext = {
|
@@ -133,6 +135,9 @@ export const BridgeContext = {
|
|
133
135
|
if (message.shredditVersion !== undefined) {
|
134
136
|
SemVer.encode(message.shredditVersion, writer.uint32(66).fork()).ldelim();
|
135
137
|
}
|
138
|
+
if (message.appPermissionState !== undefined) {
|
139
|
+
AppPermissionState.encode(message.appPermissionState, writer.uint32(74).fork()).ldelim();
|
140
|
+
}
|
136
141
|
return writer;
|
137
142
|
},
|
138
143
|
decode(input, length) {
|
@@ -190,6 +195,12 @@ export const BridgeContext = {
|
|
190
195
|
}
|
191
196
|
message.shredditVersion = SemVer.decode(reader, reader.uint32());
|
192
197
|
continue;
|
198
|
+
case 9:
|
199
|
+
if (tag !== 74) {
|
200
|
+
break;
|
201
|
+
}
|
202
|
+
message.appPermissionState = AppPermissionState.decode(reader, reader.uint32());
|
203
|
+
continue;
|
193
204
|
}
|
194
205
|
if ((tag & 7) === 4 || tag === 0) {
|
195
206
|
break;
|
@@ -208,6 +219,9 @@ export const BridgeContext = {
|
|
208
219
|
client: isSet(object.client) ? clientFromJSON(object.client) : 0,
|
209
220
|
nativeVersion: isSet(object.nativeVersion) ? NativeClientVersion.fromJSON(object.nativeVersion) : undefined,
|
210
221
|
shredditVersion: isSet(object.shredditVersion) ? SemVer.fromJSON(object.shredditVersion) : undefined,
|
222
|
+
appPermissionState: isSet(object.appPermissionState)
|
223
|
+
? AppPermissionState.fromJSON(object.appPermissionState)
|
224
|
+
: undefined,
|
211
225
|
};
|
212
226
|
},
|
213
227
|
toJSON(message) {
|
@@ -236,6 +250,9 @@ export const BridgeContext = {
|
|
236
250
|
if (message.shredditVersion !== undefined) {
|
237
251
|
obj.shredditVersion = SemVer.toJSON(message.shredditVersion);
|
238
252
|
}
|
253
|
+
if (message.appPermissionState !== undefined) {
|
254
|
+
obj.appPermissionState = AppPermissionState.toJSON(message.appPermissionState);
|
255
|
+
}
|
239
256
|
return obj;
|
240
257
|
},
|
241
258
|
create(base) {
|
@@ -261,6 +278,9 @@ export const BridgeContext = {
|
|
261
278
|
message.shredditVersion = (object.shredditVersion !== undefined && object.shredditVersion !== null)
|
262
279
|
? SemVer.fromPartial(object.shredditVersion)
|
263
280
|
: undefined;
|
281
|
+
message.appPermissionState = (object.appPermissionState !== undefined && object.appPermissionState !== null)
|
282
|
+
? AppPermissionState.fromPartial(object.appPermissionState)
|
283
|
+
: undefined;
|
264
284
|
return message;
|
265
285
|
},
|
266
286
|
};
|
@@ -980,6 +1000,110 @@ export const SplashPostData = {
|
|
980
1000
|
},
|
981
1001
|
};
|
982
1002
|
messageTypeRegistry.set(SplashPostData.$type, SplashPostData);
|
1003
|
+
function createBaseAppPermissionState() {
|
1004
|
+
return { consentStatus: 0, grantedScopes: [], requestedScopes: [] };
|
1005
|
+
}
|
1006
|
+
export const AppPermissionState = {
|
1007
|
+
$type: "devvit.ui.effects.web_view.v1alpha.AppPermissionState",
|
1008
|
+
encode(message, writer = _m0.Writer.create()) {
|
1009
|
+
if (message.consentStatus !== 0) {
|
1010
|
+
writer.uint32(8).int32(message.consentStatus);
|
1011
|
+
}
|
1012
|
+
writer.uint32(18).fork();
|
1013
|
+
for (const v of message.grantedScopes) {
|
1014
|
+
writer.int32(v);
|
1015
|
+
}
|
1016
|
+
writer.ldelim();
|
1017
|
+
writer.uint32(26).fork();
|
1018
|
+
for (const v of message.requestedScopes) {
|
1019
|
+
writer.int32(v);
|
1020
|
+
}
|
1021
|
+
writer.ldelim();
|
1022
|
+
return writer;
|
1023
|
+
},
|
1024
|
+
decode(input, length) {
|
1025
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
1026
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
1027
|
+
const message = createBaseAppPermissionState();
|
1028
|
+
while (reader.pos < end) {
|
1029
|
+
const tag = reader.uint32();
|
1030
|
+
switch (tag >>> 3) {
|
1031
|
+
case 1:
|
1032
|
+
if (tag !== 8) {
|
1033
|
+
break;
|
1034
|
+
}
|
1035
|
+
message.consentStatus = reader.int32();
|
1036
|
+
continue;
|
1037
|
+
case 2:
|
1038
|
+
if (tag === 16) {
|
1039
|
+
message.grantedScopes.push(reader.int32());
|
1040
|
+
continue;
|
1041
|
+
}
|
1042
|
+
if (tag === 18) {
|
1043
|
+
const end2 = reader.uint32() + reader.pos;
|
1044
|
+
while (reader.pos < end2) {
|
1045
|
+
message.grantedScopes.push(reader.int32());
|
1046
|
+
}
|
1047
|
+
continue;
|
1048
|
+
}
|
1049
|
+
break;
|
1050
|
+
case 3:
|
1051
|
+
if (tag === 24) {
|
1052
|
+
message.requestedScopes.push(reader.int32());
|
1053
|
+
continue;
|
1054
|
+
}
|
1055
|
+
if (tag === 26) {
|
1056
|
+
const end2 = reader.uint32() + reader.pos;
|
1057
|
+
while (reader.pos < end2) {
|
1058
|
+
message.requestedScopes.push(reader.int32());
|
1059
|
+
}
|
1060
|
+
continue;
|
1061
|
+
}
|
1062
|
+
break;
|
1063
|
+
}
|
1064
|
+
if ((tag & 7) === 4 || tag === 0) {
|
1065
|
+
break;
|
1066
|
+
}
|
1067
|
+
reader.skipType(tag & 7);
|
1068
|
+
}
|
1069
|
+
return message;
|
1070
|
+
},
|
1071
|
+
fromJSON(object) {
|
1072
|
+
return {
|
1073
|
+
consentStatus: isSet(object.consentStatus) ? consentStatusFromJSON(object.consentStatus) : 0,
|
1074
|
+
grantedScopes: globalThis.Array.isArray(object?.grantedScopes)
|
1075
|
+
? object.grantedScopes.map((e) => scopeFromJSON(e))
|
1076
|
+
: [],
|
1077
|
+
requestedScopes: globalThis.Array.isArray(object?.requestedScopes)
|
1078
|
+
? object.requestedScopes.map((e) => scopeFromJSON(e))
|
1079
|
+
: [],
|
1080
|
+
};
|
1081
|
+
},
|
1082
|
+
toJSON(message) {
|
1083
|
+
const obj = {};
|
1084
|
+
if (message.consentStatus !== 0) {
|
1085
|
+
obj.consentStatus = consentStatusToJSON(message.consentStatus);
|
1086
|
+
}
|
1087
|
+
if (message.grantedScopes?.length) {
|
1088
|
+
obj.grantedScopes = message.grantedScopes.map((e) => scopeToJSON(e));
|
1089
|
+
}
|
1090
|
+
if (message.requestedScopes?.length) {
|
1091
|
+
obj.requestedScopes = message.requestedScopes.map((e) => scopeToJSON(e));
|
1092
|
+
}
|
1093
|
+
return obj;
|
1094
|
+
},
|
1095
|
+
create(base) {
|
1096
|
+
return AppPermissionState.fromPartial(base ?? {});
|
1097
|
+
},
|
1098
|
+
fromPartial(object) {
|
1099
|
+
const message = createBaseAppPermissionState();
|
1100
|
+
message.consentStatus = object.consentStatus ?? 0;
|
1101
|
+
message.grantedScopes = object.grantedScopes?.map((e) => e) || [];
|
1102
|
+
message.requestedScopes = object.requestedScopes?.map((e) => e) || [];
|
1103
|
+
return message;
|
1104
|
+
},
|
1105
|
+
};
|
1106
|
+
messageTypeRegistry.set(AppPermissionState.$type, AppPermissionState);
|
983
1107
|
function isObject(value) {
|
984
1108
|
return typeof value === "object" && value !== null;
|
985
1109
|
}
|