@squonk/account-server-client 3.1.0-alpha.3 → 4.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/asset/asset.cjs +24 -24
  2. package/asset/asset.cjs.map +1 -1
  3. package/asset/asset.d.cts +137 -102
  4. package/asset/asset.d.ts +137 -102
  5. package/asset/asset.js +24 -24
  6. package/asset/asset.js.map +1 -1
  7. package/charges/charges.cjs +16 -16
  8. package/charges/charges.cjs.map +1 -1
  9. package/charges/charges.d.cts +137 -65
  10. package/charges/charges.d.ts +137 -65
  11. package/charges/charges.js +16 -16
  12. package/charges/charges.js.map +1 -1
  13. package/chunk-TKLTUR4R.cjs.map +1 -1
  14. package/event-stream/event-stream.cjs +8 -8
  15. package/event-stream/event-stream.cjs.map +1 -1
  16. package/event-stream/event-stream.d.cts +82 -47
  17. package/event-stream/event-stream.d.ts +82 -47
  18. package/event-stream/event-stream.js +8 -8
  19. package/event-stream/event-stream.js.map +1 -1
  20. package/index.cjs.map +1 -1
  21. package/index.d.cts +62 -14
  22. package/index.d.ts +62 -14
  23. package/index.js.map +1 -1
  24. package/merchant/merchant.cjs +8 -8
  25. package/merchant/merchant.cjs.map +1 -1
  26. package/merchant/merchant.d.cts +69 -33
  27. package/merchant/merchant.d.ts +69 -33
  28. package/merchant/merchant.js +8 -8
  29. package/merchant/merchant.js.map +1 -1
  30. package/organisation/organisation.cjs +14 -14
  31. package/organisation/organisation.cjs.map +1 -1
  32. package/organisation/organisation.d.cts +128 -75
  33. package/organisation/organisation.d.ts +128 -75
  34. package/organisation/organisation.js +14 -14
  35. package/organisation/organisation.js.map +1 -1
  36. package/package.json +7 -7
  37. package/product/product.cjs +24 -24
  38. package/product/product.cjs.map +1 -1
  39. package/product/product.d.cts +229 -122
  40. package/product/product.d.ts +229 -122
  41. package/product/product.js +24 -24
  42. package/product/product.js.map +1 -1
  43. package/src/account-server-api.schemas.ts +63 -14
  44. package/src/asset/asset.ts +185 -65
  45. package/src/charges/charges.ts +200 -18
  46. package/src/event-stream/event-stream.ts +114 -19
  47. package/src/merchant/merchant.ts +94 -10
  48. package/src/organisation/organisation.ts +171 -31
  49. package/src/product/product.ts +301 -41
  50. package/src/state/state.ts +50 -6
  51. package/src/unit/unit.ts +188 -38
  52. package/src/user/user.ts +183 -38
  53. package/state/state.cjs +4 -4
  54. package/state/state.cjs.map +1 -1
  55. package/state/state.d.cts +35 -17
  56. package/state/state.d.ts +35 -17
  57. package/state/state.js +4 -4
  58. package/state/state.js.map +1 -1
  59. package/unit/unit.cjs +12 -12
  60. package/unit/unit.cjs.map +1 -1
  61. package/unit/unit.d.cts +140 -87
  62. package/unit/unit.d.ts +140 -87
  63. package/unit/unit.js +12 -12
  64. package/unit/unit.js.map +1 -1
  65. package/user/user.cjs +12 -12
  66. package/user/user.cjs.map +1 -1
  67. package/user/user.d.cts +139 -86
  68. package/user/user.d.ts +139 -86
  69. package/user/user.js +12 -12
  70. package/user/user.js.map +1 -1
@@ -1,4 +1,4 @@
1
- import { UseQueryOptions, QueryKey, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult } from '@tanstack/react-query';
1
+ import { UseQueryOptions, QueryKey, DefinedInitialDataOptions, DefinedUseQueryResult, UndefinedInitialDataOptions, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult } from '@tanstack/react-query';
2
2
  import { customInstance, MerchantsGetResponse, ErrorType, AsError, MerchantDetail } from '../index.js';
3
3
  import 'axios';
4
4
 
@@ -13,37 +13,55 @@ Merchants are software services (SaaS assets) whose facilities are known to and
13
13
  declare const getMerchants: (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<MerchantsGetResponse>;
14
14
  declare const getGetMerchantsQueryKey: () => readonly ["account-server-api", "/merchant"];
15
15
  declare const getGetMerchantsQueryOptions: <TData = MerchantsGetResponse, TError = ErrorType<void | AsError>>(options?: {
16
- query?: Partial<UseQueryOptions<MerchantsGetResponse, TError, TData, QueryKey>> | undefined;
16
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>;
17
17
  request?: SecondParameter<typeof customInstance>;
18
- } | undefined) => UseQueryOptions<MerchantsGetResponse, TError, TData, QueryKey> & {
18
+ }) => UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData> & {
19
19
  queryKey: QueryKey;
20
20
  };
21
21
  type GetMerchantsQueryResult = NonNullable<Awaited<ReturnType<typeof getMerchants>>>;
22
22
  type GetMerchantsQueryError = ErrorType<AsError | void>;
23
- /**
24
- * @summary Gets all Merchants
25
- */
26
- declare const useGetMerchants: <TData = MerchantsGetResponse, TError = ErrorType<void | AsError>>(options?: {
27
- query?: Partial<UseQueryOptions<MerchantsGetResponse, TError, TData, QueryKey>> | undefined;
23
+ declare function useGetMerchants<TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>(options: {
24
+ query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>, 'initialData'>;
25
+ request?: SecondParameter<typeof customInstance>;
26
+ }): DefinedUseQueryResult<TData, TError> & {
27
+ queryKey: QueryKey;
28
+ };
29
+ declare function useGetMerchants<TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>(options?: {
30
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>, 'initialData'>;
31
+ request?: SecondParameter<typeof customInstance>;
32
+ }): UseQueryResult<TData, TError> & {
33
+ queryKey: QueryKey;
34
+ };
35
+ declare function useGetMerchants<TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>(options?: {
36
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>;
28
37
  request?: SecondParameter<typeof customInstance>;
29
- } | undefined) => UseQueryResult<TData, TError> & {
38
+ }): UseQueryResult<TData, TError> & {
30
39
  queryKey: QueryKey;
31
40
  };
32
41
  declare const getGetMerchantsSuspenseQueryOptions: <TData = MerchantsGetResponse, TError = ErrorType<void | AsError>>(options?: {
33
- query?: Partial<UseSuspenseQueryOptions<MerchantsGetResponse, TError, TData, QueryKey>> | undefined;
42
+ query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>;
34
43
  request?: SecondParameter<typeof customInstance>;
35
- } | undefined) => UseSuspenseQueryOptions<MerchantsGetResponse, TError, TData, QueryKey> & {
44
+ }) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData> & {
36
45
  queryKey: QueryKey;
37
46
  };
38
47
  type GetMerchantsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getMerchants>>>;
39
48
  type GetMerchantsSuspenseQueryError = ErrorType<AsError | void>;
40
- /**
41
- * @summary Gets all Merchants
42
- */
43
- declare const useGetMerchantsSuspense: <TData = MerchantsGetResponse, TError = ErrorType<void | AsError>>(options?: {
44
- query?: Partial<UseSuspenseQueryOptions<MerchantsGetResponse, TError, TData, QueryKey>> | undefined;
49
+ declare function useGetMerchantsSuspense<TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>(options: {
50
+ query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>;
51
+ request?: SecondParameter<typeof customInstance>;
52
+ }): UseSuspenseQueryResult<TData, TError> & {
53
+ queryKey: QueryKey;
54
+ };
55
+ declare function useGetMerchantsSuspense<TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>(options?: {
56
+ query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>;
57
+ request?: SecondParameter<typeof customInstance>;
58
+ }): UseSuspenseQueryResult<TData, TError> & {
59
+ queryKey: QueryKey;
60
+ };
61
+ declare function useGetMerchantsSuspense<TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>(options?: {
62
+ query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>;
45
63
  request?: SecondParameter<typeof customInstance>;
46
- } | undefined) => UseSuspenseQueryResult<TData, TError> & {
64
+ }): UseSuspenseQueryResult<TData, TError> & {
47
65
  queryKey: QueryKey;
48
66
  };
49
67
  /**
@@ -54,37 +72,55 @@ declare const useGetMerchantsSuspense: <TData = MerchantsGetResponse, TError = E
54
72
  declare const getService: (mId: number, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<MerchantDetail>;
55
73
  declare const getGetServiceQueryKey: (mId: number) => readonly ["account-server-api", `/merchant/${number}`];
56
74
  declare const getGetServiceQueryOptions: <TData = MerchantDetail, TError = ErrorType<void | AsError>>(mId: number, options?: {
57
- query?: Partial<UseQueryOptions<MerchantDetail, TError, TData, QueryKey>> | undefined;
75
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>;
58
76
  request?: SecondParameter<typeof customInstance>;
59
- } | undefined) => UseQueryOptions<MerchantDetail, TError, TData, QueryKey> & {
77
+ }) => UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData> & {
60
78
  queryKey: QueryKey;
61
79
  };
62
80
  type GetServiceQueryResult = NonNullable<Awaited<ReturnType<typeof getService>>>;
63
81
  type GetServiceQueryError = ErrorType<AsError | void>;
64
- /**
65
- * @summary Gets a specific Merchant
66
- */
67
- declare const useGetService: <TData = MerchantDetail, TError = ErrorType<void | AsError>>(mId: number, options?: {
68
- query?: Partial<UseQueryOptions<MerchantDetail, TError, TData, QueryKey>> | undefined;
82
+ declare function useGetService<TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(mId: number, options: {
83
+ query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getService>>, TError, TData>, 'initialData'>;
84
+ request?: SecondParameter<typeof customInstance>;
85
+ }): DefinedUseQueryResult<TData, TError> & {
86
+ queryKey: QueryKey;
87
+ };
88
+ declare function useGetService<TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(mId: number, options?: {
89
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getService>>, TError, TData>, 'initialData'>;
90
+ request?: SecondParameter<typeof customInstance>;
91
+ }): UseQueryResult<TData, TError> & {
92
+ queryKey: QueryKey;
93
+ };
94
+ declare function useGetService<TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(mId: number, options?: {
95
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>;
69
96
  request?: SecondParameter<typeof customInstance>;
70
- } | undefined) => UseQueryResult<TData, TError> & {
97
+ }): UseQueryResult<TData, TError> & {
71
98
  queryKey: QueryKey;
72
99
  };
73
100
  declare const getGetServiceSuspenseQueryOptions: <TData = MerchantDetail, TError = ErrorType<void | AsError>>(mId: number, options?: {
74
- query?: Partial<UseSuspenseQueryOptions<MerchantDetail, TError, TData, QueryKey>> | undefined;
101
+ query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>;
75
102
  request?: SecondParameter<typeof customInstance>;
76
- } | undefined) => UseSuspenseQueryOptions<MerchantDetail, TError, TData, QueryKey> & {
103
+ }) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData> & {
77
104
  queryKey: QueryKey;
78
105
  };
79
106
  type GetServiceSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getService>>>;
80
107
  type GetServiceSuspenseQueryError = ErrorType<AsError | void>;
81
- /**
82
- * @summary Gets a specific Merchant
83
- */
84
- declare const useGetServiceSuspense: <TData = MerchantDetail, TError = ErrorType<void | AsError>>(mId: number, options?: {
85
- query?: Partial<UseSuspenseQueryOptions<MerchantDetail, TError, TData, QueryKey>> | undefined;
108
+ declare function useGetServiceSuspense<TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(mId: number, options: {
109
+ query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>;
110
+ request?: SecondParameter<typeof customInstance>;
111
+ }): UseSuspenseQueryResult<TData, TError> & {
112
+ queryKey: QueryKey;
113
+ };
114
+ declare function useGetServiceSuspense<TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(mId: number, options?: {
115
+ query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>;
116
+ request?: SecondParameter<typeof customInstance>;
117
+ }): UseSuspenseQueryResult<TData, TError> & {
118
+ queryKey: QueryKey;
119
+ };
120
+ declare function useGetServiceSuspense<TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(mId: number, options?: {
121
+ query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>;
86
122
  request?: SecondParameter<typeof customInstance>;
87
- } | undefined) => UseSuspenseQueryResult<TData, TError> & {
123
+ }): UseSuspenseQueryResult<TData, TError> & {
88
124
  queryKey: QueryKey;
89
125
  };
90
126
 
@@ -26,24 +26,24 @@ var getGetMerchantsQueryOptions = (options) => {
26
26
  const queryFn = ({ signal }) => getMerchants(requestOptions, signal);
27
27
  return { queryKey, queryFn, ...queryOptions };
28
28
  };
29
- var useGetMerchants = (options) => {
29
+ function useGetMerchants(options) {
30
30
  const queryOptions = getGetMerchantsQueryOptions(options);
31
31
  const query = useQuery(queryOptions);
32
32
  query.queryKey = queryOptions.queryKey;
33
33
  return query;
34
- };
34
+ }
35
35
  var getGetMerchantsSuspenseQueryOptions = (options) => {
36
36
  const { query: queryOptions, request: requestOptions } = options ?? {};
37
37
  const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetMerchantsQueryKey();
38
38
  const queryFn = ({ signal }) => getMerchants(requestOptions, signal);
39
39
  return { queryKey, queryFn, ...queryOptions };
40
40
  };
41
- var useGetMerchantsSuspense = (options) => {
41
+ function useGetMerchantsSuspense(options) {
42
42
  const queryOptions = getGetMerchantsSuspenseQueryOptions(options);
43
43
  const query = useSuspenseQuery(queryOptions);
44
44
  query.queryKey = queryOptions.queryKey;
45
45
  return query;
46
- };
46
+ }
47
47
  var getService = (mId, options, signal) => {
48
48
  return customInstance(
49
49
  {
@@ -63,24 +63,24 @@ var getGetServiceQueryOptions = (mId, options) => {
63
63
  const queryFn = ({ signal }) => getService(mId, requestOptions, signal);
64
64
  return { queryKey, queryFn, enabled: !!mId, ...queryOptions };
65
65
  };
66
- var useGetService = (mId, options) => {
66
+ function useGetService(mId, options) {
67
67
  const queryOptions = getGetServiceQueryOptions(mId, options);
68
68
  const query = useQuery(queryOptions);
69
69
  query.queryKey = queryOptions.queryKey;
70
70
  return query;
71
- };
71
+ }
72
72
  var getGetServiceSuspenseQueryOptions = (mId, options) => {
73
73
  const { query: queryOptions, request: requestOptions } = options ?? {};
74
74
  const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetServiceQueryKey(mId);
75
75
  const queryFn = ({ signal }) => getService(mId, requestOptions, signal);
76
76
  return { queryKey, queryFn, enabled: !!mId, ...queryOptions };
77
77
  };
78
- var useGetServiceSuspense = (mId, options) => {
78
+ function useGetServiceSuspense(mId, options) {
79
79
  const queryOptions = getGetServiceSuspenseQueryOptions(mId, options);
80
80
  const query = useSuspenseQuery(queryOptions);
81
81
  query.queryKey = queryOptions.queryKey;
82
82
  return query;
83
- };
83
+ }
84
84
  export {
85
85
  getGetMerchantsQueryKey,
86
86
  getGetMerchantsQueryOptions,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/merchant/merchant.ts"],"sourcesContent":["/**\n * Generated by orval v6.25.0 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 3.1\n */\nimport {\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n QueryFunction,\n QueryKey,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n AsError,\n MerchantDetail,\n MerchantsGetResponse\n} from '../account-server-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\ntype SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];\n\n\n/**\n * Gets Merchants known to the Account Server\n\nMerchants are software services (SaaS assets) whose facilities are known to and controlled by the Account Server\n\n * @summary Gets all Merchants\n */\nexport const getMerchants = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<MerchantsGetResponse>(\n {url: `/merchant`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetMerchantsQueryKey = () => {\n return [\"account-server-api\", `/merchant`] as const;\n }\n\n \nexport const getGetMerchantsQueryOptions = <TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetMerchantsQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMerchants>>> = ({ signal }) => getMerchants(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetMerchantsQueryResult = NonNullable<Awaited<ReturnType<typeof getMerchants>>>\nexport type GetMerchantsQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets all Merchants\n */\nexport const useGetMerchants = <TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetMerchantsQueryOptions(options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetMerchantsSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>( options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetMerchantsQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMerchants>>> = ({ signal }) => getMerchants(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetMerchantsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getMerchants>>>\nexport type GetMerchantsSuspenseQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets all Merchants\n */\nexport const useGetMerchantsSuspense = <TData = Awaited<ReturnType<typeof getMerchants>>, TError = ErrorType<AsError | void>>(\n options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getMerchants>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetMerchantsSuspenseQueryOptions(options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Gets a known Merchant\n\n * @summary Gets a specific Merchant\n */\nexport const getService = (\n mId: number,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<MerchantDetail>(\n {url: `/merchant/${mId}`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetServiceQueryKey = (mId: number,) => {\n return [\"account-server-api\", `/merchant/${mId}`] as const;\n }\n\n \nexport const getGetServiceQueryOptions = <TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(mId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetServiceQueryKey(mId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getService>>> = ({ signal }) => getService(mId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(mId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetServiceQueryResult = NonNullable<Awaited<ReturnType<typeof getService>>>\nexport type GetServiceQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets a specific Merchant\n */\nexport const useGetService = <TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(\n mId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetServiceQueryOptions(mId,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetServiceSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(mId: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetServiceQueryKey(mId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getService>>> = ({ signal }) => getService(mId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(mId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetServiceSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getService>>>\nexport type GetServiceSuspenseQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets a specific Merchant\n */\nexport const useGetServiceSuspense = <TData = Awaited<ReturnType<typeof getService>>, TError = ErrorType<AsError | void>>(\n mId: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getService>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetServiceSuspenseQueryOptions(mId,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n"],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AA4BA,IAAM,eAAe,CAE3B,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAa,QAAQ;AAAA,MAAO;AAAA,IACpC;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,0BAA0B,MAAM;AACzC,SAAO,CAAC,sBAAsB,WAAW;AACzC;AAGG,IAAM,8BAA8B,CAAwF,YAC9H;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,e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,CAAE,KAAM,GAAG,aAAY;AACjE;AAQO,IAAM,gBAAgB,CAC5B,KAAa,YAEkD;AAE9D,QAAM,eAAe,0BAA0B,KAAI,OAAO;AAE1D,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAIO,IAAM,oCAAoC,CAAqF,KAAa,YAC9I;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,sBAAsB,GAAG;AAInE,QAAM,UAAiE,CAAC,EAAE,OAAO,MAAM,WAAW,KAAK,gBAAgB,MAAM;AAM9H,SAAQ,EAAE,UAAU,SAAS,SAAS,CAAC,CAAE,KAAM,GAAG,aAAY;AACjE;AAQO,IAAM,wBAAwB,CACpC,KAAa,YAE0D;AAEtE,QAAM,eAAe,kCAAkC,KAAI,OAAO;AAElE,QAAM,QAAQ,iBAAiB,YAAY;AAE3C,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;","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.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,U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,SAAO;AACT;AAIO,IAAM,oCAAoC,CAAqF,KAAa,YAC9I;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,sBAAsB,GAAG;AAInE,QAAM,UAAiE,CAAC,EAAE,OAAO,MAAM,WAAW,KAAK,gBAAgB,MAAM;AAM9H,SAAQ,EAAE,UAAU,SAAS,SAAS,CAAC,CAAE,KAAM,GAAG,aAAY;AACjE;AAsBO,SAAS,sBACf,KAAa,SAEuD;AAEnE,QAAM,eAAe,kCAAkC,KAAI,OAAO;AAElE,QAAM,QAAQ,iBAAiB,YAAY;AAE3C,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;","names":[]}
@@ -27,24 +27,24 @@ var getGetOrganisationsQueryOptions = (options) => {
27
27
  const queryFn = ({ signal }) => getOrganisations(requestOptions, signal);
28
28
  return { queryKey, queryFn, ...queryOptions };
29
29
  };
30
- var useGetOrganisations = (options) => {
30
+ function useGetOrganisations(options) {
31
31
  const queryOptions = getGetOrganisationsQueryOptions(options);
32
32
  const query = _reactquery.useQuery.call(void 0, queryOptions);
33
33
  query.queryKey = queryOptions.queryKey;
34
34
  return query;
35
- };
35
+ }
36
36
  var getGetOrganisationsSuspenseQueryOptions = (options) => {
37
37
  const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
38
38
  const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetOrganisationsQueryKey()));
39
39
  const queryFn = ({ signal }) => getOrganisations(requestOptions, signal);
40
40
  return { queryKey, queryFn, ...queryOptions };
41
41
  };
42
- var useGetOrganisationsSuspense = (options) => {
42
+ function useGetOrganisationsSuspense(options) {
43
43
  const queryOptions = getGetOrganisationsSuspenseQueryOptions(options);
44
44
  const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions);
45
45
  query.queryKey = queryOptions.queryKey;
46
46
  return query;
47
- };
47
+ }
48
48
  var createOrganisation = (organisationPostBodyBody, options) => {
49
49
  return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
50
50
  {
@@ -87,24 +87,24 @@ var getGetOrganisationQueryOptions = (orgId, options) => {
87
87
  const queryFn = ({ signal }) => getOrganisation(orgId, requestOptions, signal);
88
88
  return { queryKey, queryFn, enabled: !!orgId, ...queryOptions };
89
89
  };
90
- var useGetOrganisation = (orgId, options) => {
90
+ function useGetOrganisation(orgId, options) {
91
91
  const queryOptions = getGetOrganisationQueryOptions(orgId, options);
92
92
  const query = _reactquery.useQuery.call(void 0, queryOptions);
93
93
  query.queryKey = queryOptions.queryKey;
94
94
  return query;
95
- };
95
+ }
96
96
  var getGetOrganisationSuspenseQueryOptions = (orgId, options) => {
97
97
  const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
98
98
  const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetOrganisationQueryKey(orgId)));
99
99
  const queryFn = ({ signal }) => getOrganisation(orgId, requestOptions, signal);
100
100
  return { queryKey, queryFn, enabled: !!orgId, ...queryOptions };
101
101
  };
102
- var useGetOrganisationSuspense = (orgId, options) => {
102
+ function useGetOrganisationSuspense(orgId, options) {
103
103
  const queryOptions = getGetOrganisationSuspenseQueryOptions(orgId, options);
104
104
  const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions);
105
105
  query.queryKey = queryOptions.queryKey;
106
106
  return query;
107
- };
107
+ }
108
108
  var patchOrganisation = (orgId, organisationPatchBodyBody, options) => {
109
109
  return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
110
110
  {
@@ -152,7 +152,7 @@ var useDeleteOrganisation = (options) => {
152
152
  var getDefaultOrganisation = (options, signal) => {
153
153
  return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
154
154
  {
155
- url: `/organisation/default`,
155
+ url: `/default/organisation`,
156
156
  method: "GET",
157
157
  signal
158
158
  },
@@ -160,7 +160,7 @@ var getDefaultOrganisation = (options, signal) => {
160
160
  );
161
161
  };
162
162
  var getGetDefaultOrganisationQueryKey = () => {
163
- return ["account-server-api", `/organisation/default`];
163
+ return ["account-server-api", `/default/organisation`];
164
164
  };
165
165
  var getGetDefaultOrganisationQueryOptions = (options) => {
166
166
  const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
@@ -168,24 +168,24 @@ var getGetDefaultOrganisationQueryOptions = (options) => {
168
168
  const queryFn = ({ signal }) => getDefaultOrganisation(requestOptions, signal);
169
169
  return { queryKey, queryFn, ...queryOptions };
170
170
  };
171
- var useGetDefaultOrganisation = (options) => {
171
+ function useGetDefaultOrganisation(options) {
172
172
  const queryOptions = getGetDefaultOrganisationQueryOptions(options);
173
173
  const query = _reactquery.useQuery.call(void 0, queryOptions);
174
174
  query.queryKey = queryOptions.queryKey;
175
175
  return query;
176
- };
176
+ }
177
177
  var getGetDefaultOrganisationSuspenseQueryOptions = (options) => {
178
178
  const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
179
179
  const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetDefaultOrganisationQueryKey()));
180
180
  const queryFn = ({ signal }) => getDefaultOrganisation(requestOptions, signal);
181
181
  return { queryKey, queryFn, ...queryOptions };
182
182
  };
183
- var useGetDefaultOrganisationSuspense = (options) => {
183
+ function useGetDefaultOrganisationSuspense(options) {
184
184
  const queryOptions = getGetDefaultOrganisationSuspenseQueryOptions(options);
185
185
  const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions);
186
186
  query.queryKey = queryOptions.queryKey;
187
187
  return query;
188
- };
188
+ }
189
189
 
190
190
 
191
191
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/organisation/organisation.ts"],"names":[],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAkCA,IAAM,mBAAmB,CAE/B,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,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AAwB,CACb,YACnB;AAEC,QAAM,kBAAkB,qCAAqC,OAAO;AAEpE,SAAO,YAAY,eAAe;AACpC;AAQG,IAAM,yBAAyB,CAErC,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAyB,QAAQ;AAAA,MAAO;AAAA,IAChD;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,oCAAoC,MAAM;AACnD,SAAO,CAAC,sBAAsB,uBAAuB;AACrD;AAGG,IAAM,wCAAwC,CAAkG,YAClJ;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,kCAAkC;AAI5E,QAAM,UAA6E,CAAC,EAAE,OAAO,MAAM,uBAAuB,gBAAgB,MAAM;AAMjJ,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAQO,IAAM,4BAA4B,CACvC,YAE8D;AAE9D,QAAM,eAAe,sCAAsC,OAAO;AAElE,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAIO,IAAM,gDAAgD,CAAkG,YAC1J;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,kCAAkC;AAI5E,QAAM,UAA6E,CAAC,EAAE,OAAO,MAAM,uBAAuB,gBAAgB,MAAM;AAMjJ,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAQO,IAAM,oCAAoC,CAC/C,YAEsE;AAEtE,QAAM,eAAe,8CAA8C,OAAO;AAE1E,QAAM,QAAQ,iBAAiB,YAAY;AAE3C,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT","sourcesContent":["/**\n * Generated by orval v6.25.0 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 3.1\n */\nimport {\n useMutation,\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n MutationFunction,\n QueryFunction,\n QueryKey,\n UseMutationOptions,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n AsError,\n OrganisationAllDetail,\n OrganisationGetDefaultResponse,\n OrganisationPatchBodyBody,\n OrganisationPostBodyBody,\n OrganisationPostResponse,\n OrganisationsGetResponse\n} from '../account-server-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\ntype SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];\n\n\n/**\n * Gets all the Organisations that you are a member of.\n\nYou can see an Organisation if you are a member of it, the owner (creator) of it, or if you are an admin user.\n\n * @summary Gets Organisations\n */\nexport const getOrganisations = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<OrganisationsGetResponse>(\n {url: `/organisation`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetOrganisationsQueryKey = () => {\n return [\"account-server-api\", `/organisation`] as const;\n }\n\n \nexport const getGetOrganisationsQueryOptions = <TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationsQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisations>>> = ({ signal }) => getOrganisations(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetOrganisationsQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisations>>>\nexport type GetOrganisationsQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets Organisations\n */\nexport const useGetOrganisations = <TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetOrganisationsQueryOptions(options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetOrganisationsSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>( options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationsQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisations>>> = ({ signal }) => getOrganisations(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetOrganisationsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisations>>>\nexport type GetOrganisationsSuspenseQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets Organisations\n */\nexport const useGetOrganisationsSuspense = <TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(\n options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetOrganisationsSuspenseQueryOptions(options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Creates a new Organisation.\n\nThe **User** who creates the Organisation becomes the **Owner** of the Organisation. They are considered a *Member* (**User**) of the Organisation but are not present in the list of users, which a separate list of users explicitly added to the Organisation by the Owner or another Organisation User.\n\nYou need admin rights to use this method\n\n * @summary Create a new organisation\n */\nexport const createOrganisation = (\n organisationPostBodyBody: OrganisationPostBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<OrganisationPostResponse>(\n {url: `/organisation`, method: 'POST',\n headers: {'Content-Type': 'application/json', },\n data: organisationPostBodyBody\n },\n options);\n }\n \n\n\nexport const getCreateOrganisationMutationOptions = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createOrganisation>>, TError,{data: OrganisationPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof createOrganisation>>, TError,{data: OrganisationPostBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof createOrganisation>>, {data: OrganisationPostBodyBody}> = (props) => {\n const {data} = props ?? {};\n\n return createOrganisation(data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreateOrganisationMutationResult = NonNullable<Awaited<ReturnType<typeof createOrganisation>>>\n export type CreateOrganisationMutationBody = OrganisationPostBodyBody\n export type CreateOrganisationMutationError = ErrorType<AsError | void>\n\n /**\n * @summary Create a new organisation\n */\nexport const useCreateOrganisation = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createOrganisation>>, TError,{data: OrganisationPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getCreateOrganisationMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Gets an Organisation. To see the Organisation you need admin rights or need to be a member of the Organisation or are its *creator*.\n\nMembers of an Organisation's **Unit** do not have access to the Organisation.\n\n * @summary Gets an Organisation\n */\nexport const getOrganisation = (\n orgId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<OrganisationAllDetail>(\n {url: `/organisation/${orgId}`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetOrganisationQueryKey = (orgId: string,) => {\n return [\"account-server-api\", `/organisation/${orgId}`] as const;\n }\n\n \nexport const getGetOrganisationQueryOptions = <TData = Awaited<ReturnType<typeof getOrganisation>>, TError = ErrorType<void | AsError>>(orgId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationQueryKey(orgId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisation>>> = ({ signal }) => getOrganisation(orgId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(orgId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetOrganisationQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisation>>>\nexport type GetOrganisationQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets an Organisation\n */\nexport const useGetOrganisation = <TData = Awaited<ReturnType<typeof getOrganisation>>, TError = ErrorType<void | AsError>>(\n orgId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetOrganisationQueryOptions(orgId,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetOrganisationSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getOrganisation>>, TError = ErrorType<void | AsError>>(orgId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationQueryKey(orgId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisation>>> = ({ signal }) => getOrganisation(orgId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(orgId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetOrganisationSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisation>>>\nexport type GetOrganisationSuspenseQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets an Organisation\n */\nexport const useGetOrganisationSuspense = <TData = Awaited<ReturnType<typeof getOrganisation>>, TError = ErrorType<void | AsError>>(\n orgId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetOrganisationSuspenseQueryOptions(orgId,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Used to update existing Organisation.\n\nYou have to be a member of the **Organisation**, its creator, or an administrator to patch an Organisation.\n\n * @summary Adjust an existing Organisation\n */\nexport const patchOrganisation = (\n orgId: string,\n organisationPatchBodyBody: OrganisationPatchBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/organisation/${orgId}`, method: 'PATCH',\n headers: {'Content-Type': 'application/json', },\n data: organisationPatchBodyBody\n },\n options);\n }\n \n\n\nexport const getPatchOrganisationMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchOrganisation>>, TError,{orgId: string;data: OrganisationPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof patchOrganisation>>, TError,{orgId: string;data: OrganisationPatchBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof patchOrganisation>>, {orgId: string;data: OrganisationPatchBodyBody}> = (props) => {\n const {orgId,data} = props ?? {};\n\n return patchOrganisation(orgId,data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type PatchOrganisationMutationResult = NonNullable<Awaited<ReturnType<typeof patchOrganisation>>>\n export type PatchOrganisationMutationBody = OrganisationPatchBodyBody\n export type PatchOrganisationMutationError = ErrorType<AsError>\n\n /**\n * @summary Adjust an existing Organisation\n */\nexport const usePatchOrganisation = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchOrganisation>>, TError,{orgId: string;data: OrganisationPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getPatchOrganisationMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Before an Organisation can be deleted all its underlying **Units** must also be deleted, remembering that **Units** that have undeleted **Products** cannot be deleted.\n\nYou need admin rights to use this method\n\n * @summary Deletes an Organisation\n */\nexport const deleteOrganisation = (\n orgId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/organisation/${orgId}`, method: 'DELETE'\n },\n options);\n }\n \n\n\nexport const getDeleteOrganisationMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisation>>, TError,{orgId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisation>>, TError,{orgId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteOrganisation>>, {orgId: string}> = (props) => {\n const {orgId} = props ?? {};\n\n return deleteOrganisation(orgId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteOrganisationMutationResult = NonNullable<Awaited<ReturnType<typeof deleteOrganisation>>>\n \n export type DeleteOrganisationMutationError = ErrorType<AsError>\n\n /**\n * @summary Deletes an Organisation\n */\nexport const useDeleteOrganisation = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisation>>, TError,{orgId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeleteOrganisationMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Gets the Default Organisation, a built-in Organisation used exclusively for **Personal Units**.\n\nAny authorised user can see the Default Organisation.\n\n * @summary Gets the Default Organisation\n */\nexport const getDefaultOrganisation = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<OrganisationGetDefaultResponse>(\n {url: `/organisation/default`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetDefaultOrganisationQueryKey = () => {\n return [\"account-server-api\", `/organisation/default`] as const;\n }\n\n \nexport const getGetDefaultOrganisationQueryOptions = <TData = Awaited<ReturnType<typeof getDefaultOrganisation>>, TError = ErrorType<void | AsError>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetDefaultOrganisationQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getDefaultOrganisation>>> = ({ signal }) => getDefaultOrganisation(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetDefaultOrganisationQueryResult = NonNullable<Awaited<ReturnType<typeof getDefaultOrganisation>>>\nexport type GetDefaultOrganisationQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets the Default Organisation\n */\nexport const useGetDefaultOrganisation = <TData = Awaited<ReturnType<typeof getDefaultOrganisation>>, TError = ErrorType<void | AsError>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetDefaultOrganisationQueryOptions(options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetDefaultOrganisationSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getDefaultOrganisation>>, TError = ErrorType<void | AsError>>( options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetDefaultOrganisationQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getDefaultOrganisation>>> = ({ signal }) => getDefaultOrganisation(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetDefaultOrganisationSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getDefaultOrganisation>>>\nexport type GetDefaultOrganisationSuspenseQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets the Default Organisation\n */\nexport const useGetDefaultOrganisationSuspense = <TData = Awaited<ReturnType<typeof getDefaultOrganisation>>, TError = ErrorType<void | AsError>>(\n options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetDefaultOrganisationSuspenseQueryOptions(options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n"]}
1
+ {"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;AAC7C,EAAA,OAAO,CAAC,oBAAA,EAAsB,CAAA,aAAA,CAAe,CAAA;AAC7C,CAAA;AAGG,IA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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"]}