1 | import type { BasicCursorPaginationOptions, CursorPaginatedCollectionProp, MakeRequest, SysLink } from '../common-types';
|
2 | export type ResourceQueryOptions = LookupQueryOptions | SearchQueryOptions;
|
3 | type LookupQueryOptions = {
|
4 | 'sys.urn[in]': string;
|
5 | locale?: string;
|
6 | } & BasicCursorPaginationOptions;
|
7 | type SearchQueryOptions = {
|
8 | query: string;
|
9 | locale?: string;
|
10 | } & BasicCursorPaginationOptions;
|
11 | export type ResourceProps = {
|
12 | sys: {
|
13 | type: 'Resource';
|
14 | urn: string;
|
15 | resourceType: SysLink;
|
16 | resourceProvider: SysLink;
|
17 | appDefinition: SysLink;
|
18 | };
|
19 | fields: {
|
20 | title: string;
|
21 | subtitle?: string;
|
22 | description?: string;
|
23 | externalUrl?: string;
|
24 | image?: {
|
25 | url: string;
|
26 | altText?: string;
|
27 | };
|
28 | badge?: {
|
29 | label: string;
|
30 | variant: 'primary' | 'negative' | 'positive' | 'warning' | 'secondary';
|
31 | };
|
32 | };
|
33 | };
|
34 | export declare function wrapResource(makeRequest: MakeRequest, data: ResourceProps): ResourceProps & {
|
35 | toPlainObject(): ResourceProps;
|
36 | };
|
37 | export declare const wrapResourceCollection: (makeRequest: MakeRequest, data: CursorPaginatedCollectionProp<ResourceProps>) => CursorPaginatedCollectionProp<ResourceProps>;
|
38 | export {};
|