@treeseed/sdk 0.13.0-rc.41 → 0.13.0-rc.43

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.
@@ -83,11 +83,15 @@ export interface AccountIdentity {
83
83
  linkedAt: string;
84
84
  canUnlink: boolean;
85
85
  }>;
86
+ /** Exact account revision supplied as If-Match for concurrent identity mutations. */
87
+ updatedAt?: string;
86
88
  }
87
89
  export interface AccountPreferences {
88
90
  timeZone: string;
89
91
  realTimeUpdates: boolean;
90
92
  realTimePollingIntervalSeconds: 2 | 5 | 15 | 30;
93
+ /** Exact preference revision supplied as If-Match for concurrent preference mutations. */
94
+ updatedAt?: string;
91
95
  }
92
96
  export type AccountPreferencesUpdate = Partial<AccountPreferences>;
93
97
  export interface AccountWebSession {
@@ -130,6 +134,8 @@ export interface NotificationPreferences {
130
134
  emailCadence: NotificationEmailCadence;
131
135
  globalContentTypes: string[];
132
136
  projectOverrides: NotificationProjectOverride[];
137
+ /** Exact notification-preference revision supplied as If-Match for concurrent updates. */
138
+ updatedAt?: string;
133
139
  }
134
140
  export interface AccountNotification {
135
141
  id: string;
@@ -1,4 +1,7 @@
1
1
  export declare const adminAccountOperations: {
2
+ readonly publicProfile: import("../control-plane-operation.js").ControlPlaneOperationBinding<{
3
+ username: string;
4
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
2
5
  readonly updateUsername: import("../control-plane-operation.js").ControlPlaneOperationBinding<{}, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
3
6
  readonly notificationPreferences: import("../control-plane-operation.js").ControlPlaneOperationBinding<{}, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
4
7
  readonly updateNotificationPreferences: import("../control-plane-operation.js").ControlPlaneOperationBinding<{}, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
@@ -12,13 +12,13 @@ function operation(operationId, method, path, pathShape, options) {
12
12
  rest: { method, path },
13
13
  ...Object.keys(pathShape).length ? { parameters: `treeseed.${operationId}.parameters/v1` } : {},
14
14
  capability: options.capability,
15
- authentication: "oauth",
16
- oauthScopes: [read ? "treeseed:read" : "treeseed:projects:write"],
15
+ authentication: options.authentication ?? "oauth",
16
+ oauthScopes: options.authentication === "anonymous" ? [] : [read ? "treeseed:read" : "treeseed:projects:write"],
17
17
  kind: read ? "read" : "mutation",
18
18
  riskClass,
19
19
  confirmation: riskClass === "ordinary" ? "never" : "input_required",
20
- surfaces: ["rest"],
21
- cacheScope: read ? "principal" : "none",
20
+ surfaces: options.surfaces ?? ["rest"],
21
+ cacheScope: options.cacheScope ?? (read ? "principal" : "none"),
22
22
  pagination: options.pagination ?? "none",
23
23
  concurrencyRequired: options.concurrency,
24
24
  redactedPaths: options.redactedPaths
@@ -30,6 +30,7 @@ function operation(operationId, method, path, pathShape, options) {
30
30
  });
31
31
  }
32
32
  const adminAccountOperations = {
33
+ publicProfile: operation("accounts.profile.public.show", "GET", "/v1/users/by-username/{username}/profile", { username: z.string().min(1) }, { capability: "accounts.public.read", authentication: "anonymous", cacheScope: "public", surfaces: ["rest", "mcp_resource"] }),
33
34
  updateUsername: operation("accounts.username.update", "PATCH", "/v1/auth/web/username", {}, { capability: "accounts.write", concurrency: true }),
34
35
  notificationPreferences: operation("accounts.notification.preferences.show", "GET", "/v1/auth/web/notifications/preferences", {}, { capability: "accounts.read" }),
35
36
  updateNotificationPreferences: operation("accounts.notification.preferences.update", "PUT", "/v1/auth/web/notifications/preferences", {}, { capability: "accounts.write", concurrency: true }),
@@ -82,6 +82,9 @@ export declare const CONTROL_PLANE_OPERATIONS: {
82
82
  readonly readNotification: ControlPlaneOperationBinding<{
83
83
  notificationId: string;
84
84
  }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
85
+ readonly publicProfile: ControlPlaneOperationBinding<{
86
+ username: string;
87
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
85
88
  readonly updateUsername: ControlPlaneOperationBinding<{}, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
86
89
  readonly notificationPreferences: ControlPlaneOperationBinding<{}, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
87
90
  readonly updateNotificationPreferences: ControlPlaneOperationBinding<{}, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
@@ -89,7 +89,7 @@ function resource(operationId, method, path, pathShape, options = { capability:
89
89
  riskClass,
90
90
  confirmation: riskClass === "ordinary" ? "never" : "input_required",
91
91
  surfaces: options.surfaces ?? ["rest"],
92
- cacheScope: kind === "read" ? "principal" : "none",
92
+ cacheScope: options.cacheScope ?? (kind === "read" ? "principal" : "none"),
93
93
  pagination: options.pagination ?? "none",
94
94
  concurrencyRequired: options.concurrency,
95
95
  redactedPaths: options.redactedPaths
@@ -158,7 +158,7 @@ const CONTROL_PLANE_OPERATIONS = {
158
158
  ...adminTeamOperations,
159
159
  list: resource("teams.list", "GET", "/v1/teams", {}, { capability: "teams.read", surfaces: ["rest", "cli", "mcp_tool"], pagination: "cursor" }),
160
160
  create: resource("teams.create", "POST", "/v1/teams", {}, { capability: "teams.write", surfaces: ["rest", "cli", "mcp_tool"] }),
161
- profile: resource("teams.profile.show", "GET", "/v1/teams/by-name/{name}/profile", { name: z.string().min(1) }, { capability: "teams.read", surfaces: ["rest", "mcp_resource"] }),
161
+ profile: resource("teams.profile.show", "GET", "/v1/teams/by-name/{name}/profile", { name: z.string().min(1) }, { capability: "teams.read", scopes: [], authentication: "anonymous", cacheScope: "public", surfaces: ["rest", "mcp_resource"] }),
162
162
  update: resource("teams.update", "PATCH", "/v1/teams/{teamId}", { teamId: z.string().min(1) }, { capability: "teams.write", concurrency: true }),
163
163
  access: resource("teams.access.show", "GET", "/v1/teams/{teamId}/access", { teamId: z.string().min(1) }, { capability: "teams.read" }),
164
164
  members: resource("teams.members.list", "GET", "/v1/teams/{teamId}/members", { teamId: z.string().min(1) }, { capability: "teams.read", pagination: "cursor" }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@treeseed/sdk",
3
- "version": "0.13.0-rc.41",
3
+ "version": "0.13.0-rc.43",
4
4
  "description": "Portable TreeSeed contracts, standards, and typed remote control-plane clients.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {