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

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,33 @@
1
+ export declare const adminAccountOperations: {
2
+ readonly updateUsername: import("../control-plane-operation.js").ControlPlaneOperationBinding<{}, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
3
+ readonly notificationPreferences: import("../control-plane-operation.js").ControlPlaneOperationBinding<{}, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
4
+ readonly updateNotificationPreferences: import("../control-plane-operation.js").ControlPlaneOperationBinding<{}, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
5
+ readonly themes: import("../control-plane-operation.js").ControlPlaneOperationBinding<{}, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
6
+ readonly createTheme: import("../control-plane-operation.js").ControlPlaneOperationBinding<{}, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
7
+ readonly updateTheme: import("../control-plane-operation.js").ControlPlaneOperationBinding<{
8
+ themeId: string;
9
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
10
+ readonly deleteTheme: import("../control-plane-operation.js").ControlPlaneOperationBinding<{
11
+ themeId: string;
12
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
13
+ readonly unlinkProvider: import("../control-plane-operation.js").ControlPlaneOperationBinding<{
14
+ identityId: string;
15
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
16
+ };
17
+ export declare const adminTeamOperations: {
18
+ readonly revokeInvite: import("../control-plane-operation.js").ControlPlaneOperationBinding<{
19
+ teamId: string;
20
+ inviteId: string;
21
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
22
+ readonly resendInvite: import("../control-plane-operation.js").ControlPlaneOperationBinding<{
23
+ teamId: string;
24
+ inviteId: string;
25
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
26
+ readonly memberRemovalBlockers: import("../control-plane-operation.js").ControlPlaneOperationBinding<{
27
+ teamId: string;
28
+ membershipId: string;
29
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
30
+ readonly remove: import("../control-plane-operation.js").ControlPlaneOperationBinding<{
31
+ teamId: string;
32
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
33
+ };
@@ -0,0 +1,51 @@
1
+ import { z } from "zod";
2
+ import { defineOperation } from "../operation-builder.js";
3
+ const empty = z.object({}).strict();
4
+ const none = z.undefined();
5
+ const record = z.record(z.unknown());
6
+ function operation(operationId, method, path, pathShape, options) {
7
+ const read = method === "GET";
8
+ const riskClass = options.risk ?? "ordinary";
9
+ return defineOperation({
10
+ operationId,
11
+ description: `${read ? "Read" : "Apply"} ${operationId}.`,
12
+ rest: { method, path },
13
+ ...Object.keys(pathShape).length ? { parameters: `treeseed.${operationId}.parameters/v1` } : {},
14
+ capability: options.capability,
15
+ authentication: "oauth",
16
+ oauthScopes: [read ? "treeseed:read" : "treeseed:projects:write"],
17
+ kind: read ? "read" : "mutation",
18
+ riskClass,
19
+ confirmation: riskClass === "ordinary" ? "never" : "input_required",
20
+ surfaces: ["rest"],
21
+ cacheScope: read ? "principal" : "none",
22
+ pagination: options.pagination ?? "none",
23
+ concurrencyRequired: options.concurrency,
24
+ redactedPaths: options.redactedPaths
25
+ }, {
26
+ path: z.object(pathShape).strict(),
27
+ query: read ? record : empty,
28
+ body: read ? none : record,
29
+ output: record
30
+ });
31
+ }
32
+ const adminAccountOperations = {
33
+ updateUsername: operation("accounts.username.update", "PATCH", "/v1/auth/web/username", {}, { capability: "accounts.write", concurrency: true }),
34
+ notificationPreferences: operation("accounts.notification.preferences.show", "GET", "/v1/auth/web/notifications/preferences", {}, { capability: "accounts.read" }),
35
+ updateNotificationPreferences: operation("accounts.notification.preferences.update", "PUT", "/v1/auth/web/notifications/preferences", {}, { capability: "accounts.write", concurrency: true }),
36
+ themes: operation("accounts.themes.list", "GET", "/v1/auth/web/themes", {}, { capability: "accounts.read", pagination: "cursor" }),
37
+ createTheme: operation("accounts.themes.create", "POST", "/v1/auth/web/themes", {}, { capability: "accounts.write" }),
38
+ updateTheme: operation("accounts.themes.update", "PUT", "/v1/auth/web/themes/{themeId}", { themeId: z.string().min(1) }, { capability: "accounts.write", concurrency: true }),
39
+ deleteTheme: operation("accounts.themes.delete", "DELETE", "/v1/auth/web/themes/{themeId}", { themeId: z.string().min(1) }, { capability: "accounts.write", risk: "destructive", concurrency: true }),
40
+ unlinkProvider: operation("accounts.providers.unlink", "DELETE", "/v1/auth/web/providers/{identityId}", { identityId: z.string().min(1) }, { capability: "accounts.write", risk: "credential" })
41
+ };
42
+ const adminTeamOperations = {
43
+ revokeInvite: operation("teams.invites.revoke", "DELETE", "/v1/teams/{teamId}/invites/{inviteId}", { teamId: z.string().min(1), inviteId: z.string().min(1) }, { capability: "teams.write", risk: "destructive", concurrency: true }),
44
+ resendInvite: operation("teams.invites.resend", "POST", "/v1/teams/{teamId}/invites/{inviteId}/resend", { teamId: z.string().min(1), inviteId: z.string().min(1) }, { capability: "teams.write" }),
45
+ memberRemovalBlockers: operation("teams.members.removal.blockers", "GET", "/v1/teams/{teamId}/members/{membershipId}/removal-blockers", { teamId: z.string().min(1), membershipId: z.string().min(1) }, { capability: "teams.read" }),
46
+ remove: operation("teams.delete", "DELETE", "/v1/teams/{teamId}/permanent-delete", { teamId: z.string().min(1) }, { capability: "teams.delete", risk: "irreversible", concurrency: true, redactedPaths: ["body.confirmation", "body.currentPassword", "body.reauthenticationGrantId"] })
47
+ };
48
+ export {
49
+ adminAccountOperations,
50
+ adminTeamOperations
51
+ };
@@ -82,6 +82,20 @@ 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 updateUsername: ControlPlaneOperationBinding<{}, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
86
+ readonly notificationPreferences: ControlPlaneOperationBinding<{}, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
87
+ readonly updateNotificationPreferences: ControlPlaneOperationBinding<{}, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
88
+ readonly themes: ControlPlaneOperationBinding<{}, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
89
+ readonly createTheme: ControlPlaneOperationBinding<{}, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
90
+ readonly updateTheme: ControlPlaneOperationBinding<{
91
+ themeId: string;
92
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
93
+ readonly deleteTheme: ControlPlaneOperationBinding<{
94
+ themeId: string;
95
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
96
+ readonly unlinkProvider: ControlPlaneOperationBinding<{
97
+ identityId: string;
98
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
85
99
  };
86
100
  readonly teams: {
87
101
  readonly list: ControlPlaneOperationBinding<{}, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
@@ -133,6 +147,21 @@ export declare const CONTROL_PLANE_OPERATIONS: {
133
147
  readonly leave: ControlPlaneOperationBinding<{
134
148
  teamId: string;
135
149
  }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
150
+ readonly revokeInvite: ControlPlaneOperationBinding<{
151
+ teamId: string;
152
+ inviteId: string;
153
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
154
+ readonly resendInvite: ControlPlaneOperationBinding<{
155
+ teamId: string;
156
+ inviteId: string;
157
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
158
+ readonly memberRemovalBlockers: ControlPlaneOperationBinding<{
159
+ teamId: string;
160
+ membershipId: string;
161
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
162
+ readonly remove: ControlPlaneOperationBinding<{
163
+ teamId: string;
164
+ }, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
136
165
  };
137
166
  readonly discussions: {
138
167
  readonly list: ControlPlaneOperationBinding<{}, {}, Record<string, unknown> | undefined, Record<string, unknown>>;
@@ -1,6 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { defineOperation as define, defineTreeDxProxyOperation as treedxProxy } from "./operation-builder.js";
3
3
  import { communicationOperations, providerDiscussionResponseOperation } from "./catalog/communication-operations.js";
4
+ import { adminAccountOperations, adminTeamOperations } from "./catalog/admin-account-team-operations.js";
4
5
  const empty = z.object({}).strict();
5
6
  const none = z.undefined();
6
7
  const record = z.record(z.unknown());
@@ -130,6 +131,7 @@ const CONTROL_PLANE_OPERATIONS = {
130
131
  updateRepositoryTopology: resource("projects.repository.update", "PUT", "/v1/projects/{projectId}/repository-topology", { projectId: z.string().min(1) }, { capability: "repositories.write", concurrency: true })
131
132
  },
132
133
  accounts: {
134
+ ...adminAccountOperations,
133
135
  current: resource("accounts.current.show", "GET", "/v1/me", {}, { capability: "accounts.read", surfaces: ["rest", "cli", "mcp_resource"] }),
134
136
  register: resource("accounts.register", "POST", "/v1/auth/web/sign-up", {}, { capability: "accounts.register", scopes: [], redactedPaths: ["body.password"] }),
135
137
  confirmEmail: resource("accounts.email.confirm", "POST", "/v1/auth/web/confirm-email", {}, { capability: "accounts.register", scopes: [], redactedPaths: ["body.token"] }),
@@ -153,6 +155,7 @@ const CONTROL_PLANE_OPERATIONS = {
153
155
  readNotification: resource("accounts.notifications.read", "POST", "/v1/auth/web/notifications/{notificationId}/read", { notificationId: z.string().min(1) }, { capability: "accounts.write" })
154
156
  },
155
157
  teams: {
158
+ ...adminTeamOperations,
156
159
  list: resource("teams.list", "GET", "/v1/teams", {}, { capability: "teams.read", surfaces: ["rest", "cli", "mcp_tool"], pagination: "cursor" }),
157
160
  create: resource("teams.create", "POST", "/v1/teams", {}, { capability: "teams.write", surfaces: ["rest", "cli", "mcp_tool"] }),
158
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"] }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@treeseed/sdk",
3
- "version": "0.13.0-rc.40",
3
+ "version": "0.13.0-rc.41",
4
4
  "description": "Portable TreeSeed contracts, standards, and typed remote control-plane clients.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {