1 | import type { Except } from 'type-fest';
|
2 | import type { BasicMetaSysProps, CreateWithResponseParams, DefaultElements, MakeRequest, SysLink } from '../common-types';
|
3 | import type { WebhookCallDetailsProps } from './webhook';
|
4 | type AppActionCallSys = Except<BasicMetaSysProps, 'version'> & {
|
5 | appDefinition: SysLink;
|
6 | space: SysLink;
|
7 | environment: SysLink;
|
8 | action: SysLink;
|
9 | };
|
10 | type RetryOptions = Pick<CreateWithResponseParams, 'retries' | 'retryInterval'>;
|
11 | export type AppActionCallProps = {
|
12 | |
13 |
|
14 |
|
15 | sys: AppActionCallSys;
|
16 | };
|
17 | export type CreateAppActionCallProps = {
|
18 |
|
19 | parameters: {
|
20 | [key: string]: any;
|
21 | };
|
22 | };
|
23 | type AppActionCallApi = {
|
24 | createWithResponse(): Promise<AppActionCallResponse>;
|
25 | getCallDetails(): Promise<AppActionCallResponse>;
|
26 | };
|
27 | export type AppActionCallResponse = WebhookCallDetailsProps;
|
28 | export interface AppActionCallResponseData extends AppActionCallResponse, DefaultElements<AppActionCallResponse>, AppActionCallApi {
|
29 | }
|
30 | export interface AppActionCall extends AppActionCallProps, DefaultElements<AppActionCallProps> {
|
31 | }
|
32 |
|
33 |
|
34 |
|
35 | export default function createAppActionCallApi(makeRequest: MakeRequest, retryOptions?: RetryOptions): AppActionCallApi;
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 | export declare function wrapAppActionCall(makeRequest: MakeRequest, data: AppActionCallProps): AppActionCall;
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 | export declare function wrapAppActionCallResponse(makeRequest: MakeRequest, data: AppActionCallResponse, retryOptions?: RetryOptions): AppActionCallResponseData;
|
50 | export {};
|