@sap-ux/fiori-mcp-server 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (181) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +99 -0
  3. package/dist/constant.d.ts +5 -0
  4. package/dist/constant.js +8 -0
  5. package/dist/index.d.ts +3 -0
  6. package/dist/index.js +7 -0
  7. package/dist/page-editor-api/api.d.ts +48 -0
  8. package/dist/page-editor-api/api.js +93 -0
  9. package/dist/page-editor-api/index.d.ts +5 -0
  10. package/dist/page-editor-api/index.js +24 -0
  11. package/dist/page-editor-api/json-helper.d.ts +11 -0
  12. package/dist/page-editor-api/json-helper.js +64 -0
  13. package/dist/page-editor-api/parser/annotations.d.ts +9 -0
  14. package/dist/page-editor-api/parser/annotations.js +13 -0
  15. package/dist/page-editor-api/parser/index.d.ts +3 -0
  16. package/dist/page-editor-api/parser/index.js +19 -0
  17. package/dist/page-editor-api/parser/model/AggregationValidator.d.ts +64 -0
  18. package/dist/page-editor-api/parser/model/AggregationValidator.js +209 -0
  19. package/dist/page-editor-api/parser/model/ArrayAggregation.d.ts +49 -0
  20. package/dist/page-editor-api/parser/model/ArrayAggregation.js +122 -0
  21. package/dist/page-editor-api/parser/model/ObjectAggregation.d.ts +374 -0
  22. package/dist/page-editor-api/parser/model/ObjectAggregation.js +802 -0
  23. package/dist/page-editor-api/parser/model/PageEditModel.d.ts +223 -0
  24. package/dist/page-editor-api/parser/model/PageEditModel.js +954 -0
  25. package/dist/page-editor-api/parser/model/PageEditProperty.d.ts +38 -0
  26. package/dist/page-editor-api/parser/model/PageEditProperty.js +49 -0
  27. package/dist/page-editor-api/parser/model/RootAggregation.d.ts +24 -0
  28. package/dist/page-editor-api/parser/model/RootAggregation.js +54 -0
  29. package/dist/page-editor-api/parser/model/actions/ActionAggregation.d.ts +34 -0
  30. package/dist/page-editor-api/parser/model/actions/ActionAggregation.js +92 -0
  31. package/dist/page-editor-api/parser/model/actions/ActionsAggregation.d.ts +96 -0
  32. package/dist/page-editor-api/parser/model/actions/ActionsAggregation.js +252 -0
  33. package/dist/page-editor-api/parser/model/actions/index.d.ts +3 -0
  34. package/dist/page-editor-api/parser/model/actions/index.js +19 -0
  35. package/dist/page-editor-api/parser/model/additionalObjects/AdditionalObjectAggregation.d.ts +17 -0
  36. package/dist/page-editor-api/parser/model/additionalObjects/AdditionalObjectAggregation.js +26 -0
  37. package/dist/page-editor-api/parser/model/additionalObjects/AdditionalObjectsAggregation.d.ts +46 -0
  38. package/dist/page-editor-api/parser/model/additionalObjects/AdditionalObjectsAggregation.js +66 -0
  39. package/dist/page-editor-api/parser/model/additionalObjects/index.d.ts +3 -0
  40. package/dist/page-editor-api/parser/model/additionalObjects/index.js +19 -0
  41. package/dist/page-editor-api/parser/model/chart/ChartAggregation.d.ts +41 -0
  42. package/dist/page-editor-api/parser/model/chart/ChartAggregation.js +94 -0
  43. package/dist/page-editor-api/parser/model/chart/index.d.ts +2 -0
  44. package/dist/page-editor-api/parser/model/chart/index.js +18 -0
  45. package/dist/page-editor-api/parser/model/fields/ConnectedFieldsAggregation.d.ts +9 -0
  46. package/dist/page-editor-api/parser/model/fields/ConnectedFieldsAggregation.js +13 -0
  47. package/dist/page-editor-api/parser/model/fields/FieldAggregation.d.ts +25 -0
  48. package/dist/page-editor-api/parser/model/fields/FieldAggregation.js +42 -0
  49. package/dist/page-editor-api/parser/model/fields/FieldsAggregation.d.ts +22 -0
  50. package/dist/page-editor-api/parser/model/fields/FieldsAggregation.js +34 -0
  51. package/dist/page-editor-api/parser/model/fields/index.d.ts +4 -0
  52. package/dist/page-editor-api/parser/model/fields/index.js +20 -0
  53. package/dist/page-editor-api/parser/model/filter-fields/FilterFieldAggregation.d.ts +39 -0
  54. package/dist/page-editor-api/parser/model/filter-fields/FilterFieldAggregation.js +94 -0
  55. package/dist/page-editor-api/parser/model/filter-fields/FilterFieldsAggregation.d.ts +36 -0
  56. package/dist/page-editor-api/parser/model/filter-fields/FilterFieldsAggregation.js +59 -0
  57. package/dist/page-editor-api/parser/model/filter-fields/index.d.ts +3 -0
  58. package/dist/page-editor-api/parser/model/filter-fields/index.js +19 -0
  59. package/dist/page-editor-api/parser/model/index.d.ts +19 -0
  60. package/dist/page-editor-api/parser/model/index.js +35 -0
  61. package/dist/page-editor-api/parser/model/macros/MacrosRoot.d.ts +48 -0
  62. package/dist/page-editor-api/parser/model/macros/MacrosRoot.js +114 -0
  63. package/dist/page-editor-api/parser/model/macros/index.d.ts +2 -0
  64. package/dist/page-editor-api/parser/model/macros/index.js +18 -0
  65. package/dist/page-editor-api/parser/model/sections/HeaderSectionsAggregation.d.ts +31 -0
  66. package/dist/page-editor-api/parser/model/sections/HeaderSectionsAggregation.js +82 -0
  67. package/dist/page-editor-api/parser/model/sections/SectionAggregation.d.ts +78 -0
  68. package/dist/page-editor-api/parser/model/sections/SectionAggregation.js +131 -0
  69. package/dist/page-editor-api/parser/model/sections/SectionsAggregation.d.ts +135 -0
  70. package/dist/page-editor-api/parser/model/sections/SectionsAggregation.js +402 -0
  71. package/dist/page-editor-api/parser/model/sections/SectionsObjectAggregation.d.ts +50 -0
  72. package/dist/page-editor-api/parser/model/sections/SectionsObjectAggregation.js +119 -0
  73. package/dist/page-editor-api/parser/model/sections/SubSectionsAggregation.d.ts +39 -0
  74. package/dist/page-editor-api/parser/model/sections/SubSectionsAggregation.js +70 -0
  75. package/dist/page-editor-api/parser/model/sections/index.d.ts +6 -0
  76. package/dist/page-editor-api/parser/model/sections/index.js +22 -0
  77. package/dist/page-editor-api/parser/model/table/ColumnAggregation.d.ts +89 -0
  78. package/dist/page-editor-api/parser/model/table/ColumnAggregation.js +175 -0
  79. package/dist/page-editor-api/parser/model/table/ColumnsAggregation.d.ts +113 -0
  80. package/dist/page-editor-api/parser/model/table/ColumnsAggregation.js +293 -0
  81. package/dist/page-editor-api/parser/model/table/TableAggregation.d.ts +13 -0
  82. package/dist/page-editor-api/parser/model/table/TableAggregation.js +21 -0
  83. package/dist/page-editor-api/parser/model/table/ToolbarAggregation.d.ts +15 -0
  84. package/dist/page-editor-api/parser/model/table/ToolbarAggregation.js +22 -0
  85. package/dist/page-editor-api/parser/model/table/index.d.ts +5 -0
  86. package/dist/page-editor-api/parser/model/table/index.js +21 -0
  87. package/dist/page-editor-api/parser/model/table/utils.d.ts +12 -0
  88. package/dist/page-editor-api/parser/model/table/utils.js +44 -0
  89. package/dist/page-editor-api/parser/model/types/annotations.d.ts +63 -0
  90. package/dist/page-editor-api/parser/model/types/annotations.js +29 -0
  91. package/dist/page-editor-api/parser/model/types/common.d.ts +13 -0
  92. package/dist/page-editor-api/parser/model/types/common.js +3 -0
  93. package/dist/page-editor-api/parser/model/types/index.d.ts +220 -0
  94. package/dist/page-editor-api/parser/model/types/index.js +149 -0
  95. package/dist/page-editor-api/parser/model/utils/annotations.d.ts +38 -0
  96. package/dist/page-editor-api/parser/model/utils/annotations.js +120 -0
  97. package/dist/page-editor-api/parser/model/utils/i18n.d.ts +33 -0
  98. package/dist/page-editor-api/parser/model/utils/i18n.js +69 -0
  99. package/dist/page-editor-api/parser/model/utils/index.d.ts +6 -0
  100. package/dist/page-editor-api/parser/model/utils/index.js +22 -0
  101. package/dist/page-editor-api/parser/model/utils/object.d.ts +25 -0
  102. package/dist/page-editor-api/parser/model/utils/object.js +68 -0
  103. package/dist/page-editor-api/parser/model/utils/sort.d.ts +31 -0
  104. package/dist/page-editor-api/parser/model/utils/sort.js +18 -0
  105. package/dist/page-editor-api/parser/model/utils/utils.d.ts +94 -0
  106. package/dist/page-editor-api/parser/model/utils/utils.js +267 -0
  107. package/dist/page-editor-api/parser/model/views/ViewAggregation.d.ts +62 -0
  108. package/dist/page-editor-api/parser/model/views/ViewAggregation.js +112 -0
  109. package/dist/page-editor-api/parser/model/views/ViewsAggregation.d.ts +54 -0
  110. package/dist/page-editor-api/parser/model/views/ViewsAggregation.js +141 -0
  111. package/dist/page-editor-api/parser/model/views/index.d.ts +3 -0
  112. package/dist/page-editor-api/parser/model/views/index.js +19 -0
  113. package/dist/page-editor-api/parser/model/visual-filters/VisualFilterAggregation.d.ts +11 -0
  114. package/dist/page-editor-api/parser/model/visual-filters/VisualFilterAggregation.js +15 -0
  115. package/dist/page-editor-api/parser/model/visual-filters/VisualFiltersAggregation.d.ts +11 -0
  116. package/dist/page-editor-api/parser/model/visual-filters/VisualFiltersAggregation.js +15 -0
  117. package/dist/page-editor-api/parser/model/visual-filters/index.d.ts +3 -0
  118. package/dist/page-editor-api/parser/model/visual-filters/index.js +19 -0
  119. package/dist/page-editor-api/parser/tree.d.ts +135 -0
  120. package/dist/page-editor-api/parser/tree.js +464 -0
  121. package/dist/page-editor-api/project.d.ts +40 -0
  122. package/dist/page-editor-api/project.js +124 -0
  123. package/dist/page-editor-api/sapuxFtfsFileIO.d.ts +84 -0
  124. package/dist/page-editor-api/sapuxFtfsFileIO.js +195 -0
  125. package/dist/server.d.ts +35 -0
  126. package/dist/server.js +120 -0
  127. package/dist/tools/execute-functionality.d.ts +19 -0
  128. package/dist/tools/execute-functionality.js +175 -0
  129. package/dist/tools/functionalities/controller-extension/index.d.ts +4 -0
  130. package/dist/tools/functionalities/controller-extension/index.js +136 -0
  131. package/dist/tools/functionalities/functionalities.d.ts +4 -0
  132. package/dist/tools/functionalities/functionalities.js +19 -0
  133. package/dist/tools/functionalities/generate-fiori-ui-app/command.d.ts +9 -0
  134. package/dist/tools/functionalities/generate-fiori-ui-app/command.js +158 -0
  135. package/dist/tools/functionalities/generate-fiori-ui-app/generate-fiori-ui-app.d.ts +4 -0
  136. package/dist/tools/functionalities/generate-fiori-ui-app/generate-fiori-ui-app.js +240 -0
  137. package/dist/tools/functionalities/generate-fiori-ui-app/index.d.ts +2 -0
  138. package/dist/tools/functionalities/generate-fiori-ui-app/index.js +7 -0
  139. package/dist/tools/functionalities/index.d.ts +2 -0
  140. package/dist/tools/functionalities/index.js +18 -0
  141. package/dist/tools/functionalities/page/add-page.d.ts +5 -0
  142. package/dist/tools/functionalities/page/add-page.js +89 -0
  143. package/dist/tools/functionalities/page/application.d.ts +212 -0
  144. package/dist/tools/functionalities/page/application.js +616 -0
  145. package/dist/tools/functionalities/page/delete-page.d.ts +4 -0
  146. package/dist/tools/functionalities/page/delete-page.js +71 -0
  147. package/dist/tools/functionalities/page/index.d.ts +3 -0
  148. package/dist/tools/functionalities/page/index.js +10 -0
  149. package/dist/tools/functionalities/page/service.d.ts +82 -0
  150. package/dist/tools/functionalities/page/service.js +114 -0
  151. package/dist/tools/functionalities/page/serviceStore.d.ts +17 -0
  152. package/dist/tools/functionalities/page/serviceStore.js +34 -0
  153. package/dist/tools/functionalities/page/types.d.ts +42 -0
  154. package/dist/tools/functionalities/page/types.js +11 -0
  155. package/dist/tools/functionalities/page/utils.d.ts +12 -0
  156. package/dist/tools/functionalities/page/utils.js +63 -0
  157. package/dist/tools/get-functionality-details.d.ts +24 -0
  158. package/dist/tools/get-functionality-details.js +142 -0
  159. package/dist/tools/index.d.ts +7 -0
  160. package/dist/tools/index.js +55 -0
  161. package/dist/tools/input-schema/execute-functionality.json +28 -0
  162. package/dist/tools/input-schema/get-functionality-details.json +24 -0
  163. package/dist/tools/input-schema/index.d.ts +5 -0
  164. package/dist/tools/input-schema/index.js +15 -0
  165. package/dist/tools/input-schema/list-fiori-apps.json +12 -0
  166. package/dist/tools/input-schema/list-functionality.json +10 -0
  167. package/dist/tools/list-fiori-apps.d.ts +10 -0
  168. package/dist/tools/list-fiori-apps.js +33 -0
  169. package/dist/tools/list-functionalities.d.ts +10 -0
  170. package/dist/tools/list-functionalities.js +145 -0
  171. package/dist/tools/output-schema/execute-functionality.json +39 -0
  172. package/dist/tools/output-schema/get-functionality-details.json +142 -0
  173. package/dist/tools/output-schema/index.d.ts +5 -0
  174. package/dist/tools/output-schema/index.js +15 -0
  175. package/dist/tools/output-schema/list-fiori-apps.json +41 -0
  176. package/dist/tools/output-schema/list-functionality.json +37 -0
  177. package/dist/tools/utils.d.ts +16 -0
  178. package/dist/tools/utils.js +74 -0
  179. package/dist/types.d.ts +170 -0
  180. package/dist/types.js +3 -0
  181. package/package.json +63 -0
@@ -0,0 +1,89 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ADD_PAGE_FUNCTIONALITY = exports.addPageHandlers = void 0;
4
+ const application_1 = require("./application");
5
+ Object.defineProperty(exports, "ADD_PAGE_FUNCTIONALITY", { enumerable: true, get: function () { return application_1.ADD_PAGE_FUNCTIONALITY; } });
6
+ const utils_1 = require("../../utils");
7
+ const constant_1 = require("../../../constant");
8
+ const page_editor_api_1 = require("../../../page-editor-api");
9
+ const src_1 = require("@sap/ux-specification/dist/types/src");
10
+ /**
11
+ * Retrieves the details of the Add Page functionality.
12
+ *
13
+ * @param params - The input parameters for getting functionality details.
14
+ * @returns A promise that resolves to the functionality details output.
15
+ */
16
+ async function getFunctionalityDetails(params) {
17
+ const { appPath } = params;
18
+ const appDetails = await (0, utils_1.resolveApplication)(appPath);
19
+ if (!appDetails?.applicationAccess) {
20
+ return {
21
+ functionalityId: constant_1.ADD_PAGE,
22
+ name: 'Invalid Project Root or Application Path',
23
+ description: `To add a new page, provide a valid project root or application path. "${appPath}" is not valid`,
24
+ parameters: []
25
+ };
26
+ }
27
+ const { appId, applicationAccess } = appDetails;
28
+ const ftfsFileIo = new page_editor_api_1.SapuxFtfsFileIO(applicationAccess);
29
+ const appData = await ftfsFileIo.readApp();
30
+ const serviceName = await (0, page_editor_api_1.getServiceName)(applicationAccess);
31
+ const application = new application_1.Application({ params, applicationAccess, serviceName, appId, appData });
32
+ return application.getCreationOptions();
33
+ }
34
+ /**
35
+ * Executes the Add Page functionality.
36
+ *
37
+ * @param params - The input parameters for executing the functionality.
38
+ * @returns A promise that resolves to the execution output.
39
+ */
40
+ async function executeFunctionality(params) {
41
+ const { appPath, parameters } = params;
42
+ const pageType = isValidPageTypeV4(parameters.pageType) ? parameters.pageType : undefined;
43
+ const parentPage = typeof parameters.parentPage === 'string' ? parameters.parentPage : undefined;
44
+ const entitySet = typeof parameters.entitySet === 'string' ? parameters.entitySet : undefined;
45
+ const pageNavigation = typeof parameters.pageNavigation === 'string' ? parameters.pageNavigation : undefined;
46
+ const viewName = typeof parameters.pageViewName === 'string' ? parameters.pageViewName : 'CustomView';
47
+ if (!pageType) {
48
+ throw new Error('Missing or invalid parameter "pageType"');
49
+ }
50
+ const appDetails = await (0, utils_1.resolveApplication)(appPath);
51
+ if (!appDetails?.applicationAccess) {
52
+ return {
53
+ functionalityId: constant_1.ADD_PAGE,
54
+ status: 'Failed',
55
+ message: `Project root not found for app path: ${appPath}`,
56
+ parameters: [],
57
+ appPath: appPath,
58
+ changes: [],
59
+ timestamp: new Date().toISOString()
60
+ };
61
+ }
62
+ const { appId, applicationAccess } = appDetails;
63
+ const ftfsFileIo = new page_editor_api_1.SapuxFtfsFileIO(applicationAccess);
64
+ const appData = await ftfsFileIo.readApp();
65
+ const serviceName = await (0, page_editor_api_1.getServiceName)(applicationAccess);
66
+ const application = new application_1.Application({ params, applicationAccess, serviceName, appId, appData });
67
+ return application.createPage({
68
+ pageType: pageType,
69
+ parent: parentPage,
70
+ navigation: pageNavigation,
71
+ entitySet: entitySet,
72
+ viewName: viewName
73
+ });
74
+ }
75
+ /**
76
+ * Type guard to check whether a given value is a valid PageTypeV4 for new pages.
77
+ *
78
+ * @param value - The value to check.
79
+ * @returns True if the value is one of the valid `PageTypeV4` literals.
80
+ */
81
+ function isValidPageTypeV4(value) {
82
+ return (typeof value === 'string' &&
83
+ [src_1.PageTypeV4.ObjectPage, src_1.PageTypeV4.ListReport, src_1.PageTypeV4.CustomPage].includes(value));
84
+ }
85
+ exports.addPageHandlers = {
86
+ getFunctionalityDetails,
87
+ executeFunctionality
88
+ };
89
+ //# sourceMappingURL=add-page.js.map
@@ -0,0 +1,212 @@
1
+ import type { ApplicationAccess } from '@sap-ux/project-access';
2
+ import { type AppData } from '../../../page-editor-api';
3
+ import type { ExecuteFunctionalityOutput, GetFunctionalityDetailsInput, GetFunctionalityDetailsOutput } from '../../../types';
4
+ import type { NewPage, PageDef, AllowedNavigationOptions } from './types';
5
+ export declare const ADD_PAGE_FUNCTIONALITY: GetFunctionalityDetailsOutput;
6
+ export declare const DELETE_PAGE_FUNCTIONALITY: GetFunctionalityDetailsOutput;
7
+ /**
8
+ * Represents an application instance with its metadata, access configuration and functionality details.
9
+ */
10
+ export declare class Application {
11
+ private readonly serviceName;
12
+ private readonly appData;
13
+ private readonly appId;
14
+ private readonly applicationAccess;
15
+ private readonly params;
16
+ /**
17
+ * Creates a new instance of the Application class.
18
+ *
19
+ * @param root0 - The constructor arguments.
20
+ * @param root0.params - Input parameters for functionality details.
21
+ * @param root0.applicationAccess - The application access object.
22
+ * @param root0.appId - The unique identifier of the application.
23
+ * @param root0.serviceName - The service name associated with the application.
24
+ * @param root0.appData - Metadata and configuration data for the application.
25
+ */
26
+ constructor({ params, applicationAccess, appId, serviceName, appData }: {
27
+ params: GetFunctionalityDetailsInput;
28
+ applicationAccess: ApplicationAccess;
29
+ appId: string;
30
+ serviceName: string;
31
+ appData: AppData;
32
+ });
33
+ /**
34
+ * Gets the name of an allowed navigation option.
35
+ *
36
+ * @param navigation - The allowed navigation option.
37
+ * @returns The name of the navigation option.
38
+ */
39
+ private getAllowedNavigationsName;
40
+ /**
41
+ * Generates a string representation of all allowed navigation options.
42
+ *
43
+ * @param navigations - An array of allowed navigation options.
44
+ * @returns A comma-separated string of navigation names.
45
+ */
46
+ private getAllowedNavigationsOutput;
47
+ /**
48
+ * Generates an error message for missing navigation.
49
+ *
50
+ * @param reason - The reason for the missing navigation.
51
+ * @param navigations - An array of allowed navigation options.
52
+ * @param parentPageId - Optional ID of the parent page.
53
+ * @returns An error message string.
54
+ */
55
+ private getMissingNavigationMessage;
56
+ /**
57
+ * Calculates the context path for a page.
58
+ *
59
+ * @param parentPage - Optional parent page definition.
60
+ * @param navigationProperty - Optional navigation property.
61
+ * @param entitySet - Optional entity set.
62
+ * @returns The calculated context path or undefined.
63
+ */
64
+ private calculateContextPath;
65
+ /**
66
+ * Calculates the context path based on the entity set of the parent page.
67
+ *
68
+ * @param parentPage - The parent page definition.
69
+ * @param navigationProperty - Optional navigation property.
70
+ * @returns The calculated context path or undefined.
71
+ */
72
+ private calculateContextPathBasedOnEntitySet;
73
+ /**
74
+ * Creates an error response object.
75
+ *
76
+ * @param message - The error message.
77
+ * @returns An ExecuteFunctionalityOutput object with error details.
78
+ */
79
+ private createErrorResponse;
80
+ /**
81
+ * Validates the input for page creation.
82
+ *
83
+ * @param newPage - The new page details.
84
+ * @param pages - Existing pages in the application.
85
+ * @param viewName - Optional view name for custom pages.
86
+ * @returns A promise that resolves to an ExecuteFunctionalityOutput object if there's an error, or null if validation passes.
87
+ */
88
+ private validatePageCreationInput;
89
+ /**
90
+ * Validates the view name for a custom page.
91
+ *
92
+ * @param viewName - The view name to validate.
93
+ * @returns An ExecuteFunctionalityOutput object if there's an error, or null if validation passes.
94
+ */
95
+ private validateCustomPageViewName;
96
+ /**
97
+ * Validates the navigation input for page creation.
98
+ *
99
+ * @param parentPage - The parent page definition, if any.
100
+ * @param navigation - Optional navigation string.
101
+ * @param entitySet - Optional entity set.
102
+ * @param pages - Array of existing page definitions.
103
+ * @returns A promise that resolves to an ExecuteFunctionalityOutput object if there's an error, or null if validation passes.
104
+ */
105
+ private validateNavigationInput;
106
+ /**
107
+ * Finds the target navigation option based on the provided navigation or entity set.
108
+ *
109
+ * @param navigations - Array of allowed navigation options.
110
+ * @param navigation - Optional navigation string to search for.
111
+ * @param entitySet - Optional entity set to search for.
112
+ * @returns The matching AllowedNavigationOptions object or undefined if not found.
113
+ */
114
+ private findTargetNavigation;
115
+ /**
116
+ * Generates a new page using the FPM writer.
117
+ *
118
+ * @param newPage - The new page details.
119
+ * @param parentPage - The parent page, if any.
120
+ * @param targetNavigation - The target navigation option.
121
+ * @param pages - Existing pages in the application.
122
+ * @param viewName - Optional view name for custom pages.
123
+ * @param entitySet - Optional entity set for the new page.
124
+ * @returns A promise that resolves to an object containing the new page ID and changes made.
125
+ */
126
+ private generatePageWithFPMWriter;
127
+ /**
128
+ * Writes the Flexible Programming Model (FPM) configuration.
129
+ *
130
+ * @param pageType - The type of the page.
131
+ * @param fpmData - The page API configuration.
132
+ * @param viewName - Optional view name for custom pages.
133
+ * @returns A promise that resolves to an array of strings representing the changes made.
134
+ */
135
+ private writeFPM;
136
+ /**
137
+ * Deletes navigation links for a given page.
138
+ *
139
+ * @param navigation - The navigation object containing links.
140
+ * @param pageName - The name of the page to remove links for.
141
+ */
142
+ private deleteNavigationLinks;
143
+ /**
144
+ * Function to evaluate the navigation entry of a page.
145
+ * Old format (spec version <=3): <target page name>: <route name>.
146
+ * New format (spec version >=4): <route name>: { route: <target page name>}.
147
+ *
148
+ * @param pageObjNavigation - Page data.
149
+ * @param key - key in schema for the route definition.
150
+ * @returns the target page name from the route definition.
151
+ */
152
+ private findPageByNavigation;
153
+ /**
154
+ * Method which deletes pages recursively by looping through navigation.
155
+ *
156
+ * @param app - Content of 'app.json'.
157
+ * @param pageName - page's name to remove
158
+ */
159
+ private deletePageRecursively;
160
+ /**
161
+ * Retrieves all pages defined in the application.
162
+ *
163
+ * @returns An array of PageDef objects representing the pages in the application.
164
+ */
165
+ getPages(): PageDef[];
166
+ /**
167
+ * Retrieves allowed navigation options for a given parent page.
168
+ *
169
+ * @param parentPage - Optional parent page definition.
170
+ * @param refresh - Whether to refresh the data from the service.
171
+ * @returns A promise that resolves to an array of AllowedNavigationOptions.
172
+ */
173
+ getAllowedNavigations(parentPage?: PageDef, refresh?: boolean): Promise<AllowedNavigationOptions[]>;
174
+ /**
175
+ * Retrieves navigation options for the root page.
176
+ *
177
+ * @param refresh - Whether to refresh the data from the service.
178
+ * @returns A promise that resolves to an array of AllowedNavigationOptions.
179
+ */
180
+ getRootPageNavigationOptions(refresh?: boolean): Promise<AllowedNavigationOptions[]>;
181
+ /**
182
+ * Retrieves creation options for a new page.
183
+ *
184
+ * @param pageType - Optional page type to get specific creation options.
185
+ * @returns A promise that resolves to GetFunctionalityDetailsOutput containing creation options.
186
+ */
187
+ getCreationOptions(pageType?: string): Promise<GetFunctionalityDetailsOutput>;
188
+ /**
189
+ * Creates a new page in the application.
190
+ *
191
+ * @param newPage - Details of the new page to be created.
192
+ * @returns A promise that resolves to ExecuteFunctionalityOutput containing the result of the page creation.
193
+ */
194
+ createPage(newPage: NewPage): Promise<ExecuteFunctionalityOutput>;
195
+ /**
196
+ * Retrieves options for deleting a page.
197
+ *
198
+ * @returns A promise that resolves to GetFunctionalityDetailsOutput containing delete options.
199
+ */
200
+ getDeleteOptions(): Promise<GetFunctionalityDetailsOutput>;
201
+ /**
202
+ * Deletes a page from the application.
203
+ *
204
+ * @param page - The page to be deleted.
205
+ * @param page.pageId - The ID of the page to be deleted.
206
+ * @returns A promise that resolves to ExecuteFunctionalityOutput containing the result of the page deletion.
207
+ */
208
+ deletePage(page: {
209
+ pageId: string;
210
+ }): Promise<ExecuteFunctionalityOutput>;
211
+ }
212
+ //# sourceMappingURL=application.d.ts.map