@squonk/data-manager-client 1.2.3-rc.2 → 1.2.4-rc.1

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 (112) hide show
  1. package/accounting/accounting.cjs +31 -13
  2. package/accounting/accounting.cjs.map +1 -1
  3. package/accounting/accounting.d.cts +77 -0
  4. package/accounting/accounting.d.ts +10 -1
  5. package/accounting/accounting.js +29 -11
  6. package/accounting/accounting.js.map +1 -1
  7. package/admin/admin.cjs +67 -27
  8. package/admin/admin.cjs.map +1 -1
  9. package/admin/admin.d.cts +324 -0
  10. package/admin/admin.d.ts +55 -22
  11. package/admin/admin.js +57 -17
  12. package/admin/admin.js.map +1 -1
  13. package/application/application.cjs +23 -13
  14. package/application/application.cjs.map +1 -1
  15. package/application/application.d.cts +57 -0
  16. package/application/application.d.ts +7 -1
  17. package/application/application.js +22 -12
  18. package/application/application.js.map +1 -1
  19. package/{chunk-UZTHSGDT.cjs → chunk-J22A7LHX.cjs} +1 -1
  20. package/chunk-J22A7LHX.cjs.map +1 -0
  21. package/{chunk-3RNIDX7T.js → chunk-UKA7G3OB.js} +1 -1
  22. package/{chunk-3RNIDX7T.js.map → chunk-UKA7G3OB.js.map} +1 -1
  23. package/configuration/configuration.cjs +13 -7
  24. package/configuration/configuration.cjs.map +1 -1
  25. package/configuration/configuration.d.cts +29 -0
  26. package/configuration/configuration.d.ts +4 -1
  27. package/configuration/configuration.js +13 -7
  28. package/configuration/configuration.js.map +1 -1
  29. package/{custom-instance-50c9dd5d.d.ts → custom-instance-a2110e78.d.ts} +825 -825
  30. package/dataset/dataset.cjs +71 -72
  31. package/dataset/dataset.cjs.map +1 -1
  32. package/dataset/dataset.d.cts +315 -0
  33. package/dataset/dataset.d.ts +46 -16
  34. package/dataset/dataset.js +62 -63
  35. package/dataset/dataset.js.map +1 -1
  36. package/exchange-rate/exchange-rate.cjs +43 -32
  37. package/exchange-rate/exchange-rate.cjs.map +1 -1
  38. package/exchange-rate/exchange-rate.d.cts +180 -0
  39. package/exchange-rate/exchange-rate.d.ts +25 -7
  40. package/exchange-rate/exchange-rate.js +38 -27
  41. package/exchange-rate/exchange-rate.js.map +1 -1
  42. package/file/file.cjs +38 -22
  43. package/file/file.cjs.map +1 -1
  44. package/file/file.d.cts +154 -0
  45. package/file/file.d.ts +25 -10
  46. package/file/file.js +34 -18
  47. package/file/file.js.map +1 -1
  48. package/index.cjs +10 -10
  49. package/index.cjs.map +1 -1
  50. package/index.d.cts +2 -0
  51. package/index.d.ts +1 -1
  52. package/index.js +9 -9
  53. package/index.js.map +1 -1
  54. package/instance/instance.cjs +47 -37
  55. package/instance/instance.cjs.map +1 -1
  56. package/instance/instance.d.cts +215 -0
  57. package/instance/instance.d.ts +33 -12
  58. package/instance/instance.js +41 -31
  59. package/instance/instance.js.map +1 -1
  60. package/job/job.cjs +36 -19
  61. package/job/job.cjs.map +1 -1
  62. package/job/job.d.cts +85 -0
  63. package/job/job.d.ts +10 -1
  64. package/job/job.js +34 -17
  65. package/job/job.js.map +1 -1
  66. package/metadata/metadata.cjs +23 -26
  67. package/metadata/metadata.cjs.map +1 -1
  68. package/metadata/metadata.d.cts +132 -0
  69. package/metadata/metadata.d.ts +19 -7
  70. package/metadata/metadata.js +20 -23
  71. package/metadata/metadata.js.map +1 -1
  72. package/package.json +12 -12
  73. package/project/project.cjs +70 -48
  74. package/project/project.cjs.map +1 -1
  75. package/project/project.d.cts +377 -0
  76. package/project/project.d.ts +61 -25
  77. package/project/project.js +59 -37
  78. package/project/project.js.map +1 -1
  79. package/src/accounting/accounting.ts +179 -194
  80. package/src/admin/admin.ts +590 -735
  81. package/src/application/application.ts +125 -141
  82. package/src/configuration/configuration.ts +72 -60
  83. package/src/data-manager-api.schemas.ts +940 -941
  84. package/src/dataset/dataset.ts +591 -770
  85. package/src/exchange-rate/exchange-rate.ts +362 -478
  86. package/src/file/file.ts +292 -357
  87. package/src/instance/instance.ts +427 -533
  88. package/src/job/job.ts +187 -198
  89. package/src/metadata/metadata.ts +247 -339
  90. package/src/project/project.ts +669 -860
  91. package/src/task/task.ts +181 -202
  92. package/src/type/type.ts +72 -68
  93. package/src/user/user.ts +248 -286
  94. package/task/task.cjs +31 -15
  95. package/task/task.cjs.map +1 -1
  96. package/task/task.d.cts +103 -0
  97. package/task/task.d.ts +10 -1
  98. package/task/task.js +29 -13
  99. package/task/task.js.map +1 -1
  100. package/type/type.cjs +13 -7
  101. package/type/type.cjs.map +1 -1
  102. package/type/type.d.cts +31 -0
  103. package/type/type.d.ts +4 -1
  104. package/type/type.js +13 -7
  105. package/type/type.js.map +1 -1
  106. package/user/user.cjs +39 -28
  107. package/user/user.cjs.map +1 -1
  108. package/user/user.d.cts +104 -0
  109. package/user/user.d.ts +16 -4
  110. package/user/user.js +36 -25
  111. package/user/user.js.map +1 -1
  112. package/chunk-UZTHSGDT.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/application/application.ts"],"names":[],"mappings":";;;;;AAUA,SAAS,gBAAgB;AA8BlB,IAAM,kBAAkB,CAC7B,SACA,WACG;AACH,SAAO;AAAA,IACL,EAAE,KAAK,gBAAgB,QAAQ,OAAO,OAAO;AAAA,IAC7C;AAAA,EACF;AACF;AAEO,IAAM,6BAA6B,MAAM,CAAC,oBAAoB,cAAc;AAE5E,IAAM,iCAAiC,CAG5C,YAW4B;AAC5B,QAAM,EAAE,OAAO,cAAc,SAAS,eAAe,IAAI,WAAW,CAAC;AAErE,QAAM,YAAW,6CAAc,aAAY,2BAA2B;AAEtE,QAAM,UAAsE,CAAC;AAAA,IAC3E;AAAA,EACF,MAAM,gBAAgB,gBAAgB,MAAM;AAE5C,SAAO,EAAE,UAAU,SAAS,GAAG,aAAa;AAC9C;AAOO,IAAM,qBAAqB,CAGhC,YAO4D;AAC5D,QAAM,eAAe,+BAA+B,OAAO;AAE3D,QAAM,QAAQ,SAAS,YAAY;AAInC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAOO,IAAM,iBAAiB,CAC5B,eACA,SACA,WACG;AACH,SAAO;AAAA,IACL,EAAE,KAAK,gBAAgB,iBAAiB,QAAQ,OAAO,OAAO;AAAA,IAC9D;AAAA,EACF;AACF;AAEO,IAAM,4BAA4B,CAAC,kBACxC,CAAC,oBAAoB,gBAAgB,eAAe;AAE/C,IAAM,gCAAgC,CAI3C,eACA,YAY4B;AAC5B,QAAM,EAAE,OAAO,cAAc,SAAS,eAAe,IAAI,WAAW,CAAC;AAErE,QAAM,YACJ,6CAAc,aAAY,0BAA0B,aAAa;AAEnE,QAAM,UAAqE,CAAC;AAAA,IAC1E;AAAA,EACF,MAAM,eAAe,eAAe,gBAAgB,MAAM;AAE1D,SAAO,EAAE,UAAU,SAAS,SAAS,CAAC,CAAC,eAAe,GAAG,aAAa;AACxE;AAOO,IAAM,oBAAoB,CAI/B,eACA,YAQ2D;AAC3D,QAAM,eAAe,8BAA8B,eAAe,OAAO;AAEzE,QAAM,QAAQ,SAAS,YAAY;AAInC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT","sourcesContent":["/**\n * Generated by orval v6.15.0 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 1.2\n */\nimport { useQuery } from \"@tanstack/react-query\";\nimport type {\n UseQueryOptions,\n QueryFunction,\n UseQueryResult,\n QueryKey,\n} from \"@tanstack/react-query\";\nimport type {\n ApplicationsGetResponse,\n DmError,\n ApplicationGetResponse,\n} from \"../data-manager-api.schemas\";\nimport { customInstance } from \".././custom-instance\";\nimport type { ErrorType } from \".././custom-instance\";\n\n// eslint-disable-next-line\ntype SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P\n) => any\n ? P\n : never;\n\n/**\n * Get a list of all Applications available to you that can be instantiated via the `/instance` endpoint.\n\nApplication availability will vary as applications are added to the service.\n\n * @summary Get all Applications available to you\n */\nexport const getApplications = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<ApplicationsGetResponse>(\n { url: `/application`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetApplicationsQueryKey = () => [\"data-manager-api\", `/application`] as const;\n\nexport const getGetApplicationsQueryOptions = <\n TData = Awaited<ReturnType<typeof getApplications>>,\n TError = ErrorType<DmError>\n>(options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getApplications>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryOptions<\n Awaited<ReturnType<typeof getApplications>>,\n TError,\n TData\n> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetApplicationsQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getApplications>>> = ({\n signal,\n }) => getApplications(requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions };\n};\n\nexport type GetApplicationsQueryResult = NonNullable<\n Awaited<ReturnType<typeof getApplications>>\n>;\nexport type GetApplicationsQueryError = ErrorType<DmError>;\n\nexport const useGetApplications = <\n TData = Awaited<ReturnType<typeof getApplications>>,\n TError = ErrorType<DmError>\n>(options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getApplications>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const queryOptions = getGetApplicationsQueryOptions(options);\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n};\n\n/**\n * Get details of a specific Application available to you that can be instantiated.\n\n * @summary Get details of a specific Application\n */\nexport const getApplication = (\n applicationId: string,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<ApplicationGetResponse>(\n { url: `/application/${applicationId}`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetApplicationQueryKey = (applicationId: string) =>\n [\"data-manager-api\", `/application/${applicationId}`] as const;\n\nexport const getGetApplicationQueryOptions = <\n TData = Awaited<ReturnType<typeof getApplication>>,\n TError = ErrorType<void | DmError>\n>(\n applicationId: string,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getApplication>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryOptions<\n Awaited<ReturnType<typeof getApplication>>,\n TError,\n TData\n> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey =\n queryOptions?.queryKey ?? getGetApplicationQueryKey(applicationId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getApplication>>> = ({\n signal,\n }) => getApplication(applicationId, requestOptions, signal);\n\n return { queryKey, queryFn, enabled: !!applicationId, ...queryOptions };\n};\n\nexport type GetApplicationQueryResult = NonNullable<\n Awaited<ReturnType<typeof getApplication>>\n>;\nexport type GetApplicationQueryError = ErrorType<void | DmError>;\n\nexport const useGetApplication = <\n TData = Awaited<ReturnType<typeof getApplication>>,\n TError = ErrorType<void | DmError>\n>(\n applicationId: string,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getApplication>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const queryOptions = getGetApplicationQueryOptions(applicationId, options);\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n};\n"]}
1
+ {"version":3,"sources":["../../src/application/application.ts"],"names":[],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,OACK;AAgCA,IAAM,kBAAkB,CAE9B,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAgB,QAAQ;AAAA,MAAO;AAAA,IACvC;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,6BAA6B,MAAM;AAE5C,SAAO,CAAC,oBAAoB,cAAc;AAC1C;AAGG,IAAM,iCAAiC,CAAoF,YAC7H;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,2BAA2B;AAIrE,QAAM,UAAsE,CAAC,EAAE,OAAO,MAAM,gBAAgB,gBAAgB,MAAM;AAMnI,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAQO,IAAM,qBAAqB,CAChC,YAE8D;AAE9D,QAAM,eAAe,+BAA+B,OAAO;AAE3D,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AASO,IAAM,iBAAiB,CAC1B,eACH,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK,gBAAgB,aAAa;AAAA,MAAI,QAAQ;AAAA,MAAO;AAAA,IACxD;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,4BAA4B,CAAC,kBAA2B;AAEjE,SAAO,CAAC,oBAAoB,gBAAgB,aAAa,EAAE;AAC3D;AAGG,IAAM,gCAAgC,CAAyF,eAAuB,YACxJ;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,0BAA0B,aAAa;AAIjF,QAAM,UAAqE,CAAC,EAAE,OAAO,MAAM,eAAe,eAAe,gBAAgB,MAAM;AAMhJ,SAAQ,EAAE,UAAU,SAAS,SAAS,CAAC,CAAE,eAAgB,GAAG,aAAY;AAC3E;AAQO,IAAM,oBAAoB,CAChC,eAAuB,YAEwC;AAE9D,QAAM,eAAe,8BAA8B,eAAc,OAAO;AAExE,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT","sourcesContent":["/**\n * Generated by orval v6.20.0 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 1.2\n */\nimport {\n useQuery\n} from '@tanstack/react-query'\nimport type {\n QueryFunction,\n QueryKey,\n UseQueryOptions,\n UseQueryResult\n} from '@tanstack/react-query'\nimport type {\n ApplicationGetResponse,\n ApplicationsGetResponse,\n DmError\n} from '../data-manager-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\n// eslint-disable-next-line\n type SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P,\n) => any\n ? P\n : never;\n\n\n/**\n * Get a list of all Applications available to you that can be instantiated via the `/instance` endpoint.\n\nApplication availability will vary as applications are added to the service.\n\n * @summary Get all Applications available to you\n */\nexport const getApplications = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<ApplicationsGetResponse>(\n {url: `/application`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getGetApplicationsQueryKey = () => {\n \n return [\"data-manager-api\", `/application`] as const;\n }\n\n \nexport const getGetApplicationsQueryOptions = <TData = Awaited<ReturnType<typeof getApplications>>, TError = ErrorType<DmError>>( options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getApplications>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetApplicationsQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getApplications>>> = ({ signal }) => getApplications(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getApplications>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetApplicationsQueryResult = NonNullable<Awaited<ReturnType<typeof getApplications>>>\nexport type GetApplicationsQueryError = ErrorType<DmError>\n\n/**\n * @summary Get all Applications available to you\n */\nexport const useGetApplications = <TData = Awaited<ReturnType<typeof getApplications>>, TError = ErrorType<DmError>>(\n options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getApplications>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetApplicationsQueryOptions(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\n/**\n * Get details of a specific Application available to you that can be instantiated.\n\n * @summary Get details of a specific Application\n */\nexport const getApplication = (\n applicationId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<ApplicationGetResponse>(\n {url: `/application/${applicationId}`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getGetApplicationQueryKey = (applicationId: string,) => {\n \n return [\"data-manager-api\", `/application/${applicationId}`] as const;\n }\n\n \nexport const getGetApplicationQueryOptions = <TData = Awaited<ReturnType<typeof getApplication>>, TError = ErrorType<void | DmError>>(applicationId: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getApplication>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetApplicationQueryKey(applicationId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getApplication>>> = ({ signal }) => getApplication(applicationId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(applicationId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getApplication>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetApplicationQueryResult = NonNullable<Awaited<ReturnType<typeof getApplication>>>\nexport type GetApplicationQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Get details of a specific Application\n */\nexport const useGetApplication = <TData = Awaited<ReturnType<typeof getApplication>>, TError = ErrorType<void | DmError>>(\n applicationId: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getApplication>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetApplicationQueryOptions(applicationId,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\n"]}
@@ -0,0 +1,57 @@
1
+ import { UseQueryOptions, QueryKey, UseQueryResult } from '@tanstack/react-query';
2
+ import { bX as customInstance, bL as ApplicationsGetResponse, bY as ErrorType, bT as DmError, bM as ApplicationGetResponse } from '../custom-instance-a2110e78.js';
3
+ import 'axios';
4
+
5
+ type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
6
+ /**
7
+ * Get a list of all Applications available to you that can be instantiated via the `/instance` endpoint.
8
+
9
+ Application availability will vary as applications are added to the service.
10
+
11
+ * @summary Get all Applications available to you
12
+ */
13
+ declare const getApplications: (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ApplicationsGetResponse>;
14
+ declare const getGetApplicationsQueryKey: () => readonly ["data-manager-api", "/application"];
15
+ declare const getGetApplicationsQueryOptions: <TData = ApplicationsGetResponse, TError = ErrorType<DmError>>(options?: {
16
+ query?: UseQueryOptions<ApplicationsGetResponse, TError, TData, QueryKey> | undefined;
17
+ request?: SecondParameter<typeof customInstance>;
18
+ } | undefined) => UseQueryOptions<ApplicationsGetResponse, TError, TData, QueryKey> & {
19
+ queryKey: QueryKey;
20
+ };
21
+ type GetApplicationsQueryResult = NonNullable<Awaited<ReturnType<typeof getApplications>>>;
22
+ type GetApplicationsQueryError = ErrorType<DmError>;
23
+ /**
24
+ * @summary Get all Applications available to you
25
+ */
26
+ declare const useGetApplications: <TData = ApplicationsGetResponse, TError = ErrorType<DmError>>(options?: {
27
+ query?: UseQueryOptions<ApplicationsGetResponse, TError, TData, QueryKey> | undefined;
28
+ request?: SecondParameter<typeof customInstance>;
29
+ } | undefined) => UseQueryResult<TData, TError> & {
30
+ queryKey: QueryKey;
31
+ };
32
+ /**
33
+ * Get details of a specific Application available to you that can be instantiated.
34
+
35
+ * @summary Get details of a specific Application
36
+ */
37
+ declare const getApplication: (applicationId: string, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ApplicationGetResponse>;
38
+ declare const getGetApplicationQueryKey: (applicationId: string) => readonly ["data-manager-api", `/application/${string}`];
39
+ declare const getGetApplicationQueryOptions: <TData = ApplicationGetResponse, TError = ErrorType<void | DmError>>(applicationId: string, options?: {
40
+ query?: UseQueryOptions<ApplicationGetResponse, TError, TData, QueryKey> | undefined;
41
+ request?: SecondParameter<typeof customInstance>;
42
+ } | undefined) => UseQueryOptions<ApplicationGetResponse, TError, TData, QueryKey> & {
43
+ queryKey: QueryKey;
44
+ };
45
+ type GetApplicationQueryResult = NonNullable<Awaited<ReturnType<typeof getApplication>>>;
46
+ type GetApplicationQueryError = ErrorType<void | DmError>;
47
+ /**
48
+ * @summary Get details of a specific Application
49
+ */
50
+ declare const useGetApplication: <TData = ApplicationGetResponse, TError = ErrorType<void | DmError>>(applicationId: string, options?: {
51
+ query?: UseQueryOptions<ApplicationGetResponse, TError, TData, QueryKey> | undefined;
52
+ request?: SecondParameter<typeof customInstance>;
53
+ } | undefined) => UseQueryResult<TData, TError> & {
54
+ queryKey: QueryKey;
55
+ };
56
+
57
+ export { GetApplicationQueryError, GetApplicationQueryResult, GetApplicationsQueryError, GetApplicationsQueryResult, getApplication, getApplications, getGetApplicationQueryKey, getGetApplicationQueryOptions, getGetApplicationsQueryKey, getGetApplicationsQueryOptions, useGetApplication, useGetApplications };
@@ -1,5 +1,5 @@
1
1
  import { UseQueryOptions, QueryKey, UseQueryResult } from '@tanstack/react-query';
2
- import { bX as customInstance, bL as ApplicationsGetResponse, bY as ErrorType, bT as DmError, bM as ApplicationGetResponse } from '../custom-instance-50c9dd5d.js';
2
+ import { bX as customInstance, bL as ApplicationsGetResponse, bY as ErrorType, bT as DmError, bM as ApplicationGetResponse } from '../custom-instance-a2110e78.js';
3
3
  import 'axios';
4
4
 
5
5
  type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
@@ -20,6 +20,9 @@ declare const getGetApplicationsQueryOptions: <TData = ApplicationsGetResponse,
20
20
  };
21
21
  type GetApplicationsQueryResult = NonNullable<Awaited<ReturnType<typeof getApplications>>>;
22
22
  type GetApplicationsQueryError = ErrorType<DmError>;
23
+ /**
24
+ * @summary Get all Applications available to you
25
+ */
23
26
  declare const useGetApplications: <TData = ApplicationsGetResponse, TError = ErrorType<DmError>>(options?: {
24
27
  query?: UseQueryOptions<ApplicationsGetResponse, TError, TData, QueryKey> | undefined;
25
28
  request?: SecondParameter<typeof customInstance>;
@@ -41,6 +44,9 @@ declare const getGetApplicationQueryOptions: <TData = ApplicationGetResponse, TE
41
44
  };
42
45
  type GetApplicationQueryResult = NonNullable<Awaited<ReturnType<typeof getApplication>>>;
43
46
  type GetApplicationQueryError = ErrorType<void | DmError>;
47
+ /**
48
+ * @summary Get details of a specific Application
49
+ */
44
50
  declare const useGetApplication: <TData = ApplicationGetResponse, TError = ErrorType<void | DmError>>(applicationId: string, options?: {
45
51
  query?: UseQueryOptions<ApplicationGetResponse, TError, TData, QueryKey> | undefined;
46
52
  request?: SecondParameter<typeof customInstance>;
@@ -1,22 +1,28 @@
1
1
  import {
2
2
  customInstance
3
- } from "../chunk-3RNIDX7T.js";
3
+ } from "../chunk-UKA7G3OB.js";
4
4
 
5
5
  // src/application/application.ts
6
- import { useQuery } from "@tanstack/react-query";
6
+ import {
7
+ useQuery
8
+ } from "@tanstack/react-query";
7
9
  var getApplications = (options, signal) => {
8
10
  return customInstance(
9
- { url: `/application`, method: "get", signal },
11
+ {
12
+ url: `/application`,
13
+ method: "get",
14
+ signal
15
+ },
10
16
  options
11
17
  );
12
18
  };
13
- var getGetApplicationsQueryKey = () => ["data-manager-api", `/application`];
19
+ var getGetApplicationsQueryKey = () => {
20
+ return ["data-manager-api", `/application`];
21
+ };
14
22
  var getGetApplicationsQueryOptions = (options) => {
15
23
  const { query: queryOptions, request: requestOptions } = options ?? {};
16
24
  const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetApplicationsQueryKey();
17
- const queryFn = ({
18
- signal
19
- }) => getApplications(requestOptions, signal);
25
+ const queryFn = ({ signal }) => getApplications(requestOptions, signal);
20
26
  return { queryKey, queryFn, ...queryOptions };
21
27
  };
22
28
  var useGetApplications = (options) => {
@@ -27,17 +33,21 @@ var useGetApplications = (options) => {
27
33
  };
28
34
  var getApplication = (applicationId, options, signal) => {
29
35
  return customInstance(
30
- { url: `/application/${applicationId}`, method: "get", signal },
36
+ {
37
+ url: `/application/${applicationId}`,
38
+ method: "get",
39
+ signal
40
+ },
31
41
  options
32
42
  );
33
43
  };
34
- var getGetApplicationQueryKey = (applicationId) => ["data-manager-api", `/application/${applicationId}`];
44
+ var getGetApplicationQueryKey = (applicationId) => {
45
+ return ["data-manager-api", `/application/${applicationId}`];
46
+ };
35
47
  var getGetApplicationQueryOptions = (applicationId, options) => {
36
48
  const { query: queryOptions, request: requestOptions } = options ?? {};
37
49
  const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetApplicationQueryKey(applicationId);
38
- const queryFn = ({
39
- signal
40
- }) => getApplication(applicationId, requestOptions, signal);
50
+ const queryFn = ({ signal }) => getApplication(applicationId, requestOptions, signal);
41
51
  return { queryKey, queryFn, enabled: !!applicationId, ...queryOptions };
42
52
  };
43
53
  var useGetApplication = (applicationId, options) => {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/application/application.ts"],"sourcesContent":["/**\n * Generated by orval v6.15.0 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 1.2\n */\nimport { useQuery } from \"@tanstack/react-query\";\nimport type {\n UseQueryOptions,\n QueryFunction,\n UseQueryResult,\n QueryKey,\n} from \"@tanstack/react-query\";\nimport type {\n ApplicationsGetResponse,\n DmError,\n ApplicationGetResponse,\n} from \"../data-manager-api.schemas\";\nimport { customInstance } from \".././custom-instance\";\nimport type { ErrorType } from \".././custom-instance\";\n\n// eslint-disable-next-line\ntype SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P\n) => any\n ? P\n : never;\n\n/**\n * Get a list of all Applications available to you that can be instantiated via the `/instance` endpoint.\n\nApplication availability will vary as applications are added to the service.\n\n * @summary Get all Applications available to you\n */\nexport const getApplications = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<ApplicationsGetResponse>(\n { url: `/application`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetApplicationsQueryKey = () => [\"data-manager-api\", `/application`] as const;\n\nexport const getGetApplicationsQueryOptions = <\n TData = Awaited<ReturnType<typeof getApplications>>,\n TError = ErrorType<DmError>\n>(options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getApplications>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryOptions<\n Awaited<ReturnType<typeof getApplications>>,\n TError,\n TData\n> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetApplicationsQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getApplications>>> = ({\n signal,\n }) => getApplications(requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions };\n};\n\nexport type GetApplicationsQueryResult = NonNullable<\n Awaited<ReturnType<typeof getApplications>>\n>;\nexport type GetApplicationsQueryError = ErrorType<DmError>;\n\nexport const useGetApplications = <\n TData = Awaited<ReturnType<typeof getApplications>>,\n TError = ErrorType<DmError>\n>(options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getApplications>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const queryOptions = getGetApplicationsQueryOptions(options);\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n};\n\n/**\n * Get details of a specific Application available to you that can be instantiated.\n\n * @summary Get details of a specific Application\n */\nexport const getApplication = (\n applicationId: string,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<ApplicationGetResponse>(\n { url: `/application/${applicationId}`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetApplicationQueryKey = (applicationId: string) =>\n [\"data-manager-api\", `/application/${applicationId}`] as const;\n\nexport const getGetApplicationQueryOptions = <\n TData = Awaited<ReturnType<typeof getApplication>>,\n TError = ErrorType<void | DmError>\n>(\n applicationId: string,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getApplication>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryOptions<\n Awaited<ReturnType<typeof getApplication>>,\n TError,\n TData\n> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey =\n queryOptions?.queryKey ?? getGetApplicationQueryKey(applicationId);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getApplication>>> = ({\n signal,\n }) => getApplication(applicationId, requestOptions, signal);\n\n return { queryKey, queryFn, enabled: !!applicationId, ...queryOptions };\n};\n\nexport type GetApplicationQueryResult = NonNullable<\n Awaited<ReturnType<typeof getApplication>>\n>;\nexport type GetApplicationQueryError = ErrorType<void | DmError>;\n\nexport const useGetApplication = <\n TData = Awaited<ReturnType<typeof getApplication>>,\n TError = ErrorType<void | DmError>\n>(\n applicationId: string,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getApplication>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const queryOptions = getGetApplicationQueryOptions(applicationId, options);\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n};\n"],"mappings":";;;;;AAUA,SAAS,gBAAgB;AA8BlB,IAAM,kBAAkB,CAC7B,SACA,WACG;AACH,SAAO;AAAA,IACL,EAAE,KAAK,gBAAgB,QAAQ,OAAO,OAAO;AAAA,IAC7C;AAAA,EACF;AACF;AAEO,IAAM,6BAA6B,MAAM,CAAC,oBAAoB,cAAc;AAE5E,IAAM,iCAAiC,CAG5C,YAW4B;AAC5B,QAAM,EAAE,OAAO,cAAc,SAAS,eAAe,IAAI,WAAW,CAAC;AAErE,QAAM,YAAW,6CAAc,aAAY,2BAA2B;AAEtE,QAAM,UAAsE,CAAC;AAAA,IAC3E;AAAA,EACF,MAAM,gBAAgB,gBAAgB,MAAM;AAE5C,SAAO,EAAE,UAAU,SAAS,GAAG,aAAa;AAC9C;AAOO,IAAM,qBAAqB,CAGhC,YAO4D;AAC5D,QAAM,eAAe,+BAA+B,OAAO;AAE3D,QAAM,QAAQ,SAAS,YAAY;AAInC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAOO,IAAM,iBAAiB,CAC5B,eACA,SACA,WACG;AACH,SAAO;AAAA,IACL,EAAE,KAAK,gBAAgB,iBAAiB,QAAQ,OAAO,OAAO;AAAA,IAC9D;AAAA,EACF;AACF;AAEO,IAAM,4BAA4B,CAAC,kBACxC,CAAC,oBAAoB,gBAAgB,eAAe;AAE/C,IAAM,gCAAgC,CAI3C,eACA,YAY4B;AAC5B,QAAM,EAAE,OAAO,cAAc,SAAS,eAAe,IAAI,WAAW,CAAC;AAErE,QAAM,YACJ,6CAAc,aAAY,0BAA0B,aAAa;AAEnE,QAAM,UAAqE,CAAC;AAAA,IAC1E;AAAA,EACF,MAAM,eAAe,eAAe,gBAAgB,MAAM;AAE1D,SAAO,EAAE,UAAU,SAAS,SAAS,CAAC,CAAC,eAAe,GAAG,aAAa;AACxE;AAOO,IAAM,oBAAoB,CAI/B,eACA,YAQ2D;AAC3D,QAAM,eAAe,8BAA8B,eAAe,OAAO;AAEzE,QAAM,QAAQ,SAAS,YAAY;AAInC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;","names":[]}
1
+ {"version":3,"sources":["../../src/application/application.ts"],"sourcesContent":["/**\n * Generated by orval v6.20.0 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 1.2\n */\nimport {\n useQuery\n} from '@tanstack/react-query'\nimport type {\n QueryFunction,\n QueryKey,\n UseQueryOptions,\n UseQueryResult\n} from '@tanstack/react-query'\nimport type {\n ApplicationGetResponse,\n ApplicationsGetResponse,\n DmError\n} from '../data-manager-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\n// eslint-disable-next-line\n type SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P,\n) => any\n ? P\n : never;\n\n\n/**\n * Get a list of all Applications available to you that can be instantiated via the `/instance` endpoint.\n\nApplication availability will vary as applications are added to the service.\n\n * @summary Get all Applications available to you\n */\nexport const getApplications = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<ApplicationsGetResponse>(\n {url: `/application`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getGetApplicationsQueryKey = () => {\n \n return [\"data-manager-api\", `/application`] as const;\n }\n\n \nexport const getGetApplicationsQueryOptions = <TData = Awaited<ReturnType<typeof getApplications>>, TError = ErrorType<DmError>>( options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getApplications>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetApplicationsQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getApplications>>> = ({ signal }) => getApplications(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getApplications>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetApplicationsQueryResult = NonNullable<Awaited<ReturnType<typeof getApplications>>>\nexport type GetApplicationsQueryError = ErrorType<DmError>\n\n/**\n * @summary Get all Applications available to you\n */\nexport const useGetApplications = <TData = Awaited<ReturnType<typeof getApplications>>, TError = ErrorType<DmError>>(\n options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getApplications>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetApplicationsQueryOptions(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\n/**\n * Get details of a specific Application available to you that can be instantiated.\n\n * @summary Get details of a specific Application\n */\nexport const getApplication = (\n applicationId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<ApplicationGetResponse>(\n {url: `/application/${applicationId}`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getGetApplicationQueryKey = (applicationId: string,) => {\n \n return [\"data-manager-api\", `/application/${applicationId}`] as const;\n }\n\n \nexport const getGetApplicationQueryOptions = <TData = Awaited<ReturnType<typeof getApplication>>, TError = ErrorType<void | DmError>>(applicationId: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getApplication>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetApplicationQueryKey(applicationId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getApplication>>> = ({ signal }) => getApplication(applicationId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(applicationId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getApplication>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetApplicationQueryResult = NonNullable<Awaited<ReturnType<typeof getApplication>>>\nexport type GetApplicationQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Get details of a specific Application\n */\nexport const useGetApplication = <TData = Awaited<ReturnType<typeof getApplication>>, TError = ErrorType<void | DmError>>(\n applicationId: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getApplication>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetApplicationQueryOptions(applicationId,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\n"],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,OACK;AAgCA,IAAM,kBAAkB,CAE9B,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAgB,QAAQ;AAAA,MAAO;AAAA,IACvC;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,6BAA6B,MAAM;AAE5C,SAAO,CAAC,oBAAoB,cAAc;AAC1C;AAGG,IAAM,iCAAiC,CAAoF,YAC7H;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,2BAA2B;AAIrE,QAAM,UAAsE,CAAC,EAAE,OAAO,MAAM,gBAAgB,gBAAgB,MAAM;AAMnI,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAQO,IAAM,qBAAqB,CAChC,YAE8D;AAE9D,QAAM,eAAe,+BAA+B,OAAO;AAE3D,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AASO,IAAM,iBAAiB,CAC1B,eACH,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK,gBAAgB,aAAa;AAAA,MAAI,QAAQ;AAAA,MAAO;AAAA,IACxD;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,4BAA4B,CAAC,kBAA2B;AAEjE,SAAO,CAAC,oBAAoB,gBAAgB,aAAa,EAAE;AAC3D;AAGG,IAAM,gCAAgC,CAAyF,eAAuB,YACxJ;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,0BAA0B,aAAa;AAIjF,QAAM,UAAqE,CAAC,EAAE,OAAO,MAAM,eAAe,eAAe,gBAAgB,MAAM;AAMhJ,SAAQ,EAAE,UAAU,SAAS,SAAS,CAAC,CAAE,eAAgB,GAAG,aAAY;AAC3E;AAQO,IAAM,oBAAoB,CAChC,eAAuB,YAEwC;AAE9D,QAAM,eAAe,8BAA8B,eAAc,OAAO;AAExE,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;","names":[]}
@@ -24,4 +24,4 @@ var customInstance = (config, options) => {
24
24
 
25
25
 
26
26
  exports.AXIOS_INSTANCE = AXIOS_INSTANCE; exports.setAuthToken = setAuthToken; exports.setBaseUrl = setBaseUrl; exports.customInstance = customInstance;
27
- //# sourceMappingURL=chunk-UZTHSGDT.cjs.map
27
+ //# sourceMappingURL=chunk-J22A7LHX.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/custom-instance.ts"],"names":[],"mappings":";AAUA,OAAO,WAA+C;AAE/C,IAAM,iBAAiB,MAAM,OAAO;AAOpC,IAAM,eAAe,CAAC,UAAkB;AAC7C,iBAAe,SAAS,QAAQ,OAAO,eAAe,IAAI,UAAU,KAAK;AAC3E;AAMO,IAAM,aAAa,CAAC,YAAoB;AAC7C,iBAAe,SAAS,UAAU;AACpC;AAEO,IAAM,iBAAiB,CAC5B,QACA,YACqB;AACrB,QAAM,SAAS,MAAM,YAAY,OAAO;AAExC,QAAM,UAAU,eAAe,EAAE,GAAG,QAAQ,GAAG,SAAS,aAAa,OAAO,MAAM,CAAC,EAAE;AAAA,IACnF,CAAC,EAAE,KAAK,MAAM;AAAA,EAChB;AAIA,EAAC,QAAgB,SAAS,MAAM;AAC9B,WAAO,OAAO,oCAAoC;AAAA,EACpD;AAEA,SAAO;AACT","sourcesContent":["/** Based off the example custom-instance from Orval docs\n * https://github.com/anymaniax/orval/blob/master/samples/react-app-with-react-query/src/api/mutator/custom-instance.ts\n *\n * See https://react-query.tanstack.com/guides/query-cancellation\n *\n * TODO: Considering using Fetch-API instead of axios. This instance will have to change. Could be\n * achieved without changing much using `redaxios`\n * Or use 'ky'\n */\n\nimport Axios, { AxiosError, AxiosRequestConfig } from 'axios';\n\nexport const AXIOS_INSTANCE = Axios.create();\n\n/**\n * Set the access token to be added as the `Authorization: Bearer 'token'` header\n * Useful for client only apps where a proxy API route isn't involved to securely add the access token\n * @param token access token\n */\nexport const setAuthToken = (token: string) => {\n AXIOS_INSTANCE.defaults.headers.common['Authorization'] = `Bearer ${token}`;\n};\n\n/**\n * Set the url to which request paths are added to.\n * @param baseUrl origin + subpath e.g. 'https://example.com/subpath' or '/subpath'\n */\nexport const setBaseUrl = (baseUrl: string) => {\n AXIOS_INSTANCE.defaults.baseURL = baseUrl;\n};\n\nexport const customInstance = <TReturn>(\n config: AxiosRequestConfig,\n options?: AxiosRequestConfig,\n): Promise<TReturn> => {\n const source = Axios.CancelToken.source();\n\n const promise = AXIOS_INSTANCE({ ...config, ...options, cancelToken: source.token }).then(\n ({ data }) => data,\n );\n\n // Promise doesn't have a cancel method but react-query requires this method to make cancellations general.\n // This can either be a any assertion or a @ts-ignore comment.\n (promise as any).cancel = () => {\n source.cancel('Query was cancelled by React Query');\n };\n\n return promise;\n};\n\nexport type ErrorType<TError> = AxiosError<TError>;\n"]}
@@ -24,4 +24,4 @@ export {
24
24
  setBaseUrl,
25
25
  customInstance
26
26
  };
27
- //# sourceMappingURL=chunk-3RNIDX7T.js.map
27
+ //# sourceMappingURL=chunk-UKA7G3OB.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/custom-instance.ts"],"sourcesContent":["/** Based off the example custom-instance from Orval docs\n * https://github.com/anymaniax/orval/blob/master/samples/react-app-with-react-query/src/api/mutator/custom-instance.ts\n *\n * See https://react-query.tanstack.com/guides/query-cancellation\n *\n * TODO: Considering using Fetch-API instead of axios. This instance will have to change. Could be\n * achieved without changing much using `redaxios`\n * Or use 'ky'\n */\n\nimport Axios, { AxiosError, AxiosRequestConfig } from 'axios';\n\nexport const AXIOS_INSTANCE = Axios.create();\n\n/**\n * Set the access token to be added as the `Authorization: Bearer 'token'` header\n * Useful for client only apps where a proxy API route isn't involved to securely add the access token\n * @param token access token\n */\nexport const setAuthToken = (token: string) => {\n AXIOS_INSTANCE.defaults.headers.common['Authorization'] = `Bearer ${token}`;\n};\n\n/**\n * Set the url to which request paths are added to.\n * @param baseUrl origin + subpath e.g. 'https://example.com/subpath' or '/subpath'\n */\nexport const setBaseUrl = (baseUrl: string) => {\n AXIOS_INSTANCE.defaults.baseURL = baseUrl;\n};\n\nexport const customInstance = <TReturn>(\n config: AxiosRequestConfig,\n options?: AxiosRequestConfig,\n): Promise<TReturn> => {\n const source = Axios.CancelToken.source();\n\n const promise = AXIOS_INSTANCE({ ...config, ...options, cancelToken: source.token }).then(\n ({ data }) => data,\n );\n\n // Promise doesn't have a cancel method but react-query requires this method to make cancellations general.\n // This can either be a any assertion or a @ts-ignore comment.\n (promise as any).cancel = () => {\n source.cancel('Query was cancelled by React Query');\n };\n\n return promise;\n};\n\nexport type ErrorType<TError> = AxiosError<TError>;\n"],"mappings":";AAUA,OAAO,WAA+C;AAE/C,IAAM,iBAAiB,MAAM,OAAO;AAOpC,IAAM,eAAe,CAAC,UAAkB;AAC7C,iBAAe,SAAS,QAAQ,OAAO,eAAe,IAAI,UAAU;AACtE;AAMO,IAAM,aAAa,CAAC,YAAoB;AAC7C,iBAAe,SAAS,UAAU;AACpC;AAEO,IAAM,iBAAiB,CAC5B,QACA,YACqB;AACrB,QAAM,SAAS,MAAM,YAAY,OAAO;AAExC,QAAM,UAAU,eAAe,EAAE,GAAG,QAAQ,GAAG,SAAS,aAAa,OAAO,MAAM,CAAC,EAAE;AAAA,IACnF,CAAC,EAAE,KAAK,MAAM;AAAA,EAChB;AAIA,EAAC,QAAgB,SAAS,MAAM;AAC9B,WAAO,OAAO,oCAAoC;AAAA,EACpD;AAEA,SAAO;AACT;","names":[]}
1
+ {"version":3,"sources":["../src/custom-instance.ts"],"sourcesContent":["/** Based off the example custom-instance from Orval docs\n * https://github.com/anymaniax/orval/blob/master/samples/react-app-with-react-query/src/api/mutator/custom-instance.ts\n *\n * See https://react-query.tanstack.com/guides/query-cancellation\n *\n * TODO: Considering using Fetch-API instead of axios. This instance will have to change. Could be\n * achieved without changing much using `redaxios`\n * Or use 'ky'\n */\n\nimport Axios, { AxiosError, AxiosRequestConfig } from 'axios';\n\nexport const AXIOS_INSTANCE = Axios.create();\n\n/**\n * Set the access token to be added as the `Authorization: Bearer 'token'` header\n * Useful for client only apps where a proxy API route isn't involved to securely add the access token\n * @param token access token\n */\nexport const setAuthToken = (token: string) => {\n AXIOS_INSTANCE.defaults.headers.common['Authorization'] = `Bearer ${token}`;\n};\n\n/**\n * Set the url to which request paths are added to.\n * @param baseUrl origin + subpath e.g. 'https://example.com/subpath' or '/subpath'\n */\nexport const setBaseUrl = (baseUrl: string) => {\n AXIOS_INSTANCE.defaults.baseURL = baseUrl;\n};\n\nexport const customInstance = <TReturn>(\n config: AxiosRequestConfig,\n options?: AxiosRequestConfig,\n): Promise<TReturn> => {\n const source = Axios.CancelToken.source();\n\n const promise = AXIOS_INSTANCE({ ...config, ...options, cancelToken: source.token }).then(\n ({ data }) => data,\n );\n\n // Promise doesn't have a cancel method but react-query requires this method to make cancellations general.\n // This can either be a any assertion or a @ts-ignore comment.\n (promise as any).cancel = () => {\n source.cancel('Query was cancelled by React Query');\n };\n\n return promise;\n};\n\nexport type ErrorType<TError> = AxiosError<TError>;\n"],"mappings":";AAUA,OAAO,WAA+C;AAE/C,IAAM,iBAAiB,MAAM,OAAO;AAOpC,IAAM,eAAe,CAAC,UAAkB;AAC7C,iBAAe,SAAS,QAAQ,OAAO,eAAe,IAAI,UAAU,KAAK;AAC3E;AAMO,IAAM,aAAa,CAAC,YAAoB;AAC7C,iBAAe,SAAS,UAAU;AACpC;AAEO,IAAM,iBAAiB,CAC5B,QACA,YACqB;AACrB,QAAM,SAAS,MAAM,YAAY,OAAO;AAExC,QAAM,UAAU,eAAe,EAAE,GAAG,QAAQ,GAAG,SAAS,aAAa,OAAO,MAAM,CAAC,EAAE;AAAA,IACnF,CAAC,EAAE,KAAK,MAAM;AAAA,EAChB;AAIA,EAAC,QAAgB,SAAS,MAAM;AAC9B,WAAO,OAAO,oCAAoC;AAAA,EACpD;AAEA,SAAO;AACT;","names":[]}
@@ -1,22 +1,28 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
2
 
3
- var _chunkUZTHSGDTcjs = require('../chunk-UZTHSGDT.cjs');
3
+ var _chunkJ22A7LHXcjs = require('../chunk-J22A7LHX.cjs');
4
4
 
5
5
  // src/configuration/configuration.ts
6
+
7
+
6
8
  var _reactquery = require('@tanstack/react-query');
7
9
  var getMode = (options, signal) => {
8
- return _chunkUZTHSGDTcjs.customInstance.call(void 0,
9
- { url: `/mode`, method: "get", signal },
10
+ return _chunkJ22A7LHXcjs.customInstance.call(void 0,
11
+ {
12
+ url: `/mode`,
13
+ method: "get",
14
+ signal
15
+ },
10
16
  options
11
17
  );
12
18
  };
13
- var getGetModeQueryKey = () => ["data-manager-api", `/mode`];
19
+ var getGetModeQueryKey = () => {
20
+ return ["data-manager-api", `/mode`];
21
+ };
14
22
  var getGetModeQueryOptions = (options) => {
15
23
  const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
16
24
  const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetModeQueryKey()));
17
- const queryFn = ({
18
- signal
19
- }) => getMode(requestOptions, signal);
25
+ const queryFn = ({ signal }) => getMode(requestOptions, signal);
20
26
  return { queryKey, queryFn, ...queryOptions };
21
27
  };
22
28
  var useGetMode = (options) => {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/configuration/configuration.ts"],"names":[],"mappings":";;;;;AAUA,SAAS,gBAAgB;AAsBlB,IAAM,UAAU,CACrB,SACA,WACG;AACH,SAAO;AAAA,IACL,EAAE,KAAK,SAAS,QAAQ,OAAO,OAAO;AAAA,IACtC;AAAA,EACF;AACF;AAEO,IAAM,qBAAqB,MAAM,CAAC,oBAAoB,OAAO;AAE7D,IAAM,yBAAyB,CAGpC,YAKG;AACH,QAAM,EAAE,OAAO,cAAc,SAAS,eAAe,IAAI,WAAW,CAAC;AAErE,QAAM,YAAW,6CAAc,aAAY,mBAAmB;AAE9D,QAAM,UAA8D,CAAC;AAAA,IACnE;AAAA,EACF,MAAM,QAAQ,gBAAgB,MAAM;AAEpC,SAAO,EAAE,UAAU,SAAS,GAAG,aAAa;AAC9C;AAOO,IAAM,aAAa,CAGxB,YAG4D;AAC5D,QAAM,eAAe,uBAAuB,OAAO;AAEnD,QAAM,QAAQ,SAAS,YAAY;AAInC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT","sourcesContent":["/**\n * Generated by orval v6.15.0 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 1.2\n */\nimport { useQuery } from \"@tanstack/react-query\";\nimport type {\n UseQueryOptions,\n QueryFunction,\n UseQueryResult,\n QueryKey,\n} from \"@tanstack/react-query\";\nimport type { ModeGetResponse, DmError } from \"../data-manager-api.schemas\";\nimport { customInstance } from \".././custom-instance\";\nimport type { ErrorType } from \".././custom-instance\";\n\n// eslint-disable-next-line\ntype SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P\n) => any\n ? P\n : never;\n\n/**\n * @summary Gets the Data Manager mode that's running behind the API\n */\nexport const getMode = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<ModeGetResponse>(\n { url: `/mode`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetModeQueryKey = () => [\"data-manager-api\", `/mode`] as const;\n\nexport const getGetModeQueryOptions = <\n TData = Awaited<ReturnType<typeof getMode>>,\n TError = ErrorType<void | DmError>\n>(options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getMode>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryOptions<Awaited<ReturnType<typeof getMode>>, TError, TData> & {\n queryKey: QueryKey;\n} => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetModeQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMode>>> = ({\n signal,\n }) => getMode(requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions };\n};\n\nexport type GetModeQueryResult = NonNullable<\n Awaited<ReturnType<typeof getMode>>\n>;\nexport type GetModeQueryError = ErrorType<void | DmError>;\n\nexport const useGetMode = <\n TData = Awaited<ReturnType<typeof getMode>>,\n TError = ErrorType<void | DmError>\n>(options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getMode>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const queryOptions = getGetModeQueryOptions(options);\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n};\n"]}
1
+ {"version":3,"sources":["../../src/configuration/configuration.ts"],"names":[],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,OACK;AA2BA,IAAM,UAAU,CAEtB,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAS,QAAQ;AAAA,MAAO;AAAA,IAChC;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,qBAAqB,MAAM;AAEpC,SAAO,CAAC,oBAAoB,OAAO;AACnC;AAGG,IAAM,yBAAyB,CAAmF,YACpH;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,mBAAmB;AAI7D,QAAM,UAA8D,CAAC,EAAE,OAAO,MAAM,QAAQ,gBAAgB,MAAM;AAMnH,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAQO,IAAM,aAAa,CACxB,YAE8D;AAE9D,QAAM,eAAe,uBAAuB,OAAO;AAEnD,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT","sourcesContent":["/**\n * Generated by orval v6.20.0 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 1.2\n */\nimport {\n useQuery\n} from '@tanstack/react-query'\nimport type {\n QueryFunction,\n QueryKey,\n UseQueryOptions,\n UseQueryResult\n} from '@tanstack/react-query'\nimport type {\n DmError,\n ModeGetResponse\n} from '../data-manager-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\n// eslint-disable-next-line\n type SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P,\n) => any\n ? P\n : never;\n\n\n/**\n * @summary Gets the Data Manager mode that's running behind the API\n */\nexport const getMode = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<ModeGetResponse>(\n {url: `/mode`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getGetModeQueryKey = () => {\n \n return [\"data-manager-api\", `/mode`] as const;\n }\n\n \nexport const getGetModeQueryOptions = <TData = Awaited<ReturnType<typeof getMode>>, TError = ErrorType<void | DmError>>( options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getMode>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetModeQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMode>>> = ({ signal }) => getMode(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getMode>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetModeQueryResult = NonNullable<Awaited<ReturnType<typeof getMode>>>\nexport type GetModeQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Gets the Data Manager mode that's running behind the API\n */\nexport const useGetMode = <TData = Awaited<ReturnType<typeof getMode>>, TError = ErrorType<void | DmError>>(\n options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getMode>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetModeQueryOptions(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\n"]}
@@ -0,0 +1,29 @@
1
+ import { UseQueryOptions, QueryKey, UseQueryResult } from '@tanstack/react-query';
2
+ import { bX as customInstance, b6 as ModeGetResponse, bY as ErrorType, bT as DmError } from '../custom-instance-a2110e78.js';
3
+ import 'axios';
4
+
5
+ type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
6
+ /**
7
+ * @summary Gets the Data Manager mode that's running behind the API
8
+ */
9
+ declare const getMode: (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<ModeGetResponse>;
10
+ declare const getGetModeQueryKey: () => readonly ["data-manager-api", "/mode"];
11
+ declare const getGetModeQueryOptions: <TData = ModeGetResponse, TError = ErrorType<void | DmError>>(options?: {
12
+ query?: UseQueryOptions<ModeGetResponse, TError, TData, QueryKey> | undefined;
13
+ request?: SecondParameter<typeof customInstance>;
14
+ } | undefined) => UseQueryOptions<ModeGetResponse, TError, TData, QueryKey> & {
15
+ queryKey: QueryKey;
16
+ };
17
+ type GetModeQueryResult = NonNullable<Awaited<ReturnType<typeof getMode>>>;
18
+ type GetModeQueryError = ErrorType<void | DmError>;
19
+ /**
20
+ * @summary Gets the Data Manager mode that's running behind the API
21
+ */
22
+ declare const useGetMode: <TData = ModeGetResponse, TError = ErrorType<void | DmError>>(options?: {
23
+ query?: UseQueryOptions<ModeGetResponse, TError, TData, QueryKey> | undefined;
24
+ request?: SecondParameter<typeof customInstance>;
25
+ } | undefined) => UseQueryResult<TData, TError> & {
26
+ queryKey: QueryKey;
27
+ };
28
+
29
+ export { GetModeQueryError, GetModeQueryResult, getGetModeQueryKey, getGetModeQueryOptions, getMode, useGetMode };
@@ -1,5 +1,5 @@
1
1
  import { UseQueryOptions, QueryKey, UseQueryResult } from '@tanstack/react-query';
2
- import { bX as customInstance, b6 as ModeGetResponse, bY as ErrorType, bT as DmError } from '../custom-instance-50c9dd5d.js';
2
+ import { bX as customInstance, b6 as ModeGetResponse, bY as ErrorType, bT as DmError } from '../custom-instance-a2110e78.js';
3
3
  import 'axios';
4
4
 
5
5
  type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
@@ -16,6 +16,9 @@ declare const getGetModeQueryOptions: <TData = ModeGetResponse, TError = ErrorTy
16
16
  };
17
17
  type GetModeQueryResult = NonNullable<Awaited<ReturnType<typeof getMode>>>;
18
18
  type GetModeQueryError = ErrorType<void | DmError>;
19
+ /**
20
+ * @summary Gets the Data Manager mode that's running behind the API
21
+ */
19
22
  declare const useGetMode: <TData = ModeGetResponse, TError = ErrorType<void | DmError>>(options?: {
20
23
  query?: UseQueryOptions<ModeGetResponse, TError, TData, QueryKey> | undefined;
21
24
  request?: SecondParameter<typeof customInstance>;
@@ -1,22 +1,28 @@
1
1
  import {
2
2
  customInstance
3
- } from "../chunk-3RNIDX7T.js";
3
+ } from "../chunk-UKA7G3OB.js";
4
4
 
5
5
  // src/configuration/configuration.ts
6
- import { useQuery } from "@tanstack/react-query";
6
+ import {
7
+ useQuery
8
+ } from "@tanstack/react-query";
7
9
  var getMode = (options, signal) => {
8
10
  return customInstance(
9
- { url: `/mode`, method: "get", signal },
11
+ {
12
+ url: `/mode`,
13
+ method: "get",
14
+ signal
15
+ },
10
16
  options
11
17
  );
12
18
  };
13
- var getGetModeQueryKey = () => ["data-manager-api", `/mode`];
19
+ var getGetModeQueryKey = () => {
20
+ return ["data-manager-api", `/mode`];
21
+ };
14
22
  var getGetModeQueryOptions = (options) => {
15
23
  const { query: queryOptions, request: requestOptions } = options ?? {};
16
24
  const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetModeQueryKey();
17
- const queryFn = ({
18
- signal
19
- }) => getMode(requestOptions, signal);
25
+ const queryFn = ({ signal }) => getMode(requestOptions, signal);
20
26
  return { queryKey, queryFn, ...queryOptions };
21
27
  };
22
28
  var useGetMode = (options) => {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/configuration/configuration.ts"],"sourcesContent":["/**\n * Generated by orval v6.15.0 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 1.2\n */\nimport { useQuery } from \"@tanstack/react-query\";\nimport type {\n UseQueryOptions,\n QueryFunction,\n UseQueryResult,\n QueryKey,\n} from \"@tanstack/react-query\";\nimport type { ModeGetResponse, DmError } from \"../data-manager-api.schemas\";\nimport { customInstance } from \".././custom-instance\";\nimport type { ErrorType } from \".././custom-instance\";\n\n// eslint-disable-next-line\ntype SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P\n) => any\n ? P\n : never;\n\n/**\n * @summary Gets the Data Manager mode that's running behind the API\n */\nexport const getMode = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<ModeGetResponse>(\n { url: `/mode`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetModeQueryKey = () => [\"data-manager-api\", `/mode`] as const;\n\nexport const getGetModeQueryOptions = <\n TData = Awaited<ReturnType<typeof getMode>>,\n TError = ErrorType<void | DmError>\n>(options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getMode>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryOptions<Awaited<ReturnType<typeof getMode>>, TError, TData> & {\n queryKey: QueryKey;\n} => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetModeQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMode>>> = ({\n signal,\n }) => getMode(requestOptions, signal);\n\n return { queryKey, queryFn, ...queryOptions };\n};\n\nexport type GetModeQueryResult = NonNullable<\n Awaited<ReturnType<typeof getMode>>\n>;\nexport type GetModeQueryError = ErrorType<void | DmError>;\n\nexport const useGetMode = <\n TData = Awaited<ReturnType<typeof getMode>>,\n TError = ErrorType<void | DmError>\n>(options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getMode>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const queryOptions = getGetModeQueryOptions(options);\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n};\n"],"mappings":";;;;;AAUA,SAAS,gBAAgB;AAsBlB,IAAM,UAAU,CACrB,SACA,WACG;AACH,SAAO;AAAA,IACL,EAAE,KAAK,SAAS,QAAQ,OAAO,OAAO;AAAA,IACtC;AAAA,EACF;AACF;AAEO,IAAM,qBAAqB,MAAM,CAAC,oBAAoB,OAAO;AAE7D,IAAM,yBAAyB,CAGpC,YAKG;AACH,QAAM,EAAE,OAAO,cAAc,SAAS,eAAe,IAAI,WAAW,CAAC;AAErE,QAAM,YAAW,6CAAc,aAAY,mBAAmB;AAE9D,QAAM,UAA8D,CAAC;AAAA,IACnE;AAAA,EACF,MAAM,QAAQ,gBAAgB,MAAM;AAEpC,SAAO,EAAE,UAAU,SAAS,GAAG,aAAa;AAC9C;AAOO,IAAM,aAAa,CAGxB,YAG4D;AAC5D,QAAM,eAAe,uBAAuB,OAAO;AAEnD,QAAM,QAAQ,SAAS,YAAY;AAInC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;","names":[]}
1
+ {"version":3,"sources":["../../src/configuration/configuration.ts"],"sourcesContent":["/**\n * Generated by orval v6.20.0 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 1.2\n */\nimport {\n useQuery\n} from '@tanstack/react-query'\nimport type {\n QueryFunction,\n QueryKey,\n UseQueryOptions,\n UseQueryResult\n} from '@tanstack/react-query'\nimport type {\n DmError,\n ModeGetResponse\n} from '../data-manager-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\n// eslint-disable-next-line\n type SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P,\n) => any\n ? P\n : never;\n\n\n/**\n * @summary Gets the Data Manager mode that's running behind the API\n */\nexport const getMode = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<ModeGetResponse>(\n {url: `/mode`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getGetModeQueryKey = () => {\n \n return [\"data-manager-api\", `/mode`] as const;\n }\n\n \nexport const getGetModeQueryOptions = <TData = Awaited<ReturnType<typeof getMode>>, TError = ErrorType<void | DmError>>( options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getMode>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetModeQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getMode>>> = ({ signal }) => getMode(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getMode>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetModeQueryResult = NonNullable<Awaited<ReturnType<typeof getMode>>>\nexport type GetModeQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Gets the Data Manager mode that's running behind the API\n */\nexport const useGetMode = <TData = Awaited<ReturnType<typeof getMode>>, TError = ErrorType<void | DmError>>(\n options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getMode>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetModeQueryOptions(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\n"],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,OACK;AA2BA,IAAM,UAAU,CAEtB,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAS,QAAQ;AAAA,MAAO;AAAA,IAChC;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,qBAAqB,MAAM;AAEpC,SAAO,CAAC,oBAAoB,OAAO;AACnC;AAGG,IAAM,yBAAyB,CAAmF,YACpH;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,mBAAmB;AAI7D,QAAM,UAA8D,CAAC,EAAE,OAAO,MAAM,QAAQ,gBAAgB,MAAM;AAMnH,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAQO,IAAM,aAAa,CACxB,YAE8D;AAE9D,QAAM,eAAe,uBAAuB,OAAO;AAEnD,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;","names":[]}