1 | import type { BasicMetaSysProps, CursorPaginatedCollectionProp, DefaultElements, MakeRequest, SysLink } from '../common-types';
|
2 | export type ResourceTypeProps = {
|
3 | |
4 |
|
5 |
|
6 | sys: Omit<BasicMetaSysProps, 'version'> & {
|
7 | appDefinition: SysLink;
|
8 | resourceProvider: SysLink;
|
9 | organization: SysLink;
|
10 | };
|
11 | |
12 |
|
13 |
|
14 | name: string;
|
15 | |
16 |
|
17 |
|
18 | defaultFieldMapping: {
|
19 | title: string;
|
20 | subtitle?: string;
|
21 | description?: string;
|
22 | externalUrl?: string;
|
23 | image?: {
|
24 | url: string;
|
25 | altText?: string;
|
26 | };
|
27 | badge?: {
|
28 | label: string;
|
29 | variant: string;
|
30 | };
|
31 | };
|
32 | };
|
33 | declare const publicResourceTypeFields: readonly ["name"];
|
34 | type OptionalSysFields = 'createdAt' | 'createdBy' | 'updatedAt' | 'updatedBy' | 'appDefinition' | 'organization';
|
35 | export type SpaceEnvResourceTypeProps = Pick<ResourceTypeProps, (typeof publicResourceTypeFields)[number]> & {
|
36 | sys: Partial<Pick<ResourceTypeProps['sys'], OptionalSysFields>> & Omit<ResourceTypeProps['sys'], OptionalSysFields>;
|
37 | };
|
38 | export type UpsertResourceTypeProps = Omit<ResourceTypeProps, 'sys'>;
|
39 | export interface ResourceType extends ResourceTypeProps, DefaultElements<ResourceTypeProps> {
|
40 | upsert(): Promise<ResourceType>;
|
41 | delete(): Promise<void>;
|
42 | }
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 | export declare function wrapResourceType(makeRequest: MakeRequest, data: ResourceTypeProps): ResourceType;
|
50 | export declare function wrapResourceTypeforEnvironment(makeRequest: MakeRequest, data: SpaceEnvResourceTypeProps): SpaceEnvResourceTypeProps;
|
51 | export declare const wrapResourceTypesForEnvironmentCollection: (makeRequest: MakeRequest, data: CursorPaginatedCollectionProp<SpaceEnvResourceTypeProps>) => CursorPaginatedCollectionProp<SpaceEnvResourceTypeProps>;
|
52 | export {};
|