@thinkai/tai-api-contract 2.34.0 → 2.35.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 +96 -9
- package/dist/generated/openapi.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/journeySteps.d.ts +29 -0
- package/dist/journeySteps.d.ts.map +1 -0
- package/dist/journeySteps.js +171 -0
- package/dist/journeySteps.js.map +1 -0
- package/dist/journeySteps.test.d.ts +2 -0
- package/dist/journeySteps.test.d.ts.map +1 -0
- package/dist/journeySteps.test.js +47 -0
- package/dist/journeySteps.test.js.map +1 -0
- package/openapi/openapi.yaml +103 -13
- package/package.json +2 -1
- package/src/generated/openapi.ts +96 -9
- package/src/index.ts +10 -0
- package/src/journeySteps.test.ts +60 -0
- package/src/journeySteps.ts +190 -0
|
@@ -394,7 +394,7 @@ export interface paths {
|
|
|
394
394
|
};
|
|
395
395
|
/**
|
|
396
396
|
* Productivity insights — contributor drilldown
|
|
397
|
-
* @description Weekly and daily activity rollups for a single contributor on `/
|
|
397
|
+
* @description Weekly and daily activity rollups for a single contributor on `/insights/productivity/contributors/:loginOrId`. Accepts GitHub login slugs (preferred public URL), org-chart person ids (typically email), and synthetic GitHub scopes (`__github:{login}`) for contributors not in the org chart.
|
|
398
398
|
*/
|
|
399
399
|
get: operations["getProductivityInsightsContributor"];
|
|
400
400
|
put?: never;
|
|
@@ -641,7 +641,7 @@ export interface paths {
|
|
|
641
641
|
put?: never;
|
|
642
642
|
/**
|
|
643
643
|
* Create GitHub App installation URL
|
|
644
|
-
* @description Creates a GitHub App installation URL scoped to the workspace and caller. Body is optional; when omitted, defaults to `/
|
|
644
|
+
* @description Creates a GitHub App installation URL scoped to the workspace and caller. Body is optional; when omitted, defaults to `/onboarding/integrations` return path. Optional `pickerSession` (from user OAuth org picker) recovers `returnPath` from the server-side picker snapshot when the multi-hop authorize→install flow should return to the page where OAuth started.
|
|
645
645
|
*/
|
|
646
646
|
post: operations["postGithubInstallUrl"];
|
|
647
647
|
delete?: never;
|
|
@@ -1120,6 +1120,26 @@ export interface paths {
|
|
|
1120
1120
|
patch?: never;
|
|
1121
1121
|
trace?: never;
|
|
1122
1122
|
};
|
|
1123
|
+
"/workspaces/{workspaceId}/readiness/repos/by-slug/{providerSlug}": {
|
|
1124
|
+
parameters: {
|
|
1125
|
+
query?: never;
|
|
1126
|
+
header?: never;
|
|
1127
|
+
path?: never;
|
|
1128
|
+
cookie?: never;
|
|
1129
|
+
};
|
|
1130
|
+
/**
|
|
1131
|
+
* Single repo readiness by provider slug
|
|
1132
|
+
* @description Returns one stored repository scorecard keyed by `providerSlug` (`owner/repo`). Same response as `GET .../readiness/repos/{repoId}`. Unknown slug returns `404`.
|
|
1133
|
+
*/
|
|
1134
|
+
get: operations["getReadinessRepoBySlug"];
|
|
1135
|
+
put?: never;
|
|
1136
|
+
post?: never;
|
|
1137
|
+
delete?: never;
|
|
1138
|
+
options?: never;
|
|
1139
|
+
head?: never;
|
|
1140
|
+
patch?: never;
|
|
1141
|
+
trace?: never;
|
|
1142
|
+
};
|
|
1123
1143
|
"/workspaces/{workspaceId}/readiness/repos/{repoId}": {
|
|
1124
1144
|
parameters: {
|
|
1125
1145
|
query?: never;
|
|
@@ -1900,7 +1920,7 @@ export interface paths {
|
|
|
1900
1920
|
};
|
|
1901
1921
|
/**
|
|
1902
1922
|
* Workspace journey step completion
|
|
1903
|
-
* @description Returns the workspace-scoped journey progress state. Returns an empty `
|
|
1923
|
+
* @description Returns the workspace-scoped journey progress state. Returns an empty `completedStepIds` array when no row exists yet (updatedAt is synthetic in that case). Values are canonical step IDs (see `JourneyStepId`); legacy route strings are accepted on PUT and normalized. Covers issue #271.
|
|
1904
1924
|
*/
|
|
1905
1925
|
get: operations["getYourAiJourneyProgress"];
|
|
1906
1926
|
/**
|
|
@@ -3762,14 +3782,31 @@ export interface components {
|
|
|
3762
3782
|
AiStrategyPlanDto: {
|
|
3763
3783
|
phases: components["schemas"]["AiStrategyPhaseBlockDto"][];
|
|
3764
3784
|
};
|
|
3785
|
+
/**
|
|
3786
|
+
* @description Canonical journey step identifier (stable across URL reshuffles).
|
|
3787
|
+
* @enum {string}
|
|
3788
|
+
*/
|
|
3789
|
+
JourneyStepId: "onboarding.workspace" | "onboarding.ai_readiness" | "onboarding.integrations" | "readiness.dashboard" | "readiness.fix_queue" | "readiness.activity" | "insights.productivity" | "insights.productivity.by_user" | "insights.productivity.by_team" | "insights.ai_usage" | "insights.ai_usage.by_user" | "insights.ai_usage.by_team" | "insights.ai_usage.by_model";
|
|
3765
3790
|
JourneyProgressDto: {
|
|
3766
|
-
|
|
3791
|
+
/** @description Canonical completed journey step IDs. */
|
|
3792
|
+
completedStepIds: components["schemas"]["JourneyStepId"][];
|
|
3793
|
+
/**
|
|
3794
|
+
* @deprecated
|
|
3795
|
+
* @description Deprecated alias of completedStepIds (legacy clients). Omitted on new responses when empty.
|
|
3796
|
+
*/
|
|
3797
|
+
completedSteps?: string[];
|
|
3767
3798
|
/** Format: date-time */
|
|
3768
3799
|
updatedAt: string;
|
|
3769
3800
|
};
|
|
3770
3801
|
JourneyProgressUpdateDto: {
|
|
3771
|
-
|
|
3772
|
-
|
|
3802
|
+
/** @description Idempotent replace-all of completed step IDs. */
|
|
3803
|
+
completedStepIds?: components["schemas"]["JourneyStepId"][];
|
|
3804
|
+
/**
|
|
3805
|
+
* @deprecated
|
|
3806
|
+
* @description Deprecated input alias — route strings and legacy `/phase-*` paths are normalized to step IDs.
|
|
3807
|
+
*/
|
|
3808
|
+
completedSteps?: string[];
|
|
3809
|
+
} | unknown | unknown;
|
|
3773
3810
|
/** @enum {string} */
|
|
3774
3811
|
ThemePreference: "light" | "dark" | "system";
|
|
3775
3812
|
NotificationPreferencesDto: {
|
|
@@ -3891,7 +3928,9 @@ export interface components {
|
|
|
3891
3928
|
/** Format: date-time */
|
|
3892
3929
|
windowEnd: string;
|
|
3893
3930
|
journey: {
|
|
3894
|
-
|
|
3931
|
+
completedStepIds: components["schemas"]["JourneyStepId"][];
|
|
3932
|
+
/** @deprecated */
|
|
3933
|
+
completedSteps?: string[];
|
|
3895
3934
|
/** Format: date-time */
|
|
3896
3935
|
updatedAt: string | null;
|
|
3897
3936
|
};
|
|
@@ -4214,6 +4253,8 @@ export interface components {
|
|
|
4214
4253
|
parameters: {
|
|
4215
4254
|
WorkspaceId: string;
|
|
4216
4255
|
RepoId: string;
|
|
4256
|
+
/** @description Provider repository slug in `owner/repo` form (GitHub). Used for shareable public URLs; resolves to the same row as `repoId` UUID internally. */
|
|
4257
|
+
ProviderSlug: string;
|
|
4217
4258
|
ProjectId: string;
|
|
4218
4259
|
NotificationId: string;
|
|
4219
4260
|
/** @description Workspace member user id (`tai_users.id`). */
|
|
@@ -4423,6 +4464,7 @@ export type AiStrategyRecommendBodyDto = components['schemas']['AiStrategyRecomm
|
|
|
4423
4464
|
export type AiStrategyTaskRecommendationDto = components['schemas']['AiStrategyTaskRecommendationDto'];
|
|
4424
4465
|
export type AiStrategyPhaseBlockDto = components['schemas']['AiStrategyPhaseBlockDto'];
|
|
4425
4466
|
export type AiStrategyPlanDto = components['schemas']['AiStrategyPlanDto'];
|
|
4467
|
+
export type JourneyStepId = components['schemas']['JourneyStepId'];
|
|
4426
4468
|
export type JourneyProgressDto = components['schemas']['JourneyProgressDto'];
|
|
4427
4469
|
export type JourneyProgressUpdateDto = components['schemas']['JourneyProgressUpdateDto'];
|
|
4428
4470
|
export type ThemePreference = components['schemas']['ThemePreference'];
|
|
@@ -4460,6 +4502,7 @@ export type ResponseUnauthorized = components['responses']['Unauthorized'];
|
|
|
4460
4502
|
export type ResponseForbidden = components['responses']['Forbidden'];
|
|
4461
4503
|
export type ParameterWorkspaceId = components['parameters']['WorkspaceId'];
|
|
4462
4504
|
export type ParameterRepoId = components['parameters']['RepoId'];
|
|
4505
|
+
export type ParameterProviderSlug = components['parameters']['ProviderSlug'];
|
|
4463
4506
|
export type ParameterProjectId = components['parameters']['ProjectId'];
|
|
4464
4507
|
export type ParameterNotificationId = components['parameters']['NotificationId'];
|
|
4465
4508
|
export type ParameterWorkspaceMemberId = components['parameters']['WorkspaceMemberId'];
|
|
@@ -5509,7 +5552,7 @@ export interface operations {
|
|
|
5509
5552
|
header?: never;
|
|
5510
5553
|
path: {
|
|
5511
5554
|
workspaceId: components["parameters"]["WorkspaceId"];
|
|
5512
|
-
/** @description
|
|
5555
|
+
/** @description GitHub login slug, org-chart person id, or synthetic `__github:{login}` scope id. */
|
|
5513
5556
|
contributorId: string;
|
|
5514
5557
|
};
|
|
5515
5558
|
cookie?: never;
|
|
@@ -7318,6 +7361,50 @@ export interface operations {
|
|
|
7318
7361
|
};
|
|
7319
7362
|
};
|
|
7320
7363
|
};
|
|
7364
|
+
getReadinessRepoBySlug: {
|
|
7365
|
+
parameters: {
|
|
7366
|
+
query?: never;
|
|
7367
|
+
header?: never;
|
|
7368
|
+
path: {
|
|
7369
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
7370
|
+
/** @description Provider repository slug in `owner/repo` form (GitHub). Used for shareable public URLs; resolves to the same row as `repoId` UUID internally. */
|
|
7371
|
+
providerSlug: components["parameters"]["ProviderSlug"];
|
|
7372
|
+
};
|
|
7373
|
+
cookie?: never;
|
|
7374
|
+
};
|
|
7375
|
+
requestBody?: never;
|
|
7376
|
+
responses: {
|
|
7377
|
+
/** @description Repo score */
|
|
7378
|
+
200: {
|
|
7379
|
+
headers: {
|
|
7380
|
+
[name: string]: unknown;
|
|
7381
|
+
};
|
|
7382
|
+
content: {
|
|
7383
|
+
"application/json": components["schemas"]["RepoReadinessScoreDetailDto"];
|
|
7384
|
+
};
|
|
7385
|
+
};
|
|
7386
|
+
/** @description Malformed providerSlug */
|
|
7387
|
+
400: {
|
|
7388
|
+
headers: {
|
|
7389
|
+
[name: string]: unknown;
|
|
7390
|
+
};
|
|
7391
|
+
content: {
|
|
7392
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
7393
|
+
};
|
|
7394
|
+
};
|
|
7395
|
+
401: components["responses"]["Unauthorized"];
|
|
7396
|
+
403: components["responses"]["Forbidden"];
|
|
7397
|
+
/** @description Workspace or repository not found */
|
|
7398
|
+
404: {
|
|
7399
|
+
headers: {
|
|
7400
|
+
[name: string]: unknown;
|
|
7401
|
+
};
|
|
7402
|
+
content: {
|
|
7403
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
7404
|
+
};
|
|
7405
|
+
};
|
|
7406
|
+
};
|
|
7407
|
+
};
|
|
7321
7408
|
getReadinessRepo: {
|
|
7322
7409
|
parameters: {
|
|
7323
7410
|
query?: never;
|
|
@@ -8908,7 +8995,7 @@ export interface operations {
|
|
|
8908
8995
|
};
|
|
8909
8996
|
requestBody?: never;
|
|
8910
8997
|
responses: {
|
|
8911
|
-
/** @description Progress (empty
|
|
8998
|
+
/** @description Progress (empty completedStepIds when no row exists yet; updatedAt is synthetic in that case) */
|
|
8912
8999
|
200: {
|
|
8913
9000
|
headers: {
|
|
8914
9001
|
[name: string]: unknown;
|