@thinkai/tai-api-contract 2.5.16 → 2.5.17
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/dist/generated/openapi.d.ts +111 -10
- package/dist/generated/openapi.d.ts.map +1 -1
- package/openapi/openapi.yaml +99 -11
- package/package.json +1 -1
- package/src/generated/openapi.ts +111 -10
|
@@ -68,7 +68,10 @@ export interface paths {
|
|
|
68
68
|
path?: never;
|
|
69
69
|
cookie?: never;
|
|
70
70
|
};
|
|
71
|
-
/**
|
|
71
|
+
/**
|
|
72
|
+
* List workspace team members
|
|
73
|
+
* @description Returns active workspace members (`tai_workspace_members` with `deleted_at` null). Any workspace member may list; invite and role changes require admin.
|
|
74
|
+
*/
|
|
72
75
|
get: operations["listTenantMembers"];
|
|
73
76
|
put?: never;
|
|
74
77
|
post?: never;
|
|
@@ -87,7 +90,10 @@ export interface paths {
|
|
|
87
90
|
};
|
|
88
91
|
get?: never;
|
|
89
92
|
put?: never;
|
|
90
|
-
/**
|
|
93
|
+
/**
|
|
94
|
+
* Invite member to workspace
|
|
95
|
+
* @description Workspace admin only. Upserts `tai_users` by email and adds or reactivates `tai_workspace_members`. Idempotent when the email is already an active member: returns **201** with the existing row and **does not change** their role if the request body role differs. Does not send email; optional `tai_workspace_invitations` row may be recorded (no accept/link flow yet).
|
|
96
|
+
*/
|
|
91
97
|
post: operations["inviteTenantMember"];
|
|
92
98
|
delete?: never;
|
|
93
99
|
options?: never;
|
|
@@ -105,11 +111,17 @@ export interface paths {
|
|
|
105
111
|
get?: never;
|
|
106
112
|
put?: never;
|
|
107
113
|
post?: never;
|
|
108
|
-
/**
|
|
114
|
+
/**
|
|
115
|
+
* Remove member from workspace
|
|
116
|
+
* @description Workspace admin only. Soft-deletes the membership (`deleted_at` set). Cannot remove the workspace owner or the last admin.
|
|
117
|
+
*/
|
|
109
118
|
delete: operations["removeTenantMember"];
|
|
110
119
|
options?: never;
|
|
111
120
|
head?: never;
|
|
112
|
-
/**
|
|
121
|
+
/**
|
|
122
|
+
* Update workspace member role
|
|
123
|
+
* @description Workspace admin only. `memberId` is `tai_users.id` (UUID), not the auth subject.
|
|
124
|
+
*/
|
|
113
125
|
patch: operations["updateTenantMemberRole"];
|
|
114
126
|
trace?: never;
|
|
115
127
|
};
|
|
@@ -1328,8 +1340,11 @@ export interface components {
|
|
|
1328
1340
|
schemas: {
|
|
1329
1341
|
ErrorMessageDto: {
|
|
1330
1342
|
error: string;
|
|
1343
|
+
/** @description Machine-readable error code when present (for example `last_admin`). */
|
|
1344
|
+
code?: string;
|
|
1331
1345
|
};
|
|
1332
1346
|
TeamMemberDto: {
|
|
1347
|
+
/** Format: uuid */
|
|
1333
1348
|
id: string;
|
|
1334
1349
|
name: string;
|
|
1335
1350
|
email: string;
|
|
@@ -2448,6 +2463,8 @@ export interface components {
|
|
|
2448
2463
|
RepoId: string;
|
|
2449
2464
|
ProjectId: string;
|
|
2450
2465
|
NotificationId: string;
|
|
2466
|
+
/** @description Workspace member user id (`tai_users.id`). */
|
|
2467
|
+
WorkspaceMemberId: string;
|
|
2451
2468
|
FixId: string;
|
|
2452
2469
|
/** @description Department filter; send `All departments` to include every department. Scoped using imported `thinkai_org_structure` members when present, otherwise SPA org chart `department` nodes and their descendant teams. When neither source defines the requested department, insights return no scoped teams or contributors (not org-wide data). */
|
|
2453
2470
|
InsightsDepartmentFilter: string;
|
|
@@ -2588,6 +2605,7 @@ export type ParameterWorkspaceId = components['parameters']['WorkspaceId'];
|
|
|
2588
2605
|
export type ParameterRepoId = components['parameters']['RepoId'];
|
|
2589
2606
|
export type ParameterProjectId = components['parameters']['ProjectId'];
|
|
2590
2607
|
export type ParameterNotificationId = components['parameters']['NotificationId'];
|
|
2608
|
+
export type ParameterWorkspaceMemberId = components['parameters']['WorkspaceMemberId'];
|
|
2591
2609
|
export type ParameterFixId = components['parameters']['FixId'];
|
|
2592
2610
|
export type ParameterInsightsDepartmentFilter = components['parameters']['InsightsDepartmentFilter'];
|
|
2593
2611
|
export type $defs = Record<string, never>;
|
|
@@ -2717,11 +2735,32 @@ export interface operations {
|
|
|
2717
2735
|
[name: string]: unknown;
|
|
2718
2736
|
};
|
|
2719
2737
|
content: {
|
|
2738
|
+
/**
|
|
2739
|
+
* @example {
|
|
2740
|
+
* "members": [
|
|
2741
|
+
* {
|
|
2742
|
+
* "id": "11111111-1111-4111-8111-111111111111",
|
|
2743
|
+
* "name": "Alex Admin",
|
|
2744
|
+
* "email": "alex@example.com",
|
|
2745
|
+
* "role": "admin"
|
|
2746
|
+
* }
|
|
2747
|
+
* ]
|
|
2748
|
+
* }
|
|
2749
|
+
*/
|
|
2720
2750
|
"application/json": components["schemas"]["TeamMemberListDto"];
|
|
2721
2751
|
};
|
|
2722
2752
|
};
|
|
2723
2753
|
401: components["responses"]["Unauthorized"];
|
|
2724
2754
|
403: components["responses"]["Forbidden"];
|
|
2755
|
+
/** @description Workspace does not exist or malformed workspaceId */
|
|
2756
|
+
404: {
|
|
2757
|
+
headers: {
|
|
2758
|
+
[name: string]: unknown;
|
|
2759
|
+
};
|
|
2760
|
+
content: {
|
|
2761
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
2762
|
+
};
|
|
2763
|
+
};
|
|
2725
2764
|
};
|
|
2726
2765
|
};
|
|
2727
2766
|
inviteTenantMember: {
|
|
@@ -2735,6 +2774,12 @@ export interface operations {
|
|
|
2735
2774
|
};
|
|
2736
2775
|
requestBody: {
|
|
2737
2776
|
content: {
|
|
2777
|
+
/**
|
|
2778
|
+
* @example {
|
|
2779
|
+
* "email": "new.member@example.com",
|
|
2780
|
+
* "role": "editor"
|
|
2781
|
+
* }
|
|
2782
|
+
*/
|
|
2738
2783
|
"application/json": components["schemas"]["InviteTeamMemberBodyDto"];
|
|
2739
2784
|
};
|
|
2740
2785
|
};
|
|
@@ -2748,8 +2793,26 @@ export interface operations {
|
|
|
2748
2793
|
"application/json": components["schemas"]["TeamMemberDto"];
|
|
2749
2794
|
};
|
|
2750
2795
|
};
|
|
2796
|
+
/** @description Invalid email or role */
|
|
2797
|
+
400: {
|
|
2798
|
+
headers: {
|
|
2799
|
+
[name: string]: unknown;
|
|
2800
|
+
};
|
|
2801
|
+
content: {
|
|
2802
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
2803
|
+
};
|
|
2804
|
+
};
|
|
2751
2805
|
401: components["responses"]["Unauthorized"];
|
|
2752
2806
|
403: components["responses"]["Forbidden"];
|
|
2807
|
+
/** @description Workspace does not exist or malformed workspaceId */
|
|
2808
|
+
404: {
|
|
2809
|
+
headers: {
|
|
2810
|
+
[name: string]: unknown;
|
|
2811
|
+
};
|
|
2812
|
+
content: {
|
|
2813
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
2814
|
+
};
|
|
2815
|
+
};
|
|
2753
2816
|
};
|
|
2754
2817
|
};
|
|
2755
2818
|
removeTenantMember: {
|
|
@@ -2758,7 +2821,8 @@ export interface operations {
|
|
|
2758
2821
|
header?: never;
|
|
2759
2822
|
path: {
|
|
2760
2823
|
workspaceId: components["parameters"]["WorkspaceId"];
|
|
2761
|
-
|
|
2824
|
+
/** @description Workspace member user id (`tai_users.id`). */
|
|
2825
|
+
memberId: components["parameters"]["WorkspaceMemberId"];
|
|
2762
2826
|
};
|
|
2763
2827
|
cookie?: never;
|
|
2764
2828
|
};
|
|
@@ -2773,12 +2837,23 @@ export interface operations {
|
|
|
2773
2837
|
};
|
|
2774
2838
|
401: components["responses"]["Unauthorized"];
|
|
2775
2839
|
403: components["responses"]["Forbidden"];
|
|
2776
|
-
/** @description Member not found */
|
|
2840
|
+
/** @description Member not found or invalid memberId */
|
|
2777
2841
|
404: {
|
|
2778
2842
|
headers: {
|
|
2779
2843
|
[name: string]: unknown;
|
|
2780
2844
|
};
|
|
2781
|
-
content
|
|
2845
|
+
content: {
|
|
2846
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
2847
|
+
};
|
|
2848
|
+
};
|
|
2849
|
+
/** @description Cannot remove workspace owner or last admin */
|
|
2850
|
+
409: {
|
|
2851
|
+
headers: {
|
|
2852
|
+
[name: string]: unknown;
|
|
2853
|
+
};
|
|
2854
|
+
content: {
|
|
2855
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
2856
|
+
};
|
|
2782
2857
|
};
|
|
2783
2858
|
};
|
|
2784
2859
|
};
|
|
@@ -2788,12 +2863,18 @@ export interface operations {
|
|
|
2788
2863
|
header?: never;
|
|
2789
2864
|
path: {
|
|
2790
2865
|
workspaceId: components["parameters"]["WorkspaceId"];
|
|
2791
|
-
|
|
2866
|
+
/** @description Workspace member user id (`tai_users.id`). */
|
|
2867
|
+
memberId: components["parameters"]["WorkspaceMemberId"];
|
|
2792
2868
|
};
|
|
2793
2869
|
cookie?: never;
|
|
2794
2870
|
};
|
|
2795
2871
|
requestBody: {
|
|
2796
2872
|
content: {
|
|
2873
|
+
/**
|
|
2874
|
+
* @example {
|
|
2875
|
+
* "role": "viewer"
|
|
2876
|
+
* }
|
|
2877
|
+
*/
|
|
2797
2878
|
"application/json": components["schemas"]["UpdateTeamMemberRoleBodyDto"];
|
|
2798
2879
|
};
|
|
2799
2880
|
};
|
|
@@ -2807,14 +2888,34 @@ export interface operations {
|
|
|
2807
2888
|
"application/json": components["schemas"]["TeamMemberDto"];
|
|
2808
2889
|
};
|
|
2809
2890
|
};
|
|
2891
|
+
/** @description Invalid role payload */
|
|
2892
|
+
400: {
|
|
2893
|
+
headers: {
|
|
2894
|
+
[name: string]: unknown;
|
|
2895
|
+
};
|
|
2896
|
+
content: {
|
|
2897
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
2898
|
+
};
|
|
2899
|
+
};
|
|
2810
2900
|
401: components["responses"]["Unauthorized"];
|
|
2811
2901
|
403: components["responses"]["Forbidden"];
|
|
2812
|
-
/** @description Member not found */
|
|
2902
|
+
/** @description Member not found or invalid memberId */
|
|
2813
2903
|
404: {
|
|
2814
2904
|
headers: {
|
|
2815
2905
|
[name: string]: unknown;
|
|
2816
2906
|
};
|
|
2817
|
-
content
|
|
2907
|
+
content: {
|
|
2908
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
2909
|
+
};
|
|
2910
|
+
};
|
|
2911
|
+
/** @description Cannot demote the last workspace admin */
|
|
2912
|
+
409: {
|
|
2913
|
+
headers: {
|
|
2914
|
+
[name: string]: unknown;
|
|
2915
|
+
};
|
|
2916
|
+
content: {
|
|
2917
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
2918
|
+
};
|
|
2818
2919
|
};
|
|
2819
2920
|
};
|
|
2820
2921
|
};
|