@thinkai/tai-api-contract 2.46.0-pr.858.7e24f603 → 2.47.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.
@@ -81,7 +81,13 @@ export interface paths {
81
81
  /** Update current user profile */
82
82
  put: operations["updateMe"];
83
83
  post?: never;
84
- delete?: never;
84
+ /**
85
+ * Delete current user account and all owned data
86
+ * @description Self-service account deletion. Hard-deletes the authenticated user in a single atomic transaction with the same semantics as admin `deleteUserAndData` (#428): owned workspaces (and all workspace-level child tables via CASCADE), membership rows in other workspaces, invitations where the user is `invited_by`, and the user row itself. After the DB commit, removes the corresponding Supabase Auth user via the service-role key; Auth deletion failure is logged but does not roll back the DB changes.
87
+ * **Irreversible.** Owned workspaces in the #440 soft-delete grace period are also hard-deleted immediately; there is no restore window after account delete.
88
+ * **Authorization:** Bearer JWT required. Body must include the caller's email exactly (case-insensitive) as a type-to-confirm guard.
89
+ */
90
+ delete: operations["deleteMe"];
85
91
  options?: never;
86
92
  head?: never;
87
93
  patch?: never;
@@ -3103,6 +3109,13 @@ export interface components {
3103
3109
  email?: string;
3104
3110
  defaultWorkspaceId?: string | null;
3105
3111
  };
3112
+ DeleteMeBodyDto: {
3113
+ /**
3114
+ * Format: email
3115
+ * @description Must match the authenticated user's email (case-insensitive). Acts as a type-to-confirm guard against accidental deletion.
3116
+ */
3117
+ email: string;
3118
+ };
3106
3119
  WorkspaceSummaryDto: {
3107
3120
  id: string;
3108
3121
  slug: string;
@@ -4715,6 +4728,7 @@ export type AiToolMemberHeatmapDayDto = components['schemas']['AiToolMemberHeatm
4715
4728
  export type AiToolMemberDetailDto = components['schemas']['AiToolMemberDetailDto'];
4716
4729
  export type MeProfileDto = components['schemas']['MeProfileDto'];
4717
4730
  export type UpdateMeBodyDto = components['schemas']['UpdateMeBodyDto'];
4731
+ export type DeleteMeBodyDto = components['schemas']['DeleteMeBodyDto'];
4718
4732
  export type WorkspaceSummaryDto = components['schemas']['WorkspaceSummaryDto'];
4719
4733
  export type WorkspacesForUserDto = components['schemas']['WorkspacesForUserDto'];
4720
4734
  export type CreateWorkspaceBodyDto = components['schemas']['CreateWorkspaceBodyDto'];
@@ -5112,6 +5126,62 @@ export interface operations {
5112
5126
  401: components["responses"]["Unauthorized"];
5113
5127
  };
5114
5128
  };
5129
+ deleteMe: {
5130
+ parameters: {
5131
+ query?: never;
5132
+ header?: never;
5133
+ path?: never;
5134
+ cookie?: never;
5135
+ };
5136
+ requestBody: {
5137
+ content: {
5138
+ "application/json": components["schemas"]["DeleteMeBodyDto"];
5139
+ };
5140
+ };
5141
+ responses: {
5142
+ /** @description Account and all owned data deleted. */
5143
+ 204: {
5144
+ headers: {
5145
+ [name: string]: unknown;
5146
+ };
5147
+ content?: never;
5148
+ };
5149
+ /** @description Missing or mismatched confirmation email. */
5150
+ 400: {
5151
+ headers: {
5152
+ [name: string]: unknown;
5153
+ };
5154
+ content: {
5155
+ /**
5156
+ * @example {
5157
+ * "error": "Confirmation email does not match account email",
5158
+ * "code": "email_mismatch"
5159
+ * }
5160
+ */
5161
+ "application/json": components["schemas"]["ErrorMessageDto"];
5162
+ };
5163
+ };
5164
+ 401: components["responses"]["Unauthorized"];
5165
+ /** @description Identity conflict resolving the current user. */
5166
+ 409: {
5167
+ headers: {
5168
+ [name: string]: unknown;
5169
+ };
5170
+ content: {
5171
+ "application/json": components["schemas"]["ErrorMessageDto"];
5172
+ };
5173
+ };
5174
+ /** @description Account deletion not supported by the configured store. */
5175
+ 503: {
5176
+ headers: {
5177
+ [name: string]: unknown;
5178
+ };
5179
+ content: {
5180
+ "application/json": components["schemas"]["ErrorMessageDto"];
5181
+ };
5182
+ };
5183
+ };
5184
+ };
5115
5185
  listMyWorkspaces: {
5116
5186
  parameters: {
5117
5187
  query?: never;