@messaia/cdk 20.2.2 → 20.2.4

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/index.d.ts CHANGED
@@ -5989,18 +5989,27 @@ declare abstract class GenericFormBaseComponent<TEntity extends IEntity, TServic
5989
5989
  * Loads an item by ID.
5990
5990
  * This method fetches the item if the component is in edit mode and the service endpoint is defined.
5991
5991
  *
5992
- * @param callback - A function to be called after the item has been successfully loaded.
5993
- * This function will receive the loaded item as an argument.
5994
- */
5995
- loadItem(callback?: (item: {
5992
+ * @param successCallback - A function to be called after the item has been successfully loaded.
5993
+ * This function will receive the loaded item as an argument.
5994
+ * @param errorCallback - A function to be called if an error occurs during loading.
5995
+ * This function will receive the error as an argument.
5996
+ * @param headers - Optional HTTP headers to include in the request.
5997
+ * @param handleError - Indicates whether to automatically handle and parse errors (default: true).
5998
+ * @param observeResponse - If true, the full HTTP response will be observed instead of just the body (default: false).
5999
+ */
6000
+ loadItem(successCallback?: (item: {
5996
6001
  entity: TEntity;
5997
6002
  permissions: Permission;
5998
- }) => void): void;
6003
+ }) => void, errorCallback?: (error: any) => void, headers?: Record<string, string>, handleError?: boolean, observeResponse?: boolean): void;
5999
6004
  /**
6000
6005
  * Loads an item by ID asynchronously.
6006
+ *
6007
+ * @param headers - Optional HTTP headers to include in the request.
6008
+ * @param handleError - Indicates whether to automatically handle and parse errors (default: true).
6009
+ * @param observeResponse - If true, the full HTTP response will be observed instead of just the body (default: false).
6001
6010
  * @returns An Observable of the loaded entity.
6002
6011
  */
6003
- loadItemAsync(): Observable<{
6012
+ loadItemAsync(headers?: Record<string, string>, handleError?: boolean, observeResponse?: boolean): Observable<{
6004
6013
  entity: TEntity;
6005
6014
  permissions: Permission;
6006
6015
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@messaia/cdk",
3
- "version": "20.2.2",
3
+ "version": "20.2.4",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^20.0.0",
6
6
  "@angular/core": "^20.0.0"