@devvit/protos 0.10.20-next-2024-05-07-e793923cd.0 → 0.10.20
Sign up to get free protection for your applications and to get access to all the features.
- package/index.d.ts +0 -1
- package/index.d.ts.map +1 -1
- package/index.js +0 -1
- package/meta.min.json +52 -92
- package/package.json +5 -5
- package/protos.min.js +2 -2
- package/protos.min.js.map +4 -4
- package/schema/devvit/ui/block_kit/v1beta/ui.proto +3 -0
- package/schema/devvit/ui/effects/v1alpha/effect.proto +2 -5
- package/schema/devvit/ui/events/v1alpha/event.proto +3 -0
- package/types/devvit/reddit/custom_post/v1alpha/custom_post.d.ts +240 -244
- package/types/devvit/reddit/custom_post/v1alpha/custom_post.d.ts.map +1 -1
- package/types/devvit/ui/block_kit/v1beta/ui.d.ts +2 -0
- package/types/devvit/ui/block_kit/v1beta/ui.d.ts.map +1 -1
- package/types/devvit/ui/block_kit/v1beta/ui.js +15 -1
- package/types/devvit/ui/effects/v1alpha/effect.d.ts +0 -4
- package/types/devvit/ui/effects/v1alpha/effect.d.ts.map +1 -1
- package/types/devvit/ui/effects/v1alpha/effect.js +0 -25
- package/types/devvit/ui/events/v1alpha/event.d.ts +2 -0
- package/types/devvit/ui/events/v1alpha/event.d.ts.map +1 -1
- package/types/devvit/ui/events/v1alpha/event.js +15 -0
- package/schema/devvit/ui/effects/v1alpha/send_event.proto +0 -41
- package/types/devvit/ui/effects/v1alpha/send_event.d.ts +0 -53
- package/types/devvit/ui/effects/v1alpha/send_event.d.ts.map +0 -1
- package/types/devvit/ui/effects/v1alpha/send_event.js +0 -83
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../../../../../src/types/devvit/ui/block_kit/v1beta/ui.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,GAAG,MAAM,uBAAuB,CAAC;AAExC,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAE/D,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAA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G,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"}
|
@@ -109,7 +109,7 @@ export const UIRequest = {
|
|
109
109
|
};
|
110
110
|
messageTypeRegistry.set(UIRequest.$type, UIRequest);
|
111
111
|
function createBaseUIResponse() {
|
112
|
-
return { state: undefined, effects: [], blocks: undefined };
|
112
|
+
return { state: undefined, effects: [], events: [], blocks: undefined };
|
113
113
|
}
|
114
114
|
export const UIResponse = {
|
115
115
|
$type: "devvit.ui.block_kit.v1beta.UIResponse",
|
@@ -120,6 +120,9 @@ export const UIResponse = {
|
|
120
120
|
for (const v of message.effects) {
|
121
121
|
Effect.encode(v, writer.uint32(18).fork()).ldelim();
|
122
122
|
}
|
123
|
+
for (const v of message.events) {
|
124
|
+
UIEvent.encode(v, writer.uint32(42).fork()).ldelim();
|
125
|
+
}
|
123
126
|
if (message.blocks !== undefined) {
|
124
127
|
Block.encode(message.blocks, writer.uint32(26).fork()).ldelim();
|
125
128
|
}
|
@@ -144,6 +147,12 @@ export const UIResponse = {
|
|
144
147
|
}
|
145
148
|
message.effects.push(Effect.decode(reader, reader.uint32()));
|
146
149
|
continue;
|
150
|
+
case 5:
|
151
|
+
if (tag !== 42) {
|
152
|
+
break;
|
153
|
+
}
|
154
|
+
message.events.push(UIEvent.decode(reader, reader.uint32()));
|
155
|
+
continue;
|
147
156
|
case 3:
|
148
157
|
if (tag !== 26) {
|
149
158
|
break;
|
@@ -162,6 +171,7 @@ export const UIResponse = {
|
|
162
171
|
return {
|
163
172
|
state: isObject(object.state) ? object.state : undefined,
|
164
173
|
effects: globalThis.Array.isArray(object?.effects) ? object.effects.map((e) => Effect.fromJSON(e)) : [],
|
174
|
+
events: globalThis.Array.isArray(object?.events) ? object.events.map((e) => UIEvent.fromJSON(e)) : [],
|
165
175
|
blocks: isSet(object.blocks) ? Block.fromJSON(object.blocks) : undefined,
|
166
176
|
};
|
167
177
|
},
|
@@ -173,6 +183,9 @@ export const UIResponse = {
|
|
173
183
|
if (message.effects?.length) {
|
174
184
|
obj.effects = message.effects.map((e) => Effect.toJSON(e));
|
175
185
|
}
|
186
|
+
if (message.events?.length) {
|
187
|
+
obj.events = message.events.map((e) => UIEvent.toJSON(e));
|
188
|
+
}
|
176
189
|
if (message.blocks !== undefined) {
|
177
190
|
obj.blocks = Block.toJSON(message.blocks);
|
178
191
|
}
|
@@ -185,6 +198,7 @@ export const UIResponse = {
|
|
185
198
|
const message = createBaseUIResponse();
|
186
199
|
message.state = object.state ?? undefined;
|
187
200
|
message.effects = object.effects?.map((e) => Effect.fromPartial(e)) || [];
|
201
|
+
message.events = object.events?.map((e) => UIEvent.fromPartial(e)) || [];
|
188
202
|
message.blocks = (object.blocks !== undefined && object.blocks !== null)
|
189
203
|
? Block.fromPartial(object.blocks)
|
190
204
|
: undefined;
|
@@ -9,7 +9,6 @@ import { NavigateToUrlEffect } from './navigate_to_url.js';
|
|
9
9
|
import { RealtimeSubscriptionsEffect } from './realtime_subscriptions.js';
|
10
10
|
import { ReloadPartEffect } from './reload_part.js';
|
11
11
|
import { RerenderEffect } from './rerender_ui.js';
|
12
|
-
import { SendEventEffect } from './send_event.js';
|
13
12
|
import { ShowFormEffect } from './show_form.js';
|
14
13
|
import { ShowToastEffect } from './show_toast.js';
|
15
14
|
export declare enum EffectType {
|
@@ -25,8 +24,6 @@ export declare enum EffectType {
|
|
25
24
|
EFFECT_SHOW_TOAST = 4,
|
26
25
|
/** EFFECT_NAVIGATE_TO_URL - Notify the client to navigate to a URL */
|
27
26
|
EFFECT_NAVIGATE_TO_URL = 5,
|
28
|
-
/** EFFECT_SEND_EVENT - Notify the client to send a synthetic event */
|
29
|
-
EFFECT_SEND_EVENT = 6,
|
30
27
|
/** EFFECT_SET_INTERVALS - This updates the list of active timers. */
|
31
28
|
EFFECT_SET_INTERVALS = 7,
|
32
29
|
UNRECOGNIZED = -1
|
@@ -40,7 +37,6 @@ export interface Effect {
|
|
40
37
|
showForm?: ShowFormEffect | undefined;
|
41
38
|
showToast?: ShowToastEffect | undefined;
|
42
39
|
navigateToUrl?: NavigateToUrlEffect | undefined;
|
43
|
-
sendEvent?: SendEventEffect | undefined;
|
44
40
|
interval?: SetIntervalsEffect | undefined;
|
45
41
|
/** TODO: remove this field once all clients are updated. Redundant with effect_type */
|
46
42
|
type: EffectType;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"effect.d.ts","sourceRoot":"","sources":["../../../../../../src/types/devvit/ui/effects/v1alpha/effect.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,GAAG,MAAM,uBAAuB,CAAC;AAExC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"effect.d.ts","sourceRoot":"","sources":["../../../../../../src/types/devvit/ui/effects/v1alpha/effect.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,G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AClB;AAeD,eAAO,MAAM,MAAM;;oBAGD,MAAM,WAAU,IAAI,MAAM,GAAyB,IAAI,MAAM;kBA4B/D,IAAI,MAAM,GAAG,UAAU,WAAW,MAAM,GAAG,MAAM;qBAwE9C,GAAG,GAAG,MAAM;oBAeb,MAAM,GAAG,OAAO;kBA6BlB,YAAY,MAAM,CAAC,GAAG,MAAM;wBAGtB,YAAY,MAAM,CAAC,GAAG,MAAM;CA2BjD,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,7 +11,6 @@ import { NavigateToUrlEffect } from './navigate_to_url.js';
|
|
11
11
|
import { RealtimeSubscriptionsEffect } from './realtime_subscriptions.js';
|
12
12
|
import { ReloadPartEffect } from './reload_part.js';
|
13
13
|
import { RerenderEffect } from './rerender_ui.js';
|
14
|
-
import { SendEventEffect } from './send_event.js';
|
15
14
|
import { ShowFormEffect } from './show_form.js';
|
16
15
|
import { ShowToastEffect } from './show_toast.js';
|
17
16
|
export var EffectType;
|
@@ -28,8 +27,6 @@ export var EffectType;
|
|
28
27
|
EffectType[EffectType["EFFECT_SHOW_TOAST"] = 4] = "EFFECT_SHOW_TOAST";
|
29
28
|
/** EFFECT_NAVIGATE_TO_URL - Notify the client to navigate to a URL */
|
30
29
|
EffectType[EffectType["EFFECT_NAVIGATE_TO_URL"] = 5] = "EFFECT_NAVIGATE_TO_URL";
|
31
|
-
/** EFFECT_SEND_EVENT - Notify the client to send a synthetic event */
|
32
|
-
EffectType[EffectType["EFFECT_SEND_EVENT"] = 6] = "EFFECT_SEND_EVENT";
|
33
30
|
/** EFFECT_SET_INTERVALS - This updates the list of active timers. */
|
34
31
|
EffectType[EffectType["EFFECT_SET_INTERVALS"] = 7] = "EFFECT_SET_INTERVALS";
|
35
32
|
EffectType[EffectType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
@@ -54,9 +51,6 @@ export function effectTypeFromJSON(object) {
|
|
54
51
|
case 5:
|
55
52
|
case "EFFECT_NAVIGATE_TO_URL":
|
56
53
|
return EffectType.EFFECT_NAVIGATE_TO_URL;
|
57
|
-
case 6:
|
58
|
-
case "EFFECT_SEND_EVENT":
|
59
|
-
return EffectType.EFFECT_SEND_EVENT;
|
60
54
|
case 7:
|
61
55
|
case "EFFECT_SET_INTERVALS":
|
62
56
|
return EffectType.EFFECT_SET_INTERVALS;
|
@@ -80,8 +74,6 @@ export function effectTypeToJSON(object) {
|
|
80
74
|
return 4;
|
81
75
|
case EffectType.EFFECT_NAVIGATE_TO_URL:
|
82
76
|
return 5;
|
83
|
-
case EffectType.EFFECT_SEND_EVENT:
|
84
|
-
return 6;
|
85
77
|
case EffectType.EFFECT_SET_INTERVALS:
|
86
78
|
return 7;
|
87
79
|
case EffectType.UNRECOGNIZED:
|
@@ -97,7 +89,6 @@ function createBaseEffect() {
|
|
97
89
|
showForm: undefined,
|
98
90
|
showToast: undefined,
|
99
91
|
navigateToUrl: undefined,
|
100
|
-
sendEvent: undefined,
|
101
92
|
interval: undefined,
|
102
93
|
type: 0,
|
103
94
|
};
|
@@ -123,9 +114,6 @@ export const Effect = {
|
|
123
114
|
if (message.navigateToUrl !== undefined) {
|
124
115
|
NavigateToUrlEffect.encode(message.navigateToUrl, writer.uint32(50).fork()).ldelim();
|
125
116
|
}
|
126
|
-
if (message.sendEvent !== undefined) {
|
127
|
-
SendEventEffect.encode(message.sendEvent, writer.uint32(66).fork()).ldelim();
|
128
|
-
}
|
129
117
|
if (message.interval !== undefined) {
|
130
118
|
SetIntervalsEffect.encode(message.interval, writer.uint32(74).fork()).ldelim();
|
131
119
|
}
|
@@ -177,12 +165,6 @@ export const Effect = {
|
|
177
165
|
}
|
178
166
|
message.navigateToUrl = NavigateToUrlEffect.decode(reader, reader.uint32());
|
179
167
|
continue;
|
180
|
-
case 8:
|
181
|
-
if (tag !== 66) {
|
182
|
-
break;
|
183
|
-
}
|
184
|
-
message.sendEvent = SendEventEffect.decode(reader, reader.uint32());
|
185
|
-
continue;
|
186
168
|
case 9:
|
187
169
|
if (tag !== 74) {
|
188
170
|
break;
|
@@ -213,7 +195,6 @@ export const Effect = {
|
|
213
195
|
showForm: isSet(object.showForm) ? ShowFormEffect.fromJSON(object.showForm) : undefined,
|
214
196
|
showToast: isSet(object.showToast) ? ShowToastEffect.fromJSON(object.showToast) : undefined,
|
215
197
|
navigateToUrl: isSet(object.navigateToUrl) ? NavigateToUrlEffect.fromJSON(object.navigateToUrl) : undefined,
|
216
|
-
sendEvent: isSet(object.sendEvent) ? SendEventEffect.fromJSON(object.sendEvent) : undefined,
|
217
198
|
interval: isSet(object.interval) ? SetIntervalsEffect.fromJSON(object.interval) : undefined,
|
218
199
|
type: isSet(object.type) ? effectTypeFromJSON(object.type) : 0,
|
219
200
|
};
|
@@ -238,9 +219,6 @@ export const Effect = {
|
|
238
219
|
if (message.navigateToUrl !== undefined) {
|
239
220
|
obj.navigateToUrl = NavigateToUrlEffect.toJSON(message.navigateToUrl);
|
240
221
|
}
|
241
|
-
if (message.sendEvent !== undefined) {
|
242
|
-
obj.sendEvent = SendEventEffect.toJSON(message.sendEvent);
|
243
|
-
}
|
244
222
|
if (message.interval !== undefined) {
|
245
223
|
obj.interval = SetIntervalsEffect.toJSON(message.interval);
|
246
224
|
}
|
@@ -273,9 +251,6 @@ export const Effect = {
|
|
273
251
|
message.navigateToUrl = (object.navigateToUrl !== undefined && object.navigateToUrl !== null)
|
274
252
|
? NavigateToUrlEffect.fromPartial(object.navigateToUrl)
|
275
253
|
: undefined;
|
276
|
-
message.sendEvent = (object.sendEvent !== undefined && object.sendEvent !== null)
|
277
|
-
? SendEventEffect.fromPartial(object.sendEvent)
|
278
|
-
: undefined;
|
279
254
|
message.interval = (object.interval !== undefined && object.interval !== null)
|
280
255
|
? SetIntervalsEffect.fromPartial(object.interval)
|
281
256
|
: undefined;
|
@@ -31,6 +31,8 @@ export interface UIEvent {
|
|
31
31
|
remoteOnly?: boolean | undefined;
|
32
32
|
/** The id of a the hook that should respond to this event */
|
33
33
|
hook?: string | undefined;
|
34
|
+
/** Signals if this event should be sent to the front (true) or back of the queue (false) */
|
35
|
+
retry?: boolean | undefined;
|
34
36
|
}
|
35
37
|
/**
|
36
38
|
* 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,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AAE,GACrD,OAAO,CAAC,CAAC,CAAC,CAAC"}
|
@@ -25,6 +25,7 @@ function createBaseUIEvent() {
|
|
25
25
|
async: undefined,
|
26
26
|
remoteOnly: undefined,
|
27
27
|
hook: undefined,
|
28
|
+
retry: undefined,
|
28
29
|
};
|
29
30
|
}
|
30
31
|
export const UIEvent = {
|
@@ -66,6 +67,9 @@ export const UIEvent = {
|
|
66
67
|
if (message.hook !== undefined) {
|
67
68
|
StringValue.encode({ value: message.hook }, writer.uint32(82).fork()).ldelim();
|
68
69
|
}
|
70
|
+
if (message.retry !== undefined) {
|
71
|
+
BoolValue.encode({ value: message.retry }, writer.uint32(138).fork()).ldelim();
|
72
|
+
}
|
69
73
|
return writer;
|
70
74
|
},
|
71
75
|
decode(input, length) {
|
@@ -147,6 +151,12 @@ export const UIEvent = {
|
|
147
151
|
}
|
148
152
|
message.hook = StringValue.decode(reader, reader.uint32()).value;
|
149
153
|
continue;
|
154
|
+
case 17:
|
155
|
+
if (tag !== 138) {
|
156
|
+
break;
|
157
|
+
}
|
158
|
+
message.retry = BoolValue.decode(reader, reader.uint32()).value;
|
159
|
+
continue;
|
150
160
|
}
|
151
161
|
if ((tag & 7) === 4 || tag === 0) {
|
152
162
|
break;
|
@@ -169,6 +179,7 @@ export const UIEvent = {
|
|
169
179
|
async: isSet(object.async) ? Boolean(object.async) : undefined,
|
170
180
|
remoteOnly: isSet(object.remoteOnly) ? Boolean(object.remoteOnly) : undefined,
|
171
181
|
hook: isSet(object.hook) ? String(object.hook) : undefined,
|
182
|
+
retry: isSet(object.retry) ? Boolean(object.retry) : undefined,
|
172
183
|
};
|
173
184
|
},
|
174
185
|
toJSON(message) {
|
@@ -209,6 +220,9 @@ export const UIEvent = {
|
|
209
220
|
if (message.hook !== undefined) {
|
210
221
|
obj.hook = message.hook;
|
211
222
|
}
|
223
|
+
if (message.retry !== undefined) {
|
224
|
+
obj.retry = message.retry;
|
225
|
+
}
|
212
226
|
return obj;
|
213
227
|
},
|
214
228
|
create(base) {
|
@@ -246,6 +260,7 @@ export const UIEvent = {
|
|
246
260
|
message.async = object.async ?? undefined;
|
247
261
|
message.remoteOnly = object.remoteOnly ?? undefined;
|
248
262
|
message.hook = object.hook ?? undefined;
|
263
|
+
message.retry = object.retry ?? undefined;
|
249
264
|
return message;
|
250
265
|
},
|
251
266
|
};
|
@@ -1,41 +0,0 @@
|
|
1
|
-
syntax = "proto3";
|
2
|
-
|
3
|
-
package devvit.ui.effects.v1alpha;
|
4
|
-
|
5
|
-
import "devvit/ui/events/v1alpha/event.proto";
|
6
|
-
import "google/protobuf/wrappers.proto";
|
7
|
-
|
8
|
-
option go_package = "github.snooguts.net/reddit/reddit-devplatform-monorepo/go-common/generated/protos/types/devvit/ui/events/v1alpha";
|
9
|
-
option java_package = "com.reddit.devvit.ui.effects.v1alpha";
|
10
|
-
|
11
|
-
/**
|
12
|
-
* This is a low level effect that allows the client or server to send events
|
13
|
-
* directly, typically to the other runtime. It's not intended to be used by
|
14
|
-
* app code directly, but rather by hooks that start to bring concurrency features
|
15
|
-
* into the platform.
|
16
|
-
*
|
17
|
-
* An example might be a useFetchHook. An app developer would use the hook to
|
18
|
-
* fetch a remote api, making the request from the server runtime, but without
|
19
|
-
* blocking the client runtime. The lifecycle would be something like:
|
20
|
-
*
|
21
|
-
* const {data, loading, error} = useFetch("https://api.example.com");
|
22
|
-
*
|
23
|
-
* The useFetch hook on the client runtime would emit a
|
24
|
-
* SendEventEffect(AsyncRequest({id: "hook-id-xyz"})). When this event hits the client
|
25
|
-
* runtime, it would instantly circuit-break, causing the runtime to send the event to the
|
26
|
-
* server runtime. The server runtime would then look up the hook by id, actually make the
|
27
|
-
* request, and then emit a SendEventEffect(AsyncResponse(id: "hook-id-xyz", data: "..."), Target.CLIENT)
|
28
|
-
* which would get routed back into the client.
|
29
|
-
*
|
30
|
-
* This request lifecycle would be orthogonal to the normal event lifecycle, and therefore you
|
31
|
-
* couldn't/wouldn't do any setStates inside of the hook. But the benefit would be that
|
32
|
-
* there would be no state conflicts, so the async request/response could be handled concurrently.
|
33
|
-
*
|
34
|
-
*/
|
35
|
-
message SendEventEffect {
|
36
|
-
devvit.ui.events.v1alpha.UIEvent event = 1;
|
37
|
-
|
38
|
-
// If true, the event will be sent to the front of the queue. The reason to do this is
|
39
|
-
// for event replay in e.g. circuit breaking.
|
40
|
-
google.protobuf.BoolValue jumps_queue = 2;
|
41
|
-
}
|
@@ -1,53 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* #send_event.ts
|
3
|
-
*
|
4
|
-
* @packageDocumentation
|
5
|
-
*/
|
6
|
-
import _m0 from 'protobufjs/minimal.js';
|
7
|
-
import { UIEvent } from '../../events/v1alpha/event.js';
|
8
|
-
/**
|
9
|
-
* This is a low level effect that allows the client or server to send events
|
10
|
-
* directly, typically to the other runtime. It's not intended to be used by
|
11
|
-
* app code directly, but rather by hooks that start to bring concurrency features
|
12
|
-
* into the platform.
|
13
|
-
*
|
14
|
-
* An example might be a useFetchHook. An app developer would use the hook to
|
15
|
-
* fetch a remote api, making the request from the server runtime, but without
|
16
|
-
* blocking the client runtime. The lifecycle would be something like:
|
17
|
-
*
|
18
|
-
* const {data, loading, error} = useFetch("https://api.example.com");
|
19
|
-
*
|
20
|
-
* The useFetch hook on the client runtime would emit a
|
21
|
-
* SendEventEffect(AsyncRequest({id: "hook-id-xyz"})). When this event hits the client
|
22
|
-
* runtime, it would instantly circuit-break, causing the runtime to send the event to the
|
23
|
-
* server runtime. The server runtime would then look up the hook by id, actually make the
|
24
|
-
* request, and then emit a SendEventEffect(AsyncResponse(id: "hook-id-xyz", data: "..."), Target.CLIENT)
|
25
|
-
* which would get routed back into the client.
|
26
|
-
*
|
27
|
-
* This request lifecycle would be orthogonal to the normal event lifecycle, and therefore you
|
28
|
-
* couldn't/wouldn't do any setStates inside of the hook. But the benefit would be that
|
29
|
-
* there would be no state conflicts, so the async request/response could be handled concurrently.
|
30
|
-
*/
|
31
|
-
export interface SendEventEffect {
|
32
|
-
event?: UIEvent | undefined;
|
33
|
-
/**
|
34
|
-
* If true, the event will be sent to the front of the queue. The reason to do this is
|
35
|
-
* for event replay in e.g. circuit breaking.
|
36
|
-
*/
|
37
|
-
jumpsQueue?: boolean | undefined;
|
38
|
-
}
|
39
|
-
export declare const SendEventEffect: {
|
40
|
-
$type: "devvit.ui.effects.v1alpha.SendEventEffect";
|
41
|
-
encode(message: SendEventEffect, writer?: _m0.Writer): _m0.Writer;
|
42
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): SendEventEffect;
|
43
|
-
fromJSON(object: any): SendEventEffect;
|
44
|
-
toJSON(message: SendEventEffect): unknown;
|
45
|
-
create(base?: DeepPartial<SendEventEffect>): SendEventEffect;
|
46
|
-
fromPartial(object: DeepPartial<SendEventEffect>): SendEventEffect;
|
47
|
-
};
|
48
|
-
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
49
|
-
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 {} ? {
|
50
|
-
[K in keyof T]?: DeepPartial<T[K]>;
|
51
|
-
} : Partial<T>;
|
52
|
-
export {};
|
53
|
-
//# sourceMappingURL=send_event.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"send_event.d.ts","sourceRoot":"","sources":["../../../../../../src/types/devvit/ui/effects/v1alpha/send_event.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,GAAG,MAAM,uBAAuB,CAAC;AAGxC,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EACF,OAAO,GACP,SAAS,CAAC;IACd;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAClC;AAMD,eAAO,MAAM,eAAe;;oBAGV,eAAe,WAAU,IAAI,MAAM,GAAyB,IAAI,MAAM;kBAUxE,IAAI,MAAM,GAAG,UAAU,WAAW,MAAM,GAAG,eAAe;qBA8BvD,GAAG,GAAG,eAAe;oBAOtB,eAAe,GAAG,OAAO;kBAW3B,YAAY,eAAe,CAAC,GAAG,eAAe;wBAGxC,YAAY,eAAe,CAAC,GAAG,eAAe;CAQnE,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"}
|
@@ -1,83 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* #send_event.ts
|
3
|
-
*
|
4
|
-
* @packageDocumentation
|
5
|
-
*/
|
6
|
-
/* eslint-disable */
|
7
|
-
import _m0 from 'protobufjs/minimal.js';
|
8
|
-
import { BoolValue } from '../../../../google/protobuf/wrappers.js';
|
9
|
-
import { messageTypeRegistry } from '../../../../typeRegistry.js';
|
10
|
-
import { UIEvent } from '../../events/v1alpha/event.js';
|
11
|
-
function createBaseSendEventEffect() {
|
12
|
-
return { event: undefined, jumpsQueue: undefined };
|
13
|
-
}
|
14
|
-
export const SendEventEffect = {
|
15
|
-
$type: "devvit.ui.effects.v1alpha.SendEventEffect",
|
16
|
-
encode(message, writer = _m0.Writer.create()) {
|
17
|
-
if (message.event !== undefined) {
|
18
|
-
UIEvent.encode(message.event, writer.uint32(10).fork()).ldelim();
|
19
|
-
}
|
20
|
-
if (message.jumpsQueue !== undefined) {
|
21
|
-
BoolValue.encode({ value: message.jumpsQueue }, writer.uint32(18).fork()).ldelim();
|
22
|
-
}
|
23
|
-
return writer;
|
24
|
-
},
|
25
|
-
decode(input, length) {
|
26
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
27
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
28
|
-
const message = createBaseSendEventEffect();
|
29
|
-
while (reader.pos < end) {
|
30
|
-
const tag = reader.uint32();
|
31
|
-
switch (tag >>> 3) {
|
32
|
-
case 1:
|
33
|
-
if (tag !== 10) {
|
34
|
-
break;
|
35
|
-
}
|
36
|
-
message.event = UIEvent.decode(reader, reader.uint32());
|
37
|
-
continue;
|
38
|
-
case 2:
|
39
|
-
if (tag !== 18) {
|
40
|
-
break;
|
41
|
-
}
|
42
|
-
message.jumpsQueue = BoolValue.decode(reader, reader.uint32()).value;
|
43
|
-
continue;
|
44
|
-
}
|
45
|
-
if ((tag & 7) === 4 || tag === 0) {
|
46
|
-
break;
|
47
|
-
}
|
48
|
-
reader.skipType(tag & 7);
|
49
|
-
}
|
50
|
-
return message;
|
51
|
-
},
|
52
|
-
fromJSON(object) {
|
53
|
-
return {
|
54
|
-
event: isSet(object.event) ? UIEvent.fromJSON(object.event) : undefined,
|
55
|
-
jumpsQueue: isSet(object.jumpsQueue) ? Boolean(object.jumpsQueue) : undefined,
|
56
|
-
};
|
57
|
-
},
|
58
|
-
toJSON(message) {
|
59
|
-
const obj = {};
|
60
|
-
if (message.event !== undefined) {
|
61
|
-
obj.event = UIEvent.toJSON(message.event);
|
62
|
-
}
|
63
|
-
if (message.jumpsQueue !== undefined) {
|
64
|
-
obj.jumpsQueue = message.jumpsQueue;
|
65
|
-
}
|
66
|
-
return obj;
|
67
|
-
},
|
68
|
-
create(base) {
|
69
|
-
return SendEventEffect.fromPartial(base ?? {});
|
70
|
-
},
|
71
|
-
fromPartial(object) {
|
72
|
-
const message = createBaseSendEventEffect();
|
73
|
-
message.event = (object.event !== undefined && object.event !== null)
|
74
|
-
? UIEvent.fromPartial(object.event)
|
75
|
-
: undefined;
|
76
|
-
message.jumpsQueue = object.jumpsQueue ?? undefined;
|
77
|
-
return message;
|
78
|
-
},
|
79
|
-
};
|
80
|
-
messageTypeRegistry.set(SendEventEffect.$type, SendEventEffect);
|
81
|
-
function isSet(value) {
|
82
|
-
return value !== null && value !== undefined;
|
83
|
-
}
|