@squonk/account-server-client 4.4.0-4-4.2197467763 → 4.4.0-4-4.2200269934
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/dist/api/actions/actions.cjs +4 -4
- package/dist/api/actions/actions.cjs.map +1 -1
- package/dist/api/actions/actions.d.cts +35 -17
- package/dist/api/actions/actions.d.cts.map +1 -1
- package/dist/api/actions/actions.d.ts +35 -17
- package/dist/api/actions/actions.d.ts.map +1 -1
- package/dist/api/actions/actions.fetch.cjs +4 -4
- package/dist/api/actions/actions.fetch.cjs.map +1 -1
- package/dist/api/actions/actions.fetch.d.cts +35 -17
- package/dist/api/actions/actions.fetch.d.cts.map +1 -1
- package/dist/api/actions/actions.fetch.d.ts +35 -17
- package/dist/api/actions/actions.fetch.d.ts.map +1 -1
- package/dist/api/actions/actions.fetch.js +4 -4
- package/dist/api/actions/actions.fetch.js.map +1 -1
- package/dist/api/actions/actions.js +4 -4
- package/dist/api/actions/actions.js.map +1 -1
- package/dist/api/asset/asset.cjs +22 -22
- package/dist/api/asset/asset.cjs.map +1 -1
- package/dist/api/asset/asset.d.cts +76 -40
- package/dist/api/asset/asset.d.cts.map +1 -1
- package/dist/api/asset/asset.d.ts +76 -40
- package/dist/api/asset/asset.d.ts.map +1 -1
- package/dist/api/asset/asset.fetch.cjs +22 -22
- package/dist/api/asset/asset.fetch.cjs.map +1 -1
- package/dist/api/asset/asset.fetch.d.cts +76 -40
- package/dist/api/asset/asset.fetch.d.cts.map +1 -1
- package/dist/api/asset/asset.fetch.d.ts +76 -40
- package/dist/api/asset/asset.fetch.d.ts.map +1 -1
- package/dist/api/asset/asset.fetch.js +22 -22
- package/dist/api/asset/asset.fetch.js.map +1 -1
- package/dist/api/asset/asset.js +22 -22
- package/dist/api/asset/asset.js.map +1 -1
- package/dist/api/charges/charges.cjs +16 -16
- package/dist/api/charges/charges.cjs.map +1 -1
- package/dist/api/charges/charges.d.cts +137 -65
- package/dist/api/charges/charges.d.cts.map +1 -1
- package/dist/api/charges/charges.d.ts +137 -65
- package/dist/api/charges/charges.d.ts.map +1 -1
- package/dist/api/charges/charges.fetch.cjs +16 -16
- package/dist/api/charges/charges.fetch.cjs.map +1 -1
- package/dist/api/charges/charges.fetch.d.cts +137 -65
- package/dist/api/charges/charges.fetch.d.cts.map +1 -1
- package/dist/api/charges/charges.fetch.d.ts +137 -65
- package/dist/api/charges/charges.fetch.d.ts.map +1 -1
- package/dist/api/charges/charges.fetch.js +16 -16
- package/dist/api/charges/charges.fetch.js.map +1 -1
- package/dist/api/charges/charges.js +16 -16
- package/dist/api/charges/charges.js.map +1 -1
- package/dist/api/event-stream/event-stream.cjs +12 -12
- package/dist/api/event-stream/event-stream.cjs.map +1 -1
- package/dist/api/event-stream/event-stream.d.cts +71 -35
- package/dist/api/event-stream/event-stream.d.cts.map +1 -1
- package/dist/api/event-stream/event-stream.d.ts +71 -35
- package/dist/api/event-stream/event-stream.d.ts.map +1 -1
- package/dist/api/event-stream/event-stream.fetch.cjs +12 -12
- package/dist/api/event-stream/event-stream.fetch.cjs.map +1 -1
- package/dist/api/event-stream/event-stream.fetch.d.cts +71 -35
- package/dist/api/event-stream/event-stream.fetch.d.cts.map +1 -1
- package/dist/api/event-stream/event-stream.fetch.d.ts +71 -35
- package/dist/api/event-stream/event-stream.fetch.d.ts.map +1 -1
- package/dist/api/event-stream/event-stream.fetch.js +12 -12
- package/dist/api/event-stream/event-stream.fetch.js.map +1 -1
- package/dist/api/event-stream/event-stream.js +12 -12
- package/dist/api/event-stream/event-stream.js.map +1 -1
- package/dist/api/merchant/merchant.cjs +8 -8
- package/dist/api/merchant/merchant.cjs.map +1 -1
- package/dist/api/merchant/merchant.d.cts +69 -33
- package/dist/api/merchant/merchant.d.cts.map +1 -1
- package/dist/api/merchant/merchant.d.ts +69 -33
- package/dist/api/merchant/merchant.d.ts.map +1 -1
- package/dist/api/merchant/merchant.fetch.cjs +8 -8
- package/dist/api/merchant/merchant.fetch.cjs.map +1 -1
- package/dist/api/merchant/merchant.fetch.d.cts +69 -33
- package/dist/api/merchant/merchant.fetch.d.cts.map +1 -1
- package/dist/api/merchant/merchant.fetch.d.ts +69 -33
- package/dist/api/merchant/merchant.fetch.d.ts.map +1 -1
- package/dist/api/merchant/merchant.fetch.js +8 -8
- package/dist/api/merchant/merchant.fetch.js.map +1 -1
- package/dist/api/merchant/merchant.js +8 -8
- package/dist/api/merchant/merchant.js.map +1 -1
- package/dist/api/organisation/organisation.cjs +18 -18
- package/dist/api/organisation/organisation.cjs.map +1 -1
- package/dist/api/organisation/organisation.d.cts +106 -52
- package/dist/api/organisation/organisation.d.cts.map +1 -1
- package/dist/api/organisation/organisation.d.ts +106 -52
- package/dist/api/organisation/organisation.d.ts.map +1 -1
- package/dist/api/organisation/organisation.fetch.cjs +18 -18
- package/dist/api/organisation/organisation.fetch.cjs.map +1 -1
- package/dist/api/organisation/organisation.fetch.d.cts +106 -52
- package/dist/api/organisation/organisation.fetch.d.cts.map +1 -1
- package/dist/api/organisation/organisation.fetch.d.ts +106 -52
- package/dist/api/organisation/organisation.fetch.d.ts.map +1 -1
- package/dist/api/organisation/organisation.fetch.js +18 -18
- package/dist/api/organisation/organisation.fetch.js.map +1 -1
- package/dist/api/organisation/organisation.js +18 -18
- package/dist/api/organisation/organisation.js.map +1 -1
- package/dist/api/product/product.cjs +30 -30
- package/dist/api/product/product.cjs.map +1 -1
- package/dist/api/product/product.d.cts +208 -100
- package/dist/api/product/product.d.cts.map +1 -1
- package/dist/api/product/product.d.ts +208 -100
- package/dist/api/product/product.d.ts.map +1 -1
- package/dist/api/product/product.fetch.cjs +30 -30
- package/dist/api/product/product.fetch.cjs.map +1 -1
- package/dist/api/product/product.fetch.d.cts +208 -100
- package/dist/api/product/product.fetch.d.cts.map +1 -1
- package/dist/api/product/product.fetch.d.ts +208 -100
- package/dist/api/product/product.fetch.d.ts.map +1 -1
- package/dist/api/product/product.fetch.js +30 -30
- package/dist/api/product/product.fetch.js.map +1 -1
- package/dist/api/product/product.js +30 -30
- package/dist/api/product/product.js.map +1 -1
- package/dist/api/state/state.cjs +4 -4
- package/dist/api/state/state.cjs.map +1 -1
- package/dist/api/state/state.d.cts +35 -17
- package/dist/api/state/state.d.cts.map +1 -1
- package/dist/api/state/state.d.ts +35 -17
- package/dist/api/state/state.d.ts.map +1 -1
- package/dist/api/state/state.fetch.cjs +4 -4
- package/dist/api/state/state.fetch.cjs.map +1 -1
- package/dist/api/state/state.fetch.d.cts +35 -17
- package/dist/api/state/state.fetch.d.cts.map +1 -1
- package/dist/api/state/state.fetch.d.ts +35 -17
- package/dist/api/state/state.fetch.d.ts.map +1 -1
- package/dist/api/state/state.fetch.js +4 -4
- package/dist/api/state/state.fetch.js.map +1 -1
- package/dist/api/state/state.js +4 -4
- package/dist/api/state/state.js.map +1 -1
- package/dist/api/unit/unit.cjs +30 -30
- package/dist/api/unit/unit.cjs.map +1 -1
- package/dist/api/unit/unit.d.cts +144 -72
- package/dist/api/unit/unit.d.cts.map +1 -1
- package/dist/api/unit/unit.d.ts +144 -72
- package/dist/api/unit/unit.d.ts.map +1 -1
- package/dist/api/unit/unit.fetch.cjs +30 -30
- package/dist/api/unit/unit.fetch.cjs.map +1 -1
- package/dist/api/unit/unit.fetch.d.cts +144 -72
- package/dist/api/unit/unit.fetch.d.cts.map +1 -1
- package/dist/api/unit/unit.fetch.d.ts +144 -72
- package/dist/api/unit/unit.fetch.d.ts.map +1 -1
- package/dist/api/unit/unit.fetch.js +30 -30
- package/dist/api/unit/unit.fetch.js.map +1 -1
- package/dist/api/unit/unit.js +30 -30
- package/dist/api/unit/unit.js.map +1 -1
- package/dist/api/user/user.cjs +20 -20
- package/dist/api/user/user.cjs.map +1 -1
- package/dist/api/user/user.d.cts +107 -53
- package/dist/api/user/user.d.cts.map +1 -1
- package/dist/api/user/user.d.ts +107 -53
- package/dist/api/user/user.d.ts.map +1 -1
- package/dist/api/user/user.fetch.cjs +20 -20
- package/dist/api/user/user.fetch.cjs.map +1 -1
- package/dist/api/user/user.fetch.d.cts +107 -53
- package/dist/api/user/user.fetch.d.cts.map +1 -1
- package/dist/api/user/user.fetch.d.ts +107 -53
- package/dist/api/user/user.fetch.d.ts.map +1 -1
- package/dist/api/user/user.fetch.js +20 -20
- package/dist/api/user/user.fetch.js.map +1 -1
- package/dist/api/user/user.js +20 -20
- package/dist/api/user/user.js.map +1 -1
- package/package.json +7 -5
- package/src/api/actions/actions.fetch.ts +103 -12
- package/src/api/actions/actions.ts +103 -12
- package/src/api/asset/asset.fetch.ts +303 -94
- package/src/api/asset/asset.ts +303 -94
- package/src/api/charges/charges.fetch.ts +456 -54
- package/src/api/charges/charges.ts +456 -54
- package/src/api/event-stream/event-stream.fetch.ts +262 -58
- package/src/api/event-stream/event-stream.ts +262 -58
- package/src/api/merchant/merchant.fetch.ts +212 -28
- package/src/api/merchant/merchant.ts +212 -28
- package/src/api/organisation/organisation.fetch.ts +381 -86
- package/src/api/organisation/organisation.ts +381 -86
- package/src/api/product/product.fetch.ts +724 -130
- package/src/api/product/product.ts +724 -130
- package/src/api/state/state.fetch.ts +105 -16
- package/src/api/state/state.ts +105 -16
- package/src/api/unit/unit.fetch.ts +521 -146
- package/src/api/unit/unit.ts +521 -146
- package/src/api/user/user.fetch.ts +401 -101
- package/src/api/user/user.ts +401 -101
- package/tests/README.md +98 -0
- package/tests/component.test.tsx +191 -0
- package/tests/tsconfig.json +7 -0
- package/tests/type-tests.tsx +196 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"charges.fetch.cjs","names":["customFetch","queryFn: QueryFunction<Awaited<ReturnType<typeof getCharges>>>","queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationCharges>>>","queryFn: QueryFunction<Awaited<ReturnType<typeof getProductCharges>>>","queryFn: QueryFunction<Awaited<ReturnType<typeof getUnitCharges>>>"],"sources":["../../../src/api/charges/charges.fetch.ts"],"sourcesContent":["/**\n * Generated by orval v7.17.0 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 4.4\n */\nimport { useQuery, useSuspenseQuery } from \"@tanstack/react-query\";\nimport type {\n InvalidateOptions,\n QueryClient,\n QueryFunction,\n QueryKey,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult,\n} from \"@tanstack/react-query\";\n\nimport type {\n AsError,\n ChargesGetResponse,\n GetChargesParams,\n GetOrganisationChargesParams,\n GetProductChargesParams,\n GetUnitChargesParams,\n OrganisationChargesGetResponse,\n ProductChargesGetResponse,\n UnitChargesGetResponse,\n} from \".././api-schemas\";\n\nimport { customFetch } from \"../../custom-fetch\";\nimport type { ErrorType } from \"../../custom-fetch\";\n\ntype SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];\n\n/**\n * Gets global Charges.\n\nYou need admin rights to use this path.\n\n * @summary Gets charges for all Organisations\n */\nexport type getChargesResponse200 = { data: ChargesGetResponse; status: 200 };\n\nexport type getChargesResponse401 = { data: void; status: 401 };\n\nexport type getChargesResponse403 = { data: AsError; status: 403 };\n\nexport type getChargesResponse404 = { data: AsError; status: 404 };\n\nexport type getChargesResponseSuccess = getChargesResponse200 & { headers: Headers };\nexport type getChargesResponseError = (\n | getChargesResponse401\n | getChargesResponse403\n | getChargesResponse404\n) & { headers: Headers };\n\nexport type getChargesResponse = getChargesResponseSuccess | getChargesResponseError;\n\nexport const getGetChargesUrl = (params?: GetChargesParams) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? \"null\" : value.toString());\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/charges?${stringifiedParams}` : `/charges`;\n};\n\nexport const getCharges = async (\n params?: GetChargesParams,\n options?: RequestInit,\n): Promise<getChargesResponse> => {\n return customFetch<getChargesResponse>(getGetChargesUrl(params), { ...options, method: \"GET\" });\n};\n\nexport const getGetChargesQueryKey = (params?: GetChargesParams) => {\n return [\"account-server\", \"charges\", ...(params ? [params] : [])] as const;\n};\n\nexport const getGetChargesQueryOptions = <\n TData = Awaited<ReturnType<typeof getCharges>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetChargesParams,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetChargesQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getCharges>>> = ({ signal }) =>\n getCharges(params, { signal, ...requestOptions });\n\n return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getCharges>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getCharges>>>;\nexport type GetChargesQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Gets charges for all Organisations\n */\n\nexport function useGetCharges<\n TData = Awaited<ReturnType<typeof getCharges>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetChargesParams,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n },\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetChargesQueryOptions(params, options);\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * @summary Gets charges for all Organisations\n */\nexport const invalidateGetCharges = async (\n queryClient: QueryClient,\n params?: GetChargesParams,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries({ queryKey: getGetChargesQueryKey(params) }, options);\n\n return queryClient;\n};\n\nexport const getGetChargesSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getCharges>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetChargesParams,\n options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetChargesQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getCharges>>> = ({ signal }) =>\n getCharges(params, { signal, ...requestOptions });\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getCharges>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getCharges>>>;\nexport type GetChargesSuspenseQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Gets charges for all Organisations\n */\n\nexport function useGetChargesSuspense<\n TData = Awaited<ReturnType<typeof getCharges>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetChargesParams,\n options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n },\n): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetChargesSuspenseQueryOptions(params, options);\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Gets a Organisation charges.\n\nThe Organisation cannot be the **Default Organisation** and you need to be a member of the Organisation to use this endpoint\n\n * @summary Gets charges for all Units in an Organisation\n */\nexport type getOrganisationChargesResponse200 = {\n data: OrganisationChargesGetResponse;\n status: 200;\n};\n\nexport type getOrganisationChargesResponse401 = { data: void; status: 401 };\n\nexport type getOrganisationChargesResponse403 = { data: AsError; status: 403 };\n\nexport type getOrganisationChargesResponse404 = { data: AsError; status: 404 };\n\nexport type getOrganisationChargesResponseSuccess = getOrganisationChargesResponse200 & {\n headers: Headers;\n};\nexport type getOrganisationChargesResponseError = (\n | getOrganisationChargesResponse401\n | getOrganisationChargesResponse403\n | getOrganisationChargesResponse404\n) & { headers: Headers };\n\nexport type getOrganisationChargesResponse =\n | getOrganisationChargesResponseSuccess\n | getOrganisationChargesResponseError;\n\nexport const getGetOrganisationChargesUrl = (\n orgId: string,\n params?: GetOrganisationChargesParams,\n) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? \"null\" : value.toString());\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0\n ? `/charges/organisation/${orgId}?${stringifiedParams}`\n : `/charges/organisation/${orgId}`;\n};\n\nexport const getOrganisationCharges = async (\n orgId: string,\n params?: GetOrganisationChargesParams,\n options?: RequestInit,\n): Promise<getOrganisationChargesResponse> => {\n return customFetch<getOrganisationChargesResponse>(getGetOrganisationChargesUrl(orgId, params), {\n ...options,\n method: \"GET\",\n });\n};\n\nexport const getGetOrganisationChargesQueryKey = (\n orgId?: string,\n params?: GetOrganisationChargesParams,\n) => {\n return [\"account-server\", \"charges\", \"organisation\", orgId, ...(params ? [params] : [])] as const;\n};\n\nexport const getGetOrganisationChargesQueryOptions = <\n TData = Awaited<ReturnType<typeof getOrganisationCharges>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n params?: GetOrganisationChargesParams,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationChargesQueryKey(orgId, params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationCharges>>> = ({ signal }) =>\n getOrganisationCharges(orgId, params, { signal, ...requestOptions });\n\n return { queryKey, queryFn, enabled: !!orgId, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getOrganisationCharges>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetOrganisationChargesQueryResult = NonNullable<\n Awaited<ReturnType<typeof getOrganisationCharges>>\n>;\nexport type GetOrganisationChargesQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Gets charges for all Units in an Organisation\n */\n\nexport function useGetOrganisationCharges<\n TData = Awaited<ReturnType<typeof getOrganisationCharges>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n params?: GetOrganisationChargesParams,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n },\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetOrganisationChargesQueryOptions(orgId, params, options);\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * @summary Gets charges for all Units in an Organisation\n */\nexport const invalidateGetOrganisationCharges = async (\n queryClient: QueryClient,\n orgId: string,\n params?: GetOrganisationChargesParams,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries(\n { queryKey: getGetOrganisationChargesQueryKey(orgId, params) },\n options,\n );\n\n return queryClient;\n};\n\nexport const getGetOrganisationChargesSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getOrganisationCharges>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n params?: GetOrganisationChargesParams,\n options?: {\n query?: UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getOrganisationCharges>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationChargesQueryKey(orgId, params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationCharges>>> = ({ signal }) =>\n getOrganisationCharges(orgId, params, { signal, ...requestOptions });\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getOrganisationCharges>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetOrganisationChargesSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getOrganisationCharges>>\n>;\nexport type GetOrganisationChargesSuspenseQueryError = ErrorType<void | AsError>;\n\n/**\n * @summary Gets charges for all Units in an Organisation\n */\n\nexport function useGetOrganisationChargesSuspense<\n TData = Awaited<ReturnType<typeof getOrganisationCharges>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n params?: GetOrganisationChargesParams,\n options?: {\n query?: UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getOrganisationCharges>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetOrganisationChargesSuspenseQueryOptions(orgId, params, options);\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Get the charges made against a Product with optional **from** (inclusive) and **until** (exclusive) dates. If no dates are provided, the charges for the current billing period are returned.\n\nDates are interpreted using the Python `dateutil` parser, so the input strings are extremely flexible with, for example, `1 December 2021` as an acceptable input.\n\n**From** must be a date (day) prior to **until**. For example, to see the charges for the 11th July 2022 set **from** to `11 July 2022` and **until** to `12 July 2022`. As an alternative to **From** and **Until** you can provide a **Prior Billing Period**, a value that identifies the prior period to retrieve. A value of `-1` would indicate the *prior period* (month) with an oldest retrieval value of `-23` allowing you to obtain charges for up to two years.\n\nYou need to be part of the **Unit** or **Organisation** to use this method\n * @summary Get charges made against a Product\n */\nexport type getProductChargesResponse200 = { data: ProductChargesGetResponse; status: 200 };\n\nexport type getProductChargesResponse400 = { data: AsError; status: 400 };\n\nexport type getProductChargesResponse401 = { data: void; status: 401 };\n\nexport type getProductChargesResponse403 = { data: AsError; status: 403 };\n\nexport type getProductChargesResponseSuccess = getProductChargesResponse200 & { headers: Headers };\nexport type getProductChargesResponseError = (\n | getProductChargesResponse400\n | getProductChargesResponse401\n | getProductChargesResponse403\n) & { headers: Headers };\n\nexport type getProductChargesResponse =\n | getProductChargesResponseSuccess\n | getProductChargesResponseError;\n\nexport const getGetProductChargesUrl = (productId: string, params?: GetProductChargesParams) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? \"null\" : value.toString());\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0\n ? `/charges/product/${productId}?${stringifiedParams}`\n : `/charges/product/${productId}`;\n};\n\nexport const getProductCharges = async (\n productId: string,\n params?: GetProductChargesParams,\n options?: RequestInit,\n): Promise<getProductChargesResponse> => {\n return customFetch<getProductChargesResponse>(getGetProductChargesUrl(productId, params), {\n ...options,\n method: \"GET\",\n });\n};\n\nexport const getGetProductChargesQueryKey = (\n productId?: string,\n params?: GetProductChargesParams,\n) => {\n return [\"account-server\", \"charges\", \"product\", productId, ...(params ? [params] : [])] as const;\n};\n\nexport const getGetProductChargesQueryOptions = <\n TData = Awaited<ReturnType<typeof getProductCharges>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n params?: GetProductChargesParams,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductChargesQueryKey(productId, params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductCharges>>> = ({ signal }) =>\n getProductCharges(productId, params, { signal, ...requestOptions });\n\n return { queryKey, queryFn, enabled: !!productId, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getProductCharges>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetProductChargesQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProductCharges>>\n>;\nexport type GetProductChargesQueryError = ErrorType<AsError | void>;\n\n/**\n * @summary Get charges made against a Product\n */\n\nexport function useGetProductCharges<\n TData = Awaited<ReturnType<typeof getProductCharges>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n params?: GetProductChargesParams,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n },\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetProductChargesQueryOptions(productId, params, options);\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * @summary Get charges made against a Product\n */\nexport const invalidateGetProductCharges = async (\n queryClient: QueryClient,\n productId: string,\n params?: GetProductChargesParams,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries(\n { queryKey: getGetProductChargesQueryKey(productId, params) },\n options,\n );\n\n return queryClient;\n};\n\nexport const getGetProductChargesSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getProductCharges>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n params?: GetProductChargesParams,\n options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductChargesQueryKey(productId, params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductCharges>>> = ({ signal }) =>\n getProductCharges(productId, params, { signal, ...requestOptions });\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProductCharges>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetProductChargesSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProductCharges>>\n>;\nexport type GetProductChargesSuspenseQueryError = ErrorType<AsError | void>;\n\n/**\n * @summary Get charges made against a Product\n */\n\nexport function useGetProductChargesSuspense<\n TData = Awaited<ReturnType<typeof getProductCharges>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n params?: GetProductChargesParams,\n options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n },\n): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetProductChargesSuspenseQueryOptions(productId, params, options);\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Get the charges made against a Unit with optional **from** (inclusive) and **until** (exclusive) dates. If no dates are provided, the charges for the current billing period are returned.\nDates are interpreted using the Python `dateutil` parser, so the input strings are extremely flexible with, for example, `1 December 2021` as an acceptable input.\n\n**From** must be a date (day) prior to **until**. For example, to see the charges for the 11th July 2022 set **from** to `11 July 2022` and **until** to `12 July 2022`. As an alternative to **From** and **Until** you can provide a **Prior Billing Period**, a value that identifies the prior period to retrieve. A value of `-1` would indicate the *prior period* (month) with an oldest retrieval value of `-23` allowing you to obtain charges for up to two years.\n\nYou need to be part of the **Unit** or **Organisation** to use this method\n * @summary Get charges made against a Unit\n */\nexport type getUnitChargesResponse200 = { data: UnitChargesGetResponse; status: 200 };\n\nexport type getUnitChargesResponse400 = { data: AsError; status: 400 };\n\nexport type getUnitChargesResponse401 = { data: void; status: 401 };\n\nexport type getUnitChargesResponse403 = { data: AsError; status: 403 };\n\nexport type getUnitChargesResponseSuccess = getUnitChargesResponse200 & { headers: Headers };\nexport type getUnitChargesResponseError = (\n | getUnitChargesResponse400\n | getUnitChargesResponse401\n | getUnitChargesResponse403\n) & { headers: Headers };\n\nexport type getUnitChargesResponse = getUnitChargesResponseSuccess | getUnitChargesResponseError;\n\nexport const getGetUnitChargesUrl = (unitId: string, params?: GetUnitChargesParams) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? \"null\" : value.toString());\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0\n ? `/charges/unit/${unitId}?${stringifiedParams}`\n : `/charges/unit/${unitId}`;\n};\n\nexport const getUnitCharges = async (\n unitId: string,\n params?: GetUnitChargesParams,\n options?: RequestInit,\n): Promise<getUnitChargesResponse> => {\n return customFetch<getUnitChargesResponse>(getGetUnitChargesUrl(unitId, params), {\n ...options,\n method: \"GET\",\n });\n};\n\nexport const getGetUnitChargesQueryKey = (unitId?: string, params?: GetUnitChargesParams) => {\n return [\"account-server\", \"charges\", \"unit\", unitId, ...(params ? [params] : [])] as const;\n};\n\nexport const getGetUnitChargesQueryOptions = <\n TData = Awaited<ReturnType<typeof getUnitCharges>>,\n TError = ErrorType<AsError | void>,\n>(\n unitId: string,\n params?: GetUnitChargesParams,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUnitChargesQueryKey(unitId, params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUnitCharges>>> = ({ signal }) =>\n getUnitCharges(unitId, params, { signal, ...requestOptions });\n\n return { queryKey, queryFn, enabled: !!unitId, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getUnitCharges>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetUnitChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getUnitCharges>>>;\nexport type GetUnitChargesQueryError = ErrorType<AsError | void>;\n\n/**\n * @summary Get charges made against a Unit\n */\n\nexport function useGetUnitCharges<\n TData = Awaited<ReturnType<typeof getUnitCharges>>,\n TError = ErrorType<AsError | void>,\n>(\n unitId: string,\n params?: GetUnitChargesParams,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n },\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetUnitChargesQueryOptions(unitId, params, options);\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * @summary Get charges made against a Unit\n */\nexport const invalidateGetUnitCharges = async (\n queryClient: QueryClient,\n unitId: string,\n params?: GetUnitChargesParams,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries(\n { queryKey: getGetUnitChargesQueryKey(unitId, params) },\n options,\n );\n\n return queryClient;\n};\n\nexport const getGetUnitChargesSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getUnitCharges>>,\n TError = ErrorType<AsError | void>,\n>(\n unitId: string,\n params?: GetUnitChargesParams,\n options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUnitChargesQueryKey(unitId, params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUnitCharges>>> = ({ signal }) =>\n getUnitCharges(unitId, params, { signal, ...requestOptions });\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getUnitCharges>>,\n TError,\n TData\n > & { queryKey: QueryKey };\n};\n\nexport type GetUnitChargesSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getUnitCharges>>\n>;\nexport type GetUnitChargesSuspenseQueryError = ErrorType<AsError | void>;\n\n/**\n * @summary Get charges made against a Unit\n */\n\nexport function useGetUnitChargesSuspense<\n TData = Awaited<ReturnType<typeof getUnitCharges>>,\n TError = ErrorType<AsError | void>,\n>(\n unitId: string,\n params?: GetUnitChargesParams,\n options?: {\n query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>;\n request?: SecondParameter<typeof customFetch>;\n },\n): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } {\n const queryOptions = getGetUnitChargesSuspenseQueryOptions(unitId, params, options);\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n"],"mappings":";;;;;;;;;;;;;;;AA+DA,MAAa,oBAAoB,WAA8B;CAC7D,MAAM,mBAAmB,IAAI,iBAAiB;AAE9C,QAAO,QAAQ,UAAU,EAAE,CAAC,CAAC,SAAS,CAAC,KAAK,WAAW;AACrD,MAAI,UAAU,OACZ,kBAAiB,OAAO,KAAK,UAAU,OAAO,SAAS,MAAM,UAAU,CAAC;GAE1E;CAEF,MAAM,oBAAoB,iBAAiB,UAAU;AAErD,QAAO,kBAAkB,SAAS,IAAI,YAAY,sBAAsB;;AAG1E,MAAa,aAAa,OACxB,QACA,YACgC;AAChC,QAAOA,iCAAgC,iBAAiB,OAAO,EAAE;EAAE,GAAG;EAAS,QAAQ;EAAO,CAAC;;AAGjG,MAAa,yBAAyB,WAA8B;AAClE,QAAO;EAAC;EAAkB;EAAW,GAAI,SAAS,CAAC,OAAO,GAAG,EAAE;EAAE;;AAGnE,MAAa,6BAIX,QACA,YAIG;CACH,MAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,EAAE;CAEtE,MAAM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clE,SAAgB,kBAId,QACA,QACA,SAIwD;CACxD,MAAM,eAAe,8BAA8B,QAAQ,QAAQ,QAAQ;CAE3E,MAAM,6CAAiB,aAAa;AAEpC,OAAM,WAAW,aAAa;AAE9B,QAAO;;;;;AAMT,MAAa,2BAA2B,OACtC,aACA,QACA,QACA,YACyB;AACzB,OAAM,YAAY,kBAChB,EAAE,UAAU,0BAA0B,QAAQ,OAAO,EAAE,EACvD,QACD;AAED,QAAO;;AAGT,MAAa,yCAIX,QACA,QACA,YAIG;CACH,MAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,EAAE;CAEtE,MAAM,WAAW,cAAc,YAAY,0BAA0B,QAAQ,OAAO;CAEpF,MAAMA,WAAsE,EAAE,aAC5E,eAAe,QAAQ,QAAQ;EAAE;EAAQ,GAAG;EAAgB,CAAC;AAE/D,QAAO;EAAE;EAAU;EAAS,GAAG;EAAc;;;;;AAgB/C,SAAgB,0BAId,QACA,QACA,SAIgE;CAChE,MAAM,eAAe,sCAAsC,QAAQ,QAAQ,QAAQ;CAEnF,MAAM,qDAAyB,aAAa;AAI5C,OAAM,WAAW,aAAa;AAE9B,QAAO"}
|
|
1
|
+
{"version":3,"file":"charges.fetch.cjs","names":["customFetch","queryFn: QueryFunction<Awaited<ReturnType<typeof getCharges>>>","queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationCharges>>>","queryFn: QueryFunction<Awaited<ReturnType<typeof getProductCharges>>>","queryFn: QueryFunction<Awaited<ReturnType<typeof getUnitCharges>>>"],"sources":["../../../src/api/charges/charges.fetch.ts"],"sourcesContent":["/**\n * Generated by orval v7.17.0 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 4.4\n */\nimport { useQuery, useSuspenseQuery } from \"@tanstack/react-query\";\nimport type {\n DataTag,\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n InvalidateOptions,\n QueryClient,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult,\n} from \"@tanstack/react-query\";\n\nimport type {\n AsError,\n ChargesGetResponse,\n GetChargesParams,\n GetOrganisationChargesParams,\n GetProductChargesParams,\n GetUnitChargesParams,\n OrganisationChargesGetResponse,\n ProductChargesGetResponse,\n UnitChargesGetResponse,\n} from \".././api-schemas\";\n\nimport { customFetch } from \"../../custom-fetch\";\nimport type { ErrorType } from \"../../custom-fetch\";\n\ntype SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];\n\n/**\n * Gets global Charges.\n\nYou need admin rights to use this path.\n\n * @summary Gets charges for all Organisations\n */\nexport type getChargesResponse200 = { data: ChargesGetResponse; status: 200 };\n\nexport type getChargesResponse401 = { data: void; status: 401 };\n\nexport type getChargesResponse403 = { data: AsError; status: 403 };\n\nexport type getChargesResponse404 = { data: AsError; status: 404 };\n\nexport type getChargesResponseSuccess = getChargesResponse200 & { headers: Headers };\nexport type getChargesResponseError = (\n | getChargesResponse401\n | getChargesResponse403\n | getChargesResponse404\n) & { headers: Headers };\n\nexport type getChargesResponse = getChargesResponseSuccess | getChargesResponseError;\n\nexport const getGetChargesUrl = (params?: GetChargesParams) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? \"null\" : value.toString());\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0 ? `/charges?${stringifiedParams}` : `/charges`;\n};\n\nexport const getCharges = async (\n params?: GetChargesParams,\n options?: RequestInit,\n): Promise<getChargesResponse> => {\n return customFetch<getChargesResponse>(getGetChargesUrl(params), { ...options, method: \"GET\" });\n};\n\nexport const getGetChargesQueryKey = (params?: GetChargesParams) => {\n return [\"account-server\", \"charges\", ...(params ? [params] : [])] as const;\n};\n\nexport const getGetChargesQueryOptions = <\n TData = Awaited<ReturnType<typeof getCharges>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetChargesParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>;\n request?: SecondParameter<typeof customFetch>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetChargesQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getCharges>>> = ({ signal }) =>\n getCharges(params, { signal, ...requestOptions });\n\n return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getCharges>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getCharges>>>;\nexport type GetChargesQueryError = ErrorType<void | AsError>;\n\nexport function useGetCharges<\n TData = Awaited<ReturnType<typeof getCharges>>,\n TError = ErrorType<void | AsError>,\n>(\n params: undefined | GetChargesParams,\n options: {\n query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>> &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getCharges>>,\n TError,\n Awaited<ReturnType<typeof getCharges>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetCharges<\n TData = Awaited<ReturnType<typeof getCharges>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetChargesParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>> &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getCharges>>,\n TError,\n Awaited<ReturnType<typeof getCharges>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetCharges<\n TData = Awaited<ReturnType<typeof getCharges>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetChargesParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets charges for all Organisations\n */\n\nexport function useGetCharges<\n TData = Awaited<ReturnType<typeof getCharges>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetChargesParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetChargesQueryOptions(params, options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * @summary Gets charges for all Organisations\n */\nexport const invalidateGetCharges = async (\n queryClient: QueryClient,\n params?: GetChargesParams,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries({ queryKey: getGetChargesQueryKey(params) }, options);\n\n return queryClient;\n};\n\nexport const getGetChargesSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getCharges>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetChargesParams,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>;\n request?: SecondParameter<typeof customFetch>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetChargesQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getCharges>>> = ({ signal }) =>\n getCharges(params, { signal, ...requestOptions });\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getCharges>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getCharges>>>;\nexport type GetChargesSuspenseQueryError = ErrorType<void | AsError>;\n\nexport function useGetChargesSuspense<\n TData = Awaited<ReturnType<typeof getCharges>>,\n TError = ErrorType<void | AsError>,\n>(\n params: undefined | GetChargesParams,\n options: {\n query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetChargesSuspense<\n TData = Awaited<ReturnType<typeof getCharges>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetChargesParams,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetChargesSuspense<\n TData = Awaited<ReturnType<typeof getCharges>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetChargesParams,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets charges for all Organisations\n */\n\nexport function useGetChargesSuspense<\n TData = Awaited<ReturnType<typeof getCharges>>,\n TError = ErrorType<void | AsError>,\n>(\n params?: GetChargesParams,\n options?: {\n query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetChargesSuspenseQueryOptions(params, options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Gets a Organisation charges.\n\nThe Organisation cannot be the **Default Organisation** and you need to be a member of the Organisation to use this endpoint\n\n * @summary Gets charges for all Units in an Organisation\n */\nexport type getOrganisationChargesResponse200 = {\n data: OrganisationChargesGetResponse;\n status: 200;\n};\n\nexport type getOrganisationChargesResponse401 = { data: void; status: 401 };\n\nexport type getOrganisationChargesResponse403 = { data: AsError; status: 403 };\n\nexport type getOrganisationChargesResponse404 = { data: AsError; status: 404 };\n\nexport type getOrganisationChargesResponseSuccess = getOrganisationChargesResponse200 & {\n headers: Headers;\n};\nexport type getOrganisationChargesResponseError = (\n | getOrganisationChargesResponse401\n | getOrganisationChargesResponse403\n | getOrganisationChargesResponse404\n) & { headers: Headers };\n\nexport type getOrganisationChargesResponse =\n | getOrganisationChargesResponseSuccess\n | getOrganisationChargesResponseError;\n\nexport const getGetOrganisationChargesUrl = (\n orgId: string,\n params?: GetOrganisationChargesParams,\n) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? \"null\" : value.toString());\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0\n ? `/charges/organisation/${orgId}?${stringifiedParams}`\n : `/charges/organisation/${orgId}`;\n};\n\nexport const getOrganisationCharges = async (\n orgId: string,\n params?: GetOrganisationChargesParams,\n options?: RequestInit,\n): Promise<getOrganisationChargesResponse> => {\n return customFetch<getOrganisationChargesResponse>(getGetOrganisationChargesUrl(orgId, params), {\n ...options,\n method: \"GET\",\n });\n};\n\nexport const getGetOrganisationChargesQueryKey = (\n orgId?: string,\n params?: GetOrganisationChargesParams,\n) => {\n return [\"account-server\", \"charges\", \"organisation\", orgId, ...(params ? [params] : [])] as const;\n};\n\nexport const getGetOrganisationChargesQueryOptions = <\n TData = Awaited<ReturnType<typeof getOrganisationCharges>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n params?: GetOrganisationChargesParams,\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationChargesQueryKey(orgId, params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationCharges>>> = ({ signal }) =>\n getOrganisationCharges(orgId, params, { signal, ...requestOptions });\n\n return { queryKey, queryFn, enabled: !!orgId, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getOrganisationCharges>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetOrganisationChargesQueryResult = NonNullable<\n Awaited<ReturnType<typeof getOrganisationCharges>>\n>;\nexport type GetOrganisationChargesQueryError = ErrorType<void | AsError>;\n\nexport function useGetOrganisationCharges<\n TData = Awaited<ReturnType<typeof getOrganisationCharges>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n params: undefined | GetOrganisationChargesParams,\n options: {\n query: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>\n > &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getOrganisationCharges>>,\n TError,\n Awaited<ReturnType<typeof getOrganisationCharges>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetOrganisationCharges<\n TData = Awaited<ReturnType<typeof getOrganisationCharges>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n params?: GetOrganisationChargesParams,\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>\n > &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getOrganisationCharges>>,\n TError,\n Awaited<ReturnType<typeof getOrganisationCharges>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetOrganisationCharges<\n TData = Awaited<ReturnType<typeof getOrganisationCharges>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n params?: GetOrganisationChargesParams,\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets charges for all Units in an Organisation\n */\n\nexport function useGetOrganisationCharges<\n TData = Awaited<ReturnType<typeof getOrganisationCharges>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n params?: GetOrganisationChargesParams,\n options?: {\n query?: Partial<\n UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetOrganisationChargesQueryOptions(orgId, params, options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * @summary Gets charges for all Units in an Organisation\n */\nexport const invalidateGetOrganisationCharges = async (\n queryClient: QueryClient,\n orgId: string,\n params?: GetOrganisationChargesParams,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries(\n { queryKey: getGetOrganisationChargesQueryKey(orgId, params) },\n options,\n );\n\n return queryClient;\n};\n\nexport const getGetOrganisationChargesSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getOrganisationCharges>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n params?: GetOrganisationChargesParams,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationChargesQueryKey(orgId, params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationCharges>>> = ({ signal }) =>\n getOrganisationCharges(orgId, params, { signal, ...requestOptions });\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getOrganisationCharges>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetOrganisationChargesSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getOrganisationCharges>>\n>;\nexport type GetOrganisationChargesSuspenseQueryError = ErrorType<void | AsError>;\n\nexport function useGetOrganisationChargesSuspense<\n TData = Awaited<ReturnType<typeof getOrganisationCharges>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n params: undefined | GetOrganisationChargesParams,\n options: {\n query: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetOrganisationChargesSuspense<\n TData = Awaited<ReturnType<typeof getOrganisationCharges>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n params?: GetOrganisationChargesParams,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetOrganisationChargesSuspense<\n TData = Awaited<ReturnType<typeof getOrganisationCharges>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n params?: GetOrganisationChargesParams,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Gets charges for all Units in an Organisation\n */\n\nexport function useGetOrganisationChargesSuspense<\n TData = Awaited<ReturnType<typeof getOrganisationCharges>>,\n TError = ErrorType<void | AsError>,\n>(\n orgId: string,\n params?: GetOrganisationChargesParams,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetOrganisationChargesSuspenseQueryOptions(orgId, params, options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Get the charges made against a Product with optional **from** (inclusive) and **until** (exclusive) dates. If no dates are provided, the charges for the current billing period are returned.\n\nDates are interpreted using the Python `dateutil` parser, so the input strings are extremely flexible with, for example, `1 December 2021` as an acceptable input.\n\n**From** must be a date (day) prior to **until**. For example, to see the charges for the 11th July 2022 set **from** to `11 July 2022` and **until** to `12 July 2022`. As an alternative to **From** and **Until** you can provide a **Prior Billing Period**, a value that identifies the prior period to retrieve. A value of `-1` would indicate the *prior period* (month) with an oldest retrieval value of `-23` allowing you to obtain charges for up to two years.\n\nYou need to be part of the **Unit** or **Organisation** to use this method\n * @summary Get charges made against a Product\n */\nexport type getProductChargesResponse200 = { data: ProductChargesGetResponse; status: 200 };\n\nexport type getProductChargesResponse400 = { data: AsError; status: 400 };\n\nexport type getProductChargesResponse401 = { data: void; status: 401 };\n\nexport type getProductChargesResponse403 = { data: AsError; status: 403 };\n\nexport type getProductChargesResponseSuccess = getProductChargesResponse200 & { headers: Headers };\nexport type getProductChargesResponseError = (\n | getProductChargesResponse400\n | getProductChargesResponse401\n | getProductChargesResponse403\n) & { headers: Headers };\n\nexport type getProductChargesResponse =\n | getProductChargesResponseSuccess\n | getProductChargesResponseError;\n\nexport const getGetProductChargesUrl = (productId: string, params?: GetProductChargesParams) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? \"null\" : value.toString());\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0\n ? `/charges/product/${productId}?${stringifiedParams}`\n : `/charges/product/${productId}`;\n};\n\nexport const getProductCharges = async (\n productId: string,\n params?: GetProductChargesParams,\n options?: RequestInit,\n): Promise<getProductChargesResponse> => {\n return customFetch<getProductChargesResponse>(getGetProductChargesUrl(productId, params), {\n ...options,\n method: \"GET\",\n });\n};\n\nexport const getGetProductChargesQueryKey = (\n productId?: string,\n params?: GetProductChargesParams,\n) => {\n return [\"account-server\", \"charges\", \"product\", productId, ...(params ? [params] : [])] as const;\n};\n\nexport const getGetProductChargesQueryOptions = <\n TData = Awaited<ReturnType<typeof getProductCharges>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n params?: GetProductChargesParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>;\n request?: SecondParameter<typeof customFetch>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductChargesQueryKey(productId, params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductCharges>>> = ({ signal }) =>\n getProductCharges(productId, params, { signal, ...requestOptions });\n\n return { queryKey, queryFn, enabled: !!productId, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getProductCharges>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetProductChargesQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProductCharges>>\n>;\nexport type GetProductChargesQueryError = ErrorType<AsError | void>;\n\nexport function useGetProductCharges<\n TData = Awaited<ReturnType<typeof getProductCharges>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n params: undefined | GetProductChargesParams,\n options: {\n query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>> &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProductCharges>>,\n TError,\n Awaited<ReturnType<typeof getProductCharges>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetProductCharges<\n TData = Awaited<ReturnType<typeof getProductCharges>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n params?: GetProductChargesParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>> &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getProductCharges>>,\n TError,\n Awaited<ReturnType<typeof getProductCharges>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetProductCharges<\n TData = Awaited<ReturnType<typeof getProductCharges>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n params?: GetProductChargesParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Get charges made against a Product\n */\n\nexport function useGetProductCharges<\n TData = Awaited<ReturnType<typeof getProductCharges>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n params?: GetProductChargesParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetProductChargesQueryOptions(productId, params, options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * @summary Get charges made against a Product\n */\nexport const invalidateGetProductCharges = async (\n queryClient: QueryClient,\n productId: string,\n params?: GetProductChargesParams,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries(\n { queryKey: getGetProductChargesQueryKey(productId, params) },\n options,\n );\n\n return queryClient;\n};\n\nexport const getGetProductChargesSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getProductCharges>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n params?: GetProductChargesParams,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductChargesQueryKey(productId, params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductCharges>>> = ({ signal }) =>\n getProductCharges(productId, params, { signal, ...requestOptions });\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getProductCharges>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetProductChargesSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getProductCharges>>\n>;\nexport type GetProductChargesSuspenseQueryError = ErrorType<AsError | void>;\n\nexport function useGetProductChargesSuspense<\n TData = Awaited<ReturnType<typeof getProductCharges>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n params: undefined | GetProductChargesParams,\n options: {\n query: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetProductChargesSuspense<\n TData = Awaited<ReturnType<typeof getProductCharges>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n params?: GetProductChargesParams,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetProductChargesSuspense<\n TData = Awaited<ReturnType<typeof getProductCharges>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n params?: GetProductChargesParams,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Get charges made against a Product\n */\n\nexport function useGetProductChargesSuspense<\n TData = Awaited<ReturnType<typeof getProductCharges>>,\n TError = ErrorType<AsError | void>,\n>(\n productId: string,\n params?: GetProductChargesParams,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetProductChargesSuspenseQueryOptions(productId, params, options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * Get the charges made against a Unit with optional **from** (inclusive) and **until** (exclusive) dates. If no dates are provided, the charges for the current billing period are returned.\nDates are interpreted using the Python `dateutil` parser, so the input strings are extremely flexible with, for example, `1 December 2021` as an acceptable input.\n\n**From** must be a date (day) prior to **until**. For example, to see the charges for the 11th July 2022 set **from** to `11 July 2022` and **until** to `12 July 2022`. As an alternative to **From** and **Until** you can provide a **Prior Billing Period**, a value that identifies the prior period to retrieve. A value of `-1` would indicate the *prior period* (month) with an oldest retrieval value of `-23` allowing you to obtain charges for up to two years.\n\nYou need to be part of the **Unit** or **Organisation** to use this method\n * @summary Get charges made against a Unit\n */\nexport type getUnitChargesResponse200 = { data: UnitChargesGetResponse; status: 200 };\n\nexport type getUnitChargesResponse400 = { data: AsError; status: 400 };\n\nexport type getUnitChargesResponse401 = { data: void; status: 401 };\n\nexport type getUnitChargesResponse403 = { data: AsError; status: 403 };\n\nexport type getUnitChargesResponseSuccess = getUnitChargesResponse200 & { headers: Headers };\nexport type getUnitChargesResponseError = (\n | getUnitChargesResponse400\n | getUnitChargesResponse401\n | getUnitChargesResponse403\n) & { headers: Headers };\n\nexport type getUnitChargesResponse = getUnitChargesResponseSuccess | getUnitChargesResponseError;\n\nexport const getGetUnitChargesUrl = (unitId: string, params?: GetUnitChargesParams) => {\n const normalizedParams = new URLSearchParams();\n\n Object.entries(params || {}).forEach(([key, value]) => {\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? \"null\" : value.toString());\n }\n });\n\n const stringifiedParams = normalizedParams.toString();\n\n return stringifiedParams.length > 0\n ? `/charges/unit/${unitId}?${stringifiedParams}`\n : `/charges/unit/${unitId}`;\n};\n\nexport const getUnitCharges = async (\n unitId: string,\n params?: GetUnitChargesParams,\n options?: RequestInit,\n): Promise<getUnitChargesResponse> => {\n return customFetch<getUnitChargesResponse>(getGetUnitChargesUrl(unitId, params), {\n ...options,\n method: \"GET\",\n });\n};\n\nexport const getGetUnitChargesQueryKey = (unitId?: string, params?: GetUnitChargesParams) => {\n return [\"account-server\", \"charges\", \"unit\", unitId, ...(params ? [params] : [])] as const;\n};\n\nexport const getGetUnitChargesQueryOptions = <\n TData = Awaited<ReturnType<typeof getUnitCharges>>,\n TError = ErrorType<AsError | void>,\n>(\n unitId: string,\n params?: GetUnitChargesParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>;\n request?: SecondParameter<typeof customFetch>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUnitChargesQueryKey(unitId, params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUnitCharges>>> = ({ signal }) =>\n getUnitCharges(unitId, params, { signal, ...requestOptions });\n\n return { queryKey, queryFn, enabled: !!unitId, ...queryOptions } as UseQueryOptions<\n Awaited<ReturnType<typeof getUnitCharges>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetUnitChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getUnitCharges>>>;\nexport type GetUnitChargesQueryError = ErrorType<AsError | void>;\n\nexport function useGetUnitCharges<\n TData = Awaited<ReturnType<typeof getUnitCharges>>,\n TError = ErrorType<AsError | void>,\n>(\n unitId: string,\n params: undefined | GetUnitChargesParams,\n options: {\n query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>> &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getUnitCharges>>,\n TError,\n Awaited<ReturnType<typeof getUnitCharges>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetUnitCharges<\n TData = Awaited<ReturnType<typeof getUnitCharges>>,\n TError = ErrorType<AsError | void>,\n>(\n unitId: string,\n params?: GetUnitChargesParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>> &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getUnitCharges>>,\n TError,\n Awaited<ReturnType<typeof getUnitCharges>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetUnitCharges<\n TData = Awaited<ReturnType<typeof getUnitCharges>>,\n TError = ErrorType<AsError | void>,\n>(\n unitId: string,\n params?: GetUnitChargesParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Get charges made against a Unit\n */\n\nexport function useGetUnitCharges<\n TData = Awaited<ReturnType<typeof getUnitCharges>>,\n TError = ErrorType<AsError | void>,\n>(\n unitId: string,\n params?: GetUnitChargesParams,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetUnitChargesQueryOptions(unitId, params, options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\n/**\n * @summary Get charges made against a Unit\n */\nexport const invalidateGetUnitCharges = async (\n queryClient: QueryClient,\n unitId: string,\n params?: GetUnitChargesParams,\n options?: InvalidateOptions,\n): Promise<QueryClient> => {\n await queryClient.invalidateQueries(\n { queryKey: getGetUnitChargesQueryKey(unitId, params) },\n options,\n );\n\n return queryClient;\n};\n\nexport const getGetUnitChargesSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getUnitCharges>>,\n TError = ErrorType<AsError | void>,\n>(\n unitId: string,\n params?: GetUnitChargesParams,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUnitChargesQueryKey(unitId, params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUnitCharges>>> = ({ signal }) =>\n getUnitCharges(unitId, params, { signal, ...requestOptions });\n\n return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getUnitCharges>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData> };\n};\n\nexport type GetUnitChargesSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getUnitCharges>>\n>;\nexport type GetUnitChargesSuspenseQueryError = ErrorType<AsError | void>;\n\nexport function useGetUnitChargesSuspense<\n TData = Awaited<ReturnType<typeof getUnitCharges>>,\n TError = ErrorType<AsError | void>,\n>(\n unitId: string,\n params: undefined | GetUnitChargesParams,\n options: {\n query: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetUnitChargesSuspense<\n TData = Awaited<ReturnType<typeof getUnitCharges>>,\n TError = ErrorType<AsError | void>,\n>(\n unitId: string,\n params?: GetUnitChargesParams,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\nexport function useGetUnitChargesSuspense<\n TData = Awaited<ReturnType<typeof getUnitCharges>>,\n TError = ErrorType<AsError | void>,\n>(\n unitId: string,\n params?: GetUnitChargesParams,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> };\n/**\n * @summary Get charges made against a Unit\n */\n\nexport function useGetUnitChargesSuspense<\n TData = Awaited<ReturnType<typeof getUnitCharges>>,\n TError = ErrorType<AsError | void>,\n>(\n unitId: string,\n params?: GetUnitChargesParams,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>\n >;\n request?: SecondParameter<typeof customFetch>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData> } {\n const queryOptions = getGetUnitChargesSuspenseQueryOptions(unitId, params, options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n"],"mappings":";;;;;;;;;;;;;;;AAmEA,MAAa,oBAAoB,WAA8B;CAC7D,MAAM,mBAAmB,IAAI,iBAAiB;AAE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AMA,aACgF;CAChF,MAAM,eAAe,sCAAsC,QAAQ,QAAQ,QAAQ;CAEnF,MAAM,qDAAyB,cAAc,YAAY;AAKzD,OAAM,WAAW,aAAa;AAE9B,QAAO"}
|
|
@@ -8,7 +8,7 @@ import { OrganisationChargesGetResponse } from "../api-schemas/organisationCharg
|
|
|
8
8
|
import { ProductChargesGetResponse } from "../api-schemas/productChargesGetResponse.cjs";
|
|
9
9
|
import { UnitChargesGetResponse } from "../api-schemas/unitChargesGetResponse.cjs";
|
|
10
10
|
import { ErrorType, customFetch } from "../../custom-fetch.cjs";
|
|
11
|
-
import { InvalidateOptions, QueryClient, QueryKey, UseQueryOptions, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult } from "@tanstack/react-query";
|
|
11
|
+
import { DataTag, DefinedInitialDataOptions, DefinedUseQueryResult, InvalidateOptions, QueryClient, QueryKey, UndefinedInitialDataOptions, UseQueryOptions, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult } from "@tanstack/react-query";
|
|
12
12
|
|
|
13
13
|
//#region src/api/charges/charges.fetch.d.ts
|
|
14
14
|
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
@@ -46,42 +46,60 @@ declare const getGetChargesUrl: (params?: GetChargesParams) => string;
|
|
|
46
46
|
declare const getCharges: (params?: GetChargesParams, options?: RequestInit) => Promise<getChargesResponse>;
|
|
47
47
|
declare const getGetChargesQueryKey: (params?: GetChargesParams) => readonly ["account-server", "charges", ...GetChargesParams[]];
|
|
48
48
|
declare const getGetChargesQueryOptions: <TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
|
|
49
|
-
query?: UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData
|
|
49
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>;
|
|
50
50
|
request?: SecondParameter<typeof customFetch>;
|
|
51
51
|
}) => UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData> & {
|
|
52
|
-
queryKey: QueryKey
|
|
52
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
53
53
|
};
|
|
54
54
|
type GetChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getCharges>>>;
|
|
55
55
|
type GetChargesQueryError = ErrorType<void | AsError>;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
declare function useGetCharges<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params: undefined | GetChargesParams, options: {
|
|
57
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getCharges>>, TError, Awaited<ReturnType<typeof getCharges>>>, "initialData">;
|
|
58
|
+
request?: SecondParameter<typeof customFetch>;
|
|
59
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
60
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
61
|
+
};
|
|
62
|
+
declare function useGetCharges<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
|
|
63
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getCharges>>, TError, Awaited<ReturnType<typeof getCharges>>>, "initialData">;
|
|
64
|
+
request?: SecondParameter<typeof customFetch>;
|
|
65
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
66
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
67
|
+
};
|
|
59
68
|
declare function useGetCharges<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
|
|
60
|
-
query?: UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData
|
|
69
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>;
|
|
61
70
|
request?: SecondParameter<typeof customFetch>;
|
|
62
|
-
}): UseQueryResult<TData, TError> & {
|
|
63
|
-
queryKey: QueryKey
|
|
71
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
72
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
64
73
|
};
|
|
65
74
|
/**
|
|
66
75
|
* @summary Gets charges for all Organisations
|
|
67
76
|
*/
|
|
68
77
|
declare const invalidateGetCharges: (queryClient: QueryClient, params?: GetChargesParams, options?: InvalidateOptions) => Promise<QueryClient>;
|
|
69
78
|
declare const getGetChargesSuspenseQueryOptions: <TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
|
|
70
|
-
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData
|
|
79
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>;
|
|
71
80
|
request?: SecondParameter<typeof customFetch>;
|
|
72
81
|
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData> & {
|
|
73
|
-
queryKey: QueryKey
|
|
82
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
74
83
|
};
|
|
75
84
|
type GetChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getCharges>>>;
|
|
76
85
|
type GetChargesSuspenseQueryError = ErrorType<void | AsError>;
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
86
|
+
declare function useGetChargesSuspense<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params: undefined | GetChargesParams, options: {
|
|
87
|
+
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>;
|
|
88
|
+
request?: SecondParameter<typeof customFetch>;
|
|
89
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
90
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
91
|
+
};
|
|
92
|
+
declare function useGetChargesSuspense<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
|
|
93
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>;
|
|
94
|
+
request?: SecondParameter<typeof customFetch>;
|
|
95
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
96
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
97
|
+
};
|
|
80
98
|
declare function useGetChargesSuspense<TData = Awaited<ReturnType<typeof getCharges>>, TError = ErrorType<void | AsError>>(params?: GetChargesParams, options?: {
|
|
81
|
-
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData
|
|
99
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getCharges>>, TError, TData>>;
|
|
82
100
|
request?: SecondParameter<typeof customFetch>;
|
|
83
|
-
}): UseSuspenseQueryResult<TData, TError> & {
|
|
84
|
-
queryKey: QueryKey
|
|
101
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
102
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
85
103
|
};
|
|
86
104
|
/**
|
|
87
105
|
* Gets a Organisation charges.
|
|
@@ -117,42 +135,60 @@ declare const getGetOrganisationChargesUrl: (orgId: string, params?: GetOrganisa
|
|
|
117
135
|
declare const getOrganisationCharges: (orgId: string, params?: GetOrganisationChargesParams, options?: RequestInit) => Promise<getOrganisationChargesResponse>;
|
|
118
136
|
declare const getGetOrganisationChargesQueryKey: (orgId?: string, params?: GetOrganisationChargesParams) => readonly ["account-server", "charges", "organisation", string | undefined, ...GetOrganisationChargesParams[]];
|
|
119
137
|
declare const getGetOrganisationChargesQueryOptions: <TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(orgId: string, params?: GetOrganisationChargesParams, options?: {
|
|
120
|
-
query?: UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData
|
|
138
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>;
|
|
121
139
|
request?: SecondParameter<typeof customFetch>;
|
|
122
140
|
}) => UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData> & {
|
|
123
|
-
queryKey: QueryKey
|
|
141
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
124
142
|
};
|
|
125
143
|
type GetOrganisationChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationCharges>>>;
|
|
126
144
|
type GetOrganisationChargesQueryError = ErrorType<void | AsError>;
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
145
|
+
declare function useGetOrganisationCharges<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(orgId: string, params: undefined | GetOrganisationChargesParams, options: {
|
|
146
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, Awaited<ReturnType<typeof getOrganisationCharges>>>, "initialData">;
|
|
147
|
+
request?: SecondParameter<typeof customFetch>;
|
|
148
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
149
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
150
|
+
};
|
|
151
|
+
declare function useGetOrganisationCharges<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(orgId: string, params?: GetOrganisationChargesParams, options?: {
|
|
152
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, Awaited<ReturnType<typeof getOrganisationCharges>>>, "initialData">;
|
|
153
|
+
request?: SecondParameter<typeof customFetch>;
|
|
154
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
155
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
156
|
+
};
|
|
130
157
|
declare function useGetOrganisationCharges<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(orgId: string, params?: GetOrganisationChargesParams, options?: {
|
|
131
|
-
query?: UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData
|
|
158
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>;
|
|
132
159
|
request?: SecondParameter<typeof customFetch>;
|
|
133
|
-
}): UseQueryResult<TData, TError> & {
|
|
134
|
-
queryKey: QueryKey
|
|
160
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
161
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
135
162
|
};
|
|
136
163
|
/**
|
|
137
164
|
* @summary Gets charges for all Units in an Organisation
|
|
138
165
|
*/
|
|
139
166
|
declare const invalidateGetOrganisationCharges: (queryClient: QueryClient, orgId: string, params?: GetOrganisationChargesParams, options?: InvalidateOptions) => Promise<QueryClient>;
|
|
140
167
|
declare const getGetOrganisationChargesSuspenseQueryOptions: <TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(orgId: string, params?: GetOrganisationChargesParams, options?: {
|
|
141
|
-
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData
|
|
168
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>;
|
|
142
169
|
request?: SecondParameter<typeof customFetch>;
|
|
143
170
|
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData> & {
|
|
144
|
-
queryKey: QueryKey
|
|
171
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
145
172
|
};
|
|
146
173
|
type GetOrganisationChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationCharges>>>;
|
|
147
174
|
type GetOrganisationChargesSuspenseQueryError = ErrorType<void | AsError>;
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
175
|
+
declare function useGetOrganisationChargesSuspense<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(orgId: string, params: undefined | GetOrganisationChargesParams, options: {
|
|
176
|
+
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>;
|
|
177
|
+
request?: SecondParameter<typeof customFetch>;
|
|
178
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
179
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
180
|
+
};
|
|
181
|
+
declare function useGetOrganisationChargesSuspense<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(orgId: string, params?: GetOrganisationChargesParams, options?: {
|
|
182
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>;
|
|
183
|
+
request?: SecondParameter<typeof customFetch>;
|
|
184
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
185
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
186
|
+
};
|
|
151
187
|
declare function useGetOrganisationChargesSuspense<TData = Awaited<ReturnType<typeof getOrganisationCharges>>, TError = ErrorType<void | AsError>>(orgId: string, params?: GetOrganisationChargesParams, options?: {
|
|
152
|
-
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData
|
|
188
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationCharges>>, TError, TData>>;
|
|
153
189
|
request?: SecondParameter<typeof customFetch>;
|
|
154
|
-
}): UseSuspenseQueryResult<TData, TError> & {
|
|
155
|
-
queryKey: QueryKey
|
|
190
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
191
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
156
192
|
};
|
|
157
193
|
/**
|
|
158
194
|
* Get the charges made against a Product with optional **from** (inclusive) and **until** (exclusive) dates. If no dates are provided, the charges for the current billing period are returned.
|
|
@@ -191,42 +227,60 @@ declare const getGetProductChargesUrl: (productId: string, params?: GetProductCh
|
|
|
191
227
|
declare const getProductCharges: (productId: string, params?: GetProductChargesParams, options?: RequestInit) => Promise<getProductChargesResponse>;
|
|
192
228
|
declare const getGetProductChargesQueryKey: (productId?: string, params?: GetProductChargesParams) => readonly ["account-server", "charges", "product", string | undefined, ...GetProductChargesParams[]];
|
|
193
229
|
declare const getGetProductChargesQueryOptions: <TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(productId: string, params?: GetProductChargesParams, options?: {
|
|
194
|
-
query?: UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData
|
|
230
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>;
|
|
195
231
|
request?: SecondParameter<typeof customFetch>;
|
|
196
232
|
}) => UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData> & {
|
|
197
|
-
queryKey: QueryKey
|
|
233
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
198
234
|
};
|
|
199
235
|
type GetProductChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getProductCharges>>>;
|
|
200
236
|
type GetProductChargesQueryError = ErrorType<AsError | void>;
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
237
|
+
declare function useGetProductCharges<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(productId: string, params: undefined | GetProductChargesParams, options: {
|
|
238
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, Awaited<ReturnType<typeof getProductCharges>>>, "initialData">;
|
|
239
|
+
request?: SecondParameter<typeof customFetch>;
|
|
240
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
241
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
242
|
+
};
|
|
243
|
+
declare function useGetProductCharges<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(productId: string, params?: GetProductChargesParams, options?: {
|
|
244
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, Awaited<ReturnType<typeof getProductCharges>>>, "initialData">;
|
|
245
|
+
request?: SecondParameter<typeof customFetch>;
|
|
246
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
247
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
248
|
+
};
|
|
204
249
|
declare function useGetProductCharges<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(productId: string, params?: GetProductChargesParams, options?: {
|
|
205
|
-
query?: UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData
|
|
250
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>;
|
|
206
251
|
request?: SecondParameter<typeof customFetch>;
|
|
207
|
-
}): UseQueryResult<TData, TError> & {
|
|
208
|
-
queryKey: QueryKey
|
|
252
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
253
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
209
254
|
};
|
|
210
255
|
/**
|
|
211
256
|
* @summary Get charges made against a Product
|
|
212
257
|
*/
|
|
213
258
|
declare const invalidateGetProductCharges: (queryClient: QueryClient, productId: string, params?: GetProductChargesParams, options?: InvalidateOptions) => Promise<QueryClient>;
|
|
214
259
|
declare const getGetProductChargesSuspenseQueryOptions: <TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(productId: string, params?: GetProductChargesParams, options?: {
|
|
215
|
-
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData
|
|
260
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>;
|
|
216
261
|
request?: SecondParameter<typeof customFetch>;
|
|
217
262
|
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData> & {
|
|
218
|
-
queryKey: QueryKey
|
|
263
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
219
264
|
};
|
|
220
265
|
type GetProductChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProductCharges>>>;
|
|
221
266
|
type GetProductChargesSuspenseQueryError = ErrorType<AsError | void>;
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
267
|
+
declare function useGetProductChargesSuspense<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(productId: string, params: undefined | GetProductChargesParams, options: {
|
|
268
|
+
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>;
|
|
269
|
+
request?: SecondParameter<typeof customFetch>;
|
|
270
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
271
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
272
|
+
};
|
|
273
|
+
declare function useGetProductChargesSuspense<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(productId: string, params?: GetProductChargesParams, options?: {
|
|
274
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>;
|
|
275
|
+
request?: SecondParameter<typeof customFetch>;
|
|
276
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
277
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
278
|
+
};
|
|
225
279
|
declare function useGetProductChargesSuspense<TData = Awaited<ReturnType<typeof getProductCharges>>, TError = ErrorType<AsError | void>>(productId: string, params?: GetProductChargesParams, options?: {
|
|
226
|
-
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData
|
|
280
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductCharges>>, TError, TData>>;
|
|
227
281
|
request?: SecondParameter<typeof customFetch>;
|
|
228
|
-
}): UseSuspenseQueryResult<TData, TError> & {
|
|
229
|
-
queryKey: QueryKey
|
|
282
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
283
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
230
284
|
};
|
|
231
285
|
/**
|
|
232
286
|
* Get the charges made against a Unit with optional **from** (inclusive) and **until** (exclusive) dates. If no dates are provided, the charges for the current billing period are returned.
|
|
@@ -264,42 +318,60 @@ declare const getGetUnitChargesUrl: (unitId: string, params?: GetUnitChargesPara
|
|
|
264
318
|
declare const getUnitCharges: (unitId: string, params?: GetUnitChargesParams, options?: RequestInit) => Promise<getUnitChargesResponse>;
|
|
265
319
|
declare const getGetUnitChargesQueryKey: (unitId?: string, params?: GetUnitChargesParams) => readonly ["account-server", "charges", "unit", string | undefined, ...GetUnitChargesParams[]];
|
|
266
320
|
declare const getGetUnitChargesQueryOptions: <TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(unitId: string, params?: GetUnitChargesParams, options?: {
|
|
267
|
-
query?: UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData
|
|
321
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>;
|
|
268
322
|
request?: SecondParameter<typeof customFetch>;
|
|
269
323
|
}) => UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData> & {
|
|
270
|
-
queryKey: QueryKey
|
|
324
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
271
325
|
};
|
|
272
326
|
type GetUnitChargesQueryResult = NonNullable<Awaited<ReturnType<typeof getUnitCharges>>>;
|
|
273
327
|
type GetUnitChargesQueryError = ErrorType<AsError | void>;
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
328
|
+
declare function useGetUnitCharges<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(unitId: string, params: undefined | GetUnitChargesParams, options: {
|
|
329
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, Awaited<ReturnType<typeof getUnitCharges>>>, "initialData">;
|
|
330
|
+
request?: SecondParameter<typeof customFetch>;
|
|
331
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
332
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
333
|
+
};
|
|
334
|
+
declare function useGetUnitCharges<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(unitId: string, params?: GetUnitChargesParams, options?: {
|
|
335
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, Awaited<ReturnType<typeof getUnitCharges>>>, "initialData">;
|
|
336
|
+
request?: SecondParameter<typeof customFetch>;
|
|
337
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
338
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
339
|
+
};
|
|
277
340
|
declare function useGetUnitCharges<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(unitId: string, params?: GetUnitChargesParams, options?: {
|
|
278
|
-
query?: UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData
|
|
341
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>;
|
|
279
342
|
request?: SecondParameter<typeof customFetch>;
|
|
280
|
-
}): UseQueryResult<TData, TError> & {
|
|
281
|
-
queryKey: QueryKey
|
|
343
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
344
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
282
345
|
};
|
|
283
346
|
/**
|
|
284
347
|
* @summary Get charges made against a Unit
|
|
285
348
|
*/
|
|
286
349
|
declare const invalidateGetUnitCharges: (queryClient: QueryClient, unitId: string, params?: GetUnitChargesParams, options?: InvalidateOptions) => Promise<QueryClient>;
|
|
287
350
|
declare const getGetUnitChargesSuspenseQueryOptions: <TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(unitId: string, params?: GetUnitChargesParams, options?: {
|
|
288
|
-
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData
|
|
351
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>;
|
|
289
352
|
request?: SecondParameter<typeof customFetch>;
|
|
290
353
|
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData> & {
|
|
291
|
-
queryKey: QueryKey
|
|
354
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
292
355
|
};
|
|
293
356
|
type GetUnitChargesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUnitCharges>>>;
|
|
294
357
|
type GetUnitChargesSuspenseQueryError = ErrorType<AsError | void>;
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
358
|
+
declare function useGetUnitChargesSuspense<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(unitId: string, params: undefined | GetUnitChargesParams, options: {
|
|
359
|
+
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>;
|
|
360
|
+
request?: SecondParameter<typeof customFetch>;
|
|
361
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
362
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
363
|
+
};
|
|
364
|
+
declare function useGetUnitChargesSuspense<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(unitId: string, params?: GetUnitChargesParams, options?: {
|
|
365
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>;
|
|
366
|
+
request?: SecondParameter<typeof customFetch>;
|
|
367
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
368
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
369
|
+
};
|
|
298
370
|
declare function useGetUnitChargesSuspense<TData = Awaited<ReturnType<typeof getUnitCharges>>, TError = ErrorType<AsError | void>>(unitId: string, params?: GetUnitChargesParams, options?: {
|
|
299
|
-
query?: UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData
|
|
371
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnitCharges>>, TError, TData>>;
|
|
300
372
|
request?: SecondParameter<typeof customFetch>;
|
|
301
|
-
}): UseSuspenseQueryResult<TData, TError> & {
|
|
302
|
-
queryKey: QueryKey
|
|
373
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
374
|
+
queryKey: DataTag<QueryKey, TData>;
|
|
303
375
|
};
|
|
304
376
|
//#endregion
|
|
305
377
|
export { GetChargesQueryError, GetChargesQueryResult, GetChargesSuspenseQueryError, GetChargesSuspenseQueryResult, GetOrganisationChargesQueryError, GetOrganisationChargesQueryResult, GetOrganisationChargesSuspenseQueryError, GetOrganisationChargesSuspenseQueryResult, GetProductChargesQueryError, GetProductChargesQueryResult, GetProductChargesSuspenseQueryError, GetProductChargesSuspenseQueryResult, GetUnitChargesQueryError, GetUnitChargesQueryResult, GetUnitChargesSuspenseQueryError, GetUnitChargesSuspenseQueryResult, getCharges, getChargesResponse, getChargesResponse200, getChargesResponse401, getChargesResponse403, getChargesResponse404, getChargesResponseError, getChargesResponseSuccess, getGetChargesQueryKey, getGetChargesQueryOptions, getGetChargesSuspenseQueryOptions, getGetChargesUrl, getGetOrganisationChargesQueryKey, getGetOrganisationChargesQueryOptions, getGetOrganisationChargesSuspenseQueryOptions, getGetOrganisationChargesUrl, getGetProductChargesQueryKey, getGetProductChargesQueryOptions, getGetProductChargesSuspenseQueryOptions, getGetProductChargesUrl, getGetUnitChargesQueryKey, getGetUnitChargesQueryOptions, getGetUnitChargesSuspenseQueryOptions, getGetUnitChargesUrl, getOrganisationCharges, getOrganisationChargesResponse, getOrganisationChargesResponse200, getOrganisationChargesResponse401, getOrganisationChargesResponse403, getOrganisationChargesResponse404, getOrganisationChargesResponseError, getOrganisationChargesResponseSuccess, getProductCharges, getProductChargesResponse, getProductChargesResponse200, getProductChargesResponse400, getProductChargesResponse401, getProductChargesResponse403, getProductChargesResponseError, getProductChargesResponseSuccess, getUnitCharges, getUnitChargesResponse, getUnitChargesResponse200, getUnitChargesResponse400, getUnitChargesResponse401, getUnitChargesResponse403, getUnitChargesResponseError, getUnitChargesResponseSuccess, invalidateGetCharges, invalidateGetOrganisationCharges, invalidateGetProductCharges, invalidateGetUnitCharges, useGetCharges, useGetChargesSuspense, useGetOrganisationCharges, useGetOrganisationChargesSuspense, useGetProductCharges, useGetProductChargesSuspense, useGetUnitCharges, useGetUnitChargesSuspense };
|