-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add inline docs for the plain client App Installation interface…
… [EXT-4729] (#1978) * docs: add inline docs for the plain client App Installation interface [EXT-4729] * refactor: clean up verbiage in other plain client docs
- Loading branch information
Showing
6 changed files
with
114 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
import { RawAxiosRequestHeaders } from 'axios' | ||
import { | ||
CollectionProp, | ||
GetAppDefinitionParams, | ||
GetAppInstallationParams, | ||
GetSpaceEnvironmentParams, | ||
PaginationQueryParams, | ||
} from '../../common-types' | ||
import { AppInstallationsForOrganizationProps } from '../../entities/app-definition' | ||
import { AppInstallationProps, CreateAppInstallationProps } from '../../entities/app-installation' | ||
import { OptionalDefaults } from '../wrappers/wrap' | ||
|
||
export type AppInstallationPlainClientAPI = { | ||
/** | ||
* Fetches the App Installation | ||
* @param params entity IDs to identify the App Installation | ||
* @returns the App Installation | ||
* @throws if the request fails, or the App Installation is not found | ||
* @example | ||
* ```javascript | ||
* const appInstallation = await client.appInstallation.get({ | ||
* spaceId: '<space_id>', | ||
* environmentId: '<environment_id>', | ||
* appDefinitionId: '<app_definition_id>' | ||
* }); | ||
* ``` | ||
*/ | ||
get(params: OptionalDefaults<GetAppInstallationParams>): Promise<AppInstallationProps> | ||
/** | ||
* Fetches all App Installations for the given App | ||
* @param params entity IDs to identify the App | ||
* @returns an object containing an array of App Installations | ||
* @throws if the request fails, or the App is not found | ||
* @example | ||
* ```javascript | ||
* const results = await client.appInstallation.getMany({ | ||
* organizationId: "<org_id>", | ||
* appDefinitionId: "<app_definition_id>", | ||
* }); | ||
* ``` | ||
*/ | ||
getMany( | ||
params: OptionalDefaults<GetSpaceEnvironmentParams & PaginationQueryParams> | ||
): Promise<CollectionProp<AppInstallationProps>> | ||
/** | ||
* Fetches all App Installations for the given Organization | ||
* @param params entity IDs to identify the Organization | ||
* @returns an object containing an array of App Installations | ||
* @throws if the request fails, or the Organization is not found | ||
* @example | ||
* ```javascript | ||
* const results = await client.appInstallation.getForOrganization({ | ||
* organizationId: '<organization_id>', | ||
* appDefinitionId: '<app_definition_id>', | ||
* }); | ||
* ``` | ||
*/ | ||
getForOrganization( | ||
params: OptionalDefaults<GetAppDefinitionParams> | ||
): Promise<AppInstallationsForOrganizationProps> | ||
/** | ||
* Creates or updates an App Installation | ||
* @param params entity IDs to identify the App Installation to update, or the App to install | ||
* @param rawData the App Installation | ||
* @returns the created or updated App Installation and its metadata | ||
* @throws if the request fails, the App or App Installation is not found, or the payload is malformed | ||
* @example | ||
* ```javascript | ||
* const appInstallation = await client.appInstallation.upsert( | ||
* { | ||
* spaceId: '<space_id>', | ||
* environmentId: '<environment_id>', | ||
* appDefinitionId: '<app_definition_id>', | ||
* }, | ||
* { | ||
* parameters: { | ||
* // freeform parameters | ||
* }, | ||
* } | ||
* ); | ||
* ``` | ||
*/ | ||
upsert( | ||
params: OptionalDefaults<GetAppInstallationParams>, | ||
rawData: CreateAppInstallationProps, | ||
headers?: RawAxiosRequestHeaders | ||
): Promise<AppInstallationProps> | ||
/** | ||
* Uninstalls the App | ||
* @param params entity IDs to identify the App to uninstall | ||
* @throws if the request fails, or the App Installation is not found | ||
* @example | ||
* ```javascript | ||
* await client.appInstallation.delete({ | ||
* spaceId: '<space_id>', | ||
* environmentId: '<environment_id>', | ||
* appDefinitionId: '<app_definition_id>', | ||
* }); | ||
* ``` | ||
*/ | ||
delete(params: OptionalDefaults<GetAppInstallationParams>): Promise<any> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters