Skip to content

Commit a93d899

Browse files
author
Kaushik Shetty
committed
chore: update build
1 parent 4bf4b08 commit a93d899

File tree

10 files changed

+53
-9976
lines changed

10 files changed

+53
-9976
lines changed

dist/index.js

Lines changed: 2 additions & 8986 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 931 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/src/AssetSidebarWidget.d.ts

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,29 +13,58 @@ declare class AssetSidebarWidget {
1313
_connection: typeof postRobot;
1414
_changedData?: GenericObjectType;
1515
constructor(initializationData: IAssetSidebarInitData, connection: typeof postRobot, emitter: EventEmitter);
16+
/**
17+
* Get the current asset data.
18+
* @returns {AssetData} The current asset data.
19+
*/
1620
getData(): AssetType;
21+
/**
22+
* Set data for the asset.
23+
* @param {Partial<setAssetDto>} asset - The partial asset data to set.
24+
* @returns {Promise<void>} A promise that resolves when the data is set successfully.
25+
*/
1726
setData(asset: Partial<setAssetDto>): Promise<void>;
27+
/**
28+
* Synchronize the asset with the parent application in the Contentstack UI.
29+
* @returns {Promise<void>} A promise that resolves when the synchronization is complete.
30+
*/
1831
syncAsset(): Promise<void>;
32+
/**
33+
* Update the width of the Asset Sidebar widget in the Contentstack UI.
34+
* @param {number} width - The new width of the asset sidebar.
35+
* @throws {Error} Throws an error if the width parameter is not a number.
36+
* @returns {Promise<void>} A promise that resolves when the width is updated successfully.
37+
*/
1938
updateWidth(width: number): Promise<void>;
20-
replaceAsset(file: File): Promise<any>;
2139
/**
22-
* This function executes the callback function every time an asset is saved.
23-
* @param {function} callback The function to be called when an asset is saved.
40+
* Replace the current asset with a new file.
41+
* @param {File} file - The file to be used as the replacement asset.
42+
* @returns {Promise<void>} A promise that resolves when the replacement is complete.
43+
*/
44+
replaceAsset(file: File): Promise<void>;
45+
/**
46+
* Executes the provided callback function every time an asset is saved.
47+
* @param {function} callback - The function to be called when an asset is saved.
48+
* @param {AssetType} arg0 - The asset data passed as an argument to the callback function when an asset is saved.
2449
*/
2550
onSave(callback: (arg0: AssetType) => void): void;
2651
/**
27-
* The field.onChange() function is called when another extension programmatically changes the data of the current extension field using the field.setData() function. This function is only available for extension fields that support the following data types: text, number, boolean, or date.
28-
* @param {function} callback The function to be called when an asset is edited/changed.
52+
* The `field.onChange()` function is called when another extension programmatically changes the data of the current extension field using the `field.setData()` function.
53+
* This function is only available for extension fields that support the following data types: text, number, boolean, or date.
54+
* @param {function} callback - The function to be called when the asset is edited/changed.
55+
* @param {AssetType} arg0 - The asset data passed as an argument to the callback function when the asset is edited/changed.
2956
*/
3057
onChange(callback: (arg0: AssetType) => void): void;
3158
/**
3259
* The onPublish() function executes the callback function every time an asset has been published with the respective payload.
33-
* @param {function} callback The function to be called when an asset is published.
60+
* @param {function} callback - The function to be called when an asset is published.
61+
* @param {AssetType} arg0 - The data of the published asset passed as an argument to the callback function.
3462
*/
3563
onPublish(callback: (arg0: AssetType) => void): void;
3664
/**
37-
* The onUnPublish() function executes the callback function every time an asset has been unpublished with the respective payload.
38-
* @param {function} callback The function to be called when an asset is un published.
65+
* The `onUnPublish()` function executes the provided callback every time an asset is unpublished.
66+
* @param {function} callback - The function to be called when an asset is unpublished.
67+
* @param {AssetType} arg0 - The data of the unpublished asset passed as an argument to the callback function.
3968
*/
4069
onUnPublish(callback: (arg0: AssetType) => void): void;
4170
}

dist/src/AssetSidebarWidget.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/src/appConfig/index.d.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import Stack from "../stack";
21
import postRobot from "post-robot";
2+
import Stack from "../stack";
33
import { IInstallationData, ValidationOptions, IAppConfigInitData } from "../types";
4-
import { GenericObjectType } from "../types/common.types";
54
export declare interface AppConfigAdditionalData {
65
currentBranch: string;
76
}
@@ -15,13 +14,13 @@ export declare class AppConfig {
1514
private _additionalData;
1615
constructor(data: IAppConfigInitData, connection: typeof postRobot, emitter: EventEmitter, additionalData: AppConfigAdditionalData);
1716
stack: () => Stack;
18-
setInstallationData: (installationData: IInstallationData) => Promise<GenericObjectType>;
17+
setInstallationData: (installationData: IInstallationData) => Promise<IInstallationData>;
1918
getInstallationData: () => Promise<IInstallationData>;
2019
/**
2120
* Sets the validation state of the app. If the validation is false, the Contentstack App Config
2221
* will not allow saving the configuration. The message will be displayed if provided.
2322
* @param {boolean} isValid - The validation state of the app.
24-
* @param {object} options - Additional options to be sent to the parent.
23+
* @param {ValidationOptions} options - Additional options to be sent to the parent.
2524
* @returns {Promise<void>} - A promise that resolves to void.
2625
*/
2726
setValidity(isValid: boolean, options?: ValidationOptions): Promise<void>;

dist/src/appConfig/index.d.ts.map

Lines changed: 1 addition & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/src/field.d.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@ declare class Field {
1616
_resolvedData: GenericObjectType;
1717
_self: boolean;
1818
_connection: typeof postRobot;
19-
constructor(
20-
fieldDataObject: IFieldInitData | IFieldModifierLocationInitData,
21-
connection: typeof postRobot,
22-
emitter: EventEmitter
23-
);
19+
constructor(fieldDataObject: IFieldInitData | IFieldModifierLocationInitData, connection: typeof postRobot, emitter: EventEmitter);
2420
/**
2521
* Sets the data for the current field.
2622
* @param {Object|string|number} data Data to be set on the field
@@ -33,9 +29,7 @@ declare class Field {
3329
* @param {boolean} options.resolved If the resolved parameter is set to true for the File field, then the method will return a resolved asset object along with all the field metadata, e.g. 'field.getData({resolved:true})'.
3430
* @return {Object|string|number} Returns the field data.
3531
*/
36-
getData({
37-
resolved,
38-
}?: {
32+
getData({ resolved }?: {
3933
resolved?: boolean | undefined;
4034
}): GenericObjectType;
4135
/**
@@ -50,4 +44,4 @@ declare class Field {
5044
onChange?(callback: (data: any) => any): void;
5145
}
5246
export default Field;
53-
//# sourceMappingURL=field.d.ts.map
47+
//# sourceMappingURL=field.d.ts.map

dist/src/field.d.ts.map

Lines changed: 1 addition & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/src/window.d.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import EventEmitter from "wolfy87-eventemitter";
2+
import postRobot from "post-robot";
23
import { DashboardWidth, LocationType } from "./types";
34
/**
45
* Class representing an iframe window from Contentstack UI. Not available for Custom Widgets.
@@ -14,12 +15,7 @@ declare class Window {
1415
_emitter: EventEmitter;
1516
state: DashboardWidth;
1617
_height?: number;
17-
constructor(
18-
connection: any,
19-
type: LocationType.DASHBOARD | LocationType.FIELD,
20-
emitter: EventEmitter,
21-
state?: DashboardWidth
22-
);
18+
constructor(connection: any, type: LocationType.DASHBOARD | LocationType.FIELD, emitter: EventEmitter, state?: DashboardWidth);
2319
/**
2420
* Activates the resize button that allows you to resize the window size of your Dashboard Widget.
2521
* @return {Promise} A promise that resolves when the resize button becomes visible on the Dashboard Widget.
@@ -60,4 +56,4 @@ declare class Window {
6056
disablePaddingTop(): Promise<void>;
6157
}
6258
export default Window;
63-
//# sourceMappingURL=window.d.ts.map
59+
//# sourceMappingURL=window.d.ts.map

dist/src/window.d.ts.map

Lines changed: 1 addition & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)