@azure/api-management-custom-widgets-scaffolder 1.0.0-alpha.20241122.1 → 1.0.0-alpha.20241126.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.
package/package.json
CHANGED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @packageDocumentation https://aka.ms/apimdocs/portal/customwidgets
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/** Main data which DevPortal needs for every custom widget. */
|
|
6
|
-
export declare interface CustomWidgetCommonConfig {
|
|
7
|
-
/** Name of the custom widget which is displayed in DevPortal. */
|
|
8
|
-
displayName: string;
|
|
9
|
-
/** Technology to use to scaffold the widget. */
|
|
10
|
-
technology: ScaffoldTech;
|
|
11
|
-
/** Optional URL for a custom icon, which will be displayed in DevPortal widget list. */
|
|
12
|
-
iconUrl?: string;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/** Data needed for deployment. */
|
|
16
|
-
export declare interface DeploymentConfig {
|
|
17
|
-
/** Management API endpoint to use (e.g. management.azure.com). */
|
|
18
|
-
managementApiEndpoint: string;
|
|
19
|
-
/** resourceId of your APIM service, must be in this format: subscriptions/<subscription-id>/resourceGroups/<resource-group-name>/providers/Microsoft.ApiManagement/service/<service-name> */
|
|
20
|
-
resourceId: string;
|
|
21
|
-
/** optional override which API version to use during deployment */
|
|
22
|
-
apiVersion?: string;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Converts user defined name of a custom widget to a unique ID, which is in context of Dev Portal known as "name".
|
|
27
|
-
* Prefix "cw-" to avoid conflicts with existing widgets.
|
|
28
|
-
*
|
|
29
|
-
* @param displayName - User defined name of the custom widget.
|
|
30
|
-
*/
|
|
31
|
-
export declare const displayNameToName: (displayName: string) => string;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Generates a scaffold project of Custom widget for API Managements' Dev Portal.
|
|
35
|
-
*
|
|
36
|
-
* @param widgetConfig - JSON object with data required by DevPortal to handle a widget integration.
|
|
37
|
-
* @param deploymentConfig - JSON object with data for deployment.
|
|
38
|
-
* @param options - JSON object with other data, which will not be stored in the DevPortal.
|
|
39
|
-
*/
|
|
40
|
-
export declare function generateProject(widgetConfig: CustomWidgetCommonConfig, deploymentConfig: DeploymentConfig, options?: Options): Promise<void>;
|
|
41
|
-
|
|
42
|
-
/** Miscellaneous data for scaffolding of a custom widget which will not be stored in DevPortal. */
|
|
43
|
-
export declare interface Options {
|
|
44
|
-
/** The URL to open after development server of the widget is started (URL of your Developer Portal). If you don't want to use this feature, set it to `false`. If you want to open just the widget page, set it to `true`. */
|
|
45
|
-
openUrl?: string;
|
|
46
|
-
/** advance configuration option for the deploy function - tenant ID for InteractiveBrowserCredentialNodeOptions */
|
|
47
|
-
configAdvancedTenantId?: string;
|
|
48
|
-
/** advance configuration option for the deploy function - redirect URI for InteractiveBrowserCredentialNodeOptions */
|
|
49
|
-
configAdvancedRedirectUri?: string;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Default port for running local dev server on.
|
|
54
|
-
*/
|
|
55
|
-
export declare const OVERRIDE_DEFAULT_PORT = 3000;
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Unique identifier under which is specified which port to use for injecting locally hosted custom widget to a running DevPortal instance.
|
|
59
|
-
*/
|
|
60
|
-
export declare const OVERRIDE_PORT_KEY = "MS_APIM_CW_localhost_port";
|
|
61
|
-
|
|
62
|
-
/** All supported technologies to scaffold a widget in. */
|
|
63
|
-
export declare type ScaffoldTech = "typescript" | "react" | "vue";
|
|
64
|
-
|
|
65
|
-
/** List of all supported technologies to scaffold a widget in. */
|
|
66
|
-
export declare const TECHNOLOGIES: ScaffoldTech[];
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Returns name of the folder for widget project.
|
|
70
|
-
*
|
|
71
|
-
* @param name - name of the widget
|
|
72
|
-
*/
|
|
73
|
-
export declare const widgetFolderName: (name: string) => string;
|
|
74
|
-
|
|
75
|
-
export { }
|