@devvit/protos 0.10.23-next-2024-07-01-a6d03873c.0 → 0.10.23-next-2024-07-02-b7e7fae7b.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,6 +11,16 @@ import "google/protobuf/wrappers.proto";
11
11
  option go_package = "github.snooguts.net/reddit/reddit-devplatform-monorepo/go-common/generated/protos/types/devvit/ui/events/v1alpha";
12
12
  option java_package = "com.reddit.devvit.ui.events.v1alpha";
13
13
 
14
+ // This is set when we want to map events to a specific runtime, examples:
15
+ // [1] incoming realtime messages on a websocket connection
16
+ // [2] keydown events in a text input block
17
+ // Both are intended to be run only on local runtime
18
+ enum UIEventScope {
19
+ ALL = 0;
20
+ LOCAL = 1;
21
+ REMOTE = 2;
22
+ }
23
+
14
24
  message UIEvent {
15
25
  oneof event {
16
26
  devvit.ui.effects.v1alpha.RealtimeSubscriptionEvent realtime_event = 2;
@@ -30,15 +40,19 @@ message UIEvent {
30
40
  // effects.
31
41
  google.protobuf.BoolValue async = 15;
32
42
 
33
- // This is set for circuit-broken or fetchy events that are known to only work on the
34
- // remote runtime.
35
- google.protobuf.BoolValue remote_only = 16;
36
-
37
43
  // The id of a the hook that should respond to this event
38
44
  google.protobuf.StringValue hook = 10;
39
45
 
40
46
  // Signals if this event should be sent to the front (true) or back of the queue (false)
41
47
  google.protobuf.BoolValue retry = 17;
48
+
49
+ optional UIEventScope scope = 18;
50
+
51
+ // Deprecate remote_only boolean field which is intended
52
+ // for circuit-broken or fetchy events that are known to only
53
+ // work on the remote runtime.
54
+ reserved 16;
55
+ reserved "remote_only";
42
56
  }
43
57
 
44
58
  /**
@@ -235,9 +235,9 @@ export declare const CustomPostDefinition: {
235
235
  blocking?: {} | undefined;
236
236
  resize?: {} | undefined;
237
237
  async?: boolean | undefined;
238
- remoteOnly?: boolean | undefined;
239
238
  hook?: string | undefined;
240
239
  retry?: boolean | undefined;
240
+ scope?: import("../../../../../index.js").UIEventScope | undefined;
241
241
  }[];
242
242
  } | undefined): UIRequest;
243
243
  fromPartial(object: {
@@ -312,9 +312,9 @@ export declare const CustomPostDefinition: {
312
312
  blocking?: {} | undefined;
313
313
  resize?: {} | undefined;
314
314
  async?: boolean | undefined;
315
- remoteOnly?: boolean | undefined;
316
315
  hook?: string | undefined;
317
316
  retry?: boolean | undefined;
317
+ scope?: import("../../../../../index.js").UIEventScope | undefined;
318
318
  }[];
319
319
  }): UIRequest;
320
320
  };
@@ -509,9 +509,9 @@ export declare const CustomPostDefinition: {
509
509
  blocking?: {} | undefined;
510
510
  resize?: {} | undefined;
511
511
  async?: boolean | undefined;
512
- remoteOnly?: boolean | undefined;
513
512
  hook?: string | undefined;
514
513
  retry?: boolean | undefined;
514
+ scope?: import("../../../../../index.js").UIEventScope | undefined;
515
515
  }[];
516
516
  blocks?: {
517
517
  type?: import("../../../../../index.js").BlockType;
@@ -863,9 +863,9 @@ export declare const CustomPostDefinition: {
863
863
  blocking?: {} | undefined;
864
864
  resize?: {} | undefined;
865
865
  async?: boolean | undefined;
866
- remoteOnly?: boolean | undefined;
867
866
  hook?: string | undefined;
868
867
  retry?: boolean | undefined;
868
+ scope?: import("../../../../../index.js").UIEventScope | undefined;
869
869
  }[];
870
870
  blocks?: {
871
871
  type?: import("../../../../../index.js").BlockType;
@@ -1117,9 +1117,9 @@ export declare const CustomPostDefinition: {
1117
1117
  blocking?: {} | undefined;
1118
1118
  resize?: {} | undefined;
1119
1119
  async?: boolean | undefined;
1120
- remoteOnly?: boolean | undefined;
1121
1120
  hook?: string | undefined;
1122
1121
  retry?: boolean | undefined;
1122
+ scope?: import("../../../../../index.js").UIEventScope | undefined;
1123
1123
  }[];
1124
1124
  } | undefined): UIRequest;
1125
1125
  fromPartial(object: {
@@ -1194,9 +1194,9 @@ export declare const CustomPostDefinition: {
1194
1194
  blocking?: {} | undefined;
1195
1195
  resize?: {} | undefined;
1196
1196
  async?: boolean | undefined;
1197
- remoteOnly?: boolean | undefined;
1198
1197
  hook?: string | undefined;
1199
1198
  retry?: boolean | undefined;
1199
+ scope?: import("../../../../../index.js").UIEventScope | undefined;
1200
1200
  }[];
1201
1201
  }): UIRequest;
1202
1202
  };
@@ -1391,9 +1391,9 @@ export declare const CustomPostDefinition: {
1391
1391
  blocking?: {} | undefined;
1392
1392
  resize?: {} | undefined;
1393
1393
  async?: boolean | undefined;
1394
- remoteOnly?: boolean | undefined;
1395
1394
  hook?: string | undefined;
1396
1395
  retry?: boolean | undefined;
1396
+ scope?: import("../../../../../index.js").UIEventScope | undefined;
1397
1397
  }[];
1398
1398
  blocks?: {
1399
1399
  type?: import("../../../../../index.js").BlockType;
@@ -1745,9 +1745,9 @@ export declare const CustomPostDefinition: {
1745
1745
  blocking?: {} | undefined;
1746
1746
  resize?: {} | undefined;
1747
1747
  async?: boolean | undefined;
1748
- remoteOnly?: boolean | undefined;
1749
1748
  hook?: string | undefined;
1750
1749
  retry?: boolean | undefined;
1750
+ scope?: import("../../../../../index.js").UIEventScope | undefined;
1751
1751
  }[];
1752
1752
  blocks?: {
1753
1753
  type?: import("../../../../../index.js").BlockType;
@@ -7,6 +7,20 @@ import _m0 from 'protobufjs/minimal.js';
7
7
  import { RealtimeSubscriptionEvent } from '../../effects/v1alpha/realtime_subscriptions.js';
8
8
  import { FormSubmittedEvent } from '../../effects/v1alpha/show_form.js';
9
9
  import { ToastActionEvent } from '../../effects/v1alpha/show_toast.js';
10
+ /**
11
+ * This is set when we want to map events to a specific runtime, examples:
12
+ * [1] incoming realtime messages on a websocket connection
13
+ * [2] keydown events in a text input block
14
+ * Both are intended to be run only on local runtime
15
+ */
16
+ export declare enum UIEventScope {
17
+ ALL = 0,
18
+ LOCAL = 1,
19
+ REMOTE = 2,
20
+ UNRECOGNIZED = -1
21
+ }
22
+ export declare function uIEventScopeFromJSON(object: any): UIEventScope;
23
+ export declare function uIEventScopeToJSON(object: UIEventScope): number;
10
24
  export interface UIEvent {
11
25
  realtimeEvent?: RealtimeSubscriptionEvent | undefined;
12
26
  formSubmitted?: FormSubmittedEvent | undefined;
@@ -24,15 +38,11 @@ export interface UIEvent {
24
38
  * effects.
25
39
  */
26
40
  async?: boolean | undefined;
27
- /**
28
- * This is set for circuit-broken or fetchy events that are known to only work on the
29
- * remote runtime.
30
- */
31
- remoteOnly?: boolean | undefined;
32
41
  /** The id of a the hook that should respond to this event */
33
42
  hook?: string | undefined;
34
43
  /** Signals if this event should be sent to the front (true) or back of the queue (false) */
35
44
  retry?: boolean | undefined;
45
+ scope?: UIEventScope | undefined;
36
46
  }
37
47
  /**
38
48
  * Server-side rendering event. This is a signal to the server that it should
@@ -1 +1 @@
1
- {"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../../../../../src/types/devvit/ui/events/v1alpha/event.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,GAAG,MAAM,uBAAuB,CAAC;AAIxC,OAAO,EAAE,yBAAyB,EAAE,MAAM,iDAAiD,CAAC;AAC5F,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAEvE,MAAM,WAAW,OAAO;IACtB,aAAa,CAAC,EAAE,yBAAyB,GAAG,SAAS,CAAC;IACtD,aAAa,CAAC,EAAE,kBAAkB,GAAG,SAAS,CAAC;IAC/C,WAAW,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAC;IAC3C,UAAU,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IACpC,YAAY,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;IACxC,aAAa,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IAC1C,KAAK,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAC/B,QAAQ,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAAC;IAC3C,MAAM,CAAC,EACH,WAAW,GACX,SAAS,CAAC;IACd;;;;;OAKG;IACH,KAAK,CAAC,EACF,OAAO,GACP,SAAS,CAAC;IACd;;;OAGG;IACH,UAAU,CAAC,EACP,OAAO,GACP,SAAS,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AAQF,eAAO,MAAM,aAAa;;oBAGR,aAAa,WAAU,IAAI,MAAM,GAAyB,IAAI,MAAM;kBAatE,IAAI,MAAM,GAAG,UAAU,WAAW,MAAM,GAAG,aAAa;qBAqCrD,GAAG,GAAG,aAAa;oBAQpB,aAAa,GAAG,OAAO;kBAczB,YAAY,aAAa,CAAC,GAAG,aAAa;wBAGpC,YAAY,aAAa,CAAC,GAAG,aAAa;CAS/D,CAAC;AAQF,eAAO,MAAM,UAAU;;oBAGL,UAAU,WAAU,IAAI,MAAM,GAAyB,IAAI,MAAM;kBAUnE,IAAI,MAAM,GAAG,UAAU,WAAW,MAAM,GAAG,UAAU;qBA8BlD,GAAG,GAAG,UAAU;oBAOjB,UAAU,GAAG,OAAO;kBAWtB,YAAY,UAAU,CAAC,GAAG,UAAU;wBAG9B,YAAY,UAAU,CAAC,GAAG,UAAU;CAMzD,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"}
@@ -11,6 +11,49 @@ import { messageTypeRegistry } from '../../../../typeRegistry.js';
11
11
  import { RealtimeSubscriptionEvent } from '../../effects/v1alpha/realtime_subscriptions.js';
12
12
  import { FormSubmittedEvent } from '../../effects/v1alpha/show_form.js';
13
13
  import { ToastActionEvent } from '../../effects/v1alpha/show_toast.js';
14
+ /**
15
+ * This is set when we want to map events to a specific runtime, examples:
16
+ * [1] incoming realtime messages on a websocket connection
17
+ * [2] keydown events in a text input block
18
+ * Both are intended to be run only on local runtime
19
+ */
20
+ export var UIEventScope;
21
+ (function (UIEventScope) {
22
+ UIEventScope[UIEventScope["ALL"] = 0] = "ALL";
23
+ UIEventScope[UIEventScope["LOCAL"] = 1] = "LOCAL";
24
+ UIEventScope[UIEventScope["REMOTE"] = 2] = "REMOTE";
25
+ UIEventScope[UIEventScope["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
26
+ })(UIEventScope || (UIEventScope = {}));
27
+ export function uIEventScopeFromJSON(object) {
28
+ switch (object) {
29
+ case 0:
30
+ case "ALL":
31
+ return UIEventScope.ALL;
32
+ case 1:
33
+ case "LOCAL":
34
+ return UIEventScope.LOCAL;
35
+ case 2:
36
+ case "REMOTE":
37
+ return UIEventScope.REMOTE;
38
+ case -1:
39
+ case "UNRECOGNIZED":
40
+ default:
41
+ return UIEventScope.UNRECOGNIZED;
42
+ }
43
+ }
44
+ export function uIEventScopeToJSON(object) {
45
+ switch (object) {
46
+ case UIEventScope.ALL:
47
+ return 0;
48
+ case UIEventScope.LOCAL:
49
+ return 1;
50
+ case UIEventScope.REMOTE:
51
+ return 2;
52
+ case UIEventScope.UNRECOGNIZED:
53
+ default:
54
+ return -1;
55
+ }
56
+ }
14
57
  function createBaseUIEvent() {
15
58
  return {
16
59
  realtimeEvent: undefined,
@@ -23,9 +66,9 @@ function createBaseUIEvent() {
23
66
  blocking: undefined,
24
67
  resize: undefined,
25
68
  async: undefined,
26
- remoteOnly: undefined,
27
69
  hook: undefined,
28
70
  retry: undefined,
71
+ scope: undefined,
29
72
  };
30
73
  }
31
74
  export const UIEvent = {
@@ -61,15 +104,15 @@ export const UIEvent = {
61
104
  if (message.async !== undefined) {
62
105
  BoolValue.encode({ value: message.async }, writer.uint32(122).fork()).ldelim();
63
106
  }
64
- if (message.remoteOnly !== undefined) {
65
- BoolValue.encode({ value: message.remoteOnly }, writer.uint32(130).fork()).ldelim();
66
- }
67
107
  if (message.hook !== undefined) {
68
108
  StringValue.encode({ value: message.hook }, writer.uint32(82).fork()).ldelim();
69
109
  }
70
110
  if (message.retry !== undefined) {
71
111
  BoolValue.encode({ value: message.retry }, writer.uint32(138).fork()).ldelim();
72
112
  }
113
+ if (message.scope !== undefined) {
114
+ writer.uint32(144).int32(message.scope);
115
+ }
73
116
  return writer;
74
117
  },
75
118
  decode(input, length) {
@@ -139,12 +182,6 @@ export const UIEvent = {
139
182
  }
140
183
  message.async = BoolValue.decode(reader, reader.uint32()).value;
141
184
  continue;
142
- case 16:
143
- if (tag !== 130) {
144
- break;
145
- }
146
- message.remoteOnly = BoolValue.decode(reader, reader.uint32()).value;
147
- continue;
148
185
  case 10:
149
186
  if (tag !== 82) {
150
187
  break;
@@ -157,6 +194,12 @@ export const UIEvent = {
157
194
  }
158
195
  message.retry = BoolValue.decode(reader, reader.uint32()).value;
159
196
  continue;
197
+ case 18:
198
+ if (tag !== 144) {
199
+ break;
200
+ }
201
+ message.scope = reader.int32();
202
+ continue;
160
203
  }
161
204
  if ((tag & 7) === 4 || tag === 0) {
162
205
  break;
@@ -177,9 +220,9 @@ export const UIEvent = {
177
220
  blocking: isSet(object.blocking) ? BlockingRenderEvent.fromJSON(object.blocking) : undefined,
178
221
  resize: isSet(object.resize) ? ResizeEvent.fromJSON(object.resize) : undefined,
179
222
  async: isSet(object.async) ? Boolean(object.async) : undefined,
180
- remoteOnly: isSet(object.remoteOnly) ? Boolean(object.remoteOnly) : undefined,
181
223
  hook: isSet(object.hook) ? String(object.hook) : undefined,
182
224
  retry: isSet(object.retry) ? Boolean(object.retry) : undefined,
225
+ scope: isSet(object.scope) ? uIEventScopeFromJSON(object.scope) : undefined,
183
226
  };
184
227
  },
185
228
  toJSON(message) {
@@ -214,15 +257,15 @@ export const UIEvent = {
214
257
  if (message.async !== undefined) {
215
258
  obj.async = message.async;
216
259
  }
217
- if (message.remoteOnly !== undefined) {
218
- obj.remoteOnly = message.remoteOnly;
219
- }
220
260
  if (message.hook !== undefined) {
221
261
  obj.hook = message.hook;
222
262
  }
223
263
  if (message.retry !== undefined) {
224
264
  obj.retry = message.retry;
225
265
  }
266
+ if (message.scope !== undefined) {
267
+ obj.scope = uIEventScopeToJSON(message.scope);
268
+ }
226
269
  return obj;
227
270
  },
228
271
  create(base) {
@@ -258,9 +301,9 @@ export const UIEvent = {
258
301
  ? ResizeEvent.fromPartial(object.resize)
259
302
  : undefined;
260
303
  message.async = object.async ?? undefined;
261
- message.remoteOnly = object.remoteOnly ?? undefined;
262
304
  message.hook = object.hook ?? undefined;
263
305
  message.retry = object.retry ?? undefined;
306
+ message.scope = object.scope ?? undefined;
264
307
  return message;
265
308
  },
266
309
  };