@squonk/account-server-client 4.0.1-rc.3 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/asset/asset.cjs.map +1 -1
- package/asset/asset.js.map +1 -1
- package/charges/charges.cjs.map +1 -1
- package/charges/charges.js.map +1 -1
- package/event-stream/event-stream.cjs.map +1 -1
- package/event-stream/event-stream.js.map +1 -1
- package/index.cjs.map +1 -1
- package/index.d.cts +40 -24
- package/index.d.ts +40 -24
- package/index.js.map +1 -1
- package/merchant/merchant.cjs.map +1 -1
- package/merchant/merchant.js.map +1 -1
- package/organisation/organisation.cjs +14 -13
- package/organisation/organisation.cjs.map +1 -1
- package/organisation/organisation.d.cts +12 -12
- package/organisation/organisation.d.ts +12 -12
- package/organisation/organisation.js +14 -13
- package/organisation/organisation.js.map +1 -1
- package/package.json +1 -1
- package/product/product.cjs.map +1 -1
- package/product/product.js.map +1 -1
- package/src/account-server-api.schemas.ts +39 -20
- package/src/asset/asset.ts +1 -1
- package/src/charges/charges.ts +1 -1
- package/src/event-stream/event-stream.ts +1 -1
- package/src/merchant/merchant.ts +1 -1
- package/src/organisation/organisation.ts +24 -22
- package/src/product/product.ts +1 -1
- package/src/state/state.ts +1 -1
- package/src/unit/unit.ts +24 -22
- package/src/user/user.ts +1 -1
- package/state/state.cjs.map +1 -1
- package/state/state.js.map +1 -1
- package/unit/unit.cjs +14 -13
- package/unit/unit.cjs.map +1 -1
- package/unit/unit.d.cts +12 -12
- package/unit/unit.d.ts +12 -12
- package/unit/unit.js +14 -13
- package/unit/unit.js.map +1 -1
- package/user/user.cjs.map +1 -1
- package/user/user.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/squonk2-account-server-js-client/squonk2-account-server-js-client/dist/merchant/merchant.cjs","../../src/merchant/merchant.ts"],"names":[],"mappings":"AAAA;AACE;AACF,yDAA8B;AAC9B;AACA;ACOA;AACE;AACA;AAA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A;AAEjE,EAAA,MAAM,SAAA,mBAAA,CAAY,aAAA,GAAA,KAAA,EAAA,KAAA,EAAA,EAAA,YAAA,CAAc,QAAA,CAAA,UAAY,uBAAA,CAAwB,GAAA;AAIlE,EAAA,MAAM,QAAA,EAAmE,CAAC,EAAE,OAAO,CAAA,EAAA,GAAM,YAAA,CAAa,cAAA,EAAgB,MAAM,CAAA;AAM7H,EAAA,OAAQ,EAAE,QAAA,EAAU,OAAA,EAAS,GAAG,aAAY,CAAA;AAC/C,CAAA;AAsBO,SAAS,uBAAA,CACd,OAAA,EAEmE;AAEnE,EAAA,MAAM,aAAA,EAAe,mCAAA,CAAoC,OAAO,CAAA;AAEhE,EAAA,MAAM,MAAA,EAAQ,0CAAA,YAA6B,CAAA;AAE3C,EAAA,KAAA,CAAM,SAAA,EAAW,YAAA,CAAa,QAAA;AAE9B,EAAA,OAAO,KAAA;AACT;AASO,IAAM,WAAA,EAAa,CACtB,GAAA,EACH,OAAA,EAAiD,MAAA,EAAA,GAC7C;AAGC,EAAA,OAAO,8CAAA;AAAA,IACP;AAAA,MAAC,GAAA,EAAK,CAAA,UAAA,EAAa,GAAG,CAAA,CAAA;AAAY,MAAA;AAAO,MAAA;AAC3C,IAAA;AACE,IAAA;AAAO,EAAA;AACT;AAGiC;AACzB,EAAA;AACR;AAGS;AAGC,EAAA;AAEM,EAAA;AAIiE,EAAA;AAM9D,EAAA;AACvB;AAmCc;AAIS,EAAA;AAEE,EAAA;AAEN,EAAA;AAEV,EAAA;AACT;AAIa;AAGC,EAAA;AAEM,EAAA;AAIiE,EAAA;AAM9D,EAAA;AACvB;AAsBgB;AAKO,EAAA;AAEP,EAAA;AAEG,EAAA;AAEV,EAAA;AACT;AD/O4B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/squonk2-account-server-js-client/squonk2-account-server-js-client/dist/merchant/merchant.cjs","sourcesContent":[null,"// @ts-nocheck\n/**\n * Generated by orval v7.2.0 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 4.0\n */\nimport {\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\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\nexport function useGetMerchants<TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>(\n options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getMerchants>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetMerchants<TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getMerchants>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function 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 * @summary Gets all Merchants\n */\n\nexport function 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\nexport function 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 }\nexport function 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 }\nexport function 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 * @summary Gets all Merchants\n */\n\nexport function 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\nexport function useGetService<TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(\n mId: number, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getService>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetService<TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(\n mId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getService>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function 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 * @summary Gets a specific Merchant\n */\n\nexport function 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\nexport function 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 }\nexport function 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 }\nexport function 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 * @summary Gets a specific Merchant\n */\n\nexport function 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":["/home/runner/work/squonk2-account-server-js-client/squonk2-account-server-js-client/dist/merchant/merchant.cjs","../../src/merchant/merchant.ts"],"names":[],"mappings":"AAAA;AACE;AACF,yDAA8B;AAC9B;AACA;ACOA;AACE;AACA;AAAA,mDACK;AA+BA,IAAM,aAAA,EAAe,CAE3B,OAAA,EAAiD,MAAA,EAAA,GAC7C;AAGC,EAAA,OAAO,8CAAA;AAAA,IACP;AAAA,MAAC,GAAA,EAAK,CAAA,SAAA,CAAA;AAAA,MAAa,MAAA,EAAQ,KAAA;AAAA,MAAO;AAAA,IACpC,CAAA;AAAA,IACE;AAAA,EAAO,CAAA;AACT,CAAA;AAGG,IAAM,wBAAA,EAA0B,CAAA,EAAA,GAAM;AACzC,EAAA,OAAO,CAAC,oBAAA,EAAsB,CAAA,SAAA,CAAW,CAAA;AACzC,CAAA;AAGG,IAAM,4BAAA,EAA8B,CAAwF,OAAA,EAAA,GAC9H;AAEL,EAAA,MAAM,EAAC,KAAA,EAAO,YAAA,EAAc,OAAA,EAAS,eAAc,EAAA,mBAAI,OAAA,UAAW,CAAC,GAAA;AAEjE,EAAA,MAAM,SAAA,mBAAA,CAAY,aAAA,GAAA,KAAA,EAAA,KAAA,EAAA,EAAA,YAAA,CAAc,QAAA,CAAA,UAAY,uBAAA,CAAwB,GAAA;AAIlE,EAAA,MAAM,QAAA,EAAmE,CAAC,EAAE,OAAO,CAAA,EAAA,GAAM,YAAA,CAAa,cAAA,EAAgB,MAAM,CAAA;AAM7H,EAAA,OAAQ,EAAE,QAAA,EAAU,OAAA,EAAS,GAAG,aAAY,CAAA;AAC/C,CAAA;AAkCO,SAAS,eAAA,CACd,OAAA,EAE2D;AAE3D,EAAA,MAAM,aAAA,EAAe,2BAAA,CAA4B,OAAO,CAAA;AAExD,EAAA,MAAM,MAAA,EAAQ,kCAAA,YAAqB,CAAA;AAEnC,EAAA,KAAA,CAAM,SAAA,EAAW,YAA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G,EAAA;AAEV,EAAA;AACT;AD/O4B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/squonk2-account-server-js-client/squonk2-account-server-js-client/dist/merchant/merchant.cjs","sourcesContent":[null,"// @ts-nocheck\n/**\n * Generated by orval v7.2.0 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 4.1\n */\nimport {\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\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\nexport function useGetMerchants<TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>(\n options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getMerchants>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetMerchants<TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getMerchants>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function 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 * @summary Gets all Merchants\n */\n\nexport function 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\nexport function 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 }\nexport function 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 }\nexport function 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 * @summary Gets all Merchants\n */\n\nexport function 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\nexport function useGetService<TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(\n mId: number, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getService>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetService<TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(\n mId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getService>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function 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 * @summary Gets a specific Merchant\n */\n\nexport function 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\nexport function 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 }\nexport function 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 }\nexport function 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 * @summary Gets a specific Merchant\n */\n\nexport function 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"]}
|
package/merchant/merchant.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/merchant/merchant.ts"],"sourcesContent":["// @ts-nocheck\n/**\n * Generated by orval v7.2.0 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 4.0\n */\nimport {\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\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\nexport function useGetMerchants<TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>(\n options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getMerchants>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetMerchants<TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getMerchants>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function 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 * @summary Gets all Merchants\n */\n\nexport function 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\nexport function 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 }\nexport function 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 }\nexport function 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 * @summary Gets all Merchants\n */\n\nexport function 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\nexport function useGetService<TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(\n mId: number, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getService>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetService<TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(\n mId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getService>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function 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 * @summary Gets a specific Merchant\n */\n\nexport function 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\nexport function 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 }\nexport function 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 }\nexport function 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 * @summary Gets a specific Merchant\n */\n\nexport function 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":";;;;;AAWA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AA+BA,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;AAkCO,SAAS,gBACd,SAE2D;AAE3D,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;AAM7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,OAAO;AAElE,QAAM,QAAQ,iBAAiB,YAAY;AAE3C,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/merchant/merchant.ts"],"sourcesContent":["// @ts-nocheck\n/**\n * Generated by orval v7.2.0 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 4.1\n */\nimport {\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\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\nexport function useGetMerchants<TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>(\n options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getMerchants>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetMerchants<TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getMerchants>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function 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 * @summary Gets all Merchants\n */\n\nexport function 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\nexport function 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 }\nexport function 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 }\nexport function 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 * @summary Gets all Merchants\n */\n\nexport function 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\nexport function useGetService<TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(\n mId: number, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getService>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetService<TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(\n mId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getService>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function 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 * @summary Gets a specific Merchant\n */\n\nexport function 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\nexport function 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 }\nexport function 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 }\nexport function 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 * @summary Gets a specific Merchant\n */\n\nexport function 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":";;;;;AAWA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AA+BA,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;AAkCO,SAAS,gBACd,SAE2D;AAE3D,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;AAsBO,SAAS,wBACd,SAEmE;AAEnE,QAAM,eAAe,oCAAoC,OAAO;AAEhE,QAAM,QAAQ,iBAAiB,YAAY;AAE3C,QAAM,WAAW,aAAa;AAE9B,S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|
|
|
9
9
|
|
|
10
10
|
var _reactquery = require('@tanstack/react-query');
|
|
11
|
-
var getOrganisations = (options, signal) => {
|
|
11
|
+
var getOrganisations = (params, options, signal) => {
|
|
12
12
|
return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
|
|
13
13
|
{
|
|
14
14
|
url: `/organisation`,
|
|
15
15
|
method: "GET",
|
|
16
|
+
params,
|
|
16
17
|
signal
|
|
17
18
|
},
|
|
18
19
|
options
|
|
19
20
|
);
|
|
20
21
|
};
|
|
21
|
-
var getGetOrganisationsQueryKey = () => {
|
|
22
|
-
return ["account-server-api", `/organisation
|
|
22
|
+
var getGetOrganisationsQueryKey = (params) => {
|
|
23
|
+
return ["account-server-api", `/organisation`, ...params ? [params] : []];
|
|
23
24
|
};
|
|
24
|
-
var getGetOrganisationsQueryOptions = (options) => {
|
|
25
|
+
var getGetOrganisationsQueryOptions = (params, options) => {
|
|
25
26
|
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
26
|
-
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetOrganisationsQueryKey()));
|
|
27
|
-
const queryFn = ({ signal }) => getOrganisations(requestOptions, signal);
|
|
27
|
+
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetOrganisationsQueryKey(params)));
|
|
28
|
+
const queryFn = ({ signal }) => getOrganisations(params, requestOptions, signal);
|
|
28
29
|
return { queryKey, queryFn, ...queryOptions };
|
|
29
30
|
};
|
|
30
|
-
function useGetOrganisations(options) {
|
|
31
|
-
const queryOptions = getGetOrganisationsQueryOptions(options);
|
|
31
|
+
function useGetOrganisations(params, options) {
|
|
32
|
+
const queryOptions = getGetOrganisationsQueryOptions(params, options);
|
|
32
33
|
const query = _reactquery.useQuery.call(void 0, queryOptions);
|
|
33
34
|
query.queryKey = queryOptions.queryKey;
|
|
34
35
|
return query;
|
|
35
36
|
}
|
|
36
|
-
var getGetOrganisationsSuspenseQueryOptions = (options) => {
|
|
37
|
+
var getGetOrganisationsSuspenseQueryOptions = (params, options) => {
|
|
37
38
|
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
38
|
-
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetOrganisationsQueryKey()));
|
|
39
|
-
const queryFn = ({ signal }) => getOrganisations(requestOptions, signal);
|
|
39
|
+
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetOrganisationsQueryKey(params)));
|
|
40
|
+
const queryFn = ({ signal }) => getOrganisations(params, requestOptions, signal);
|
|
40
41
|
return { queryKey, queryFn, ...queryOptions };
|
|
41
42
|
};
|
|
42
|
-
function useGetOrganisationsSuspense(options) {
|
|
43
|
-
const queryOptions = getGetOrganisationsSuspenseQueryOptions(options);
|
|
43
|
+
function useGetOrganisationsSuspense(params, options) {
|
|
44
|
+
const queryOptions = getGetOrganisationsSuspenseQueryOptions(params, options);
|
|
44
45
|
const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions);
|
|
45
46
|
query.queryKey = queryOptions.queryKey;
|
|
46
47
|
return query;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/squonk2-account-server-js-client/squonk2-account-server-js-client/dist/organisation/organisation.cjs","../../src/organisation/organisation.ts"],"names":[],"mappings":"AAAA;AACE;AACF,yDAA8B;AAC9B;AACA;ACOA;AACE;AACA;AACA;AAAA,mDACK;AAsCA,IAAM,iBAAA,EAAmB,CAE/B,OAAA,EAAiD,MAAA,EAAA,GAC7C;AAGC,EAAA,OAAO,8CAAA;AAAA,IACP;AAAA,MAAC,GAAA,EAAK,CAAA,aAAA,CAAA;AAAA,MAAiB,MAAA,EAAQ,KAAA;AAAA,MAAO;AAAA,IACxC,CAAA;AAAA,IACE;AAAA,EAAO,CAAA;AACT,CAAA;AAGG,IAAM,4BAAA,EAA8B,CAAA,EAAA,GAAM;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BgB;AAKO,EAAA;AAEU,EAAA;AAED,EAAA;AAEvB,EAAA;AACT;ADzdkC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/squonk2-account-server-js-client/squonk2-account-server-js-client/dist/organisation/organisation.cjs","sourcesContent":[null,"// @ts-nocheck\n/**\n * Generated by orval v7.2.0 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 4.0\n */\nimport {\n useMutation,\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n MutationFunction,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseMutationOptions,\n UseMutationResult,\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\nexport function useGetOrganisations<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(\n options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getOrganisations>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetOrganisations<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getOrganisations>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function 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 * @summary Gets Organisations\n */\n\nexport function 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\nexport function 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 }\nexport function 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 }\nexport function 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 * @summary Gets Organisations\n */\n\nexport function 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> => {\nconst {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): UseMutationResult<\n Awaited<ReturnType<typeof createOrganisation>>,\n TError,\n {data: OrganisationPostBodyBody},\n TContext\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\nexport function useGetOrganisation<TData = Awaited<ReturnType<typeof getOrganisation>>, TError = ErrorType<void | AsError>>(\n orgId: string, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getOrganisation>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetOrganisation<TData = Awaited<ReturnType<typeof getOrganisation>>, TError = ErrorType<void | AsError>>(\n orgId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getOrganisation>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function 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 * @summary Gets an Organisation\n */\n\nexport function 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\nexport function 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 }\nexport function 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 }\nexport function 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 * @summary Gets an Organisation\n */\n\nexport function 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<void | 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> => {\nconst {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<void | AsError>\n\n /**\n * @summary Adjust an existing Organisation\n */\nexport const usePatchOrganisation = <TError = ErrorType<void | AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchOrganisation>>, TError,{orgId: string;data: OrganisationPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof patchOrganisation>>,\n TError,\n {orgId: string;data: OrganisationPatchBodyBody},\n TContext\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 | void>,\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> => {\nconst {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 | void>\n\n /**\n * @summary Deletes an Organisation\n */\nexport const useDeleteOrganisation = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisation>>, TError,{orgId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof deleteOrganisation>>,\n TError,\n {orgId: string},\n TContext\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: `/default/organisation`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetDefaultOrganisationQueryKey = () => {\n return [\"account-server-api\", `/default/organisation`] 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\nexport function useGetDefaultOrganisation<TData = Awaited<ReturnType<typeof getDefaultOrganisation>>, TError = ErrorType<void | AsError>>(\n options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetDefaultOrganisation<TData = Awaited<ReturnType<typeof getDefaultOrganisation>>, TError = ErrorType<void | AsError>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function 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 * @summary Gets the Default Organisation\n */\n\nexport function 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\nexport function 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 }\nexport function 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 }\nexport function 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 * @summary Gets the Default Organisation\n */\n\nexport function 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":["/home/runner/work/squonk2-account-server-js-client/squonk2-account-server-js-client/dist/organisation/organisation.cjs","../../src/organisation/organisation.ts"],"names":[],"mappings":"AAAA;AACE;AACF,yDAA8B;AAC9B;AACA;ACOA;AACE;AACA;AACA;AAAA,mDACK;AAuCA,IAAM,iBAAA,EAAmB,CAC5B,MAAA,EACH,OAAA,EAAiD,MAAA,EAAA,GAC7C;AAGC,EAAA,OAAO,8CAAA;AAAA,IACP;AAAA,MAAC,GAAA,EAAK,CAAA,aAAA,CAAA;AAAA,MAAiB,MAAA,EAAQ,KAAA;AAAA,MAC7B,MAAA;AAAA,MAAQ;AAAA,IACZ,CAAA;AAAA,IACE;AAAA,EAAO,CAAA;AAC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ACE,IAAA;AAAO,EAAA;AACT;AAGS;AACqB,EAAA;AAC9B;AAGS;AAGe,EAAA;AAER,EAAA;AAImF,EAAA;AAMpE,EAAA;AACnC;AAkCgB;AAKO,EAAA;AAEE,EAAA;AAEO,EAAA;AAEvB,EAAA;AACT;AAIa;AAGe,EAAA;AAER,EAAA;AAImF,EAAA;AAMpE,EAAA;AACnC;AAsBgB;AAKO,EAAA;AAEU,EAAA;AAED,EAAA;AAEvB,EAAA;AACT;AD1dkC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/squonk2-account-server-js-client/squonk2-account-server-js-client/dist/organisation/organisation.cjs","sourcesContent":[null,"// @ts-nocheck\n/**\n * Generated by orval v7.2.0 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 4.1\n */\nimport {\n useMutation,\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n MutationFunction,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseMutationOptions,\n UseMutationResult,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n AsError,\n GetOrganisationsParams,\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, or a specific Organisation by name.\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 params?: GetOrganisationsParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<OrganisationsGetResponse>(\n {url: `/organisation`, method: 'GET',\n params, signal\n },\n options);\n }\n \n\nexport const getGetOrganisationsQueryKey = (params?: GetOrganisationsParams,) => {\n return [\"account-server-api\", `/organisation`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetOrganisationsQueryOptions = <TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(params?: GetOrganisationsParams, 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(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisations>>> = ({ signal }) => getOrganisations(params, 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\nexport function useGetOrganisations<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(\n params: undefined | GetOrganisationsParams, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getOrganisations>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetOrganisations<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(\n params?: GetOrganisationsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getOrganisations>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetOrganisations<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(\n params?: GetOrganisationsParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\n/**\n * @summary Gets Organisations\n */\n\nexport function useGetOrganisations<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(\n params?: GetOrganisationsParams, 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(params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetOrganisationsSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(params?: GetOrganisationsParams, 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(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisations>>> = ({ signal }) => getOrganisations(params, 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\nexport function useGetOrganisationsSuspense<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(\n params: undefined | GetOrganisationsParams, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetOrganisationsSuspense<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(\n params?: GetOrganisationsParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetOrganisationsSuspense<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(\n params?: GetOrganisationsParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey }\n/**\n * @summary Gets Organisations\n */\n\nexport function useGetOrganisationsSuspense<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(\n params?: GetOrganisationsParams, 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(params,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> => {\nconst {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): UseMutationResult<\n Awaited<ReturnType<typeof createOrganisation>>,\n TError,\n {data: OrganisationPostBodyBody},\n TContext\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\nexport function useGetOrganisation<TData = Awaited<ReturnType<typeof getOrganisation>>, TError = ErrorType<void | AsError>>(\n orgId: string, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getOrganisation>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetOrganisation<TData = Awaited<ReturnType<typeof getOrganisation>>, TError = ErrorType<void | AsError>>(\n orgId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getOrganisation>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function 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 * @summary Gets an Organisation\n */\n\nexport function 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\nexport function 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 }\nexport function 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 }\nexport function 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 * @summary Gets an Organisation\n */\n\nexport function 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<void | 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> => {\nconst {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<void | AsError>\n\n /**\n * @summary Adjust an existing Organisation\n */\nexport const usePatchOrganisation = <TError = ErrorType<void | AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchOrganisation>>, TError,{orgId: string;data: OrganisationPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof patchOrganisation>>,\n TError,\n {orgId: string;data: OrganisationPatchBodyBody},\n TContext\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 | void>,\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> => {\nconst {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 | void>\n\n /**\n * @summary Deletes an Organisation\n */\nexport const useDeleteOrganisation = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisation>>, TError,{orgId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationResult<\n Awaited<ReturnType<typeof deleteOrganisation>>,\n TError,\n {orgId: string},\n TContext\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: `/default/organisation`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetDefaultOrganisationQueryKey = () => {\n return [\"account-server-api\", `/default/organisation`] 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\nexport function useGetDefaultOrganisation<TData = Awaited<ReturnType<typeof getDefaultOrganisation>>, TError = ErrorType<void | AsError>>(\n options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function useGetDefaultOrganisation<TData = Awaited<ReturnType<typeof getDefaultOrganisation>>, TError = ErrorType<void | AsError>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getDefaultOrganisation>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey }\nexport function 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 * @summary Gets the Default Organisation\n */\n\nexport function 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\nexport function 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 }\nexport function 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 }\nexport function 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 * @summary Gets the Default Organisation\n */\n\nexport function 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,18 +1,18 @@
|
|
|
1
1
|
import { UseQueryOptions, QueryKey, DefinedInitialDataOptions, DefinedUseQueryResult, UndefinedInitialDataOptions, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult, UseMutationOptions, UseMutationResult } from '@tanstack/react-query';
|
|
2
|
-
import { customInstance, OrganisationsGetResponse, ErrorType, AsError, OrganisationPostBodyBody, OrganisationPostResponse, OrganisationAllDetail, OrganisationPatchBodyBody, OrganisationGetDefaultResponse } from '../index.cjs';
|
|
2
|
+
import { GetOrganisationsParams, customInstance, OrganisationsGetResponse, ErrorType, AsError, OrganisationPostBodyBody, OrganisationPostResponse, OrganisationAllDetail, OrganisationPatchBodyBody, OrganisationGetDefaultResponse } from '../index.cjs';
|
|
3
3
|
import 'axios';
|
|
4
4
|
|
|
5
5
|
type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
|
|
6
6
|
/**
|
|
7
|
-
* Gets all the Organisations that you are a member of.
|
|
7
|
+
* Gets all the Organisations that you are a member of, or a specific Organisation by name.
|
|
8
8
|
|
|
9
9
|
You can see an Organisation if you are a member of it, the owner (creator) of it, or if you are an admin user.
|
|
10
10
|
|
|
11
11
|
* @summary Gets Organisations
|
|
12
12
|
*/
|
|
13
|
-
declare const getOrganisations: (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<OrganisationsGetResponse>;
|
|
14
|
-
declare const getGetOrganisationsQueryKey: () => readonly ["account-server-api", "/organisation"];
|
|
15
|
-
declare const getGetOrganisationsQueryOptions: <TData = OrganisationsGetResponse, TError = ErrorType<void | AsError>>(options?: {
|
|
13
|
+
declare const getOrganisations: (params?: GetOrganisationsParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<OrganisationsGetResponse>;
|
|
14
|
+
declare const getGetOrganisationsQueryKey: (params?: GetOrganisationsParams) => readonly ["account-server-api", "/organisation", ...GetOrganisationsParams[]];
|
|
15
|
+
declare const getGetOrganisationsQueryOptions: <TData = OrganisationsGetResponse, TError = ErrorType<void | AsError>>(params?: GetOrganisationsParams, options?: {
|
|
16
16
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>;
|
|
17
17
|
request?: SecondParameter<typeof customInstance>;
|
|
18
18
|
}) => UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData> & {
|
|
@@ -20,25 +20,25 @@ declare const getGetOrganisationsQueryOptions: <TData = OrganisationsGetResponse
|
|
|
20
20
|
};
|
|
21
21
|
type GetOrganisationsQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisations>>>;
|
|
22
22
|
type GetOrganisationsQueryError = ErrorType<void | AsError>;
|
|
23
|
-
declare function useGetOrganisations<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(options: {
|
|
23
|
+
declare function useGetOrganisations<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(params: undefined | GetOrganisationsParams, options: {
|
|
24
24
|
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>, 'initialData'>;
|
|
25
25
|
request?: SecondParameter<typeof customInstance>;
|
|
26
26
|
}): DefinedUseQueryResult<TData, TError> & {
|
|
27
27
|
queryKey: QueryKey;
|
|
28
28
|
};
|
|
29
|
-
declare function useGetOrganisations<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(options?: {
|
|
29
|
+
declare function useGetOrganisations<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(params?: GetOrganisationsParams, options?: {
|
|
30
30
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>, 'initialData'>;
|
|
31
31
|
request?: SecondParameter<typeof customInstance>;
|
|
32
32
|
}): UseQueryResult<TData, TError> & {
|
|
33
33
|
queryKey: QueryKey;
|
|
34
34
|
};
|
|
35
|
-
declare function useGetOrganisations<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(options?: {
|
|
35
|
+
declare function useGetOrganisations<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(params?: GetOrganisationsParams, options?: {
|
|
36
36
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>;
|
|
37
37
|
request?: SecondParameter<typeof customInstance>;
|
|
38
38
|
}): UseQueryResult<TData, TError> & {
|
|
39
39
|
queryKey: QueryKey;
|
|
40
40
|
};
|
|
41
|
-
declare const getGetOrganisationsSuspenseQueryOptions: <TData = OrganisationsGetResponse, TError = ErrorType<void | AsError>>(options?: {
|
|
41
|
+
declare const getGetOrganisationsSuspenseQueryOptions: <TData = OrganisationsGetResponse, TError = ErrorType<void | AsError>>(params?: GetOrganisationsParams, options?: {
|
|
42
42
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>;
|
|
43
43
|
request?: SecondParameter<typeof customInstance>;
|
|
44
44
|
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData> & {
|
|
@@ -46,19 +46,19 @@ declare const getGetOrganisationsSuspenseQueryOptions: <TData = OrganisationsGet
|
|
|
46
46
|
};
|
|
47
47
|
type GetOrganisationsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisations>>>;
|
|
48
48
|
type GetOrganisationsSuspenseQueryError = ErrorType<void | AsError>;
|
|
49
|
-
declare function useGetOrganisationsSuspense<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(options: {
|
|
49
|
+
declare function useGetOrganisationsSuspense<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(params: undefined | GetOrganisationsParams, options: {
|
|
50
50
|
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>;
|
|
51
51
|
request?: SecondParameter<typeof customInstance>;
|
|
52
52
|
}): UseSuspenseQueryResult<TData, TError> & {
|
|
53
53
|
queryKey: QueryKey;
|
|
54
54
|
};
|
|
55
|
-
declare function useGetOrganisationsSuspense<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(options?: {
|
|
55
|
+
declare function useGetOrganisationsSuspense<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(params?: GetOrganisationsParams, options?: {
|
|
56
56
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>;
|
|
57
57
|
request?: SecondParameter<typeof customInstance>;
|
|
58
58
|
}): UseSuspenseQueryResult<TData, TError> & {
|
|
59
59
|
queryKey: QueryKey;
|
|
60
60
|
};
|
|
61
|
-
declare function useGetOrganisationsSuspense<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(options?: {
|
|
61
|
+
declare function useGetOrganisationsSuspense<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(params?: GetOrganisationsParams, options?: {
|
|
62
62
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>;
|
|
63
63
|
request?: SecondParameter<typeof customInstance>;
|
|
64
64
|
}): UseSuspenseQueryResult<TData, TError> & {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { UseQueryOptions, QueryKey, DefinedInitialDataOptions, DefinedUseQueryResult, UndefinedInitialDataOptions, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult, UseMutationOptions, UseMutationResult } from '@tanstack/react-query';
|
|
2
|
-
import { customInstance, OrganisationsGetResponse, ErrorType, AsError, OrganisationPostBodyBody, OrganisationPostResponse, OrganisationAllDetail, OrganisationPatchBodyBody, OrganisationGetDefaultResponse } from '../index.js';
|
|
2
|
+
import { GetOrganisationsParams, customInstance, OrganisationsGetResponse, ErrorType, AsError, OrganisationPostBodyBody, OrganisationPostResponse, OrganisationAllDetail, OrganisationPatchBodyBody, OrganisationGetDefaultResponse } from '../index.js';
|
|
3
3
|
import 'axios';
|
|
4
4
|
|
|
5
5
|
type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
|
|
6
6
|
/**
|
|
7
|
-
* Gets all the Organisations that you are a member of.
|
|
7
|
+
* Gets all the Organisations that you are a member of, or a specific Organisation by name.
|
|
8
8
|
|
|
9
9
|
You can see an Organisation if you are a member of it, the owner (creator) of it, or if you are an admin user.
|
|
10
10
|
|
|
11
11
|
* @summary Gets Organisations
|
|
12
12
|
*/
|
|
13
|
-
declare const getOrganisations: (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<OrganisationsGetResponse>;
|
|
14
|
-
declare const getGetOrganisationsQueryKey: () => readonly ["account-server-api", "/organisation"];
|
|
15
|
-
declare const getGetOrganisationsQueryOptions: <TData = OrganisationsGetResponse, TError = ErrorType<void | AsError>>(options?: {
|
|
13
|
+
declare const getOrganisations: (params?: GetOrganisationsParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<OrganisationsGetResponse>;
|
|
14
|
+
declare const getGetOrganisationsQueryKey: (params?: GetOrganisationsParams) => readonly ["account-server-api", "/organisation", ...GetOrganisationsParams[]];
|
|
15
|
+
declare const getGetOrganisationsQueryOptions: <TData = OrganisationsGetResponse, TError = ErrorType<void | AsError>>(params?: GetOrganisationsParams, options?: {
|
|
16
16
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>;
|
|
17
17
|
request?: SecondParameter<typeof customInstance>;
|
|
18
18
|
}) => UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData> & {
|
|
@@ -20,25 +20,25 @@ declare const getGetOrganisationsQueryOptions: <TData = OrganisationsGetResponse
|
|
|
20
20
|
};
|
|
21
21
|
type GetOrganisationsQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisations>>>;
|
|
22
22
|
type GetOrganisationsQueryError = ErrorType<void | AsError>;
|
|
23
|
-
declare function useGetOrganisations<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(options: {
|
|
23
|
+
declare function useGetOrganisations<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(params: undefined | GetOrganisationsParams, options: {
|
|
24
24
|
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>, 'initialData'>;
|
|
25
25
|
request?: SecondParameter<typeof customInstance>;
|
|
26
26
|
}): DefinedUseQueryResult<TData, TError> & {
|
|
27
27
|
queryKey: QueryKey;
|
|
28
28
|
};
|
|
29
|
-
declare function useGetOrganisations<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(options?: {
|
|
29
|
+
declare function useGetOrganisations<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(params?: GetOrganisationsParams, options?: {
|
|
30
30
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>, 'initialData'>;
|
|
31
31
|
request?: SecondParameter<typeof customInstance>;
|
|
32
32
|
}): UseQueryResult<TData, TError> & {
|
|
33
33
|
queryKey: QueryKey;
|
|
34
34
|
};
|
|
35
|
-
declare function useGetOrganisations<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(options?: {
|
|
35
|
+
declare function useGetOrganisations<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(params?: GetOrganisationsParams, options?: {
|
|
36
36
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>;
|
|
37
37
|
request?: SecondParameter<typeof customInstance>;
|
|
38
38
|
}): UseQueryResult<TData, TError> & {
|
|
39
39
|
queryKey: QueryKey;
|
|
40
40
|
};
|
|
41
|
-
declare const getGetOrganisationsSuspenseQueryOptions: <TData = OrganisationsGetResponse, TError = ErrorType<void | AsError>>(options?: {
|
|
41
|
+
declare const getGetOrganisationsSuspenseQueryOptions: <TData = OrganisationsGetResponse, TError = ErrorType<void | AsError>>(params?: GetOrganisationsParams, options?: {
|
|
42
42
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>;
|
|
43
43
|
request?: SecondParameter<typeof customInstance>;
|
|
44
44
|
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData> & {
|
|
@@ -46,19 +46,19 @@ declare const getGetOrganisationsSuspenseQueryOptions: <TData = OrganisationsGet
|
|
|
46
46
|
};
|
|
47
47
|
type GetOrganisationsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisations>>>;
|
|
48
48
|
type GetOrganisationsSuspenseQueryError = ErrorType<void | AsError>;
|
|
49
|
-
declare function useGetOrganisationsSuspense<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(options: {
|
|
49
|
+
declare function useGetOrganisationsSuspense<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(params: undefined | GetOrganisationsParams, options: {
|
|
50
50
|
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>;
|
|
51
51
|
request?: SecondParameter<typeof customInstance>;
|
|
52
52
|
}): UseSuspenseQueryResult<TData, TError> & {
|
|
53
53
|
queryKey: QueryKey;
|
|
54
54
|
};
|
|
55
|
-
declare function useGetOrganisationsSuspense<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(options?: {
|
|
55
|
+
declare function useGetOrganisationsSuspense<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(params?: GetOrganisationsParams, options?: {
|
|
56
56
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>;
|
|
57
57
|
request?: SecondParameter<typeof customInstance>;
|
|
58
58
|
}): UseSuspenseQueryResult<TData, TError> & {
|
|
59
59
|
queryKey: QueryKey;
|
|
60
60
|
};
|
|
61
|
-
declare function useGetOrganisationsSuspense<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(options?: {
|
|
61
|
+
declare function useGetOrganisationsSuspense<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(params?: GetOrganisationsParams, options?: {
|
|
62
62
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>;
|
|
63
63
|
request?: SecondParameter<typeof customInstance>;
|
|
64
64
|
}): UseSuspenseQueryResult<TData, TError> & {
|