@devvit/public-api 0.11.2-next-2024-10-22-8d2a6746e.0 → 0.11.2-next-2024-10-24-39aba584f.0
Sign up to get free protection for your applications and to get access to all the features.
- package/apis/reddit/RedditAPIClient.d.ts +1 -2
- package/apis/reddit/RedditAPIClient.d.ts.map +1 -1
- package/apis/reddit/RedditAPIClient.js +1 -2
- package/devvit/Devvit.d.ts +9 -9
- package/devvit/Devvit.d.ts.map +1 -1
- package/devvit/Devvit.js +8 -7
- package/meta.json +4 -4
- package/meta.min.json +3 -3
- package/package.json +6 -6
- package/public-api.d.ts +10 -10
- package/public-api.iife.js +9 -8
- package/public-api.min.js.map +2 -2
@@ -33,8 +33,7 @@ export type MuteUserOptions = {
|
|
33
33
|
|
34
34
|
* // use within one of our capability handlers e.g. Menu Actions, Triggers, Scheduled Job Type, etc
|
35
35
|
* async (event, context) => {
|
36
|
-
* const
|
37
|
-
* const subreddit = await reddit.getSubredditById(context.subredditId);
|
36
|
+
* const subreddit = await context.reddit.getSubredditById(context.subredditId);
|
38
37
|
* context.reddit.submitPost({
|
39
38
|
* subredditName: subreddit.name,
|
40
39
|
* title: 'test post',
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"RedditAPIClient.d.ts","sourceRoot":"","sources":["../../../src/apis/reddit/RedditAPIClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAM3D,OAAO,KAAK,EAEV,qBAAqB,EACrB,aAAa,EACb,cAAc,EACd,yBAAyB,EACzB,wBAAwB,EACxB,0BAA0B,EAC1B,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,EAClB,wBAAwB,EACxB,wBAAwB,EACxB,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,EAClB,uBAAuB,EACvB,qBAAqB,EACrB,eAAe,EACf,4BAA4B,EAC5B,yBAAyB,EACzB,8BAA8B,EAC9B,sBAAsB,EACtB,OAAO,EACP,SAAS,EACT,mBAAmB,EACnB,aAAa,EACb,aAAa,EACb,oCAAoC,EACpC,yBAAyB,EACzB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,eAAe,EACf,yBAAyB,EACzB,qBAAqB,EACrB,KAAK,EACL,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAEL,OAAO,EAEP,aAAa,EAQb,cAAc,EACd,OAAO,EACP,IAAI,EACJ,cAAc,EACd,SAAS,EACT,IAAI,EACJ,MAAM,EACN,QAAQ,EACT,MAAM,mBAAmB,CAAC;AAE3B,KAAK,wBAAwB,GAAG,IAAI,CAAC,8BAA8B,EAAE,MAAM,CAAC,CAAC;AAE7E,MAAM,MAAM,sBAAsB,GAAG;IACnC,+DAA+D;IAC/D,aAAa,EAAE,MAAM,CAAC;IACtB,oDAAoD;IACpD,QAAQ,EAAE,MAAM,CAAC;IACjB,wCAAwC;IACxC,WAAW,CAAC,EAAE,mBAAmB,EAAE,CAAC;CACrC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,oDAAoD;IACpD,aAAa,EAAE,MAAM,CAAC;IACtB,mCAAmC;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF
|
1
|
+
{"version":3,"file":"RedditAPIClient.d.ts","sourceRoot":"","sources":["../../../src/apis/reddit/RedditAPIClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAM3D,OAAO,KAAK,EAEV,qBAAqB,EACrB,aAAa,EACb,cAAc,EACd,yBAAyB,EACzB,wBAAwB,EACxB,0BAA0B,EAC1B,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,EAClB,wBAAwB,EACxB,wBAAwB,EACxB,kBAAkB,EA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;;;OAMG;IACH,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;CAGlE"}
|
@@ -29,8 +29,7 @@ import { AboutLocations, Comment, Flair, FlairTemplate, getModerationLog, getSub
|
|
29
29
|
|
30
30
|
* // use within one of our capability handlers e.g. Menu Actions, Triggers, Scheduled Job Type, etc
|
31
31
|
* async (event, context) => {
|
32
|
-
* const
|
33
|
-
* const subreddit = await reddit.getSubredditById(context.subredditId);
|
32
|
+
* const subreddit = await context.reddit.getSubredditById(context.subredditId);
|
34
33
|
* context.reddit.submitPost({
|
35
34
|
* subredditName: subreddit.name,
|
36
35
|
* title: 'test post',
|
package/devvit/Devvit.d.ts
CHANGED
@@ -8,7 +8,7 @@ import type { BaseContext, Configuration, ContextAPIClients, CustomPostType, For
|
|
8
8
|
*
|
9
9
|
* **Favor ContextDebugInfo since request-based state is preferred.**
|
10
10
|
*/
|
11
|
-
type DevvitDebug = {
|
11
|
+
export type DevvitDebug = {
|
12
12
|
/**
|
13
13
|
* Should debug block rendering in console.log according to the reified JSX/XML output. Example:
|
14
14
|
*
|
@@ -70,19 +70,21 @@ export declare class Devvit extends Actor {
|
|
70
70
|
* @param customPostType.render - A function or `Devvit.CustomPostComponent` that returns the UI for the custom post.
|
71
71
|
* @example
|
72
72
|
* ```ts
|
73
|
+
* import { Devvit, useState } from '@devvit/public-api';
|
74
|
+
*
|
73
75
|
* Devvit.addCustomPostType({
|
74
76
|
* name: 'Counter',
|
75
77
|
* description: 'A simple click counter post.',
|
76
78
|
* render: (context) => {
|
77
|
-
* const [counter, setCounter] =
|
79
|
+
* const [counter, setCounter] = useState();
|
78
80
|
*
|
79
81
|
* return (
|
80
82
|
* <vstack>
|
81
83
|
* <text>{counter}</text>
|
82
|
-
*
|
83
|
-
*
|
84
|
-
*
|
85
|
-
* }
|
84
|
+
* <button onPress={() => setCounter((counter) => counter + 1)}>Click me!</button>
|
85
|
+
* </vstack>
|
86
|
+
* );
|
87
|
+
* },
|
86
88
|
* });
|
87
89
|
* ```
|
88
90
|
*/
|
@@ -117,8 +119,7 @@ export declare class Devvit extends Actor {
|
|
117
119
|
* label: 'Check for new posts',
|
118
120
|
* location: 'location',
|
119
121
|
* onPress: (event, context) => {
|
120
|
-
* const
|
121
|
-
* const = await scheduler.runJob({
|
122
|
+
* const = await context.scheduler.runJob({
|
122
123
|
* name: 'checkNewPosts',
|
123
124
|
* when: new Date(Date.now() + 5000) // in 5 seconds
|
124
125
|
* });
|
@@ -460,5 +461,4 @@ declare global {
|
|
460
461
|
type ComponentFunction = (props: JSX.Props, context: Devvit.Context) => JSX.Element;
|
461
462
|
}
|
462
463
|
}
|
463
|
-
export {};
|
464
464
|
//# sourceMappingURL=Devvit.d.ts.map
|
package/devvit/Devvit.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Devvit.d.ts","sourceRoot":"","sources":["../../src/devvit/Devvit.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAItD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAG/D,OAAO,KAAK,EACV,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,IAAI,EAEJ,YAAY,EACZ,wBAAwB,EACxB,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,sBAAsB,EAGtB,gBAAgB,EAChB,iBAAiB,EAGjB,YAAY,EACZ,gBAAgB,EAChB,qBAAqB,EACtB,MAAM,mBAAmB,CAAC;AA0C3B;;;;;GAKG;AACH,
|
1
|
+
{"version":3,"file":"Devvit.d.ts","sourceRoot":"","sources":["../../src/devvit/Devvit.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAItD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAA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OAAO,CAAC,CAAC;QACtC,KAAK,WAAW,GAAG,YAAY,GAAG,GAAG,CAAC,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;QAClF,KAAK,OAAO,GAAG,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;QAClD,KAAK,wBAAwB,GAAG;YAAE,QAAQ,EAAE,EAAE,CAAA;SAAE,CAAC;QACjD,KAAK,QAAQ,GAAG,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;QAC5C,KAAK,KAAK,CAAC,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG;YAAE,QAAQ,CAAC,EAAE,MAAM,CAAC,eAAe,CAAA;SAAE,CAAC;QAE1E,KAAK,iBAAiB,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,KAAK,GAAG,CAAC,OAAO,CAAC;KACrF;CACF"}
|
package/devvit/Devvit.js
CHANGED
@@ -105,19 +105,21 @@ export class Devvit extends Actor {
|
|
105
105
|
* @param customPostType.render - A function or `Devvit.CustomPostComponent` that returns the UI for the custom post.
|
106
106
|
* @example
|
107
107
|
* ```ts
|
108
|
+
* import { Devvit, useState } from '@devvit/public-api';
|
109
|
+
*
|
108
110
|
* Devvit.addCustomPostType({
|
109
111
|
* name: 'Counter',
|
110
112
|
* description: 'A simple click counter post.',
|
111
113
|
* render: (context) => {
|
112
|
-
* const [counter, setCounter] =
|
114
|
+
* const [counter, setCounter] = useState();
|
113
115
|
*
|
114
116
|
* return (
|
115
117
|
* <vstack>
|
116
118
|
* <text>{counter}</text>
|
117
|
-
*
|
118
|
-
*
|
119
|
-
*
|
120
|
-
* }
|
119
|
+
* <button onPress={() => setCounter((counter) => counter + 1)}>Click me!</button>
|
120
|
+
* </vstack>
|
121
|
+
* );
|
122
|
+
* },
|
121
123
|
* });
|
122
124
|
* ```
|
123
125
|
*/
|
@@ -161,8 +163,7 @@ export class Devvit extends Actor {
|
|
161
163
|
* label: 'Check for new posts',
|
162
164
|
* location: 'location',
|
163
165
|
* onPress: (event, context) => {
|
164
|
-
* const
|
165
|
-
* const = await scheduler.runJob({
|
166
|
+
* const = await context.scheduler.runJob({
|
166
167
|
* name: 'checkNewPosts',
|
167
168
|
* when: new Date(Date.now() + 5000) // in 5 seconds
|
168
169
|
* });
|
package/meta.json
CHANGED
@@ -9830,7 +9830,7 @@
|
|
9830
9830
|
"format": "esm"
|
9831
9831
|
},
|
9832
9832
|
"src/apis/reddit/RedditAPIClient.ts": {
|
9833
|
-
"bytes":
|
9833
|
+
"bytes": 56622,
|
9834
9834
|
"imports": [
|
9835
9835
|
{
|
9836
9836
|
"path": "../shared-types/dist/Header.js",
|
@@ -10972,7 +10972,7 @@
|
|
10972
10972
|
"format": "esm"
|
10973
10973
|
},
|
10974
10974
|
"src/devvit/Devvit.ts": {
|
10975
|
-
"bytes":
|
10975
|
+
"bytes": 33451,
|
10976
10976
|
"imports": [
|
10977
10977
|
{
|
10978
10978
|
"path": "../protos/dist/index.js",
|
@@ -12781,7 +12781,7 @@
|
|
12781
12781
|
"bytesInOutput": 1424
|
12782
12782
|
},
|
12783
12783
|
"src/devvit/Devvit.ts": {
|
12784
|
-
"bytesInOutput":
|
12784
|
+
"bytesInOutput": 18181
|
12785
12785
|
},
|
12786
12786
|
"src/apis/reddit/helpers/makeGettersEnumerable.ts": {
|
12787
12787
|
"bytesInOutput": 344
|
@@ -12865,7 +12865,7 @@
|
|
12865
12865
|
"bytesInOutput": 370
|
12866
12866
|
}
|
12867
12867
|
},
|
12868
|
-
"bytes":
|
12868
|
+
"bytes": 12740623
|
12869
12869
|
}
|
12870
12870
|
}
|
12871
12871
|
}
|
package/meta.min.json
CHANGED
@@ -2784,7 +2784,7 @@
|
|
2784
2784
|
"format": "esm"
|
2785
2785
|
},
|
2786
2786
|
"src/apis/reddit/RedditAPIClient.ts": {
|
2787
|
-
"bytes":
|
2787
|
+
"bytes": 56622,
|
2788
2788
|
"imports": [
|
2789
2789
|
{
|
2790
2790
|
"path": "../shared-types/dist/Header.js",
|
@@ -3926,7 +3926,7 @@
|
|
3926
3926
|
"format": "esm"
|
3927
3927
|
},
|
3928
3928
|
"src/devvit/Devvit.ts": {
|
3929
|
-
"bytes":
|
3929
|
+
"bytes": 33451,
|
3930
3930
|
"imports": [
|
3931
3931
|
{
|
3932
3932
|
"path": "@devvit/protos",
|
@@ -4789,7 +4789,7 @@
|
|
4789
4789
|
"imports": [],
|
4790
4790
|
"exports": [],
|
4791
4791
|
"inputs": {},
|
4792
|
-
"bytes":
|
4792
|
+
"bytes": 1223922
|
4793
4793
|
},
|
4794
4794
|
"dist/public-api.min.js": {
|
4795
4795
|
"imports": [
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@devvit/public-api",
|
3
|
-
"version": "0.11.2-next-2024-10-
|
3
|
+
"version": "0.11.2-next-2024-10-24-39aba584f.0",
|
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-next-2024-10-
|
34
|
-
"@devvit/shared-types": "0.11.2-next-2024-10-
|
33
|
+
"@devvit/protos": "0.11.2-next-2024-10-24-39aba584f.0",
|
34
|
+
"@devvit/shared-types": "0.11.2-next-2024-10-24-39aba584f.0",
|
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-next-2024-10-
|
43
|
-
"@devvit/tsconfig": "0.11.2-next-2024-10-
|
42
|
+
"@devvit/repo-tools": "0.11.2-next-2024-10-24-39aba584f.0",
|
43
|
+
"@devvit/tsconfig": "0.11.2-next-2024-10-24-39aba584f.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",
|
@@ -63,5 +63,5 @@
|
|
63
63
|
}
|
64
64
|
},
|
65
65
|
"source": "./src/index.ts",
|
66
|
-
"gitHead": "
|
66
|
+
"gitHead": "db8c6f5ee33d55f8bda1c5cccf2214148833d736"
|
67
67
|
}
|
package/public-api.d.ts
CHANGED
@@ -7153,19 +7153,21 @@ export declare class Devvit extends Actor {
|
|
7153
7153
|
* @param customPostType.render - A function or `Devvit.CustomPostComponent` that returns the UI for the custom post.
|
7154
7154
|
* @example
|
7155
7155
|
* ```ts
|
7156
|
+
* import { Devvit, useState } from '@devvit/public-api';
|
7157
|
+
*
|
7156
7158
|
* Devvit.addCustomPostType({
|
7157
7159
|
* name: 'Counter',
|
7158
7160
|
* description: 'A simple click counter post.',
|
7159
7161
|
* render: (context) => {
|
7160
|
-
* const [counter, setCounter] =
|
7162
|
+
* const [counter, setCounter] = useState();
|
7161
7163
|
*
|
7162
7164
|
* return (
|
7163
7165
|
* <vstack>
|
7164
7166
|
* <text>{counter}</text>
|
7165
|
-
*
|
7166
|
-
*
|
7167
|
-
*
|
7168
|
-
* }
|
7167
|
+
* <button onPress={() => setCounter((counter) => counter + 1)}>Click me!</button>
|
7168
|
+
* </vstack>
|
7169
|
+
* );
|
7170
|
+
* },
|
7169
7171
|
* });
|
7170
7172
|
* ```
|
7171
7173
|
*/
|
@@ -7200,8 +7202,7 @@ export declare class Devvit extends Actor {
|
|
7200
7202
|
* label: 'Check for new posts',
|
7201
7203
|
* location: 'location',
|
7202
7204
|
* onPress: (event, context) => {
|
7203
|
-
* const
|
7204
|
-
* const = await scheduler.runJob({
|
7205
|
+
* const = await context.scheduler.runJob({
|
7205
7206
|
* name: 'checkNewPosts',
|
7206
7207
|
* when: new Date(Date.now() + 5000) // in 5 seconds
|
7207
7208
|
* });
|
@@ -7527,7 +7528,7 @@ export declare namespace Devvit {
|
|
7527
7528
|
*
|
7528
7529
|
* **Favor ContextDebugInfo since request-based state is preferred.**
|
7529
7530
|
*/
|
7530
|
-
declare type DevvitDebug = {
|
7531
|
+
export declare type DevvitDebug = {
|
7531
7532
|
/**
|
7532
7533
|
* Should debug block rendering in console.log according to the reified JSX/XML output. Example:
|
7533
7534
|
*
|
@@ -36519,8 +36520,7 @@ declare const RecentNotesRequest: {
|
|
36519
36520
|
|
36520
36521
|
* // use within one of our capability handlers e.g. Menu Actions, Triggers, Scheduled Job Type, etc
|
36521
36522
|
* async (event, context) => {
|
36522
|
-
* const
|
36523
|
-
* const subreddit = await reddit.getSubredditById(context.subredditId);
|
36523
|
+
* const subreddit = await context.reddit.getSubredditById(context.subredditId);
|
36524
36524
|
* context.reddit.submitPost({
|
36525
36525
|
* subredditName: subreddit.name,
|
36526
36526
|
* title: 'test post',
|