UNPKG

@kontent-ai/management-sdk

Version:
50 lines (49 loc) 1.93 kB
import { CustomAppsContracts, SharedContracts } from '../../contracts'; import { SharedModels } from '../shared/shared-models'; export declare namespace CustomAppModels { class CustomApp implements SharedModels.IBaseModel<CustomAppsContracts.ICustomAppContract> { name: string; codename: string; source_url: string; config: string | null; allowed_roles?: SharedContracts.ICodenameIdReferenceContract[]; _raw: CustomAppsContracts.ICustomAppContract; constructor(data: { name: string; codename: string; source_url: string; config: string | null; allowed_roles?: SharedContracts.ICodenameIdReferenceContract[]; _raw: CustomAppsContracts.ICustomAppContract; }); } interface IAddCustomAppData { name: string; codename: string; source_url: string; config?: string | null; allowed_roles?: SharedContracts.ICodenameIdReferenceContract[]; } type ModifyCustomAppPropertyName = 'name' | 'source_url' | 'config' | 'allowed_roles'; type ModifyCustomAppOperation = { op: 'addInto'; value: SharedContracts.IReferenceObjectContract; property_name: Extract<ModifyCustomAppPropertyName, 'allowed_roles'>; } | ({ op: 'replace'; value: SharedContracts.IReferenceObjectContract; property_name: Extract<ModifyCustomAppPropertyName, 'allowed_roles'>; } | { op: 'replace'; value: string; property_name: Extract<ModifyCustomAppPropertyName, 'name' | 'source_url'>; } | { op: 'replace'; value: string | null; property_name: Extract<ModifyCustomAppPropertyName, 'config'>; }) | { op: 'remove'; value: SharedContracts.IReferenceObjectContract; property_name: Extract<ModifyCustomAppPropertyName, 'allowed_roles'>; }; }