1 | import type { GetAppInstallationParams } from '../../common-types';
|
2 | import type { AppSignedRequestProps, CreateAppSignedRequestProps } from '../../entities/app-signed-request';
|
3 | import type { OptionalDefaults } from '../wrappers/wrap';
|
4 | export type AppSignedRequestPlainClientAPI = {
|
5 | /**
|
6 | * Creates a Signed Request for an App
|
7 | * @param params entity IDs to identify the App to make a signed request to
|
8 | * @param payload the Signed Request payload
|
9 | * @returns metadata about the Signed Request
|
10 | * @throws if the request fails, the App is not found, or the payload is malformed
|
11 | * @example
|
12 | * ```javascript
|
13 | * const signedRequest = await client.appSignedRequest.create(
|
14 | * {
|
15 | * spaceId: '<space_id>',
|
16 | * organizationId: '<organization_id>',
|
17 | * appDefinitionId: '<app_definition_id>',
|
18 | * },
|
19 | * {
|
20 | * method: 'POST',
|
21 | * path: 'https://your-app-backend.com/event-handler',
|
22 | * headers: {
|
23 | * 'Content-Type': 'application/json',
|
24 | * 'X-some-header': 'some-value',
|
25 | * },
|
26 | * body: JSON.stringify({
|
27 | * // ...
|
28 | * }),
|
29 | * }
|
30 | * );
|
31 | * ```
|
32 | */
|
33 | create(params: OptionalDefaults<GetAppInstallationParams>, payload: CreateAppSignedRequestProps): Promise<AppSignedRequestProps>;
|
34 | };
|