Refine Integration #13

Merged
pcfreak30 merged 9 commits from riobuenoDevelops/refine-integration into develop 2024-03-19 23:50:55 +00:00
2 changed files with 52 additions and 12 deletions
Showing only changes of commit 65bf663b67 - Show all commits

View File

@ -10,10 +10,16 @@ type AccountData = AccountParams;
export const accountProvider: SdkProvider = {
getList: () => {
throw Error("Not Implemented")
console.log("Not implemented");
return Promise.resolve({
data: [],
});
},
getOne: () => {
throw Error("Not Implemented")
console.log("Not implemented");
return Promise.resolve({
data: {},
});
},
// @ts-ignore
async update<TVariables extends AccountParams = AccountParams>(
@ -44,10 +50,16 @@ export const accountProvider: SdkProvider = {
};
},
create: () => {
throw Error("Not Implemented")
console.log("Not implemented");
return Promise.resolve({
data: {},
});
},
deleteOne: () => {
throw Error("Not Implemented")
console.log("Not implemented");
return Promise.resolve({
data: {},
});
},
getApiUrl: () => "",
}

View File

@ -1,11 +1,39 @@
import type { DataProvider } from "@refinedev/core";
import { SdkProvider } from "~/data/sdk-provider.js";
export const fileProvider: SdkProvider = {
getList: () => { throw Error("Not Implemented") },
getOne: () => { throw Error("Not Implemented") },
update: () => { throw Error("Not Implemented") },
create: () => { throw Error("Not Implemented") },
deleteOne: () => { throw Error("Not Implemented") },
export const fileProvider = {
getList: () => {
console.log("Not implemented");
return Promise.resolve({
data: [],
total: 0,
});
},
getOne: () => {
console.log("Not implemented");
return Promise.resolve({
data: {
id: 1
},
});
},
update: () => {
console.log("Not implemented");
return Promise.resolve({
data: {},
});
},
create: () => {
console.log("Not implemented");
return Promise.resolve({
data: {},
});
},
deleteOne: () => {
console.log("Not implemented");
return Promise.resolve({
data: {},
});
},
getApiUrl: () => "",
}
} satisfies SdkProvider;