@devvit/public-api 0.11.2-next-2024-10-31-30436bfff.0 → 0.11.2
Sign up to get free protection for your applications and to get access to all the features.
- package/apis/reddit/models/Post.d.ts +13 -0
- package/apis/reddit/models/Post.d.ts.map +1 -1
- package/apis/reddit/models/Post.js +13 -0
- package/meta.json +5 -5
- package/meta.min.json +5 -5
- package/package.json +6 -6
- package/public-api.d.ts +13 -0
- package/public-api.iife.js +14 -8
- package/public-api.min.js +1 -1
- package/public-api.min.js.map +3 -3
@@ -300,6 +300,19 @@ export declare class Post {
|
|
300
300
|
* ```
|
301
301
|
*/
|
302
302
|
setCustomPostPreview(ui: JSX.ComponentFunction): Promise<void>;
|
303
|
+
/**
|
304
|
+
* Set a text fallback for the custom post
|
305
|
+
*
|
306
|
+
* @param {CustomPostTextFallbackOptions} options - A text or a richtext to render in a fallback
|
307
|
+
* @throws {Error} Throws an error if the fallback could not be set.
|
308
|
+
* @example
|
309
|
+
* ```ts
|
310
|
+
* // from a menu action, form, scheduler, trigger, custom post click event, etc
|
311
|
+
* const newTextFallback = { text: 'This is an updated text fallback' };
|
312
|
+
* const post = await context.reddit.getPostById(context.postId);
|
313
|
+
* await post.setTextFallback(newTextFallback);
|
314
|
+
* ```
|
315
|
+
*/
|
303
316
|
setTextFallback(options: CustomPostTextFallbackOptions): Promise<void>;
|
304
317
|
addComment(options: CommentSubmissionOptions): Promise<Comment>;
|
305
318
|
delete(): Promise<void>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Post.d.ts","sourceRoot":"","sources":["../../../../src/apis/reddit/models/Post.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAC;AACnF,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AAWpE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,K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AKrB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAKvB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAKrB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAKvB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAK3B,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAK7B,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAK9B,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC;IAKhC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAI/C,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAIzB,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAK5B,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC;IAKnC,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAK9B,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAK9B,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC;IAKhC,SAAS,IAAI,OAAO,CAAC,IAAI,GAAG,SAAS,CAAC;IAItC,SAAS,CAAC,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAAE,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAUzE;;;;;;OAMG;IACH,cAAc,CAAC,OAAO,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAorB/E"}
|
@@ -402,6 +402,19 @@ export class Post {
|
|
402
402
|
__classPrivateFieldSet(this, _Post_body, newPost.body, "f");
|
403
403
|
__classPrivateFieldSet(this, _Post_edited, newPost.edited, "f");
|
404
404
|
}
|
405
|
+
/**
|
406
|
+
* Set a text fallback for the custom post
|
407
|
+
*
|
408
|
+
* @param {CustomPostTextFallbackOptions} options - A text or a richtext to render in a fallback
|
409
|
+
* @throws {Error} Throws an error if the fallback could not be set.
|
410
|
+
* @example
|
411
|
+
* ```ts
|
412
|
+
* // from a menu action, form, scheduler, trigger, custom post click event, etc
|
413
|
+
* const newTextFallback = { text: 'This is an updated text fallback' };
|
414
|
+
* const post = await context.reddit.getPostById(context.postId);
|
415
|
+
* await post.setTextFallback(newTextFallback);
|
416
|
+
* ```
|
417
|
+
*/
|
405
418
|
async setTextFallback(options) {
|
406
419
|
const newPost = await Post.setTextFallback(options, this.id, __classPrivateFieldGet(this, _Post_metadata, "f"));
|
407
420
|
__classPrivateFieldSet(this, _Post_body, newPost.body, "f");
|
package/meta.json
CHANGED
@@ -10399,7 +10399,7 @@
|
|
10399
10399
|
"format": "esm"
|
10400
10400
|
},
|
10401
10401
|
"../shared-types/dist/StringUtil.js": {
|
10402
|
-
"bytes":
|
10402
|
+
"bytes": 1200,
|
10403
10403
|
"imports": [],
|
10404
10404
|
"format": "esm"
|
10405
10405
|
},
|
@@ -11264,7 +11264,7 @@
|
|
11264
11264
|
"format": "esm"
|
11265
11265
|
},
|
11266
11266
|
"src/apis/reddit/models/Post.ts": {
|
11267
|
-
"bytes":
|
11267
|
+
"bytes": 43348,
|
11268
11268
|
"imports": [
|
11269
11269
|
{
|
11270
11270
|
"path": "../protos/dist/index.js",
|
@@ -12724,7 +12724,7 @@
|
|
12724
12724
|
"bytesInOutput": 670
|
12725
12725
|
},
|
12726
12726
|
"../shared-types/dist/StringUtil.js": {
|
12727
|
-
"bytesInOutput":
|
12727
|
+
"bytesInOutput": 792
|
12728
12728
|
},
|
12729
12729
|
"src/devvit/internals/triggers.ts": {
|
12730
12730
|
"bytesInOutput": 6316
|
@@ -12823,7 +12823,7 @@
|
|
12823
12823
|
"bytesInOutput": 7835
|
12824
12824
|
},
|
12825
12825
|
"src/apis/reddit/models/Post.ts": {
|
12826
|
-
"bytesInOutput":
|
12826
|
+
"bytesInOutput": 35550
|
12827
12827
|
},
|
12828
12828
|
"src/apis/reddit/helpers/textFallbackToRichtext.ts": {
|
12829
12829
|
"bytesInOutput": 455
|
@@ -12865,7 +12865,7 @@
|
|
12865
12865
|
"bytesInOutput": 370
|
12866
12866
|
}
|
12867
12867
|
},
|
12868
|
-
"bytes":
|
12868
|
+
"bytes": 12741467
|
12869
12869
|
}
|
12870
12870
|
}
|
12871
12871
|
}
|
package/meta.min.json
CHANGED
@@ -3353,7 +3353,7 @@
|
|
3353
3353
|
"format": "esm"
|
3354
3354
|
},
|
3355
3355
|
"../shared-types/dist/StringUtil.js": {
|
3356
|
-
"bytes":
|
3356
|
+
"bytes": 1200,
|
3357
3357
|
"imports": [],
|
3358
3358
|
"format": "esm"
|
3359
3359
|
},
|
@@ -4171,7 +4171,7 @@
|
|
4171
4171
|
"format": "esm"
|
4172
4172
|
},
|
4173
4173
|
"src/apis/reddit/models/Post.ts": {
|
4174
|
-
"bytes":
|
4174
|
+
"bytes": 43348,
|
4175
4175
|
"imports": [
|
4176
4176
|
{
|
4177
4177
|
"path": "@devvit/protos",
|
@@ -4789,7 +4789,7 @@
|
|
4789
4789
|
"imports": [],
|
4790
4790
|
"exports": [],
|
4791
4791
|
"inputs": {},
|
4792
|
-
"bytes":
|
4792
|
+
"bytes": 1224024
|
4793
4793
|
},
|
4794
4794
|
"dist/public-api.min.js": {
|
4795
4795
|
"imports": [
|
@@ -5505,7 +5505,7 @@
|
|
5505
5505
|
"bytesInOutput": 3272
|
5506
5506
|
},
|
5507
5507
|
"../shared-types/dist/StringUtil.js": {
|
5508
|
-
"bytesInOutput":
|
5508
|
+
"bytesInOutput": 379
|
5509
5509
|
},
|
5510
5510
|
"src/devvit/internals/ui-event-handler.ts": {
|
5511
5511
|
"bytesInOutput": 1418
|
@@ -5634,7 +5634,7 @@
|
|
5634
5634
|
"bytesInOutput": 178
|
5635
5635
|
}
|
5636
5636
|
},
|
5637
|
-
"bytes":
|
5637
|
+
"bytes": 261432
|
5638
5638
|
}
|
5639
5639
|
}
|
5640
5640
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@devvit/public-api",
|
3
|
-
"version": "0.11.2
|
3
|
+
"version": "0.11.2",
|
4
4
|
"license": "BSD-3-Clause",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -30,8 +30,8 @@
|
|
30
30
|
},
|
31
31
|
"types": "./index.d.ts",
|
32
32
|
"dependencies": {
|
33
|
-
"@devvit/protos": "0.11.2
|
34
|
-
"@devvit/shared-types": "0.11.2
|
33
|
+
"@devvit/protos": "0.11.2",
|
34
|
+
"@devvit/shared-types": "0.11.2",
|
35
35
|
"base64-js": "1.5.1",
|
36
36
|
"clone-deep": "4.0.1",
|
37
37
|
"core-js": "3.27.2",
|
@@ -39,8 +39,8 @@
|
|
39
39
|
},
|
40
40
|
"devDependencies": {
|
41
41
|
"@ampproject/filesize": "4.3.0",
|
42
|
-
"@devvit/repo-tools": "0.11.2
|
43
|
-
"@devvit/tsconfig": "0.11.2
|
42
|
+
"@devvit/repo-tools": "0.11.2",
|
43
|
+
"@devvit/tsconfig": "0.11.2",
|
44
44
|
"@microsoft/api-extractor": "7.41.0",
|
45
45
|
"@reddit/faceplate-ui": "18.0.1",
|
46
46
|
"@types/clone-deep": "4.0.1",
|
@@ -63,5 +63,5 @@
|
|
63
63
|
}
|
64
64
|
},
|
65
65
|
"source": "./src/index.ts",
|
66
|
-
"gitHead": "
|
66
|
+
"gitHead": "9dbed838554fc960b6ce0211b33fcfca12d4df6f"
|
67
67
|
}
|
package/public-api.d.ts
CHANGED
@@ -34467,6 +34467,19 @@ export declare class Post {
|
|
34467
34467
|
* ```
|
34468
34468
|
*/
|
34469
34469
|
setCustomPostPreview(ui: JSX.ComponentFunction): Promise<void>;
|
34470
|
+
/**
|
34471
|
+
* Set a text fallback for the custom post
|
34472
|
+
*
|
34473
|
+
* @param {CustomPostTextFallbackOptions} options - A text or a richtext to render in a fallback
|
34474
|
+
* @throws {Error} Throws an error if the fallback could not be set.
|
34475
|
+
* @example
|
34476
|
+
* ```ts
|
34477
|
+
* // from a menu action, form, scheduler, trigger, custom post click event, etc
|
34478
|
+
* const newTextFallback = { text: 'This is an updated text fallback' };
|
34479
|
+
* const post = await context.reddit.getPostById(context.postId);
|
34480
|
+
* await post.setTextFallback(newTextFallback);
|
34481
|
+
* ```
|
34482
|
+
*/
|
34470
34483
|
setTextFallback(options: CustomPostTextFallbackOptions): Promise<void>;
|
34471
34484
|
addComment(options: CommentSubmissionOptions): Promise<Comment>;
|
34472
34485
|
delete(): Promise<void>;
|