@devvit/shared-types 0.12.3 → 0.12.4-next-2025-11-17-14-29-09-9ea400fc2.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.
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import type { BaseContext } from '../shared/baseContext.js';
|
|
2
|
+
import type { Client } from '../shared/client.js';
|
|
2
3
|
import type { T2, T3 } from '../tid.js';
|
|
3
4
|
/**
|
|
4
5
|
* Devvit web client context for the lifetime of the web view.
|
|
5
6
|
*/
|
|
6
7
|
export type Context = BaseContext & {
|
|
8
|
+
/** Details about the platform the app was invoked from. */
|
|
9
|
+
client: Client | undefined;
|
|
7
10
|
/**
|
|
8
11
|
* The post author user ID, if applicable to the context and the account is
|
|
9
12
|
* active.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-context.d.ts","sourceRoot":"","sources":["../../src/client/client-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AAExC;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG,WAAW,GAAG;
|
|
1
|
+
{"version":3,"file":"client-context.d.ts","sourceRoot":"","sources":["../../src/client/client-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AAExC;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG,WAAW,GAAG;IAIlC,2DAA2D;IAC3D,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAI3B;;;;OAIG;IACH,YAAY,EAAE,EAAE,GAAG,SAAS,CAAC;IAC7B;;OAEG;IACH,MAAM,EAAE,EAAE,CAAC;CACZ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devvit/shared-types",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.4-next-2025-11-17-14-29-09-9ea400fc2.0",
|
|
4
4
|
"license": "BSD-3-Clause",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
},
|
|
34
34
|
"types": "./dist/index.d.ts",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@devvit/protos": "0.12.
|
|
36
|
+
"@devvit/protos": "0.12.4-next-2025-11-17-14-29-09-9ea400fc2.0",
|
|
37
37
|
"jsonschema": "1.4.1",
|
|
38
38
|
"uuid": "9.0.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@devvit/repo-tools": "0.12.
|
|
42
|
-
"@devvit/tsconfig": "0.12.
|
|
41
|
+
"@devvit/repo-tools": "0.12.4-next-2025-11-17-14-29-09-9ea400fc2.0",
|
|
42
|
+
"@devvit/tsconfig": "0.12.4-next-2025-11-17-14-29-09-9ea400fc2.0",
|
|
43
43
|
"@types/redis-mock": "0.17.1",
|
|
44
44
|
"@types/uuid": "9.0.0",
|
|
45
45
|
"chokidar-cli": "3.0.0",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"vitest": "1.6.1"
|
|
52
52
|
},
|
|
53
53
|
"source": "./src/index.ts",
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "2354b340d205c97828e440162878745eb94e3d5a"
|
|
55
55
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { NativeClientVersion } from '@devvit/protos/json/devvit/ui/effects/web_view/v1alpha/context.js';
|
|
2
|
+
/** The invoking client for the active request. */
|
|
3
|
+
export type Client = NativeClient;
|
|
4
|
+
/** The invoking Android or iOS client for the active request. */
|
|
5
|
+
export type NativeClient = {
|
|
6
|
+
name: 'ANDROID' | 'IOS';
|
|
7
|
+
version: NativeClientVersion;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/shared/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mEAAmE,CAAC;AAE7G,kDAAkD;AAClD,MAAM,MAAM,MAAM,GAAG,YAAY,CAAC;AAElC,iEAAiE;AACjE,MAAM,MAAM,YAAY,GAAG;IAAE,IAAI,EAAE,SAAS,GAAG,KAAK,CAAC;IAAC,OAAO,EAAE,mBAAmB,CAAA;CAAE,CAAC"}
|
package/shared/client.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
// to-do: Provide Shreddit version number in `@devvit/client` when unpacking
|
|
3
|
+
// `BridgeContext`. Probably don't use `SemVer` here since it'd be
|
|
4
|
+
// `version.version`.
|
|
5
|
+
// export type = WebClient {
|
|
6
|
+
// name: 'WEB';
|
|
7
|
+
// version: {
|
|
8
|
+
// /** Major version. Eg, `1`. */
|
|
9
|
+
// major: number;
|
|
10
|
+
// /** Minor version. Eg, `2`. */
|
|
11
|
+
// minor: number;
|
|
12
|
+
// /** Patch version. Eg, `3`. */
|
|
13
|
+
// patch: number;
|
|
14
|
+
// /** Original version string. */
|
|
15
|
+
// string: string;
|
|
16
|
+
// };
|
|
17
|
+
// }
|