@devvit/shared 0.11.19-next-2025-07-09-18-27-51-6ad27532e.0 → 0.11.19-next-2025-07-09-18-50-38-53d33c04a.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 +2 -0
- package/package.json +6 -6
- package/types/triggers.d.ts +69 -0
- package/types/triggers.d.ts.map +1 -0
- package/types/triggers.js +9 -0
package/index.d.ts
CHANGED
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC"}
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devvit/shared",
|
|
3
|
-
"version": "0.11.19-next-2025-07-09-18-
|
|
3
|
+
"version": "0.11.19-next-2025-07-09-18-50-38-53d33c04a.0",
|
|
4
4
|
"license": "BSD-3-Clause",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
},
|
|
24
24
|
"types": "./index.d.ts",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@devvit/protos": "0.11.19-next-2025-07-09-18-
|
|
27
|
-
"@devvit/shared-types": "0.11.19-next-2025-07-09-18-
|
|
26
|
+
"@devvit/protos": "0.11.19-next-2025-07-09-18-50-38-53d33c04a.0",
|
|
27
|
+
"@devvit/shared-types": "0.11.19-next-2025-07-09-18-50-38-53d33c04a.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@devvit/repo-tools": "0.11.19-next-2025-07-09-18-
|
|
31
|
-
"@devvit/tsconfig": "0.11.19-next-2025-07-09-18-
|
|
30
|
+
"@devvit/repo-tools": "0.11.19-next-2025-07-09-18-50-38-53d33c04a.0",
|
|
31
|
+
"@devvit/tsconfig": "0.11.19-next-2025-07-09-18-50-38-53d33c04a.0",
|
|
32
32
|
"eslint": "9.11.1",
|
|
33
33
|
"typescript": "5.8.3",
|
|
34
34
|
"vitest": "1.6.1"
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"directory": "dist"
|
|
38
38
|
},
|
|
39
39
|
"source": "./src/index.ts",
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "3b8355fb83ead4569e49e5060eab4fd34c01182b"
|
|
41
41
|
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { type AppInstall, type AppUpgrade, type AutomoderatorFilterComment, type AutomoderatorFilterPost, type CommentCreate, type CommentDelete, type CommentReport, type CommentSubmit, type CommentUpdate, type PostCreate, type PostDelete, type PostFlairUpdate, type PostNsfwUpdate, type PostReport, type PostSpoilerUpdate, type PostSubmit, type PostUpdate } from '@devvit/protos/json/devvit/events/v1alpha/events.js';
|
|
2
|
+
import type { ModAction } from '@devvit/protos/json/devvit/reddit/v2alpha/modaction.js';
|
|
3
|
+
import type { ModMail } from '@devvit/protos/json/devvit/reddit/v2alpha/modmail.js';
|
|
4
|
+
export { DeletionReason, EventSource } from '@devvit/protos/json/devvit/events/v1alpha/events.js';
|
|
5
|
+
export type { CommentV2 } from '@devvit/protos/json/devvit/reddit/v2alpha/commentv2.js';
|
|
6
|
+
export type { LinkFlairV2, UserFlairV2 } from '@devvit/protos/json/devvit/reddit/v2alpha/flair.js';
|
|
7
|
+
export { CrowdControlLevel, DistinguishType, type MediaObject, type Oembed, type PostV2, type RedditVideo, } from '@devvit/protos/json/devvit/reddit/v2alpha/postv2.js';
|
|
8
|
+
export { SubredditRating, SubredditType, type SubredditV2, } from '@devvit/protos/json/devvit/reddit/v2alpha/subredditv2.js';
|
|
9
|
+
export type { UserV2 } from '@devvit/protos/json/devvit/reddit/v2alpha/userv2.js';
|
|
10
|
+
export type OnAppInstallRequest = AppInstall & {
|
|
11
|
+
type: 'AppInstall';
|
|
12
|
+
};
|
|
13
|
+
export type OnAppUpgradeRequest = AppUpgrade & {
|
|
14
|
+
type: 'AppUpgrade';
|
|
15
|
+
};
|
|
16
|
+
export type OnAutomoderatorFilterCommentRequest = AutomoderatorFilterComment & {
|
|
17
|
+
type: 'AutomoderatorFilterComment';
|
|
18
|
+
};
|
|
19
|
+
export type OnAutomoderatorFilterPostRequest = AutomoderatorFilterPost & {
|
|
20
|
+
type: 'AutomoderatorFilterPost';
|
|
21
|
+
};
|
|
22
|
+
export type OnCommentCreateRequest = CommentCreate & {
|
|
23
|
+
type: 'CommentCreate';
|
|
24
|
+
};
|
|
25
|
+
export type OnCommentDeleteRequest = CommentDelete & {
|
|
26
|
+
type: 'CommentDelete';
|
|
27
|
+
};
|
|
28
|
+
export type OnCommentReportRequest = CommentReport & {
|
|
29
|
+
type: 'CommentReport';
|
|
30
|
+
};
|
|
31
|
+
export type OnCommentSubmitRequest = CommentSubmit & {
|
|
32
|
+
type: 'CommentSubmit';
|
|
33
|
+
};
|
|
34
|
+
export type OnCommentUpdateRequest = CommentUpdate & {
|
|
35
|
+
type: 'CommentUpdate';
|
|
36
|
+
};
|
|
37
|
+
export type OnModActionRequest = ModAction & {
|
|
38
|
+
type: 'ModAction';
|
|
39
|
+
};
|
|
40
|
+
export type OnModMailRequest = ModMail & {
|
|
41
|
+
type: 'ModMail';
|
|
42
|
+
};
|
|
43
|
+
export type OnPostCreateRequest = PostCreate & {
|
|
44
|
+
type: 'PostCreate';
|
|
45
|
+
};
|
|
46
|
+
export type OnPostDeleteRequest = PostDelete & {
|
|
47
|
+
type: 'PostDelete';
|
|
48
|
+
};
|
|
49
|
+
export type OnPostFlairUpdateRequest = PostFlairUpdate & {
|
|
50
|
+
type: 'PostFlairUpdate';
|
|
51
|
+
};
|
|
52
|
+
export type OnPostNsfwUpdateRequest = PostNsfwUpdate & {
|
|
53
|
+
type: 'PostNsfwUpdate';
|
|
54
|
+
};
|
|
55
|
+
export type OnPostReportRequest = PostReport & {
|
|
56
|
+
type: 'PostReport';
|
|
57
|
+
};
|
|
58
|
+
export type OnPostSpoilerUpdateRequest = PostSpoilerUpdate & {
|
|
59
|
+
type: 'PostSpoilerUpdate';
|
|
60
|
+
};
|
|
61
|
+
export type OnPostSubmitRequest = PostSubmit & {
|
|
62
|
+
type: 'PostSubmit';
|
|
63
|
+
};
|
|
64
|
+
export type OnPostUpdateRequest = PostUpdate & {
|
|
65
|
+
type: 'PostUpdate';
|
|
66
|
+
};
|
|
67
|
+
export type TriggerRequest = OnAppInstallRequest | OnAppUpgradeRequest | OnAutomoderatorFilterCommentRequest | OnAutomoderatorFilterPostRequest | OnCommentCreateRequest | OnCommentDeleteRequest | OnCommentReportRequest | OnCommentSubmitRequest | OnCommentUpdateRequest | OnModActionRequest | OnModMailRequest | OnPostCreateRequest | OnPostDeleteRequest | OnPostFlairUpdateRequest | OnPostNsfwUpdateRequest | OnPostReportRequest | OnPostSpoilerUpdateRequest | OnPostSubmitRequest | OnPostUpdateRequest;
|
|
68
|
+
export type TriggerResponse = {};
|
|
69
|
+
//# sourceMappingURL=triggers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"triggers.d.ts","sourceRoot":"","sources":["../../src/types/triggers.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,0BAA0B,EAC/B,KAAK,uBAAuB,EAC5B,KAAK,aAAa,EAClB,KAAK,aA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MAAM,cAAc,GACtB,mBAAmB,GACnB,mBAAmB,GACnB,mCAAmC,GACnC,gCAAgC,GAChC,sBAAsB,GACtB,sBAAsB,GACtB,sBAAsB,GACtB,sBAAsB,GACtB,sBAAsB,GACtB,kBAAkB,GAClB,gBAAgB,GAChB,mBAAmB,GACnB,mBAAmB,GACnB,wBAAwB,GACxB,uBAAuB,GACvB,mBAAmB,GACnB,0BAA0B,GAC1B,mBAAmB,GACnB,mBAAmB,CAAC;AAExB,MAAM,MAAM,eAAe,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// See TestInvokeAllTypes for what's actually wired up (votes are not).
|
|
2
|
+
// Export enums functionally and everything else as types. The current
|
|
3
|
+
// implementation is getting ts-proto hydrated events from the Devvit singleton
|
|
4
|
+
// but then serializes those to JSON so Date, Duration, Timestamp, and
|
|
5
|
+
// bytes / Uint8Array differ.
|
|
6
|
+
import {} from '@devvit/protos/json/devvit/events/v1alpha/events.js';
|
|
7
|
+
export { DeletionReason, EventSource } from '@devvit/protos/json/devvit/events/v1alpha/events.js';
|
|
8
|
+
export { CrowdControlLevel, DistinguishType, } from '@devvit/protos/json/devvit/reddit/v2alpha/postv2.js';
|
|
9
|
+
export { SubredditRating, SubredditType, } from '@devvit/protos/json/devvit/reddit/v2alpha/subredditv2.js';
|