@devvit/protos 0.10.18-next-2024-03-06-f70b83a43.0 → 0.10.18-next-2024-03-06-075df9ad2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +1 -0
- package/package.json +3 -3
- package/schema/devvit/ui/block_kit/v1beta/ui.proto +18 -9
- package/schema/devvit/ui/effects/v1alpha/effect.proto +5 -0
- package/schema/devvit/ui/effects/v1alpha/interval.proto +30 -0
- package/schema/devvit/ui/events/v1alpha/event.proto +9 -0
- package/types/devvit/actor/reddit/context_action.d.ts +100 -4
- package/types/devvit/actor/reddit/context_action.d.ts.map +1 -1
- package/types/devvit/reddit/custom_actions/v2alpha/custom_actions.d.ts +100 -4
- package/types/devvit/reddit/custom_actions/v2alpha/custom_actions.d.ts.map +1 -1
- package/types/devvit/reddit/custom_post/v1alpha/custom_post.d.ts +343 -247
- package/types/devvit/reddit/custom_post/v1alpha/custom_post.d.ts.map +1 -1
- package/types/devvit/ui/block_kit/v1beta/ui.d.ts +486 -345
- package/types/devvit/ui/block_kit/v1beta/ui.d.ts.map +1 -1
- package/types/devvit/ui/block_kit/v1beta/ui.js +64 -55
- package/types/devvit/ui/effects/v1alpha/effect.d.ts +64 -3
- package/types/devvit/ui/effects/v1alpha/effect.d.ts.map +1 -1
- package/types/devvit/ui/effects/v1alpha/effect.js +21 -0
- package/types/devvit/ui/effects/v1alpha/interval.d.ts +135 -0
- package/types/devvit/ui/effects/v1alpha/interval.d.ts.map +1 -0
- package/types/devvit/ui/effects/v1alpha/interval.js +191 -0
- package/types/devvit/ui/effects/v1alpha/send_event.d.ts +8 -2
- package/types/devvit/ui/effects/v1alpha/send_event.d.ts.map +1 -1
- package/types/devvit/ui/events/v1alpha/event.d.ts +19 -1
- package/types/devvit/ui/events/v1alpha/event.d.ts.map +1 -1
- package/types/devvit/ui/events/v1alpha/event.js +57 -0
- package/types/devvit/ui/events/v1alpha/handle_ui.d.ts +108 -6
- package/types/devvit/ui/events/v1alpha/handle_ui.d.ts.map +1 -1
@@ -0,0 +1,135 @@
|
|
1
|
+
/**
|
2
|
+
* #interval.ts
|
3
|
+
*
|
4
|
+
* @packageDocumentation
|
5
|
+
*/
|
6
|
+
import _m0 from 'protobufjs/minimal.js';
|
7
|
+
import { Duration } from '../../../../google/protobuf/duration.js';
|
8
|
+
/**
|
9
|
+
* This is the list of active timers. We could choose to have an effect per timer, but
|
10
|
+
* following realtime's lead, we send the whole list.
|
11
|
+
*
|
12
|
+
* This implies that if the timer disappears from the map, you should cancel it.
|
13
|
+
*/
|
14
|
+
export interface SetIntervalsEffect {
|
15
|
+
/** hook_id => interval map */
|
16
|
+
intervals: {
|
17
|
+
[key: string]: IntervalDetails;
|
18
|
+
};
|
19
|
+
}
|
20
|
+
export interface SetIntervalsEffect_IntervalsEntry {
|
21
|
+
key: string;
|
22
|
+
value?: IntervalDetails;
|
23
|
+
}
|
24
|
+
export interface IntervalDetails {
|
25
|
+
duration?: Duration;
|
26
|
+
/**
|
27
|
+
* The execution queue to send the event to. If not set, the default queue is used. This is useful
|
28
|
+
* to distinguish between synchronous and asynchronous events.
|
29
|
+
*/
|
30
|
+
queue?: string;
|
31
|
+
}
|
32
|
+
export declare const SetIntervalsEffect: {
|
33
|
+
$type: "devvit.ui.effects.v1alpha.SetIntervalsEffect";
|
34
|
+
encode(message: SetIntervalsEffect, writer?: _m0.Writer): _m0.Writer;
|
35
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): SetIntervalsEffect;
|
36
|
+
fromJSON(object: any): SetIntervalsEffect;
|
37
|
+
toJSON(message: SetIntervalsEffect): unknown;
|
38
|
+
fromPartial<I extends {
|
39
|
+
intervals?: {
|
40
|
+
[x: string]: {
|
41
|
+
duration?: {
|
42
|
+
seconds?: number | undefined;
|
43
|
+
nanos?: number | undefined;
|
44
|
+
} | undefined;
|
45
|
+
queue?: string | undefined;
|
46
|
+
} | undefined;
|
47
|
+
} | undefined;
|
48
|
+
} & {
|
49
|
+
intervals?: ({
|
50
|
+
[x: string]: {
|
51
|
+
duration?: {
|
52
|
+
seconds?: number | undefined;
|
53
|
+
nanos?: number | undefined;
|
54
|
+
} | undefined;
|
55
|
+
queue?: string | undefined;
|
56
|
+
} | undefined;
|
57
|
+
} & {
|
58
|
+
[x: string]: ({
|
59
|
+
duration?: {
|
60
|
+
seconds?: number | undefined;
|
61
|
+
nanos?: number | undefined;
|
62
|
+
} | undefined;
|
63
|
+
queue?: string | undefined;
|
64
|
+
} & {
|
65
|
+
duration?: ({
|
66
|
+
seconds?: number | undefined;
|
67
|
+
nanos?: number | undefined;
|
68
|
+
} & {
|
69
|
+
seconds?: number | undefined;
|
70
|
+
nanos?: number | undefined;
|
71
|
+
} & { [K in Exclude<keyof I["intervals"][string]["duration"], "$type" | keyof Duration>]: never; }) | undefined;
|
72
|
+
queue?: string | undefined;
|
73
|
+
} & { [K_1 in Exclude<keyof I["intervals"][string], "$type" | keyof IntervalDetails>]: never; }) | undefined;
|
74
|
+
} & { [K_2 in Exclude<keyof I["intervals"], string | number>]: never; }) | undefined;
|
75
|
+
} & { [K_3 in Exclude<keyof I, "$type" | "intervals">]: never; }>(object: I): SetIntervalsEffect;
|
76
|
+
};
|
77
|
+
export declare const SetIntervalsEffect_IntervalsEntry: {
|
78
|
+
$type: "devvit.ui.effects.v1alpha.SetIntervalsEffect.IntervalsEntry";
|
79
|
+
encode(message: SetIntervalsEffect_IntervalsEntry, writer?: _m0.Writer): _m0.Writer;
|
80
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): SetIntervalsEffect_IntervalsEntry;
|
81
|
+
fromJSON(object: any): SetIntervalsEffect_IntervalsEntry;
|
82
|
+
toJSON(message: SetIntervalsEffect_IntervalsEntry): unknown;
|
83
|
+
fromPartial<I extends {
|
84
|
+
key?: string | undefined;
|
85
|
+
value?: {
|
86
|
+
duration?: {
|
87
|
+
seconds?: number | undefined;
|
88
|
+
nanos?: number | undefined;
|
89
|
+
} | undefined;
|
90
|
+
queue?: string | undefined;
|
91
|
+
} | undefined;
|
92
|
+
} & {
|
93
|
+
key?: string | undefined;
|
94
|
+
value?: ({
|
95
|
+
duration?: {
|
96
|
+
seconds?: number | undefined;
|
97
|
+
nanos?: number | undefined;
|
98
|
+
} | undefined;
|
99
|
+
queue?: string | undefined;
|
100
|
+
} & {
|
101
|
+
duration?: ({
|
102
|
+
seconds?: number | undefined;
|
103
|
+
nanos?: number | undefined;
|
104
|
+
} & {
|
105
|
+
seconds?: number | undefined;
|
106
|
+
nanos?: number | undefined;
|
107
|
+
} & { [K in Exclude<keyof I["value"]["duration"], "$type" | keyof Duration>]: never; }) | undefined;
|
108
|
+
queue?: string | undefined;
|
109
|
+
} & { [K_1 in Exclude<keyof I["value"], "$type" | keyof IntervalDetails>]: never; }) | undefined;
|
110
|
+
} & { [K_2 in Exclude<keyof I, "$type" | keyof SetIntervalsEffect_IntervalsEntry>]: never; }>(object: I): SetIntervalsEffect_IntervalsEntry;
|
111
|
+
};
|
112
|
+
export declare const IntervalDetails: {
|
113
|
+
$type: "devvit.ui.effects.v1alpha.IntervalDetails";
|
114
|
+
encode(message: IntervalDetails, writer?: _m0.Writer): _m0.Writer;
|
115
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): IntervalDetails;
|
116
|
+
fromJSON(object: any): IntervalDetails;
|
117
|
+
toJSON(message: IntervalDetails): unknown;
|
118
|
+
fromPartial<I extends {
|
119
|
+
duration?: {
|
120
|
+
seconds?: number | undefined;
|
121
|
+
nanos?: number | undefined;
|
122
|
+
} | undefined;
|
123
|
+
queue?: string | undefined;
|
124
|
+
} & {
|
125
|
+
duration?: ({
|
126
|
+
seconds?: number | undefined;
|
127
|
+
nanos?: number | undefined;
|
128
|
+
} & {
|
129
|
+
seconds?: number | undefined;
|
130
|
+
nanos?: number | undefined;
|
131
|
+
} & { [K in Exclude<keyof I["duration"], "$type" | keyof Duration>]: never; }) | undefined;
|
132
|
+
queue?: string | undefined;
|
133
|
+
} & { [K_1 in Exclude<keyof I, "$type" | keyof IntervalDetails>]: never; }>(object: I): IntervalDetails;
|
134
|
+
};
|
135
|
+
//# sourceMappingURL=interval.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"interval.d.ts","sourceRoot":"","sources":["../../../../../../src/types/devvit/ui/effects/v1alpha/interval.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,GAAG,MAAM,uBAAuB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,yCAAyC,CAAC;AAInE;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB;IACjC,8BAA8B;IAC9B,SAAS,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe,CAAA;KAAE,CAAC;CAC/C;AAED,MAAM,WAAW,iCAAiC;IAChD,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,eAAe,CAAC;CACzB;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAMD,eAAO,MAAM,kBAAkB;;oBAGb,kBAAkB,WAAU,IAAI,MAAM,GAAyB,IAAI,MAAM;kBAO3E,IAAI,MAAM,GAAG,UAAU,WAAW,MAAM,GAAG,kBAAkB;qBAqB1D,GAAG,GAAG,kBAAkB;oBAWzB,kBAAkB,GAAG,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kFAWiC,kBAAkB;CAahG,CAAC;AAQF,eAAO,MAAM,iCAAiC;;oBAG5B,iCAAiC,WAAU,IAAI,MAAM,GAAyB,IAAI,MAAM;kBAU1F,IAAI,MAAM,GAAG,UAAU,WAAW,MAAM,GAAG,iCAAiC;qBAqBzE,GAAG,GAAG,iCAAiC;oBAOxC,iCAAiC,GAAG,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;8GASxD,iCAAiC;CAQrC,CAAC;AAWF,eAAO,MAAM,eAAe;;oBAGV,eAAe,WAAU,IAAI,MAAM,GAAyB,IAAI,MAAM;kBAUxE,IAAI,MAAM,GAAG,UAAU,WAAW,MAAM,GAAG,eAAe;qBAqBvD,GAAG,GAAG,eAAe;oBAOtB,eAAe,GAAG,OAAO;;;;;;;;;;;;;;;;4FAOiC,eAAe;CAQ1F,CAAC"}
|
@@ -0,0 +1,191 @@
|
|
1
|
+
/**
|
2
|
+
* #interval.ts
|
3
|
+
*
|
4
|
+
* @packageDocumentation
|
5
|
+
*/
|
6
|
+
/* eslint-disable */
|
7
|
+
import _m0 from 'protobufjs/minimal.js';
|
8
|
+
import { Duration } from '../../../../google/protobuf/duration.js';
|
9
|
+
import { StringValue } from '../../../../google/protobuf/wrappers.js';
|
10
|
+
import { messageTypeRegistry } from '../../../../typeRegistry.js';
|
11
|
+
function createBaseSetIntervalsEffect() {
|
12
|
+
return { intervals: {} };
|
13
|
+
}
|
14
|
+
export const SetIntervalsEffect = {
|
15
|
+
$type: "devvit.ui.effects.v1alpha.SetIntervalsEffect",
|
16
|
+
encode(message, writer = _m0.Writer.create()) {
|
17
|
+
Object.entries(message.intervals).forEach(([key, value]) => {
|
18
|
+
SetIntervalsEffect_IntervalsEntry.encode({ key: key, value }, writer.uint32(10).fork()).ldelim();
|
19
|
+
});
|
20
|
+
return writer;
|
21
|
+
},
|
22
|
+
decode(input, length) {
|
23
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
24
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
25
|
+
const message = createBaseSetIntervalsEffect();
|
26
|
+
while (reader.pos < end) {
|
27
|
+
const tag = reader.uint32();
|
28
|
+
switch (tag >>> 3) {
|
29
|
+
case 1:
|
30
|
+
const entry1 = SetIntervalsEffect_IntervalsEntry.decode(reader, reader.uint32());
|
31
|
+
if (entry1.value !== undefined) {
|
32
|
+
message.intervals[entry1.key] = entry1.value;
|
33
|
+
}
|
34
|
+
break;
|
35
|
+
default:
|
36
|
+
reader.skipType(tag & 7);
|
37
|
+
break;
|
38
|
+
}
|
39
|
+
}
|
40
|
+
return message;
|
41
|
+
},
|
42
|
+
fromJSON(object) {
|
43
|
+
return {
|
44
|
+
intervals: isObject(object.intervals)
|
45
|
+
? Object.entries(object.intervals).reduce((acc, [key, value]) => {
|
46
|
+
acc[key] = IntervalDetails.fromJSON(value);
|
47
|
+
return acc;
|
48
|
+
}, {})
|
49
|
+
: {},
|
50
|
+
};
|
51
|
+
},
|
52
|
+
toJSON(message) {
|
53
|
+
const obj = {};
|
54
|
+
obj.intervals = {};
|
55
|
+
if (message.intervals) {
|
56
|
+
Object.entries(message.intervals).forEach(([k, v]) => {
|
57
|
+
obj.intervals[k] = IntervalDetails.toJSON(v);
|
58
|
+
});
|
59
|
+
}
|
60
|
+
return obj;
|
61
|
+
},
|
62
|
+
fromPartial(object) {
|
63
|
+
const message = createBaseSetIntervalsEffect();
|
64
|
+
message.intervals = Object.entries(object.intervals ?? {}).reduce((acc, [key, value]) => {
|
65
|
+
if (value !== undefined) {
|
66
|
+
acc[key] = IntervalDetails.fromPartial(value);
|
67
|
+
}
|
68
|
+
return acc;
|
69
|
+
}, {});
|
70
|
+
return message;
|
71
|
+
},
|
72
|
+
};
|
73
|
+
messageTypeRegistry.set("devvit.ui.effects.v1alpha.SetIntervalsEffect", SetIntervalsEffect);
|
74
|
+
function createBaseSetIntervalsEffect_IntervalsEntry() {
|
75
|
+
return { key: "", value: undefined };
|
76
|
+
}
|
77
|
+
export const SetIntervalsEffect_IntervalsEntry = {
|
78
|
+
$type: "devvit.ui.effects.v1alpha.SetIntervalsEffect.IntervalsEntry",
|
79
|
+
encode(message, writer = _m0.Writer.create()) {
|
80
|
+
if (message.key !== "") {
|
81
|
+
writer.uint32(10).string(message.key);
|
82
|
+
}
|
83
|
+
if (message.value !== undefined) {
|
84
|
+
IntervalDetails.encode(message.value, writer.uint32(18).fork()).ldelim();
|
85
|
+
}
|
86
|
+
return writer;
|
87
|
+
},
|
88
|
+
decode(input, length) {
|
89
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
90
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
91
|
+
const message = createBaseSetIntervalsEffect_IntervalsEntry();
|
92
|
+
while (reader.pos < end) {
|
93
|
+
const tag = reader.uint32();
|
94
|
+
switch (tag >>> 3) {
|
95
|
+
case 1:
|
96
|
+
message.key = reader.string();
|
97
|
+
break;
|
98
|
+
case 2:
|
99
|
+
message.value = IntervalDetails.decode(reader, reader.uint32());
|
100
|
+
break;
|
101
|
+
default:
|
102
|
+
reader.skipType(tag & 7);
|
103
|
+
break;
|
104
|
+
}
|
105
|
+
}
|
106
|
+
return message;
|
107
|
+
},
|
108
|
+
fromJSON(object) {
|
109
|
+
return {
|
110
|
+
key: isSet(object.key) ? String(object.key) : "",
|
111
|
+
value: isSet(object.value) ? IntervalDetails.fromJSON(object.value) : undefined,
|
112
|
+
};
|
113
|
+
},
|
114
|
+
toJSON(message) {
|
115
|
+
const obj = {};
|
116
|
+
message.key !== undefined && (obj.key = message.key);
|
117
|
+
message.value !== undefined && (obj.value = message.value ? IntervalDetails.toJSON(message.value) : undefined);
|
118
|
+
return obj;
|
119
|
+
},
|
120
|
+
fromPartial(object) {
|
121
|
+
const message = createBaseSetIntervalsEffect_IntervalsEntry();
|
122
|
+
message.key = object.key ?? "";
|
123
|
+
message.value = (object.value !== undefined && object.value !== null)
|
124
|
+
? IntervalDetails.fromPartial(object.value)
|
125
|
+
: undefined;
|
126
|
+
return message;
|
127
|
+
},
|
128
|
+
};
|
129
|
+
messageTypeRegistry.set("devvit.ui.effects.v1alpha.SetIntervalsEffect.IntervalsEntry", SetIntervalsEffect_IntervalsEntry);
|
130
|
+
function createBaseIntervalDetails() {
|
131
|
+
return { duration: undefined, queue: undefined };
|
132
|
+
}
|
133
|
+
export const IntervalDetails = {
|
134
|
+
$type: "devvit.ui.effects.v1alpha.IntervalDetails",
|
135
|
+
encode(message, writer = _m0.Writer.create()) {
|
136
|
+
if (message.duration !== undefined) {
|
137
|
+
Duration.encode(message.duration, writer.uint32(10).fork()).ldelim();
|
138
|
+
}
|
139
|
+
if (message.queue !== undefined) {
|
140
|
+
StringValue.encode({ value: message.queue }, writer.uint32(18).fork()).ldelim();
|
141
|
+
}
|
142
|
+
return writer;
|
143
|
+
},
|
144
|
+
decode(input, length) {
|
145
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
146
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
147
|
+
const message = createBaseIntervalDetails();
|
148
|
+
while (reader.pos < end) {
|
149
|
+
const tag = reader.uint32();
|
150
|
+
switch (tag >>> 3) {
|
151
|
+
case 1:
|
152
|
+
message.duration = Duration.decode(reader, reader.uint32());
|
153
|
+
break;
|
154
|
+
case 2:
|
155
|
+
message.queue = StringValue.decode(reader, reader.uint32()).value;
|
156
|
+
break;
|
157
|
+
default:
|
158
|
+
reader.skipType(tag & 7);
|
159
|
+
break;
|
160
|
+
}
|
161
|
+
}
|
162
|
+
return message;
|
163
|
+
},
|
164
|
+
fromJSON(object) {
|
165
|
+
return {
|
166
|
+
duration: isSet(object.duration) ? Duration.fromJSON(object.duration) : undefined,
|
167
|
+
queue: isSet(object.queue) ? String(object.queue) : undefined,
|
168
|
+
};
|
169
|
+
},
|
170
|
+
toJSON(message) {
|
171
|
+
const obj = {};
|
172
|
+
message.duration !== undefined && (obj.duration = message.duration ? Duration.toJSON(message.duration) : undefined);
|
173
|
+
message.queue !== undefined && (obj.queue = message.queue);
|
174
|
+
return obj;
|
175
|
+
},
|
176
|
+
fromPartial(object) {
|
177
|
+
const message = createBaseIntervalDetails();
|
178
|
+
message.duration = (object.duration !== undefined && object.duration !== null)
|
179
|
+
? Duration.fromPartial(object.duration)
|
180
|
+
: undefined;
|
181
|
+
message.queue = object.queue ?? undefined;
|
182
|
+
return message;
|
183
|
+
},
|
184
|
+
};
|
185
|
+
messageTypeRegistry.set("devvit.ui.effects.v1alpha.IntervalDetails", IntervalDetails);
|
186
|
+
function isObject(value) {
|
187
|
+
return typeof value === "object" && value !== null;
|
188
|
+
}
|
189
|
+
function isSet(value) {
|
190
|
+
return value !== null && value !== undefined;
|
191
|
+
}
|
@@ -89,7 +89,9 @@ export declare const SendEventEffect: {
|
|
89
89
|
details?: string | undefined;
|
90
90
|
} | undefined;
|
91
91
|
} | undefined;
|
92
|
+
timer?: {} | undefined;
|
92
93
|
queue?: string | undefined;
|
94
|
+
hook?: string | undefined;
|
93
95
|
} | undefined;
|
94
96
|
} & {
|
95
97
|
event?: ({
|
@@ -143,7 +145,9 @@ export declare const SendEventEffect: {
|
|
143
145
|
details?: string | undefined;
|
144
146
|
} | undefined;
|
145
147
|
} | undefined;
|
148
|
+
timer?: {} | undefined;
|
146
149
|
queue?: string | undefined;
|
150
|
+
hook?: string | undefined;
|
147
151
|
} & {
|
148
152
|
realtimeEvent?: ({
|
149
153
|
event?: {
|
@@ -508,8 +512,10 @@ export declare const SendEventEffect: {
|
|
508
512
|
details?: string | undefined;
|
509
513
|
} & { [K_32 in Exclude<keyof I["event"]["asyncResponse"]["error"], "$type" | keyof import("../../events/v1alpha/event.js").AsyncError>]: never; }) | undefined;
|
510
514
|
} & { [K_33 in Exclude<keyof I["event"]["asyncResponse"], "$type" | keyof import("../../events/v1alpha/event.js").AsyncResponse>]: never; }) | undefined;
|
515
|
+
timer?: ({} & {} & { [K_34 in Exclude<keyof I["event"]["timer"], "$type">]: never; }) | undefined;
|
511
516
|
queue?: string | undefined;
|
512
|
-
|
513
|
-
|
517
|
+
hook?: string | undefined;
|
518
|
+
} & { [K_35 in Exclude<keyof I["event"], "$type" | keyof UIEvent>]: never; }) | undefined;
|
519
|
+
} & { [K_36 in Exclude<keyof I, "$type" | "event">]: never; }>(object: I): SendEventEffect;
|
514
520
|
};
|
515
521
|
//# sourceMappingURL=send_event.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"send_event.d.ts","sourceRoot":"","sources":["../../../../../../src/types/devvit/ui/effects/v1alpha/send_event.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,GAAG,MAAM,uBAAuB,CAAC;AAExC,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAMD,eAAO,MAAM,eAAe;;oBAGV,eAAe,WAAU,IAAI,MAAM,GAAyB,IAAI,MAAM;kBAOxE,IAAI,MAAM,GAAG,UAAU,WAAW,MAAM,GAAG,eAAe;qBAkBvD,GAAG,GAAG,eAAe;oBAItB,eAAe,GAAG,OAAO
|
1
|
+
{"version":3,"file":"send_event.d.ts","sourceRoot":"","sources":["../../../../../../src/types/devvit/ui/effects/v1alpha/send_event.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,GAAG,MAAM,uBAAuB,CAAC;AAExC,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAMD,eAAO,MAAM,eAAe;;oBAGV,eAAe,WAAU,IAAI,MAAM,GAAyB,IAAI,MAAM;kBAOxE,IAAI,MAAM,GAAG,UAAU,WAAW,MAAM,GAAG,eAAe;qBAkBvD,GAAG,GAAG,eAAe;oBAItB,eAAe,GAAG,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+EAMiC,eAAe;CAO1F,CAAC"}
|
@@ -14,8 +14,14 @@ export interface UIEvent {
|
|
14
14
|
userAction?: UserAction | undefined;
|
15
15
|
asyncRequest?: AsyncRequest | undefined;
|
16
16
|
asyncResponse?: AsyncResponse | undefined;
|
17
|
+
timer?: TimerEvent | undefined;
|
17
18
|
/** The queue to which this event should be sent. If not set, the default queue is used. */
|
18
19
|
queue?: string;
|
20
|
+
/** The id of a the hook that should respond to this event */
|
21
|
+
hook?: string;
|
22
|
+
}
|
23
|
+
/** There's no data sent with the timer (yet?). Just knowing to fire it is enough. */
|
24
|
+
export interface TimerEvent {
|
19
25
|
}
|
20
26
|
export interface AsyncError {
|
21
27
|
message: string;
|
@@ -98,7 +104,9 @@ export declare const UIEvent: {
|
|
98
104
|
details?: string | undefined;
|
99
105
|
} | undefined;
|
100
106
|
} | undefined;
|
107
|
+
timer?: {} | undefined;
|
101
108
|
queue?: string | undefined;
|
109
|
+
hook?: string | undefined;
|
102
110
|
} & {
|
103
111
|
realtimeEvent?: ({
|
104
112
|
event?: {
|
@@ -510,8 +518,18 @@ export declare const UIEvent: {
|
|
510
518
|
details?: string | undefined;
|
511
519
|
} & { [K_35 in Exclude<keyof I["asyncResponse"]["error"], "$type" | keyof AsyncError>]: never; }) | undefined;
|
512
520
|
} & { [K_36 in Exclude<keyof I["asyncResponse"], "$type" | keyof AsyncResponse>]: never; }) | undefined;
|
521
|
+
timer?: ({} & {} & { [K_37 in Exclude<keyof I["timer"], "$type">]: never; }) | undefined;
|
513
522
|
queue?: string | undefined;
|
514
|
-
|
523
|
+
hook?: string | undefined;
|
524
|
+
} & { [K_38 in Exclude<keyof I, "$type" | keyof UIEvent>]: never; }>(object: I): UIEvent;
|
525
|
+
};
|
526
|
+
export declare const TimerEvent: {
|
527
|
+
$type: "devvit.ui.events.v1alpha.TimerEvent";
|
528
|
+
encode(_: TimerEvent, writer?: _m0.Writer): _m0.Writer;
|
529
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): TimerEvent;
|
530
|
+
fromJSON(_: any): TimerEvent;
|
531
|
+
toJSON(_: TimerEvent): unknown;
|
532
|
+
fromPartial<I extends {} & {} & { [K in Exclude<keyof I, "$type">]: never; }>(_: I): TimerEvent;
|
515
533
|
};
|
516
534
|
export declare const AsyncError: {
|
517
535
|
$type: "devvit.ui.events.v1alpha.AsyncError";
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../../../../../src/types/devvit/ui/events/v1alpha/event.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,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,
|
1
|
+
{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../../../../../src/types/devvit/ui/events/v1alpha/event.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,GAAG,MAAM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iC,UAAU;CAMhF,CAAC;AAQF,eAAO,MAAM,YAAY;;oBAGP,YAAY,WAAU,IAAI,MAAM,GAAyB,IAAI,MAAM;kBAUrE,IAAI,MAAM,GAAG,UAAU,WAAW,MAAM,GAAG,YAAY;qBAqBpD,GAAG,GAAG,YAAY;oBAOnB,YAAY,GAAG,OAAO;;;;;;;;;;;;;yFAOiC,YAAY;CAMpF,CAAC;AAQF,eAAO,MAAM,aAAa;;oBAGR,aAAa,WAAU,IAAI,MAAM,GAAyB,IAAI,MAAM;kBAatE,IAAI,MAAM,GAAG,UAAU,WAAW,MAAM,GAAG,aAAa;qBAwBrD,GAAG,GAAG,aAAa;oBAQpB,aAAa,GAAG,OAAO;;;;;;;;;;;;;;;;;;;;;;;;0FAQiC,aAAa;CAStF,CAAC;AAQF,eAAO,MAAM,UAAU;;oBAGL,UAAU,WAAU,IAAI,MAAM,GAAyB,IAAI,MAAM;kBAUnE,IAAI,MAAM,GAAG,UAAU,WAAW,MAAM,GAAG,UAAU;qBAqBlD,GAAG,GAAG,UAAU;oBAOjB,UAAU,GAAG,OAAO;;;;;;;;;;;;;uFAOiC,UAAU;CAMhF,CAAC"}
|
@@ -19,7 +19,9 @@ function createBaseUIEvent() {
|
|
19
19
|
userAction: undefined,
|
20
20
|
asyncRequest: undefined,
|
21
21
|
asyncResponse: undefined,
|
22
|
+
timer: undefined,
|
22
23
|
queue: undefined,
|
24
|
+
hook: undefined,
|
23
25
|
};
|
24
26
|
}
|
25
27
|
export const UIEvent = {
|
@@ -43,9 +45,15 @@ export const UIEvent = {
|
|
43
45
|
if (message.asyncResponse !== undefined) {
|
44
46
|
AsyncResponse.encode(message.asyncResponse, writer.uint32(66).fork()).ldelim();
|
45
47
|
}
|
48
|
+
if (message.timer !== undefined) {
|
49
|
+
TimerEvent.encode(message.timer, writer.uint32(98).fork()).ldelim();
|
50
|
+
}
|
46
51
|
if (message.queue !== undefined) {
|
47
52
|
StringValue.encode({ value: message.queue }, writer.uint32(74).fork()).ldelim();
|
48
53
|
}
|
54
|
+
if (message.hook !== undefined) {
|
55
|
+
StringValue.encode({ value: message.hook }, writer.uint32(82).fork()).ldelim();
|
56
|
+
}
|
49
57
|
return writer;
|
50
58
|
},
|
51
59
|
decode(input, length) {
|
@@ -73,9 +81,15 @@ export const UIEvent = {
|
|
73
81
|
case 8:
|
74
82
|
message.asyncResponse = AsyncResponse.decode(reader, reader.uint32());
|
75
83
|
break;
|
84
|
+
case 12:
|
85
|
+
message.timer = TimerEvent.decode(reader, reader.uint32());
|
86
|
+
break;
|
76
87
|
case 9:
|
77
88
|
message.queue = StringValue.decode(reader, reader.uint32()).value;
|
78
89
|
break;
|
90
|
+
case 10:
|
91
|
+
message.hook = StringValue.decode(reader, reader.uint32()).value;
|
92
|
+
break;
|
79
93
|
default:
|
80
94
|
reader.skipType(tag & 7);
|
81
95
|
break;
|
@@ -91,7 +105,9 @@ export const UIEvent = {
|
|
91
105
|
userAction: isSet(object.userAction) ? UserAction.fromJSON(object.userAction) : undefined,
|
92
106
|
asyncRequest: isSet(object.asyncRequest) ? AsyncRequest.fromJSON(object.asyncRequest) : undefined,
|
93
107
|
asyncResponse: isSet(object.asyncResponse) ? AsyncResponse.fromJSON(object.asyncResponse) : undefined,
|
108
|
+
timer: isSet(object.timer) ? TimerEvent.fromJSON(object.timer) : undefined,
|
94
109
|
queue: isSet(object.queue) ? String(object.queue) : undefined,
|
110
|
+
hook: isSet(object.hook) ? String(object.hook) : undefined,
|
95
111
|
};
|
96
112
|
},
|
97
113
|
toJSON(message) {
|
@@ -108,7 +124,9 @@ export const UIEvent = {
|
|
108
124
|
(obj.asyncRequest = message.asyncRequest ? AsyncRequest.toJSON(message.asyncRequest) : undefined);
|
109
125
|
message.asyncResponse !== undefined &&
|
110
126
|
(obj.asyncResponse = message.asyncResponse ? AsyncResponse.toJSON(message.asyncResponse) : undefined);
|
127
|
+
message.timer !== undefined && (obj.timer = message.timer ? TimerEvent.toJSON(message.timer) : undefined);
|
111
128
|
message.queue !== undefined && (obj.queue = message.queue);
|
129
|
+
message.hook !== undefined && (obj.hook = message.hook);
|
112
130
|
return obj;
|
113
131
|
},
|
114
132
|
fromPartial(object) {
|
@@ -131,11 +149,50 @@ export const UIEvent = {
|
|
131
149
|
message.asyncResponse = (object.asyncResponse !== undefined && object.asyncResponse !== null)
|
132
150
|
? AsyncResponse.fromPartial(object.asyncResponse)
|
133
151
|
: undefined;
|
152
|
+
message.timer = (object.timer !== undefined && object.timer !== null)
|
153
|
+
? TimerEvent.fromPartial(object.timer)
|
154
|
+
: undefined;
|
134
155
|
message.queue = object.queue ?? undefined;
|
156
|
+
message.hook = object.hook ?? undefined;
|
135
157
|
return message;
|
136
158
|
},
|
137
159
|
};
|
138
160
|
messageTypeRegistry.set("devvit.ui.events.v1alpha.UIEvent", UIEvent);
|
161
|
+
function createBaseTimerEvent() {
|
162
|
+
return {};
|
163
|
+
}
|
164
|
+
export const TimerEvent = {
|
165
|
+
$type: "devvit.ui.events.v1alpha.TimerEvent",
|
166
|
+
encode(_, writer = _m0.Writer.create()) {
|
167
|
+
return writer;
|
168
|
+
},
|
169
|
+
decode(input, length) {
|
170
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
171
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
172
|
+
const message = createBaseTimerEvent();
|
173
|
+
while (reader.pos < end) {
|
174
|
+
const tag = reader.uint32();
|
175
|
+
switch (tag >>> 3) {
|
176
|
+
default:
|
177
|
+
reader.skipType(tag & 7);
|
178
|
+
break;
|
179
|
+
}
|
180
|
+
}
|
181
|
+
return message;
|
182
|
+
},
|
183
|
+
fromJSON(_) {
|
184
|
+
return {};
|
185
|
+
},
|
186
|
+
toJSON(_) {
|
187
|
+
const obj = {};
|
188
|
+
return obj;
|
189
|
+
},
|
190
|
+
fromPartial(_) {
|
191
|
+
const message = createBaseTimerEvent();
|
192
|
+
return message;
|
193
|
+
},
|
194
|
+
};
|
195
|
+
messageTypeRegistry.set("devvit.ui.events.v1alpha.TimerEvent", TimerEvent);
|
139
196
|
function createBaseAsyncError() {
|
140
197
|
return { message: "", details: "" };
|
141
198
|
}
|