@thinkai/tai-api-contract 2.208.1 → 2.209.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.
- package/dist/generated/openapi.d.ts +208 -0
- package/dist/generated/openapi.d.ts.map +1 -1
- package/openapi/openapi.yaml +164 -1
- package/package.json +1 -1
- package/src/generated/openapi.ts +208 -0
package/openapi/openapi.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
openapi: 3.0.3
|
|
2
2
|
info:
|
|
3
3
|
title: ThinkAI API
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.209.0
|
|
5
5
|
description: >
|
|
6
6
|
Contract surface for the AI Driven SDLC backend used by ThinkAI.
|
|
7
7
|
Workspace-scoped routes use `/workspaces/{workspaceId}/...`.
|
|
@@ -2853,6 +2853,118 @@ paths:
|
|
|
2853
2853
|
schema:
|
|
2854
2854
|
$ref: "#/components/schemas/ErrorMessageDto"
|
|
2855
2855
|
|
|
2856
|
+
/auth/sso-lookup:
|
|
2857
|
+
get:
|
|
2858
|
+
tags: [Me]
|
|
2859
|
+
summary: Look up enterprise SSO availability by email domain
|
|
2860
|
+
description: >
|
|
2861
|
+
Unauthenticated. Returns whether a workspace has enabled enterprise SAML SSO for the
|
|
2862
|
+
given email domain. Does not return `ssoProviderId`; the SPA calls
|
|
2863
|
+
`supabase.auth.signInWithSSO({ domain })` after a positive lookup.
|
|
2864
|
+
operationId: getAuthSsoLookup
|
|
2865
|
+
security: []
|
|
2866
|
+
parameters:
|
|
2867
|
+
- name: domain
|
|
2868
|
+
in: query
|
|
2869
|
+
required: true
|
|
2870
|
+
schema:
|
|
2871
|
+
type: string
|
|
2872
|
+
example: acme.com
|
|
2873
|
+
description: Email domain (without `@`)
|
|
2874
|
+
responses:
|
|
2875
|
+
"200":
|
|
2876
|
+
description: Lookup result
|
|
2877
|
+
content:
|
|
2878
|
+
application/json:
|
|
2879
|
+
schema:
|
|
2880
|
+
$ref: "#/components/schemas/AuthSsoLookupDto"
|
|
2881
|
+
"400":
|
|
2882
|
+
description: Invalid domain
|
|
2883
|
+
content:
|
|
2884
|
+
application/json:
|
|
2885
|
+
schema:
|
|
2886
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
2887
|
+
|
|
2888
|
+
/workspaces/{workspaceId}/enterprise-sso:
|
|
2889
|
+
get:
|
|
2890
|
+
tags: [Workspace]
|
|
2891
|
+
summary: Get enterprise SAML SSO configuration
|
|
2892
|
+
description: >
|
|
2893
|
+
Returns per-workspace enterprise SSO binding (`ssoProviderId`, domains, join policy).
|
|
2894
|
+
Member-level read. Does not return IdP metadata XML.
|
|
2895
|
+
operationId: getWorkspaceEnterpriseSso
|
|
2896
|
+
parameters:
|
|
2897
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
2898
|
+
responses:
|
|
2899
|
+
"200":
|
|
2900
|
+
description: Current SSO config (defaults when unset)
|
|
2901
|
+
content:
|
|
2902
|
+
application/json:
|
|
2903
|
+
schema:
|
|
2904
|
+
$ref: "#/components/schemas/WorkspaceSsoConfigDto"
|
|
2905
|
+
"401":
|
|
2906
|
+
$ref: "#/components/responses/Unauthorized"
|
|
2907
|
+
"403":
|
|
2908
|
+
$ref: "#/components/responses/Forbidden"
|
|
2909
|
+
"404":
|
|
2910
|
+
description: Workspace does not exist or malformed workspaceId
|
|
2911
|
+
content:
|
|
2912
|
+
application/json:
|
|
2913
|
+
schema:
|
|
2914
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
2915
|
+
put:
|
|
2916
|
+
tags: [Workspace]
|
|
2917
|
+
summary: Set enterprise SAML SSO configuration
|
|
2918
|
+
description: >
|
|
2919
|
+
Full-replace workspace enterprise SSO config. Bind a Supabase `sso_provider_id`
|
|
2920
|
+
(from `supabase sso add` for Okta or Entra) and one or more email domains.
|
|
2921
|
+
`joinPolicy: domain_auto_join` grants viewer membership on first `GET /me/workspaces`
|
|
2922
|
+
after SSO login when the JWT email domain matches. Requires workspace **admin**.
|
|
2923
|
+
Domains must be unique across enabled workspaces (`409 sso_domain_conflict`).
|
|
2924
|
+
operationId: putWorkspaceEnterpriseSso
|
|
2925
|
+
parameters:
|
|
2926
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
2927
|
+
requestBody:
|
|
2928
|
+
required: true
|
|
2929
|
+
content:
|
|
2930
|
+
application/json:
|
|
2931
|
+
schema:
|
|
2932
|
+
$ref: "#/components/schemas/WorkspaceSsoConfigDto"
|
|
2933
|
+
responses:
|
|
2934
|
+
"204":
|
|
2935
|
+
description: Config persisted
|
|
2936
|
+
"400":
|
|
2937
|
+
description: Invalid payload
|
|
2938
|
+
content:
|
|
2939
|
+
application/json:
|
|
2940
|
+
schema:
|
|
2941
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
2942
|
+
"401":
|
|
2943
|
+
$ref: "#/components/responses/Unauthorized"
|
|
2944
|
+
"403":
|
|
2945
|
+
description: Forbidden — workspace admin required
|
|
2946
|
+
content:
|
|
2947
|
+
application/json:
|
|
2948
|
+
schema:
|
|
2949
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
2950
|
+
"404":
|
|
2951
|
+
description: Workspace does not exist or malformed workspaceId
|
|
2952
|
+
content:
|
|
2953
|
+
application/json:
|
|
2954
|
+
schema:
|
|
2955
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
2956
|
+
"409":
|
|
2957
|
+
description: Email domain already bound to another workspace
|
|
2958
|
+
content:
|
|
2959
|
+
application/json:
|
|
2960
|
+
schema:
|
|
2961
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
2962
|
+
examples:
|
|
2963
|
+
ssoDomainConflict:
|
|
2964
|
+
value:
|
|
2965
|
+
error: Email domain acme.com is already bound to another workspace.
|
|
2966
|
+
code: sso_domain_conflict
|
|
2967
|
+
|
|
2856
2968
|
/workspaces/{workspaceId}/productivity-targets:
|
|
2857
2969
|
get:
|
|
2858
2970
|
tags: [Workspace]
|
|
@@ -17023,6 +17135,57 @@ components:
|
|
|
17023
17135
|
$ref: "#/components/schemas/AiModelPolicyPersonOverrideDto"
|
|
17024
17136
|
maxProperties: 200
|
|
17025
17137
|
|
|
17138
|
+
WorkspaceSsoConfigDto:
|
|
17139
|
+
type: object
|
|
17140
|
+
required: [enabled, ssoProviderId, domains, joinPolicy]
|
|
17141
|
+
properties:
|
|
17142
|
+
enabled:
|
|
17143
|
+
type: boolean
|
|
17144
|
+
description: When true, enterprise SAML SSO is active for the listed domains.
|
|
17145
|
+
ssoProviderId:
|
|
17146
|
+
type: string
|
|
17147
|
+
format: uuid
|
|
17148
|
+
nullable: true
|
|
17149
|
+
description: Supabase Auth SSO provider id from `supabase sso add` / dashboard.
|
|
17150
|
+
domains:
|
|
17151
|
+
type: array
|
|
17152
|
+
items:
|
|
17153
|
+
type: string
|
|
17154
|
+
description: Email domains that route to this IdP (lowercase, no `@`).
|
|
17155
|
+
example: [acme.com]
|
|
17156
|
+
joinPolicy:
|
|
17157
|
+
type: string
|
|
17158
|
+
enum: [invite_only, domain_auto_join]
|
|
17159
|
+
description: >
|
|
17160
|
+
`invite_only` keeps #536 invitation membership. `domain_auto_join` adds a
|
|
17161
|
+
viewer membership on first authenticated workspace list when the email domain matches.
|
|
17162
|
+
idpType:
|
|
17163
|
+
type: string
|
|
17164
|
+
enum: [okta, entra, saml]
|
|
17165
|
+
nullable: true
|
|
17166
|
+
description: Optional label for UI / ops (Okta, Microsoft Entra, or generic SAML).
|
|
17167
|
+
metadataRef:
|
|
17168
|
+
type: string
|
|
17169
|
+
nullable: true
|
|
17170
|
+
maxLength: 256
|
|
17171
|
+
description: Ops-only label or URL reference; never raw SAML metadata XML.
|
|
17172
|
+
|
|
17173
|
+
AuthSsoLookupDto:
|
|
17174
|
+
type: object
|
|
17175
|
+
required: [available, domain]
|
|
17176
|
+
properties:
|
|
17177
|
+
available:
|
|
17178
|
+
type: boolean
|
|
17179
|
+
domain:
|
|
17180
|
+
type: string
|
|
17181
|
+
workspaceSlug:
|
|
17182
|
+
type: string
|
|
17183
|
+
description: Present when available is true.
|
|
17184
|
+
idpType:
|
|
17185
|
+
type: string
|
|
17186
|
+
enum: [okta, entra, saml]
|
|
17187
|
+
nullable: true
|
|
17188
|
+
|
|
17026
17189
|
ProductivityTargetsDto:
|
|
17027
17190
|
type: object
|
|
17028
17191
|
description: >
|
package/package.json
CHANGED
package/src/generated/openapi.ts
CHANGED
|
@@ -922,6 +922,50 @@ export interface paths {
|
|
|
922
922
|
patch?: never;
|
|
923
923
|
trace?: never;
|
|
924
924
|
};
|
|
925
|
+
"/auth/sso-lookup": {
|
|
926
|
+
parameters: {
|
|
927
|
+
query?: never;
|
|
928
|
+
header?: never;
|
|
929
|
+
path?: never;
|
|
930
|
+
cookie?: never;
|
|
931
|
+
};
|
|
932
|
+
/**
|
|
933
|
+
* Look up enterprise SSO availability by email domain
|
|
934
|
+
* @description Unauthenticated. Returns whether a workspace has enabled enterprise SAML SSO for the given email domain. Does not return `ssoProviderId`; the SPA calls `supabase.auth.signInWithSSO({ domain })` after a positive lookup.
|
|
935
|
+
*/
|
|
936
|
+
get: operations["getAuthSsoLookup"];
|
|
937
|
+
put?: never;
|
|
938
|
+
post?: never;
|
|
939
|
+
delete?: never;
|
|
940
|
+
options?: never;
|
|
941
|
+
head?: never;
|
|
942
|
+
patch?: never;
|
|
943
|
+
trace?: never;
|
|
944
|
+
};
|
|
945
|
+
"/workspaces/{workspaceId}/enterprise-sso": {
|
|
946
|
+
parameters: {
|
|
947
|
+
query?: never;
|
|
948
|
+
header?: never;
|
|
949
|
+
path?: never;
|
|
950
|
+
cookie?: never;
|
|
951
|
+
};
|
|
952
|
+
/**
|
|
953
|
+
* Get enterprise SAML SSO configuration
|
|
954
|
+
* @description Returns per-workspace enterprise SSO binding (`ssoProviderId`, domains, join policy). Member-level read. Does not return IdP metadata XML.
|
|
955
|
+
*/
|
|
956
|
+
get: operations["getWorkspaceEnterpriseSso"];
|
|
957
|
+
/**
|
|
958
|
+
* Set enterprise SAML SSO configuration
|
|
959
|
+
* @description Full-replace workspace enterprise SSO config. Bind a Supabase `sso_provider_id` (from `supabase sso add` for Okta or Entra) and one or more email domains. `joinPolicy: domain_auto_join` grants viewer membership on first `GET /me/workspaces` after SSO login when the JWT email domain matches. Requires workspace **admin**. Domains must be unique across enabled workspaces (`409 sso_domain_conflict`).
|
|
960
|
+
*/
|
|
961
|
+
put: operations["putWorkspaceEnterpriseSso"];
|
|
962
|
+
post?: never;
|
|
963
|
+
delete?: never;
|
|
964
|
+
options?: never;
|
|
965
|
+
head?: never;
|
|
966
|
+
patch?: never;
|
|
967
|
+
trace?: never;
|
|
968
|
+
};
|
|
925
969
|
"/workspaces/{workspaceId}/productivity-targets": {
|
|
926
970
|
parameters: {
|
|
927
971
|
query?: never;
|
|
@@ -6602,6 +6646,42 @@ export interface components {
|
|
|
6602
6646
|
[key: string]: components["schemas"]["AiModelPolicyPersonOverrideDto"];
|
|
6603
6647
|
};
|
|
6604
6648
|
};
|
|
6649
|
+
WorkspaceSsoConfigDto: {
|
|
6650
|
+
/** @description When true, enterprise SAML SSO is active for the listed domains. */
|
|
6651
|
+
enabled: boolean;
|
|
6652
|
+
/**
|
|
6653
|
+
* Format: uuid
|
|
6654
|
+
* @description Supabase Auth SSO provider id from `supabase sso add` / dashboard.
|
|
6655
|
+
*/
|
|
6656
|
+
ssoProviderId: string | null;
|
|
6657
|
+
/**
|
|
6658
|
+
* @description Email domains that route to this IdP (lowercase, no `@`).
|
|
6659
|
+
* @example [
|
|
6660
|
+
* "acme.com"
|
|
6661
|
+
* ]
|
|
6662
|
+
*/
|
|
6663
|
+
domains: string[];
|
|
6664
|
+
/**
|
|
6665
|
+
* @description `invite_only` keeps #536 invitation membership. `domain_auto_join` adds a viewer membership on first authenticated workspace list when the email domain matches.
|
|
6666
|
+
* @enum {string}
|
|
6667
|
+
*/
|
|
6668
|
+
joinPolicy: "invite_only" | "domain_auto_join";
|
|
6669
|
+
/**
|
|
6670
|
+
* @description Optional label for UI / ops (Okta, Microsoft Entra, or generic SAML).
|
|
6671
|
+
* @enum {string|null}
|
|
6672
|
+
*/
|
|
6673
|
+
idpType?: "okta" | "entra" | "saml" | null;
|
|
6674
|
+
/** @description Ops-only label or URL reference; never raw SAML metadata XML. */
|
|
6675
|
+
metadataRef?: string | null;
|
|
6676
|
+
};
|
|
6677
|
+
AuthSsoLookupDto: {
|
|
6678
|
+
available: boolean;
|
|
6679
|
+
domain: string;
|
|
6680
|
+
/** @description Present when available is true. */
|
|
6681
|
+
workspaceSlug?: string;
|
|
6682
|
+
/** @enum {string|null} */
|
|
6683
|
+
idpType?: "okta" | "entra" | "saml" | null;
|
|
6684
|
+
};
|
|
6605
6685
|
/** @description Optional weekly per-engineer targets for Productivity Insights. Omitted or null fields mean no target for that metric. Additional properties are rejected. */
|
|
6606
6686
|
ProductivityTargetsDto: {
|
|
6607
6687
|
/** @description Floor — meet or exceed this many merged PRs per engineer per week. */
|
|
@@ -13457,6 +13537,8 @@ export type DeliveryTopologyDto = components['schemas']['DeliveryTopologyDto'];
|
|
|
13457
13537
|
export type AiModelPolicyConfigDto = components['schemas']['AiModelPolicyConfigDto'];
|
|
13458
13538
|
export type AiModelPolicyPersonOverrideDto = components['schemas']['AiModelPolicyPersonOverrideDto'];
|
|
13459
13539
|
export type AiModelPolicyDto = components['schemas']['AiModelPolicyDto'];
|
|
13540
|
+
export type WorkspaceSsoConfigDto = components['schemas']['WorkspaceSsoConfigDto'];
|
|
13541
|
+
export type AuthSsoLookupDto = components['schemas']['AuthSsoLookupDto'];
|
|
13460
13542
|
export type ProductivityTargetsDto = components['schemas']['ProductivityTargetsDto'];
|
|
13461
13543
|
export type DimensionTargetPercentsDto = components['schemas']['DimensionTargetPercentsDto'];
|
|
13462
13544
|
export type DimensionTargetsRepoOverrideDto = components['schemas']['DimensionTargetsRepoOverrideDto'];
|
|
@@ -16931,6 +17013,132 @@ export interface operations {
|
|
|
16931
17013
|
};
|
|
16932
17014
|
};
|
|
16933
17015
|
};
|
|
17016
|
+
getAuthSsoLookup: {
|
|
17017
|
+
parameters: {
|
|
17018
|
+
query: {
|
|
17019
|
+
/** @description Email domain (without `@`) */
|
|
17020
|
+
domain: string;
|
|
17021
|
+
};
|
|
17022
|
+
header?: never;
|
|
17023
|
+
path?: never;
|
|
17024
|
+
cookie?: never;
|
|
17025
|
+
};
|
|
17026
|
+
requestBody?: never;
|
|
17027
|
+
responses: {
|
|
17028
|
+
/** @description Lookup result */
|
|
17029
|
+
200: {
|
|
17030
|
+
headers: {
|
|
17031
|
+
[name: string]: unknown;
|
|
17032
|
+
};
|
|
17033
|
+
content: {
|
|
17034
|
+
"application/json": components["schemas"]["AuthSsoLookupDto"];
|
|
17035
|
+
};
|
|
17036
|
+
};
|
|
17037
|
+
/** @description Invalid domain */
|
|
17038
|
+
400: {
|
|
17039
|
+
headers: {
|
|
17040
|
+
[name: string]: unknown;
|
|
17041
|
+
};
|
|
17042
|
+
content: {
|
|
17043
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
17044
|
+
};
|
|
17045
|
+
};
|
|
17046
|
+
};
|
|
17047
|
+
};
|
|
17048
|
+
getWorkspaceEnterpriseSso: {
|
|
17049
|
+
parameters: {
|
|
17050
|
+
query?: never;
|
|
17051
|
+
header?: never;
|
|
17052
|
+
path: {
|
|
17053
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
17054
|
+
};
|
|
17055
|
+
cookie?: never;
|
|
17056
|
+
};
|
|
17057
|
+
requestBody?: never;
|
|
17058
|
+
responses: {
|
|
17059
|
+
/** @description Current SSO config (defaults when unset) */
|
|
17060
|
+
200: {
|
|
17061
|
+
headers: {
|
|
17062
|
+
[name: string]: unknown;
|
|
17063
|
+
};
|
|
17064
|
+
content: {
|
|
17065
|
+
"application/json": components["schemas"]["WorkspaceSsoConfigDto"];
|
|
17066
|
+
};
|
|
17067
|
+
};
|
|
17068
|
+
401: components["responses"]["Unauthorized"];
|
|
17069
|
+
403: components["responses"]["Forbidden"];
|
|
17070
|
+
/** @description Workspace does not exist or malformed workspaceId */
|
|
17071
|
+
404: {
|
|
17072
|
+
headers: {
|
|
17073
|
+
[name: string]: unknown;
|
|
17074
|
+
};
|
|
17075
|
+
content: {
|
|
17076
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
17077
|
+
};
|
|
17078
|
+
};
|
|
17079
|
+
};
|
|
17080
|
+
};
|
|
17081
|
+
putWorkspaceEnterpriseSso: {
|
|
17082
|
+
parameters: {
|
|
17083
|
+
query?: never;
|
|
17084
|
+
header?: never;
|
|
17085
|
+
path: {
|
|
17086
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
17087
|
+
};
|
|
17088
|
+
cookie?: never;
|
|
17089
|
+
};
|
|
17090
|
+
requestBody: {
|
|
17091
|
+
content: {
|
|
17092
|
+
"application/json": components["schemas"]["WorkspaceSsoConfigDto"];
|
|
17093
|
+
};
|
|
17094
|
+
};
|
|
17095
|
+
responses: {
|
|
17096
|
+
/** @description Config persisted */
|
|
17097
|
+
204: {
|
|
17098
|
+
headers: {
|
|
17099
|
+
[name: string]: unknown;
|
|
17100
|
+
};
|
|
17101
|
+
content?: never;
|
|
17102
|
+
};
|
|
17103
|
+
/** @description Invalid payload */
|
|
17104
|
+
400: {
|
|
17105
|
+
headers: {
|
|
17106
|
+
[name: string]: unknown;
|
|
17107
|
+
};
|
|
17108
|
+
content: {
|
|
17109
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
17110
|
+
};
|
|
17111
|
+
};
|
|
17112
|
+
401: components["responses"]["Unauthorized"];
|
|
17113
|
+
/** @description Forbidden — workspace admin required */
|
|
17114
|
+
403: {
|
|
17115
|
+
headers: {
|
|
17116
|
+
[name: string]: unknown;
|
|
17117
|
+
};
|
|
17118
|
+
content: {
|
|
17119
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
17120
|
+
};
|
|
17121
|
+
};
|
|
17122
|
+
/** @description Workspace does not exist or malformed workspaceId */
|
|
17123
|
+
404: {
|
|
17124
|
+
headers: {
|
|
17125
|
+
[name: string]: unknown;
|
|
17126
|
+
};
|
|
17127
|
+
content: {
|
|
17128
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
17129
|
+
};
|
|
17130
|
+
};
|
|
17131
|
+
/** @description Email domain already bound to another workspace */
|
|
17132
|
+
409: {
|
|
17133
|
+
headers: {
|
|
17134
|
+
[name: string]: unknown;
|
|
17135
|
+
};
|
|
17136
|
+
content: {
|
|
17137
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
17138
|
+
};
|
|
17139
|
+
};
|
|
17140
|
+
};
|
|
17141
|
+
};
|
|
16934
17142
|
getWorkspaceProductivityTargets: {
|
|
16935
17143
|
parameters: {
|
|
16936
17144
|
query?: never;
|