@devvit/protos 0.11.20-next-2025-07-23-18-31-30-344ac3734.0 → 0.11.20-next-2025-07-23-19-34-14-05e5ea9c7.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.
@@ -5,6 +5,16 @@
5
5
  * @packageDocumentation
6
6
  */
7
7
  import _m0 from "protobufjs/minimal.js";
8
+ /** The user client hosting the web view. */
9
+ export declare enum Client {
10
+ CLIENT_UNSPECIFIED = 0,
11
+ ANDROID = 1,
12
+ IOS = 2,
13
+ SHREDDIT = 3,
14
+ UNRECOGNIZED = -1
15
+ }
16
+ export declare function clientFromJSON(object: any): Client;
17
+ export declare function clientToJSON(object: Client): number;
8
18
  /**
9
19
  * Initialization data sent from the client (Shreddit, Android, iOS) to the
10
20
  * web view.
@@ -38,6 +48,32 @@ export interface BridgeContext {
38
48
  * window (eg, `reddit.com?devvitdebug=...`).
39
49
  */
40
50
  devvitDebug: string;
51
+ client: Client;
52
+ nativeVersion?: NativeClientVersion | undefined;
53
+ /** `@devvit/ui-renderer` version. */
54
+ shredditVersion?: SemVer | undefined;
55
+ }
56
+ /** Android or iOS client version. Unavailable for web clients. */
57
+ export interface NativeClientVersion {
58
+ /** Year built. Eg, `2025`. */
59
+ yyyy: number;
60
+ /** Release number starting from 1 as the first release in January. Eg, `1`. */
61
+ release: number;
62
+ /** Release attempt. Eg, `0`. */
63
+ attempt: number;
64
+ /** Build number. Eg, `2417036`. */
65
+ number: number;
66
+ }
67
+ /** Semantic version major, minor, and patch number. */
68
+ export interface SemVer {
69
+ /** Major version. Eg, `1`. */
70
+ major: number;
71
+ /** Minor version. Eg, `2`. */
72
+ minor: number;
73
+ /** Patch version. Eg, `3`. */
74
+ patch: number;
75
+ /** Original version string. */
76
+ version: string;
41
77
  }
42
78
  /** @deprecated */
43
79
  export interface WebViewContext {
@@ -104,6 +140,24 @@ export declare const BridgeContext: {
104
140
  create(base?: DeepPartial<BridgeContext>): BridgeContext;
105
141
  fromPartial(object: DeepPartial<BridgeContext>): BridgeContext;
106
142
  };
143
+ export declare const NativeClientVersion: {
144
+ $type: "devvit.ui.effects.web_view.v1alpha.NativeClientVersion";
145
+ encode(message: NativeClientVersion, writer?: _m0.Writer): _m0.Writer;
146
+ decode(input: _m0.Reader | Uint8Array, length?: number): NativeClientVersion;
147
+ fromJSON(object: any): NativeClientVersion;
148
+ toJSON(message: NativeClientVersion): unknown;
149
+ create(base?: DeepPartial<NativeClientVersion>): NativeClientVersion;
150
+ fromPartial(object: DeepPartial<NativeClientVersion>): NativeClientVersion;
151
+ };
152
+ export declare const SemVer: {
153
+ $type: "devvit.ui.effects.web_view.v1alpha.SemVer";
154
+ encode(message: SemVer, writer?: _m0.Writer): _m0.Writer;
155
+ decode(input: _m0.Reader | Uint8Array, length?: number): SemVer;
156
+ fromJSON(object: any): SemVer;
157
+ toJSON(message: SemVer): unknown;
158
+ create(base?: DeepPartial<SemVer>): SemVer;
159
+ fromPartial(object: DeepPartial<SemVer>): SemVer;
160
+ };
107
161
  export declare const WebViewContext: {
108
162
  $type: "devvit.ui.effects.web_view.v1alpha.WebViewContext";
109
163
  encode(message: WebViewContext, writer?: _m0.Writer): _m0.Writer;
@@ -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;AAIxC;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IACtC,UAAU,CAAC,EACP,UAAU,GACV,SAAS,CAAC;IACd;;;;OAIG;IACH,cAAc,CAAC,EACX,cAAc,GACd,SAAS,CAAC;IACd;;;;;;OAMG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,kB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AAG,CAAC,GACvC,CAAC,SAAS,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GACtE,CAAC,SAAS,aAAa,CAAC,MAAM,CAAC,CAAC,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GAChE,CAAC,SAAS,EAAE,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GACrD,OAAO,CAAC,CAAC,CAAC,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;AAIxC,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;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IACtC,UAAU,CAAC,EACP,UAAU,GACV,SAAS,CAAC;IACd;;;;OAIG;IACH,cAAc,CAAC,EACX,cAAc,GACd,SAAS,CAAC;IACd;;;;;;OAMG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EACV,mBAAmB,GACnB,SAAS,CAAC;IACd,qCAAqC;IACrC,eAAe,CAAC,EAAE,MAAM,GAAG,S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C,CAAC,GACtE,CAAC,SAAS,aAAa,CAAC,MAAM,CAAC,CAAC,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GAChE,CAAC,SAAS,EAAE,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GACrD,OAAO,CAAC,CAAC,CAAC,CAAC"}
@@ -8,8 +8,61 @@
8
8
  import _m0 from "protobufjs/minimal.js";
9
9
  import { Struct } from "../../../../../google/protobuf/struct.js";
10
10
  import { messageTypeRegistry } from "../../../../../typeRegistry.js";
11
+ /** The user client hosting the web view. */
12
+ export var Client;
13
+ (function (Client) {
14
+ Client[Client["CLIENT_UNSPECIFIED"] = 0] = "CLIENT_UNSPECIFIED";
15
+ Client[Client["ANDROID"] = 1] = "ANDROID";
16
+ Client[Client["IOS"] = 2] = "IOS";
17
+ Client[Client["SHREDDIT"] = 3] = "SHREDDIT";
18
+ Client[Client["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
19
+ })(Client || (Client = {}));
20
+ export function clientFromJSON(object) {
21
+ switch (object) {
22
+ case 0:
23
+ case "CLIENT_UNSPECIFIED":
24
+ return Client.CLIENT_UNSPECIFIED;
25
+ case 1:
26
+ case "ANDROID":
27
+ return Client.ANDROID;
28
+ case 2:
29
+ case "IOS":
30
+ return Client.IOS;
31
+ case 3:
32
+ case "SHREDDIT":
33
+ return Client.SHREDDIT;
34
+ case -1:
35
+ case "UNRECOGNIZED":
36
+ default:
37
+ return Client.UNRECOGNIZED;
38
+ }
39
+ }
40
+ export function clientToJSON(object) {
41
+ switch (object) {
42
+ case Client.CLIENT_UNSPECIFIED:
43
+ return 0;
44
+ case Client.ANDROID:
45
+ return 1;
46
+ case Client.IOS:
47
+ return 2;
48
+ case Client.SHREDDIT:
49
+ return 3;
50
+ case Client.UNRECOGNIZED:
51
+ default:
52
+ return -1;
53
+ }
54
+ }
11
55
  function createBaseBridgeContext() {
12
- return { postData: undefined, shareParam: undefined, webViewContext: undefined, webbitToken: "", devvitDebug: "" };
56
+ return {
57
+ postData: undefined,
58
+ shareParam: undefined,
59
+ webViewContext: undefined,
60
+ webbitToken: "",
61
+ devvitDebug: "",
62
+ client: 0,
63
+ nativeVersion: undefined,
64
+ shredditVersion: undefined,
65
+ };
13
66
  }
14
67
  export const BridgeContext = {
15
68
  $type: "devvit.ui.effects.web_view.v1alpha.BridgeContext",
@@ -29,6 +82,15 @@ export const BridgeContext = {
29
82
  if (message.devvitDebug !== "") {
30
83
  writer.uint32(42).string(message.devvitDebug);
31
84
  }
85
+ if (message.client !== 0) {
86
+ writer.uint32(48).int32(message.client);
87
+ }
88
+ if (message.nativeVersion !== undefined) {
89
+ NativeClientVersion.encode(message.nativeVersion, writer.uint32(58).fork()).ldelim();
90
+ }
91
+ if (message.shredditVersion !== undefined) {
92
+ SemVer.encode(message.shredditVersion, writer.uint32(66).fork()).ldelim();
93
+ }
32
94
  return writer;
33
95
  },
34
96
  decode(input, length) {
@@ -68,6 +130,24 @@ export const BridgeContext = {
68
130
  }
69
131
  message.devvitDebug = reader.string();
70
132
  continue;
133
+ case 6:
134
+ if (tag !== 48) {
135
+ break;
136
+ }
137
+ message.client = reader.int32();
138
+ continue;
139
+ case 7:
140
+ if (tag !== 58) {
141
+ break;
142
+ }
143
+ message.nativeVersion = NativeClientVersion.decode(reader, reader.uint32());
144
+ continue;
145
+ case 8:
146
+ if (tag !== 66) {
147
+ break;
148
+ }
149
+ message.shredditVersion = SemVer.decode(reader, reader.uint32());
150
+ continue;
71
151
  }
72
152
  if ((tag & 7) === 4 || tag === 0) {
73
153
  break;
@@ -83,6 +163,9 @@ export const BridgeContext = {
83
163
  webViewContext: isSet(object.webViewContext) ? WebViewContext.fromJSON(object.webViewContext) : undefined,
84
164
  webbitToken: isSet(object.webbitToken) ? globalThis.String(object.webbitToken) : "",
85
165
  devvitDebug: isSet(object.devvitDebug) ? globalThis.String(object.devvitDebug) : "",
166
+ client: isSet(object.client) ? clientFromJSON(object.client) : 0,
167
+ nativeVersion: isSet(object.nativeVersion) ? NativeClientVersion.fromJSON(object.nativeVersion) : undefined,
168
+ shredditVersion: isSet(object.shredditVersion) ? SemVer.fromJSON(object.shredditVersion) : undefined,
86
169
  };
87
170
  },
88
171
  toJSON(message) {
@@ -102,6 +185,15 @@ export const BridgeContext = {
102
185
  if (message.devvitDebug !== "") {
103
186
  obj.devvitDebug = message.devvitDebug;
104
187
  }
188
+ if (message.client !== 0) {
189
+ obj.client = clientToJSON(message.client);
190
+ }
191
+ if (message.nativeVersion !== undefined) {
192
+ obj.nativeVersion = NativeClientVersion.toJSON(message.nativeVersion);
193
+ }
194
+ if (message.shredditVersion !== undefined) {
195
+ obj.shredditVersion = SemVer.toJSON(message.shredditVersion);
196
+ }
105
197
  return obj;
106
198
  },
107
199
  create(base) {
@@ -120,10 +212,209 @@ export const BridgeContext = {
120
212
  : undefined;
121
213
  message.webbitToken = object.webbitToken ?? "";
122
214
  message.devvitDebug = object.devvitDebug ?? "";
215
+ message.client = object.client ?? 0;
216
+ message.nativeVersion = (object.nativeVersion !== undefined && object.nativeVersion !== null)
217
+ ? NativeClientVersion.fromPartial(object.nativeVersion)
218
+ : undefined;
219
+ message.shredditVersion = (object.shredditVersion !== undefined && object.shredditVersion !== null)
220
+ ? SemVer.fromPartial(object.shredditVersion)
221
+ : undefined;
123
222
  return message;
124
223
  },
125
224
  };
126
225
  messageTypeRegistry.set(BridgeContext.$type, BridgeContext);
226
+ function createBaseNativeClientVersion() {
227
+ return { yyyy: 0, release: 0, attempt: 0, number: 0 };
228
+ }
229
+ export const NativeClientVersion = {
230
+ $type: "devvit.ui.effects.web_view.v1alpha.NativeClientVersion",
231
+ encode(message, writer = _m0.Writer.create()) {
232
+ if (message.yyyy !== 0) {
233
+ writer.uint32(8).int32(message.yyyy);
234
+ }
235
+ if (message.release !== 0) {
236
+ writer.uint32(16).int32(message.release);
237
+ }
238
+ if (message.attempt !== 0) {
239
+ writer.uint32(24).int32(message.attempt);
240
+ }
241
+ if (message.number !== 0) {
242
+ writer.uint32(32).int32(message.number);
243
+ }
244
+ return writer;
245
+ },
246
+ decode(input, length) {
247
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
248
+ let end = length === undefined ? reader.len : reader.pos + length;
249
+ const message = createBaseNativeClientVersion();
250
+ while (reader.pos < end) {
251
+ const tag = reader.uint32();
252
+ switch (tag >>> 3) {
253
+ case 1:
254
+ if (tag !== 8) {
255
+ break;
256
+ }
257
+ message.yyyy = reader.int32();
258
+ continue;
259
+ case 2:
260
+ if (tag !== 16) {
261
+ break;
262
+ }
263
+ message.release = reader.int32();
264
+ continue;
265
+ case 3:
266
+ if (tag !== 24) {
267
+ break;
268
+ }
269
+ message.attempt = reader.int32();
270
+ continue;
271
+ case 4:
272
+ if (tag !== 32) {
273
+ break;
274
+ }
275
+ message.number = reader.int32();
276
+ continue;
277
+ }
278
+ if ((tag & 7) === 4 || tag === 0) {
279
+ break;
280
+ }
281
+ reader.skipType(tag & 7);
282
+ }
283
+ return message;
284
+ },
285
+ fromJSON(object) {
286
+ return {
287
+ yyyy: isSet(object.yyyy) ? globalThis.Number(object.yyyy) : 0,
288
+ release: isSet(object.release) ? globalThis.Number(object.release) : 0,
289
+ attempt: isSet(object.attempt) ? globalThis.Number(object.attempt) : 0,
290
+ number: isSet(object.number) ? globalThis.Number(object.number) : 0,
291
+ };
292
+ },
293
+ toJSON(message) {
294
+ const obj = {};
295
+ if (message.yyyy !== 0) {
296
+ obj.yyyy = Math.round(message.yyyy);
297
+ }
298
+ if (message.release !== 0) {
299
+ obj.release = Math.round(message.release);
300
+ }
301
+ if (message.attempt !== 0) {
302
+ obj.attempt = Math.round(message.attempt);
303
+ }
304
+ if (message.number !== 0) {
305
+ obj.number = Math.round(message.number);
306
+ }
307
+ return obj;
308
+ },
309
+ create(base) {
310
+ return NativeClientVersion.fromPartial(base ?? {});
311
+ },
312
+ fromPartial(object) {
313
+ const message = createBaseNativeClientVersion();
314
+ message.yyyy = object.yyyy ?? 0;
315
+ message.release = object.release ?? 0;
316
+ message.attempt = object.attempt ?? 0;
317
+ message.number = object.number ?? 0;
318
+ return message;
319
+ },
320
+ };
321
+ messageTypeRegistry.set(NativeClientVersion.$type, NativeClientVersion);
322
+ function createBaseSemVer() {
323
+ return { major: 0, minor: 0, patch: 0, version: "" };
324
+ }
325
+ export const SemVer = {
326
+ $type: "devvit.ui.effects.web_view.v1alpha.SemVer",
327
+ encode(message, writer = _m0.Writer.create()) {
328
+ if (message.major !== 0) {
329
+ writer.uint32(8).int32(message.major);
330
+ }
331
+ if (message.minor !== 0) {
332
+ writer.uint32(16).int32(message.minor);
333
+ }
334
+ if (message.patch !== 0) {
335
+ writer.uint32(24).int32(message.patch);
336
+ }
337
+ if (message.version !== "") {
338
+ writer.uint32(34).string(message.version);
339
+ }
340
+ return writer;
341
+ },
342
+ decode(input, length) {
343
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
344
+ let end = length === undefined ? reader.len : reader.pos + length;
345
+ const message = createBaseSemVer();
346
+ while (reader.pos < end) {
347
+ const tag = reader.uint32();
348
+ switch (tag >>> 3) {
349
+ case 1:
350
+ if (tag !== 8) {
351
+ break;
352
+ }
353
+ message.major = reader.int32();
354
+ continue;
355
+ case 2:
356
+ if (tag !== 16) {
357
+ break;
358
+ }
359
+ message.minor = reader.int32();
360
+ continue;
361
+ case 3:
362
+ if (tag !== 24) {
363
+ break;
364
+ }
365
+ message.patch = reader.int32();
366
+ continue;
367
+ case 4:
368
+ if (tag !== 34) {
369
+ break;
370
+ }
371
+ message.version = reader.string();
372
+ continue;
373
+ }
374
+ if ((tag & 7) === 4 || tag === 0) {
375
+ break;
376
+ }
377
+ reader.skipType(tag & 7);
378
+ }
379
+ return message;
380
+ },
381
+ fromJSON(object) {
382
+ return {
383
+ major: isSet(object.major) ? globalThis.Number(object.major) : 0,
384
+ minor: isSet(object.minor) ? globalThis.Number(object.minor) : 0,
385
+ patch: isSet(object.patch) ? globalThis.Number(object.patch) : 0,
386
+ version: isSet(object.version) ? globalThis.String(object.version) : "",
387
+ };
388
+ },
389
+ toJSON(message) {
390
+ const obj = {};
391
+ if (message.major !== 0) {
392
+ obj.major = Math.round(message.major);
393
+ }
394
+ if (message.minor !== 0) {
395
+ obj.minor = Math.round(message.minor);
396
+ }
397
+ if (message.patch !== 0) {
398
+ obj.patch = Math.round(message.patch);
399
+ }
400
+ if (message.version !== "") {
401
+ obj.version = message.version;
402
+ }
403
+ return obj;
404
+ },
405
+ create(base) {
406
+ return SemVer.fromPartial(base ?? {});
407
+ },
408
+ fromPartial(object) {
409
+ const message = createBaseSemVer();
410
+ message.major = object.major ?? 0;
411
+ message.minor = object.minor ?? 0;
412
+ message.patch = object.patch ?? 0;
413
+ message.version = object.version ?? "";
414
+ return message;
415
+ },
416
+ };
417
+ messageTypeRegistry.set(SemVer.$type, SemVer);
127
418
  function createBaseWebViewContext() {
128
419
  return { subredditId: "", subredditName: "", userId: "", appName: "", appVersion: "", postId: "" };
129
420
  }