OpenPanel/packages/simple-rest/CHANGELOG.md
2024-02-05 10:23:04 +01:00

20 KiB

@refinedev/simple-rest

5.0.1

Patch Changes

5.0.0

Major Changes

4.5.4

Patch Changes

4.5.3

Patch Changes

4.5.2

Patch Changes

  • #5022 80513a4e42f Thanks @BatuhanW! - chore: update README.md

    • fix grammar errors.
    • make all README.md files consistent.
    • add code example code snippets.

4.5.1

Patch Changes

  • #5022 80513a4e42f Thanks @BatuhanW! - chore: update README.md

    • fix grammar errors.
    • make all README.md files consistent.
    • add code example code snippets.

4.5.0

Minor Changes

  • #4177 623691b10f0 Thanks @salihozdemir! - feat: add the abilities to pass custom headers and custom http method to the request

    Example of changing the http method:

    import { useUpdate } from "@refinedev/core";
    
    const { mutate } = useUpdate();
    
    mutate({
        resource: "posts",
        id: 1,
        variables: {
            title: "New title",
        },
        //highlight-start
        meta: {
            method: "put",
        },
        //highlight-end
    });
    

    Example of passing custom headers:

    import { useOne } from "@refinedev/core";
    
    useOne({
        resource: "posts",
        id: 1,
        //highlight-start
        meta: {
            headers: {
                "X-Custom-Header": "Custom header value",
            },
        },
        //highlight-end
    });
    

4.4.0

Minor Changes

  • #4177 623691b10f0 Thanks @salihozdemir! - feat: add the abilities to pass custom headers and custom http method to the request

    Example of changing the http method:

    import { useUpdate } from "@refinedev/core";
    
    const { mutate } = useUpdate();
    
    mutate({
        resource: "posts",
        id: 1,
        variables: {
            title: "New title",
        },
        //highlight-start
        meta: {
            method: "put",
        },
        //highlight-end
    });
    

    Example of passing custom headers:

    import { useOne } from "@refinedev/core";
    
    useOne({
        resource: "posts",
        id: 1,
        //highlight-start
        meta: {
            headers: {
                "X-Custom-Header": "Custom header value",
            },
        },
        //highlight-end
    });
    

4.3.0

Minor Changes

  • #4162 4ebd298fa8a Thanks @alicanerdurmaz! - feat: requiredPackages added to refine.config.js for CLI to automatically install required packages for the project.

4.2.0

Minor Changes

  • #4162 4ebd298fa8a Thanks @alicanerdurmaz! - feat: requiredPackages added to refine.config.js for CLI to automatically install required packages for the project.

4.1.0

Minor Changes

  • Thanks @aliemir, @alicanerdurmaz, @batuhanW, @salihozdemir, @yildirayunlu, @recepkutuk!

    • metaData prop is now deprecated for all data provider methods. Use meta prop instead.

      For backward compatibility, we still support metaData prop with refine v4.

      create: async ({
      -    metaData
      +    meta
      }) => {
          ...
      },
      
    • sort, hasPagination, and metaData parameters of getList method are now deprecated. Use sorters, pagination, and meta parameters instead.

      For backward compatibility, we still support sort, hasPagination and metaData props with refine v4.

      getList: async ({
      -    sort
      +    sorters
      -    hasPagination
      +    pagination: { mode: "off" | "server | "client" }
      -    metaData
      +    meta
      }) => {
          ...
      },
      
  • Thanks @aliemir, @alicanerdurmaz, @batuhanW, @salihozdemir, @yildirayunlu, @recepkutuk! Moving to the @refinedev scope 🎉🎉

    Moved to the @refinedev scope and updated our packages to use the new scope. From now on, all packages will be published under the @refinedev scope with their new names.

    Now, we're also removing the refine prefix from all packages. So, the @pankod/refine-core package is now @refinedev/core, @pankod/refine-antd is now @refinedev/antd, and so on.

Patch Changes

3.39.0

Minor Changes

3.38.0

Minor Changes

3.37.4

Patch Changes

3.37.3

Patch Changes

3.37.2

Patch Changes

3.37.1

Patch Changes

3.37.0

Minor Changes

  • #3062 6c2ed708a9a Thanks @aliemir! - - Moved helpers to separate files and updated the exports to make it compatible with swizzle feature.
    • Added refine.config.js to configure the swizzle feature.
    • stringify helper is now exported from @pankod/refine-simple-rest package.
    • axios instance is now exported from @pankod/refine-simple-rest package to allow users to configure the data provider without adding axios dependency.

3.36.0

Minor Changes

  • #3062 6c2ed708a9a Thanks @aliemir! - - Moved helpers to separate files and updated the exports to make it compatible with swizzle feature.
    • Added refine.config.js to configure the swizzle feature.
    • stringify helper is now exported from @pankod/refine-simple-rest package.
    • axios instance is now exported from @pankod/refine-simple-rest package to allow users to configure the data provider without adding axios dependency.

3.35.2

Patch Changes

3.35.1

Patch Changes

3.35.0

Minor Changes

  • Only or was supported as a conditional filter. Now and and or can be used together and nested. 🚀

    {
      operator: "or",
      value: [
        {
          operator: "and",
          value: [
            {
              field: "name",
              operator: "eq",
              value: "John Doe",
            },
            {
              field: "age",
              operator: "eq",
              value: 30,
            },
          ],
        },
        {
          operator: "and",
          value: [
            {
              field: "name",
              operator: "eq",
              value: "JR Doe",
            },
            {
              field: "age",
              operator: "eq",
              value: 1,
            },
          ],
        },
      ],
    }
    

Patch Changes

  • Fixed using data in axios' delete function

3.34.0

Minor Changes

  • #2751 addff64c77 Thanks @yildirayunlu! - Only or was supported as a conditional filter. Now and and or can be used together and nested. 🚀

    {
      operator: "or",
      value: [
        {
          operator: "and",
          value: [
            {
              field: "name",
              operator: "eq",
              value: "John Doe",
            },
            {
              field: "age",
              operator: "eq",
              value: 30,
            },
          ],
        },
        {
          operator: "and",
          value: [
            {
              field: "name",
              operator: "eq",
              value: "JR Doe",
            },
            {
              field: "age",
              operator: "eq",
              value: 1,
            },
          ],
        },
      ],
    }
    

Patch Changes

3.33.0

Minor Changes

  • Updated dataProvider types with Required utility to mark getMany, createMany, updateMany and deleteMany as implemented.

  • Remove unimplemented createMany, updateMany and deleteMany functions.

3.32.0

Minor Changes

  • #2688 508045ac30 Thanks @aliemir! - Updated dataProvider types with Required utility to mark getMany, createMany, updateMany and deleteMany as implemented.

  • #2688 508045ac30 Thanks @aliemir! - Remove unimplemented createMany, updateMany and deleteMany functions.

3.31.0

Minor Changes

  • Fixed payload data in delete on nestjsx data provider custom method.

3.30.0

Minor Changes

3.29.0

Minor Changes

  • Update type declaration generation with tsc instead of tsup for better navigation throughout projects source code.

3.28.0

Minor Changes

  • #2440 0150dcd070 Thanks @aliemir! - Update type declaration generation with tsc instead of tsup for better navigation throughout projects source code.

3.27.0

Minor Changes

  • All of the refine packages have dependencies on the @pankod/refine-core package. So far we have managed these dependencies with peerDependencies + dependencies but this causes issues like #2183. (having more than one @pankod/refine-core version in node_modules and creating different instances)

    Managing as peerDependencies + devDependencies seems like the best way for now to avoid such issues.

3.26.0

Minor Changes

  • #2217 b4aae00f77 Thanks @omeraplak! - All of the refine packages have dependencies on the @pankod/refine-core package. So far we have managed these dependencies with peerDependencies + dependencies but this causes issues like #2183. (having more than one @pankod/refine-core version in node_modules and creating different instances)

    Managing as peerDependencies + devDependencies seems like the best way for now to avoid such issues.

3.25.6

Patch Changes

  • Updated pagination parameters default values and added hasPagination property to getList method of the data providers.

    Implementation

    Updated the getList method accordingly to the changes in the useTable and useList of @pankod/refine-core. hasPagination is used to disable pagination (defaults to true)

    Use Cases

    For some resources, there might be no support for pagination or users might want to see all of the data without any pagination, prior to these changes this was not supported in refine data providers.

  • Updated dependencies []:

    • @pankod/refine-core@3.36.0

3.25.5

Patch Changes

  • #2050 635cfe9fdb Thanks @ozkalai! - Updated pagination parameters default values and added hasPagination property to getList method of the data providers.

    Implementation

    Updated the getList method accordingly to the changes in the useTable and useList of @pankod/refine-core. hasPagination is used to disable pagination (defaults to true)

    Use Cases

    For some resources, there might be no support for pagination or users might want to see all of the data without any pagination, prior to these changes this was not supported in refine data providers.

  • Updated dependencies [ecde34a9b3, 635cfe9fdb]:

    • @pankod/refine-core@3.35.0

3.25.4

Patch Changes

  • Updated axios version (0.21.4 to 0.26.1). In this version, the way of sending headers has changed as follows.

    // old v0.21.4
    axiosInstance.defaults.headers = { Authorization: `Bearer ${data.jwt}` };
    
    // new v0.26.1
    axiosInstance.defaults.headers.common["Authorization"] = `Bearer ${data.jwt}`;
    
  • Updated dependencies []:

    • @pankod/refine-core@3.29.0

3.25.3

Patch Changes

  • Updated axios version (0.21.4 to 0.26.1). In this version, the way of sending headers has changed as follows.

    // old v0.21.4
    axiosInstance.defaults.headers = { Authorization: `Bearer ${data.jwt}` };
    
    // new v0.26.1
    axiosInstance.defaults.headers.common["Authorization"] = `Bearer ${data.jwt}`;
    
  • Updated dependencies []:

    • @pankod/refine-core@3.28.0

3.25.2

Patch Changes

  • Updated axios version (0.21.4 to 0.26.1). In this version, the way of sending headers has changed as follows.

    // old v0.21.4
    axiosInstance.defaults.headers = { Authorization: `Bearer ${data.jwt}` };
    
    // new v0.26.1
    axiosInstance.defaults.headers.common["Authorization"] = `Bearer ${data.jwt}`;
    
  • Updated dependencies []:

    • @pankod/refine-core@3.27.0

3.25.1

Patch Changes

  • #1899 fbfea418a0 Thanks @yildirayunlu! - Updated axios version (0.21.4 to 0.26.1). In this version, the way of sending headers has changed as follows.

    // old v0.21.4
    axiosInstance.defaults.headers = { Authorization: `Bearer ${data.jwt}` };
    
    // new v0.26.1
    axiosInstance.defaults.headers.common["Authorization"] = `Bearer ${data.jwt}`;
    
  • Updated dependencies [2ba2a96fd2]:

    • @pankod/refine-core@3.26.0

3.22.2

Patch Changes

  • Updated dependencies [2deb19babf]:
    • @pankod/refine-core@3.23.2