@devvit/protos 0.11.12-next-2025-03-31-45fee5c0a.0 → 0.11.12-next-2025-03-31-566c67869.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.
@@ -4,6 +4,26 @@
4
4
  * @packageDocumentation
5
5
  */
6
6
  import _m0 from "protobufjs/minimal.js";
7
+ export declare enum WebViewInternalMessageScope {
8
+ /** CLIENT - Message is intended for the client only */
9
+ CLIENT = 0,
10
+ UNRECOGNIZED = -1
11
+ }
12
+ export declare function webViewInternalMessageScopeFromJSON(object: any): WebViewInternalMessageScope;
13
+ export declare function webViewInternalMessageScopeToJSON(object: WebViewInternalMessageScope): number;
14
+ /**
15
+ * Internal message, sent by web-view-scripts via postMessage
16
+ * type: devvit-internal
17
+ */
18
+ export interface WebViewInternalMessage {
19
+ type: string;
20
+ /** Scope of the message, used to determine where the message should be sent */
21
+ scope: WebViewInternalMessageScope;
22
+ /** Origin: devvit-analytics */
23
+ analytics?: {
24
+ [key: string]: any;
25
+ } | undefined;
26
+ }
7
27
  /** Structure of messages sent via postMessage */
8
28
  export interface WebViewPostMessage {
9
29
  /** See comments for each message */
@@ -46,6 +66,15 @@ export interface WebViewPostMessageEffect {
46
66
  */
47
67
  state?: WebViewStateMessage | undefined;
48
68
  }
69
+ export declare const WebViewInternalMessage: {
70
+ $type: "devvit.ui.effects.web_view.v1alpha.WebViewInternalMessage";
71
+ encode(message: WebViewInternalMessage, writer?: _m0.Writer): _m0.Writer;
72
+ decode(input: _m0.Reader | Uint8Array, length?: number): WebViewInternalMessage;
73
+ fromJSON(object: any): WebViewInternalMessage;
74
+ toJSON(message: WebViewInternalMessage): unknown;
75
+ create(base?: DeepPartial<WebViewInternalMessage>): WebViewInternalMessage;
76
+ fromPartial(object: DeepPartial<WebViewInternalMessage>): WebViewInternalMessage;
77
+ };
49
78
  export declare const WebViewPostMessage: {
50
79
  $type: "devvit.ui.effects.web_view.v1alpha.WebViewPostMessage";
51
80
  encode(message: WebViewPostMessage, writer?: _m0.Writer): _m0.Writer;
@@ -1 +1 @@
1
- {"version":3,"file":"post_message.d.ts","sourceRoot":"","sources":["../../../../../../../src/types/devvit/ui/effects/web_view/v1alpha/post_message.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,GAAG,MAAM,uBAAuB,CAAC;AAIxC,iDAAiD;AACjD,MAAM,WAAW,kBAAkB;IACjC,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,0DAA0D;IAC1D,IAAI,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,SAAS,CAAC;CAC3C;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,OAAO,CAAC,EACJ,GAAG,GACH,SAAS,CAAC;IACd,0BAA0B;IAC1B,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,SAAS,CAAC;CAC5C;AAED,MAAM,WAAW,wBAAwB;IACvC,8BAA8B;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EACA,iBAAiB,GACjB,SAAS,CAAC;IACd;;;OAGG;IACH,KAAK,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAAC;CACzC;AAMD,eAAO,MAAM,kBAAkB;;oBAGb,kBAAkB,WAAU,IAAI,MAAM,GAAyB,IAAI,MAAM;kBAU3E,IAAI,MAAM,GAAG,UAAU,WAAW,MAAM,GAAG,kBAAkB;qBA8B1D,GAAG,GAAG,kBAAkB;oBAOzB,kBAAkB,GAAG,OAAO;kBAW9B,YAAY,kBAAkB,CAAC,GAAG,kBAAkB;wBAG9C,YAAY,kBAAkB,CAAC,GAAG,kBAAkB;CAMzE,CAAC;AAQF,eAAO,MA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G,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":"post_message.d.ts","sourceRoot":"","sources":["../../../../../../../src/types/devvit/ui/effects/web_view/v1alpha/post_message.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,GAAG,MAAM,uBAAuB,CAAC;AAIxC,oBAAY,2BAA2B;IACrC,uDAAuD;IACvD,MAAM,IAAI;IACV,YAAY,KAAK;CAClB;AAED,wBAAgB,mCAAmC,CAAC,MAAM,EAAE,GAAG,GAAG,2BAA2B,CAU5F;AAED,wBAAgB,iCAAiC,CAAC,MAAM,EAAE,2BAA2B,GAAG,MAAM,CAQ7F;AAED;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,+EAA+E;IAC/E,KAAK,EAAE,2BAA2B,CAAC;IACnC,+BAA+B;IAC/B,SAAS,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,SAAS,CAAC;CAChD;AAED,iDAAiD;AACjD,MAAM,WAAW,kBAAkB;IACjC,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,0DAA0D;IAC1D,IAAI,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,SAAS,CAAC;CAC3C;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,OAAO,CAAC,EACJ,GAAG,GACH,SAAS,CAAC;IACd,0BAA0B;IAC1B,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,KA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AAI,MAAM,GAAyB,IAAI,MAAM;kBAO5E,IAAI,MAAM,GAAG,UAAU,WAAW,MAAM,GAAG,mBAAmB;qBAuB3D,GAAG,GAAG,mBAAmB;oBAI1B,mBAAmB,GAAG,OAAO;kBAQ/B,YAAY,mBAAmB,CAAC,GAAG,mBAAmB;wBAGhD,YAAY,mBAAmB,CAAC,GAAG,mBAAmB;CAK3E,CAAC;AAQF,eAAO,MAAM,wBAAwB;;oBAGnB,wBAAwB,WAAU,IAAI,MAAM,GAAyB,IAAI,MAAM;kBAajF,IAAI,MAAM,GAAG,UAAU,WAAW,MAAM,GAAG,wBAAwB;qBAqChE,GAAG,GAAG,wBAAwB;oBAQ/B,wBAAwB,GAAG,OAAO;kBAcpC,YAAY,wBAAwB,CAAC,GAAG,wBAAwB;wBAG1D,YAAY,wBAAwB,CAAC,GAAG,wBAAwB;CAWrF,CAAC;AAIF,KAAK,OAAO,GAAG,IAAI,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAEpF,KAAK,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,OAAO,GAAG,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"}
@@ -7,6 +7,114 @@
7
7
  import _m0 from "protobufjs/minimal.js";
8
8
  import { Struct, Value } from "../../../../../google/protobuf/struct.js";
9
9
  import { messageTypeRegistry } from "../../../../../typeRegistry.js";
10
+ export var WebViewInternalMessageScope;
11
+ (function (WebViewInternalMessageScope) {
12
+ /** CLIENT - Message is intended for the client only */
13
+ WebViewInternalMessageScope[WebViewInternalMessageScope["CLIENT"] = 0] = "CLIENT";
14
+ WebViewInternalMessageScope[WebViewInternalMessageScope["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
15
+ })(WebViewInternalMessageScope || (WebViewInternalMessageScope = {}));
16
+ export function webViewInternalMessageScopeFromJSON(object) {
17
+ switch (object) {
18
+ case 0:
19
+ case "CLIENT":
20
+ return WebViewInternalMessageScope.CLIENT;
21
+ case -1:
22
+ case "UNRECOGNIZED":
23
+ default:
24
+ return WebViewInternalMessageScope.UNRECOGNIZED;
25
+ }
26
+ }
27
+ export function webViewInternalMessageScopeToJSON(object) {
28
+ switch (object) {
29
+ case WebViewInternalMessageScope.CLIENT:
30
+ return 0;
31
+ case WebViewInternalMessageScope.UNRECOGNIZED:
32
+ default:
33
+ return -1;
34
+ }
35
+ }
36
+ function createBaseWebViewInternalMessage() {
37
+ return { type: "", scope: 0, analytics: undefined };
38
+ }
39
+ export const WebViewInternalMessage = {
40
+ $type: "devvit.ui.effects.web_view.v1alpha.WebViewInternalMessage",
41
+ encode(message, writer = _m0.Writer.create()) {
42
+ if (message.type !== "") {
43
+ writer.uint32(10).string(message.type);
44
+ }
45
+ if (message.scope !== 0) {
46
+ writer.uint32(16).int32(message.scope);
47
+ }
48
+ if (message.analytics !== undefined) {
49
+ Struct.encode(Struct.wrap(message.analytics), writer.uint32(26).fork()).ldelim();
50
+ }
51
+ return writer;
52
+ },
53
+ decode(input, length) {
54
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
55
+ let end = length === undefined ? reader.len : reader.pos + length;
56
+ const message = createBaseWebViewInternalMessage();
57
+ while (reader.pos < end) {
58
+ const tag = reader.uint32();
59
+ switch (tag >>> 3) {
60
+ case 1:
61
+ if (tag !== 10) {
62
+ break;
63
+ }
64
+ message.type = reader.string();
65
+ continue;
66
+ case 2:
67
+ if (tag !== 16) {
68
+ break;
69
+ }
70
+ message.scope = reader.int32();
71
+ continue;
72
+ case 3:
73
+ if (tag !== 26) {
74
+ break;
75
+ }
76
+ message.analytics = Struct.unwrap(Struct.decode(reader, reader.uint32()));
77
+ continue;
78
+ }
79
+ if ((tag & 7) === 4 || tag === 0) {
80
+ break;
81
+ }
82
+ reader.skipType(tag & 7);
83
+ }
84
+ return message;
85
+ },
86
+ fromJSON(object) {
87
+ return {
88
+ type: isSet(object.type) ? globalThis.String(object.type) : "",
89
+ scope: isSet(object.scope) ? webViewInternalMessageScopeFromJSON(object.scope) : 0,
90
+ analytics: isObject(object.analytics) ? object.analytics : undefined,
91
+ };
92
+ },
93
+ toJSON(message) {
94
+ const obj = {};
95
+ if (message.type !== "") {
96
+ obj.type = message.type;
97
+ }
98
+ if (message.scope !== 0) {
99
+ obj.scope = webViewInternalMessageScopeToJSON(message.scope);
100
+ }
101
+ if (message.analytics !== undefined) {
102
+ obj.analytics = message.analytics;
103
+ }
104
+ return obj;
105
+ },
106
+ create(base) {
107
+ return WebViewInternalMessage.fromPartial(base ?? {});
108
+ },
109
+ fromPartial(object) {
110
+ const message = createBaseWebViewInternalMessage();
111
+ message.type = object.type ?? "";
112
+ message.scope = object.scope ?? 0;
113
+ message.analytics = object.analytics ?? undefined;
114
+ return message;
115
+ },
116
+ };
117
+ messageTypeRegistry.set(WebViewInternalMessage.$type, WebViewInternalMessage);
10
118
  function createBaseWebViewPostMessage() {
11
119
  return { type: "", data: undefined };
12
120
  }