@squonk/data-manager-client 1.0.0-rc.3 → 1.0.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 (89) hide show
  1. package/accounting/accounting.cjs +18 -5
  2. package/accounting/accounting.cjs.map +1 -1
  3. package/accounting/accounting.d.ts +1 -1
  4. package/accounting/accounting.js +18 -5
  5. package/accounting/accounting.js.map +1 -1
  6. package/admin/admin.cjs +67 -25
  7. package/admin/admin.cjs.map +1 -1
  8. package/admin/admin.d.ts +23 -6
  9. package/admin/admin.js +66 -24
  10. package/admin/admin.js.map +1 -1
  11. package/application/application.cjs +13 -7
  12. package/application/application.cjs.map +1 -1
  13. package/application/application.d.ts +3 -3
  14. package/application/application.js +13 -7
  15. package/application/application.js.map +1 -1
  16. package/chunk-3O5KIRV4.js +27 -0
  17. package/{chunk-3TENYKS7.js.map → chunk-3O5KIRV4.js.map} +1 -1
  18. package/chunk-IUEU2LYC.cjs +27 -0
  19. package/chunk-IUEU2LYC.cjs.map +1 -0
  20. package/{custom-instance-b2f7dca1.d.ts → custom-instance-3a73945d.d.ts} +56 -19
  21. package/dataset/dataset.cjs +92 -44
  22. package/dataset/dataset.cjs.map +1 -1
  23. package/dataset/dataset.d.ts +5 -5
  24. package/dataset/dataset.js +92 -44
  25. package/dataset/dataset.js.map +1 -1
  26. package/exchange-rate/exchange-rate.cjs +45 -27
  27. package/exchange-rate/exchange-rate.cjs.map +1 -1
  28. package/exchange-rate/exchange-rate.d.ts +3 -3
  29. package/exchange-rate/exchange-rate.js +45 -27
  30. package/exchange-rate/exchange-rate.js.map +1 -1
  31. package/file/file.cjs +39 -17
  32. package/file/file.cjs.map +1 -1
  33. package/file/file.d.ts +1 -1
  34. package/file/file.js +39 -17
  35. package/file/file.js.map +1 -1
  36. package/index.cjs +2 -2
  37. package/index.cjs.map +1 -1
  38. package/index.d.ts +1 -1
  39. package/index.js +1 -1
  40. package/index.js.map +1 -1
  41. package/instance/instance.cjs +42 -18
  42. package/instance/instance.cjs.map +1 -1
  43. package/instance/instance.d.ts +6 -6
  44. package/instance/instance.js +42 -18
  45. package/instance/instance.js.map +1 -1
  46. package/job/job.cjs +23 -7
  47. package/job/job.cjs.map +1 -1
  48. package/job/job.d.ts +3 -3
  49. package/job/job.js +23 -7
  50. package/job/job.js.map +1 -1
  51. package/metadata/metadata.cjs +43 -27
  52. package/metadata/metadata.cjs.map +1 -1
  53. package/metadata/metadata.d.ts +6 -4
  54. package/metadata/metadata.js +43 -27
  55. package/metadata/metadata.js.map +1 -1
  56. package/package.json +5 -5
  57. package/project/project.cjs +74 -39
  58. package/project/project.cjs.map +1 -1
  59. package/project/project.d.ts +13 -13
  60. package/project/project.js +74 -39
  61. package/project/project.js.map +1 -1
  62. package/src/admin/admin.ts +61 -4
  63. package/src/application/application.ts +2 -2
  64. package/src/data-manager-api.schemas.ts +59 -20
  65. package/src/dataset/dataset.ts +4 -4
  66. package/src/exchange-rate/exchange-rate.ts +2 -2
  67. package/src/instance/instance.ts +5 -5
  68. package/src/job/job.ts +2 -2
  69. package/src/metadata/metadata.ts +5 -3
  70. package/src/project/project.ts +12 -12
  71. package/src/task/task.ts +2 -2
  72. package/task/task.cjs +23 -7
  73. package/task/task.cjs.map +1 -1
  74. package/task/task.d.ts +3 -3
  75. package/task/task.js +23 -7
  76. package/task/task.js.map +1 -1
  77. package/type/type.cjs +5 -2
  78. package/type/type.cjs.map +1 -1
  79. package/type/type.d.ts +1 -1
  80. package/type/type.js +5 -2
  81. package/type/type.js.map +1 -1
  82. package/user/user.cjs +35 -13
  83. package/user/user.cjs.map +1 -1
  84. package/user/user.d.ts +1 -1
  85. package/user/user.js +35 -13
  86. package/user/user.js.map +1 -1
  87. package/chunk-3TENYKS7.js +0 -46
  88. package/chunk-RHHRF25R.cjs +0 -46
  89. package/chunk-RHHRF25R.cjs.map +0 -1
package/task/task.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/task/task.ts"],"sourcesContent":["/**\n * Generated by orval v6.9.1 🍺\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.0\n */\nimport { useQuery, useMutation } from \"react-query\";\nimport type {\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type {\n TasksGetResponse,\n DmError,\n GetTasksParams,\n TaskGetResponse,\n GetTaskParams,\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 * Returns a list of tasks that you have access to. These will be Tasks that you **own**. Being an editor of the related object does not allow you to see its task.\n\n * @summary Returns a list of tasks\n */\nexport const getTasks = (\n params?: GetTasksParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<TasksGetResponse>(\n { url: `/task`, method: \"get\", params, signal },\n options\n );\n};\n\nexport const getGetTasksQueryKey = (params?: GetTasksParams) => [\n `/task`,\n ...(params ? [params] : []),\n];\n\nexport type GetTasksQueryResult = NonNullable<\n Awaited<ReturnType<typeof getTasks>>\n>;\nexport type GetTasksQueryError = ErrorType<void | DmError>;\n\nexport const useGetTasks = <\n TData = Awaited<ReturnType<typeof getTasks>>,\n TError = ErrorType<void | DmError>\n>(\n params?: GetTasksParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getTasks>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetTasksQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getTasks>>> = ({\n signal,\n }) => getTasks(params, requestOptions, signal);\n\n const query = useQuery<Awaited<ReturnType<typeof getTasks>>, TError, TData>(\n queryKey,\n queryFn,\n queryOptions\n ) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryKey;\n\n return query;\n};\n\n/**\n * Returns Task information including its states and events.\n\nYou can only retrieve a Task if you are its **owner**. For example, you can get a Task relating to an Application **Instance** if you created the **Instance**.\n\nTasks are created in response to creating datasets and launching applications.\n\nTasks contain of a list of `states` and `events`. A task will always have states but may not have events.\n\nStates and events are listed with the oldest occupying the first entry in the list. As the number of events a task accumulates is uncontrolled, by default, only the first 100 events are returned.\n\nYou can control the number of events returned by using the `event_limit` query parameter. You can also retrieve the next set of events by combining it with the `event_prior_ordinal`, setting it to the ordinal of the oldest event you've already received.\n\n**Dataset** tasks must be allowed to complete successfully before you can expect a it to be available through the dataset API endpoints. Application **Instances** are not available until their task state is _STARTED_.\n\nFor **Dataset** tasks, where the task `purpose` is `DATASET`, you must wait until `done` is **true**. The dataset is available when the task object's `done` field is **true** and the `exit_code` field is zero (**0**). If you discover the task is `done` but you have a non-zero `exit_code`, the dataset upload will have failed, and you may need need to inspect the final `state` and any related `events` to understand why.\n\nFor Application **Instance** tasks, where the task `purpose` is `INSTANCE`, you must wait until you find the `STARTED` state in the `states` list. An Application Instance is only `done` when the Application Instance has been deleted.\n\n * @summary Returns task information\n */\nexport const getTask = (\n taskId: string,\n params?: GetTaskParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<TaskGetResponse>(\n { url: `/task/${taskId}`, method: \"get\", params, signal },\n options\n );\n};\n\nexport const getGetTaskQueryKey = (taskId: string, params?: GetTaskParams) => [\n `/task/${taskId}`,\n ...(params ? [params] : []),\n];\n\nexport type GetTaskQueryResult = NonNullable<\n Awaited<ReturnType<typeof getTask>>\n>;\nexport type GetTaskQueryError = ErrorType<void | DmError>;\n\nexport const useGetTask = <\n TData = Awaited<ReturnType<typeof getTask>>,\n TError = ErrorType<void | DmError>\n>(\n taskId: string,\n params?: GetTaskParams,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getTask>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetTaskQueryKey(taskId, params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getTask>>> = ({\n signal,\n }) => getTask(taskId, params, requestOptions, signal);\n\n const query = useQuery<Awaited<ReturnType<typeof getTask>>, TError, TData>(\n queryKey,\n queryFn,\n { enabled: !!taskId, ...queryOptions }\n ) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryKey;\n\n return query;\n};\n\n/**\n * Given a `task_id` the Task will be removed.\n\nYou cannot delete a Task until it is `done`.\n\nYou must be an **owner** of the Task action to delete it. For example you must be the owner of the Dataset to delete **DATASET** tasks and an owner of the ProjectFile to delete **FILE** tasks.\n\n * @summary Delete a Task entry\n */\nexport const deleteTask = (\n taskId: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/task/${taskId}`, method: \"delete\" },\n options\n );\n};\n\nexport type DeleteTaskMutationResult = NonNullable<\n Awaited<ReturnType<typeof deleteTask>>\n>;\n\nexport type DeleteTaskMutationError = ErrorType<DmError>;\n\nexport const useDeleteTask = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteTask>>,\n TError,\n { taskId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deleteTask>>,\n { taskId: string }\n > = (props) => {\n const { taskId } = props ?? {};\n\n return deleteTask(taskId, requestOptions);\n };\n\n return useMut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,YACG;AACH,SAAO,eACL,EAAE,KAAK,SAAS,UAAU,QAAQ,SAAS,GAC3C,OACF;AACF;AAQO,IAAM,gBAAgB,CAG3B,YAQI;AACJ,QAAM,EAAE,UAAU,iBAAiB,SAAS,mBAAmB,WAAW,CAAC;AAE3E,QAAM,aAGF,CAAC,UAAU;AACb,UAAM,EAAE,WAAW,SAAS,CAAC;AAE7B,WAAO,WAAW,QAAQ,cAAc;AAAA,EAC1C;AAEA,SAAO,YAKL,YAAY,eAAe;AAC/B;","names":[]}
1
+ {"version":3,"sources":["../../src/task/task.ts"],"sourcesContent":["/**\n * Generated by orval v6.9.1 🍺\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.0\n */\nimport { useQuery, useMutation } from \"react-query\";\nimport type {\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type {\n TasksGetResponse,\n DmError,\n GetTasksParams,\n TaskGetResponse,\n GetTaskParams,\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 * Returns a list of tasks that you have access to. These will be Tasks that you **own**. Being an editor of the related object does not allow you to see its task.\n\n * @summary Returns a list of Tasks\n */\nexport const getTasks = (\n params?: GetTasksParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<TasksGetResponse>(\n { url: `/task`, method: \"get\", params, signal },\n options\n );\n};\n\nexport const getGetTasksQueryKey = (params?: GetTasksParams) => [\n `/task`,\n ...(params ? [params] : []),\n];\n\nexport type GetTasksQueryResult = NonNullable<\n Awaited<ReturnType<typeof getTasks>>\n>;\nexport type GetTasksQueryError = ErrorType<void | DmError>;\n\nexport const useGetTasks = <\n TData = Awaited<ReturnType<typeof getTasks>>,\n TError = ErrorType<void | DmError>\n>(\n params?: GetTasksParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getTasks>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetTasksQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getTasks>>> = ({\n signal,\n }) => getTasks(params, requestOptions, signal);\n\n const query = useQuery<Awaited<ReturnType<typeof getTasks>>, TError, TData>(\n queryKey,\n queryFn,\n queryOptions\n ) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryKey;\n\n return query;\n};\n\n/**\n * Returns Task information including its states and events.\n\nYou can only retrieve a Task if you are its **owner**. For example, you can get a Task relating to an Application **Instance** if you created the **Instance**.\n\nTasks are created in response to creating datasets and launching applications.\n\nTasks contain of a list of `states` and `events`. A task will always have states but may not have events.\n\nStates and events are listed with the oldest occupying the first entry in the list. As the number of events a task accumulates is uncontrolled, by default, only the first 100 events are returned.\n\nYou can control the number of events returned by using the `event_limit` query parameter. You can also retrieve the next set of events by combining it with the `event_prior_ordinal`, setting it to the ordinal of the oldest event you've already received.\n\n**Dataset** tasks must be allowed to complete successfully before you can expect a it to be available through the dataset API endpoints. Application **Instances** are not available until their task state is _STARTED_.\n\nFor **Dataset** tasks, where the task `purpose` is `DATASET`, you must wait until `done` is **true**. The dataset is available when the task object's `done` field is **true** and the `exit_code` field is zero (**0**). If you discover the task is `done` but you have a non-zero `exit_code`, the dataset upload will have failed, and you may need need to inspect the final `state` and any related `events` to understand why.\n\nFor Application **Instance** tasks, where the task `purpose` is `INSTANCE`, you must wait until you find the `STARTED` state in the `states` list. An Application Instance is only `done` when the Application Instance has been deleted.\n\n * @summary Returns Task information\n */\nexport const getTask = (\n taskId: string,\n params?: GetTaskParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<TaskGetResponse>(\n { url: `/task/${taskId}`, method: \"get\", params, signal },\n options\n );\n};\n\nexport const getGetTaskQueryKey = (taskId: string, params?: GetTaskParams) => [\n `/task/${taskId}`,\n ...(params ? [params] : []),\n];\n\nexport type GetTaskQueryResult = NonNullable<\n Awaited<ReturnType<typeof getTask>>\n>;\nexport type GetTaskQueryError = ErrorType<void | DmError>;\n\nexport const useGetTask = <\n TData = Awaited<ReturnType<typeof getTask>>,\n TError = ErrorType<void | DmError>\n>(\n taskId: string,\n params?: GetTaskParams,\n options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getTask>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetTaskQueryKey(taskId, params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getTask>>> = ({\n signal,\n }) => getTask(taskId, params, requestOptions, signal);\n\n const query = useQuery<Awaited<ReturnType<typeof getTask>>, TError, TData>(\n queryKey,\n queryFn,\n { enabled: !!taskId, ...queryOptions }\n ) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryKey;\n\n return query;\n};\n\n/**\n * Given a `task_id` the Task will be removed.\n\nYou cannot delete a Task until it is `done`.\n\nYou must be an **owner** of the Task action to delete it. For example you must be the owner of the Dataset to delete **DATASET** tasks and an owner of the ProjectFile to delete **FILE** tasks.\n\n * @summary Delete a Task entry\n */\nexport const deleteTask = (\n taskId: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/task/${taskId}`, method: \"delete\" },\n options\n );\n};\n\nexport type DeleteTaskMutationResult = NonNullable<\n Awaited<ReturnType<typeof deleteTask>>\n>;\n\nexport type DeleteTaskMutationError = ErrorType<DmError>;\n\nexport const useDeleteTask = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteTask>>,\n TError,\n { taskId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deleteTask>>,\n { taskId: string }\n > = (props) => {\n const { taskId } = props ?? {};\n\n return deleteTask(taskId, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof deleteTask>>,\n TError,\n { taskId: string },\n TContext\n >(mutationFn, mutationOptions);\n};\n"],"mappings":";;;;;AAUA,SAAS,UAAU,mBAAmB;AAgC/B,IAAM,WAAW,CACtB,QACA,SACA,WACG;AACH,SAAO;AAAA,IACL,EAAE,KAAK,SAAS,QAAQ,OAAO,QAAQ,OAAO;AAAA,IAC9C;AAAA,EACF;AACF;AAEO,IAAM,sBAAsB,CAAC,WAA4B;AAAA,EAC9D;AAAA,EACA,GAAI,SAAS,CAAC,MAAM,IAAI,CAAC;AAC3B;AAOO,IAAM,cAAc,CAIzB,QACA,YAQ2D;AAC3D,QAAM,EAAE,OAAO,cAAc,SAAS,eAAe,IAAI,WAAW,CAAC;AAErE,QAAM,YAAW,6CAAc,aAAY,oBAAoB,MAAM;AAErE,QAAM,UAA+D,CAAC;AAAA,IACpE;AAAA,EACF,MAAM,SAAS,QAAQ,gBAAgB,MAAM;AAE7C,QAAM,QAAQ;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,QAAM,WAAW;AAEjB,SAAO;AACT;AAuBO,IAAM,UAAU,CACrB,QACA,QACA,SACA,WACG;AACH,SAAO;AAAA,IACL,EAAE,KAAK,SAAS,UAAU,QAAQ,OAAO,QAAQ,OAAO;AAAA,IACxD;AAAA,EACF;AACF;AAEO,IAAM,qBAAqB,CAAC,QAAgB,WAA2B;AAAA,EAC5E,SAAS;AAAA,EACT,GAAI,SAAS,CAAC,MAAM,IAAI,CAAC;AAC3B;AAOO,IAAM,aAAa,CAIxB,QACA,QACA,YAI2D;AAC3D,QAAM,EAAE,OAAO,cAAc,SAAS,eAAe,IAAI,WAAW,CAAC;AAErE,QAAM,YAAW,6CAAc,aAAY,mBAAmB,QAAQ,MAAM;AAE5E,QAAM,UAA8D,CAAC;AAAA,IACnE;AAAA,EACF,MAAM,QAAQ,QAAQ,QAAQ,gBAAgB,MAAM;AAEpD,QAAM,QAAQ;AAAA,IACZ;AAAA,IACA;AAAA,IACA,EAAE,SAAS,CAAC,CAAC,QAAQ,GAAG,aAAa;AAAA,EACvC;AAEA,QAAM,WAAW;AAEjB,SAAO;AACT;AAWO,IAAM,aAAa,CACxB,QACA,YACG;AACH,SAAO;AAAA,IACL,EAAE,KAAK,SAAS,UAAU,QAAQ,SAAS;AAAA,IAC3C;AAAA,EACF;AACF;AAQO,IAAM,gBAAgB,CAG3B,YAQI;AACJ,QAAM,EAAE,UAAU,iBAAiB,SAAS,eAAe,IAAI,WAAW,CAAC;AAE3E,QAAM,aAGF,CAAC,UAAU;AACb,UAAM,EAAE,OAAO,IAAI,SAAS,CAAC;AAE7B,WAAO,WAAW,QAAQ,cAAc;AAAA,EAC1C;AAEA,SAAO,YAKL,YAAY,eAAe;AAC/B;","names":[]}
package/type/type.cjs CHANGED
@@ -1,11 +1,14 @@
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 _chunkRHHRF25Rcjs = require('../chunk-RHHRF25R.cjs');
3
+ var _chunkIUEU2LYCcjs = require('../chunk-IUEU2LYC.cjs');
4
4
 
5
5
  // src/type/type.ts
6
6
  var _reactquery = require('react-query');
7
7
  var getFileTypes = (options, signal) => {
8
- return _chunkRHHRF25Rcjs.customInstance.call(void 0, { url: `/type`, method: "get", signal }, options);
8
+ return _chunkIUEU2LYCcjs.customInstance.call(void 0,
9
+ { url: `/type`, method: "get", signal },
10
+ options
11
+ );
9
12
  };
10
13
  var getGetFileTypesQueryKey = () => [`/type`];
11
14
  var useGetFileTypes = (options) => {
package/type/type.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/type/type.ts"],"names":[],"mappings":";;;;;AAUA;AAwBO,IAAM,eAAe,CAC1B,SACA,WACG;AACH,SAAO,eACL,EAAE,KAAK,SAAS,QAAQ,OAAO,OAAO,GACtC,OACF;AACF;AAEO,IAAM,0BAA0B,MAAM,CAAC,OAAO;AAO9C,IAAM,kBAAkB,CAG7B,YAO4D;AAC5D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,CAAC;AAErE,QAAM,WAAW,8CAAc,aAAY,wBAAwB;AAEnE,QAAM,UAAmE,CAAC;AAAA,IACxE;AAAA,QACI,aAAa,gBAAgB,MAAM;AAEzC,QAAM,QAAQ,SAIZ,UAAU,SAAS,YAAY;AAIjC,QAAM,WAAW;AAEjB,SAAO;AACT","sourcesContent":["/**\n * Generated by orval v6.9.1 🍺\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.0\n */\nimport { useQuery } from \"react-query\";\nimport type {\n UseQueryOptions,\n QueryFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type { TypesGetResponse, 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 * Returns the supported Dataset and File (MIME) Types\n\n * @summary Get the supported File Types\n */\nexport const getFileTypes = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<TypesGetResponse>(\n { url: `/type`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetFileTypesQueryKey = () => [`/type`];\n\nexport type GetFileTypesQueryResult = NonNullable<\n Awaited<ReturnType<typeof getFileTypes>>\n>;\nexport type GetFileTypesQueryError = ErrorType<void | DmError>;\n\nexport const useGetFileTypes = <\n TData = Awaited<ReturnType<typeof getFileTypes>>,\n TError = ErrorType<void | DmError>\n>(options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getFileTypes>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetFileTypesQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getFileTypes>>> = ({\n signal,\n }) => getFileTypes(requestOptions, signal);\n\n const query = useQuery<\n Awaited<ReturnType<typeof getFileTypes>>,\n TError,\n TData\n >(queryKey, queryFn, queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryKey;\n\n return query;\n};\n"]}
1
+ {"version":3,"sources":["../../src/type/type.ts"],"names":[],"mappings":";;;;;AAUA,SAAS,gBAAgB;AAwBlB,IAAM,eAAe,CAC1B,SACA,WACG;AACH,SAAO;AAAA,IACL,EAAE,KAAK,SAAS,QAAQ,OAAO,OAAO;AAAA,IACtC;AAAA,EACF;AACF;AAEO,IAAM,0BAA0B,MAAM,CAAC,OAAO;AAO9C,IAAM,kBAAkB,CAG7B,YAO4D;AAC5D,QAAM,EAAE,OAAO,cAAc,SAAS,eAAe,IAAI,WAAW,CAAC;AAErE,QAAM,YAAW,6CAAc,aAAY,wBAAwB;AAEnE,QAAM,UAAmE,CAAC;AAAA,IACxE;AAAA,EACF,MAAM,aAAa,gBAAgB,MAAM;AAEzC,QAAM,QAAQ,SAIZ,UAAU,SAAS,YAAY;AAIjC,QAAM,WAAW;AAEjB,SAAO;AACT","sourcesContent":["/**\n * Generated by orval v6.9.1 🍺\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.0\n */\nimport { useQuery } from \"react-query\";\nimport type {\n UseQueryOptions,\n QueryFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type { TypesGetResponse, 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 * Returns the supported Dataset and File (MIME) Types\n\n * @summary Get the supported File Types\n */\nexport const getFileTypes = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<TypesGetResponse>(\n { url: `/type`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetFileTypesQueryKey = () => [`/type`];\n\nexport type GetFileTypesQueryResult = NonNullable<\n Awaited<ReturnType<typeof getFileTypes>>\n>;\nexport type GetFileTypesQueryError = ErrorType<void | DmError>;\n\nexport const useGetFileTypes = <\n TData = Awaited<ReturnType<typeof getFileTypes>>,\n TError = ErrorType<void | DmError>\n>(options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getFileTypes>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetFileTypesQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getFileTypes>>> = ({\n signal,\n }) => getFileTypes(requestOptions, signal);\n\n const query = useQuery<\n Awaited<ReturnType<typeof getFileTypes>>,\n TError,\n TData\n >(queryKey, queryFn, queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryKey;\n\n return query;\n};\n"]}
package/type/type.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { UseQueryOptions, QueryKey, UseQueryResult } from 'react-query';
2
- import { bz as customInstance, aT as TypesGetResponse, bA as ErrorType, bv as DmError } from '../custom-instance-b2f7dca1.js';
2
+ import { bB as customInstance, aU as TypesGetResponse, bC as ErrorType, bx as DmError } from '../custom-instance-3a73945d.js';
3
3
  import 'axios';
4
4
 
5
5
  declare type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
package/type/type.js CHANGED
@@ -1,11 +1,14 @@
1
1
  import {
2
2
  customInstance
3
- } from "../chunk-3TENYKS7.js";
3
+ } from "../chunk-3O5KIRV4.js";
4
4
 
5
5
  // src/type/type.ts
6
6
  import { useQuery } from "react-query";
7
7
  var getFileTypes = (options, signal) => {
8
- return customInstance({ url: `/type`, method: "get", signal }, options);
8
+ return customInstance(
9
+ { url: `/type`, method: "get", signal },
10
+ options
11
+ );
9
12
  };
10
13
  var getGetFileTypesQueryKey = () => [`/type`];
11
14
  var useGetFileTypes = (options) => {
package/type/type.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/type/type.ts"],"sourcesContent":["/**\n * Generated by orval v6.9.1 🍺\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.0\n */\nimport { useQuery } from \"react-query\";\nimport type {\n UseQueryOptions,\n QueryFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type { TypesGetResponse, 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 * Returns the supported Dataset and File (MIME) Types\n\n * @summary Get the supported File Types\n */\nexport const getFileTypes = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<TypesGetResponse>(\n { url: `/type`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetFileTypesQueryKey = () => [`/type`];\n\nexport type GetFileTypesQueryResult = NonNullable<\n Awaited<ReturnType<typeof getFileTypes>>\n>;\nexport type GetFileTypesQueryError = ErrorType<void | DmError>;\n\nexport const useGetFileTypes = <\n TData = Awaited<ReturnType<typeof getFileTypes>>,\n TError = ErrorType<void | DmError>\n>(options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getFileTypes>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetFileTypesQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getFileTypes>>> = ({\n signal,\n }) => getFileTypes(requestOptions, signal);\n\n const query = useQuery<\n Awaited<ReturnType<typeof getFileTypes>>,\n TError,\n TData\n >(queryKey, queryFn, queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryKey;\n\n return query;\n};\n"],"mappings":";;;;;AAUA;AAwBO,IAAM,eAAe,CAC1B,SACA,WACG;AACH,SAAO,eACL,EAAE,KAAK,SAAS,QAAQ,OAAO,OAAO,GACtC,OACF;AACF;AAEO,IAAM,0BAA0B,MAAM,CAAC,OAAO;AAO9C,IAAM,kBAAkB,CAG7B,YAO4D;AAC5D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,CAAC;AAErE,QAAM,WAAW,8CAAc,aAAY,wBAAwB;AAEnE,QAAM,UAAmE,CAAC;AAAA,IACxE;AAAA,QACI,aAAa,gBAAgB,MAAM;AAEzC,QAAM,QAAQ,SAIZ,UAAU,SAAS,YAAY;AAIjC,QAAM,WAAW;AAEjB,SAAO;AACT;","names":[]}
1
+ {"version":3,"sources":["../../src/type/type.ts"],"sourcesContent":["/**\n * Generated by orval v6.9.1 🍺\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.0\n */\nimport { useQuery } from \"react-query\";\nimport type {\n UseQueryOptions,\n QueryFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type { TypesGetResponse, 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 * Returns the supported Dataset and File (MIME) Types\n\n * @summary Get the supported File Types\n */\nexport const getFileTypes = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<TypesGetResponse>(\n { url: `/type`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetFileTypesQueryKey = () => [`/type`];\n\nexport type GetFileTypesQueryResult = NonNullable<\n Awaited<ReturnType<typeof getFileTypes>>\n>;\nexport type GetFileTypesQueryError = ErrorType<void | DmError>;\n\nexport const useGetFileTypes = <\n TData = Awaited<ReturnType<typeof getFileTypes>>,\n TError = ErrorType<void | DmError>\n>(options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getFileTypes>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetFileTypesQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getFileTypes>>> = ({\n signal,\n }) => getFileTypes(requestOptions, signal);\n\n const query = useQuery<\n Awaited<ReturnType<typeof getFileTypes>>,\n TError,\n TData\n >(queryKey, queryFn, queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryKey;\n\n return query;\n};\n"],"mappings":";;;;;AAUA,SAAS,gBAAgB;AAwBlB,IAAM,eAAe,CAC1B,SACA,WACG;AACH,SAAO;AAAA,IACL,EAAE,KAAK,SAAS,QAAQ,OAAO,OAAO;AAAA,IACtC;AAAA,EACF;AACF;AAEO,IAAM,0BAA0B,MAAM,CAAC,OAAO;AAO9C,IAAM,kBAAkB,CAG7B,YAO4D;AAC5D,QAAM,EAAE,OAAO,cAAc,SAAS,eAAe,IAAI,WAAW,CAAC;AAErE,QAAM,YAAW,6CAAc,aAAY,wBAAwB;AAEnE,QAAM,UAAmE,CAAC;AAAA,IACxE;AAAA,EACF,MAAM,aAAa,gBAAgB,MAAM;AAEzC,QAAM,QAAQ,SAIZ,UAAU,SAAS,YAAY;AAIjC,QAAM,WAAW;AAEjB,SAAO;AACT;","names":[]}
package/user/user.cjs CHANGED
@@ -1,11 +1,14 @@
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 _chunkRHHRF25Rcjs = require('../chunk-RHHRF25R.cjs');
3
+ var _chunkIUEU2LYCcjs = require('../chunk-IUEU2LYC.cjs');
4
4
 
5
5
  // src/user/user.ts
6
6
  var _reactquery = require('react-query');
7
7
  var getUsers = (options, signal) => {
8
- return _chunkRHHRF25Rcjs.customInstance.call(void 0, { url: `/user`, method: "get", signal }, options);
8
+ return _chunkIUEU2LYCcjs.customInstance.call(void 0,
9
+ { url: `/user`, method: "get", signal },
10
+ options
11
+ );
9
12
  };
10
13
  var getGetUsersQueryKey = () => [`/user`];
11
14
  var useGetUsers = (options) => {
@@ -14,12 +17,19 @@ var useGetUsers = (options) => {
14
17
  const queryFn = ({
15
18
  signal
16
19
  }) => getUsers(requestOptions, signal);
17
- const query = _reactquery.useQuery.call(void 0, queryKey, queryFn, queryOptions);
20
+ const query = _reactquery.useQuery.call(void 0,
21
+ queryKey,
22
+ queryFn,
23
+ queryOptions
24
+ );
18
25
  query.queryKey = queryKey;
19
26
  return query;
20
27
  };
21
28
  var getUserAccount = (params, options, signal) => {
22
- return _chunkRHHRF25Rcjs.customInstance.call(void 0, { url: `/user/account`, method: "get", params, signal }, options);
29
+ return _chunkIUEU2LYCcjs.customInstance.call(void 0,
30
+ { url: `/user/account`, method: "get", params, signal },
31
+ options
32
+ );
23
33
  };
24
34
  var getGetUserAccountQueryKey = (params) => [
25
35
  `/user/account`,
@@ -41,20 +51,29 @@ var patchUserAccount = (userAccountPatchBodyBody, options) => {
41
51
  formData.append("private", userAccountPatchBodyBody.private.toString());
42
52
  }
43
53
  if (userAccountPatchBodyBody.become_admin !== void 0) {
44
- formData.append("become_admin", userAccountPatchBodyBody.become_admin.toString());
54
+ formData.append(
55
+ "become_admin",
56
+ userAccountPatchBodyBody.become_admin.toString()
57
+ );
45
58
  }
46
59
  if (userAccountPatchBodyBody.impersonate !== void 0) {
47
60
  formData.append("impersonate", userAccountPatchBodyBody.impersonate);
48
61
  }
49
62
  if (userAccountPatchBodyBody.use_impersonation !== void 0) {
50
- formData.append("use_impersonation", userAccountPatchBodyBody.use_impersonation.toString());
63
+ formData.append(
64
+ "use_impersonation",
65
+ userAccountPatchBodyBody.use_impersonation.toString()
66
+ );
51
67
  }
52
- return _chunkRHHRF25Rcjs.customInstance.call(void 0, {
53
- url: `/user/account`,
54
- method: "patch",
55
- headers: { "Content-Type": "multipart/form-data" },
56
- data: formData
57
- }, options);
68
+ return _chunkIUEU2LYCcjs.customInstance.call(void 0,
69
+ {
70
+ url: `/user/account`,
71
+ method: "patch",
72
+ headers: { "Content-Type": "multipart/form-data" },
73
+ data: formData
74
+ },
75
+ options
76
+ );
58
77
  };
59
78
  var usePatchUserAccount = (options) => {
60
79
  const { mutation: mutationOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
@@ -65,7 +84,10 @@ var usePatchUserAccount = (options) => {
65
84
  return _reactquery.useMutation.call(void 0, mutationFn, mutationOptions);
66
85
  };
67
86
  var getUserApiLog = (params, options, signal) => {
68
- return _chunkRHHRF25Rcjs.customInstance.call(void 0, { url: `/user/api-log`, method: "get", params, signal }, options);
87
+ return _chunkIUEU2LYCcjs.customInstance.call(void 0,
88
+ { url: `/user/api-log`, method: "get", params, signal },
89
+ options
90
+ );
69
91
  };
70
92
  var getGetUserApiLogQueryKey = (params) => [
71
93
  `/user/api-log`,
package/user/user.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/user/user.ts"],"names":[],"mappings":";;;;;AAUA;AAkCO,IAAM,WAAW,CACtB,SACA,WACG;AACH,SAAO,eACL,EAAE,KAAK,SAAS,QAAQ,OAAO,OAAO,GACtC,OACF;AACF;AAEO,IAAM,sBAAsB,MAAM,CAAC,OAAO;AAO1C,IAAM,cAAc,CAGzB,YAG4D;AAC5D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,CAAC;AAErE,QAAM,WAAW,8CAAc,aAAY,oBAAoB;AAE/D,QAAM,UAA+D,CAAC;AAAA,IACpE;AAAA,QACI,SAAS,gBAAgB,MAAM;AAErC,QAAM,QAAQ,SACZ,UACA,SACA,YACF;AAEA,QAAM,WAAW;AAEjB,SAAO;AACT;AAOO,IAAM,iBAAiB,CAC5B,QACA,SACA,WACG;AACH,SAAO,eACL,EAAE,KAAK,iBAAiB,QAAQ,OAAO,QAAQ,OAAO,GACtD,OACF;AACF;AAEO,IAAM,4BAA4B,CAAC,WAAkC;AAAA,EAC1E;AAAA,EACA,GAAI,SAAS,CAAC,MAAM,IAAI,CAAC;AAC3B;AAOO,IAAM,oBAAoB,CAI/B,QACA,YAQ2D;AAC3D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,CAAC;AAErE,QAAM,WAAW,8CAAc,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mBAAmB,CAI9B,QACA,YAQ2D;AAC3D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,CAAC;AAErE,QAAM,WAAW,8CAAc,aAAY,yBAAyB,MAAM;AAE1E,QAAM,UAAoE,CAAC;AAAA,IACzE;AAAA,QACI,cAAc,QAAQ,gBAAgB,MAAM;AAElD,QAAM,QAAQ,SAIZ,UAAU,SAAS,YAAY;AAIjC,QAAM,WAAW;AAEjB,SAAO;AACT","sourcesContent":["/**\n * Generated by orval v6.9.1 🍺\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.0\n */\nimport { useQuery, useMutation } from \"react-query\";\nimport type {\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type {\n UsersGetResponse,\n DmError,\n UserAccountGetResponse,\n GetUserAccountParams,\n UserAccountPatchBodyBody,\n UserApiLogGetResponse,\n GetUserApiLogParams,\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 * Returns a summary of all users that have accessed the Data Manager API and where the account is not **private**. Users can set their accounts to be private and therefor do not show up in methods like this\n\n * @summary Get information about all known users\n */\nexport const getUsers = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<UsersGetResponse>(\n { url: `/user`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetUsersQueryKey = () => [`/user`];\n\nexport type GetUsersQueryResult = NonNullable<\n Awaited<ReturnType<typeof getUsers>>\n>;\nexport type GetUsersQueryError = ErrorType<void | DmError>;\n\nexport const useGetUsers = <\n TData = Awaited<ReturnType<typeof getUsers>>,\n TError = ErrorType<void | DmError>\n>(options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getUsers>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUsersQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUsers>>> = ({\n signal,\n }) => getUsers(requestOptions, signal);\n\n const query = useQuery<Awaited<ReturnType<typeof getUsers>>, TError, TData>(\n queryKey,\n queryFn,\n queryOptions\n ) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryKey;\n\n return query;\n};\n\n/**\n * Returns a summary of your account\n\n * @summary Get information about your account\n */\nexport const getUserAccount = (\n params?: GetUserAccountParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<UserAccountGetResponse>(\n { url: `/user/account`, method: \"get\", params, signal },\n options\n );\n};\n\nexport const getGetUserAccountQueryKey = (params?: GetUserAccountParams) => [\n `/user/account`,\n ...(params ? [params] : []),\n];\n\nexport type GetUserAccountQueryResult = NonNullable<\n Awaited<ReturnType<typeof getUserAccount>>\n>;\nexport type GetUserAccountQueryError = ErrorType<void | DmError>;\n\nexport const useGetUserAccount = <\n TData = Awaited<ReturnType<typeof getUserAccount>>,\n TError = ErrorType<void | DmError>\n>(\n params?: GetUserAccountParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getUserAccount>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUserAccountQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUserAccount>>> = ({\n signal,\n }) => getUserAccount(params, requestOptions, signal);\n\n const query = useQuery<\n Awaited<ReturnType<typeof getUserAccount>>,\n TError,\n TData\n >(queryKey, queryFn, queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryKey;\n\n return query;\n};\n\n/**\n * Make changes to your user account\n\n * @summary Patch your account\n */\nexport const patchUserAccount = (\n userAccountPatchBodyBody: UserAccountPatchBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n if (userAccountPatchBodyBody.private !== undefined) {\n formData.append(\"private\", userAccountPatchBodyBody.private.toString());\n }\n if (userAccountPatchBodyBody.become_admin !== undefined) {\n formData.append(\n \"become_admin\",\n userAccountPatchBodyBody.become_admin.toString()\n );\n }\n if (userAccountPatchBodyBody.impersonate !== undefined) {\n formData.append(\"impersonate\", userAccountPatchBodyBody.impersonate);\n }\n if (userAccountPatchBodyBody.use_impersonation !== undefined) {\n formData.append(\n \"use_impersonation\",\n userAccountPatchBodyBody.use_impersonation.toString()\n );\n }\n\n return customInstance<void>(\n {\n url: `/user/account`,\n method: \"patch\",\n headers: { \"Content-Type\": \"multipart/form-data\" },\n data: formData,\n },\n options\n );\n};\n\nexport type PatchUserAccountMutationResult = NonNullable<\n Awaited<ReturnType<typeof patchUserAccount>>\n>;\nexport type PatchUserAccountMutationBody = UserAccountPatchBodyBody;\nexport type PatchUserAccountMutationError = ErrorType<DmError>;\n\nexport const usePatchUserAccount = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof patchUserAccount>>,\n TError,\n { data: UserAccountPatchBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof patchUserAccount>>,\n { data: UserAccountPatchBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return patchUserAccount(data, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof patchUserAccount>>,\n TError,\n { data: UserAccountPatchBodyBody },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Returns a summary of your API activity optionally filtered by date. The API log does not include the use of GET methods, and only contains records of potential state-changing calls made against the Data Manager using your account\n\n * @summary Get the API call log recorded against your account\n */\nexport const getUserApiLog = (\n params?: GetUserApiLogParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<UserApiLogGetResponse>(\n { url: `/user/api-log`, method: \"get\", params, signal },\n options\n );\n};\n\nexport const getGetUserApiLogQueryKey = (params?: GetUserApiLogParams) => [\n `/user/api-log`,\n ...(params ? [params] : []),\n];\n\nexport type GetUserApiLogQueryResult = NonNullable<\n Awaited<ReturnType<typeof getUserApiLog>>\n>;\nexport type GetUserApiLogQueryError = ErrorType<void>;\n\nexport const useGetUserApiLog = <\n TData = Awaited<ReturnType<typeof getUserApiLog>>,\n TError = ErrorType<void>\n>(\n params?: GetUserApiLogParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getUserApiLog>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUserApiLogQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUserApiLog>>> = ({\n signal,\n }) => getUserApiLog(params, requestOptions, signal);\n\n const query = useQuery<\n Awaited<ReturnType<typeof getUserApiLog>>,\n TError,\n TData\n >(queryKey, queryFn, queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryKey;\n\n return query;\n};\n"]}
1
+ {"version":3,"sources":["../../src/user/user.ts"],"names":[],"mappings":";;;;;AAUA,SAAS,UAAU,mBAAmB;AAkC/B,IAAM,WAAW,CACtB,SACA,WACG;AACH,SAAO;AAAA,IACL,EAAE,KAAK,SAAS,QAAQ,OAAO,O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BAAgB,QAAW;AACtD,aAAS,OAAO,eAAe,yBAAyB,WAAW;AAAA,EACrE;AACA,MAAI,yBAAyB,sBAAsB,QAAW;AAC5D,aAAS;AAAA,MACP;AAAA,MACA,yBAAyB,kBAAkB,SAAS;AAAA,IACtD;AAAA,EACF;AAEA,SAAO;AAAA,IACL;AAAA,MACE,KAAK;AAAA,MACL,QAAQ;AAAA,MACR,SAAS,EAAE,gBAAgB,sBAAsB;AAAA,MACjD,MAAM;AAAA,IACR;AAAA,IACA;AAAA,EACF;AACF;AAQO,IAAM,sBAAsB,CAGjC,YAQI;AACJ,QAAM,EAAE,UAAU,iBAAiB,SAAS,eAAe,IAAI,WAAW,CAAC;AAE3E,QAAM,aAGF,CAAC,UAAU;AACb,UAAM,EAAE,KAAK,IAAI,SAAS,CAAC;AAE3B,WAAO,iBAAiB,MAAM,cAAc;AAAA,EAC9C;AAEA,SAAO,YAKL,YAAY,eAAe;AAC/B;AAMO,IAAM,gBAAgB,CAC3B,QACA,SACA,WACG;AACH,SAAO;AAAA,IACL,EAAE,KAAK,iBAAiB,QAAQ,OAAO,QAAQ,OAAO;AAAA,IACtD;AAAA,EACF;AACF;AAEO,IAAM,2BAA2B,CAAC,WAAiC;AAAA,EACxE;AAAA,EACA,GAAI,SAAS,CAAC,MAAM,IAAI,CAAC;AAC3B;AAOO,IAAM,mBAAmB,CAI9B,QACA,YAQ2D;AAC3D,QAAM,EAAE,OAAO,cAAc,SAAS,eAAe,IAAI,WAAW,CAAC;AAErE,QAAM,YAAW,6CAAc,aAAY,yBAAyB,MAAM;AAE1E,QAAM,UAAoE,CAAC;AAAA,IACzE;AAAA,EACF,MAAM,cAAc,QAAQ,gBAAgB,MAAM;AAElD,QAAM,QAAQ,SAIZ,UAAU,SAAS,YAAY;AAIjC,QAAM,WAAW;AAEjB,SAAO;AACT","sourcesContent":["/**\n * Generated by orval v6.9.1 🍺\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.0\n */\nimport { useQuery, useMutation } from \"react-query\";\nimport type {\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type {\n UsersGetResponse,\n DmError,\n UserAccountGetResponse,\n GetUserAccountParams,\n UserAccountPatchBodyBody,\n UserApiLogGetResponse,\n GetUserApiLogParams,\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 * Returns a summary of all users that have accessed the Data Manager API and where the account is not **private**. Users can set their accounts to be private and therefor do not show up in methods like this\n\n * @summary Get information about all known users\n */\nexport const getUsers = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<UsersGetResponse>(\n { url: `/user`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetUsersQueryKey = () => [`/user`];\n\nexport type GetUsersQueryResult = NonNullable<\n Awaited<ReturnType<typeof getUsers>>\n>;\nexport type GetUsersQueryError = ErrorType<void | DmError>;\n\nexport const useGetUsers = <\n TData = Awaited<ReturnType<typeof getUsers>>,\n TError = ErrorType<void | DmError>\n>(options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getUsers>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUsersQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUsers>>> = ({\n signal,\n }) => getUsers(requestOptions, signal);\n\n const query = useQuery<Awaited<ReturnType<typeof getUsers>>, TError, TData>(\n queryKey,\n queryFn,\n queryOptions\n ) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryKey;\n\n return query;\n};\n\n/**\n * Returns a summary of your account\n\n * @summary Get information about your account\n */\nexport const getUserAccount = (\n params?: GetUserAccountParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<UserAccountGetResponse>(\n { url: `/user/account`, method: \"get\", params, signal },\n options\n );\n};\n\nexport const getGetUserAccountQueryKey = (params?: GetUserAccountParams) => [\n `/user/account`,\n ...(params ? [params] : []),\n];\n\nexport type GetUserAccountQueryResult = NonNullable<\n Awaited<ReturnType<typeof getUserAccount>>\n>;\nexport type GetUserAccountQueryError = ErrorType<void | DmError>;\n\nexport const useGetUserAccount = <\n TData = Awaited<ReturnType<typeof getUserAccount>>,\n TError = ErrorType<void | DmError>\n>(\n params?: GetUserAccountParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getUserAccount>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUserAccountQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUserAccount>>> = ({\n signal,\n }) => getUserAccount(params, requestOptions, signal);\n\n const query = useQuery<\n Awaited<ReturnType<typeof getUserAccount>>,\n TError,\n TData\n >(queryKey, queryFn, queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryKey;\n\n return query;\n};\n\n/**\n * Make changes to your user account\n\n * @summary Patch your account\n */\nexport const patchUserAccount = (\n userAccountPatchBodyBody: UserAccountPatchBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n if (userAccountPatchBodyBody.private !== undefined) {\n formData.append(\"private\", userAccountPatchBodyBody.private.toString());\n }\n if (userAccountPatchBodyBody.become_admin !== undefined) {\n formData.append(\n \"become_admin\",\n userAccountPatchBodyBody.become_admin.toString()\n );\n }\n if (userAccountPatchBodyBody.impersonate !== undefined) {\n formData.append(\"impersonate\", userAccountPatchBodyBody.impersonate);\n }\n if (userAccountPatchBodyBody.use_impersonation !== undefined) {\n formData.append(\n \"use_impersonation\",\n userAccountPatchBodyBody.use_impersonation.toString()\n );\n }\n\n return customInstance<void>(\n {\n url: `/user/account`,\n method: \"patch\",\n headers: { \"Content-Type\": \"multipart/form-data\" },\n data: formData,\n },\n options\n );\n};\n\nexport type PatchUserAccountMutationResult = NonNullable<\n Awaited<ReturnType<typeof patchUserAccount>>\n>;\nexport type PatchUserAccountMutationBody = UserAccountPatchBodyBody;\nexport type PatchUserAccountMutationError = ErrorType<DmError>;\n\nexport const usePatchUserAccount = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof patchUserAccount>>,\n TError,\n { data: UserAccountPatchBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof patchUserAccount>>,\n { data: UserAccountPatchBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return patchUserAccount(data, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof patchUserAccount>>,\n TError,\n { data: UserAccountPatchBodyBody },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Returns a summary of your API activity optionally filtered by date. The API log does not include the use of GET methods, and only contains records of potential state-changing calls made against the Data Manager using your account\n\n * @summary Get the API call log recorded against your account\n */\nexport const getUserApiLog = (\n params?: GetUserApiLogParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<UserApiLogGetResponse>(\n { url: `/user/api-log`, method: \"get\", params, signal },\n options\n );\n};\n\nexport const getGetUserApiLogQueryKey = (params?: GetUserApiLogParams) => [\n `/user/api-log`,\n ...(params ? [params] : []),\n];\n\nexport type GetUserApiLogQueryResult = NonNullable<\n Awaited<ReturnType<typeof getUserApiLog>>\n>;\nexport type GetUserApiLogQueryError = ErrorType<void>;\n\nexport const useGetUserApiLog = <\n TData = Awaited<ReturnType<typeof getUserApiLog>>,\n TError = ErrorType<void>\n>(\n params?: GetUserApiLogParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getUserApiLog>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUserApiLogQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUserApiLog>>> = ({\n signal,\n }) => getUserApiLog(params, requestOptions, signal);\n\n const query = useQuery<\n Awaited<ReturnType<typeof getUserApiLog>>,\n TError,\n TData\n >(queryKey, queryFn, queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryKey;\n\n return query;\n};\n"]}
package/user/user.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_query from 'react-query';
2
2
  import { UseQueryOptions, QueryKey, UseQueryResult, UseMutationOptions } from 'react-query';
3
- import { bz as customInstance, aQ as UsersGetResponse, bA as ErrorType, bv as DmError, a as GetUserAccountParams, aa as UserAccountDetail, X as UserAccountPatchBodyBody, G as GetUserApiLogParams, aR as UserApiLogGetResponse } from '../custom-instance-b2f7dca1.js';
3
+ import { bB as customInstance, aR as UsersGetResponse, bC as ErrorType, bx as DmError, a as GetUserAccountParams, aa as UserAccountDetail, X as UserAccountPatchBodyBody, G as GetUserApiLogParams, aS as UserApiLogGetResponse } from '../custom-instance-3a73945d.js';
4
4
  import 'axios';
5
5
 
6
6
  declare type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
package/user/user.js CHANGED
@@ -1,11 +1,14 @@
1
1
  import {
2
2
  customInstance
3
- } from "../chunk-3TENYKS7.js";
3
+ } from "../chunk-3O5KIRV4.js";
4
4
 
5
5
  // src/user/user.ts
6
6
  import { useQuery, useMutation } from "react-query";
7
7
  var getUsers = (options, signal) => {
8
- return customInstance({ url: `/user`, method: "get", signal }, options);
8
+ return customInstance(
9
+ { url: `/user`, method: "get", signal },
10
+ options
11
+ );
9
12
  };
10
13
  var getGetUsersQueryKey = () => [`/user`];
11
14
  var useGetUsers = (options) => {
@@ -14,12 +17,19 @@ var useGetUsers = (options) => {
14
17
  const queryFn = ({
15
18
  signal
16
19
  }) => getUsers(requestOptions, signal);
17
- const query = useQuery(queryKey, queryFn, queryOptions);
20
+ const query = useQuery(
21
+ queryKey,
22
+ queryFn,
23
+ queryOptions
24
+ );
18
25
  query.queryKey = queryKey;
19
26
  return query;
20
27
  };
21
28
  var getUserAccount = (params, options, signal) => {
22
- return customInstance({ url: `/user/account`, method: "get", params, signal }, options);
29
+ return customInstance(
30
+ { url: `/user/account`, method: "get", params, signal },
31
+ options
32
+ );
23
33
  };
24
34
  var getGetUserAccountQueryKey = (params) => [
25
35
  `/user/account`,
@@ -41,20 +51,29 @@ var patchUserAccount = (userAccountPatchBodyBody, options) => {
41
51
  formData.append("private", userAccountPatchBodyBody.private.toString());
42
52
  }
43
53
  if (userAccountPatchBodyBody.become_admin !== void 0) {
44
- formData.append("become_admin", userAccountPatchBodyBody.become_admin.toString());
54
+ formData.append(
55
+ "become_admin",
56
+ userAccountPatchBodyBody.become_admin.toString()
57
+ );
45
58
  }
46
59
  if (userAccountPatchBodyBody.impersonate !== void 0) {
47
60
  formData.append("impersonate", userAccountPatchBodyBody.impersonate);
48
61
  }
49
62
  if (userAccountPatchBodyBody.use_impersonation !== void 0) {
50
- formData.append("use_impersonation", userAccountPatchBodyBody.use_impersonation.toString());
63
+ formData.append(
64
+ "use_impersonation",
65
+ userAccountPatchBodyBody.use_impersonation.toString()
66
+ );
51
67
  }
52
- return customInstance({
53
- url: `/user/account`,
54
- method: "patch",
55
- headers: { "Content-Type": "multipart/form-data" },
56
- data: formData
57
- }, options);
68
+ return customInstance(
69
+ {
70
+ url: `/user/account`,
71
+ method: "patch",
72
+ headers: { "Content-Type": "multipart/form-data" },
73
+ data: formData
74
+ },
75
+ options
76
+ );
58
77
  };
59
78
  var usePatchUserAccount = (options) => {
60
79
  const { mutation: mutationOptions, request: requestOptions } = options ?? {};
@@ -65,7 +84,10 @@ var usePatchUserAccount = (options) => {
65
84
  return useMutation(mutationFn, mutationOptions);
66
85
  };
67
86
  var getUserApiLog = (params, options, signal) => {
68
- return customInstance({ url: `/user/api-log`, method: "get", params, signal }, options);
87
+ return customInstance(
88
+ { url: `/user/api-log`, method: "get", params, signal },
89
+ options
90
+ );
69
91
  };
70
92
  var getGetUserApiLogQueryKey = (params) => [
71
93
  `/user/api-log`,
package/user/user.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/user/user.ts"],"sourcesContent":["/**\n * Generated by orval v6.9.1 🍺\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.0\n */\nimport { useQuery, useMutation } from \"react-query\";\nimport type {\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type {\n UsersGetResponse,\n DmError,\n UserAccountGetResponse,\n GetUserAccountParams,\n UserAccountPatchBodyBody,\n UserApiLogGetResponse,\n GetUserApiLogParams,\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 * Returns a summary of all users that have accessed the Data Manager API and where the account is not **private**. Users can set their accounts to be private and therefor do not show up in methods like this\n\n * @summary Get information about all known users\n */\nexport const getUsers = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<UsersGetResponse>(\n { url: `/user`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetUsersQueryKey = () => [`/user`];\n\nexport type GetUsersQueryResult = NonNullable<\n Awaited<ReturnType<typeof getUsers>>\n>;\nexport type GetUsersQueryError = ErrorType<void | DmError>;\n\nexport const useGetUsers = <\n TData = Awaited<ReturnType<typeof getUsers>>,\n TError = ErrorType<void | DmError>\n>(options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getUsers>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUsersQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUsers>>> = ({\n signal,\n }) => getUsers(requestOptions, signal);\n\n const query = useQuery<Awaited<ReturnType<typeof getUsers>>, TError, TData>(\n queryKey,\n queryFn,\n queryOptions\n ) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryKey;\n\n return query;\n};\n\n/**\n * Returns a summary of your account\n\n * @summary Get information about your account\n */\nexport const getUserAccount = (\n params?: GetUserAccountParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<UserAccountGetResponse>(\n { url: `/user/account`, method: \"get\", params, signal },\n options\n );\n};\n\nexport const getGetUserAccountQueryKey = (params?: GetUserAccountParams) => [\n `/user/account`,\n ...(params ? [params] : []),\n];\n\nexport type GetUserAccountQueryResult = NonNullable<\n Awaited<ReturnType<typeof getUserAccount>>\n>;\nexport type GetUserAccountQueryError = ErrorType<void | DmError>;\n\nexport const useGetUserAccount = <\n TData = Awaited<ReturnType<typeof getUserAccount>>,\n TError = ErrorType<void | DmError>\n>(\n params?: GetUserAccountParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getUserAccount>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUserAccountQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUserAccount>>> = ({\n signal,\n }) => getUserAccount(params, requestOptions, signal);\n\n const query = useQuery<\n Awaited<ReturnType<typeof getUserAccount>>,\n TError,\n TData\n >(queryKey, queryFn, queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryKey;\n\n return query;\n};\n\n/**\n * Make changes to your user account\n\n * @summary Patch your account\n */\nexport const patchUserAccount = (\n userAccountPatchBodyBody: UserAccountPatchBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n if (userAccountPatchBodyBody.private !== undefined) {\n formData.append(\"private\", userAccountPatchBodyBody.private.toString());\n }\n if (userAccountPatchBodyBody.become_admin !== undefined) {\n formData.append(\n \"become_admin\",\n userAccountPatchBodyBody.become_admin.toString()\n );\n }\n if (userAccountPatchBodyBody.impersonate !== undefined) {\n formData.append(\"impersonate\", userAccountPatchBodyBody.impersonate);\n }\n if (userAccountPatchBodyBody.use_impersonation !== undefined) {\n formData.append(\n \"use_impersonation\",\n userAccountPatchBodyBody.use_impersonation.toString()\n );\n }\n\n return customInstance<void>(\n {\n url: `/user/account`,\n method: \"patch\",\n headers: { \"Content-Type\": \"multipart/form-data\" },\n data: formData,\n },\n options\n );\n};\n\nexport type PatchUserAccountMutationResult = NonNullable<\n Awaited<ReturnType<typeof patchUserAccount>>\n>;\nexport type PatchUserAccountMutationBody = UserAccountPatchBodyBody;\nexport type PatchUserAccountMutationError = ErrorType<DmError>;\n\nexport const usePatchUserAccount = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof patchUserAccount>>,\n TError,\n { data: UserAccountPatchBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof patchUserAccount>>,\n { data: UserAccountPatchBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return patchUserAccount(data, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof patchUserAccount>>,\n TError,\n { data: UserAccountPatchBodyBody },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Returns a summary of your API activity optionally filtered by date. The API log does not include the use of GET methods, and only contains records of potential state-changing calls made against the Data Manager using your account\n\n * @summary Get the API call log recorded against your account\n */\nexport const getUserApiLog = (\n params?: GetUserApiLogParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<UserApiLogGetResponse>(\n { url: `/user/api-log`, method: \"get\", params, signal },\n options\n );\n};\n\nexport const getGetUserApiLogQueryKey = (params?: GetUserApiLogParams) => [\n `/user/api-log`,\n ...(params ? [params] : []),\n];\n\nexport type GetUserApiLogQueryResult = NonNullable<\n Awaited<ReturnType<typeof getUserApiLog>>\n>;\nexport type GetUserApiLogQueryError = ErrorType<void>;\n\nexport const useGetUserApiLog = <\n TData = Awaited<ReturnType<typeof getUserApiLog>>,\n TError = ErrorType<void>\n>(\n params?: GetUserApiLogParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getUserApiLog>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUserApiLogQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUserApiLog>>> = ({\n signal,\n }) => getUserApiLog(params, requestOptions, signal);\n\n const query = useQuery<\n Awaited<ReturnType<typeof getUserApiLog>>,\n TError,\n TData\n >(queryKey, queryFn, queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryKey;\n\n return query;\n};\n"],"mappings":";;;;;AAUA;AAkCO,IAAM,WAAW,CACtB,SACA,WACG;AACH,SAAO,eACL,EAAE,KAAK,SAAS,QAAQ,OAAO,OAAO,GACtC,OACF;AACF;AAEO,IAAM,sBAAsB,MAAM,CAAC,OAAO;AAO1C,IAAM,cAAc,CAGzB,YAG4D;AAC5D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,CAAC;AAErE,QAAM,WAAW,8CAAc,aAAY,oBAAoB;AAE/D,QAAM,UAA+D,CAAC;AAAA,IACpE;AAAA,QACI,SAAS,gBAAgB,MAAM;AAErC,QAAM,QAAQ,SACZ,UACA,SACA,YACF;AAEA,QAAM,WAAW;AAEjB,SAAO;AACT;AAOO,IAAM,iBAAiB,CAC5B,QACA,SACA,WACG;AACH,SAAO,eACL,EAAE,KAAK,iBAAiB,QAAQ,OAAO,QAAQ,OAAO,GACtD,OACF;AACF;AAEO,IAAM,4BAA4B,CAAC,WAAkC;AAAA,EAC1E;AAAA,EACA,GAAI,SAAS,CAAC,MAAM,IAAI,CAAC;AAC3B;AAOO,IAAM,oBAAoB,CAI/B,QACA,YAQ2D;AAC3D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,CAAC;AAErE,QAAM,WAAW,8CAAc,aAAY,0BAA0B,MAAM;AAE3E,QAAM,UAAqE,CAAC;AAAA,IAC1E;AAAA,QACI,eAAe,QAAQ,gBAAgB,MAAM;AAEnD,QAAM,QAAQ,SAIZ,UAAU,SAAS,YAAY;AAIjC,QAAM,WAAW;AAEjB,SAAO;AACT;AAOO,IAAM,mBAAmB,CAC9B,0BACA,YACG;AACH,QAAM,WAAW,IAAI,SAAS;AAC9B,MAAI,yBAAyB,YAAY,QAAW;AAClD,aAAS,OAAO,WAAW,yBAAyB,QAAQ,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user/user.ts"],"sourcesContent":["/**\n * Generated by orval v6.9.1 🍺\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.0\n */\nimport { useQuery, useMutation } from \"react-query\";\nimport type {\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type {\n UsersGetResponse,\n DmError,\n UserAccountGetResponse,\n GetUserAccountParams,\n UserAccountPatchBodyBody,\n UserApiLogGetResponse,\n GetUserApiLogParams,\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 * Returns a summary of all users that have accessed the Data Manager API and where the account is not **private**. Users can set their accounts to be private and therefor do not show up in methods like this\n\n * @summary Get information about all known users\n */\nexport const getUsers = (\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<UsersGetResponse>(\n { url: `/user`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetUsersQueryKey = () => [`/user`];\n\nexport type GetUsersQueryResult = NonNullable<\n Awaited<ReturnType<typeof getUsers>>\n>;\nexport type GetUsersQueryError = ErrorType<void | DmError>;\n\nexport const useGetUsers = <\n TData = Awaited<ReturnType<typeof getUsers>>,\n TError = ErrorType<void | DmError>\n>(options?: {\n query?: UseQueryOptions<Awaited<ReturnType<typeof getUsers>>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUsersQueryKey();\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUsers>>> = ({\n signal,\n }) => getUsers(requestOptions, signal);\n\n const query = useQuery<Awaited<ReturnType<typeof getUsers>>, TError, TData>(\n queryKey,\n queryFn,\n queryOptions\n ) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryKey;\n\n return query;\n};\n\n/**\n * Returns a summary of your account\n\n * @summary Get information about your account\n */\nexport const getUserAccount = (\n params?: GetUserAccountParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<UserAccountGetResponse>(\n { url: `/user/account`, method: \"get\", params, signal },\n options\n );\n};\n\nexport const getGetUserAccountQueryKey = (params?: GetUserAccountParams) => [\n `/user/account`,\n ...(params ? [params] : []),\n];\n\nexport type GetUserAccountQueryResult = NonNullable<\n Awaited<ReturnType<typeof getUserAccount>>\n>;\nexport type GetUserAccountQueryError = ErrorType<void | DmError>;\n\nexport const useGetUserAccount = <\n TData = Awaited<ReturnType<typeof getUserAccount>>,\n TError = ErrorType<void | DmError>\n>(\n params?: GetUserAccountParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getUserAccount>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUserAccountQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUserAccount>>> = ({\n signal,\n }) => getUserAccount(params, requestOptions, signal);\n\n const query = useQuery<\n Awaited<ReturnType<typeof getUserAccount>>,\n TError,\n TData\n >(queryKey, queryFn, queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryKey;\n\n return query;\n};\n\n/**\n * Make changes to your user account\n\n * @summary Patch your account\n */\nexport const patchUserAccount = (\n userAccountPatchBodyBody: UserAccountPatchBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n if (userAccountPatchBodyBody.private !== undefined) {\n formData.append(\"private\", userAccountPatchBodyBody.private.toString());\n }\n if (userAccountPatchBodyBody.become_admin !== undefined) {\n formData.append(\n \"become_admin\",\n userAccountPatchBodyBody.become_admin.toString()\n );\n }\n if (userAccountPatchBodyBody.impersonate !== undefined) {\n formData.append(\"impersonate\", userAccountPatchBodyBody.impersonate);\n }\n if (userAccountPatchBodyBody.use_impersonation !== undefined) {\n formData.append(\n \"use_impersonation\",\n userAccountPatchBodyBody.use_impersonation.toString()\n );\n }\n\n return customInstance<void>(\n {\n url: `/user/account`,\n method: \"patch\",\n headers: { \"Content-Type\": \"multipart/form-data\" },\n data: formData,\n },\n options\n );\n};\n\nexport type PatchUserAccountMutationResult = NonNullable<\n Awaited<ReturnType<typeof patchUserAccount>>\n>;\nexport type PatchUserAccountMutationBody = UserAccountPatchBodyBody;\nexport type PatchUserAccountMutationError = ErrorType<DmError>;\n\nexport const usePatchUserAccount = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof patchUserAccount>>,\n TError,\n { data: UserAccountPatchBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof patchUserAccount>>,\n { data: UserAccountPatchBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return patchUserAccount(data, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof patchUserAccount>>,\n TError,\n { data: UserAccountPatchBodyBody },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Returns a summary of your API activity optionally filtered by date. The API log does not include the use of GET methods, and only contains records of potential state-changing calls made against the Data Manager using your account\n\n * @summary Get the API call log recorded against your account\n */\nexport const getUserApiLog = (\n params?: GetUserApiLogParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<UserApiLogGetResponse>(\n { url: `/user/api-log`, method: \"get\", params, signal },\n options\n );\n};\n\nexport const getGetUserApiLogQueryKey = (params?: GetUserApiLogParams) => [\n `/user/api-log`,\n ...(params ? [params] : []),\n];\n\nexport type GetUserApiLogQueryResult = NonNullable<\n Awaited<ReturnType<typeof getUserApiLog>>\n>;\nexport type GetUserApiLogQueryError = ErrorType<void>;\n\nexport const useGetUserApiLog = <\n TData = Awaited<ReturnType<typeof getUserApiLog>>,\n TError = ErrorType<void>\n>(\n params?: GetUserApiLogParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getUserApiLog>>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUserApiLogQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUserApiLog>>> = ({\n signal,\n }) => getUserApiLog(params, requestOptions, signal);\n\n const query = useQuery<\n Awaited<ReturnType<typeof getUserApiLog>>,\n TError,\n TData\n >(queryKey, queryFn, queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryKey;\n\n return query;\n};\n"],"mappings":";;;;;AAUA,SAAS,UAAU,mBAAmB;AAkC/B,IAAM,WAAW,CACtB,SACA,WACG;AACH,SAAO;AAAA,IACL,EAAE,KAAK,SAAS,QAAQ,OAAO,OAAO;AAAA,IACtC;AAAA,EACF;AACF;AAEO,IAAM,sBAAsB,MAAM,CAAC,OAAO;AAO1C,IAAM,cAAc,CAGzB,YAG4D;AAC5D,QAAM,EAAE,OAAO,cAAc,SAAS,eAAe,IAAI,WAAW,CAAC;AAErE,QAAM,YAAW,6CAAc,aAAY,oBAAoB;AAE/D,QAAM,UAA+D,CAAC;AAAA,IACpE;AAAA,EACF,MAAM,SAAS,gBAAgB,MAAM;AAErC,QAAM,QAAQ;AAAA,IACZ;AAAA,IAC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EACF;AACF;AAQO,IAAM,sBAAsB,CAGjC,YAQI;AACJ,QAAM,EAAE,UAAU,iBAAiB,SAAS,eAAe,IAAI,WAAW,CAAC;AAE3E,QAAM,aAGF,CAAC,UAAU;AACb,UAAM,EAAE,KAAK,IAAI,SAAS,CAAC;AAE3B,WAAO,iBAAiB,MAAM,cAAc;AAAA,EAC9C;AAEA,SAAO,YAKL,YAAY,eAAe;AAC/B;AAMO,IAAM,gBAAgB,CAC3B,QACA,SACA,WACG;AACH,SAAO;AAAA,IACL,EAAE,KAAK,iBAAiB,QAAQ,OAAO,QAAQ,OAAO;AAAA,IACtD;AAAA,EACF;AACF;AAEO,IAAM,2BAA2B,CAAC,WAAiC;AAAA,EACxE;AAAA,EACA,GAAI,SAAS,CAAC,MAAM,IAAI,CAAC;AAC3B;AAOO,IAAM,mBAAmB,CAI9B,QACA,YAQ2D;AAC3D,QAAM,EAAE,OAAO,cAAc,SAAS,eAAe,IAAI,WAAW,CAAC;AAErE,QAAM,YAAW,6CAAc,aAAY,yBAAyB,MAAM;AAE1E,QAAM,UAAoE,CAAC;AAAA,IACzE;AAAA,EACF,MAAM,cAAc,QAAQ,gBAAgB,MAAM;AAElD,QAAM,QAAQ,SAIZ,UAAU,SAAS,YAAY;AAIjC,QAAM,WAAW;AAEjB,SAAO;AACT;","names":[]}
package/chunk-3TENYKS7.js DELETED
@@ -1,46 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
-
21
- // src/custom-instance.ts
22
- import Axios from "axios";
23
- var AXIOS_INSTANCE = Axios.create();
24
- var setAuthToken = (token) => {
25
- AXIOS_INSTANCE.defaults.headers.common["Authorization"] = `Bearer ${token}`;
26
- };
27
- var setBaseUrl = (baseUrl) => {
28
- AXIOS_INSTANCE.defaults.baseURL = baseUrl;
29
- };
30
- var customInstance = (config, options) => {
31
- const source = Axios.CancelToken.source();
32
- const promise = AXIOS_INSTANCE(__spreadProps(__spreadValues(__spreadValues({}, config), options), { cancelToken: source.token })).then(({ data }) => data);
33
- promise.cancel = () => {
34
- source.cancel("Query was cancelled by React Query");
35
- };
36
- return promise;
37
- };
38
-
39
- export {
40
- __spreadValues,
41
- AXIOS_INSTANCE,
42
- setAuthToken,
43
- setBaseUrl,
44
- customInstance
45
- };
46
- //# sourceMappingURL=chunk-3TENYKS7.js.map
@@ -1,46 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
-
21
- // src/custom-instance.ts
22
- var _axios = require('axios'); var _axios2 = _interopRequireDefault(_axios);
23
- var AXIOS_INSTANCE = _axios2.default.create();
24
- var setAuthToken = (token) => {
25
- AXIOS_INSTANCE.defaults.headers.common["Authorization"] = `Bearer ${token}`;
26
- };
27
- var setBaseUrl = (baseUrl) => {
28
- AXIOS_INSTANCE.defaults.baseURL = baseUrl;
29
- };
30
- var customInstance = (config, options) => {
31
- const source = _axios2.default.CancelToken.source();
32
- const promise = AXIOS_INSTANCE(__spreadProps(__spreadValues(__spreadValues({}, config), options), { cancelToken: source.token })).then(({ data }) => data);
33
- promise.cancel = () => {
34
- source.cancel("Query was cancelled by React Query");
35
- };
36
- return promise;
37
- };
38
-
39
-
40
-
41
-
42
-
43
-
44
-
45
- exports.__spreadValues = __spreadValues; exports.AXIOS_INSTANCE = AXIOS_INSTANCE; exports.setAuthToken = setAuthToken; exports.setBaseUrl = setBaseUrl; exports.customInstance = customInstance;
46
- //# sourceMappingURL=chunk-RHHRF25R.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/custom-instance.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAUA;AAEO,IAAM,iBAAiB,MAAM,OAAO;AAOpC,IAAM,eAAe,CAAC,UAAkB;AAC7C,iBAAe,SAAS,QAAQ,OAAO,mBAAmB,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,gDAAK,SAAW,UAAhB,EAAyB,aAAa,OAAO,MAAM,EAAC,EAAE,KACnF,CAAC,EAAE,WAAW,IAChB;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"]}