@devvit/protos 0.12.1-next-2025-08-25-20-31-24-ed3784f8b.0 → 0.12.1-next-2025-08-26-17-18-36-3b47afc7a.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/post_message.d.ts +3 -2
- package/json/devvit/ui/effects/web_view/v1alpha/post_message.d.ts.map +1 -1
- package/json/devvit/ui/events/v1alpha/web_view.d.ts +19 -2
- package/json/devvit/ui/events/v1alpha/web_view.d.ts.map +1 -1
- package/meta.min.json +5 -5
- 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/post_message.proto +3 -2
- package/schema/.snootobuf/deps/devvit/ui/events/v1alpha/web_view.proto +16 -2
- package/schema/devvit/ui/effects/web_view/v1alpha/post_message.proto +3 -2
- package/schema/devvit/ui/events/v1alpha/web_view.proto +16 -2
- package/schema/snootobuf.lock +0 -0
- package/schema/snootobuf.redditapi.lock +0 -0
- package/types/devvit/ui/effects/web_view/v1alpha/post_message.d.ts +3 -2
- package/types/devvit/ui/effects/web_view/v1alpha/post_message.d.ts.map +1 -1
- package/types/devvit/ui/events/v1alpha/web_view.d.ts +37 -2
- package/types/devvit/ui/events/v1alpha/web_view.d.ts.map +1 -1
- package/types/devvit/ui/events/v1alpha/web_view.js +124 -0
@@ -50,7 +50,7 @@ message WebViewInternalMessage {
|
|
50
50
|
// }
|
51
51
|
// }
|
52
52
|
|
53
|
-
//
|
53
|
+
// Generic structure of messages sent via postMessage from WebView block
|
54
54
|
message WebViewPostMessage {
|
55
55
|
// See comments for each message
|
56
56
|
string type = 1;
|
@@ -58,7 +58,7 @@ message WebViewPostMessage {
|
|
58
58
|
google.protobuf.Struct data = 2;
|
59
59
|
}
|
60
60
|
|
61
|
-
// Arbitrary message, sent by app
|
61
|
+
// Arbitrary message, sent by block app to a WebView block
|
62
62
|
// type: devvit-message
|
63
63
|
message WebViewAppMessage {
|
64
64
|
// Any serializable value given to postMessage in a WebView
|
@@ -92,6 +92,7 @@ message WebViewStateMessage {
|
|
92
92
|
// devvit.ui.block_kit.v1beta.UIEnvironment environment = 1;
|
93
93
|
// }
|
94
94
|
|
95
|
+
// Message wrapper for messages sent by block app to a webview block
|
95
96
|
message WebViewPostMessageEffect {
|
96
97
|
// ID of the WebView block
|
97
98
|
string web_view_id = 1;
|
@@ -16,7 +16,7 @@ enum WebViewVisibility {
|
|
16
16
|
WEBVIEW_HIDDEN = 1;
|
17
17
|
}
|
18
18
|
|
19
|
-
// Fired when the content of a WebView calls window.parent.postMessage()
|
19
|
+
// Fired when the content of a WebView within a <webview> block calls window.parent.postMessage()
|
20
20
|
message WebViewPostMessageEvent {
|
21
21
|
// Can be a Struct or a scalar value since postMessage doesn't restrict the type of 'message'.
|
22
22
|
// @deprecated Use json_string instead
|
@@ -26,11 +26,12 @@ message WebViewPostMessageEvent {
|
|
26
26
|
string json_string = 2;
|
27
27
|
}
|
28
28
|
|
29
|
-
// Fired when the visibility of a fullscreen WebView changes
|
29
|
+
// Fired from the client when the visibility of a fullscreen WebView changes
|
30
30
|
message WebViewFullScreenEvent {
|
31
31
|
WebViewVisibility visibility = 1;
|
32
32
|
}
|
33
33
|
|
34
|
+
// Fired when the content of a WebView within a <webview> block triggers an event
|
34
35
|
message WebViewEvent {
|
35
36
|
oneof payload {
|
36
37
|
WebViewPostMessageEvent post_message = 1;
|
@@ -38,10 +39,12 @@ message WebViewEvent {
|
|
38
39
|
}
|
39
40
|
}
|
40
41
|
|
42
|
+
// Fired when a WebView in a devvit web app changes its immersive mode
|
41
43
|
message WebViewImmersiveModeChangedEvent {
|
42
44
|
devvit.ui.effects.web_view.v1alpha.WebViewImmersiveMode immersive_mode = 1;
|
43
45
|
}
|
44
46
|
|
47
|
+
// Fired from the client when a devvit web app triggers an event
|
45
48
|
message WebViewInternalEventMessage {
|
46
49
|
// ID of the event message, matches the id of the WebViewInternalMessage that triggered it
|
47
50
|
string id = 1;
|
@@ -53,3 +56,14 @@ message WebViewInternalEventMessage {
|
|
53
56
|
devvit.ui.effects.v1alpha.ConsentStatusEvent consent_status = 7;
|
54
57
|
}
|
55
58
|
}
|
59
|
+
|
60
|
+
// Payload to be used in a MessageEvent sent via postMessage to the web view from the client
|
61
|
+
// See: https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent
|
62
|
+
message WebViewMessageEvent {
|
63
|
+
message MessageData {
|
64
|
+
string type = 1; // 'devvit-message'
|
65
|
+
WebViewInternalEventMessage data = 2; // event type
|
66
|
+
}
|
67
|
+
|
68
|
+
MessageData data = 1; // event payload
|
69
|
+
}
|
@@ -50,7 +50,7 @@ message WebViewInternalMessage {
|
|
50
50
|
// }
|
51
51
|
// }
|
52
52
|
|
53
|
-
//
|
53
|
+
// Generic structure of messages sent via postMessage from WebView block
|
54
54
|
message WebViewPostMessage {
|
55
55
|
// See comments for each message
|
56
56
|
string type = 1;
|
@@ -58,7 +58,7 @@ message WebViewPostMessage {
|
|
58
58
|
google.protobuf.Struct data = 2;
|
59
59
|
}
|
60
60
|
|
61
|
-
// Arbitrary message, sent by app
|
61
|
+
// Arbitrary message, sent by block app to a WebView block
|
62
62
|
// type: devvit-message
|
63
63
|
message WebViewAppMessage {
|
64
64
|
// Any serializable value given to postMessage in a WebView
|
@@ -92,6 +92,7 @@ message WebViewStateMessage {
|
|
92
92
|
// devvit.ui.block_kit.v1beta.UIEnvironment environment = 1;
|
93
93
|
// }
|
94
94
|
|
95
|
+
// Message wrapper for messages sent by block app to a webview block
|
95
96
|
message WebViewPostMessageEffect {
|
96
97
|
// ID of the WebView block
|
97
98
|
string web_view_id = 1;
|
@@ -16,7 +16,7 @@ enum WebViewVisibility {
|
|
16
16
|
WEBVIEW_HIDDEN = 1;
|
17
17
|
}
|
18
18
|
|
19
|
-
// Fired when the content of a WebView calls window.parent.postMessage()
|
19
|
+
// Fired when the content of a WebView within a <webview> block calls window.parent.postMessage()
|
20
20
|
message WebViewPostMessageEvent {
|
21
21
|
// Can be a Struct or a scalar value since postMessage doesn't restrict the type of 'message'.
|
22
22
|
// @deprecated Use json_string instead
|
@@ -26,11 +26,12 @@ message WebViewPostMessageEvent {
|
|
26
26
|
string json_string = 2;
|
27
27
|
}
|
28
28
|
|
29
|
-
// Fired when the visibility of a fullscreen WebView changes
|
29
|
+
// Fired from the client when the visibility of a fullscreen WebView changes
|
30
30
|
message WebViewFullScreenEvent {
|
31
31
|
WebViewVisibility visibility = 1;
|
32
32
|
}
|
33
33
|
|
34
|
+
// Fired when the content of a WebView within a <webview> block triggers an event
|
34
35
|
message WebViewEvent {
|
35
36
|
oneof payload {
|
36
37
|
WebViewPostMessageEvent post_message = 1;
|
@@ -38,10 +39,12 @@ message WebViewEvent {
|
|
38
39
|
}
|
39
40
|
}
|
40
41
|
|
42
|
+
// Fired when a WebView in a devvit web app changes its immersive mode
|
41
43
|
message WebViewImmersiveModeChangedEvent {
|
42
44
|
devvit.ui.effects.web_view.v1alpha.WebViewImmersiveMode immersive_mode = 1;
|
43
45
|
}
|
44
46
|
|
47
|
+
// Fired from the client when a devvit web app triggers an event
|
45
48
|
message WebViewInternalEventMessage {
|
46
49
|
// ID of the event message, matches the id of the WebViewInternalMessage that triggered it
|
47
50
|
string id = 1;
|
@@ -53,3 +56,14 @@ message WebViewInternalEventMessage {
|
|
53
56
|
devvit.ui.effects.v1alpha.ConsentStatusEvent consent_status = 7;
|
54
57
|
}
|
55
58
|
}
|
59
|
+
|
60
|
+
// Payload to be used in a MessageEvent sent via postMessage to the web view from the client
|
61
|
+
// See: https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent
|
62
|
+
message WebViewMessageEvent {
|
63
|
+
message MessageData {
|
64
|
+
string type = 1; // 'devvit-message'
|
65
|
+
WebViewInternalEventMessage data = 2; // event type
|
66
|
+
}
|
67
|
+
|
68
|
+
MessageData data = 1; // event payload
|
69
|
+
}
|
package/schema/snootobuf.lock
CHANGED
Binary file
|
Binary file
|
@@ -37,7 +37,7 @@ export interface WebViewInternalMessage {
|
|
37
37
|
showToast?: ShowToastEffect | undefined;
|
38
38
|
id?: string | undefined;
|
39
39
|
}
|
40
|
-
/**
|
40
|
+
/** Generic structure of messages sent via postMessage from WebView block */
|
41
41
|
export interface WebViewPostMessage {
|
42
42
|
/** See comments for each message */
|
43
43
|
type: string;
|
@@ -47,7 +47,7 @@ export interface WebViewPostMessage {
|
|
47
47
|
} | undefined;
|
48
48
|
}
|
49
49
|
/**
|
50
|
-
* Arbitrary message, sent by app
|
50
|
+
* Arbitrary message, sent by block app to a WebView block
|
51
51
|
* type: devvit-message
|
52
52
|
*/
|
53
53
|
export interface WebViewAppMessage {
|
@@ -69,6 +69,7 @@ export interface WebViewStateMessage {
|
|
69
69
|
[key: string]: any;
|
70
70
|
} | undefined;
|
71
71
|
}
|
72
|
+
/** Message wrapper for messages sent by block app to a webview block */
|
72
73
|
export interface WebViewPostMessageEffect {
|
73
74
|
/** ID of the WebView block */
|
74
75
|
webViewId: string;
|
@@ -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;;;;;GAKG;AAGH,OAAO,GAAG,MAAM,uBAAuB,CAAC;AAGxC,OAAO,EAAE,2BAA2B,EAAE,MAAM,wDAAwD,CAAC;AACrG,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,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,oDAAoD;AACpD,MAAM,WAAW,sBAAsB;IACrC,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,+EAA+E;IAC/E,KAAK,EAAE,2BAA2B,CAAC;IACnC,+BAA+B;IAC/B,SAAS,CAAC,EACN;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GACtB,SAAS,CAAC;IACd,4BAA4B;IAC5B,MAAM,CAAC,EACH;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GACtB,SAAS,CAAC;IACd,4BAA4B;IAC5B,cAAc,CAAC,EAAE,2BAA2B,GAAG,SAAS,CAAC;IACzD,aAAa,CAAC,EAAE,0BAA0B,GAAG,SAAS,CAAC;IACvD,KAAK,CAAC,EAAE,kBAAkB,GAAG,SAAS,CAAC;IACvC,SAAS,CAAC,EAAE,eAAe,GAAG,SAAS,CAAC;IACxC,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACzB;AAED,
|
1
|
+
{"version":3,"file":"post_message.d.ts","sourceRoot":"","sources":["../../../../../../../src/types/devvit/ui/effects/web_view/v1alpha/post_message.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,GAAG,MAAM,uBAAuB,CAAC;AAGxC,OAAO,EAAE,2BAA2B,EAAE,MAAM,wDAAwD,CAAC;AACrG,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,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,CAQ7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WAAW,MAAM,GAAG,mBAAmB;qBAuB3D,GAAG,GAAG,mBAAmB;oBAI1B,mBAAmB,GAAG,OAAO;kBAQ/B,WAAW,CAAC,mBAAmB,CAAC,GAAG,mBAAmB;wBAGhD,WAAW,CAAC,mBAAmB,CAAC,GAAG,mBAAmB;CAK3E,CAAC;AAQF,eAAO,MAAM,wBAAwB;;oBAGnB,wBAAwB,WAAU,GAAG,CAAC,MAAM,GAAyB,GAAG,CAAC,MAAM;kBAajF,GAAG,CAAC,MAAM,GAAG,UAAU,WAAW,MAAM,GAAG,wBAAwB;qBAqChE,GAAG,GAAG,wBAAwB;oBAQ/B,wBAAwB,GAAG,OAAO;kBAcpC,WAAW,CAAC,wBAAwB,CAAC,GAAG,wBAAwB;wBAG1D,WAAW,CAAC,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"}
|
@@ -16,7 +16,7 @@ export declare enum WebViewVisibility {
|
|
16
16
|
}
|
17
17
|
export declare function webViewVisibilityFromJSON(object: any): WebViewVisibility;
|
18
18
|
export declare function webViewVisibilityToJSON(object: WebViewVisibility): number;
|
19
|
-
/** Fired when the content of a WebView calls window.parent.postMessage() */
|
19
|
+
/** Fired when the content of a WebView within a <webview> block calls window.parent.postMessage() */
|
20
20
|
export interface WebViewPostMessageEvent {
|
21
21
|
/**
|
22
22
|
* Can be a Struct or a scalar value since postMessage doesn't restrict the type of 'message'.
|
@@ -26,17 +26,20 @@ export interface WebViewPostMessageEvent {
|
|
26
26
|
/** JSON string payload */
|
27
27
|
jsonString: string;
|
28
28
|
}
|
29
|
-
/** Fired when the visibility of a fullscreen WebView changes */
|
29
|
+
/** Fired from the client when the visibility of a fullscreen WebView changes */
|
30
30
|
export interface WebViewFullScreenEvent {
|
31
31
|
visibility: WebViewVisibility;
|
32
32
|
}
|
33
|
+
/** Fired when the content of a WebView within a <webview> block triggers an event */
|
33
34
|
export interface WebViewEvent {
|
34
35
|
postMessage?: WebViewPostMessageEvent | undefined;
|
35
36
|
fullScreen?: WebViewFullScreenEvent | undefined;
|
36
37
|
}
|
38
|
+
/** Fired when a WebView in a devvit web app changes its immersive mode */
|
37
39
|
export interface WebViewImmersiveModeChangedEvent {
|
38
40
|
immersiveMode: WebViewImmersiveMode;
|
39
41
|
}
|
42
|
+
/** Fired from the client when a devvit web app triggers an event */
|
40
43
|
export interface WebViewInternalEventMessage {
|
41
44
|
/** ID of the event message, matches the id of the WebViewInternalMessage that triggered it */
|
42
45
|
id: string;
|
@@ -46,6 +49,20 @@ export interface WebViewInternalEventMessage {
|
|
46
49
|
immersiveModeEvent?: WebViewImmersiveModeChangedEvent | undefined;
|
47
50
|
consentStatus?: ConsentStatusEvent | undefined;
|
48
51
|
}
|
52
|
+
/**
|
53
|
+
* Payload to be used in a MessageEvent sent via postMessage to the web view from the client
|
54
|
+
* See: https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent
|
55
|
+
*/
|
56
|
+
export interface WebViewMessageEvent {
|
57
|
+
/** event payload */
|
58
|
+
data?: WebViewMessageEvent_MessageData | undefined;
|
59
|
+
}
|
60
|
+
export interface WebViewMessageEvent_MessageData {
|
61
|
+
/** 'devvit-message' */
|
62
|
+
type: string;
|
63
|
+
/** event type */
|
64
|
+
data?: WebViewInternalEventMessage | undefined;
|
65
|
+
}
|
49
66
|
export declare const WebViewPostMessageEvent: {
|
50
67
|
$type: "devvit.ui.events.v1alpha.WebViewPostMessageEvent";
|
51
68
|
encode(message: WebViewPostMessageEvent, writer?: _m0.Writer): _m0.Writer;
|
@@ -91,6 +108,24 @@ export declare const WebViewInternalEventMessage: {
|
|
91
108
|
create(base?: DeepPartial<WebViewInternalEventMessage>): WebViewInternalEventMessage;
|
92
109
|
fromPartial(object: DeepPartial<WebViewInternalEventMessage>): WebViewInternalEventMessage;
|
93
110
|
};
|
111
|
+
export declare const WebViewMessageEvent: {
|
112
|
+
$type: "devvit.ui.events.v1alpha.WebViewMessageEvent";
|
113
|
+
encode(message: WebViewMessageEvent, writer?: _m0.Writer): _m0.Writer;
|
114
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): WebViewMessageEvent;
|
115
|
+
fromJSON(object: any): WebViewMessageEvent;
|
116
|
+
toJSON(message: WebViewMessageEvent): unknown;
|
117
|
+
create(base?: DeepPartial<WebViewMessageEvent>): WebViewMessageEvent;
|
118
|
+
fromPartial(object: DeepPartial<WebViewMessageEvent>): WebViewMessageEvent;
|
119
|
+
};
|
120
|
+
export declare const WebViewMessageEvent_MessageData: {
|
121
|
+
$type: "devvit.ui.events.v1alpha.WebViewMessageEvent.MessageData";
|
122
|
+
encode(message: WebViewMessageEvent_MessageData, writer?: _m0.Writer): _m0.Writer;
|
123
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): WebViewMessageEvent_MessageData;
|
124
|
+
fromJSON(object: any): WebViewMessageEvent_MessageData;
|
125
|
+
toJSON(message: WebViewMessageEvent_MessageData): unknown;
|
126
|
+
create(base?: DeepPartial<WebViewMessageEvent_MessageData>): WebViewMessageEvent_MessageData;
|
127
|
+
fromPartial(object: DeepPartial<WebViewMessageEvent_MessageData>): WebViewMessageEvent_MessageData;
|
128
|
+
};
|
94
129
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
95
130
|
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 {} ? {
|
96
131
|
[K in keyof T]?: DeepPartial<T[K]>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"web_view.d.ts","sourceRoot":"","sources":["../../../../../../src/types/devvit/ui/events/v1alpha/web_view.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,GAAG,MAAM,uBAAuB,CAAC;AAGxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,yBAAyB,EAAE,MAAM,iDAAiD,CAAC;AAC5F,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAC3F,OAAO,EACL,oBAAoB,EAGrB,MAAM,kDAAkD,CAAC;AAE1D,oBAAY,iBAAiB;IAC3B,eAAe,IAAI;IACnB,cAAc,IAAI;IAClB,YAAY,KAAK;CAClB;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,GAAG,GAAG,iBAAiB,CAaxE;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAUzE;AAED,
|
1
|
+
{"version":3,"file":"web_view.d.ts","sourceRoot":"","sources":["../../../../../../src/types/devvit/ui/events/v1alpha/web_view.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,GAAG,MAAM,uBAAuB,CAAC;AAGxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,yBAAyB,EAAE,MAAM,iDAAiD,CAAC;AAC5F,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAC3F,OAAO,EACL,oBAAo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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"}
|
@@ -430,6 +430,130 @@ export const WebViewInternalEventMessage = {
|
|
430
430
|
},
|
431
431
|
};
|
432
432
|
messageTypeRegistry.set(WebViewInternalEventMessage.$type, WebViewInternalEventMessage);
|
433
|
+
function createBaseWebViewMessageEvent() {
|
434
|
+
return { data: undefined };
|
435
|
+
}
|
436
|
+
export const WebViewMessageEvent = {
|
437
|
+
$type: "devvit.ui.events.v1alpha.WebViewMessageEvent",
|
438
|
+
encode(message, writer = _m0.Writer.create()) {
|
439
|
+
if (message.data !== undefined) {
|
440
|
+
WebViewMessageEvent_MessageData.encode(message.data, writer.uint32(10).fork()).ldelim();
|
441
|
+
}
|
442
|
+
return writer;
|
443
|
+
},
|
444
|
+
decode(input, length) {
|
445
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
446
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
447
|
+
const message = createBaseWebViewMessageEvent();
|
448
|
+
while (reader.pos < end) {
|
449
|
+
const tag = reader.uint32();
|
450
|
+
switch (tag >>> 3) {
|
451
|
+
case 1:
|
452
|
+
if (tag !== 10) {
|
453
|
+
break;
|
454
|
+
}
|
455
|
+
message.data = WebViewMessageEvent_MessageData.decode(reader, reader.uint32());
|
456
|
+
continue;
|
457
|
+
}
|
458
|
+
if ((tag & 7) === 4 || tag === 0) {
|
459
|
+
break;
|
460
|
+
}
|
461
|
+
reader.skipType(tag & 7);
|
462
|
+
}
|
463
|
+
return message;
|
464
|
+
},
|
465
|
+
fromJSON(object) {
|
466
|
+
return { data: isSet(object.data) ? WebViewMessageEvent_MessageData.fromJSON(object.data) : undefined };
|
467
|
+
},
|
468
|
+
toJSON(message) {
|
469
|
+
const obj = {};
|
470
|
+
if (message.data !== undefined) {
|
471
|
+
obj.data = WebViewMessageEvent_MessageData.toJSON(message.data);
|
472
|
+
}
|
473
|
+
return obj;
|
474
|
+
},
|
475
|
+
create(base) {
|
476
|
+
return WebViewMessageEvent.fromPartial(base ?? {});
|
477
|
+
},
|
478
|
+
fromPartial(object) {
|
479
|
+
const message = createBaseWebViewMessageEvent();
|
480
|
+
message.data = (object.data !== undefined && object.data !== null)
|
481
|
+
? WebViewMessageEvent_MessageData.fromPartial(object.data)
|
482
|
+
: undefined;
|
483
|
+
return message;
|
484
|
+
},
|
485
|
+
};
|
486
|
+
messageTypeRegistry.set(WebViewMessageEvent.$type, WebViewMessageEvent);
|
487
|
+
function createBaseWebViewMessageEvent_MessageData() {
|
488
|
+
return { type: "", data: undefined };
|
489
|
+
}
|
490
|
+
export const WebViewMessageEvent_MessageData = {
|
491
|
+
$type: "devvit.ui.events.v1alpha.WebViewMessageEvent.MessageData",
|
492
|
+
encode(message, writer = _m0.Writer.create()) {
|
493
|
+
if (message.type !== "") {
|
494
|
+
writer.uint32(10).string(message.type);
|
495
|
+
}
|
496
|
+
if (message.data !== undefined) {
|
497
|
+
WebViewInternalEventMessage.encode(message.data, writer.uint32(18).fork()).ldelim();
|
498
|
+
}
|
499
|
+
return writer;
|
500
|
+
},
|
501
|
+
decode(input, length) {
|
502
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
503
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
504
|
+
const message = createBaseWebViewMessageEvent_MessageData();
|
505
|
+
while (reader.pos < end) {
|
506
|
+
const tag = reader.uint32();
|
507
|
+
switch (tag >>> 3) {
|
508
|
+
case 1:
|
509
|
+
if (tag !== 10) {
|
510
|
+
break;
|
511
|
+
}
|
512
|
+
message.type = reader.string();
|
513
|
+
continue;
|
514
|
+
case 2:
|
515
|
+
if (tag !== 18) {
|
516
|
+
break;
|
517
|
+
}
|
518
|
+
message.data = WebViewInternalEventMessage.decode(reader, reader.uint32());
|
519
|
+
continue;
|
520
|
+
}
|
521
|
+
if ((tag & 7) === 4 || tag === 0) {
|
522
|
+
break;
|
523
|
+
}
|
524
|
+
reader.skipType(tag & 7);
|
525
|
+
}
|
526
|
+
return message;
|
527
|
+
},
|
528
|
+
fromJSON(object) {
|
529
|
+
return {
|
530
|
+
type: isSet(object.type) ? globalThis.String(object.type) : "",
|
531
|
+
data: isSet(object.data) ? WebViewInternalEventMessage.fromJSON(object.data) : undefined,
|
532
|
+
};
|
533
|
+
},
|
534
|
+
toJSON(message) {
|
535
|
+
const obj = {};
|
536
|
+
if (message.type !== "") {
|
537
|
+
obj.type = message.type;
|
538
|
+
}
|
539
|
+
if (message.data !== undefined) {
|
540
|
+
obj.data = WebViewInternalEventMessage.toJSON(message.data);
|
541
|
+
}
|
542
|
+
return obj;
|
543
|
+
},
|
544
|
+
create(base) {
|
545
|
+
return WebViewMessageEvent_MessageData.fromPartial(base ?? {});
|
546
|
+
},
|
547
|
+
fromPartial(object) {
|
548
|
+
const message = createBaseWebViewMessageEvent_MessageData();
|
549
|
+
message.type = object.type ?? "";
|
550
|
+
message.data = (object.data !== undefined && object.data !== null)
|
551
|
+
? WebViewInternalEventMessage.fromPartial(object.data)
|
552
|
+
: undefined;
|
553
|
+
return message;
|
554
|
+
},
|
555
|
+
};
|
556
|
+
messageTypeRegistry.set(WebViewMessageEvent_MessageData.$type, WebViewMessageEvent_MessageData);
|
433
557
|
function isSet(value) {
|
434
558
|
return value !== null && value !== undefined;
|
435
559
|
}
|