@orbe-agro/client-core 5.3.96 → 5.3.97

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.
@@ -1,4 +1,4 @@
1
- export default function useBusinessPartnerById(id: string): {
1
+ export default function useBusinessPartnerById(id: number): {
2
2
  data: import("../../../@types/models/dm/businessPartner").TBusinessPartner | undefined;
3
3
  error: any;
4
4
  isLoading: boolean;
@@ -1,6 +1,6 @@
1
1
  import { IFilterParams, TQueryResponse } from "@base/@types/api";
2
2
  import { TBusinessPartner } from "@base/@types/models/dm/businessPartner";
3
- export declare function apiGetDmBusinessPartner(id: string): Promise<TBusinessPartner>;
3
+ export declare function apiGetDmBusinessPartner(id: number): Promise<TBusinessPartner>;
4
4
  export declare function apiFindDmBusinessPartner(body?: IFilterParams): Promise<TQueryResponse<TBusinessPartner[]>>;
5
5
  export declare function apiFindDmBusinessPartnerCliente(body?: IFilterParams): Promise<TBusinessPartner[] | undefined>;
6
6
  export declare function apiFindDmBusinessPartnerFornecedor(body?: IFilterParams): Promise<TBusinessPartner[] | undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"useBusinessPartnerById.js","sources":["../../../../../lib/base/hooks/dm/businessPartner/useBusinessPartnerById.tsx"],"sourcesContent":["import { apiGetDmBusinessPartner } from '@base/services/modules/dm/businessPartner/BusinessPartnerService';\nimport useSWR from 'swr';\n\nexport default function useBusinessPartnerById(id: string) {\n const { data, error, isLoading, mutate } = useSWR(\n id ? ['/api/dm/business-partner/{id}', id] : null,\n ([, id]) => apiGetDmBusinessPartner(id),\n { revalidateOnFocus: false },\n )\n\n return {\n data,\n error,\n isLoading,\n mutate,\n }\n}\n"],"names":["useBusinessPartnerById","id","data","error","isLoading","mutate","useSWR","apiGetDmBusinessPartner"],"mappings":";;AAGA,SAAwBA,EAAuBC,GAAY;AACvD,QAAM,EAAE,MAAAC,GAAM,OAAAC,GAAO,WAAAC,GAAW,QAAAC,MAAWC;AAAA,IACvCL,IAAK,CAAC,iCAAiCA,CAAE,IAAI;AAAA,IAC7C,CAAC,GAAGA,CAAE,MAAMM,EAAwBN,CAAE;AAAA,IACtC,EAAE,mBAAmB,GAAA;AAAA,EAAM;AAG/B,SAAO;AAAA,IACH,MAAAC;AAAA,IACA,OAAAC;AAAA,IACA,WAAAC;AAAA,IACA,QAAAC;AAAA,EAAA;AAER;"}
1
+ {"version":3,"file":"useBusinessPartnerById.js","sources":["../../../../../lib/base/hooks/dm/businessPartner/useBusinessPartnerById.tsx"],"sourcesContent":["import { apiGetDmBusinessPartner } from '@base/services/modules/dm/businessPartner/BusinessPartnerService';\nimport useSWR from 'swr';\n\nexport default function useBusinessPartnerById(id: number) {\n const { data, error, isLoading, mutate } = useSWR(\n id ? ['/api/dm/business-partner/{id}', id] : null,\n ([, id]) => apiGetDmBusinessPartner(id),\n { revalidateOnFocus: false },\n )\n\n return {\n data,\n error,\n isLoading,\n mutate,\n }\n}\n"],"names":["useBusinessPartnerById","id","data","error","isLoading","mutate","useSWR","apiGetDmBusinessPartner"],"mappings":";;AAGA,SAAwBA,EAAuBC,GAAY;AACvD,QAAM,EAAE,MAAAC,GAAM,OAAAC,GAAO,WAAAC,GAAW,QAAAC,MAAWC;AAAA,IACvCL,IAAK,CAAC,iCAAiCA,CAAE,IAAI;AAAA,IAC7C,CAAC,GAAGA,CAAE,MAAMM,EAAwBN,CAAE;AAAA,IACtC,EAAE,mBAAmB,GAAA;AAAA,EAAM;AAG/B,SAAO;AAAA,IACH,MAAAC;AAAA,IACA,OAAAC;AAAA,IACA,WAAAC;AAAA,IACA,QAAAC;AAAA,EAAA;AAER;"}
@@ -1 +1 @@
1
- {"version":3,"file":"BusinessPartnerService.js","sources":["../../../../../../lib/base/services/modules/dm/businessPartner/BusinessPartnerService.ts"],"sourcesContent":["import ApiService from \"@/services/ApiService\";\nimport { IFilterParams, TQueryResponse } from \"@base/@types/api\";\nimport { TBusinessPartner } from \"@base/@types/models/dm/businessPartner\";\nimport { endpointsConfig } from \"@base/configs\";\n\nconst BUSINESS_PARTNER_ENDPOINT = endpointsConfig.dm.businessPartner;\n\nexport async function apiGetDmBusinessPartner(id: string) {\n return ApiService.fetchDataWithAxios<TBusinessPartner>({\n url: BUSINESS_PARTNER_ENDPOINT.findOne.endpoint + `${id}`,\n method: BUSINESS_PARTNER_ENDPOINT.findOne.method,\n })\n}\n\nexport async function apiFindDmBusinessPartner(body?: IFilterParams) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TBusinessPartner[]>>({\n url: BUSINESS_PARTNER_ENDPOINT.find.endpoint,\n method: BUSINESS_PARTNER_ENDPOINT.find.method,\n data: body,\n })\n}\n\nexport async function apiFindDmBusinessPartnerCliente(body?: IFilterParams) {\n if (!body || Object.keys(body).length === 0) {\n return undefined\n }\n return ApiService.fetchDataWithAxios<TBusinessPartner[]>({\n url: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerCliente.endpoint,\n method: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerCliente.method,\n data: body,\n })\n}\n\nexport async function apiFindDmBusinessPartnerFornecedor(body?: IFilterParams) {\n if (!body || Object.keys(body).length === 0) {\n return undefined\n }\n return ApiService.fetchDataWithAxios<TBusinessPartner[]>({\n url: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerFornecedor.endpoint,\n method: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerFornecedor.method,\n data: body,\n })\n}\n\nexport async function apiFindMonitorFornecedor(body?: IFilterParams) {\n return ApiService.fetchDataWithAxios<TQueryResponse<any>>({\n url: BUSINESS_PARTNER_ENDPOINT.findMonitorFornecedor.endpoint,\n method: BUSINESS_PARTNER_ENDPOINT.findMonitorFornecedor.httpMethod,\n data: body,\n })\n}\n\nexport async function apiFindMonitorTransportadora(body?: IFilterParams) {\n return ApiService.fetchDataWithAxios<TQueryResponse<any>>({\n url: BUSINESS_PARTNER_ENDPOINT.findMonitorTransportadora.endpoint,\n method: BUSINESS_PARTNER_ENDPOINT.findMonitorTransportadora.httpMethod,\n data: body,\n })\n}\n\nexport async function apiFindDmBusinessPartnerFiliais(body?: IFilterParams) {\n if (!body || Object.keys(body).length === 0) {\n return undefined\n }\n return ApiService.fetchDataWithAxios<TBusinessPartner[]>({\n url: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerFiliais.endpoint,\n method: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerFiliais.method,\n data: body,\n })\n}\n\nexport async function apiFindDmBusinessPartnerMatrizes(body?: IFilterParams) {\n if (!body || Object.keys(body).length === 0) {\n return undefined\n }\n return ApiService.fetchDataWithAxios<TBusinessPartner[]>({\n url: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerMatrizes.endpoint,\n method: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerMatrizes.method,\n data: body,\n })\n}"],"names":["BUSINESS_PARTNER_ENDPOINT","endpointsConfig","apiGetDmBusinessPartner","id","ApiService","apiFindDmBusinessPartner","body","apiFindDmBusinessPartnerCliente","apiFindDmBusinessPartnerFornecedor","apiFindMonitorFornecedor","apiFindMonitorTransportadora","apiFindDmBusinessPartnerFiliais","apiFindDmBusinessPartnerMatrizes"],"mappings":";;;AAKA,MAAMA,IAA4BC,EAAgB,GAAG;AAErD,eAAsBC,EAAwBC,GAAY;AACtD,SAAOC,EAAW,mBAAqC;AAAA,IACnD,KAAKJ,EAA0B,QAAQ,WAAW,GAAGG,CAAE;AAAA,IACvD,QAAQH,EAA0B,QAAQ;AAAA,EAAA,CAC7C;AACL;AAEA,eAAsBK,EAAyBC,GAAsB;AACjE,SAAOF,EAAW,mBAAuD;AAAA,IACrE,KAAKJ,EAA0B,KAAK;AAAA,IACpC,QAAQA,EAA0B,KAAK;AAAA,IACvC,MAAMM;AAAA,EAAA,CACT;AACL;AAEA,eAAsBC,EAAgCD,GAAsB;AACxE,MAAI,GAACA,KAAQ,OAAO,KAAKA,CAAI,EAAE,WAAW;AAG1C,WAAOF,EAAW,mBAAuC;AAAA,MACrD,KAAKJ,EAA0B,2BAA2B;AAAA,MAC1D,QAAQA,EAA0B,2BAA2B;AAAA,MAC7D,MAAMM;AAAA,IAAA,CACT;AACL;AAEA,eAAsBE,EAAmCF,GAAsB;AAC3E,MAAI,GAACA,KAAQ,OAAO,KAAKA,CAAI,EAAE,WAAW;AAG1C,WAAOF,EAAW,mBAAuC;AAAA,MACrD,KAAKJ,EAA0B,8BAA8B;AAAA,MAC7D,QAAQA,EAA0B,8BAA8B;AAAA,MAChE,MAAMM;AAAA,IAAA,CACT;AACL;AAEA,eAAsBG,EAAyBH,GAAsB;AACjE,SAAOF,EAAW,mBAAwC;AAAA,IACtD,KAAKJ,EAA0B,sBAAsB;AAAA,IACrD,QAAQA,EAA0B,sBAAsB;AAAA,IACxD,MAAMM;AAAA,EAAA,CACT;AACL;AAEA,eAAsBI,EAA6BJ,GAAsB;AACrE,SAAOF,EAAW,mBAAwC;AAAA,IACtD,KAAKJ,EAA0B,0BAA0B;AAAA,IACzD,QAAQA,EAA0B,0BAA0B;AAAA,IAC5D,MAAMM;AAAA,EAAA,CACT;AACL;AAEA,eAAsBK,EAAgCL,GAAsB;AACxE,MAAI,GAACA,KAAQ,OAAO,KAAKA,CAAI,EAAE,WAAW;AAG1C,WAAOF,EAAW,mBAAuC;AAAA,MACrD,KAAKJ,EAA0B,2BAA2B;AAAA,MAC1D,QAAQA,EAA0B,2BAA2B;AAAA,MAC7D,MAAMM;AAAA,IAAA,CACT;AACL;AAEA,eAAsBM,EAAiCN,GAAsB;AACzE,MAAI,GAACA,KAAQ,OAAO,KAAKA,CAAI,EAAE,WAAW;AAG1C,WAAOF,EAAW,mBAAuC;AAAA,MACrD,KAAKJ,EAA0B,4BAA4B;AAAA,MAC3D,QAAQA,EAA0B,4BAA4B;AAAA,MAC9D,MAAMM;AAAA,IAAA,CACT;AACL;"}
1
+ {"version":3,"file":"BusinessPartnerService.js","sources":["../../../../../../lib/base/services/modules/dm/businessPartner/BusinessPartnerService.ts"],"sourcesContent":["import ApiService from \"@/services/ApiService\";\nimport { IFilterParams, TQueryResponse } from \"@base/@types/api\";\nimport { TBusinessPartner } from \"@base/@types/models/dm/businessPartner\";\nimport { endpointsConfig } from \"@base/configs\";\n\nconst BUSINESS_PARTNER_ENDPOINT = endpointsConfig.dm.businessPartner;\n\nexport async function apiGetDmBusinessPartner(id: number) {\n return ApiService.fetchDataWithAxios<TBusinessPartner>({\n url: BUSINESS_PARTNER_ENDPOINT.findOne.endpoint + `${id}`,\n method: BUSINESS_PARTNER_ENDPOINT.findOne.method,\n })\n}\n\nexport async function apiFindDmBusinessPartner(body?: IFilterParams) {\n return ApiService.fetchDataWithAxios<TQueryResponse<TBusinessPartner[]>>({\n url: BUSINESS_PARTNER_ENDPOINT.find.endpoint,\n method: BUSINESS_PARTNER_ENDPOINT.find.method,\n data: body,\n })\n}\n\nexport async function apiFindDmBusinessPartnerCliente(body?: IFilterParams) {\n if (!body || Object.keys(body).length === 0) {\n return undefined\n }\n return ApiService.fetchDataWithAxios<TBusinessPartner[]>({\n url: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerCliente.endpoint,\n method: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerCliente.method,\n data: body,\n })\n}\n\nexport async function apiFindDmBusinessPartnerFornecedor(body?: IFilterParams) {\n if (!body || Object.keys(body).length === 0) {\n return undefined\n }\n return ApiService.fetchDataWithAxios<TBusinessPartner[]>({\n url: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerFornecedor.endpoint,\n method: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerFornecedor.method,\n data: body,\n })\n}\n\nexport async function apiFindMonitorFornecedor(body?: IFilterParams) {\n return ApiService.fetchDataWithAxios<TQueryResponse<any>>({\n url: BUSINESS_PARTNER_ENDPOINT.findMonitorFornecedor.endpoint,\n method: BUSINESS_PARTNER_ENDPOINT.findMonitorFornecedor.httpMethod,\n data: body,\n })\n}\n\nexport async function apiFindMonitorTransportadora(body?: IFilterParams) {\n return ApiService.fetchDataWithAxios<TQueryResponse<any>>({\n url: BUSINESS_PARTNER_ENDPOINT.findMonitorTransportadora.endpoint,\n method: BUSINESS_PARTNER_ENDPOINT.findMonitorTransportadora.httpMethod,\n data: body,\n })\n}\n\nexport async function apiFindDmBusinessPartnerFiliais(body?: IFilterParams) {\n if (!body || Object.keys(body).length === 0) {\n return undefined\n }\n return ApiService.fetchDataWithAxios<TBusinessPartner[]>({\n url: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerFiliais.endpoint,\n method: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerFiliais.method,\n data: body,\n })\n}\n\nexport async function apiFindDmBusinessPartnerMatrizes(body?: IFilterParams) {\n if (!body || Object.keys(body).length === 0) {\n return undefined\n }\n return ApiService.fetchDataWithAxios<TBusinessPartner[]>({\n url: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerMatrizes.endpoint,\n method: BUSINESS_PARTNER_ENDPOINT.findBusinessPartnerMatrizes.method,\n data: body,\n })\n}"],"names":["BUSINESS_PARTNER_ENDPOINT","endpointsConfig","apiGetDmBusinessPartner","id","ApiService","apiFindDmBusinessPartner","body","apiFindDmBusinessPartnerCliente","apiFindDmBusinessPartnerFornecedor","apiFindMonitorFornecedor","apiFindMonitorTransportadora","apiFindDmBusinessPartnerFiliais","apiFindDmBusinessPartnerMatrizes"],"mappings":";;;AAKA,MAAMA,IAA4BC,EAAgB,GAAG;AAErD,eAAsBC,EAAwBC,GAAY;AACtD,SAAOC,EAAW,mBAAqC;AAAA,IACnD,KAAKJ,EAA0B,QAAQ,WAAW,GAAGG,CAAE;AAAA,IACvD,QAAQH,EAA0B,QAAQ;AAAA,EAAA,CAC7C;AACL;AAEA,eAAsBK,EAAyBC,GAAsB;AACjE,SAAOF,EAAW,mBAAuD;AAAA,IACrE,KAAKJ,EAA0B,KAAK;AAAA,IACpC,QAAQA,EAA0B,KAAK;AAAA,IACvC,MAAMM;AAAA,EAAA,CACT;AACL;AAEA,eAAsBC,EAAgCD,GAAsB;AACxE,MAA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7 +1,7 @@
1
1
  import { apiGetDmBusinessPartner } from '@base/services/modules/dm/businessPartner/BusinessPartnerService';
2
2
  import useSWR from 'swr';
3
3
 
4
- export default function useBusinessPartnerById(id: string) {
4
+ export default function useBusinessPartnerById(id: number) {
5
5
  const { data, error, isLoading, mutate } = useSWR(
6
6
  id ? ['/api/dm/business-partner/{id}', id] : null,
7
7
  ([, id]) => apiGetDmBusinessPartner(id),
@@ -5,7 +5,7 @@ import { endpointsConfig } from "@base/configs";
5
5
 
6
6
  const BUSINESS_PARTNER_ENDPOINT = endpointsConfig.dm.businessPartner;
7
7
 
8
- export async function apiGetDmBusinessPartner(id: string) {
8
+ export async function apiGetDmBusinessPartner(id: number) {
9
9
  return ApiService.fetchDataWithAxios<TBusinessPartner>({
10
10
  url: BUSINESS_PARTNER_ENDPOINT.findOne.endpoint + `${id}`,
11
11
  method: BUSINESS_PARTNER_ENDPOINT.findOne.method,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orbe-agro/client-core",
3
- "version": "5.3.96",
3
+ "version": "5.3.97",
4
4
  "description": "Biblioteca principal de componentes e utilidades para os microfrontends do Orbe Agro.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",