@svadmin/core 0.5.0 → 0.5.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 +1 -1
- package/src/form-hooks.svelte.ts +1 -1
- package/src/mutation-hooks.svelte.ts +1 -1
- package/src/types.ts +1 -1
package/package.json
CHANGED
package/src/form-hooks.svelte.ts
CHANGED
|
@@ -147,7 +147,7 @@ export function useForm<
|
|
|
147
147
|
onSuccess: (data: { data: TData }) => {
|
|
148
148
|
if (invalidateScopes !== false) queryClient.invalidateQueries({ queryKey: [resource] });
|
|
149
149
|
if (successNotification !== false) toast.success(successNotification || t('common.createSuccess'));
|
|
150
|
-
audit({ action: 'create', resource, recordId: String(data.data.id) });
|
|
150
|
+
audit({ action: 'create', resource, recordId: String((data.data as any).id) });
|
|
151
151
|
onMutationSuccess?.(data);
|
|
152
152
|
if (redirectOverride !== false) doRedirect(redirectOverride ?? redirectDefault);
|
|
153
153
|
},
|
|
@@ -61,7 +61,7 @@ export function useCreate<TData extends BaseRecord = BaseRecord, TError = HttpEr
|
|
|
61
61
|
queryClient.invalidateQueries({ queryKey: [resName] });
|
|
62
62
|
}
|
|
63
63
|
fireSuccessNotification(params.successNotification, 'Created successfully', data.data, params.variables, resName);
|
|
64
|
-
audit({ action: 'create', resource: resName, recordId: String(data.data.id) });
|
|
64
|
+
audit({ action: 'create', resource: resName, recordId: String((data.data as any).id) });
|
|
65
65
|
},
|
|
66
66
|
onError: (error, params) => {
|
|
67
67
|
fireErrorNotification(params.errorNotification, 'Create failed', error);
|
package/src/types.ts
CHANGED
|
@@ -25,7 +25,7 @@ export class UndoError extends Error {
|
|
|
25
25
|
|
|
26
26
|
// ─── Base Types ───────────────────────────────────────────────
|
|
27
27
|
|
|
28
|
-
export type BaseRecord =
|
|
28
|
+
export type BaseRecord = any;
|
|
29
29
|
|
|
30
30
|
// ─── DataProvider ─────────────────────────────────────────────
|
|
31
31
|
|