@devvit/protos 0.12.0-next-2025-03-31-81fa43e0f.0 → 0.12.0-next-2025-04-10-a27f59c35.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/index.d.ts +2 -0
- package/index.d.ts.map +1 -1
- package/index.js +1 -0
- package/meta.min.json +35 -5
- package/package.json +5 -5
- package/protos.min.js +1 -1
- package/protos.min.js.map +4 -4
- package/schema/devvit/actor/webbit/webbit.proto +34 -0
- package/schema/devvit/dev_portal/nutrition/nutrition.proto +2 -0
- package/schema/devvit/plugin/useractions/useractions.proto +18 -0
- package/schema/devvit/ui/effects/web_view/v1alpha/post_message.proto +19 -1
- package/schema/snootobuf.devenv.lock +1390 -91
- package/schema/snootobuf.lock +1394 -91
- package/schema/snootobuf.redditapi.lock +1386 -91
- package/schema/snootobuf.ts.lock +1392 -91
- package/types/devvit/actor/webbit/webbit.d.ts +131 -0
- package/types/devvit/actor/webbit/webbit.d.ts.map +1 -0
- package/types/devvit/actor/webbit/webbit.js +485 -0
- package/types/devvit/actor/webbit/webbit.twirp-client.d.ts +19 -0
- package/types/devvit/actor/webbit/webbit.twirp-client.d.ts.map +1 -0
- package/types/devvit/actor/webbit/webbit.twirp-client.js +23 -0
- package/types/devvit/actor/webbit/webbit.twirp.d.ts +12 -0
- package/types/devvit/actor/webbit/webbit.twirp.d.ts.map +1 -0
- package/types/devvit/actor/webbit/webbit.twirp.js +88 -0
- package/types/devvit/dev_portal/nutrition/nutrition.d.ts +2 -0
- package/types/devvit/dev_portal/nutrition/nutrition.d.ts.map +1 -1
- package/types/devvit/dev_portal/nutrition/nutrition.js +7 -0
- package/types/devvit/plugin/useractions/useractions.d.ts +576 -0
- package/types/devvit/plugin/useractions/useractions.d.ts.map +1 -0
- package/types/devvit/plugin/useractions/useractions.js +66 -0
- package/types/devvit/plugin/useractions/useractions.twirp-client.d.ts +25 -0
- package/types/devvit/plugin/useractions/useractions.twirp-client.d.ts.map +1 -0
- package/types/devvit/plugin/useractions/useractions.twirp-client.js +47 -0
- package/types/devvit/plugin/useractions/useractions.twirp.d.ts +16 -0
- package/types/devvit/plugin/useractions/useractions.twirp.d.ts.map +1 -0
- package/types/devvit/plugin/useractions/useractions.twirp.js +222 -0
- package/types/devvit/ui/effects/web_view/v1alpha/post_message.d.ts +29 -0
- package/types/devvit/ui/effects/web_view/v1alpha/post_message.d.ts.map +1 -1
- package/types/devvit/ui/effects/web_view/v1alpha/post_message.js +108 -0
@@ -0,0 +1,576 @@
|
|
1
|
+
/**
|
2
|
+
* #useractions.ts
|
3
|
+
*
|
4
|
+
* @packageDocumentation
|
5
|
+
*/
|
6
|
+
import _m0 from "protobufjs/minimal.js";
|
7
|
+
import { Metadata } from "../../../../lib/Types.js";
|
8
|
+
import { CommentRequest, JsonWrappedComment, SubmitRequest, SubmitResponse } from "../redditapi/linksandcomments/linksandcomments_msg.js";
|
9
|
+
/** Service for performing actions on behalf of the User. */
|
10
|
+
export interface UserActions {
|
11
|
+
/** Submit a new Comment on behalf of the User */
|
12
|
+
Comment(request: CommentRequest, metadata?: Metadata): Promise<JsonWrappedComment>;
|
13
|
+
/** Create a new Post on behalf of the User */
|
14
|
+
Submit(request: SubmitRequest, metadata?: Metadata): Promise<SubmitResponse>;
|
15
|
+
/** Create a new custom Post on behalf of the User */
|
16
|
+
SubmitCustomPost(request: SubmitRequest, metadata?: Metadata): Promise<SubmitResponse>;
|
17
|
+
}
|
18
|
+
export declare const UserActionsServiceName = "devvit.plugin.useractions.UserActions";
|
19
|
+
export declare class UserActionsClientImpl implements UserActions {
|
20
|
+
private readonly rpc;
|
21
|
+
private readonly service;
|
22
|
+
constructor(rpc: Rpc, opts?: {
|
23
|
+
service?: string;
|
24
|
+
});
|
25
|
+
Comment(request: CommentRequest, metadata?: Metadata): Promise<JsonWrappedComment>;
|
26
|
+
Submit(request: SubmitRequest, metadata?: Metadata): Promise<SubmitResponse>;
|
27
|
+
SubmitCustomPost(request: SubmitRequest, metadata?: Metadata): Promise<SubmitResponse>;
|
28
|
+
}
|
29
|
+
/** Service for performing actions on behalf of the User. */
|
30
|
+
export type UserActionsDefinition = typeof UserActionsDefinition;
|
31
|
+
export declare const UserActionsDefinition: {
|
32
|
+
readonly name: "UserActions";
|
33
|
+
readonly fullName: "devvit.plugin.useractions.UserActions";
|
34
|
+
readonly methods: {
|
35
|
+
/** Submit a new Comment on behalf of the User */
|
36
|
+
readonly comment: {
|
37
|
+
readonly name: "Comment";
|
38
|
+
readonly requestType: {
|
39
|
+
$type: "devvit.plugin.redditapi.linksandcomments.CommentRequest";
|
40
|
+
encode(message: CommentRequest, writer?: _m0.Writer): _m0.Writer;
|
41
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): CommentRequest;
|
42
|
+
fromJSON(object: any): CommentRequest;
|
43
|
+
toJSON(message: CommentRequest): unknown;
|
44
|
+
create(base?: {
|
45
|
+
richtextJson?: string | undefined;
|
46
|
+
text?: string;
|
47
|
+
thingId?: string;
|
48
|
+
runAs?: import("../redditapi/common/common_msg.js").RunAs;
|
49
|
+
} | undefined): CommentRequest;
|
50
|
+
fromPartial(object: {
|
51
|
+
richtextJson?: string | undefined;
|
52
|
+
text?: string;
|
53
|
+
thingId?: string;
|
54
|
+
runAs?: import("../redditapi/common/common_msg.js").RunAs;
|
55
|
+
}): CommentRequest;
|
56
|
+
};
|
57
|
+
readonly requestStream: false;
|
58
|
+
readonly responseType: {
|
59
|
+
$type: "devvit.plugin.redditapi.linksandcomments.JsonWrappedComment";
|
60
|
+
encode(message: JsonWrappedComment, writer?: _m0.Writer): _m0.Writer;
|
61
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): JsonWrappedComment;
|
62
|
+
fromJSON(object: any): JsonWrappedComment;
|
63
|
+
toJSON(message: JsonWrappedComment): unknown;
|
64
|
+
create(base?: {
|
65
|
+
json?: {
|
66
|
+
errors?: string[];
|
67
|
+
data?: {
|
68
|
+
things?: {
|
69
|
+
kind?: string;
|
70
|
+
data?: {
|
71
|
+
allAwardings?: {
|
72
|
+
awardSubType?: string | undefined;
|
73
|
+
awardType?: string | undefined;
|
74
|
+
awardingsRequiredToGrantBenefits?: number | undefined;
|
75
|
+
coinPrice?: number | undefined;
|
76
|
+
coinReward?: number | undefined;
|
77
|
+
count?: number | undefined;
|
78
|
+
daysOfDripExtension?: number | undefined;
|
79
|
+
daysOfPremium?: number | undefined;
|
80
|
+
description?: string | undefined;
|
81
|
+
endDate?: string | undefined;
|
82
|
+
giverCoinReward?: number | undefined;
|
83
|
+
iconFormat?: string | undefined;
|
84
|
+
iconHeight?: number | undefined;
|
85
|
+
iconUrl?: string | undefined;
|
86
|
+
iconWidth?: number | undefined;
|
87
|
+
id?: string | undefined;
|
88
|
+
isEnabled?: boolean | undefined;
|
89
|
+
isNew?: boolean | undefined;
|
90
|
+
name?: string | undefined;
|
91
|
+
pennyDonate?: number | undefined;
|
92
|
+
pennyPrice?: number | undefined;
|
93
|
+
resizedIcons?: {
|
94
|
+
height?: number | undefined;
|
95
|
+
url?: string | undefined;
|
96
|
+
width?: number | undefined;
|
97
|
+
}[];
|
98
|
+
resizedStaticIcons?: {
|
99
|
+
height?: number | undefined;
|
100
|
+
url?: string | undefined;
|
101
|
+
width?: number | undefined;
|
102
|
+
}[];
|
103
|
+
startDate?: string | undefined;
|
104
|
+
staticIconHeight?: number | undefined;
|
105
|
+
staticIconUrl?: string | undefined;
|
106
|
+
staticIconWidth?: number | undefined;
|
107
|
+
stickyDurationSeconds?: number | undefined;
|
108
|
+
subredditCoinReward?: number | undefined;
|
109
|
+
subredditId?: string | undefined;
|
110
|
+
tiersByRequiredAwardings?: string | undefined;
|
111
|
+
}[];
|
112
|
+
approved?: boolean | undefined;
|
113
|
+
approvedAtUtc?: number | undefined;
|
114
|
+
approvedBy?: string | undefined;
|
115
|
+
archived?: boolean | undefined;
|
116
|
+
associatedAward?: string | undefined;
|
117
|
+
author?: string | undefined;
|
118
|
+
authorFlairBackgroundColor?: string | undefined;
|
119
|
+
authorFlairCssClass?: string | undefined;
|
120
|
+
authorFlairRichtext?: {
|
121
|
+
e?: string | undefined;
|
122
|
+
t?: string | undefined;
|
123
|
+
}[];
|
124
|
+
authorFlairTemplateId?: string | undefined;
|
125
|
+
authorFlairText?: string | undefined;
|
126
|
+
authorFlairTextColor?: string | undefined;
|
127
|
+
authorFlairType?: string | undefined;
|
128
|
+
authorFullname?: string | undefined;
|
129
|
+
authorIsBlocked?: boolean | undefined;
|
130
|
+
authorPatreonFlair?: boolean | undefined;
|
131
|
+
authorPremium?: boolean | undefined;
|
132
|
+
awarders?: string[];
|
133
|
+
bannedAtUtc?: number | undefined;
|
134
|
+
bannedBy?: string | undefined;
|
135
|
+
body?: string | undefined;
|
136
|
+
bodyHtml?: string | undefined;
|
137
|
+
canGild?: boolean | undefined;
|
138
|
+
canModPost?: boolean | undefined;
|
139
|
+
collapsed?: boolean | undefined;
|
140
|
+
collapsedBecauseCrowdControl?: boolean | undefined;
|
141
|
+
collapsedReason?: string | undefined;
|
142
|
+
collapsedReasonCode?: string | undefined;
|
143
|
+
commentType?: string | undefined;
|
144
|
+
controversiality?: number | undefined;
|
145
|
+
created?: number | undefined;
|
146
|
+
createdUtc?: number | undefined;
|
147
|
+
depth?: number | undefined;
|
148
|
+
distinguished?: string | undefined;
|
149
|
+
downs?: number | undefined;
|
150
|
+
edited?: boolean | undefined;
|
151
|
+
gilded?: number | undefined;
|
152
|
+
gildings?: {
|
153
|
+
gid1?: number | undefined;
|
154
|
+
gid2?: number | undefined;
|
155
|
+
gid3?: number | undefined;
|
156
|
+
} | undefined;
|
157
|
+
id?: string | undefined;
|
158
|
+
ignoreReports?: boolean | undefined;
|
159
|
+
isSubmitter?: boolean | undefined;
|
160
|
+
likes?: boolean | undefined;
|
161
|
+
linkId?: string | undefined;
|
162
|
+
locked?: boolean | undefined;
|
163
|
+
modNote?: string | undefined;
|
164
|
+
modReasonBy?: string | undefined;
|
165
|
+
modReasonTitle?: string | undefined;
|
166
|
+
modReports?: any[][];
|
167
|
+
name?: string | undefined;
|
168
|
+
noFollow?: boolean | undefined;
|
169
|
+
numReports?: number | undefined;
|
170
|
+
parentId?: string | undefined;
|
171
|
+
permalink?: string | undefined;
|
172
|
+
removalReason?: string | undefined;
|
173
|
+
removed?: boolean | undefined;
|
174
|
+
replies?: string | undefined;
|
175
|
+
reportReasons?: string[];
|
176
|
+
rteMode?: string | undefined;
|
177
|
+
saved?: boolean | undefined;
|
178
|
+
score?: number | undefined;
|
179
|
+
scoreHidden?: boolean | undefined;
|
180
|
+
sendReplies?: boolean | undefined;
|
181
|
+
spam?: boolean | undefined;
|
182
|
+
stickied?: boolean | undefined;
|
183
|
+
subreddit?: string | undefined;
|
184
|
+
subredditId?: string | undefined;
|
185
|
+
subredditNamePrefixed?: string | undefined;
|
186
|
+
subredditType?: string | undefined;
|
187
|
+
topAwardedType?: string | undefined;
|
188
|
+
totalAwardsReceived?: number | undefined;
|
189
|
+
treatmentTags?: string[];
|
190
|
+
unrepliableReason?: string | undefined;
|
191
|
+
ups?: number | undefined;
|
192
|
+
userReports?: any[][];
|
193
|
+
count?: number | undefined;
|
194
|
+
children?: string[];
|
195
|
+
banInfo?: {
|
196
|
+
auto?: boolean | undefined;
|
197
|
+
bannedAt?: number | undefined;
|
198
|
+
banner?: string | undefined;
|
199
|
+
moderatorBanned?: boolean | undefined;
|
200
|
+
note?: string | undefined;
|
201
|
+
unbanner?: string | undefined;
|
202
|
+
unbannedAt?: number | undefined;
|
203
|
+
resetUsed?: boolean | undefined;
|
204
|
+
reasonId?: string | undefined;
|
205
|
+
reasonTitle?: string | undefined;
|
206
|
+
reasonMessage?: string | undefined;
|
207
|
+
reasonBy?: string | undefined;
|
208
|
+
modNote?: string | undefined;
|
209
|
+
banAllTriggered?: boolean | undefined;
|
210
|
+
subredditMessage?: string | undefined;
|
211
|
+
removeAction?: import("../../reddit/common.js").BanInfo_BanInfoAction;
|
212
|
+
} | undefined;
|
213
|
+
markedSpam?: boolean | undefined;
|
214
|
+
verdict?: string | undefined;
|
215
|
+
} | undefined;
|
216
|
+
}[];
|
217
|
+
} | undefined;
|
218
|
+
} | undefined;
|
219
|
+
} | undefined): JsonWrappedComment;
|
220
|
+
fromPartial(object: {
|
221
|
+
json?: {
|
222
|
+
errors?: string[];
|
223
|
+
data?: {
|
224
|
+
things?: {
|
225
|
+
kind?: string;
|
226
|
+
data?: {
|
227
|
+
allAwardings?: {
|
228
|
+
awardSubType?: string | undefined;
|
229
|
+
awardType?: string | undefined;
|
230
|
+
awardingsRequiredToGrantBenefits?: number | undefined;
|
231
|
+
coinPrice?: number | undefined;
|
232
|
+
coinReward?: number | undefined;
|
233
|
+
count?: number | undefined;
|
234
|
+
daysOfDripExtension?: number | undefined;
|
235
|
+
daysOfPremium?: number | undefined;
|
236
|
+
description?: string | undefined;
|
237
|
+
endDate?: string | undefined;
|
238
|
+
giverCoinReward?: number | undefined;
|
239
|
+
iconFormat?: string | undefined;
|
240
|
+
iconHeight?: number | undefined;
|
241
|
+
iconUrl?: string | undefined;
|
242
|
+
iconWidth?: number | undefined;
|
243
|
+
id?: string | undefined;
|
244
|
+
isEnabled?: boolean | undefined;
|
245
|
+
isNew?: boolean | undefined;
|
246
|
+
name?: string | undefined;
|
247
|
+
pennyDonate?: number | undefined;
|
248
|
+
pennyPrice?: number | undefined;
|
249
|
+
resizedIcons?: {
|
250
|
+
height?: number | undefined;
|
251
|
+
url?: string | undefined;
|
252
|
+
width?: number | undefined;
|
253
|
+
}[];
|
254
|
+
resizedStaticIcons?: {
|
255
|
+
height?: number | undefined;
|
256
|
+
url?: string | undefined;
|
257
|
+
width?: number | undefined;
|
258
|
+
}[];
|
259
|
+
startDate?: string | undefined;
|
260
|
+
staticIconHeight?: number | undefined;
|
261
|
+
staticIconUrl?: string | undefined;
|
262
|
+
staticIconWidth?: number | undefined;
|
263
|
+
stickyDurationSeconds?: number | undefined;
|
264
|
+
subredditCoinReward?: number | undefined;
|
265
|
+
subredditId?: string | undefined;
|
266
|
+
tiersByRequiredAwardings?: string | undefined;
|
267
|
+
}[];
|
268
|
+
approved?: boolean | undefined;
|
269
|
+
approvedAtUtc?: number | undefined;
|
270
|
+
approvedBy?: string | undefined;
|
271
|
+
archived?: boolean | undefined;
|
272
|
+
associatedAward?: string | undefined;
|
273
|
+
author?: string | undefined;
|
274
|
+
authorFlairBackgroundColor?: string | undefined;
|
275
|
+
authorFlairCssClass?: string | undefined;
|
276
|
+
authorFlairRichtext?: {
|
277
|
+
e?: string | undefined;
|
278
|
+
t?: string | undefined;
|
279
|
+
}[];
|
280
|
+
authorFlairTemplateId?: string | undefined;
|
281
|
+
authorFlairText?: string | undefined;
|
282
|
+
authorFlairTextColor?: string | undefined;
|
283
|
+
authorFlairType?: string | undefined;
|
284
|
+
authorFullname?: string | undefined;
|
285
|
+
authorIsBlocked?: boolean | undefined;
|
286
|
+
authorPatreonFlair?: boolean | undefined;
|
287
|
+
authorPremium?: boolean | undefined;
|
288
|
+
awarders?: string[];
|
289
|
+
bannedAtUtc?: number | undefined;
|
290
|
+
bannedBy?: string | undefined;
|
291
|
+
body?: string | undefined;
|
292
|
+
bodyHtml?: string | undefined;
|
293
|
+
canGild?: boolean | undefined;
|
294
|
+
canModPost?: boolean | undefined;
|
295
|
+
collapsed?: boolean | undefined;
|
296
|
+
collapsedBecauseCrowdControl?: boolean | undefined;
|
297
|
+
collapsedReason?: string | undefined;
|
298
|
+
collapsedReasonCode?: string | undefined;
|
299
|
+
commentType?: string | undefined;
|
300
|
+
controversiality?: number | undefined;
|
301
|
+
created?: number | undefined;
|
302
|
+
createdUtc?: number | undefined;
|
303
|
+
depth?: number | undefined;
|
304
|
+
distinguished?: string | undefined;
|
305
|
+
downs?: number | undefined;
|
306
|
+
edited?: boolean | undefined;
|
307
|
+
gilded?: number | undefined;
|
308
|
+
gildings?: {
|
309
|
+
gid1?: number | undefined;
|
310
|
+
gid2?: number | undefined;
|
311
|
+
gid3?: number | undefined;
|
312
|
+
} | undefined;
|
313
|
+
id?: string | undefined;
|
314
|
+
ignoreReports?: boolean | undefined;
|
315
|
+
isSubmitter?: boolean | undefined;
|
316
|
+
likes?: boolean | undefined;
|
317
|
+
linkId?: string | undefined;
|
318
|
+
locked?: boolean | undefined;
|
319
|
+
modNote?: string | undefined;
|
320
|
+
modReasonBy?: string | undefined;
|
321
|
+
modReasonTitle?: string | undefined;
|
322
|
+
modReports?: any[][];
|
323
|
+
name?: string | undefined;
|
324
|
+
noFollow?: boolean | undefined;
|
325
|
+
numReports?: number | undefined;
|
326
|
+
parentId?: string | undefined;
|
327
|
+
permalink?: string | undefined;
|
328
|
+
removalReason?: string | undefined;
|
329
|
+
removed?: boolean | undefined;
|
330
|
+
replies?: string | undefined;
|
331
|
+
reportReasons?: string[];
|
332
|
+
rteMode?: string | undefined;
|
333
|
+
saved?: boolean | undefined;
|
334
|
+
score?: number | undefined;
|
335
|
+
scoreHidden?: boolean | undefined;
|
336
|
+
sendReplies?: boolean | undefined;
|
337
|
+
spam?: boolean | undefined;
|
338
|
+
stickied?: boolean | undefined;
|
339
|
+
subreddit?: string | undefined;
|
340
|
+
subredditId?: string | undefined;
|
341
|
+
subredditNamePrefixed?: string | undefined;
|
342
|
+
subredditType?: string | undefined;
|
343
|
+
topAwardedType?: string | undefined;
|
344
|
+
totalAwardsReceived?: number | undefined;
|
345
|
+
treatmentTags?: string[];
|
346
|
+
unrepliableReason?: string | undefined;
|
347
|
+
ups?: number | undefined;
|
348
|
+
userReports?: any[][];
|
349
|
+
count?: number | undefined;
|
350
|
+
children?: string[];
|
351
|
+
banInfo?: {
|
352
|
+
auto?: boolean | undefined;
|
353
|
+
bannedAt?: number | undefined;
|
354
|
+
banner?: string | undefined;
|
355
|
+
moderatorBanned?: boolean | undefined;
|
356
|
+
note?: string | undefined;
|
357
|
+
unbanner?: string | undefined;
|
358
|
+
unbannedAt?: number | undefined;
|
359
|
+
resetUsed?: boolean | undefined;
|
360
|
+
reasonId?: string | undefined;
|
361
|
+
reasonTitle?: string | undefined;
|
362
|
+
reasonMessage?: string | undefined;
|
363
|
+
reasonBy?: string | undefined;
|
364
|
+
modNote?: string | undefined;
|
365
|
+
banAllTriggered?: boolean | undefined;
|
366
|
+
subredditMessage?: string | undefined;
|
367
|
+
removeAction?: import("../../reddit/common.js").BanInfo_BanInfoAction;
|
368
|
+
} | undefined;
|
369
|
+
markedSpam?: boolean | undefined;
|
370
|
+
verdict?: string | undefined;
|
371
|
+
} | undefined;
|
372
|
+
}[];
|
373
|
+
} | undefined;
|
374
|
+
} | undefined;
|
375
|
+
}): JsonWrappedComment;
|
376
|
+
};
|
377
|
+
readonly responseStream: false;
|
378
|
+
readonly options: {};
|
379
|
+
};
|
380
|
+
/** Create a new Post on behalf of the User */
|
381
|
+
readonly submit: {
|
382
|
+
readonly name: "Submit";
|
383
|
+
readonly requestType: {
|
384
|
+
$type: "devvit.plugin.redditapi.linksandcomments.SubmitRequest";
|
385
|
+
encode(message: SubmitRequest, writer?: _m0.Writer): _m0.Writer;
|
386
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): SubmitRequest;
|
387
|
+
fromJSON(object: any): SubmitRequest;
|
388
|
+
toJSON(message: SubmitRequest): unknown;
|
389
|
+
create(base?: {
|
390
|
+
collectionId?: string | undefined;
|
391
|
+
flairId?: string | undefined;
|
392
|
+
flairText?: string | undefined;
|
393
|
+
kind?: string;
|
394
|
+
nsfw?: boolean | undefined;
|
395
|
+
richtextJson?: string | undefined;
|
396
|
+
sendreplies?: boolean | undefined;
|
397
|
+
spoiler?: boolean | undefined;
|
398
|
+
sr?: string;
|
399
|
+
text?: string | undefined;
|
400
|
+
title?: string;
|
401
|
+
url?: string | undefined;
|
402
|
+
videoPosterUrl?: string | undefined;
|
403
|
+
crosspostFullname?: string | undefined;
|
404
|
+
richtextFallback?: string | undefined;
|
405
|
+
imageUrls?: any[] | undefined;
|
406
|
+
runAs?: import("../redditapi/common/common_msg.js").RunAs;
|
407
|
+
userGeneratedContent?: {
|
408
|
+
text?: string;
|
409
|
+
imageUrls?: string[];
|
410
|
+
} | undefined;
|
411
|
+
} | undefined): SubmitRequest;
|
412
|
+
fromPartial(object: {
|
413
|
+
collectionId?: string | undefined;
|
414
|
+
flairId?: string | undefined;
|
415
|
+
flairText?: string | undefined;
|
416
|
+
kind?: string;
|
417
|
+
nsfw?: boolean | undefined;
|
418
|
+
richtextJson?: string | undefined;
|
419
|
+
sendreplies?: boolean | undefined;
|
420
|
+
spoiler?: boolean | undefined;
|
421
|
+
sr?: string;
|
422
|
+
text?: string | undefined;
|
423
|
+
title?: string;
|
424
|
+
url?: string | undefined;
|
425
|
+
videoPosterUrl?: string | undefined;
|
426
|
+
crosspostFullname?: string | undefined;
|
427
|
+
richtextFallback?: string | undefined;
|
428
|
+
imageUrls?: any[] | undefined;
|
429
|
+
runAs?: import("../redditapi/common/common_msg.js").RunAs;
|
430
|
+
userGeneratedContent?: {
|
431
|
+
text?: string;
|
432
|
+
imageUrls?: string[];
|
433
|
+
} | undefined;
|
434
|
+
}): SubmitRequest;
|
435
|
+
};
|
436
|
+
readonly requestStream: false;
|
437
|
+
readonly responseType: {
|
438
|
+
$type: "devvit.plugin.redditapi.linksandcomments.SubmitResponse";
|
439
|
+
encode(message: SubmitResponse, writer?: _m0.Writer): _m0.Writer;
|
440
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): SubmitResponse;
|
441
|
+
fromJSON(object: any): SubmitResponse;
|
442
|
+
toJSON(message: SubmitResponse): unknown;
|
443
|
+
create(base?: {
|
444
|
+
json?: {
|
445
|
+
errors?: {
|
446
|
+
typeUrl?: string;
|
447
|
+
value?: Uint8Array;
|
448
|
+
}[];
|
449
|
+
data?: {
|
450
|
+
url?: string | undefined;
|
451
|
+
draftsCount?: number | undefined;
|
452
|
+
id?: string | undefined;
|
453
|
+
name?: string | undefined;
|
454
|
+
} | undefined;
|
455
|
+
} | undefined;
|
456
|
+
} | undefined): SubmitResponse;
|
457
|
+
fromPartial(object: {
|
458
|
+
json?: {
|
459
|
+
errors?: {
|
460
|
+
typeUrl?: string;
|
461
|
+
value?: Uint8Array;
|
462
|
+
}[];
|
463
|
+
data?: {
|
464
|
+
url?: string | undefined;
|
465
|
+
draftsCount?: number | undefined;
|
466
|
+
id?: string | undefined;
|
467
|
+
name?: string | undefined;
|
468
|
+
} | undefined;
|
469
|
+
} | undefined;
|
470
|
+
}): SubmitResponse;
|
471
|
+
};
|
472
|
+
readonly responseStream: false;
|
473
|
+
readonly options: {};
|
474
|
+
};
|
475
|
+
/** Create a new custom Post on behalf of the User */
|
476
|
+
readonly submitCustomPost: {
|
477
|
+
readonly name: "SubmitCustomPost";
|
478
|
+
readonly requestType: {
|
479
|
+
$type: "devvit.plugin.redditapi.linksandcomments.SubmitRequest";
|
480
|
+
encode(message: SubmitRequest, writer?: _m0.Writer): _m0.Writer;
|
481
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): SubmitRequest;
|
482
|
+
fromJSON(object: any): SubmitRequest;
|
483
|
+
toJSON(message: SubmitRequest): unknown;
|
484
|
+
create(base?: {
|
485
|
+
collectionId?: string | undefined;
|
486
|
+
flairId?: string | undefined;
|
487
|
+
flairText?: string | undefined;
|
488
|
+
kind?: string;
|
489
|
+
nsfw?: boolean | undefined;
|
490
|
+
richtextJson?: string | undefined;
|
491
|
+
sendreplies?: boolean | undefined;
|
492
|
+
spoiler?: boolean | undefined;
|
493
|
+
sr?: string;
|
494
|
+
text?: string | undefined;
|
495
|
+
title?: string;
|
496
|
+
url?: string | undefined;
|
497
|
+
videoPosterUrl?: string | undefined;
|
498
|
+
crosspostFullname?: string | undefined;
|
499
|
+
richtextFallback?: string | undefined;
|
500
|
+
imageUrls?: any[] | undefined;
|
501
|
+
runAs?: import("../redditapi/common/common_msg.js").RunAs;
|
502
|
+
userGeneratedContent?: {
|
503
|
+
text?: string;
|
504
|
+
imageUrls?: string[];
|
505
|
+
} | undefined;
|
506
|
+
} | undefined): SubmitRequest;
|
507
|
+
fromPartial(object: {
|
508
|
+
collectionId?: string | undefined;
|
509
|
+
flairId?: string | undefined;
|
510
|
+
flairText?: string | undefined;
|
511
|
+
kind?: string;
|
512
|
+
nsfw?: boolean | undefined;
|
513
|
+
richtextJson?: string | undefined;
|
514
|
+
sendreplies?: boolean | undefined;
|
515
|
+
spoiler?: boolean | undefined;
|
516
|
+
sr?: string;
|
517
|
+
text?: string | undefined;
|
518
|
+
title?: string;
|
519
|
+
url?: string | undefined;
|
520
|
+
videoPosterUrl?: string | undefined;
|
521
|
+
crosspostFullname?: string | undefined;
|
522
|
+
richtextFallback?: string | undefined;
|
523
|
+
imageUrls?: any[] | undefined;
|
524
|
+
runAs?: import("../redditapi/common/common_msg.js").RunAs;
|
525
|
+
userGeneratedContent?: {
|
526
|
+
text?: string;
|
527
|
+
imageUrls?: string[];
|
528
|
+
} | undefined;
|
529
|
+
}): SubmitRequest;
|
530
|
+
};
|
531
|
+
readonly requestStream: false;
|
532
|
+
readonly responseType: {
|
533
|
+
$type: "devvit.plugin.redditapi.linksandcomments.SubmitResponse";
|
534
|
+
encode(message: SubmitResponse, writer?: _m0.Writer): _m0.Writer;
|
535
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): SubmitResponse;
|
536
|
+
fromJSON(object: any): SubmitResponse;
|
537
|
+
toJSON(message: SubmitResponse): unknown;
|
538
|
+
create(base?: {
|
539
|
+
json?: {
|
540
|
+
errors?: {
|
541
|
+
typeUrl?: string;
|
542
|
+
value?: Uint8Array;
|
543
|
+
}[];
|
544
|
+
data?: {
|
545
|
+
url?: string | undefined;
|
546
|
+
draftsCount?: number | undefined;
|
547
|
+
id?: string | undefined;
|
548
|
+
name?: string | undefined;
|
549
|
+
} | undefined;
|
550
|
+
} | undefined;
|
551
|
+
} | undefined): SubmitResponse;
|
552
|
+
fromPartial(object: {
|
553
|
+
json?: {
|
554
|
+
errors?: {
|
555
|
+
typeUrl?: string;
|
556
|
+
value?: Uint8Array;
|
557
|
+
}[];
|
558
|
+
data?: {
|
559
|
+
url?: string | undefined;
|
560
|
+
draftsCount?: number | undefined;
|
561
|
+
id?: string | undefined;
|
562
|
+
name?: string | undefined;
|
563
|
+
} | undefined;
|
564
|
+
} | undefined;
|
565
|
+
}): SubmitResponse;
|
566
|
+
};
|
567
|
+
readonly responseStream: false;
|
568
|
+
readonly options: {};
|
569
|
+
};
|
570
|
+
};
|
571
|
+
};
|
572
|
+
interface Rpc {
|
573
|
+
request(service: string, method: string, data: Uint8Array, metadata?: Metadata): Promise<Uint8Array>;
|
574
|
+
}
|
575
|
+
export {};
|
576
|
+
//# sourceMappingURL=useractions.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useractions.d.ts","sourceRoot":"","sources":["../../../../../src/types/devvit/plugin/useractions/useractions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,GAAG,MAAM,uBAAuB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,cAAc,EACf,MAAM,uDAAuD,CAAC;AAE/D,4DAA4D;AAC5D,MAAM,WAAW,WAAW;IAC1B,iDAAiD;IACjD,OAAO,CAAC,OAAO,EAAE,cAAc,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACnF,8CAA8C;IAC9C,MAAM,CAAC,OAAO,EAAE,aAAa,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IAC7E,qDAAqD;IACrD,gBAAgB,CAAC,OAAO,EAAE,aAAa,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;CACxF;AAED,eAAO,MAAM,sBAAsB,0CAA0C,CAAC;AAC9E,qBAAa,qBAAsB,YAAW,WAAW;IACvD,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAM;IAC1B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;gBACrB,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE;IAOjD,OAAO,CAAC,OAAO,EAAE,cAAc,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAMlF,MAAM,CAAC,OAAO,EAAE,aAAa,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,cAAc,CAAC;IAM5E,gBAAgB,CAAC,OAAO,EAAE,aAAa,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,cAAc,CAAC;CAKvF;AAED,4DAA4D;AAC5D,MAAM,MAAM,qBAAqB,GAAG,OAAO,qBAAqB,CAAC;AACjE,eAAO,MAAM,qBAAqB;;;;QAI9B,iDAAiD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QASjD,8CAA8C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAS9C,qDAAqD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAU/C,CAAC;AAEX,UAAU,GAAG;IACX,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;CACtG"}
|
@@ -0,0 +1,66 @@
|
|
1
|
+
/**
|
2
|
+
* #useractions.ts
|
3
|
+
*
|
4
|
+
* @packageDocumentation
|
5
|
+
*/
|
6
|
+
/* eslint-disable */
|
7
|
+
import _m0 from "protobufjs/minimal.js";
|
8
|
+
import { CommentRequest, JsonWrappedComment, SubmitRequest, SubmitResponse, } from "../redditapi/linksandcomments/linksandcomments_msg.js";
|
9
|
+
export const UserActionsServiceName = "devvit.plugin.useractions.UserActions";
|
10
|
+
export class UserActionsClientImpl {
|
11
|
+
constructor(rpc, opts) {
|
12
|
+
this.service = opts?.service || UserActionsServiceName;
|
13
|
+
this.rpc = rpc;
|
14
|
+
this.Comment = this.Comment.bind(this);
|
15
|
+
this.Submit = this.Submit.bind(this);
|
16
|
+
this.SubmitCustomPost = this.SubmitCustomPost.bind(this);
|
17
|
+
}
|
18
|
+
Comment(request, metadata) {
|
19
|
+
const data = CommentRequest.encode(request).finish();
|
20
|
+
const promise = this.rpc.request(this.service, "Comment", data, metadata);
|
21
|
+
return promise.then((data) => JsonWrappedComment.decode(_m0.Reader.create(data)));
|
22
|
+
}
|
23
|
+
Submit(request, metadata) {
|
24
|
+
const data = SubmitRequest.encode(request).finish();
|
25
|
+
const promise = this.rpc.request(this.service, "Submit", data, metadata);
|
26
|
+
return promise.then((data) => SubmitResponse.decode(_m0.Reader.create(data)));
|
27
|
+
}
|
28
|
+
SubmitCustomPost(request, metadata) {
|
29
|
+
const data = SubmitRequest.encode(request).finish();
|
30
|
+
const promise = this.rpc.request(this.service, "SubmitCustomPost", data, metadata);
|
31
|
+
return promise.then((data) => SubmitResponse.decode(_m0.Reader.create(data)));
|
32
|
+
}
|
33
|
+
}
|
34
|
+
export const UserActionsDefinition = {
|
35
|
+
name: "UserActions",
|
36
|
+
fullName: "devvit.plugin.useractions.UserActions",
|
37
|
+
methods: {
|
38
|
+
/** Submit a new Comment on behalf of the User */
|
39
|
+
comment: {
|
40
|
+
name: "Comment",
|
41
|
+
requestType: CommentRequest,
|
42
|
+
requestStream: false,
|
43
|
+
responseType: JsonWrappedComment,
|
44
|
+
responseStream: false,
|
45
|
+
options: {},
|
46
|
+
},
|
47
|
+
/** Create a new Post on behalf of the User */
|
48
|
+
submit: {
|
49
|
+
name: "Submit",
|
50
|
+
requestType: SubmitRequest,
|
51
|
+
requestStream: false,
|
52
|
+
responseType: SubmitResponse,
|
53
|
+
responseStream: false,
|
54
|
+
options: {},
|
55
|
+
},
|
56
|
+
/** Create a new custom Post on behalf of the User */
|
57
|
+
submitCustomPost: {
|
58
|
+
name: "SubmitCustomPost",
|
59
|
+
requestType: SubmitRequest,
|
60
|
+
requestStream: false,
|
61
|
+
responseType: SubmitResponse,
|
62
|
+
responseStream: false,
|
63
|
+
options: {},
|
64
|
+
},
|
65
|
+
},
|
66
|
+
};
|