@squonk/account-server-client 3.0.0 → 3.1.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/merchant/merchant.ts"],"names":[],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AA4BA,IAAM,eAAe,CAE3B,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAa,QAAQ;AAAA,MAAO;AAAA,IACpC;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,0BAA0B,MAAM;AACzC,SAAO,CAAC,sBAAsB,WAAW;AACzC;AAGG,IAAM,8BAA8B,CAAwF,YAC9H;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,wBAAwB;AAIlE,QAAM,UAAmE,CAAC,EAAE,OAAO,MAAM,aAAa,gBAAgB,MAAM;AAM7H,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAQO,IAAM,kBAAkB,CAC7B,YAE8D;AAE9D,QAAM,eAAe,4BAA4B,OAAO;AAExD,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAIO,IAAM,sCAAsC,CAAwF,YACtI;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,wBAAwB;AAIlE,QAAM,UAAmE,CAAC,EAAE,OAAO,MAAM,aAAa,gBAAgB,MAAM;AAM7H,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAQO,IAAM,0BAA0B,CACrC,YAEsE;AAEtE,QAAM,eAAe,oCAAoC,OAAO;AAEhE,QAAM,QAAQ,iBAAiB,YAAY;AAE3C,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AASO,IAAM,aAAa,CACtB,KACH,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK,aAAa,GAAG;AAAA,MAAI,QAAQ;AAAA,MAAO;AAAA,IAC3C;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,wBAAwB,CAAC,QAAiB;AACnD,SAAO,CAAC,sBAAsB,aAAa,GAAG,EAAE;AAChD;AAGG,IAAM,4BAA4B,CAAqF,KAAa,YACtI;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,sBAAsB,GAAG;AAInE,QAAM,UAAiE,CAAC,EAAE,OAAO,MAAM,WAAW,KAAK,gBAAgB,MAAM;AAM9H,SAAQ,EAAE,UAAU,SAAS,SAAS,CAAC,CAAE,KAAM,GAAG,aAAY;AACjE;AAQO,IAAM,gBAAgB,CAC5B,KAAa,YAEkD;AAE9D,QAAM,eAAe,0BAA0B,KAAI,OAAO;AAE1D,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAIO,IAAM,oCAAoC,CAAqF,KAAa,YAC9I;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,sBAAsB,GAAG;AAInE,QAAM,UAAiE,CAAC,EAAE,OAAO,MAAM,WAAW,KAAK,gBAAgB,MAAM;AAM9H,SAAQ,EAAE,UAAU,SAAS,SAAS,CAAC,CAAE,KAAM,GAAG,aAAY;AACjE;AAQO,IAAM,wBAAwB,CACpC,KAAa,YAE0D;AAEtE,QAAM,eAAe,kCAAkC,KAAI,OAAO;AAElE,QAAM,QAAQ,iBAAiB,YAAY;AAE3C,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT","sourcesContent":["/**\n * Generated by orval v6.25.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: 3.0\n */\nimport {\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n QueryFunction,\n QueryKey,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n AsError,\n MerchantDetail,\n MerchantsGetResponse\n} from '../account-server-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\ntype SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];\n\n\n/**\n * Gets Merchants known to the Account Server\n\nMerchants are software services (SaaS assets) whose facilities are known to and controlled by the Account Server\n\n * @summary Gets all Merchants\n */\nexport const getMerchants = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<MerchantsGetResponse>(\n {url: `/merchant`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetMerchantsQueryKey = () => {\n return [\"account-server-api\", `/merchant`] as const;\n }\n\n \nexport const getGetMerchantsQueryOptions = <TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetMerchantsQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMerchants>>> = ({ signal }) => getMerchants(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetMerchantsQueryResult = NonNullable<Awaited<ReturnType<typeof getMerchants>>>\nexport type GetMerchantsQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets all Merchants\n */\nexport const useGetMerchants = <TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetMerchantsQueryOptions(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\nexport const getGetMerchantsSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>( options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetMerchantsQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMerchants>>> = ({ signal }) => getMerchants(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetMerchantsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getMerchants>>>\nexport type GetMerchantsSuspenseQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets all Merchants\n */\nexport const useGetMerchantsSuspense = <TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>(\n options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetMerchantsSuspenseQueryOptions(options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Gets a known Merchant\n\n * @summary Gets a specific Merchant\n */\nexport const getService = (\n mId: number,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<MerchantDetail>(\n {url: `/merchant/${mId}`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetServiceQueryKey = (mId: number,) => {\n return [\"account-server-api\", `/merchant/${mId}`] as const;\n }\n\n \nexport const getGetServiceQueryOptions = <TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(mId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetServiceQueryKey(mId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getService>>> = ({ signal }) => getService(mId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(mId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetServiceQueryResult = NonNullable<Awaited<ReturnType<typeof getService>>>\nexport type GetServiceQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets a specific Merchant\n */\nexport const useGetService = <TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(\n mId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetServiceQueryOptions(mId,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\nexport const getGetServiceSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(mId: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetServiceQueryKey(mId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getService>>> = ({ signal }) => getService(mId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(mId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetServiceSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getService>>>\nexport type GetServiceSuspenseQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets a specific Merchant\n */\nexport const useGetServiceSuspense = <TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(\n mId: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetServiceSuspenseQueryOptions(mId,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n"]}
1
+ {"version":3,"sources":["../../src/merchant/merchant.ts"],"names":[],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AA4BA,IAAM,eAAe,CAE3B,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAa,QAAQ;AAAA,MAAO;AAAA,IACpC;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,0BAA0B,MAAM;AACzC,SAAO,CAAC,sBAAsB,WAAW;AACzC;AAGG,IAAM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AK,gBAAgB,MAAM;AAM9H,SAAQ,EAAE,UAAU,SAAS,SAAS,CAAC,CAAE,KAAM,GAAG,aAAY;AACjE;AAQO,IAAM,gBAAgB,CAC5B,KAAa,YAEkD;AAE9D,QAAM,eAAe,0BAA0B,KAAI,OAAO;AAE1D,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAIO,IAAM,oCAAoC,CAAqF,KAAa,YAC9I;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,sBAAsB,GAAG;AAInE,QAAM,UAAiE,CAAC,EAAE,OAAO,MAAM,WAAW,KAAK,gBAAgB,MAAM;AAM9H,SAAQ,EAAE,UAAU,SAAS,SAAS,CAAC,CAAE,KAAM,GAAG,aAAY;AACjE;AAQO,IAAM,wBAAwB,CACpC,KAAa,YAE0D;AAEtE,QAAM,eAAe,kCAAkC,KAAI,OAAO;AAElE,QAAM,QAAQ,iBAAiB,YAAY;AAE3C,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT","sourcesContent":["/**\n * Generated by orval v6.25.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: 3.1\n */\nimport {\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n QueryFunction,\n QueryKey,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n AsError,\n MerchantDetail,\n MerchantsGetResponse\n} from '../account-server-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\ntype SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];\n\n\n/**\n * Gets Merchants known to the Account Server\n\nMerchants are software services (SaaS assets) whose facilities are known to and controlled by the Account Server\n\n * @summary Gets all Merchants\n */\nexport const getMerchants = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<MerchantsGetResponse>(\n {url: `/merchant`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetMerchantsQueryKey = () => {\n return [\"account-server-api\", `/merchant`] as const;\n }\n\n \nexport const getGetMerchantsQueryOptions = <TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetMerchantsQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMerchants>>> = ({ signal }) => getMerchants(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetMerchantsQueryResult = NonNullable<Awaited<ReturnType<typeof getMerchants>>>\nexport type GetMerchantsQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets all Merchants\n */\nexport const useGetMerchants = <TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetMerchantsQueryOptions(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\nexport const getGetMerchantsSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>( options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetMerchantsQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMerchants>>> = ({ signal }) => getMerchants(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetMerchantsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getMerchants>>>\nexport type GetMerchantsSuspenseQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets all Merchants\n */\nexport const useGetMerchantsSuspense = <TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>(\n options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetMerchantsSuspenseQueryOptions(options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Gets a known Merchant\n\n * @summary Gets a specific Merchant\n */\nexport const getService = (\n mId: number,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<MerchantDetail>(\n {url: `/merchant/${mId}`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetServiceQueryKey = (mId: number,) => {\n return [\"account-server-api\", `/merchant/${mId}`] as const;\n }\n\n \nexport const getGetServiceQueryOptions = <TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(mId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetServiceQueryKey(mId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getService>>> = ({ signal }) => getService(mId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(mId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetServiceQueryResult = NonNullable<Awaited<ReturnType<typeof getService>>>\nexport type GetServiceQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets a specific Merchant\n */\nexport const useGetService = <TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(\n mId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetServiceQueryOptions(mId,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\nexport const getGetServiceSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(mId: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetServiceQueryKey(mId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getService>>> = ({ signal }) => getService(mId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(mId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetServiceSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getService>>>\nexport type GetServiceSuspenseQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets a specific Merchant\n */\nexport const useGetServiceSuspense = <TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(\n mId: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetServiceSuspenseQueryOptions(mId,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/merchant/merchant.ts"],"sourcesContent":["/**\n * Generated by orval v6.25.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: 3.0\n */\nimport {\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n QueryFunction,\n QueryKey,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n AsError,\n MerchantDetail,\n MerchantsGetResponse\n} from '../account-server-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\ntype SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];\n\n\n/**\n * Gets Merchants known to the Account Server\n\nMerchants are software services (SaaS assets) whose facilities are known to and controlled by the Account Server\n\n * @summary Gets all Merchants\n */\nexport const getMerchants = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<MerchantsGetResponse>(\n {url: `/merchant`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetMerchantsQueryKey = () => {\n return [\"account-server-api\", `/merchant`] as const;\n }\n\n \nexport const getGetMerchantsQueryOptions = <TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetMerchantsQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMerchants>>> = ({ signal }) => getMerchants(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetMerchantsQueryResult = NonNullable<Awaited<ReturnType<typeof getMerchants>>>\nexport type GetMerchantsQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets all Merchants\n */\nexport const useGetMerchants = <TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetMerchantsQueryOptions(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\nexport const getGetMerchantsSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>( options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetMerchantsQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMerchants>>> = ({ signal }) => getMerchants(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetMerchantsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getMerchants>>>\nexport type GetMerchantsSuspenseQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets all Merchants\n */\nexport const useGetMerchantsSuspense = <TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>(\n options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetMerchantsSuspenseQueryOptions(options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Gets a known Merchant\n\n * @summary Gets a specific Merchant\n */\nexport const getService = (\n mId: number,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<MerchantDetail>(\n {url: `/merchant/${mId}`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetServiceQueryKey = (mId: number,) => {\n return [\"account-server-api\", `/merchant/${mId}`] as const;\n }\n\n \nexport const getGetServiceQueryOptions = <TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(mId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetServiceQueryKey(mId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getService>>> = ({ signal }) => getService(mId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(mId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetServiceQueryResult = NonNullable<Awaited<ReturnType<typeof getService>>>\nexport type GetServiceQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets a specific Merchant\n */\nexport const useGetService = <TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(\n mId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetServiceQueryOptions(mId,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\nexport const getGetServiceSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(mId: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetServiceQueryKey(mId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getService>>> = ({ signal }) => getService(mId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(mId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetServiceSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getService>>>\nexport type GetServiceSuspenseQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets a specific Merchant\n */\nexport const useGetServiceSuspense = <TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(\n mId: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetServiceSuspenseQueryOptions(mId,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n"],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AA4BA,IAAM,eAAe,CAE3B,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAa,QAAQ;AAAA,MAAO;AAAA,IACpC;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,0BAA0B,MAAM;AACzC,SAAO,CAAC,sBAAsB,WAAW;AACzC;AAGG,IAAM,8BAA8B,CAAwF,YAC9H;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,wBAAwB;AAIlE,QAAM,UAAmE,CAAC,EAAE,OAAO,MAAM,aAAa,gBAAgB,MAAM;AAM7H,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAQO,IAAM,kBAAkB,CAC7B,YAE8D;AAE9D,QAAM,eAAe,4BAA4B,OAAO;AAExD,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAIO,IAAM,sCAAsC,CAAwF,YACtI;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,wBAAwB;AAIlE,QAAM,UAAmE,CAAC,EAAE,OAAO,MAAM,aAAa,gBAAgB,MAAM;AAM7H,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAQO,IAAM,0BAA0B,CACrC,YAEsE;AAEtE,QAAM,eAAe,oCAA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ACT;","names":[]}
1
+ {"version":3,"sources":["../../src/merchant/merchant.ts"],"sourcesContent":["/**\n * Generated by orval v6.25.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: 3.1\n */\nimport {\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n QueryFunction,\n QueryKey,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n AsError,\n MerchantDetail,\n MerchantsGetResponse\n} from '../account-server-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\ntype SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];\n\n\n/**\n * Gets Merchants known to the Account Server\n\nMerchants are software services (SaaS assets) whose facilities are known to and controlled by the Account Server\n\n * @summary Gets all Merchants\n */\nexport const getMerchants = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<MerchantsGetResponse>(\n {url: `/merchant`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetMerchantsQueryKey = () => {\n return [\"account-server-api\", `/merchant`] as const;\n }\n\n \nexport const getGetMerchantsQueryOptions = <TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetMerchantsQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMerchants>>> = ({ signal }) => getMerchants(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetMerchantsQueryResult = NonNullable<Awaited<ReturnType<typeof getMerchants>>>\nexport type GetMerchantsQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets all Merchants\n */\nexport const useGetMerchants = <TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetMerchantsQueryOptions(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\nexport const getGetMerchantsSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>( options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetMerchantsQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMerchants>>> = ({ signal }) => getMerchants(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetMerchantsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getMerchants>>>\nexport type GetMerchantsSuspenseQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets all Merchants\n */\nexport const useGetMerchantsSuspense = <TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>(\n options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetMerchantsSuspenseQueryOptions(options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Gets a known Merchant\n\n * @summary Gets a specific Merchant\n */\nexport const getService = (\n mId: number,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<MerchantDetail>(\n {url: `/merchant/${mId}`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetServiceQueryKey = (mId: number,) => {\n return [\"account-server-api\", `/merchant/${mId}`] as const;\n }\n\n \nexport const getGetServiceQueryOptions = <TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(mId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetServiceQueryKey(mId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getService>>> = ({ signal }) => getService(mId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(mId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetServiceQueryResult = NonNullable<Awaited<ReturnType<typeof getService>>>\nexport type GetServiceQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets a specific Merchant\n */\nexport const useGetService = <TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(\n mId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetServiceQueryOptions(mId,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\nexport const getGetServiceSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(mId: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetServiceQueryKey(mId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getService>>> = ({ signal }) => getService(mId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(mId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetServiceSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getService>>>\nexport type GetServiceSuspenseQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets a specific Merchant\n */\nexport const useGetServiceSuspense = <TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(\n mId: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetServiceSuspenseQueryOptions(mId,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n"],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AA4BA,IAAM,eAAe,CAE3B,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAa,QAAQ;AAAA,MAAO;AAAA,IACpC;AAAA,IACE;AAAA,EAA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T;AAGG,IAAM,oCAAoC,MAAM;AACnD,SAAO,CAAC,sBAAsB,uBAAuB;AACrD;AAGG,IAAM,wCAAwC,CAAkG,YAClJ;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,kCAAkC;AAI5E,QAAM,UAA6E,CAAC,EAAE,OAAO,MAAM,uBAAuB,gBAAgB,MAAM;AAMjJ,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAQO,IAAM,4BAA4B,CACvC,YAE8D;AAE9D,QAAM,eAAe,sCAAsC,OAAO;AAElE,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAIO,IAAM,gDAAgD,CAAkG,YAC1J;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,kCAAkC;AAI5E,QAAM,UAA6E,CAAC,EAAE,OAAO,MAAM,uBAAuB,gBAAgB,MAAM;AAMjJ,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAQO,IAAM,oCAAoC,CAC/C,YAEsE;AAEtE,QAAM,eAAe,8CAA8C,OAAO;AAE1E,QAAM,QAAQ,iBAAiB,YAAY;AAE3C,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT","sourcesContent":["/**\n * Generated by orval v6.25.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: 3.0\n */\nimport {\n useMutation,\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n MutationFunction,\n QueryFunction,\n QueryKey,\n UseMutationOptions,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n AsError,\n OrganisationAllDetail,\n OrganisationGetDefaultResponse,\n OrganisationPatchBodyBody,\n OrganisationPostBodyBody,\n OrganisationPostResponse,\n OrganisationsGetResponse\n} from '../account-server-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\ntype SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];\n\n\n/**\n * Gets all the Organisations that you are a member of.\n\nYou can see an Organisation if you are a member of it, the owner (creator) of it, or if you are an admin user.\n\n * @summary Gets Organisations\n */\nexport const getOrganisations = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<OrganisationsGetResponse>(\n {url: `/organisation`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetOrganisationsQueryKey = () => {\n return [\"account-server-api\", `/organisation`] as const;\n }\n\n \nexport const getGetOrganisationsQueryOptions = <TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationsQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisations>>> = ({ signal }) => getOrganisations(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetOrganisationsQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisations>>>\nexport type GetOrganisationsQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets Organisations\n */\nexport const useGetOrganisations = <TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetOrganisationsQueryOptions(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\nexport const getGetOrganisationsSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>( options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationsQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisations>>> = ({ signal }) => getOrganisations(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetOrganisationsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisations>>>\nexport type GetOrganisationsSuspenseQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets Organisations\n */\nexport const useGetOrganisationsSuspense = <TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(\n options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetOrganisationsSuspenseQueryOptions(options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Creates a new Organisation.\n\nThe **User** who creates the Organisation becomes the **Owner** of the Organisation. They are considered a *Member* (**User**) of the Organisation but are not present in the list of users, which a separate list of users explicitly added to the Organisation by the Owner or another Organisation User.\n\nYou need admin rights to use this method\n\n * @summary Create a new organisation\n */\nexport const createOrganisation = (\n organisationPostBodyBody: OrganisationPostBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<OrganisationPostResponse>(\n {url: `/organisation`, method: 'POST',\n headers: {'Content-Type': 'application/json', },\n data: organisationPostBodyBody\n },\n options);\n }\n \n\n\nexport const getCreateOrganisationMutationOptions = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createOrganisation>>, TError,{data: OrganisationPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof createOrganisation>>, TError,{data: OrganisationPostBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof createOrganisation>>, {data: OrganisationPostBodyBody}> = (props) => {\n const {data} = props ?? {};\n\n return createOrganisation(data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreateOrganisationMutationResult = NonNullable<Awaited<ReturnType<typeof createOrganisation>>>\n export type CreateOrganisationMutationBody = OrganisationPostBodyBody\n export type CreateOrganisationMutationError = ErrorType<AsError | void>\n\n /**\n * @summary Create a new organisation\n */\nexport const useCreateOrganisation = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createOrganisation>>, TError,{data: OrganisationPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getCreateOrganisationMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Gets an Organisation. To see the Organisation you need admin rights or need to be a member of the Organisation or are its *creator*.\n\nMembers of an Organisation's **Unit** do not have access to the Organisation.\n\n * @summary Gets an Organisation\n */\nexport const getOrganisation = (\n orgId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<OrganisationAllDetail>(\n {url: `/organisation/${orgId}`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetOrganisationQueryKey = (orgId: string,) => {\n return [\"account-server-api\", `/organisation/${orgId}`] as const;\n }\n\n \nexport const getGetOrganisationQueryOptions = <TData = Awaited<ReturnType<typeof getOrganisation>>, TError = ErrorType<void | AsError>>(orgId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationQueryKey(orgId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisation>>> = ({ signal }) => getOrganisation(orgId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(orgId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetOrganisationQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisation>>>\nexport type GetOrganisationQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets an Organisation\n */\nexport const useGetOrganisation = <TData = Awaited<ReturnType<typeof getOrganisation>>, TError = ErrorType<void | AsError>>(\n orgId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetOrganisationQueryOptions(orgId,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\nexport const getGetOrganisationSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getOrganisation>>, TError = ErrorType<void | AsError>>(orgId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationQueryKey(orgId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisation>>> = ({ signal }) => getOrganisation(orgId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(orgId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetOrganisationSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisation>>>\nexport type GetOrganisationSuspenseQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets an Organisation\n */\nexport const useGetOrganisationSuspense = <TData = Awaited<ReturnType<typeof getOrganisation>>, TError = ErrorType<void | AsError>>(\n orgId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetOrganisationSuspenseQueryOptions(orgId,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Used to update existing Organisation.\n\nYou have to be a member of the **Organisation**, its creator, or an administrator to patch an Organisation.\n\n * @summary Adjust an existing Organisation\n */\nexport const patchOrganisation = (\n orgId: string,\n organisationPatchBodyBody: OrganisationPatchBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/organisation/${orgId}`, method: 'PATCH',\n headers: {'Content-Type': 'application/json', },\n data: organisationPatchBodyBody\n },\n options);\n }\n \n\n\nexport const getPatchOrganisationMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchOrganisation>>, TError,{orgId: string;data: OrganisationPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof patchOrganisation>>, TError,{orgId: string;data: OrganisationPatchBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof patchOrganisation>>, {orgId: string;data: OrganisationPatchBodyBody}> = (props) => {\n const {orgId,data} = props ?? {};\n\n return patchOrganisation(orgId,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type PatchOrganisationMutationResult = NonNullable<Awaited<ReturnType<typeof patchOrganisation>>>\n export type PatchOrganisationMutationBody = OrganisationPatchBodyBody\n export type PatchOrganisationMutationError = ErrorType<AsError>\n\n /**\n * @summary Adjust an existing Organisation\n */\nexport const usePatchOrganisation = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchOrganisation>>, TError,{orgId: string;data: OrganisationPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getPatchOrganisationMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Before an Organisation can be deleted all its underlying **Units** must also be deleted, remembering that **Units** that have undeleted **Products** cannot be deleted.\n\nYou need admin rights to use this method\n\n * @summary Deletes an Organisation\n */\nexport const deleteOrganisation = (\n orgId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/organisation/${orgId}`, method: 'DELETE'\n },\n options);\n }\n \n\n\nexport const getDeleteOrganisationMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisation>>, TError,{orgId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisation>>, TError,{orgId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteOrganisation>>, {orgId: string}> = (props) => {\n const {orgId} = props ?? {};\n\n return deleteOrganisation(orgId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteOrganisationMutationResult = NonNullable<Awaited<ReturnType<typeof deleteOrganisation>>>\n \n export type DeleteOrganisationMutationError = ErrorType<AsError>\n\n /**\n * @summary Deletes an Organisation\n */\nexport const useDeleteOrganisation = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisation>>, TError,{orgId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeleteOrganisationMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Gets the Default Organisation, a built-in Organisation used exclusively for **Personal Units**.\n\nAny authorised user can see the Default Organisation.\n\n * @summary Gets the Default Organisation\n */\nexport const getDefaultOrganisation = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<OrganisationGetDefaultResponse>(\n {url: `/organisation/default`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetDefaultOrganisationQueryKey = () => {\n return [\"account-server-api\", `/organisation/default`] as const;\n }\n\n \nexport const getGetDefaultOrganisationQueryOptions = <TData = Awaited<ReturnType<typeof getDefaultOrganisation>>, TError = ErrorType<void | AsError>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetDefaultOrganisationQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getDefaultOrganisation>>> = ({ signal }) => getDefaultOrganisation(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetDefaultOrganisationQueryResult = NonNullable<Awaited<ReturnType<typeof getDefaultOrganisation>>>\nexport type GetDefaultOrganisationQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets the Default Organisation\n */\nexport const useGetDefaultOrganisation = <TData = Awaited<ReturnType<typeof getDefaultOrganisation>>, TError = ErrorType<void | AsError>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetDefaultOrganisationQueryOptions(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\nexport const getGetDefaultOrganisationSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getDefaultOrganisation>>, TError = ErrorType<void | AsError>>( options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetDefaultOrganisationQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getDefaultOrganisation>>> = ({ signal }) => getDefaultOrganisation(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetDefaultOrganisationSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getDefaultOrganisation>>>\nexport type GetDefaultOrganisationSuspenseQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets the Default Organisation\n */\nexport const useGetDefaultOrganisationSuspense = <TData = Awaited<ReturnType<typeof getDefaultOrganisation>>, TError = ErrorType<void | AsError>>(\n options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetDefaultOrganisationSuspenseQueryOptions(options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n"]}
1
+ {"version":3,"sources":["../../src/organisation/organisation.ts"],"names":[],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAkCA,IAAM,mBAAmB,CAE/B,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAiB,QAAQ;AAAA,MAAO;AAAA,IACxC;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,8BAA8B,MAAM;AAC7C,SAAO,CAAC,sBAAsB,eAAe;AAC7C;AAGG,IAAM,kCAAkC,CAA4F,YACtI;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,4BAA4B;AAItE,QAAM,UAAuE,CAAC,EAAE,OAAO,MAAM,iBAAiB,gBAAgB,MAAM;AAMrI,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAQO,IAAM,sBAAsB,CACjC,YAE8D;AAE9D,QAAM,eAAe,gCAAgC,OAAO;AAE5D,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAIO,IAAM,0CAA0C,CAA4F,YAC9I;AAEL,QAAM,EAAC,OAAO,cAAc,S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AE9D,QAAM,eAAe,sCAAsC,OAAO;AAElE,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAIO,IAAM,gDAAgD,CAAkG,YAC1J;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,kCAAkC;AAI5E,QAAM,UAA6E,CAAC,EAAE,OAAO,MAAM,uBAAuB,gBAAgB,MAAM;AAMjJ,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAQO,IAAM,oCAAoC,CAC/C,YAEsE;AAEtE,QAAM,eAAe,8CAA8C,OAAO;AAE1E,QAAM,QAAQ,iBAAiB,YAAY;AAE3C,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT","sourcesContent":["/**\n * Generated by orval v6.25.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: 3.1\n */\nimport {\n useMutation,\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n MutationFunction,\n QueryFunction,\n QueryKey,\n UseMutationOptions,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n AsError,\n OrganisationAllDetail,\n OrganisationGetDefaultResponse,\n OrganisationPatchBodyBody,\n OrganisationPostBodyBody,\n OrganisationPostResponse,\n OrganisationsGetResponse\n} from '../account-server-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\ntype SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];\n\n\n/**\n * Gets all the Organisations that you are a member of.\n\nYou can see an Organisation if you are a member of it, the owner (creator) of it, or if you are an admin user.\n\n * @summary Gets Organisations\n */\nexport const getOrganisations = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<OrganisationsGetResponse>(\n {url: `/organisation`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetOrganisationsQueryKey = () => {\n return [\"account-server-api\", `/organisation`] as const;\n }\n\n \nexport const getGetOrganisationsQueryOptions = <TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationsQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisations>>> = ({ signal }) => getOrganisations(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetOrganisationsQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisations>>>\nexport type GetOrganisationsQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets Organisations\n */\nexport const useGetOrganisations = <TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetOrganisationsQueryOptions(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\nexport const getGetOrganisationsSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>( options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationsQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisations>>> = ({ signal }) => getOrganisations(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetOrganisationsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisations>>>\nexport type GetOrganisationsSuspenseQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets Organisations\n */\nexport const useGetOrganisationsSuspense = <TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(\n options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetOrganisationsSuspenseQueryOptions(options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Creates a new Organisation.\n\nThe **User** who creates the Organisation becomes the **Owner** of the Organisation. They are considered a *Member* (**User**) of the Organisation but are not present in the list of users, which a separate list of users explicitly added to the Organisation by the Owner or another Organisation User.\n\nYou need admin rights to use this method\n\n * @summary Create a new organisation\n */\nexport const createOrganisation = (\n organisationPostBodyBody: OrganisationPostBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<OrganisationPostResponse>(\n {url: `/organisation`, method: 'POST',\n headers: {'Content-Type': 'application/json', },\n data: organisationPostBodyBody\n },\n options);\n }\n \n\n\nexport const getCreateOrganisationMutationOptions = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createOrganisation>>, TError,{data: OrganisationPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof createOrganisation>>, TError,{data: OrganisationPostBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof createOrganisation>>, {data: OrganisationPostBodyBody}> = (props) => {\n const {data} = props ?? {};\n\n return createOrganisation(data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreateOrganisationMutationResult = NonNullable<Awaited<ReturnType<typeof createOrganisation>>>\n export type CreateOrganisationMutationBody = OrganisationPostBodyBody\n export type CreateOrganisationMutationError = ErrorType<AsError | void>\n\n /**\n * @summary Create a new organisation\n */\nexport const useCreateOrganisation = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createOrganisation>>, TError,{data: OrganisationPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getCreateOrganisationMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Gets an Organisation. To see the Organisation you need admin rights or need to be a member of the Organisation or are its *creator*.\n\nMembers of an Organisation's **Unit** do not have access to the Organisation.\n\n * @summary Gets an Organisation\n */\nexport const getOrganisation = (\n orgId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<OrganisationAllDetail>(\n {url: `/organisation/${orgId}`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetOrganisationQueryKey = (orgId: string,) => {\n return [\"account-server-api\", `/organisation/${orgId}`] as const;\n }\n\n \nexport const getGetOrganisationQueryOptions = <TData = Awaited<ReturnType<typeof getOrganisation>>, TError = ErrorType<void | AsError>>(orgId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationQueryKey(orgId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisation>>> = ({ signal }) => getOrganisation(orgId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(orgId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetOrganisationQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisation>>>\nexport type GetOrganisationQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets an Organisation\n */\nexport const useGetOrganisation = <TData = Awaited<ReturnType<typeof getOrganisation>>, TError = ErrorType<void | AsError>>(\n orgId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetOrganisationQueryOptions(orgId,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\nexport const getGetOrganisationSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getOrganisation>>, TError = ErrorType<void | AsError>>(orgId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationQueryKey(orgId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisation>>> = ({ signal }) => getOrganisation(orgId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(orgId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetOrganisationSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisation>>>\nexport type GetOrganisationSuspenseQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets an Organisation\n */\nexport const useGetOrganisationSuspense = <TData = Awaited<ReturnType<typeof getOrganisation>>, TError = ErrorType<void | AsError>>(\n orgId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetOrganisationSuspenseQueryOptions(orgId,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Used to update existing Organisation.\n\nYou have to be a member of the **Organisation**, its creator, or an administrator to patch an Organisation.\n\n * @summary Adjust an existing Organisation\n */\nexport const patchOrganisation = (\n orgId: string,\n organisationPatchBodyBody: OrganisationPatchBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/organisation/${orgId}`, method: 'PATCH',\n headers: {'Content-Type': 'application/json', },\n data: organisationPatchBodyBody\n },\n options);\n }\n \n\n\nexport const getPatchOrganisationMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchOrganisation>>, TError,{orgId: string;data: OrganisationPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof patchOrganisation>>, TError,{orgId: string;data: OrganisationPatchBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof patchOrganisation>>, {orgId: string;data: OrganisationPatchBodyBody}> = (props) => {\n const {orgId,data} = props ?? {};\n\n return patchOrganisation(orgId,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type PatchOrganisationMutationResult = NonNullable<Awaited<ReturnType<typeof patchOrganisation>>>\n export type PatchOrganisationMutationBody = OrganisationPatchBodyBody\n export type PatchOrganisationMutationError = ErrorType<AsError>\n\n /**\n * @summary Adjust an existing Organisation\n */\nexport const usePatchOrganisation = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchOrganisation>>, TError,{orgId: string;data: OrganisationPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getPatchOrganisationMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Before an Organisation can be deleted all its underlying **Units** must also be deleted, remembering that **Units** that have undeleted **Products** cannot be deleted.\n\nYou need admin rights to use this method\n\n * @summary Deletes an Organisation\n */\nexport const deleteOrganisation = (\n orgId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/organisation/${orgId}`, method: 'DELETE'\n },\n options);\n }\n \n\n\nexport const getDeleteOrganisationMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisation>>, TError,{orgId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisation>>, TError,{orgId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteOrganisation>>, {orgId: string}> = (props) => {\n const {orgId} = props ?? {};\n\n return deleteOrganisation(orgId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteOrganisationMutationResult = NonNullable<Awaited<ReturnType<typeof deleteOrganisation>>>\n \n export type DeleteOrganisationMutationError = ErrorType<AsError>\n\n /**\n * @summary Deletes an Organisation\n */\nexport const useDeleteOrganisation = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisation>>, TError,{orgId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeleteOrganisationMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Gets the Default Organisation, a built-in Organisation used exclusively for **Personal Units**.\n\nAny authorised user can see the Default Organisation.\n\n * @summary Gets the Default Organisation\n */\nexport const getDefaultOrganisation = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<OrganisationGetDefaultResponse>(\n {url: `/organisation/default`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetDefaultOrganisationQueryKey = () => {\n return [\"account-server-api\", `/organisation/default`] as const;\n }\n\n \nexport const getGetDefaultOrganisationQueryOptions = <TData = Awaited<ReturnType<typeof getDefaultOrganisation>>, TError = ErrorType<void | AsError>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetDefaultOrganisationQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getDefaultOrganisation>>> = ({ signal }) => getDefaultOrganisation(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetDefaultOrganisationQueryResult = NonNullable<Awaited<ReturnType<typeof getDefaultOrganisation>>>\nexport type GetDefaultOrganisationQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets the Default Organisation\n */\nexport const useGetDefaultOrganisation = <TData = Awaited<ReturnType<typeof getDefaultOrganisation>>, TError = ErrorType<void | AsError>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetDefaultOrganisationQueryOptions(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\nexport const getGetDefaultOrganisationSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getDefaultOrganisation>>, TError = ErrorType<void | AsError>>( options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetDefaultOrganisationQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getDefaultOrganisation>>> = ({ signal }) => getDefaultOrganisation(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetDefaultOrganisationSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getDefaultOrganisation>>>\nexport type GetDefaultOrganisationSuspenseQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets the Default Organisation\n */\nexport const useGetDefaultOrganisationSuspense = <TData = Awaited<ReturnType<typeof getDefaultOrganisation>>, TError = ErrorType<void | AsError>>(\n options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetDefaultOrganisationSuspenseQueryOptions(options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/organisation/organisation.ts"],"sourcesContent":["/**\n * Generated by orval v6.25.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: 3.0\n */\nimport {\n useMutation,\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n MutationFunction,\n QueryFunction,\n QueryKey,\n UseMutationOptions,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n AsError,\n OrganisationAllDetail,\n OrganisationGetDefaultResponse,\n OrganisationPatchBodyBody,\n OrganisationPostBodyBody,\n OrganisationPostResponse,\n OrganisationsGetResponse\n} from '../account-server-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\ntype SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];\n\n\n/**\n * Gets all the Organisations that you are a member of.\n\nYou can see an Organisation if you are a member of it, the owner (creator) of it, or if you are an admin user.\n\n * @summary Gets Organisations\n */\nexport const getOrganisations = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<OrganisationsGetResponse>(\n {url: `/organisation`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetOrganisationsQueryKey = () => {\n return [\"account-server-api\", `/organisation`] as const;\n }\n\n \nexport const getGetOrganisationsQueryOptions = <TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationsQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisations>>> = ({ signal }) => getOrganisations(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetOrganisationsQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisations>>>\nexport type GetOrganisationsQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets Organisations\n */\nexport const useGetOrganisations = <TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetOrganisationsQueryOptions(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\nexport const getGetOrganisationsSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>( options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationsQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisations>>> = ({ signal }) => getOrganisations(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetOrganisationsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisations>>>\nexport type GetOrganisationsSuspenseQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets Organisations\n */\nexport const useGetOrganisationsSuspense = <TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(\n options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetOrganisationsSuspenseQueryOptions(options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Creates a new Organisation.\n\nThe **User** who creates the Organisation becomes the **Owner** of the Organisation. They are considered a *Member* (**User**) of the Organisation but are not present in the list of users, which a separate list of users explicitly added to the Organisation by the Owner or another Organisation User.\n\nYou need admin rights to use this method\n\n * @summary Create a new organisation\n */\nexport const createOrganisation = (\n organisationPostBodyBody: OrganisationPostBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<OrganisationPostResponse>(\n {url: `/organisation`, method: 'POST',\n headers: {'Content-Type': 'application/json', },\n data: organisationPostBodyBody\n },\n options);\n }\n \n\n\nexport const getCreateOrganisationMutationOptions = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createOrganisation>>, TError,{data: OrganisationPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof createOrganisation>>, TError,{data: OrganisationPostBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof createOrganisation>>, {data: OrganisationPostBodyBody}> = (props) => {\n const {data} = props ?? {};\n\n return createOrganisation(data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreateOrganisationMutationResult = NonNullable<Awaited<ReturnType<typeof createOrganisation>>>\n export type CreateOrganisationMutationBody = OrganisationPostBodyBody\n export type CreateOrganisationMutationError = ErrorType<AsError | void>\n\n /**\n * @summary Create a new organisation\n */\nexport const useCreateOrganisation = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createOrganisation>>, TError,{data: OrganisationPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getCreateOrganisationMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Gets an Organisation. To see the Organisation you need admin rights or need to be a member of the Organisation or are its *creator*.\n\nMembers of an Organisation's **Unit** do not have access to the Organisation.\n\n * @summary Gets an Organisation\n */\nexport const getOrganisation = (\n orgId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<OrganisationAllDetail>(\n {url: `/organisation/${orgId}`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetOrganisationQueryKey = (orgId: string,) => {\n return [\"account-server-api\", `/organisation/${orgId}`] as const;\n }\n\n \nexport const getGetOrganisationQueryOptions = <TData = Awaited<ReturnType<typeof getOrganisation>>, TError = ErrorType<void | AsError>>(orgId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationQueryKey(orgId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisation>>> = ({ signal }) => getOrganisation(orgId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(orgId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetOrganisationQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisation>>>\nexport type GetOrganisationQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets an Organisation\n */\nexport const useGetOrganisation = <TData = Awaited<ReturnType<typeof getOrganisation>>, TError = ErrorType<void | AsError>>(\n orgId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetOrganisationQueryOptions(orgId,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\nexport const getGetOrganisationSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getOrganisation>>, TError = ErrorType<void | AsError>>(orgId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationQueryKey(orgId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisation>>> = ({ signal }) => getOrganisation(orgId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(orgId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetOrganisationSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisation>>>\nexport type GetOrganisationSuspenseQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets an Organisation\n */\nexport const useGetOrganisationSuspense = <TData = Awaited<ReturnType<typeof getOrganisation>>, TError = ErrorType<void | AsError>>(\n orgId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetOrganisationSuspenseQueryOptions(orgId,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Used to update existing Organisation.\n\nYou have to be a member of the **Organisation**, its creator, or an administrator to patch an Organisation.\n\n * @summary Adjust an existing Organisation\n */\nexport const patchOrganisation = (\n orgId: string,\n organisationPatchBodyBody: OrganisationPatchBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/organisation/${orgId}`, method: 'PATCH',\n headers: {'Content-Type': 'application/json', },\n data: organisationPatchBodyBody\n },\n options);\n }\n \n\n\nexport const getPatchOrganisationMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchOrganisation>>, TError,{orgId: string;data: OrganisationPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof patchOrganisation>>, TError,{orgId: string;data: OrganisationPatchBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof patchOrganisation>>, {orgId: string;data: OrganisationPatchBodyBody}> = (props) => {\n const {orgId,data} = props ?? {};\n\n return patchOrganisation(orgId,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type PatchOrganisationMutationResult = NonNullable<Awaited<ReturnType<typeof patchOrganisation>>>\n export type PatchOrganisationMutationBody = OrganisationPatchBodyBody\n export type PatchOrganisationMutationError = ErrorType<AsError>\n\n /**\n * @summary Adjust an existing Organisation\n */\nexport const usePatchOrganisation = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchOrganisation>>, TError,{orgId: string;data: OrganisationPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getPatchOrganisationMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Before an Organisation can be deleted all its underlying **Units** must also be deleted, remembering that **Units** that have undeleted **Products** cannot be deleted.\n\nYou need admin rights to use this method\n\n * @summary Deletes an Organisation\n */\nexport const deleteOrganisation = (\n orgId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/organisation/${orgId}`, method: 'DELETE'\n },\n options);\n }\n \n\n\nexport const getDeleteOrganisationMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisation>>, TError,{orgId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisation>>, TError,{orgId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteOrganisation>>, {orgId: string}> = (props) => {\n const {orgId} = props ?? {};\n\n return deleteOrganisation(orgId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteOrganisationMutationResult = NonNullable<Awaited<ReturnType<typeof deleteOrganisation>>>\n \n export type DeleteOrganisationMutationError = ErrorType<AsError>\n\n /**\n * @summary Deletes an Organisation\n */\nexport const useDeleteOrganisation = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisation>>, TError,{orgId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeleteOrganisationMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Gets the Default Organisation, a built-in Organisation used exclusively for **Personal Units**.\n\nAny authorised user can see the Default Organisation.\n\n * @summary Gets the Default Organisation\n */\nexport const getDefaultOrganisation = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<OrganisationGetDefaultResponse>(\n {url: `/organisation/default`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetDefaultOrganisationQueryKey = () => {\n return [\"account-server-api\", `/organisation/default`] as const;\n }\n\n \nexport const getGetDefaultOrganisationQueryOptions = <TData = Awaited<ReturnType<typeof getDefaultOrganisation>>, TError = ErrorType<void | AsError>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetDefaultOrganisationQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getDefaultOrganisation>>> = ({ signal }) => getDefaultOrganisation(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetDefaultOrganisationQueryResult = NonNullable<Awaited<ReturnType<typeof getDefaultOrganisation>>>\nexport type GetDefaultOrganisationQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets the Default Organisation\n */\nexport const useGetDefaultOrganisation = <TData = Awaited<ReturnType<typeof getDefaultOrganisation>>, TError = ErrorType<void | AsError>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetDefaultOrganisationQueryOptions(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\nexport const getGetDefaultOrganisationSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getDefaultOrganisation>>, TError = ErrorType<void | AsError>>( options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetDefaultOrganisationQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getDefaultOrganisation>>> = ({ signal }) => getDefaultOrganisation(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetDefaultOrganisationSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getDefaultOrganisation>>>\nexport type GetDefaultOrganisationSuspenseQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets the Default Organisation\n */\nexport const useGetDefaultOrganisationSuspense = <TData = Awaited<ReturnType<typeof getDefaultOrganisation>>, TError = ErrorType<void | AsError>>(\n options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetDefaultOrganisationSuspenseQueryOptions(options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n"],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAkCA,IAAM,mBAAmB,CAE/B,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAiB,QAAQ;AAAA,MAAO;AAAA,IACxC;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,8BAA8B,MAAM;AAC7C,SAAO,CAAC,sBAAsB,eAAe;AAC7C;AAGG,IAAM,kC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AAA,MAAC,KAAK;AAAA,MAAyB,QAAQ;AAAA,MAAO;AAAA,IAChD;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,oCAAoC,MAAM;AACnD,SAAO,CAAC,sBAAsB,uBAAuB;AACrD;AAGG,IAAM,wCAAwC,CAAkG,YAClJ;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,kCAAkC;AAI5E,QAAM,UAA6E,CAAC,EAAE,OAAO,MAAM,uBAAuB,gBAAgB,MAAM;AAMjJ,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAQO,IAAM,4BAA4B,CACvC,YAE8D;AAE9D,QAAM,eAAe,sCAAsC,OAAO;AAElE,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAIO,IAAM,gDAAgD,CAAkG,YAC1J;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,kCAAkC;AAI5E,QAAM,UAA6E,CAAC,EAAE,OAAO,MAAM,uBAAuB,gBAAgB,MAAM;AAMjJ,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAQO,IAAM,oCAAoC,CAC/C,YAEsE;AAEtE,QAAM,eAAe,8CAA8C,OAAO;AAE1E,QAAM,QAAQ,iBAAiB,YAAY;AAE3C,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;","names":[]}
1
+ {"version":3,"sources":["../../src/organisation/organisation.ts"],"sourcesContent":["/**\n * Generated by orval v6.25.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: 3.1\n */\nimport {\n useMutation,\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n MutationFunction,\n QueryFunction,\n QueryKey,\n UseMutationOptions,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n AsError,\n OrganisationAllDetail,\n OrganisationGetDefaultResponse,\n OrganisationPatchBodyBody,\n OrganisationPostBodyBody,\n OrganisationPostResponse,\n OrganisationsGetResponse\n} from '../account-server-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\ntype SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];\n\n\n/**\n * Gets all the Organisations that you are a member of.\n\nYou can see an Organisation if you are a member of it, the owner (creator) of it, or if you are an admin user.\n\n * @summary Gets Organisations\n */\nexport const getOrganisations = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<OrganisationsGetResponse>(\n {url: `/organisation`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetOrganisationsQueryKey = () => {\n return [\"account-server-api\", `/organisation`] as const;\n }\n\n \nexport const getGetOrganisationsQueryOptions = <TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationsQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisations>>> = ({ signal }) => getOrganisations(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetOrganisationsQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisations>>>\nexport type GetOrganisationsQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets Organisations\n */\nexport const useGetOrganisations = <TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetOrganisationsQueryOptions(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\nexport const getGetOrganisationsSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>( options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationsQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisations>>> = ({ signal }) => getOrganisations(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetOrganisationsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisations>>>\nexport type GetOrganisationsSuspenseQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets Organisations\n */\nexport const useGetOrganisationsSuspense = <TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(\n options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetOrganisationsSuspenseQueryOptions(options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Creates a new Organisation.\n\nThe **User** who creates the Organisation becomes the **Owner** of the Organisation. They are considered a *Member* (**User**) of the Organisation but are not present in the list of users, which a separate list of users explicitly added to the Organisation by the Owner or another Organisation User.\n\nYou need admin rights to use this method\n\n * @summary Create a new organisation\n */\nexport const createOrganisation = (\n organisationPostBodyBody: OrganisationPostBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<OrganisationPostResponse>(\n {url: `/organisation`, method: 'POST',\n headers: {'Content-Type': 'application/json', },\n data: organisationPostBodyBody\n },\n options);\n }\n \n\n\nexport const getCreateOrganisationMutationOptions = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createOrganisation>>, TError,{data: OrganisationPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof createOrganisation>>, TError,{data: OrganisationPostBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof createOrganisation>>, {data: OrganisationPostBodyBody}> = (props) => {\n const {data} = props ?? {};\n\n return createOrganisation(data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreateOrganisationMutationResult = NonNullable<Awaited<ReturnType<typeof createOrganisation>>>\n export type CreateOrganisationMutationBody = OrganisationPostBodyBody\n export type CreateOrganisationMutationError = ErrorType<AsError | void>\n\n /**\n * @summary Create a new organisation\n */\nexport const useCreateOrganisation = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createOrganisation>>, TError,{data: OrganisationPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getCreateOrganisationMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Gets an Organisation. To see the Organisation you need admin rights or need to be a member of the Organisation or are its *creator*.\n\nMembers of an Organisation's **Unit** do not have access to the Organisation.\n\n * @summary Gets an Organisation\n */\nexport const getOrganisation = (\n orgId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<OrganisationAllDetail>(\n {url: `/organisation/${orgId}`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetOrganisationQueryKey = (orgId: string,) => {\n return [\"account-server-api\", `/organisation/${orgId}`] as const;\n }\n\n \nexport const getGetOrganisationQueryOptions = <TData = Awaited<ReturnType<typeof getOrganisation>>, TError = ErrorType<void | AsError>>(orgId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationQueryKey(orgId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisation>>> = ({ signal }) => getOrganisation(orgId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(orgId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetOrganisationQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisation>>>\nexport type GetOrganisationQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets an Organisation\n */\nexport const useGetOrganisation = <TData = Awaited<ReturnType<typeof getOrganisation>>, TError = ErrorType<void | AsError>>(\n orgId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetOrganisationQueryOptions(orgId,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\nexport const getGetOrganisationSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getOrganisation>>, TError = ErrorType<void | AsError>>(orgId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationQueryKey(orgId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisation>>> = ({ signal }) => getOrganisation(orgId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(orgId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetOrganisationSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisation>>>\nexport type GetOrganisationSuspenseQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets an Organisation\n */\nexport const useGetOrganisationSuspense = <TData = Awaited<ReturnType<typeof getOrganisation>>, TError = ErrorType<void | AsError>>(\n orgId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetOrganisationSuspenseQueryOptions(orgId,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Used to update existing Organisation.\n\nYou have to be a member of the **Organisation**, its creator, or an administrator to patch an Organisation.\n\n * @summary Adjust an existing Organisation\n */\nexport const patchOrganisation = (\n orgId: string,\n organisationPatchBodyBody: OrganisationPatchBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/organisation/${orgId}`, method: 'PATCH',\n headers: {'Content-Type': 'application/json', },\n data: organisationPatchBodyBody\n },\n options);\n }\n \n\n\nexport const getPatchOrganisationMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchOrganisation>>, TError,{orgId: string;data: OrganisationPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof patchOrganisation>>, TError,{orgId: string;data: OrganisationPatchBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof patchOrganisation>>, {orgId: string;data: OrganisationPatchBodyBody}> = (props) => {\n const {orgId,data} = props ?? {};\n\n return patchOrganisation(orgId,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type PatchOrganisationMutationResult = NonNullable<Awaited<ReturnType<typeof patchOrganisation>>>\n export type PatchOrganisationMutationBody = OrganisationPatchBodyBody\n export type PatchOrganisationMutationError = ErrorType<AsError>\n\n /**\n * @summary Adjust an existing Organisation\n */\nexport const usePatchOrganisation = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchOrganisation>>, TError,{orgId: string;data: OrganisationPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getPatchOrganisationMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Before an Organisation can be deleted all its underlying **Units** must also be deleted, remembering that **Units** that have undeleted **Products** cannot be deleted.\n\nYou need admin rights to use this method\n\n * @summary Deletes an Organisation\n */\nexport const deleteOrganisation = (\n orgId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/organisation/${orgId}`, method: 'DELETE'\n },\n options);\n }\n \n\n\nexport const getDeleteOrganisationMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisation>>, TError,{orgId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisation>>, TError,{orgId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteOrganisation>>, {orgId: string}> = (props) => {\n const {orgId} = props ?? {};\n\n return deleteOrganisation(orgId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteOrganisationMutationResult = NonNullable<Awaited<ReturnType<typeof deleteOrganisation>>>\n \n export type DeleteOrganisationMutationError = ErrorType<AsError>\n\n /**\n * @summary Deletes an Organisation\n */\nexport const useDeleteOrganisation = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisation>>, TError,{orgId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeleteOrganisationMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Gets the Default Organisation, a built-in Organisation used exclusively for **Personal Units**.\n\nAny authorised user can see the Default Organisation.\n\n * @summary Gets the Default Organisation\n */\nexport const getDefaultOrganisation = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<OrganisationGetDefaultResponse>(\n {url: `/organisation/default`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetDefaultOrganisationQueryKey = () => {\n return [\"account-server-api\", `/organisation/default`] as const;\n }\n\n \nexport const getGetDefaultOrganisationQueryOptions = <TData = Awaited<ReturnType<typeof getDefaultOrganisation>>, TError = ErrorType<void | AsError>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetDefaultOrganisationQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getDefaultOrganisation>>> = ({ signal }) => getDefaultOrganisation(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetDefaultOrganisationQueryResult = NonNullable<Awaited<ReturnType<typeof getDefaultOrganisation>>>\nexport type GetDefaultOrganisationQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets the Default Organisation\n */\nexport const useGetDefaultOrganisation = <TData = Awaited<ReturnType<typeof getDefaultOrganisation>>, TError = ErrorType<void | AsError>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetDefaultOrganisationQueryOptions(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\nexport const getGetDefaultOrganisationSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getDefaultOrganisation>>, TError = ErrorType<void | AsError>>( options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetDefaultOrganisationQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getDefaultOrganisation>>> = ({ signal }) => getDefaultOrganisation(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetDefaultOrganisationSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getDefaultOrganisation>>>\nexport type GetDefaultOrganisationSuspenseQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets the Default Organisation\n */\nexport const useGetDefaultOrganisationSuspense = <TData = Awaited<ReturnType<typeof getDefaultOrganisation>>, TError = ErrorType<void | AsError>>(\n options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetDefaultOrganisationSuspenseQueryOptions(options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n"],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAkCA,IAAM,mBAAmB,CAE/B,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAiB,QAAQ;AAAA,MAAO;AAAA,IACxC;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,8BAA8B,MAAM;AAC7C,SAAO,CAAC,sBAAsB,eAAe;AAC7C;AAGG,IAAM,kCAAkC,CAA4F,YACtI;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,4BAA4B;AAItE,QAAM,UAAuE,CAAC,EAAE,OAAO,MAAM,iBAAiB,gBAAgB,MAAM;AAMrI,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAQO,IAAM,sBAAsB,CACjC,YAE8D;AAE9D,QAAM,eAAe,gCAAgC,OAAO;AAE5D,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aA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AAMjJ,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAQO,IAAM,4BAA4B,CACvC,YAE8D;AAE9D,QAAM,eAAe,sCAAsC,OAAO;AAElE,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAIO,IAAM,gDAAgD,CAAkG,YAC1J;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,kCAAkC;AAI5E,QAAM,UAA6E,CAAC,EAAE,OAAO,MAAM,uBAAuB,gBAAgB,MAAM;AAMjJ,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAQO,IAAM,oCAAoC,CAC/C,YAEsE;AAEtE,QAAM,eAAe,8CAA8C,OAAO;AAE1E,QAAM,QAAQ,iBAAiB,YAAY;AAE3C,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;","names":[]}
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.0.0",
2
+ "version": "3.1.0-alpha.2",
3
3
  "author": "Oliver Dudgeon",
4
4
  "name": "@squonk/account-server-client",
5
5
  "private": false,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/product/product.ts"],"names":[],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAiCA,IAAM,kBAAkB,CAE9B,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAiB,QAAQ;AAAA,MAAO;AAAA,IACxC;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,6BAA6B,MAAM;AAC5C,SAAO,CAAC,sBAAsB,eAAe;AAC7C;AAGG,IAAM,iCAAiC,CAA2F,YACpI;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,2BAA2B;AAIrE,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QAAQ;AAAA,MACvC,SAAS,EAAC,gBAAgB,mBAAoB;AAAA,MAC9C,MAAM;AAAA,IACR;AAAA,IACE;AAAA,EAAO;AACT;AAIG,IAAM,iCAAiC,CACtB,YAC4G;AACnI,QAAM,EAAC,UAAU,iBAAiB,SAAS,eAAc,IAAI,WAAW,CAAC;AAKpE,QAAM,aAAyH,CAAC,UAAU;AACtI,UAAM,EAAC,WAAU,KAAI,IAAI,SAAS,CAAC;AAEnC,WAAQ,aAAa,WAAU,MAAK,cAAc;AAAA,EACpD;AAKL,SAAQ,EAAE,YAAY,GAAG,gBAAgB;AAAC;AAStC,IAAM,kBAAkB,CACP,YACnB;AAEC,QAAM,kBAAkB,+BAA+B,OAAO;AAE9D,SAAO,YAAY,eAAe;AACpC","sourcesContent":["/**\n * Generated by orval v6.25.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: 3.0\n */\nimport {\n useMutation,\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n MutationFunction,\n QueryFunction,\n QueryKey,\n UseMutationOptions,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n AsError,\n ProductPatchBodyBody,\n ProductUnitGetResponse,\n ProductsGetDefaultStorageCost,\n ProductsGetResponse,\n ProductsGetTypesResponse,\n UnitProductPostBodyBody,\n UnitProductPostResponse\n} from '../account-server-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\ntype SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];\n\n\n/**\n * Gets Product Types you can purchase (subscribe to)\n\n * @summary Gets all Product Types\n */\nexport const getProductTypes = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<ProductsGetTypesResponse>(\n {url: `/product-type`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetProductTypesQueryKey = () => {\n return [\"account-server-api\", `/product-type`] as const;\n }\n\n \nexport const getGetProductTypesQueryOptions = <TData = Awaited<ReturnType<typeof getProductTypes>>, TError = ErrorType<AsError | void>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductTypesQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductTypes>>> = ({ signal }) => getProductTypes(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProductTypesQueryResult = NonNullable<Awaited<ReturnType<typeof getProductTypes>>>\nexport type GetProductTypesQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets all Product Types\n */\nexport const useGetProductTypes = <TData = Awaited<ReturnType<typeof getProductTypes>>, TError = ErrorType<AsError | void>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProductTypesQueryOptions(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\nexport const getGetProductTypesSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getProductTypes>>, TError = ErrorType<AsError | void>>( options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductTypesQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductTypes>>> = ({ signal }) => getProductTypes(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProductTypesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProductTypes>>>\nexport type GetProductTypesSuspenseQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets all Product Types\n */\nexport const useGetProductTypesSuspense = <TData = Awaited<ReturnType<typeof getProductTypes>>, TError = ErrorType<AsError | void>>(\n options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProductTypesSuspenseQueryOptions(options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * The storage cost is returned along with its measurement units, typically a Coin value based on the the peak storage that was measured on each billable day.\n\n * @summary Gets the default cross-product storage cost\n */\nexport const getProductDefaultStorageCost = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<ProductsGetDefaultStorageCost>(\n {url: `/product-default-storage-cost`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetProductDefaultStorageCostQueryKey = () => {\n return [\"account-server-api\", `/product-default-storage-cost`] as const;\n }\n\n \nexport const getGetProductDefaultStorageCostQueryOptions = <TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError = ErrorType<AsError | void>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductDefaultStorageCostQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductDefaultStorageCost>>> = ({ signal }) => getProductDefaultStorageCost(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProductDefaultStorageCostQueryResult = NonNullable<Awaited<ReturnType<typeof getProductDefaultStorageCost>>>\nexport type GetProductDefaultStorageCostQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets the default cross-product storage cost\n */\nexport const useGetProductDefaultStorageCost = <TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError = ErrorType<AsError | void>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProductDefaultStorageCostQueryOptions(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\nexport const getGetProductDefaultStorageCostSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError = ErrorType<AsError | void>>( options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductDefaultStorageCostQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductDefaultStorageCost>>> = ({ signal }) => getProductDefaultStorageCost(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProductDefaultStorageCostSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProductDefaultStorageCost>>>\nexport type GetProductDefaultStorageCostSuspenseQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets the default cross-product storage cost\n */\nexport const useGetProductDefaultStorageCostSuspense = <TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError = ErrorType<AsError | void>>(\n options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProductDefaultStorageCostSuspenseQueryOptions(options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Gets Products you have access to, across all **Units** and **Organisations**\n\n * @summary Gets all Products\n */\nexport const getProducts = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<ProductsGetResponse>(\n {url: `/product`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetProductsQueryKey = () => {\n return [\"account-server-api\", `/product`] as const;\n }\n\n \nexport const getGetProductsQueryOptions = <TData = Awaited<ReturnType<typeof getProducts>>, TError = ErrorType<AsError | void>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductsQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProducts>>> = ({ signal }) => getProducts(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProductsQueryResult = NonNullable<Awaited<ReturnType<typeof getProducts>>>\nexport type GetProductsQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets all Products\n */\nexport const useGetProducts = <TData = Awaited<ReturnType<typeof getProducts>>, TError = ErrorType<AsError | void>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProductsQueryOptions(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\nexport const getGetProductsSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getProducts>>, TError = ErrorType<AsError | void>>( options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductsQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProducts>>> = ({ signal }) => getProducts(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProductsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProducts>>>\nexport type GetProductsSuspenseQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets all Products\n */\nexport const useGetProductsSuspense = <TData = Awaited<ReturnType<typeof getProducts>>, TError = ErrorType<AsError | void>>(\n options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProductsSuspenseQueryOptions(options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Gets Products you have access to based on an **Organisation**\n\n * @summary Gets Products for an Organisation\n */\nexport const getProductsForOrganisation = (\n orgId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<ProductsGetResponse>(\n {url: `/product/organisation/${orgId}`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetProductsForOrganisationQueryKey = (orgId: string,) => {\n return [\"account-server-api\", `/product/organisation/${orgId}`] as const;\n }\n\n \nexport const getGetProductsForOrganisationQueryOptions = <TData = Awaited<ReturnType<typeof getProductsForOrganisation>>, TError = ErrorType<void | AsError>>(orgId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductsForOrganisationQueryKey(orgId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductsForOrganisation>>> = ({ signal }) => getProductsForOrganisation(orgId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(orgId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProductsForOrganisationQueryResult = NonNullable<Awaited<ReturnType<typeof getProductsForOrganisation>>>\nexport type GetProductsForOrganisationQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets Products for an Organisation\n */\nexport const useGetProductsForOrganisation = <TData = Awaited<ReturnType<typeof getProductsForOrganisation>>, TError = ErrorType<void | AsError>>(\n orgId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProductsForOrganisationQueryOptions(orgId,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\nexport const getGetProductsForOrganisationSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getProductsForOrganisation>>, TError = ErrorType<void | AsError>>(orgId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductsForOrganisationQueryKey(orgId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductsForOrganisation>>> = ({ signal }) => getProductsForOrganisation(orgId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(orgId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProductsForOrganisationSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProductsForOrganisation>>>\nexport type GetProductsForOrganisationSuspenseQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets Products for an Organisation\n */\nexport const useGetProductsForOrganisationSuspense = <TData = Awaited<ReturnType<typeof getProductsForOrganisation>>, TError = ErrorType<void | AsError>>(\n orgId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProductsForOrganisationSuspenseQueryOptions(orgId,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Products are **Subscriptions** that you create in a Unit and use **Merchant** services like the `DATA_MANAGER`.\n\nTypical subscriptions include `DATA_MANAGER_STORAGE_SUBSCRIPTION` and `DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION`.\n\nSome subscriptions, like the `DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION` are available in various **flavours** that influence their capabilities. Flavours are typically referred to using the names `BRONZE`, `SILVER` and `GOLD`\n\nTo do this you need to be a member of the **Unit** or the **Organisation**.\n\n * @summary Creates a Product for an Organisational Unit\n */\nexport const createUnitProduct = (\n unitId: string,\n unitProductPostBodyBody: UnitProductPostBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<UnitProductPostResponse>(\n {url: `/product/unit/${unitId}`, method: 'POST',\n headers: {'Content-Type': 'application/json', },\n data: unitProductPostBodyBody\n },\n options);\n }\n \n\n\nexport const getCreateUnitProductMutationOptions = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createUnitProduct>>, TError,{unitId: string;data: UnitProductPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof createUnitProduct>>, TError,{unitId: string;data: UnitProductPostBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof createUnitProduct>>, {unitId: string;data: UnitProductPostBodyBody}> = (props) => {\n const {unitId,data} = props ?? {};\n\n return createUnitProduct(unitId,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreateUnitProductMutationResult = NonNullable<Awaited<ReturnType<typeof createUnitProduct>>>\n export type CreateUnitProductMutationBody = UnitProductPostBodyBody\n export type CreateUnitProductMutationError = ErrorType<AsError | void>\n\n /**\n * @summary Creates a Product for an Organisational Unit\n */\nexport const useCreateUnitProduct = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createUnitProduct>>, TError,{unitId: string;data: UnitProductPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getCreateUnitProductMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Gets products you have access to based on an Organisational **Unit**\n\n * @summary Gets Products for an Organisational Unit\n */\nexport const getProductsForUnit = (\n unitId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<ProductsGetResponse>(\n {url: `/product/unit/${unitId}`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetProductsForUnitQueryKey = (unitId: string,) => {\n return [\"account-server-api\", `/product/unit/${unitId}`] as const;\n }\n\n \nexport const getGetProductsForUnitQueryOptions = <TData = Awaited<ReturnType<typeof getProductsForUnit>>, TError = ErrorType<void | AsError>>(unitId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductsForUnitQueryKey(unitId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductsForUnit>>> = ({ signal }) => getProductsForUnit(unitId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(unitId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProductsForUnitQueryResult = NonNullable<Awaited<ReturnType<typeof getProductsForUnit>>>\nexport type GetProductsForUnitQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets Products for an Organisational Unit\n */\nexport const useGetProductsForUnit = <TData = Awaited<ReturnType<typeof getProductsForUnit>>, TError = ErrorType<void | AsError>>(\n unitId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProductsForUnitQueryOptions(unitId,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\nexport const getGetProductsForUnitSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getProductsForUnit>>, TError = ErrorType<void | AsError>>(unitId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductsForUnitQueryKey(unitId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductsForUnit>>> = ({ signal }) => getProductsForUnit(unitId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(unitId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProductsForUnitSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProductsForUnit>>>\nexport type GetProductsForUnitSuspenseQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets Products for an Organisational Unit\n */\nexport const useGetProductsForUnitSuspense = <TData = Awaited<ReturnType<typeof getProductsForUnit>>, TError = ErrorType<void | AsError>>(\n unitId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProductsForUnitSuspenseQueryOptions(unitId,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Gets details of a specific Product that you have access to.\n\n * @summary Gets a Product\n */\nexport const getProduct = (\n productId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<ProductUnitGetResponse>(\n {url: `/product/${productId}`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetProductQueryKey = (productId: string,) => {\n return [\"account-server-api\", `/product/${productId}`] as const;\n }\n\n \nexport const getGetProductQueryOptions = <TData = Awaited<ReturnType<typeof getProduct>>, TError = ErrorType<AsError | void>>(productId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductQueryKey(productId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProduct>>> = ({ signal }) => getProduct(productId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(productId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProductQueryResult = NonNullable<Awaited<ReturnType<typeof getProduct>>>\nexport type GetProductQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets a Product\n */\nexport const useGetProduct = <TData = Awaited<ReturnType<typeof getProduct>>, TError = ErrorType<AsError | void>>(\n productId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProductQueryOptions(productId,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\nexport const getGetProductSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getProduct>>, TError = ErrorType<AsError | void>>(productId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductQueryKey(productId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProduct>>> = ({ signal }) => getProduct(productId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(productId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProductSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProduct>>>\nexport type GetProductSuspenseQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets a Product\n */\nexport const useGetProductSuspense = <TData = Awaited<ReturnType<typeof getProduct>>, TError = ErrorType<AsError | void>>(\n productId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProductSuspenseQueryOptions(productId,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * You need access to the Product and, if the Product is *claimable* the claim must be removed before the Product can be removed. An example claimable Product is a `DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION` where the *claimable* commodity is a Data Manager **Project**. In this case you will need to delete the Data Manager **Project** before you can delete the Account Server **Product**.\n\n * @summary Deletes an existing Product\n */\nexport const deleteProduct = (\n productId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/product/${productId}`, method: 'DELETE'\n },\n options);\n }\n \n\n\nexport const getDeleteProductMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteProduct>>, TError,{productId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteProduct>>, TError,{productId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteProduct>>, {productId: string}> = (props) => {\n const {productId} = props ?? {};\n\n return deleteProduct(productId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteProductMutationResult = NonNullable<Awaited<ReturnType<typeof deleteProduct>>>\n \n export type DeleteProductMutationError = ErrorType<AsError>\n\n /**\n * @summary Deletes an existing Product\n */\nexport const useDeleteProduct = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteProduct>>, TError,{productId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeleteProductMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Used to update some adjustable parameters of a Product, i.e. to extend its **Allowance** or **Limit**.\n\nYou must be a member of the **Unit**, or its **Organisation**, or an administrator to use this method.\n\nAt the moment we only support Products associated with the Data Manager, and these can be patched by changing the `name`, its coin `allowance` or `limit`\n\n * @summary Adjust an existing Product\n */\nexport const patchProduct = (\n productId: string,\n productPatchBodyBody: ProductPatchBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/product/${productId}`, method: 'PATCH',\n headers: {'Content-Type': 'application/json', },\n data: productPatchBodyBody\n },\n options);\n }\n \n\n\nexport const getPatchProductMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchProduct>>, TError,{productId: string;data: ProductPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof patchProduct>>, TError,{productId: string;data: ProductPatchBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof patchProduct>>, {productId: string;data: ProductPatchBodyBody}> = (props) => {\n const {productId,data} = props ?? {};\n\n return patchProduct(productId,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type PatchProductMutationResult = NonNullable<Awaited<ReturnType<typeof patchProduct>>>\n export type PatchProductMutationBody = ProductPatchBodyBody\n export type PatchProductMutationError = ErrorType<AsError>\n\n /**\n * @summary Adjust an existing Product\n */\nexport const usePatchProduct = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchProduct>>, TError,{productId: string;data: ProductPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getPatchProductMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n "]}
1
+ {"version":3,"sources":["../../src/product/product.ts"],"names":[],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAiCA,IAAM,kBAAkB,CAE9B,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAiB,QAAQ;AAAA,MAAO;AAAA,IACxC;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,6BAA6B,MAAM;AAC5C,SAAO,CAAC,sBAAsB,eAAe;AAC7C;AAGG,IAAM,iCAAiC,CAA2F,YACpI;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,2BAA2B;AAIrE,QAAM,UAAsE,CAAC,EAAE,OAAO,MA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AAgB,mBAAoB;AAAA,MAC9C,MAAM;AAAA,IACR;AAAA,IACE;AAAA,EAAO;AACT;AAIG,IAAM,iCAAiC,CACtB,YAC4G;AACnI,QAAM,EAAC,UAAU,iBAAiB,SAAS,eAAc,IAAI,WAAW,CAAC;AAKpE,QAAM,aAAyH,CAAC,UAAU;AACtI,UAAM,EAAC,WAAU,KAAI,IAAI,SAAS,CAAC;AAEnC,WAAQ,aAAa,WAAU,MAAK,cAAc;AAAA,EACpD;AAKL,SAAQ,EAAE,YAAY,GAAG,gBAAgB;AAAC;AAStC,IAAM,kBAAkB,CACP,YACnB;AAEC,QAAM,kBAAkB,+BAA+B,OAAO;AAE9D,SAAO,YAAY,eAAe;AACpC","sourcesContent":["/**\n * Generated by orval v6.25.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: 3.1\n */\nimport {\n useMutation,\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n MutationFunction,\n QueryFunction,\n QueryKey,\n UseMutationOptions,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n AsError,\n ProductPatchBodyBody,\n ProductUnitGetResponse,\n ProductsGetDefaultStorageCost,\n ProductsGetResponse,\n ProductsGetTypesResponse,\n UnitProductPostBodyBody,\n UnitProductPostResponse\n} from '../account-server-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\ntype SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];\n\n\n/**\n * Gets Product Types you can purchase (subscribe to)\n\n * @summary Gets all Product Types\n */\nexport const getProductTypes = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<ProductsGetTypesResponse>(\n {url: `/product-type`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetProductTypesQueryKey = () => {\n return [\"account-server-api\", `/product-type`] as const;\n }\n\n \nexport const getGetProductTypesQueryOptions = <TData = Awaited<ReturnType<typeof getProductTypes>>, TError = ErrorType<AsError | void>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductTypesQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductTypes>>> = ({ signal }) => getProductTypes(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProductTypesQueryResult = NonNullable<Awaited<ReturnType<typeof getProductTypes>>>\nexport type GetProductTypesQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets all Product Types\n */\nexport const useGetProductTypes = <TData = Awaited<ReturnType<typeof getProductTypes>>, TError = ErrorType<AsError | void>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProductTypesQueryOptions(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\nexport const getGetProductTypesSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getProductTypes>>, TError = ErrorType<AsError | void>>( options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductTypesQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductTypes>>> = ({ signal }) => getProductTypes(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProductTypesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProductTypes>>>\nexport type GetProductTypesSuspenseQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets all Product Types\n */\nexport const useGetProductTypesSuspense = <TData = Awaited<ReturnType<typeof getProductTypes>>, TError = ErrorType<AsError | void>>(\n options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductTypes>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProductTypesSuspenseQueryOptions(options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * The storage cost is returned along with its measurement units, typically a Coin value based on the the peak storage that was measured on each billable day.\n\n * @summary Gets the default cross-product storage cost\n */\nexport const getProductDefaultStorageCost = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<ProductsGetDefaultStorageCost>(\n {url: `/product-default-storage-cost`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetProductDefaultStorageCostQueryKey = () => {\n return [\"account-server-api\", `/product-default-storage-cost`] as const;\n }\n\n \nexport const getGetProductDefaultStorageCostQueryOptions = <TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError = ErrorType<AsError | void>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductDefaultStorageCostQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductDefaultStorageCost>>> = ({ signal }) => getProductDefaultStorageCost(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProductDefaultStorageCostQueryResult = NonNullable<Awaited<ReturnType<typeof getProductDefaultStorageCost>>>\nexport type GetProductDefaultStorageCostQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets the default cross-product storage cost\n */\nexport const useGetProductDefaultStorageCost = <TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError = ErrorType<AsError | void>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProductDefaultStorageCostQueryOptions(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\nexport const getGetProductDefaultStorageCostSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError = ErrorType<AsError | void>>( options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductDefaultStorageCostQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductDefaultStorageCost>>> = ({ signal }) => getProductDefaultStorageCost(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProductDefaultStorageCostSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProductDefaultStorageCost>>>\nexport type GetProductDefaultStorageCostSuspenseQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets the default cross-product storage cost\n */\nexport const useGetProductDefaultStorageCostSuspense = <TData = Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError = ErrorType<AsError | void>>(\n options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductDefaultStorageCost>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProductDefaultStorageCostSuspenseQueryOptions(options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Gets Products you have access to, across all **Units** and **Organisations**\n\n * @summary Gets all Products\n */\nexport const getProducts = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<ProductsGetResponse>(\n {url: `/product`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetProductsQueryKey = () => {\n return [\"account-server-api\", `/product`] as const;\n }\n\n \nexport const getGetProductsQueryOptions = <TData = Awaited<ReturnType<typeof getProducts>>, TError = ErrorType<AsError | void>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductsQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProducts>>> = ({ signal }) => getProducts(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProductsQueryResult = NonNullable<Awaited<ReturnType<typeof getProducts>>>\nexport type GetProductsQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets all Products\n */\nexport const useGetProducts = <TData = Awaited<ReturnType<typeof getProducts>>, TError = ErrorType<AsError | void>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProductsQueryOptions(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\nexport const getGetProductsSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getProducts>>, TError = ErrorType<AsError | void>>( options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductsQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProducts>>> = ({ signal }) => getProducts(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProductsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProducts>>>\nexport type GetProductsSuspenseQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets all Products\n */\nexport const useGetProductsSuspense = <TData = Awaited<ReturnType<typeof getProducts>>, TError = ErrorType<AsError | void>>(\n options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProducts>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProductsSuspenseQueryOptions(options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Gets Products you have access to based on an **Organisation**\n\n * @summary Gets Products for an Organisation\n */\nexport const getProductsForOrganisation = (\n orgId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<ProductsGetResponse>(\n {url: `/product/organisation/${orgId}`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetProductsForOrganisationQueryKey = (orgId: string,) => {\n return [\"account-server-api\", `/product/organisation/${orgId}`] as const;\n }\n\n \nexport const getGetProductsForOrganisationQueryOptions = <TData = Awaited<ReturnType<typeof getProductsForOrganisation>>, TError = ErrorType<void | AsError>>(orgId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductsForOrganisationQueryKey(orgId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductsForOrganisation>>> = ({ signal }) => getProductsForOrganisation(orgId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(orgId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProductsForOrganisationQueryResult = NonNullable<Awaited<ReturnType<typeof getProductsForOrganisation>>>\nexport type GetProductsForOrganisationQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets Products for an Organisation\n */\nexport const useGetProductsForOrganisation = <TData = Awaited<ReturnType<typeof getProductsForOrganisation>>, TError = ErrorType<void | AsError>>(\n orgId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProductsForOrganisationQueryOptions(orgId,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\nexport const getGetProductsForOrganisationSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getProductsForOrganisation>>, TError = ErrorType<void | AsError>>(orgId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductsForOrganisationQueryKey(orgId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductsForOrganisation>>> = ({ signal }) => getProductsForOrganisation(orgId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(orgId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProductsForOrganisationSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProductsForOrganisation>>>\nexport type GetProductsForOrganisationSuspenseQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets Products for an Organisation\n */\nexport const useGetProductsForOrganisationSuspense = <TData = Awaited<ReturnType<typeof getProductsForOrganisation>>, TError = ErrorType<void | AsError>>(\n orgId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProductsForOrganisationSuspenseQueryOptions(orgId,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Products are **Subscriptions** that you create in a Unit and use **Merchant** services like the `DATA_MANAGER`.\n\nTypical subscriptions include `DATA_MANAGER_STORAGE_SUBSCRIPTION` and `DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION`.\n\nSome subscriptions, like the `DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION` are available in various **flavours** that influence their capabilities. Flavours are typically referred to using the names `BRONZE`, `SILVER` and `GOLD`\n\nTo do this you need to be a member of the **Unit** or the **Organisation**.\n\n * @summary Creates a Product for an Organisational Unit\n */\nexport const createUnitProduct = (\n unitId: string,\n unitProductPostBodyBody: UnitProductPostBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<UnitProductPostResponse>(\n {url: `/product/unit/${unitId}`, method: 'POST',\n headers: {'Content-Type': 'application/json', },\n data: unitProductPostBodyBody\n },\n options);\n }\n \n\n\nexport const getCreateUnitProductMutationOptions = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createUnitProduct>>, TError,{unitId: string;data: UnitProductPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof createUnitProduct>>, TError,{unitId: string;data: UnitProductPostBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof createUnitProduct>>, {unitId: string;data: UnitProductPostBodyBody}> = (props) => {\n const {unitId,data} = props ?? {};\n\n return createUnitProduct(unitId,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreateUnitProductMutationResult = NonNullable<Awaited<ReturnType<typeof createUnitProduct>>>\n export type CreateUnitProductMutationBody = UnitProductPostBodyBody\n export type CreateUnitProductMutationError = ErrorType<AsError | void>\n\n /**\n * @summary Creates a Product for an Organisational Unit\n */\nexport const useCreateUnitProduct = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createUnitProduct>>, TError,{unitId: string;data: UnitProductPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getCreateUnitProductMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Gets products you have access to based on an Organisational **Unit**\n\n * @summary Gets Products for an Organisational Unit\n */\nexport const getProductsForUnit = (\n unitId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<ProductsGetResponse>(\n {url: `/product/unit/${unitId}`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetProductsForUnitQueryKey = (unitId: string,) => {\n return [\"account-server-api\", `/product/unit/${unitId}`] as const;\n }\n\n \nexport const getGetProductsForUnitQueryOptions = <TData = Awaited<ReturnType<typeof getProductsForUnit>>, TError = ErrorType<void | AsError>>(unitId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductsForUnitQueryKey(unitId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductsForUnit>>> = ({ signal }) => getProductsForUnit(unitId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(unitId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProductsForUnitQueryResult = NonNullable<Awaited<ReturnType<typeof getProductsForUnit>>>\nexport type GetProductsForUnitQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets Products for an Organisational Unit\n */\nexport const useGetProductsForUnit = <TData = Awaited<ReturnType<typeof getProductsForUnit>>, TError = ErrorType<void | AsError>>(\n unitId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProductsForUnitQueryOptions(unitId,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\nexport const getGetProductsForUnitSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getProductsForUnit>>, TError = ErrorType<void | AsError>>(unitId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductsForUnitQueryKey(unitId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProductsForUnit>>> = ({ signal }) => getProductsForUnit(unitId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(unitId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProductsForUnitSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProductsForUnit>>>\nexport type GetProductsForUnitSuspenseQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets Products for an Organisational Unit\n */\nexport const useGetProductsForUnitSuspense = <TData = Awaited<ReturnType<typeof getProductsForUnit>>, TError = ErrorType<void | AsError>>(\n unitId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProductsForUnit>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProductsForUnitSuspenseQueryOptions(unitId,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Gets details of a specific Product that you have access to.\n\n * @summary Gets a Product\n */\nexport const getProduct = (\n productId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<ProductUnitGetResponse>(\n {url: `/product/${productId}`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetProductQueryKey = (productId: string,) => {\n return [\"account-server-api\", `/product/${productId}`] as const;\n }\n\n \nexport const getGetProductQueryOptions = <TData = Awaited<ReturnType<typeof getProduct>>, TError = ErrorType<AsError | void>>(productId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductQueryKey(productId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProduct>>> = ({ signal }) => getProduct(productId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(productId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProductQueryResult = NonNullable<Awaited<ReturnType<typeof getProduct>>>\nexport type GetProductQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets a Product\n */\nexport const useGetProduct = <TData = Awaited<ReturnType<typeof getProduct>>, TError = ErrorType<AsError | void>>(\n productId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProductQueryOptions(productId,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\nexport const getGetProductSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getProduct>>, TError = ErrorType<AsError | void>>(productId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetProductQueryKey(productId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getProduct>>> = ({ signal }) => getProduct(productId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(productId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetProductSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProduct>>>\nexport type GetProductSuspenseQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets a Product\n */\nexport const useGetProductSuspense = <TData = Awaited<ReturnType<typeof getProduct>>, TError = ErrorType<AsError | void>>(\n productId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProduct>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetProductSuspenseQueryOptions(productId,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * You need access to the Product and, if the Product is *claimable* the claim must be removed before the Product can be removed. An example claimable Product is a `DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION` where the *claimable* commodity is a Data Manager **Project**. In this case you will need to delete the Data Manager **Project** before you can delete the Account Server **Product**.\n\n * @summary Deletes an existing Product\n */\nexport const deleteProduct = (\n productId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/product/${productId}`, method: 'DELETE'\n },\n options);\n }\n \n\n\nexport const getDeleteProductMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteProduct>>, TError,{productId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteProduct>>, TError,{productId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteProduct>>, {productId: string}> = (props) => {\n const {productId} = props ?? {};\n\n return deleteProduct(productId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteProductMutationResult = NonNullable<Awaited<ReturnType<typeof deleteProduct>>>\n \n export type DeleteProductMutationError = ErrorType<AsError>\n\n /**\n * @summary Deletes an existing Product\n */\nexport const useDeleteProduct = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteProduct>>, TError,{productId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeleteProductMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Used to update some adjustable parameters of a Product, i.e. to extend its **Allowance** or **Limit**.\n\nYou must be a member of the **Unit**, or its **Organisation**, or an administrator to use this method.\n\nAt the moment we only support Products associated with the Data Manager, and these can be patched by changing the `name`, its coin `allowance` or `limit`\n\n * @summary Adjust an existing Product\n */\nexport const patchProduct = (\n productId: string,\n productPatchBodyBody: ProductPatchBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/product/${productId}`, method: 'PATCH',\n headers: {'Content-Type': 'application/json', },\n data: productPatchBodyBody\n },\n options);\n }\n \n\n\nexport const getPatchProductMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchProduct>>, TError,{productId: string;data: ProductPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof patchProduct>>, TError,{productId: string;data: ProductPatchBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof patchProduct>>, {productId: string;data: ProductPatchBodyBody}> = (props) => {\n const {productId,data} = props ?? {};\n\n return patchProduct(productId,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type PatchProductMutationResult = NonNullable<Awaited<ReturnType<typeof patchProduct>>>\n export type PatchProductMutationBody = ProductPatchBodyBody\n export type PatchProductMutationError = ErrorType<AsError>\n\n /**\n * @summary Adjust an existing Product\n */\nexport const usePatchProduct = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchProduct>>, TError,{productId: string;data: ProductPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getPatchProductMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n "]}