@devvit/public-api 0.12.0-next-2025-04-10-a27f59c35.0 → 0.12.0-next-2025-04-10-eddbfb660.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/apis/reddit/RedditAPIClient.d.ts +40 -40
- package/apis/reddit/RedditAPIClient.js +35 -35
- package/apis/reddit/models/Flair.js +1 -1
- package/apis/reddit/models/ModMail.d.ts +23 -23
- package/apis/reddit/models/ModMail.js +23 -23
- package/apis/reddit/models/Post.d.ts +4 -4
- package/apis/reddit/models/Post.js +4 -4
- package/apis/reddit/models/Subreddit.d.ts +7 -7
- package/apis/reddit/models/Subreddit.js +2 -2
- package/apis/reddit/models/User.d.ts +1 -1
- package/apis/reddit/models/User.js +1 -1
- package/devvit/Devvit.d.ts +1 -1
- package/devvit/Devvit.js +1 -1
- package/meta.json +14 -14
- package/meta.min.json +8 -8
- package/package.json +7 -7
- package/public-api.d.ts +37 -37
- package/public-api.iife.js +33 -33
- package/public-api.min.js.map +1 -1
- package/types/media.d.ts +1 -1
package/meta.json
CHANGED
|
@@ -7264,7 +7264,7 @@
|
|
|
7264
7264
|
"format": "esm"
|
|
7265
7265
|
},
|
|
7266
7266
|
"src/types/media.ts": {
|
|
7267
|
-
"bytes":
|
|
7267
|
+
"bytes": 957,
|
|
7268
7268
|
"imports": [],
|
|
7269
7269
|
"format": "esm"
|
|
7270
7270
|
},
|
|
@@ -8763,7 +8763,7 @@
|
|
|
8763
8763
|
"format": "esm"
|
|
8764
8764
|
},
|
|
8765
8765
|
"src/devvit/Devvit.ts": {
|
|
8766
|
-
"bytes":
|
|
8766
|
+
"bytes": 34266,
|
|
8767
8767
|
"imports": [
|
|
8768
8768
|
{
|
|
8769
8769
|
"path": "../protos/dist/index.js",
|
|
@@ -8961,7 +8961,7 @@
|
|
|
8961
8961
|
"format": "esm"
|
|
8962
8962
|
},
|
|
8963
8963
|
"src/apis/reddit/models/Flair.ts": {
|
|
8964
|
-
"bytes":
|
|
8964
|
+
"bytes": 15845,
|
|
8965
8965
|
"imports": [
|
|
8966
8966
|
{
|
|
8967
8967
|
"path": "../protos/dist/index.js",
|
|
@@ -9013,7 +9013,7 @@
|
|
|
9013
9013
|
"format": "esm"
|
|
9014
9014
|
},
|
|
9015
9015
|
"src/apis/reddit/models/Post.ts": {
|
|
9016
|
-
"bytes":
|
|
9016
|
+
"bytes": 45108,
|
|
9017
9017
|
"imports": [
|
|
9018
9018
|
{
|
|
9019
9019
|
"path": "../protos/dist/index.js",
|
|
@@ -9114,7 +9114,7 @@
|
|
|
9114
9114
|
"format": "esm"
|
|
9115
9115
|
},
|
|
9116
9116
|
"src/apis/reddit/models/User.ts": {
|
|
9117
|
-
"bytes":
|
|
9117
|
+
"bytes": 20181,
|
|
9118
9118
|
"imports": [
|
|
9119
9119
|
{
|
|
9120
9120
|
"path": "../shared-types/dist/Header.js",
|
|
@@ -9257,7 +9257,7 @@
|
|
|
9257
9257
|
"format": "esm"
|
|
9258
9258
|
},
|
|
9259
9259
|
"src/apis/reddit/models/ModMail.ts": {
|
|
9260
|
-
"bytes":
|
|
9260
|
+
"bytes": 34422,
|
|
9261
9261
|
"imports": [
|
|
9262
9262
|
{
|
|
9263
9263
|
"path": "../protos/dist/index.js",
|
|
@@ -9329,7 +9329,7 @@
|
|
|
9329
9329
|
"format": "esm"
|
|
9330
9330
|
},
|
|
9331
9331
|
"src/apis/reddit/models/Subreddit.ts": {
|
|
9332
|
-
"bytes":
|
|
9332
|
+
"bytes": 40691,
|
|
9333
9333
|
"imports": [
|
|
9334
9334
|
{
|
|
9335
9335
|
"path": "../shared-types/dist/Header.js",
|
|
@@ -10325,7 +10325,7 @@
|
|
|
10325
10325
|
"bytesInOutput": 1424
|
|
10326
10326
|
},
|
|
10327
10327
|
"src/devvit/Devvit.ts": {
|
|
10328
|
-
"bytesInOutput":
|
|
10328
|
+
"bytesInOutput": 18942
|
|
10329
10329
|
},
|
|
10330
10330
|
"src/apis/reddit/helpers/makeGettersEnumerable.ts": {
|
|
10331
10331
|
"bytesInOutput": 344
|
|
@@ -10358,16 +10358,16 @@
|
|
|
10358
10358
|
"bytesInOutput": 661
|
|
10359
10359
|
},
|
|
10360
10360
|
"src/apis/reddit/models/Flair.ts": {
|
|
10361
|
-
"bytesInOutput":
|
|
10361
|
+
"bytesInOutput": 12087
|
|
10362
10362
|
},
|
|
10363
10363
|
"src/apis/reddit/models/Post.ts": {
|
|
10364
|
-
"bytesInOutput":
|
|
10364
|
+
"bytesInOutput": 36408
|
|
10365
10365
|
},
|
|
10366
10366
|
"src/apis/reddit/helpers/textFallbackToRichtext.ts": {
|
|
10367
10367
|
"bytesInOutput": 455
|
|
10368
10368
|
},
|
|
10369
10369
|
"src/apis/reddit/models/User.ts": {
|
|
10370
|
-
"bytesInOutput":
|
|
10370
|
+
"bytesInOutput": 17272
|
|
10371
10371
|
},
|
|
10372
10372
|
"src/apis/reddit/models/Comment.ts": {
|
|
10373
10373
|
"bytesInOutput": 22758
|
|
@@ -10379,13 +10379,13 @@
|
|
|
10379
10379
|
"bytesInOutput": 2781
|
|
10380
10380
|
},
|
|
10381
10381
|
"src/apis/reddit/models/ModMail.ts": {
|
|
10382
|
-
"bytesInOutput":
|
|
10382
|
+
"bytesInOutput": 27215
|
|
10383
10383
|
},
|
|
10384
10384
|
"src/apis/reddit/models/PrivateMessage.ts": {
|
|
10385
10385
|
"bytesInOutput": 3808
|
|
10386
10386
|
},
|
|
10387
10387
|
"src/apis/reddit/models/Subreddit.ts": {
|
|
10388
|
-
"bytesInOutput":
|
|
10388
|
+
"bytesInOutput": 26826
|
|
10389
10389
|
},
|
|
10390
10390
|
"src/apis/reddit/models/Widget.ts": {
|
|
10391
10391
|
"bytesInOutput": 18351
|
|
@@ -10412,7 +10412,7 @@
|
|
|
10412
10412
|
"bytesInOutput": 4013
|
|
10413
10413
|
}
|
|
10414
10414
|
},
|
|
10415
|
-
"bytes":
|
|
10415
|
+
"bytes": 12462117
|
|
10416
10416
|
}
|
|
10417
10417
|
}
|
|
10418
10418
|
}
|
package/meta.min.json
CHANGED
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"format": "esm"
|
|
84
84
|
},
|
|
85
85
|
"src/types/media.ts": {
|
|
86
|
-
"bytes":
|
|
86
|
+
"bytes": 957,
|
|
87
87
|
"imports": [],
|
|
88
88
|
"format": "esm"
|
|
89
89
|
},
|
|
@@ -1582,7 +1582,7 @@
|
|
|
1582
1582
|
"format": "esm"
|
|
1583
1583
|
},
|
|
1584
1584
|
"src/devvit/Devvit.ts": {
|
|
1585
|
-
"bytes":
|
|
1585
|
+
"bytes": 34266,
|
|
1586
1586
|
"imports": [
|
|
1587
1587
|
{
|
|
1588
1588
|
"path": "@devvit/protos",
|
|
@@ -1780,7 +1780,7 @@
|
|
|
1780
1780
|
"format": "esm"
|
|
1781
1781
|
},
|
|
1782
1782
|
"src/apis/reddit/models/Flair.ts": {
|
|
1783
|
-
"bytes":
|
|
1783
|
+
"bytes": 15845,
|
|
1784
1784
|
"imports": [
|
|
1785
1785
|
{
|
|
1786
1786
|
"path": "@devvit/protos",
|
|
@@ -1832,7 +1832,7 @@
|
|
|
1832
1832
|
"format": "esm"
|
|
1833
1833
|
},
|
|
1834
1834
|
"src/apis/reddit/models/Post.ts": {
|
|
1835
|
-
"bytes":
|
|
1835
|
+
"bytes": 45108,
|
|
1836
1836
|
"imports": [
|
|
1837
1837
|
{
|
|
1838
1838
|
"path": "@devvit/protos",
|
|
@@ -1933,7 +1933,7 @@
|
|
|
1933
1933
|
"format": "esm"
|
|
1934
1934
|
},
|
|
1935
1935
|
"src/apis/reddit/models/User.ts": {
|
|
1936
|
-
"bytes":
|
|
1936
|
+
"bytes": 20181,
|
|
1937
1937
|
"imports": [
|
|
1938
1938
|
{
|
|
1939
1939
|
"path": "../shared-types/dist/Header.js",
|
|
@@ -2076,7 +2076,7 @@
|
|
|
2076
2076
|
"format": "esm"
|
|
2077
2077
|
},
|
|
2078
2078
|
"src/apis/reddit/models/ModMail.ts": {
|
|
2079
|
-
"bytes":
|
|
2079
|
+
"bytes": 34422,
|
|
2080
2080
|
"imports": [
|
|
2081
2081
|
{
|
|
2082
2082
|
"path": "@devvit/protos",
|
|
@@ -2148,7 +2148,7 @@
|
|
|
2148
2148
|
"format": "esm"
|
|
2149
2149
|
},
|
|
2150
2150
|
"src/apis/reddit/models/Subreddit.ts": {
|
|
2151
|
-
"bytes":
|
|
2151
|
+
"bytes": 40691,
|
|
2152
2152
|
"imports": [
|
|
2153
2153
|
{
|
|
2154
2154
|
"path": "../shared-types/dist/Header.js",
|
|
@@ -2557,7 +2557,7 @@
|
|
|
2557
2557
|
"imports": [],
|
|
2558
2558
|
"exports": [],
|
|
2559
2559
|
"inputs": {},
|
|
2560
|
-
"bytes":
|
|
2560
|
+
"bytes": 1075021
|
|
2561
2561
|
},
|
|
2562
2562
|
"dist/public-api.min.js": {
|
|
2563
2563
|
"imports": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devvit/public-api",
|
|
3
|
-
"version": "0.12.0-next-2025-04-10-
|
|
3
|
+
"version": "0.12.0-next-2025-04-10-eddbfb660.0",
|
|
4
4
|
"license": "BSD-3-Clause",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -30,17 +30,17 @@
|
|
|
30
30
|
},
|
|
31
31
|
"types": "./index.d.ts",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@devvit/metrics": "0.12.0-next-2025-04-10-
|
|
34
|
-
"@devvit/protos": "0.12.0-next-2025-04-10-
|
|
35
|
-
"@devvit/shared-types": "0.12.0-next-2025-04-10-
|
|
33
|
+
"@devvit/metrics": "0.12.0-next-2025-04-10-eddbfb660.0",
|
|
34
|
+
"@devvit/protos": "0.12.0-next-2025-04-10-eddbfb660.0",
|
|
35
|
+
"@devvit/shared-types": "0.12.0-next-2025-04-10-eddbfb660.0",
|
|
36
36
|
"base64-js": "1.5.1",
|
|
37
37
|
"clone-deep": "4.0.1",
|
|
38
38
|
"moderndash": "4.0.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@ampproject/filesize": "4.3.0",
|
|
42
|
-
"@devvit/repo-tools": "0.12.0-next-2025-04-10-
|
|
43
|
-
"@devvit/tsconfig": "0.12.0-next-2025-04-10-
|
|
42
|
+
"@devvit/repo-tools": "0.12.0-next-2025-04-10-eddbfb660.0",
|
|
43
|
+
"@devvit/tsconfig": "0.12.0-next-2025-04-10-eddbfb660.0",
|
|
44
44
|
"@microsoft/api-extractor": "7.41.0",
|
|
45
45
|
"@reddit/faceplate-ui": "18.0.1",
|
|
46
46
|
"@types/clone-deep": "4.0.1",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
63
|
"source": "./src/index.ts",
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "de89eaee8a43daba789eba57cec4c0ed32007675"
|
|
65
65
|
}
|
package/public-api.d.ts
CHANGED
|
@@ -7795,7 +7795,7 @@ export declare class Devvit extends Actor {
|
|
|
7795
7795
|
* Devvit.addSchedulerJob({
|
|
7796
7796
|
* name: 'checkNewPosts',
|
|
7797
7797
|
* onRun: async (event, context) => {
|
|
7798
|
-
* const newPosts = await
|
|
7798
|
+
* const newPosts = await getNewPosts({ limit: 5 }).all();
|
|
7799
7799
|
* for (const post of newPosts) {
|
|
7800
7800
|
* if (post.title.includes('bad word')) {
|
|
7801
7801
|
* await post.remove();
|
|
@@ -21180,7 +21180,7 @@ export declare type MediaPlugin = {
|
|
|
21180
21180
|
* url: "https://media2.giphy.com/media/xTiN0CNHgoRf1Ha7CM/giphy.gif",
|
|
21181
21181
|
* type: "gif"
|
|
21182
21182
|
* });
|
|
21183
|
-
* await
|
|
21183
|
+
* await submitPost(
|
|
21184
21184
|
* {
|
|
21185
21185
|
* subredditName: subreddit.name,
|
|
21186
21186
|
* title: 'Hello World with Media',
|
|
@@ -25110,7 +25110,7 @@ export declare class ModMailService {
|
|
|
25110
25110
|
*
|
|
25111
25111
|
* @example
|
|
25112
25112
|
* ```ts
|
|
25113
|
-
* const conversationIds = await
|
|
25113
|
+
* const conversationIds = await modMail().bulkReadConversations(
|
|
25114
25114
|
* ['askReddit', 'myAwesomeSubreddit'],
|
|
25115
25115
|
* 'filtered'
|
|
25116
25116
|
* );
|
|
@@ -25128,7 +25128,7 @@ export declare class ModMailService {
|
|
|
25128
25128
|
*
|
|
25129
25129
|
* @example
|
|
25130
25130
|
* ```ts
|
|
25131
|
-
* const {viewerId, conversations} = await
|
|
25131
|
+
* const {viewerId, conversations} = await modMail().getConversations({
|
|
25132
25132
|
* after: 'abcdef',
|
|
25133
25133
|
* limit: 42
|
|
25134
25134
|
* });
|
|
@@ -25145,7 +25145,7 @@ export declare class ModMailService {
|
|
|
25145
25145
|
*
|
|
25146
25146
|
* @example
|
|
25147
25147
|
* ```ts
|
|
25148
|
-
* const { conversation, messages, modActions, user } = await
|
|
25148
|
+
* const { conversation, messages, modActions, user } = await modMail().getConversation({ conversationId: 'abcdef', markRead: true });
|
|
25149
25149
|
* ```
|
|
25150
25150
|
*/
|
|
25151
25151
|
getConversation(params: {
|
|
@@ -25159,7 +25159,7 @@ export declare class ModMailService {
|
|
|
25159
25159
|
*
|
|
25160
25160
|
* @example
|
|
25161
25161
|
* ```ts
|
|
25162
|
-
* const subredditsData = await
|
|
25162
|
+
* const subredditsData = await modMail().getSubreddits();
|
|
25163
25163
|
*
|
|
25164
25164
|
* for (const subreddit of Object.values(subreddits)) {
|
|
25165
25165
|
* console.log(subreddit.id);
|
|
@@ -25196,7 +25196,7 @@ export declare class ModMailService {
|
|
|
25196
25196
|
*
|
|
25197
25197
|
* @example
|
|
25198
25198
|
* ```ts
|
|
25199
|
-
* const { conversation, messages, modActions } = await
|
|
25199
|
+
* const { conversation, messages, modActions } = await modMail().createConversation({
|
|
25200
25200
|
* subredditName: 'askReddit',
|
|
25201
25201
|
* subject: 'Test conversation',
|
|
25202
25202
|
* body: 'Lorem ipsum sit amet',
|
|
@@ -25222,7 +25222,7 @@ export declare class ModMailService {
|
|
|
25222
25222
|
* @returns A Promise that resolves a string representing the conversationId of the message.
|
|
25223
25223
|
* @example
|
|
25224
25224
|
* ```ts
|
|
25225
|
-
* const conversationId = await
|
|
25225
|
+
* const conversationId = await modMail().createModDiscussionConversation({
|
|
25226
25226
|
* subject: 'Test conversation',
|
|
25227
25227
|
* bodyMarkdown: '**Hello there** \n\n _Have a great day!_',
|
|
25228
25228
|
* subredditId: context.subredditId
|
|
@@ -25243,7 +25243,7 @@ export declare class ModMailService {
|
|
|
25243
25243
|
* @returns A Promise that resolves a string representing the conversationId of the message.
|
|
25244
25244
|
* @example
|
|
25245
25245
|
* ```ts
|
|
25246
|
-
* const conversationId = await
|
|
25246
|
+
* const conversationId = await modMail().createModInboxConversation({
|
|
25247
25247
|
* subject: 'Test conversation',
|
|
25248
25248
|
* bodyMarkdown: '**Hello there** \n\n _Have a great day!_',
|
|
25249
25249
|
* subredditId: context.subredditId
|
|
@@ -25265,7 +25265,7 @@ export declare class ModMailService {
|
|
|
25265
25265
|
* @returns A Promise that resolves a string representing the conversationId of the message.
|
|
25266
25266
|
* @example
|
|
25267
25267
|
* ```ts
|
|
25268
|
-
* const conversationId = await
|
|
25268
|
+
* const conversationId = await modMail().createModNotification({
|
|
25269
25269
|
* subject: 'Test notification',
|
|
25270
25270
|
* bodyMarkdown: '**Hello there** \n\n _This is a notification!_',
|
|
25271
25271
|
* subredditId: context.subredditId
|
|
@@ -25287,7 +25287,7 @@ export declare class ModMailService {
|
|
|
25287
25287
|
*
|
|
25288
25288
|
* @example
|
|
25289
25289
|
* ```ts
|
|
25290
|
-
* await
|
|
25290
|
+
* await modMail().reply({
|
|
25291
25291
|
* body: 'Lorem ipsum sit amet',
|
|
25292
25292
|
* conversationId: 'abcdef',
|
|
25293
25293
|
* });
|
|
@@ -25306,7 +25306,7 @@ export declare class ModMailService {
|
|
|
25306
25306
|
*
|
|
25307
25307
|
* @example
|
|
25308
25308
|
* ```ts
|
|
25309
|
-
* await
|
|
25309
|
+
* await modMail().highlightConversation('abcdef');
|
|
25310
25310
|
* ```
|
|
25311
25311
|
*/
|
|
25312
25312
|
highlightConversation(conversationId: string): Promise<ConversationResponse>;
|
|
@@ -25317,7 +25317,7 @@ export declare class ModMailService {
|
|
|
25317
25317
|
*
|
|
25318
25318
|
* @example
|
|
25319
25319
|
* ```ts
|
|
25320
|
-
* await
|
|
25320
|
+
* await modMail().unhighlightConversation('abcdef');
|
|
25321
25321
|
* ```
|
|
25322
25322
|
*/
|
|
25323
25323
|
unhighlightConversation(conversationId: string): Promise<ConversationResponse>;
|
|
@@ -25328,7 +25328,7 @@ export declare class ModMailService {
|
|
|
25328
25328
|
*
|
|
25329
25329
|
* @example
|
|
25330
25330
|
* ```ts
|
|
25331
|
-
* await
|
|
25331
|
+
* await modMail().archive('abcdef');
|
|
25332
25332
|
* ```
|
|
25333
25333
|
*/
|
|
25334
25334
|
archiveConversation(conversationId: string): Promise<ConversationResponse>;
|
|
@@ -25339,7 +25339,7 @@ export declare class ModMailService {
|
|
|
25339
25339
|
*
|
|
25340
25340
|
* @example
|
|
25341
25341
|
* ```ts
|
|
25342
|
-
* await
|
|
25342
|
+
* await modMail().unarchiveConversation('abcdef');
|
|
25343
25343
|
* ```
|
|
25344
25344
|
*/
|
|
25345
25345
|
unarchiveConversation(conversationId: string): Promise<ConversationResponse>;
|
|
@@ -25351,7 +25351,7 @@ export declare class ModMailService {
|
|
|
25351
25351
|
*
|
|
25352
25352
|
* @example
|
|
25353
25353
|
* ```ts
|
|
25354
|
-
* await
|
|
25354
|
+
* await modMail().muteConversation({ conversationId: 'abcdef', numHours: 72 });
|
|
25355
25355
|
* ```
|
|
25356
25356
|
*/
|
|
25357
25357
|
muteConversation(params: {
|
|
@@ -25365,7 +25365,7 @@ export declare class ModMailService {
|
|
|
25365
25365
|
*
|
|
25366
25366
|
* @example
|
|
25367
25367
|
* ```ts
|
|
25368
|
-
* await
|
|
25368
|
+
* await modMail().unmuteConversation('abcdef');
|
|
25369
25369
|
* ```
|
|
25370
25370
|
*/
|
|
25371
25371
|
unmuteConversation(conversationId: string): Promise<ConversationResponse & WithUserData>;
|
|
@@ -25376,7 +25376,7 @@ export declare class ModMailService {
|
|
|
25376
25376
|
*
|
|
25377
25377
|
* @example
|
|
25378
25378
|
* ```ts
|
|
25379
|
-
* await
|
|
25379
|
+
* await modMail().readConversations(['abcdef', 'qwerty']);
|
|
25380
25380
|
* ```
|
|
25381
25381
|
*/
|
|
25382
25382
|
readConversations(conversationIds: string[]): Promise<void>;
|
|
@@ -25387,7 +25387,7 @@ export declare class ModMailService {
|
|
|
25387
25387
|
*
|
|
25388
25388
|
* @example
|
|
25389
25389
|
* ```ts
|
|
25390
|
-
* await
|
|
25390
|
+
* await modMail().unreadConversations(['abcdef', 'qwerty']);
|
|
25391
25391
|
* ```
|
|
25392
25392
|
*/
|
|
25393
25393
|
unreadConversations(conversationIds: string[]): Promise<void>;
|
|
@@ -25398,7 +25398,7 @@ export declare class ModMailService {
|
|
|
25398
25398
|
*
|
|
25399
25399
|
* @example
|
|
25400
25400
|
* ```ts
|
|
25401
|
-
* await
|
|
25401
|
+
* await modMail().approveConversation('abcdef');
|
|
25402
25402
|
* ```
|
|
25403
25403
|
*/
|
|
25404
25404
|
approveConversation(conversationId: string): Promise<ConversationResponse & WithUserData>;
|
|
@@ -25409,7 +25409,7 @@ export declare class ModMailService {
|
|
|
25409
25409
|
*
|
|
25410
25410
|
* @example
|
|
25411
25411
|
* ```ts
|
|
25412
|
-
* await
|
|
25412
|
+
* await modMail().disapproveConversation('abcdef');
|
|
25413
25413
|
* ```
|
|
25414
25414
|
*/
|
|
25415
25415
|
disapproveConversation(conversationId: string): Promise<ConversationResponse & WithUserData>;
|
|
@@ -25421,7 +25421,7 @@ export declare class ModMailService {
|
|
|
25421
25421
|
*
|
|
25422
25422
|
* @example
|
|
25423
25423
|
* ```ts
|
|
25424
|
-
* await
|
|
25424
|
+
* await modMail().tempBanConversation({ conversationId: 'abcdef', duration: 42 });
|
|
25425
25425
|
* ```
|
|
25426
25426
|
*/
|
|
25427
25427
|
tempBanConversation(params: {
|
|
@@ -25435,7 +25435,7 @@ export declare class ModMailService {
|
|
|
25435
25435
|
*
|
|
25436
25436
|
* @example
|
|
25437
25437
|
* ```ts
|
|
25438
|
-
* await
|
|
25438
|
+
* await modMail().unbanConversation('abcdef');
|
|
25439
25439
|
* ```
|
|
25440
25440
|
*/
|
|
25441
25441
|
unbanConversation(conversationId: string): Promise<ConversationResponse & WithUserData>;
|
|
@@ -25444,7 +25444,7 @@ export declare class ModMailService {
|
|
|
25444
25444
|
*
|
|
25445
25445
|
* @example
|
|
25446
25446
|
* ```ts
|
|
25447
|
-
* const response = await
|
|
25447
|
+
* const response = await modMail().getUnreadCount();
|
|
25448
25448
|
*
|
|
25449
25449
|
* console.log(response.highlighted);
|
|
25450
25450
|
* console.log(response.new);
|
|
@@ -25458,7 +25458,7 @@ export declare class ModMailService {
|
|
|
25458
25458
|
*
|
|
25459
25459
|
* @example
|
|
25460
25460
|
* ```ts
|
|
25461
|
-
* const data = await
|
|
25461
|
+
* const data = await modMail().getUserConversations('abcdef');
|
|
25462
25462
|
*
|
|
25463
25463
|
* console.log(data.recentComments);
|
|
25464
25464
|
* console.log(data.recentPosts);
|
|
@@ -35931,7 +35931,7 @@ export declare class Post {
|
|
|
35931
35931
|
* @throws {Error} Throws an error if the suggested sort could not be set.
|
|
35932
35932
|
* @example
|
|
35933
35933
|
* ```ts
|
|
35934
|
-
* const post = await
|
|
35934
|
+
* const post = await getPostById(context.postId);
|
|
35935
35935
|
* await post.setSuggestedCommentSort("NEW");
|
|
35936
35936
|
* ```
|
|
35937
35937
|
*/
|
|
@@ -35948,7 +35948,7 @@ export declare class Post {
|
|
|
35948
35948
|
* <text size="large">An updated preview!</text>
|
|
35949
35949
|
* </vstack>
|
|
35950
35950
|
* );
|
|
35951
|
-
* const post = await
|
|
35951
|
+
* const post = await getPostById(context.postId);
|
|
35952
35952
|
* await post.setCustomPostPreview(() => preview);
|
|
35953
35953
|
* ```
|
|
35954
35954
|
*/
|
|
@@ -35962,7 +35962,7 @@ export declare class Post {
|
|
|
35962
35962
|
* ```ts
|
|
35963
35963
|
* // from a menu action, form, scheduler, trigger, custom post click event, etc
|
|
35964
35964
|
* const newTextFallback = { text: 'This is an updated text fallback' };
|
|
35965
|
-
* const post = await
|
|
35965
|
+
* const post = await getPostById(context.postId);
|
|
35966
35966
|
* await post.setTextFallback(newTextFallback);
|
|
35967
35967
|
* ```
|
|
35968
35968
|
*/
|
|
@@ -36009,7 +36009,7 @@ export declare class Post {
|
|
|
36009
36009
|
* @example
|
|
36010
36010
|
* ```ts
|
|
36011
36011
|
* // from a menu action, form, scheduler, trigger, custom post click event, etc
|
|
36012
|
-
* const post = await
|
|
36012
|
+
* const post = await getPostById(context.postId);
|
|
36013
36013
|
* const enrichedThumbnail = await post.getEnrichedThumbnail();
|
|
36014
36014
|
* ```
|
|
36015
36015
|
*/
|
|
@@ -43265,7 +43265,7 @@ export declare class Subreddit {
|
|
|
43265
43265
|
* @example
|
|
43266
43266
|
* ```ts
|
|
43267
43267
|
* const subredditName = "mysubreddit"
|
|
43268
|
-
* const subreddit = await
|
|
43268
|
+
* const subreddit = await getSubredditByName(subredditName)
|
|
43269
43269
|
* const response = await subreddit.getUserFlair();
|
|
43270
43270
|
* const userFlairList = response.users
|
|
43271
43271
|
* ```
|
|
@@ -43289,7 +43289,7 @@ export declare class Subreddit {
|
|
|
43289
43289
|
*
|
|
43290
43290
|
* @example
|
|
43291
43291
|
* ```ts
|
|
43292
|
-
* const subreddit = await
|
|
43292
|
+
* const subreddit = await getSubredditByName("mysubreddit")
|
|
43293
43293
|
* let listing = await subreddit.getModQueue();
|
|
43294
43294
|
* console.log("Posts and Comments: ", await listing.all())
|
|
43295
43295
|
* listing = await subreddit.getModQueue({ type: "post"});
|
|
@@ -43306,7 +43306,7 @@ export declare class Subreddit {
|
|
|
43306
43306
|
*
|
|
43307
43307
|
* @example
|
|
43308
43308
|
* ```ts
|
|
43309
|
-
* const subreddit = await
|
|
43309
|
+
* const subreddit = await getSubredditByName("mysubreddit")
|
|
43310
43310
|
* let listing = await subreddit.getReports();
|
|
43311
43311
|
* console.log("Posts and Comments: ", await listing.all())
|
|
43312
43312
|
* listing = await subreddit.getReports({ type: "post"});
|
|
@@ -43323,7 +43323,7 @@ export declare class Subreddit {
|
|
|
43323
43323
|
*
|
|
43324
43324
|
* @example
|
|
43325
43325
|
* ```ts
|
|
43326
|
-
* const subreddit = await
|
|
43326
|
+
* const subreddit = await getSubredditByName("mysubreddit")
|
|
43327
43327
|
* let listing = await subreddit.getSpam();
|
|
43328
43328
|
* console.log("Posts and Comments: ", await listing.all())
|
|
43329
43329
|
* listing = await subreddit.getSpam({ type: "post"});
|
|
@@ -43340,7 +43340,7 @@ export declare class Subreddit {
|
|
|
43340
43340
|
*
|
|
43341
43341
|
* @example
|
|
43342
43342
|
* ```ts
|
|
43343
|
-
* const subreddit = await
|
|
43343
|
+
* const subreddit = await getSubredditByName("mysubreddit")
|
|
43344
43344
|
* let listing = await subreddit.getUnmoderated();
|
|
43345
43345
|
* console.log("Posts and Comments: ", await listing.all())
|
|
43346
43346
|
* listing = await subreddit.getUnmoderated({ type: "post"});
|
|
@@ -43357,7 +43357,7 @@ export declare class Subreddit {
|
|
|
43357
43357
|
*
|
|
43358
43358
|
* @example
|
|
43359
43359
|
* ```ts
|
|
43360
|
-
* const subreddit = await
|
|
43360
|
+
* const subreddit = await getSubredditByName("mysubreddit")
|
|
43361
43361
|
* let listing = await subreddit.getEdited();
|
|
43362
43362
|
* console.log("Posts and Comments: ", await listing.all())
|
|
43363
43363
|
* listing = await subreddit.getEdited({ type: "post"});
|
|
@@ -43373,7 +43373,7 @@ export declare class Subreddit {
|
|
|
43373
43373
|
* @param ids Array of thing full ids (e.g. t3_abc123)
|
|
43374
43374
|
* @example
|
|
43375
43375
|
* ```ts
|
|
43376
|
-
* const subreddit = await
|
|
43376
|
+
* const subreddit = await getSubredditByName('askReddit');
|
|
43377
43377
|
* const listing = subreddit.getCommentsAndPostsByIds(['t3_abc123', 't1_xyz123']);
|
|
43378
43378
|
* const items = await listing.all();
|
|
43379
43379
|
* console.log(items) // [Post, Comment]
|
|
@@ -51111,7 +51111,7 @@ export declare class User {
|
|
|
51111
51111
|
* ```ts
|
|
51112
51112
|
* const username = "badapple"
|
|
51113
51113
|
* const subredditName = "mysubreddit"
|
|
51114
|
-
* const user = await
|
|
51114
|
+
* const user = await getUserByUsername(username);
|
|
51115
51115
|
* const userFlair = await user.getUserFlairBySubreddit(subredditName);
|
|
51116
51116
|
* ```
|
|
51117
51117
|
*/
|