@squonk/data-manager-client 1.1.11 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accounting/accounting.cjs.map +1 -1
- package/accounting/accounting.d.ts +1 -1
- package/accounting/accounting.js.map +1 -1
- package/admin/admin.cjs +26 -1
- package/admin/admin.cjs.map +1 -1
- package/admin/admin.d.ts +23 -2
- package/admin/admin.js +25 -0
- package/admin/admin.js.map +1 -1
- package/application/application.cjs.map +1 -1
- package/application/application.d.ts +1 -1
- package/application/application.js.map +1 -1
- package/{custom-instance-f006607a.d.ts → custom-instance-e5540c3b.d.ts} +43 -10
- package/dataset/dataset.cjs.map +1 -1
- package/dataset/dataset.d.ts +1 -1
- package/dataset/dataset.js.map +1 -1
- package/exchange-rate/exchange-rate.cjs.map +1 -1
- package/exchange-rate/exchange-rate.d.ts +1 -1
- package/exchange-rate/exchange-rate.js.map +1 -1
- package/file/file.cjs.map +1 -1
- package/file/file.d.ts +1 -1
- package/file/file.js.map +1 -1
- package/index.cjs.map +1 -1
- package/index.d.ts +1 -1
- package/index.js.map +1 -1
- package/instance/instance.cjs.map +1 -1
- package/instance/instance.d.ts +1 -1
- package/instance/instance.js.map +1 -1
- package/job/job.cjs.map +1 -1
- package/job/job.d.ts +1 -1
- package/job/job.js.map +1 -1
- package/metadata/metadata.cjs.map +1 -1
- package/metadata/metadata.d.ts +1 -1
- package/metadata/metadata.js.map +1 -1
- package/package.json +1 -1
- package/project/project.cjs.map +1 -1
- package/project/project.d.ts +1 -1
- package/project/project.js.map +1 -1
- package/src/accounting/accounting.ts +1 -1
- package/src/admin/admin.ts +79 -1
- package/src/application/application.ts +1 -1
- package/src/data-manager-api.schemas.ts +47 -10
- package/src/dataset/dataset.ts +1 -1
- package/src/exchange-rate/exchange-rate.ts +1 -1
- package/src/file/file.ts +1 -1
- package/src/instance/instance.ts +1 -1
- package/src/job/job.ts +1 -1
- package/src/metadata/metadata.ts +1 -1
- package/src/project/project.ts +1 -1
- package/src/task/task.ts +1 -1
- package/src/type/type.ts +1 -1
- package/src/user/user.ts +1 -1
- package/task/task.cjs.map +1 -1
- package/task/task.d.ts +1 -1
- package/task/task.js.map +1 -1
- package/type/type.cjs.map +1 -1
- package/type/type.d.ts +1 -1
- package/type/type.js.map +1 -1
- package/user/user.cjs.map +1 -1
- package/user/user.d.ts +1 -1
- package/user/user.js.map +1 -1
package/task/task.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/task/task.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.1\n */\nimport { useQuery, useMutation } from \"@tanstack/react-query\";\nimport type {\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"@tanstack/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.\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 [\"data-manager-api\", `/task`, ...(params ? [params] : [])] as const;\n\nexport const getGetTasksQueryOptions = <\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): UseQueryOptions<Awaited<ReturnType<typeof getTasks>>, TError, TData> & {\n queryKey: QueryKey;\n} => {\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 return { queryKey, queryFn, ...queryOptions };\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 queryOptions = getGetTasksQueryOptions(params, 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 * Returns Task information including its states and events.\n\nYou can only retrieve a Task if you have access to it. 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** and **Jobs**.\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 500 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 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 [\"data-manager-api\", `/task/${taskId}`, ...(params ? [params] : [])] as const;\n\nexport const getGetTaskQueryOptions = <\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): UseQueryOptions<Awaited<ReturnType<typeof getTask>>, TError, TData> & {\n queryKey: QueryKey;\n} => {\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 return { queryKey, queryFn, enabled: !!taskId, ...queryOptions };\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 queryOptions = getGetTaskQueryOptions(taskId, params, 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 * 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 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 const getDeleteTaskMutationOptions = <\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}): UseMutationOptions<\n Awaited<ReturnType<typeof deleteTask>>,\n TError,\n { taskId: string },\n TContext\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 { mutationFn, ...mutationOptions };\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 mutationOptions = getDeleteTask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B,MAAM;AAEpD,SAAO,EAAE,UAAU,SAAS,SAAS,CAAC,CAAC,QAAQ,GAAG,aAAa;AACjE;AAOO,IAAM,aAAa,CAIxB,QACA,QACA,YAI2D;AAC3D,QAAM,eAAe,uBAAuB,QAAQ,QAAQ,OAAO;AAEnE,QAAM,QAAQ,SAAS,YAAY;AAInC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAWO,IAAM,aAAa,CACxB,QACA,YACG;AACH,SAAO;AAAA,IACL,EAAE,KAAK,SAAS,UAAU,QAAQ,SAAS;AAAA,IAC3C;AAAA,EACF;AACF;AAEO,IAAM,+BAA+B,CAG1C,YAaG;AACH,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,EAAE,YAAY,GAAG,gBAAgB;AAC1C;AAQO,IAAM,gBAAgB,CAG3B,YAQI;AACJ,QAAM,kBAAkB,6BAA6B,OAAO;AAE5D,SAAO,YAAY,eAAe;AACpC;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/task/task.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, useMutation } from \"@tanstack/react-query\";\nimport type {\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"@tanstack/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.\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 [\"data-manager-api\", `/task`, ...(params ? [params] : [])] as const;\n\nexport const getGetTasksQueryOptions = <\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): UseQueryOptions<Awaited<ReturnType<typeof getTasks>>, TError, TData> & {\n queryKey: QueryKey;\n} => {\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 return { queryKey, queryFn, ...queryOptions };\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 queryOptions = getGetTasksQueryOptions(params, 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 * Returns Task information including its states and events.\n\nYou can only retrieve a Task if you have access to it. 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** and **Jobs**.\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 500 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 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 [\"data-manager-api\", `/task/${taskId}`, ...(params ? [params] : [])] as const;\n\nexport const getGetTaskQueryOptions = <\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): UseQueryOptions<Awaited<ReturnType<typeof getTask>>, TError, TData> & {\n queryKey: QueryKey;\n} => {\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 return { queryKey, queryFn, enabled: !!taskId, ...queryOptions };\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 queryOptions = getGetTaskQueryOptions(taskId, params, 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 * 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 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 const getDeleteTaskMutationOptions = <\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}): UseMutationOptions<\n Awaited<ReturnType<typeof deleteTask>>,\n TError,\n { taskId: string },\n TContext\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 { mutationFn, ...mutationOptions };\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 mutationOptions = getDeleteTaskMutationOptions(options);\n\n return useMutation(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,WAClC,CAAC,oBAAoB,SAAS,GAAI,SAAS,CAAC,MAAM,IAAI,CAAC,CAAE;AAEpD,IAAM,0BAA0B,CAIrC,QACA,YAUG;AACH,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,SAAO,EAAE,UAAU,SAAS,GAAG,aAAa;AAC9C;AAOO,IAAM,cAAc,CAIzB,QACA,YAQ2D;AAC3D,QAAM,eAAe,wBAAwB,QAAQ,OAAO;AAE5D,QAAM,QAAQ,SAAS,YAAY;AAInC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAuBO,IAAM,UAAU,CACrB,QACA,QACA,SACA,WACG;AACH,SAAO;A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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,oBAAoB,OAAO;AAElE,IAAM,8BAA8B,CAGzC,YASG;AACH,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,SAAO,EAAE,UAAU,SAAS,GAAG,aAAa;AAC9C;AAOO,IAAM,kBAAkB,CAG7B,YAO4D;AAC5D,QAAM,eAAe,4BAA4B,OAAO;AAExD,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.
|
|
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,oBAAoB,OAAO;AAElE,IAAM,8BAA8B,CAGzC,YASG;AACH,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,SAAO,EAAE,UAAU,SAAS,GAAG,aAAa;AAC9C;AAOO,IAAM,kBAAkB,CAG7B,YAO4D;AAC5D,QAAM,eAAe,4BAA4B,OAAO;AAExD,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 { 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 = () => [\"data-manager-api\", `/type`] as const;\n\nexport const getGetFileTypesQueryOptions = <\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}): UseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData> & {\n queryKey: QueryKey;\n} => {\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 return { queryKey, queryFn, ...queryOptions };\n};\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 queryOptions = getGetFileTypesQueryOptions(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"]}
|
package/type/type.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UseQueryOptions, QueryKey, UseQueryResult } from '@tanstack/react-query';
|
|
2
|
-
import {
|
|
2
|
+
import { bV as customInstance, b9 as TypesGetResponse, bW as ErrorType, bR as DmError } from '../custom-instance-e5540c3b.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;
|
package/type/type.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/type/type.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.
|
|
1
|
+
{"version":3,"sources":["../../src/type/type.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 { 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 = () => [\"data-manager-api\", `/type`] as const;\n\nexport const getGetFileTypesQueryOptions = <\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}): UseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData> & {\n queryKey: QueryKey;\n} => {\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 return { queryKey, queryFn, ...queryOptions };\n};\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 queryOptions = getGetFileTypesQueryOptions(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;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,oBAAoB,OAAO;AAElE,IAAM,8BAA8B,CAGzC,YASG;AACH,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,SAAO,EAAE,UAAU,SAAS,GAAG,aAAa;AAC9C;AAOO,IAAM,kBAAkB,CAG7B,YAO4D;AAC5D,QAAM,eAAe,4BAA4B,OAAO;AAExD,QAAM,QAAQ,SAAS,YAAY;AAInC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;","names":[]}
|
package/user/user.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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,OAAO;AAAA,IACtC;AAAA,EACF;AACF;AAEO,IAAM,sBAAsB,MAAM,CAAC,oBAAoB,OAAO;AAE9D,IAAM,0BAA0B,CAGrC,YAKG;AACH,QAAM,EAAE,O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AAM;AAElD,SAAO,EAAE,UAAU,SAAS,GAAG,aAAa;AAC9C;AAOO,IAAM,mBAAmB,CAI9B,QACA,YAQ2D;AAC3D,QAAM,eAAe,6BAA6B,QAAQ,OAAO;AAEjE,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.1\n */\nimport { useQuery, useMutation } from \"@tanstack/react-query\";\nimport type {\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"@tanstack/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 therefore will 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 = () => [\"data-manager-api\", `/user`] as const;\n\nexport const getGetUsersQueryOptions = <\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}): UseQueryOptions<Awaited<ReturnType<typeof getUsers>>, TError, TData> & {\n queryKey: QueryKey;\n} => {\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 return { queryKey, queryFn, ...queryOptions };\n};\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 queryOptions = getGetUsersQueryOptions(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 * @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 [\"data-manager-api\", `/user/account`, ...(params ? [params] : [])] as const;\n\nexport const getGetUserAccountQueryOptions = <\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): UseQueryOptions<\n Awaited<ReturnType<typeof getUserAccount>>,\n TError,\n TData\n> & { 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 return { queryKey, queryFn, ...queryOptions };\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 queryOptions = getGetUserAccountQueryOptions(params, 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 * @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 const getPatchUserAccountMutationOptions = <\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}): UseMutationOptions<\n Awaited<ReturnType<typeof patchUserAccount>>,\n TError,\n { data: UserAccountPatchBodyBody },\n TContext\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 { mutationFn, ...mutationOptions };\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 mutationOptions = getPatchUserAccountMutationOptions(options);\n\n return useMutation(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 [\"data-manager-api\", `/user/api-log`, ...(params ? [params] : [])] as const;\n\nexport const getGetUserApiLogQueryOptions = <\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): UseQueryOptions<Awaited<ReturnType<typeof getUserApiLog>>, TError, TData> & {\n queryKey: QueryKey;\n} => {\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 return { queryKey, queryFn, ...queryOptions };\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 queryOptions = getGetUserApiLogQueryOptions(params, 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/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,OAAO;AAAA,IACtC;AAAA,EACF;AACF;AAEO,IAAM,sBAAsB,MAAM,CAAC,oBAAoB,OAAO;AAE9D,IAAM,0BAA0B,CAGrC,YAKG;AACH,QAAM,EAAE,OAAO,cAAc,SAAS,eAAe,IAAI,WAAW,CAAC;AAErE,QAAM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C;AAOO,IAAM,mBAAmB,CAI9B,QACA,YAQ2D;AAC3D,QAAM,eAAe,6BAA6B,QAAQ,OAAO;AAEjE,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, useMutation } from \"@tanstack/react-query\";\nimport type {\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"@tanstack/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 therefore will 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 = () => [\"data-manager-api\", `/user`] as const;\n\nexport const getGetUsersQueryOptions = <\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}): UseQueryOptions<Awaited<ReturnType<typeof getUsers>>, TError, TData> & {\n queryKey: QueryKey;\n} => {\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 return { queryKey, queryFn, ...queryOptions };\n};\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 queryOptions = getGetUsersQueryOptions(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 * @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 [\"data-manager-api\", `/user/account`, ...(params ? [params] : [])] as const;\n\nexport const getGetUserAccountQueryOptions = <\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): UseQueryOptions<\n Awaited<ReturnType<typeof getUserAccount>>,\n TError,\n TData\n> & { 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 return { queryKey, queryFn, ...queryOptions };\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 queryOptions = getGetUserAccountQueryOptions(params, 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 * @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 const getPatchUserAccountMutationOptions = <\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}): UseMutationOptions<\n Awaited<ReturnType<typeof patchUserAccount>>,\n TError,\n { data: UserAccountPatchBodyBody },\n TContext\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 { mutationFn, ...mutationOptions };\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 mutationOptions = getPatchUserAccountMutationOptions(options);\n\n return useMutation(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 [\"data-manager-api\", `/user/api-log`, ...(params ? [params] : [])] as const;\n\nexport const getGetUserApiLogQueryOptions = <\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): UseQueryOptions<Awaited<ReturnType<typeof getUserApiLog>>, TError, TData> & {\n queryKey: QueryKey;\n} => {\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 return { queryKey, queryFn, ...queryOptions };\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 queryOptions = getGetUserApiLogQueryOptions(params, 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"]}
|
package/user/user.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
2
|
import { UseQueryOptions, QueryKey, UseQueryResult, UseMutationOptions } from '@tanstack/react-query';
|
|
3
|
-
import {
|
|
3
|
+
import { bV as customInstance, b6 as UsersGetResponse, bW as ErrorType, bR as DmError, b as GetUserAccountParams, ak as UserAccountDetail, a4 as UserAccountPatchBodyBody, G as GetUserApiLogParams, b7 as UserApiLogGetResponse } from '../custom-instance-e5540c3b.js';
|
|
4
4
|
import 'axios';
|
|
5
5
|
|
|
6
6
|
type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
|
package/user/user.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/user/user.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.1\n */\nimport { useQuery, useMutation } from \"@tanstack/react-query\";\nimport type {\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"@tanstack/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 therefore will 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 = () => [\"data-manager-api\", `/user`] as const;\n\nexport const getGetUsersQueryOptions = <\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}): UseQueryOptions<Awaited<ReturnType<typeof getUsers>>, TError, TData> & {\n queryKey: QueryKey;\n} => {\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 return { queryKey, queryFn, ...queryOptions };\n};\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 queryOptions = getGetUsersQueryOptions(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 * @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 [\"data-manager-api\", `/user/account`, ...(params ? [params] : [])] as const;\n\nexport const getGetUserAccountQueryOptions = <\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): UseQueryOptions<\n Awaited<ReturnType<typeof getUserAccount>>,\n TError,\n TData\n> & { 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 return { queryKey, queryFn, ...queryOptions };\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 queryOptions = getGetUserAccountQueryOptions(params, 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 * @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 const getPatchUserAccountMutationOptions = <\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}): UseMutationOptions<\n Awaited<ReturnType<typeof patchUserAccount>>,\n TError,\n { data: UserAccountPatchBodyBody },\n TContext\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 { mutationFn, ...mutationOptions };\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 mutationOptions = getPatchUserAccountMutationOptions(options);\n\n return useMutation(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 [\"data-manager-api\", `/user/api-log`, ...(params ? [params] : [])] as const;\n\nexport const getGetUserApiLogQueryOptions = <\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): UseQueryOptions<Awaited<ReturnType<typeof getUserApiLog>>, TError, TData> & {\n queryKey: QueryKey;\n} => {\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 return { queryKey, queryFn, ...queryOptions };\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 queryOptions = getGetUserApiLogQueryOptions(params, 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,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,oBAAoB,OAAO;AAE9D,IAAM,0BAA0B,CAGrC,YAKG;AACH,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,SAAO,EAAE,UAAU,SAAS,GAAG,aAAa;AA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AAO;AACT;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/user/user.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, useMutation } from \"@tanstack/react-query\";\nimport type {\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"@tanstack/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 therefore will 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 = () => [\"data-manager-api\", `/user`] as const;\n\nexport const getGetUsersQueryOptions = <\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}): UseQueryOptions<Awaited<ReturnType<typeof getUsers>>, TError, TData> & {\n queryKey: QueryKey;\n} => {\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 return { queryKey, queryFn, ...queryOptions };\n};\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 queryOptions = getGetUsersQueryOptions(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 * @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 [\"data-manager-api\", `/user/account`, ...(params ? [params] : [])] as const;\n\nexport const getGetUserAccountQueryOptions = <\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): UseQueryOptions<\n Awaited<ReturnType<typeof getUserAccount>>,\n TError,\n TData\n> & { 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 return { queryKey, queryFn, ...queryOptions };\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 queryOptions = getGetUserAccountQueryOptions(params, 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 * @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 const getPatchUserAccountMutationOptions = <\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}): UseMutationOptions<\n Awaited<ReturnType<typeof patchUserAccount>>,\n TError,\n { data: UserAccountPatchBodyBody },\n TContext\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 { mutationFn, ...mutationOptions };\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 mutationOptions = getPatchUserAccountMutationOptions(options);\n\n return useMutation(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 [\"data-manager-api\", `/user/api-log`, ...(params ? [params] : [])] as const;\n\nexport const getGetUserApiLogQueryOptions = <\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): UseQueryOptions<Awaited<ReturnType<typeof getUserApiLog>>, TError, TData> & {\n queryKey: QueryKey;\n} => {\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 return { queryKey, queryFn, ...queryOptions };\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 queryOptions = getGetUserApiLogQueryOptions(params, 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,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,oBAAoB,OAAO;AAE9D,IAAM,0BAA0B,CAGrC,YAKG;AACH,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,SAAO,EAAE,UAAU,SAAS,GAAG,aAAa;AAC9C;AAOO,IAAM,cAAc,CAGzB,YAG4D;AAC5D,QAAM,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