1 | import type { DefaultElements, ISO8601Timestamp, Link, MakeRequest } from '../common-types';
|
2 | import type { AsyncActionProcessingOptions } from '../methods/action';
|
3 | type ReleaseActionStatuses = 'created' | 'inProgress' | 'failed' | 'succeeded';
|
4 | export type ReleaseActionTypes = 'publish' | 'unpublish' | 'validate';
|
5 | export type ReleaseActionSysProps = {
|
6 | id: string;
|
7 | type: 'ReleaseAction';
|
8 | space: Link<'Space'>;
|
9 | environment: Link<'Environment'>;
|
10 | release: Link<'Release'>;
|
11 | status: ReleaseActionStatuses;
|
12 | createdBy: Link<'User'>;
|
13 | createdAt: ISO8601Timestamp;
|
14 | updatedAt: ISO8601Timestamp;
|
15 | };
|
16 |
|
17 | export interface ReleaseActionProps<T extends ReleaseActionTypes = any> {
|
18 | action: T;
|
19 | sys: ReleaseActionSysProps;
|
20 | }
|
21 | export interface ReleaseActionQueryOptions {
|
22 |
|
23 | 'sys.id[in]'?: string;
|
24 | 'sys.release.sys.id[in]'?: string;
|
25 | 'sys.status[in]'?: string;
|
26 | 'sys.status[nin]'?: string;
|
27 | action?: ReleaseActionTypes;
|
28 |
|
29 | uniqueBy?: string;
|
30 |
|
31 | order?: string;
|
32 | |
33 |
|
34 |
|
35 |
|
36 | limit?: number;
|
37 | }
|
38 | export interface ReleaseActionApiMethods {
|
39 |
|
40 | get(): ReleaseAction;
|
41 |
|
42 | waitProcessing(options?: AsyncActionProcessingOptions): ReleaseAction;
|
43 | }
|
44 | export interface ReleaseAction<T extends ReleaseActionTypes = any> extends ReleaseActionProps<T>, ReleaseActionApiMethods, DefaultElements<ReleaseActionProps<T>> {
|
45 | }
|
46 |
|
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 | export declare function wrapReleaseAction(makeRequest: MakeRequest, data: ReleaseActionProps): ReleaseAction;
|
53 |
|
54 |
|
55 |
|
56 | export declare const wrapReleaseActionCollection: (makeRequest: MakeRequest, data: import("../common-types").CollectionProp<ReleaseActionProps<any>>) => import("../common-types").Collection<ReleaseAction<any>, ReleaseActionProps<any>>;
|
57 | export {};
|