change model based on feedback from Kenn
This commit is contained in:
@@ -158,7 +158,4 @@ export type UmbPackage = {
|
||||
extensions?: unknown[];
|
||||
};
|
||||
|
||||
export type PagedManifestsResponse = {
|
||||
total: number;
|
||||
items: UmbPackage[];
|
||||
};
|
||||
export type PagedManifestsResponse = UmbPackage[];
|
||||
|
||||
@@ -7,66 +7,63 @@ export const manifestDevelopmentHandler = rest.get(umbracoPath('/manifests'), (_
|
||||
return res(
|
||||
// Respond with a 200 status code
|
||||
ctx.status(200),
|
||||
ctx.json<PagedManifestsResponse>({
|
||||
total: 3,
|
||||
items: [
|
||||
{
|
||||
name: 'Named Package',
|
||||
version: '1.0.0',
|
||||
extensions: [
|
||||
{
|
||||
type: 'section',
|
||||
alias: 'My.Section.Custom',
|
||||
name: 'Custom Section',
|
||||
js: '/App_Plugins/section.js',
|
||||
elementName: 'my-section-custom',
|
||||
weight: 1,
|
||||
meta: {
|
||||
label: 'Custom',
|
||||
pathname: 'my-custom',
|
||||
},
|
||||
ctx.json<PagedManifestsResponse>([
|
||||
{
|
||||
name: 'Named Package',
|
||||
version: '1.0.0',
|
||||
extensions: [
|
||||
{
|
||||
type: 'section',
|
||||
alias: 'My.Section.Custom',
|
||||
name: 'Custom Section',
|
||||
js: '/App_Plugins/section.js',
|
||||
elementName: 'my-section-custom',
|
||||
weight: 1,
|
||||
meta: {
|
||||
label: 'Custom',
|
||||
pathname: 'my-custom',
|
||||
},
|
||||
{
|
||||
type: 'propertyEditorUI',
|
||||
alias: 'My.PropertyEditorUI.Custom',
|
||||
name: 'My Custom Property Editor UI',
|
||||
js: '/App_Plugins/property-editor.js',
|
||||
elementName: 'my-property-editor-ui-custom',
|
||||
meta: {
|
||||
label: 'My Custom Property',
|
||||
icon: 'document',
|
||||
group: 'Common',
|
||||
propertyEditorModel: 'Umbraco.JSON',
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'propertyEditorUI',
|
||||
alias: 'My.PropertyEditorUI.Custom',
|
||||
name: 'My Custom Property Editor UI',
|
||||
js: '/App_Plugins/property-editor.js',
|
||||
elementName: 'my-property-editor-ui-custom',
|
||||
meta: {
|
||||
label: 'My Custom Property',
|
||||
icon: 'document',
|
||||
group: 'Common',
|
||||
propertyEditorModel: 'Umbraco.JSON',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
extensions: [
|
||||
{
|
||||
type: 'entrypoint',
|
||||
name: 'My Custom Entry Point',
|
||||
alias: 'My.Entrypoint.Custom',
|
||||
js: '/App_Plugins/custom-entrypoint.js',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
extensions: [
|
||||
{
|
||||
type: 'entrypoint',
|
||||
name: 'My Custom Entry Point',
|
||||
alias: 'My.Entrypoint.Custom',
|
||||
js: '/App_Plugins/custom-entrypoint.js',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'Package with a view',
|
||||
extensions: [
|
||||
{
|
||||
type: 'packageView',
|
||||
alias: 'My.PackageView.Custom',
|
||||
name: 'My Custom Package View',
|
||||
js: '/App_Plugins/package-view.js',
|
||||
meta: {
|
||||
packageName: 'my.package',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'Package with a view',
|
||||
extensions: [
|
||||
{
|
||||
type: 'packageView',
|
||||
alias: 'My.PackageView.Custom',
|
||||
name: 'My Custom Package View',
|
||||
js: '/App_Plugins/package-view.js',
|
||||
meta: {
|
||||
packageName: 'my.package',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
})
|
||||
},
|
||||
],
|
||||
},
|
||||
])
|
||||
);
|
||||
});
|
||||
|
||||
@@ -74,6 +71,6 @@ export const manifestEmptyHandler = rest.get(umbracoPath('/manifests'), (_req, r
|
||||
return res(
|
||||
// Respond with a 200 status code
|
||||
ctx.status(200),
|
||||
ctx.json<PagedManifestsResponse>({ total: 0, items: [] })
|
||||
ctx.json<PagedManifestsResponse>([])
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user