@salsita-ai/contracts 0.50.0-develop.bc08a38ffe → 0.50.0-develop.bd84173265
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/README.md +1 -1
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.js +1 -1
- package/dist/api/studio-session.d.ts +54 -0
- package/dist/api/studio-session.js +1 -0
- package/package.json +2 -6
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ There is no package-root export. Import from the path that owns the boundary; th
|
|
|
15
15
|
|
|
16
16
|
| Entry point | Boundary it defines |
|
|
17
17
|
| ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
18
|
-
| `api` | API access levels, session roles,
|
|
18
|
+
| `api` | API access levels, session roles, access/session token payloads, and Studio browser-session response schema. |
|
|
19
19
|
| `clerk` | Clerk backend client and services and the shared user, invitation, role, and token schemas. |
|
|
20
20
|
| `domain` | Branded deployment, customer, project, environment, configuration, and revision data: types, schemas, constructors, and the state values clients compare against. |
|
|
21
21
|
| `chat` | Chat completion and stream chunks, tool definitions, validation, speech, and embeddings. |
|
package/dist/api/index.d.ts
CHANGED
|
@@ -2,3 +2,4 @@ export { AccessLevel } from './access-level.js';
|
|
|
2
2
|
export { SessionRole } from './session-role.js';
|
|
3
3
|
export { type SessionTokenPayload } from './session-token.js';
|
|
4
4
|
export { type AccessTokenPayload } from './access-token.js';
|
|
5
|
+
export { StudioSession } from './studio-session.js';
|
package/dist/api/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{AccessLevel}from"./access-level.js";export{SessionRole}from"./session-role.js";
|
|
1
|
+
export{AccessLevel}from"./access-level.js";export{SessionRole}from"./session-role.js";export{StudioSession}from"./studio-session.js";
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** Account and current memberships of a fixed-lifetime Studio browser session; grants no workspace API access. */
|
|
3
|
+
export declare const StudioSession: z.ZodObject<{
|
|
4
|
+
userId: z.ZodString;
|
|
5
|
+
expiresAt: z.ZodNumber;
|
|
6
|
+
workspaces: z.ZodArray<z.ZodObject<{
|
|
7
|
+
customerId: z.ZodString;
|
|
8
|
+
slug: z.ZodString;
|
|
9
|
+
name: z.ZodString;
|
|
10
|
+
type: z.ZodNativeEnum<{
|
|
11
|
+
readonly Standard: 'standard';
|
|
12
|
+
readonly SdkBuilder: 'sdk_builder';
|
|
13
|
+
}>;
|
|
14
|
+
role: z.ZodEnum<["user", "admin", "superadmin"]>;
|
|
15
|
+
tags: z.ZodArray<z.ZodString, "many">;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
customerId: string;
|
|
18
|
+
slug: string;
|
|
19
|
+
name: string;
|
|
20
|
+
type: "sdk_builder" | "standard";
|
|
21
|
+
role: "admin" | "superadmin" | "user";
|
|
22
|
+
tags: string[];
|
|
23
|
+
}, {
|
|
24
|
+
customerId: string;
|
|
25
|
+
slug: string;
|
|
26
|
+
name: string;
|
|
27
|
+
type: "sdk_builder" | "standard";
|
|
28
|
+
role: "admin" | "superadmin" | "user";
|
|
29
|
+
tags: string[];
|
|
30
|
+
}>, "many">;
|
|
31
|
+
}, "strip", z.ZodTypeAny, {
|
|
32
|
+
userId: string;
|
|
33
|
+
expiresAt: number;
|
|
34
|
+
workspaces: {
|
|
35
|
+
customerId: string;
|
|
36
|
+
slug: string;
|
|
37
|
+
name: string;
|
|
38
|
+
type: "sdk_builder" | "standard";
|
|
39
|
+
role: "admin" | "superadmin" | "user";
|
|
40
|
+
tags: string[];
|
|
41
|
+
}[];
|
|
42
|
+
}, {
|
|
43
|
+
userId: string;
|
|
44
|
+
expiresAt: number;
|
|
45
|
+
workspaces: {
|
|
46
|
+
customerId: string;
|
|
47
|
+
slug: string;
|
|
48
|
+
name: string;
|
|
49
|
+
type: "sdk_builder" | "standard";
|
|
50
|
+
role: "admin" | "superadmin" | "user";
|
|
51
|
+
tags: string[];
|
|
52
|
+
}[];
|
|
53
|
+
}>;
|
|
54
|
+
export type StudioSession = z.infer<typeof StudioSession>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z as r}from"zod";import{CustomerTypeSchema as s}from"../domain/index.js";export const StudioSession=r.object({userId:r.string().uuid(),expiresAt:r.number(),workspaces:r.array(r.object({customerId:r.string().uuid(),slug:r.string(),name:r.string(),type:s,role:r.enum(["user","admin","superadmin"]),tags:r.array(r.string())}))});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salsita-ai/contracts",
|
|
3
|
-
"version": "0.50.0-develop.
|
|
3
|
+
"version": "0.50.0-develop.bd84173265",
|
|
4
4
|
"description": "Shared API, authentication, domain, chat, and webhook contracts for Phoenix.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"salsita",
|
|
@@ -48,23 +48,19 @@
|
|
|
48
48
|
"@tanstack/ai": "0.64.0",
|
|
49
49
|
"@types/aws-lambda": "8.10.133",
|
|
50
50
|
"ajv": "8.20.0",
|
|
51
|
-
"http-errors": "2.0.1",
|
|
52
51
|
"jose": "6.2.3",
|
|
53
|
-
"lodash-es": "4.18.1",
|
|
54
52
|
"openai": "7.23.0",
|
|
55
53
|
"ts-pattern": "5.9.0",
|
|
56
54
|
"uuid": "14.0.0",
|
|
57
55
|
"valid-url": "1.0.9",
|
|
58
56
|
"zod": "3.25.76",
|
|
59
|
-
"@salsita-ai/common": "0.50.0-develop.
|
|
57
|
+
"@salsita-ai/common": "0.50.0-develop.bd84173265"
|
|
60
58
|
},
|
|
61
59
|
"devDependencies": {
|
|
62
60
|
"@lingui/core": "5.9.5",
|
|
63
61
|
"@swc/cli": "0.8.1",
|
|
64
62
|
"@swc/core": "1.15.40",
|
|
65
|
-
"@types/http-errors": "2.0.5",
|
|
66
63
|
"@types/json-schema": "7.0.15",
|
|
67
|
-
"@types/lodash-es": "4.17.12",
|
|
68
64
|
"@types/valid-url": "1.0.7",
|
|
69
65
|
"eslint": "9.39.4",
|
|
70
66
|
"prettier": "3.8.3",
|