@proposit/shared 0.2.0 → 0.3.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.
@@ -0,0 +1,27 @@
1
+ import { Type, type Static } from "typebox";
2
+ export declare const MobileSessionRequest: Type.TObject<{
3
+ provider: Type.TUnion<[Type.TLiteral<"google">, Type.TLiteral<"apple">]>;
4
+ idToken: Type.TString;
5
+ nonce: Type.TOptional<Type.TString>;
6
+ }>;
7
+ export type TMobileSessionRequest = Static<typeof MobileSessionRequest>;
8
+ export declare const MobileSessionResponse: Type.TObject<{
9
+ accessToken: Type.TString;
10
+ accessTokenExpiresAt: Type.TString;
11
+ refreshToken: Type.TString;
12
+ refreshTokenExpiresAt: Type.TString;
13
+ userId: Type.TString;
14
+ }>;
15
+ export type TMobileSessionResponse = Static<typeof MobileSessionResponse>;
16
+ export declare const MobileRefreshRequest: Type.TObject<{
17
+ refreshToken: Type.TString;
18
+ }>;
19
+ export type TMobileRefreshRequest = Static<typeof MobileRefreshRequest>;
20
+ export declare const MobileRefreshResponse: Type.TObject<{
21
+ accessToken: Type.TString;
22
+ accessTokenExpiresAt: Type.TString;
23
+ refreshToken: Type.TString;
24
+ refreshTokenExpiresAt: Type.TString;
25
+ }>;
26
+ export type TMobileRefreshResponse = Static<typeof MobileRefreshResponse>;
27
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/schemas/api/auth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,MAAM,EAAE,MAAM,SAAS,CAAA;AAO3C,eAAO,MAAM,oBAAoB;;;;EAI/B,CAAA;AACF,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEvE,eAAO,MAAM,qBAAqB;;;;;;EAMhC,CAAA;AACF,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEzE,eAAO,MAAM,oBAAoB;;EAE/B,CAAA;AACF,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEvE,eAAO,MAAM,qBAAqB;;;;;EAKhC,CAAA;AACF,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,OAAO,qBAAqB,CAAC,CAAA"}
@@ -0,0 +1,27 @@
1
+ import { Type } from "typebox";
2
+ import { UUID } from "../../common.js";
3
+ // Schemas for POST /api/v1/auth/mobile-session and POST /api/v1/auth/mobile-refresh.
4
+ // Shape signed off by server on broker room phase-1-1c-shared (762413, 2026-04-22).
5
+ // See docs/superpowers/specs/2026-04-22-mobile-auth-schemas.md.
6
+ export const MobileSessionRequest = Type.Object({
7
+ provider: Type.Union([Type.Literal("google"), Type.Literal("apple")]),
8
+ idToken: Type.String(),
9
+ nonce: Type.Optional(Type.String()),
10
+ });
11
+ export const MobileSessionResponse = Type.Object({
12
+ accessToken: Type.String(),
13
+ accessTokenExpiresAt: Type.String({ format: "date-time" }),
14
+ refreshToken: Type.String(),
15
+ refreshTokenExpiresAt: Type.String({ format: "date-time" }),
16
+ userId: UUID,
17
+ });
18
+ export const MobileRefreshRequest = Type.Object({
19
+ refreshToken: Type.String(),
20
+ });
21
+ export const MobileRefreshResponse = Type.Object({
22
+ accessToken: Type.String(),
23
+ accessTokenExpiresAt: Type.String({ format: "date-time" }),
24
+ refreshToken: Type.String(),
25
+ refreshTokenExpiresAt: Type.String({ format: "date-time" }),
26
+ });
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schemas/api/auth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAe,MAAM,SAAS,CAAA;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAEtC,qFAAqF;AACrF,oFAAoF;AACpF,gEAAgE;AAEhE,M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": "0.3.0",
4
4
  "description": "Runtime-agnostic TypeScript shared between proposit-server and proposit-mobile. Schemas, engine, api-client, and utilities.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/Proposit-App/proposit-shared",
@@ -15,71 +15,93 @@
15
15
  "exports": {
16
16
  "./api-client": {
17
17
  "types": "./dist/api-client/index.d.ts",
18
- "import": "./dist/api-client/index.js"
18
+ "import": "./dist/api-client/index.js",
19
+ "default": "./dist/api-client/index.js"
19
20
  },
20
21
  "./schemas": {
21
22
  "types": "./dist/schemas/index.d.ts",
22
- "import": "./dist/schemas/index.js"
23
+ "import": "./dist/schemas/index.js",
24
+ "default": "./dist/schemas/index.js"
23
25
  },
24
26
  "./schemas/integrations": {
25
27
  "types": "./dist/schemas/integrations/index.d.ts",
26
- "import": "./dist/schemas/integrations/index.js"
28
+ "import": "./dist/schemas/integrations/index.js",
29
+ "default": "./dist/schemas/integrations/index.js"
27
30
  },
28
31
  "./schemas/api/argument": {
29
32
  "types": "./dist/schemas/api/argument/index.d.ts",
30
- "import": "./dist/schemas/api/argument/index.js"
33
+ "import": "./dist/schemas/api/argument/index.js",
34
+ "default": "./dist/schemas/api/argument/index.js"
35
+ },
36
+ "./schemas/api/auth": {
37
+ "types": "./dist/schemas/api/auth/index.d.ts",
38
+ "import": "./dist/schemas/api/auth/index.js",
39
+ "default": "./dist/schemas/api/auth/index.js"
31
40
  },
32
41
  "./schemas/api/reaction": {
33
42
  "types": "./dist/schemas/api/reaction/index.d.ts",
34
- "import": "./dist/schemas/api/reaction/index.js"
43
+ "import": "./dist/schemas/api/reaction/index.js",
44
+ "default": "./dist/schemas/api/reaction/index.js"
35
45
  },
36
46
  "./schemas/api/review": {
37
47
  "types": "./dist/schemas/api/review/index.d.ts",
38
- "import": "./dist/schemas/api/review/index.js"
48
+ "import": "./dist/schemas/api/review/index.js",
49
+ "default": "./dist/schemas/api/review/index.js"
39
50
  },
40
51
  "./schemas/api/user": {
41
52
  "types": "./dist/schemas/api/user/index.d.ts",
42
- "import": "./dist/schemas/api/user/index.js"
53
+ "import": "./dist/schemas/api/user/index.js",
54
+ "default": "./dist/schemas/api/user/index.js"
43
55
  },
44
56
  "./schemas/*": {
45
57
  "types": "./dist/schemas/*.d.ts",
46
- "import": "./dist/schemas/*.js"
58
+ "import": "./dist/schemas/*.js",
59
+ "default": "./dist/schemas/*.js"
47
60
  },
48
61
  "./consts": {
49
62
  "types": "./dist/consts/index.d.ts",
50
- "import": "./dist/consts/index.js"
63
+ "import": "./dist/consts/index.js",
64
+ "default": "./dist/consts/index.js"
51
65
  },
52
66
  "./consts/*": {
53
67
  "types": "./dist/consts/*.d.ts",
54
- "import": "./dist/consts/*.js"
68
+ "import": "./dist/consts/*.js",
69
+ "default": "./dist/consts/*.js"
55
70
  },
56
71
  "./errors": {
57
72
  "types": "./dist/errors.d.ts",
58
- "import": "./dist/errors.js"
73
+ "import": "./dist/errors.js",
74
+ "default": "./dist/errors.js"
59
75
  },
60
76
  "./checksum": {
61
77
  "types": "./dist/checksum.d.ts",
62
- "import": "./dist/checksum.js"
78
+ "import": "./dist/checksum.js",
79
+ "default": "./dist/checksum.js"
63
80
  },
64
81
  "./utils": {
65
82
  "types": "./dist/utils/index.d.ts",
66
- "import": "./dist/utils/index.js"
83
+ "import": "./dist/utils/index.js",
84
+ "default": "./dist/utils/index.js"
67
85
  },
68
86
  "./utils/*": {
69
87
  "types": "./dist/utils/*.d.ts",
70
- "import": "./dist/utils/*.js"
88
+ "import": "./dist/utils/*.js",
89
+ "default": "./dist/utils/*.js"
71
90
  },
72
91
  "./engine/mutations": {
73
92
  "types": "./dist/engine/mutations/index.d.ts",
74
- "import": "./dist/engine/mutations/index.js"
93
+ "import": "./dist/engine/mutations/index.js",
94
+ "default": "./dist/engine/mutations/index.js"
75
95
  },
76
96
  "./engine/optimistic": {
77
97
  "types": "./dist/engine/optimistic/index.d.ts",
78
- "import": "./dist/engine/optimistic/index.js"
98
+ "import": "./dist/engine/optimistic/index.js",
99
+ "default": "./dist/engine/optimistic/index.js"
79
100
  },
80
101
  "./engine/*": {
81
102
  "types": "./dist/engine/*.d.ts",
82
- "import": "./dist/engine/*.js"
103
+ "import": "./dist/engine/*.js",
104
+ "default": "./dist/engine/*.js"
83
105
  }
84
106
  },
85
107
  "files": [