Skip to content

Commit c2a3071

Browse files
committed
chore: regenerate the API schema for the app layer
1 parent b6e5a66 commit c2a3071

2 files changed

Lines changed: 84 additions & 8 deletions

File tree

webapp/src/service/apiSchema.generated.ts

Lines changed: 83 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export interface paths {
4949
"/v2/administration/apps": {
5050
/** Returns the apps registered at server level — those belonging to no organization. The client secret is never disclosed here. */
5151
get: operations["list_6"];
52-
/** Fetches the manifest at the given URL and registers the app at server level, belonging to no organization. The response is the only place the client secret is ever disclosed. */
52+
/** Fetches the manifest at the given URL and registers the app at server level, belonging to no organization. The response is the only place the client secret is ever disclosed. When an organization has already registered the same app, the native install is bound to that app and no app-level credentials are returned. */
5353
post: operations["register_1"];
5454
};
5555
"/v2/administration/apps/preview": {
@@ -265,13 +265,17 @@ export interface paths {
265265
"/v2/organizations/{organizationId}/apps": {
266266
/** Returns all apps registered for the organization. */
267267
get: operations["list_4"];
268-
/** Fetches the manifest at the given URL and registers the app for the organization. */
269-
post: operations["register"];
268+
/** Fetches the manifest at the given URL and installs the app it describes for the organization. The app must already be registered on this server: when it is not, the call fails with the `app_not_registered` code, and the caller may register it — becoming its owner — through `POST /register`. The response is the only place the install's client secret is ever disclosed; app-level credentials are not disclosed here. */
269+
post: operations["install"];
270270
};
271271
"/v2/organizations/{organizationId}/apps/preview": {
272272
/** Fetches the manifest at the given URL and returns its parsed contents (including the requested scopes) without persisting anything. Used by the registration UI to show a consent prompt before installing. */
273273
post: operations["preview"];
274274
};
275+
"/v2/organizations/{organizationId}/apps/register": {
276+
/** Registers the app described by the manifest and installs it for the organization, in one operation. The organization becomes the app's owner, and the response is the only place the app-level credentials are ever disclosed. When the app is already registered — by another organization or by this one — it is only installed, and no app-level credentials are returned. */
277+
post: operations["register"];
278+
};
275279
"/v2/organizations/{organizationId}/apps/{installId}": {
276280
/** Removes the registered app from the organization. */
277281
delete: operations["remove"];
@@ -1653,6 +1657,7 @@ export interface components {
16531657
grant_type: string;
16541658
};
16551659
AppInstallModel: {
1660+
app?: components["schemas"]["AppModel"];
16561661
appId: string;
16571662
availableToAllOrganizations: boolean;
16581663
baseUrl: string;
@@ -1697,6 +1702,19 @@ export interface components {
16971702
requestedScopes: string[];
16981703
version: string;
16991704
};
1705+
AppModel: {
1706+
/** @description The `id` declared in the app's manifest, unique across the server */
1707+
appId: string;
1708+
/** @description App-level OAuth client id. Present only in the response to registering the app — an organization that merely installed it never sees it. */
1709+
clientId?: string;
1710+
/** @description App-level OAuth client secret in plaintext. Administers the app across every organization that installed it and grants access to no data. Present only in the response to registering the app; Tolgee stores only a hash and cannot show it again. */
1711+
clientSecret?: string;
1712+
/** Format: int64 */
1713+
id: number;
1714+
name: string;
1715+
/** @description The secret Tolgee signs this app's lifecycle deliveries with. Present only in the response to registering the app. */
1716+
webhookSecret?: string;
1717+
};
17001718
AppSelfEnabledProjectModel: {
17011719
/** Format: int64 */
17021720
id: number;
@@ -3464,7 +3482,9 @@ export interface components {
34643482
| "app_manifest_same_origin_as_tolgee"
34653483
| "app_install_secret_not_found"
34663484
| "app_too_many_live_secrets"
3467-
| "app_cannot_revoke_last_secret";
3485+
| "app_cannot_revoke_last_secret"
3486+
| "app_not_registered"
3487+
| "app_already_registered";
34683488
params?: { [key: string]: unknown }[];
34693489
};
34703490
ExistenceEntityDescription: {
@@ -7401,7 +7421,9 @@ export interface components {
74017421
| "app_manifest_same_origin_as_tolgee"
74027422
| "app_install_secret_not_found"
74037423
| "app_too_many_live_secrets"
7404-
| "app_cannot_revoke_last_secret";
7424+
| "app_cannot_revoke_last_secret"
7425+
| "app_not_registered"
7426+
| "app_already_registered";
74057427
params?: { [key: string]: unknown }[];
74067428
success: boolean;
74077429
};
@@ -8870,7 +8892,7 @@ export interface operations {
88708892
};
88718893
};
88728894
};
8873-
/** Fetches the manifest at the given URL and registers the app at server level, belonging to no organization. The response is the only place the client secret is ever disclosed. */
8895+
/** Fetches the manifest at the given URL and registers the app at server level, belonging to no organization. The response is the only place the client secret is ever disclosed. When an organization has already registered the same app, the native install is bound to that app and no app-level credentials are returned. */
88748896
register_1: {
88758897
responses: {
88768898
/** OK */
@@ -12081,8 +12103,8 @@ export interface operations {
1208112103
};
1208212104
};
1208312105
};
12084-
/** Fetches the manifest at the given URL and registers the app for the organization. */
12085-
register: {
12106+
/** Fetches the manifest at the given URL and installs the app it describes for the organization. The app must already be registered on this server: when it is not, the call fails with the `app_not_registered` code, and the caller may register it — becoming its owner — through `POST /register`. The response is the only place the install's client secret is ever disclosed; app-level credentials are not disclosed here. */
12107+
install: {
1208612108
parameters: {
1208712109
path: {
1208812110
organizationId: number;
@@ -12187,6 +12209,59 @@ export interface operations {
1218712209
};
1218812210
};
1218912211
};
12212+
/** Registers the app described by the manifest and installs it for the organization, in one operation. The organization becomes the app's owner, and the response is the only place the app-level credentials are ever disclosed. When the app is already registered — by another organization or by this one — it is only installed, and no app-level credentials are returned. */
12213+
register: {
12214+
parameters: {
12215+
path: {
12216+
organizationId: number;
12217+
};
12218+
};
12219+
responses: {
12220+
/** OK */
12221+
200: {
12222+
content: {
12223+
"application/json": components["schemas"]["AppInstallModel"];
12224+
};
12225+
};
12226+
/** Bad Request */
12227+
400: {
12228+
content: {
12229+
"application/json":
12230+
| components["schemas"]["ErrorResponseTyped"]
12231+
| components["schemas"]["ErrorResponseBody"];
12232+
};
12233+
};
12234+
/** Unauthorized */
12235+
401: {
12236+
content: {
12237+
"application/json":
12238+
| components["schemas"]["ErrorResponseTyped"]
12239+
| components["schemas"]["ErrorResponseBody"];
12240+
};
12241+
};
12242+
/** Forbidden */
12243+
403: {
12244+
content: {
12245+
"application/json":
12246+
| components["schemas"]["ErrorResponseTyped"]
12247+
| components["schemas"]["ErrorResponseBody"];
12248+
};
12249+
};
12250+
/** Not Found */
12251+
404: {
12252+
content: {
12253+
"application/json":
12254+
| components["schemas"]["ErrorResponseTyped"]
12255+
| components["schemas"]["ErrorResponseBody"];
12256+
};
12257+
};
12258+
};
12259+
requestBody: {
12260+
content: {
12261+
"application/json": components["schemas"]["RegisterAppRequest"];
12262+
};
12263+
};
12264+
};
1219012265
/** Removes the registered app from the organization. */
1219112266
remove: {
1219212267
parameters: {

webapp/src/service/apiSchemaTypes.generated.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export type AppInstallModel = components['schemas']['AppInstallModel'];
1818
export type AppInstallSecretModel = components['schemas']['AppInstallSecretModel'];
1919
export type AppManifestModules = components['schemas']['AppManifestModules'];
2020
export type AppManifestPreviewModel = components['schemas']['AppManifestPreviewModel'];
21+
export type AppModel = components['schemas']['AppModel'];
2122
export type AppSelfEnabledProjectModel = components['schemas']['AppSelfEnabledProjectModel'];
2223
export type AppSelfInstallationModel = components['schemas']['AppSelfInstallationModel'];
2324
export type AppSelfProjectOrganizationModel = components['schemas']['AppSelfProjectOrganizationModel'];

0 commit comments

Comments
 (0)