@sneat/extension-team-contract 0.1.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/package.json +22 -0
- package/src/index.ts +18 -0
package/package.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sneat/extension-team-contract",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Published TS contract for the team extension (follow stub), hand-implemented to match ../typespec/api4team.tsp.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "src/index.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"src"
|
|
9
|
+
],
|
|
10
|
+
"publishConfig": {
|
|
11
|
+
"access": "public"
|
|
12
|
+
},
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"typescript": "^5.6.0",
|
|
15
|
+
"vitest": "^2.1.0",
|
|
16
|
+
"@types/node": "^22.0.0"
|
|
17
|
+
},
|
|
18
|
+
"scripts": {
|
|
19
|
+
"test": "node node_modules/vitest/vitest.mjs run",
|
|
20
|
+
"typecheck": "node node_modules/typescript/bin/tsc --noEmit"
|
|
21
|
+
}
|
|
22
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// @sneat/extension-team-contract — public TS contract for the team extension.
|
|
2
|
+
// Types are hand-implemented to match ../../typespec/api4team.tsp (no emitters).
|
|
3
|
+
// See also: github.com/sneat-co/sneat-team-ext/backend/team for the Go counterpart.
|
|
4
|
+
|
|
5
|
+
/** Request body for POST /v0/api4team/follow. */
|
|
6
|
+
export interface FollowTeamRequest {
|
|
7
|
+
/** The ID of the team to follow. */
|
|
8
|
+
teamID: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** Response body returned after a follow operation. */
|
|
12
|
+
export interface FollowTeamResponse {
|
|
13
|
+
/** The ID of the team that was followed. */
|
|
14
|
+
teamID: string;
|
|
15
|
+
|
|
16
|
+
/** True if the user is now following the team; false if they were already following. */
|
|
17
|
+
followed: boolean;
|
|
18
|
+
}
|