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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/accounting/accounting.cjs +31 -13
  2. package/accounting/accounting.cjs.map +1 -1
  3. package/accounting/accounting.d.cts +77 -0
  4. package/accounting/accounting.d.ts +10 -1
  5. package/accounting/accounting.js +29 -11
  6. package/accounting/accounting.js.map +1 -1
  7. package/admin/admin.cjs +67 -27
  8. package/admin/admin.cjs.map +1 -1
  9. package/admin/admin.d.cts +324 -0
  10. package/admin/admin.d.ts +55 -22
  11. package/admin/admin.js +57 -17
  12. package/admin/admin.js.map +1 -1
  13. package/application/application.cjs +23 -13
  14. package/application/application.cjs.map +1 -1
  15. package/application/application.d.cts +57 -0
  16. package/application/application.d.ts +7 -1
  17. package/application/application.js +22 -12
  18. package/application/application.js.map +1 -1
  19. package/{chunk-UZTHSGDT.cjs → chunk-J22A7LHX.cjs} +1 -1
  20. package/chunk-J22A7LHX.cjs.map +1 -0
  21. package/{chunk-3RNIDX7T.js → chunk-UKA7G3OB.js} +1 -1
  22. package/{chunk-3RNIDX7T.js.map → chunk-UKA7G3OB.js.map} +1 -1
  23. package/configuration/configuration.cjs +13 -7
  24. package/configuration/configuration.cjs.map +1 -1
  25. package/configuration/configuration.d.cts +29 -0
  26. package/configuration/configuration.d.ts +4 -1
  27. package/configuration/configuration.js +13 -7
  28. package/configuration/configuration.js.map +1 -1
  29. package/{custom-instance-50c9dd5d.d.ts → custom-instance-a2110e78.d.ts} +825 -825
  30. package/dataset/dataset.cjs +71 -72
  31. package/dataset/dataset.cjs.map +1 -1
  32. package/dataset/dataset.d.cts +315 -0
  33. package/dataset/dataset.d.ts +46 -16
  34. package/dataset/dataset.js +62 -63
  35. package/dataset/dataset.js.map +1 -1
  36. package/exchange-rate/exchange-rate.cjs +43 -32
  37. package/exchange-rate/exchange-rate.cjs.map +1 -1
  38. package/exchange-rate/exchange-rate.d.cts +180 -0
  39. package/exchange-rate/exchange-rate.d.ts +25 -7
  40. package/exchange-rate/exchange-rate.js +38 -27
  41. package/exchange-rate/exchange-rate.js.map +1 -1
  42. package/file/file.cjs +38 -22
  43. package/file/file.cjs.map +1 -1
  44. package/file/file.d.cts +154 -0
  45. package/file/file.d.ts +25 -10
  46. package/file/file.js +34 -18
  47. package/file/file.js.map +1 -1
  48. package/index.cjs +10 -10
  49. package/index.cjs.map +1 -1
  50. package/index.d.cts +2 -0
  51. package/index.d.ts +1 -1
  52. package/index.js +9 -9
  53. package/index.js.map +1 -1
  54. package/instance/instance.cjs +47 -37
  55. package/instance/instance.cjs.map +1 -1
  56. package/instance/instance.d.cts +215 -0
  57. package/instance/instance.d.ts +33 -12
  58. package/instance/instance.js +41 -31
  59. package/instance/instance.js.map +1 -1
  60. package/job/job.cjs +36 -19
  61. package/job/job.cjs.map +1 -1
  62. package/job/job.d.cts +85 -0
  63. package/job/job.d.ts +10 -1
  64. package/job/job.js +34 -17
  65. package/job/job.js.map +1 -1
  66. package/metadata/metadata.cjs +23 -26
  67. package/metadata/metadata.cjs.map +1 -1
  68. package/metadata/metadata.d.cts +132 -0
  69. package/metadata/metadata.d.ts +19 -7
  70. package/metadata/metadata.js +20 -23
  71. package/metadata/metadata.js.map +1 -1
  72. package/package.json +12 -12
  73. package/project/project.cjs +70 -48
  74. package/project/project.cjs.map +1 -1
  75. package/project/project.d.cts +377 -0
  76. package/project/project.d.ts +61 -25
  77. package/project/project.js +59 -37
  78. package/project/project.js.map +1 -1
  79. package/src/accounting/accounting.ts +179 -194
  80. package/src/admin/admin.ts +590 -735
  81. package/src/application/application.ts +125 -141
  82. package/src/configuration/configuration.ts +72 -60
  83. package/src/data-manager-api.schemas.ts +940 -941
  84. package/src/dataset/dataset.ts +591 -770
  85. package/src/exchange-rate/exchange-rate.ts +362 -478
  86. package/src/file/file.ts +292 -357
  87. package/src/instance/instance.ts +427 -533
  88. package/src/job/job.ts +187 -198
  89. package/src/metadata/metadata.ts +247 -339
  90. package/src/project/project.ts +669 -860
  91. package/src/task/task.ts +181 -202
  92. package/src/type/type.ts +72 -68
  93. package/src/user/user.ts +248 -286
  94. package/task/task.cjs +31 -15
  95. package/task/task.cjs.map +1 -1
  96. package/task/task.d.cts +103 -0
  97. package/task/task.d.ts +10 -1
  98. package/task/task.js +29 -13
  99. package/task/task.js.map +1 -1
  100. package/type/type.cjs +13 -7
  101. package/type/type.cjs.map +1 -1
  102. package/type/type.d.cts +31 -0
  103. package/type/type.d.ts +4 -1
  104. package/type/type.js +13 -7
  105. package/type/type.js.map +1 -1
  106. package/user/user.cjs +39 -28
  107. package/user/user.cjs.map +1 -1
  108. package/user/user.d.cts +104 -0
  109. package/user/user.d.ts +16 -4
  110. package/user/user.js +36 -25
  111. package/user/user.js.map +1 -1
  112. package/chunk-UZTHSGDT.cjs.map +0 -1
package/task/task.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/task/task.ts"],"names":[],"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;AAAA,IACL,EAAE,KAAK,SAAS,UAAU,QAAQ,OAAO,QAAQ,OAAO;AAAA,IACxD;AAAA,EACF;AACF;AAEO,IAAM,qBAAqB,CAAC,QAAgB,WACjD,CAAC,oBAAoB,SAAS,UAAU,GAAI,SAAS,CAAC,MAAM,IAAI,CAAC,CAAE;AAE9D,IAAM,yBAAyB,CAIpC,QACA,QACA,YAMG;AACH,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,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","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"]}
1
+ {"version":3,"sources":["../../src/task/task.ts"],"names":[],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAkCA,IAAM,WAAW,CACpB,QACH,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAS,QAAQ;AAAA,MACrB;AAAA,MAAQ;AAAA,IACZ;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,sBAAsB,CAAC,WAA6B;AAE7D,SAAO,CAAC,oBAAoB,SAAS,GAAI,SAAS,CAAC,MAAM,IAAG,CAAC,CAAE;AAC/D;AAGG,IAAM,0BAA0B,CAAmF,QAAyB,YAC9I;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,oBAAoB,MAAM;AAIpE,QAAM,UAA+D,CAAC,EAAE,OAAO,MAAM,SAAS,QAAQ,gBAAgB,MAAM;AAM7H,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAQO,IAAM,cAAc,CAC1B,QAAyB,YAEsC;AAE9D,QAAM,eAAe,wBAAwB,QAAO,OAAO;AAE3D,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAyBO,IAAM,UAAU,CACnB,QACA,QACH,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK,SAAS,MAAM;AAAA,MAAI,QAAQ;AAAA,MAC/B;AAAA,MAAQ;AAAA,IACZ;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,qBAAqB,CAAC,QAC/B,WAA4B;AAE5B,SAAO,CAAC,oBAAoB,SAAS,MAAM,IAAI,GAAI,SAAS,CAAC,MAAM,IAAG,CAAC,CAAE;AACzE;AAGG,IAAM,yBAAyB,CAAkF,QACpH,QAAwB,YACvB;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,mBAAmB,QAAO,MAAM;AAI1E,QAAM,UAA8D,CAAC,EAAE,OAAO,MAAM,QAAQ,QAAO,QAAQ,gBAAgB,MAAM;AAMlI,SAAQ,EAAE,UAAU,SAAS,SAAS,CAAC,CAAE,QAAS,GAAG,aAAY;AACpE;AAQO,IAAM,aAAa,CACzB,QACG,QAAwB,YAEoC;AAE9D,QAAM,eAAe,uBAAuB,QAAO,QAAO,OAAO;AAEjE,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAaO,IAAM,aAAa,CACtB,QACH,YAAsD;AAGjD,SAAO;AAAA,IACP;AAAA,MAAC,KAAK,SAAS,MAAM;AAAA,MAAI,QAAQ;AAAA,IACnC;AAAA,IACE;AAAA,EAAO;AACT;AAIG,IAAM,+BAA+B,CAEpB,YAC4E;AACnG,QAAM,EAAC,UAAU,iBAAiB,SAAS,eAAc,IAAI,WAAW,CAAC;AAKpE,QAAM,aAAyF,CAAC,UAAU;AACtG,UAAM,EAAC,OAAM,IAAI,SAAS,CAAC;AAE3B,WAAQ,WAAW,QAAO,cAAc;AAAA,EAC1C;AAKL,SAAQ,EAAE,YAAY,GAAG,gBAAgB;AAAC;AAStC,IAAM,gBAAgB,CAEL,YACnB;AAEC,QAAM,kBAAkB,6BAA6B,OAAO;AAE5D,SAAO,YAAY,eAAe;AACpC","sourcesContent":["/**\n * Generated by orval v6.20.0 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 1.2\n */\nimport {\n useMutation,\n useQuery\n} from '@tanstack/react-query'\nimport type {\n MutationFunction,\n QueryFunction,\n QueryKey,\n UseMutationOptions,\n UseQueryOptions,\n UseQueryResult\n} from '@tanstack/react-query'\nimport type {\n DmError,\n GetTaskParams,\n GetTasksParams,\n TaskGetResponse,\n TasksGetResponse\n} from '../data-manager-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\n// eslint-disable-next-line\n type SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P,\n) => any\n ? P\n : never;\n\n\n/**\n * 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>,signal?: AbortSignal\n) => {\n \n \n return customInstance<TasksGetResponse>(\n {url: `/task`, method: 'get',\n params, signal\n },\n options);\n }\n \n\nexport const getGetTasksQueryKey = (params?: GetTasksParams,) => {\n \n return [\"data-manager-api\", `/task`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetTasksQueryOptions = <TData = Awaited<ReturnType<typeof getTasks>>, TError = ErrorType<void | DmError>>(params?: GetTasksParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getTasks>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetTasksQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getTasks>>> = ({ signal }) => getTasks(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getTasks>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetTasksQueryResult = NonNullable<Awaited<ReturnType<typeof getTasks>>>\nexport type GetTasksQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Returns a list of Tasks\n */\nexport const useGetTasks = <TData = Awaited<ReturnType<typeof getTasks>>, TError = ErrorType<void | DmError>>(\n params?: GetTasksParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getTasks>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetTasksQueryOptions(params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\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>,signal?: AbortSignal\n) => {\n \n \n return customInstance<TaskGetResponse>(\n {url: `/task/${taskId}`, method: 'get',\n params, signal\n },\n options);\n }\n \n\nexport const getGetTaskQueryKey = (taskId: string,\n params?: GetTaskParams,) => {\n \n return [\"data-manager-api\", `/task/${taskId}`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetTaskQueryOptions = <TData = Awaited<ReturnType<typeof getTask>>, TError = ErrorType<void | DmError>>(taskId: string,\n params?: GetTaskParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getTask>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetTaskQueryKey(taskId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getTask>>> = ({ signal }) => getTask(taskId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(taskId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getTask>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetTaskQueryResult = NonNullable<Awaited<ReturnType<typeof getTask>>>\nexport type GetTaskQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Returns Task information\n */\nexport const useGetTask = <TData = Awaited<ReturnType<typeof getTask>>, TError = ErrorType<void | DmError>>(\n taskId: string,\n params?: GetTaskParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getTask>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetTaskQueryOptions(taskId,params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\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 \n return customInstance<void>(\n {url: `/task/${taskId}`, method: 'delete'\n },\n options);\n }\n \n\n\nexport const getDeleteTaskMutationOptions = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteTask>>, TError,{taskId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteTask>>, TError,{taskId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteTask>>, {taskId: string}> = (props) => {\n const {taskId} = props ?? {};\n\n return deleteTask(taskId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteTaskMutationResult = NonNullable<Awaited<ReturnType<typeof deleteTask>>>\n \n export type DeleteTaskMutationError = ErrorType<DmError>\n\n /**\n * @summary Delete a Task entry\n */\nexport const useDeleteTask = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteTask>>, TError,{taskId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeleteTaskMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n "]}
@@ -0,0 +1,103 @@
1
+ import * as _tanstack_react_query from '@tanstack/react-query';
2
+ import { UseQueryOptions, QueryKey, UseQueryResult, UseMutationOptions } from '@tanstack/react-query';
3
+ import { m as GetTasksParams, bX as customInstance, bc as TasksGetResponse, bY as ErrorType, bT as DmError, l as GetTaskParams, be as TaskGetResponse } from '../custom-instance-a2110e78.js';
4
+ import 'axios';
5
+
6
+ type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
7
+ /**
8
+ * Returns a list of Tasks that you have access to.
9
+
10
+ * @summary Returns a list of Tasks
11
+ */
12
+ declare const getTasks: (params?: GetTasksParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<TasksGetResponse>;
13
+ declare const getGetTasksQueryKey: (params?: GetTasksParams) => readonly ["data-manager-api", "/task", ...GetTasksParams[]];
14
+ declare const getGetTasksQueryOptions: <TData = TasksGetResponse, TError = ErrorType<void | DmError>>(params?: GetTasksParams, options?: {
15
+ query?: UseQueryOptions<TasksGetResponse, TError, TData, QueryKey> | undefined;
16
+ request?: SecondParameter<typeof customInstance>;
17
+ } | undefined) => UseQueryOptions<TasksGetResponse, TError, TData, QueryKey> & {
18
+ queryKey: QueryKey;
19
+ };
20
+ type GetTasksQueryResult = NonNullable<Awaited<ReturnType<typeof getTasks>>>;
21
+ type GetTasksQueryError = ErrorType<void | DmError>;
22
+ /**
23
+ * @summary Returns a list of Tasks
24
+ */
25
+ declare const useGetTasks: <TData = TasksGetResponse, TError = ErrorType<void | DmError>>(params?: GetTasksParams, options?: {
26
+ query?: UseQueryOptions<TasksGetResponse, TError, TData, QueryKey> | undefined;
27
+ request?: SecondParameter<typeof customInstance>;
28
+ } | undefined) => UseQueryResult<TData, TError> & {
29
+ queryKey: QueryKey;
30
+ };
31
+ /**
32
+ * Returns Task information including its states and events.
33
+
34
+ You 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**.
35
+
36
+ Tasks are created in response to creating Datasets and launching **Applications** and **Jobs**.
37
+
38
+ Tasks contain of a list of `states` and `events`. A Task will always have `states` but may not have `events`.
39
+
40
+ States 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.
41
+
42
+ You 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.
43
+
44
+ **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_.
45
+
46
+ For **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.
47
+
48
+ For 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.
49
+
50
+ * @summary Returns Task information
51
+ */
52
+ declare const getTask: (taskId: string, params?: GetTaskParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<TaskGetResponse>;
53
+ declare const getGetTaskQueryKey: (taskId: string, params?: GetTaskParams) => readonly ["data-manager-api", `/task/${string}`, ...GetTaskParams[]];
54
+ declare const getGetTaskQueryOptions: <TData = TaskGetResponse, TError = ErrorType<void | DmError>>(taskId: string, params?: GetTaskParams, options?: {
55
+ query?: UseQueryOptions<TaskGetResponse, TError, TData, QueryKey> | undefined;
56
+ request?: SecondParameter<typeof customInstance>;
57
+ } | undefined) => UseQueryOptions<TaskGetResponse, TError, TData, QueryKey> & {
58
+ queryKey: QueryKey;
59
+ };
60
+ type GetTaskQueryResult = NonNullable<Awaited<ReturnType<typeof getTask>>>;
61
+ type GetTaskQueryError = ErrorType<void | DmError>;
62
+ /**
63
+ * @summary Returns Task information
64
+ */
65
+ declare const useGetTask: <TData = TaskGetResponse, TError = ErrorType<void | DmError>>(taskId: string, params?: GetTaskParams, options?: {
66
+ query?: UseQueryOptions<TaskGetResponse, TError, TData, QueryKey> | undefined;
67
+ request?: SecondParameter<typeof customInstance>;
68
+ } | undefined) => UseQueryResult<TData, TError> & {
69
+ queryKey: QueryKey;
70
+ };
71
+ /**
72
+ * Given a `task_id` the Task will be removed.
73
+
74
+ You cannot delete a Task until it is `done`.
75
+
76
+ You 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.
77
+
78
+ * @summary Delete a Task entry
79
+ */
80
+ declare const deleteTask: (taskId: string, options?: SecondParameter<typeof customInstance>) => Promise<void>;
81
+ declare const getDeleteTaskMutationOptions: <TError = ErrorType<DmError>, TContext = unknown>(options?: {
82
+ mutation?: UseMutationOptions<void, TError, {
83
+ taskId: string;
84
+ }, TContext> | undefined;
85
+ request?: SecondParameter<typeof customInstance>;
86
+ } | undefined) => UseMutationOptions<void, TError, {
87
+ taskId: string;
88
+ }, TContext>;
89
+ type DeleteTaskMutationResult = NonNullable<Awaited<ReturnType<typeof deleteTask>>>;
90
+ type DeleteTaskMutationError = ErrorType<DmError>;
91
+ /**
92
+ * @summary Delete a Task entry
93
+ */
94
+ declare const useDeleteTask: <TError = ErrorType<DmError>, TContext = unknown>(options?: {
95
+ mutation?: UseMutationOptions<void, TError, {
96
+ taskId: string;
97
+ }, TContext> | undefined;
98
+ request?: SecondParameter<typeof customInstance>;
99
+ } | undefined) => _tanstack_react_query.UseMutationResult<void, TError, {
100
+ taskId: string;
101
+ }, TContext>;
102
+
103
+ export { DeleteTaskMutationError, DeleteTaskMutationResult, GetTaskQueryError, GetTaskQueryResult, GetTasksQueryError, GetTasksQueryResult, deleteTask, getDeleteTaskMutationOptions, getGetTaskQueryKey, getGetTaskQueryOptions, getGetTasksQueryKey, getGetTasksQueryOptions, getTask, getTasks, useDeleteTask, useGetTask, useGetTasks };
package/task/task.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 { m as GetTasksParams, bX as customInstance, bc as TasksGetResponse, bY as ErrorType, bT as DmError, l as GetTaskParams, be as TaskGetResponse } from '../custom-instance-50c9dd5d.js';
3
+ import { m as GetTasksParams, bX as customInstance, bc as TasksGetResponse, bY as ErrorType, bT as DmError, l as GetTaskParams, be as TaskGetResponse } from '../custom-instance-a2110e78.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;
@@ -19,6 +19,9 @@ declare const getGetTasksQueryOptions: <TData = TasksGetResponse, TError = Error
19
19
  };
20
20
  type GetTasksQueryResult = NonNullable<Awaited<ReturnType<typeof getTasks>>>;
21
21
  type GetTasksQueryError = ErrorType<void | DmError>;
22
+ /**
23
+ * @summary Returns a list of Tasks
24
+ */
22
25
  declare const useGetTasks: <TData = TasksGetResponse, TError = ErrorType<void | DmError>>(params?: GetTasksParams, options?: {
23
26
  query?: UseQueryOptions<TasksGetResponse, TError, TData, QueryKey> | undefined;
24
27
  request?: SecondParameter<typeof customInstance>;
@@ -56,6 +59,9 @@ declare const getGetTaskQueryOptions: <TData = TaskGetResponse, TError = ErrorTy
56
59
  };
57
60
  type GetTaskQueryResult = NonNullable<Awaited<ReturnType<typeof getTask>>>;
58
61
  type GetTaskQueryError = ErrorType<void | DmError>;
62
+ /**
63
+ * @summary Returns Task information
64
+ */
59
65
  declare const useGetTask: <TData = TaskGetResponse, TError = ErrorType<void | DmError>>(taskId: string, params?: GetTaskParams, options?: {
60
66
  query?: UseQueryOptions<TaskGetResponse, TError, TData, QueryKey> | undefined;
61
67
  request?: SecondParameter<typeof customInstance>;
@@ -82,6 +88,9 @@ declare const getDeleteTaskMutationOptions: <TError = ErrorType<DmError>, TConte
82
88
  }, TContext>;
83
89
  type DeleteTaskMutationResult = NonNullable<Awaited<ReturnType<typeof deleteTask>>>;
84
90
  type DeleteTaskMutationError = ErrorType<DmError>;
91
+ /**
92
+ * @summary Delete a Task entry
93
+ */
85
94
  declare const useDeleteTask: <TError = ErrorType<DmError>, TContext = unknown>(options?: {
86
95
  mutation?: UseMutationOptions<void, TError, {
87
96
  taskId: string;
package/task/task.js CHANGED
@@ -1,22 +1,30 @@
1
1
  import {
2
2
  customInstance
3
- } from "../chunk-3RNIDX7T.js";
3
+ } from "../chunk-UKA7G3OB.js";
4
4
 
5
5
  // src/task/task.ts
6
- import { useQuery, useMutation } from "@tanstack/react-query";
6
+ import {
7
+ useMutation,
8
+ useQuery
9
+ } from "@tanstack/react-query";
7
10
  var getTasks = (params, options, signal) => {
8
11
  return customInstance(
9
- { url: `/task`, method: "get", params, signal },
12
+ {
13
+ url: `/task`,
14
+ method: "get",
15
+ params,
16
+ signal
17
+ },
10
18
  options
11
19
  );
12
20
  };
13
- var getGetTasksQueryKey = (params) => ["data-manager-api", `/task`, ...params ? [params] : []];
21
+ var getGetTasksQueryKey = (params) => {
22
+ return ["data-manager-api", `/task`, ...params ? [params] : []];
23
+ };
14
24
  var getGetTasksQueryOptions = (params, options) => {
15
25
  const { query: queryOptions, request: requestOptions } = options ?? {};
16
26
  const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetTasksQueryKey(params);
17
- const queryFn = ({
18
- signal
19
- }) => getTasks(params, requestOptions, signal);
27
+ const queryFn = ({ signal }) => getTasks(params, requestOptions, signal);
20
28
  return { queryKey, queryFn, ...queryOptions };
21
29
  };
22
30
  var useGetTasks = (params, options) => {
@@ -27,17 +35,22 @@ var useGetTasks = (params, options) => {
27
35
  };
28
36
  var getTask = (taskId, params, options, signal) => {
29
37
  return customInstance(
30
- { url: `/task/${taskId}`, method: "get", params, signal },
38
+ {
39
+ url: `/task/${taskId}`,
40
+ method: "get",
41
+ params,
42
+ signal
43
+ },
31
44
  options
32
45
  );
33
46
  };
34
- var getGetTaskQueryKey = (taskId, params) => ["data-manager-api", `/task/${taskId}`, ...params ? [params] : []];
47
+ var getGetTaskQueryKey = (taskId, params) => {
48
+ return ["data-manager-api", `/task/${taskId}`, ...params ? [params] : []];
49
+ };
35
50
  var getGetTaskQueryOptions = (taskId, params, options) => {
36
51
  const { query: queryOptions, request: requestOptions } = options ?? {};
37
52
  const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetTaskQueryKey(taskId, params);
38
- const queryFn = ({
39
- signal
40
- }) => getTask(taskId, params, requestOptions, signal);
53
+ const queryFn = ({ signal }) => getTask(taskId, params, requestOptions, signal);
41
54
  return { queryKey, queryFn, enabled: !!taskId, ...queryOptions };
42
55
  };
43
56
  var useGetTask = (taskId, params, options) => {
@@ -48,7 +61,10 @@ var useGetTask = (taskId, params, options) => {
48
61
  };
49
62
  var deleteTask = (taskId, options) => {
50
63
  return customInstance(
51
- { url: `/task/${taskId}`, method: "delete" },
64
+ {
65
+ url: `/task/${taskId}`,
66
+ method: "delete"
67
+ },
52
68
  options
53
69
  );
54
70
  };
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.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;AAAA,IACL,EAAE,KAAK,SAAS,UAAU,QAAQ,OAAO,QAAQ,OAAO;AAAA,IACxD;AAAA,EACF;AACF;AAEO,IAAM,qBAAqB,CAAC,QAAgB,WACjD,CAAC,oBAAoB,SAAS,UAAU,GAAI,SAAS,CAAC,MAAM,IAAI,CAAC,CAAE;AAE9D,IAAM,yBAAyB,CAIpC,QACA,QACA,YAMG;AACH,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,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.20.0 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 1.2\n */\nimport {\n useMutation,\n useQuery\n} from '@tanstack/react-query'\nimport type {\n MutationFunction,\n QueryFunction,\n QueryKey,\n UseMutationOptions,\n UseQueryOptions,\n UseQueryResult\n} from '@tanstack/react-query'\nimport type {\n DmError,\n GetTaskParams,\n GetTasksParams,\n TaskGetResponse,\n TasksGetResponse\n} from '../data-manager-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\n// eslint-disable-next-line\n type SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P,\n) => any\n ? P\n : never;\n\n\n/**\n * 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>,signal?: AbortSignal\n) => {\n \n \n return customInstance<TasksGetResponse>(\n {url: `/task`, method: 'get',\n params, signal\n },\n options);\n }\n \n\nexport const getGetTasksQueryKey = (params?: GetTasksParams,) => {\n \n return [\"data-manager-api\", `/task`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetTasksQueryOptions = <TData = Awaited<ReturnType<typeof getTasks>>, TError = ErrorType<void | DmError>>(params?: GetTasksParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getTasks>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetTasksQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getTasks>>> = ({ signal }) => getTasks(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getTasks>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetTasksQueryResult = NonNullable<Awaited<ReturnType<typeof getTasks>>>\nexport type GetTasksQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Returns a list of Tasks\n */\nexport const useGetTasks = <TData = Awaited<ReturnType<typeof getTasks>>, TError = ErrorType<void | DmError>>(\n params?: GetTasksParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getTasks>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetTasksQueryOptions(params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\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>,signal?: AbortSignal\n) => {\n \n \n return customInstance<TaskGetResponse>(\n {url: `/task/${taskId}`, method: 'get',\n params, signal\n },\n options);\n }\n \n\nexport const getGetTaskQueryKey = (taskId: string,\n params?: GetTaskParams,) => {\n \n return [\"data-manager-api\", `/task/${taskId}`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetTaskQueryOptions = <TData = Awaited<ReturnType<typeof getTask>>, TError = ErrorType<void | DmError>>(taskId: string,\n params?: GetTaskParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getTask>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetTaskQueryKey(taskId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getTask>>> = ({ signal }) => getTask(taskId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(taskId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getTask>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetTaskQueryResult = NonNullable<Awaited<ReturnType<typeof getTask>>>\nexport type GetTaskQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Returns Task information\n */\nexport const useGetTask = <TData = Awaited<ReturnType<typeof getTask>>, TError = ErrorType<void | DmError>>(\n taskId: string,\n params?: GetTaskParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getTask>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetTaskQueryOptions(taskId,params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\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 \n return customInstance<void>(\n {url: `/task/${taskId}`, method: 'delete'\n },\n options);\n }\n \n\n\nexport const getDeleteTaskMutationOptions = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteTask>>, TError,{taskId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteTask>>, TError,{taskId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteTask>>, {taskId: string}> = (props) => {\n const {taskId} = props ?? {};\n\n return deleteTask(taskId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteTaskMutationResult = NonNullable<Awaited<ReturnType<typeof deleteTask>>>\n \n export type DeleteTaskMutationError = ErrorType<DmError>\n\n /**\n * @summary Delete a Task entry\n */\nexport const useDeleteTask = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteTask>>, TError,{taskId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeleteTaskMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n "],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAkCA,IAAM,WAAW,CACpB,QACH,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAS,QAAQ;AAAA,MACrB;AAAA,MAAQ;AAAA,IACZ;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,sBAAsB,CAAC,WAA6B;AAE7D,SAAO,CAAC,oBAAoB,SAAS,GAAI,SAAS,CAAC,MAAM,IAAG,CAAC,CAAE;AAC/D;AAGG,IAAM,0BAA0B,CAAmF,QAAyB,YAC9I;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,oBAAoB,MAAM;AAIpE,QAAM,UAA+D,CAAC,EAAE,OAAO,MAAM,SAAS,QAAQ,gBAAgB,MAAM;AAM7H,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAQO,IAAM,cAAc,CAC1B,QAAyB,YAEsC;AAE9D,QAAM,eAAe,wBAAwB,QAAO,OAAO;AAE3D,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAyBO,IAAM,UAAU,CACnB,QACA,QACH,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK,SAAS,MAAM;AAAA,MAAI,QAAQ;AAAA,MAC/B;AAAA,MAAQ;AAAA,IACZ;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,qBAAqB,CAAC,QAC/B,WAA4B;AAE5B,SAAO,CAAC,oBAAoB,SAAS,MAAM,IAAI,GAAI,SAAS,CAAC,MAAM,IAAG,CAAC,CAAE;AACzE;AAGG,IAAM,yBAAyB,CAAkF,QACpH,QAAwB,YACvB;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,mBAAmB,QAAO,MAAM;AAI1E,QAAM,UAA8D,CAAC,EAAE,OAAO,MAAM,QAAQ,QAAO,QAAQ,gBAAgB,MAAM;AAMlI,SAAQ,EAAE,UAAU,SAAS,SAAS,CAAC,CAAE,QAAS,GAAG,aAAY;AACpE;AAQO,IAAM,aAAa,CACzB,QACG,QAAwB,YAEoC;AAE9D,QAAM,eAAe,uBAAuB,QAAO,QAAO,OAAO;AAEjE,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAaO,IAAM,aAAa,CACtB,QACH,YAAsD;AAGjD,SAAO;AAAA,IACP;AAAA,MAAC,KAAK,SAAS,MAAM;AAAA,MAAI,QAAQ;AAAA,IACnC;AAAA,IACE;AAAA,EAAO;AACT;AAIG,IAAM,+BAA+B,CAEpB,YAC4E;AACnG,QAAM,EAAC,UAAU,iBAAiB,SAAS,eAAc,IAAI,WAAW,CAAC;AAKpE,QAAM,aAAyF,CAAC,UAAU;AACtG,UAAM,EAAC,OAAM,IAAI,SAAS,CAAC;AAE3B,WAAQ,WAAW,QAAO,cAAc;AAAA,EAC1C;AAKL,SAAQ,EAAE,YAAY,GAAG,gBAAgB;AAAC;AAStC,IAAM,gBAAgB,CAEL,YACnB;AAEC,QAAM,kBAAkB,6BAA6B,OAAO;AAE5D,SAAO,YAAY,eAAe;AACpC;","names":[]}
package/type/type.cjs CHANGED
@@ -1,22 +1,28 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
2
 
3
- var _chunkUZTHSGDTcjs = require('../chunk-UZTHSGDT.cjs');
3
+ var _chunkJ22A7LHXcjs = require('../chunk-J22A7LHX.cjs');
4
4
 
5
5
  // src/type/type.ts
6
+
7
+
6
8
  var _reactquery = require('@tanstack/react-query');
7
9
  var getFileTypes = (options, signal) => {
8
- return _chunkUZTHSGDTcjs.customInstance.call(void 0,
9
- { url: `/type`, method: "get", signal },
10
+ return _chunkJ22A7LHXcjs.customInstance.call(void 0,
11
+ {
12
+ url: `/type`,
13
+ method: "get",
14
+ signal
15
+ },
10
16
  options
11
17
  );
12
18
  };
13
- var getGetFileTypesQueryKey = () => ["data-manager-api", `/type`];
19
+ var getGetFileTypesQueryKey = () => {
20
+ return ["data-manager-api", `/type`];
21
+ };
14
22
  var getGetFileTypesQueryOptions = (options) => {
15
23
  const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
16
24
  const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetFileTypesQueryKey()));
17
- const queryFn = ({
18
- signal
19
- }) => getFileTypes(requestOptions, signal);
25
+ const queryFn = ({ signal }) => getFileTypes(requestOptions, signal);
20
26
  return { queryKey, queryFn, ...queryOptions };
21
27
  };
22
28
  var useGetFileTypes = (options) => {
package/type/type.cjs.map CHANGED
@@ -1 +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"]}
1
+ {"version":3,"sources":["../../src/type/type.ts"],"names":[],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,OACK;AA6BA,IAAM,eAAe,CAE3B,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAS,QAAQ;AAAA,MAAO;AAAA,IAChC;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,0BAA0B,MAAM;AAEzC,SAAO,CAAC,oBAAoB,OAAO;AACnC;AAGG,IAAM,8BAA8B,CAAwF,YAC9H;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,wBAAwB;AAIlE,QAAM,UAAmE,CAAC,EAAE,OAAO,MAAM,aAAa,gBAAgB,MAAM;AAM7H,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAQO,IAAM,kBAAkB,CAC7B,YAE8D;AAE9D,QAAM,eAAe,4BAA4B,OAAO;AAExD,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT","sourcesContent":["/**\n * Generated by orval v6.20.0 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 1.2\n */\nimport {\n useQuery\n} from '@tanstack/react-query'\nimport type {\n QueryFunction,\n QueryKey,\n UseQueryOptions,\n UseQueryResult\n} from '@tanstack/react-query'\nimport type {\n DmError,\n TypesGetResponse\n} from '../data-manager-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\n// eslint-disable-next-line\n type SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P,\n) => any\n ? P\n : never;\n\n\n/**\n * Returns the supported Dataset and File (MIME) Types\n\n * @summary Get the supported File Types\n */\nexport const getFileTypes = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<TypesGetResponse>(\n {url: `/type`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getGetFileTypesQueryKey = () => {\n \n return [\"data-manager-api\", `/type`] as const;\n }\n\n \nexport const getGetFileTypesQueryOptions = <TData = Awaited<ReturnType<typeof getFileTypes>>, TError = ErrorType<void | DmError>>( options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetFileTypesQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getFileTypes>>> = ({ signal }) => getFileTypes(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetFileTypesQueryResult = NonNullable<Awaited<ReturnType<typeof getFileTypes>>>\nexport type GetFileTypesQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Get the supported File Types\n */\nexport const useGetFileTypes = <TData = Awaited<ReturnType<typeof getFileTypes>>, TError = ErrorType<void | DmError>>(\n options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetFileTypesQueryOptions(options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n"]}
@@ -0,0 +1,31 @@
1
+ import { UseQueryOptions, QueryKey, UseQueryResult } from '@tanstack/react-query';
2
+ import { bX as customInstance, bb as TypesGetResponse, bY as ErrorType, bT as DmError } from '../custom-instance-a2110e78.js';
3
+ import 'axios';
4
+
5
+ type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
6
+ /**
7
+ * Returns the supported Dataset and File (MIME) Types
8
+
9
+ * @summary Get the supported File Types
10
+ */
11
+ declare const getFileTypes: (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<TypesGetResponse>;
12
+ declare const getGetFileTypesQueryKey: () => readonly ["data-manager-api", "/type"];
13
+ declare const getGetFileTypesQueryOptions: <TData = TypesGetResponse, TError = ErrorType<void | DmError>>(options?: {
14
+ query?: UseQueryOptions<TypesGetResponse, TError, TData, QueryKey> | undefined;
15
+ request?: SecondParameter<typeof customInstance>;
16
+ } | undefined) => UseQueryOptions<TypesGetResponse, TError, TData, QueryKey> & {
17
+ queryKey: QueryKey;
18
+ };
19
+ type GetFileTypesQueryResult = NonNullable<Awaited<ReturnType<typeof getFileTypes>>>;
20
+ type GetFileTypesQueryError = ErrorType<void | DmError>;
21
+ /**
22
+ * @summary Get the supported File Types
23
+ */
24
+ declare const useGetFileTypes: <TData = TypesGetResponse, TError = ErrorType<void | DmError>>(options?: {
25
+ query?: UseQueryOptions<TypesGetResponse, TError, TData, QueryKey> | undefined;
26
+ request?: SecondParameter<typeof customInstance>;
27
+ } | undefined) => UseQueryResult<TData, TError> & {
28
+ queryKey: QueryKey;
29
+ };
30
+
31
+ export { GetFileTypesQueryError, GetFileTypesQueryResult, getFileTypes, getGetFileTypesQueryKey, getGetFileTypesQueryOptions, useGetFileTypes };
package/type/type.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { UseQueryOptions, QueryKey, UseQueryResult } from '@tanstack/react-query';
2
- import { bX as customInstance, bb as TypesGetResponse, bY as ErrorType, bT as DmError } from '../custom-instance-50c9dd5d.js';
2
+ import { bX as customInstance, bb as TypesGetResponse, bY as ErrorType, bT as DmError } from '../custom-instance-a2110e78.js';
3
3
  import 'axios';
4
4
 
5
5
  type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
@@ -18,6 +18,9 @@ declare const getGetFileTypesQueryOptions: <TData = TypesGetResponse, TError = E
18
18
  };
19
19
  type GetFileTypesQueryResult = NonNullable<Awaited<ReturnType<typeof getFileTypes>>>;
20
20
  type GetFileTypesQueryError = ErrorType<void | DmError>;
21
+ /**
22
+ * @summary Get the supported File Types
23
+ */
21
24
  declare const useGetFileTypes: <TData = TypesGetResponse, TError = ErrorType<void | DmError>>(options?: {
22
25
  query?: UseQueryOptions<TypesGetResponse, TError, TData, QueryKey> | undefined;
23
26
  request?: SecondParameter<typeof customInstance>;
package/type/type.js CHANGED
@@ -1,22 +1,28 @@
1
1
  import {
2
2
  customInstance
3
- } from "../chunk-3RNIDX7T.js";
3
+ } from "../chunk-UKA7G3OB.js";
4
4
 
5
5
  // src/type/type.ts
6
- import { useQuery } from "@tanstack/react-query";
6
+ import {
7
+ useQuery
8
+ } from "@tanstack/react-query";
7
9
  var getFileTypes = (options, signal) => {
8
10
  return customInstance(
9
- { url: `/type`, method: "get", signal },
11
+ {
12
+ url: `/type`,
13
+ method: "get",
14
+ signal
15
+ },
10
16
  options
11
17
  );
12
18
  };
13
- var getGetFileTypesQueryKey = () => ["data-manager-api", `/type`];
19
+ var getGetFileTypesQueryKey = () => {
20
+ return ["data-manager-api", `/type`];
21
+ };
14
22
  var getGetFileTypesQueryOptions = (options) => {
15
23
  const { query: queryOptions, request: requestOptions } = options ?? {};
16
24
  const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetFileTypesQueryKey();
17
- const queryFn = ({
18
- signal
19
- }) => getFileTypes(requestOptions, signal);
25
+ const queryFn = ({ signal }) => getFileTypes(requestOptions, signal);
20
26
  return { queryKey, queryFn, ...queryOptions };
21
27
  };
22
28
  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.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":[]}
1
+ {"version":3,"sources":["../../src/type/type.ts"],"sourcesContent":["/**\n * Generated by orval v6.20.0 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 1.2\n */\nimport {\n useQuery\n} from '@tanstack/react-query'\nimport type {\n QueryFunction,\n QueryKey,\n UseQueryOptions,\n UseQueryResult\n} from '@tanstack/react-query'\nimport type {\n DmError,\n TypesGetResponse\n} from '../data-manager-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\n// eslint-disable-next-line\n type SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P,\n) => any\n ? P\n : never;\n\n\n/**\n * Returns the supported Dataset and File (MIME) Types\n\n * @summary Get the supported File Types\n */\nexport const getFileTypes = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<TypesGetResponse>(\n {url: `/type`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getGetFileTypesQueryKey = () => {\n \n return [\"data-manager-api\", `/type`] as const;\n }\n\n \nexport const getGetFileTypesQueryOptions = <TData = Awaited<ReturnType<typeof getFileTypes>>, TError = ErrorType<void | DmError>>( options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetFileTypesQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getFileTypes>>> = ({ signal }) => getFileTypes(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetFileTypesQueryResult = NonNullable<Awaited<ReturnType<typeof getFileTypes>>>\nexport type GetFileTypesQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Get the supported File Types\n */\nexport const useGetFileTypes = <TData = Awaited<ReturnType<typeof getFileTypes>>, TError = ErrorType<void | DmError>>(\n options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetFileTypesQueryOptions(options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n"],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,OACK;AA6BA,IAAM,eAAe,CAE3B,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAS,QAAQ;AAAA,MAAO;AAAA,IAChC;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,0BAA0B,MAAM;AAEzC,SAAO,CAAC,oBAAoB,OAAO;AACnC;AAGG,IAAM,8BAA8B,CAAwF,YAC9H;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,wBAAwB;AAIlE,QAAM,UAAmE,CAAC,EAAE,OAAO,MAAM,aAAa,gBAAgB,MAAM;AAM7H,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAQO,IAAM,kBAAkB,CAC7B,YAE8D;AAE9D,QAAM,eAAe,4BAA4B,OAAO;AAExD,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;","names":[]}
package/user/user.cjs CHANGED
@@ -1,22 +1,29 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
2
 
3
- var _chunkUZTHSGDTcjs = require('../chunk-UZTHSGDT.cjs');
3
+ var _chunkJ22A7LHXcjs = require('../chunk-J22A7LHX.cjs');
4
4
 
5
5
  // src/user/user.ts
6
+
7
+
8
+
6
9
  var _reactquery = require('@tanstack/react-query');
7
10
  var getUsers = (options, signal) => {
8
- return _chunkUZTHSGDTcjs.customInstance.call(void 0,
9
- { url: `/user`, method: "get", signal },
11
+ return _chunkJ22A7LHXcjs.customInstance.call(void 0,
12
+ {
13
+ url: `/user`,
14
+ method: "get",
15
+ signal
16
+ },
10
17
  options
11
18
  );
12
19
  };
13
- var getGetUsersQueryKey = () => ["data-manager-api", `/user`];
20
+ var getGetUsersQueryKey = () => {
21
+ return ["data-manager-api", `/user`];
22
+ };
14
23
  var getGetUsersQueryOptions = (options) => {
15
24
  const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
16
25
  const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetUsersQueryKey()));
17
- const queryFn = ({
18
- signal
19
- }) => getUsers(requestOptions, signal);
26
+ const queryFn = ({ signal }) => getUsers(requestOptions, signal);
20
27
  return { queryKey, queryFn, ...queryOptions };
21
28
  };
22
29
  var useGetUsers = (options) => {
@@ -26,18 +33,23 @@ var useGetUsers = (options) => {
26
33
  return query;
27
34
  };
28
35
  var getUserAccount = (params, options, signal) => {
29
- return _chunkUZTHSGDTcjs.customInstance.call(void 0,
30
- { url: `/user/account`, method: "get", params, signal },
36
+ return _chunkJ22A7LHXcjs.customInstance.call(void 0,
37
+ {
38
+ url: `/user/account`,
39
+ method: "get",
40
+ params,
41
+ signal
42
+ },
31
43
  options
32
44
  );
33
45
  };
34
- var getGetUserAccountQueryKey = (params) => ["data-manager-api", `/user/account`, ...params ? [params] : []];
46
+ var getGetUserAccountQueryKey = (params) => {
47
+ return ["data-manager-api", `/user/account`, ...params ? [params] : []];
48
+ };
35
49
  var getGetUserAccountQueryOptions = (params, options) => {
36
50
  const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
37
51
  const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetUserAccountQueryKey(params)));
38
- const queryFn = ({
39
- signal
40
- }) => getUserAccount(params, requestOptions, signal);
52
+ const queryFn = ({ signal }) => getUserAccount(params, requestOptions, signal);
41
53
  return { queryKey, queryFn, ...queryOptions };
42
54
  };
43
55
  var useGetUserAccount = (params, options) => {
@@ -52,21 +64,15 @@ var patchUserAccount = (userAccountPatchBodyBody, options) => {
52
64
  formData.append("private", userAccountPatchBodyBody.private.toString());
53
65
  }
54
66
  if (userAccountPatchBodyBody.become_admin !== void 0) {
55
- formData.append(
56
- "become_admin",
57
- userAccountPatchBodyBody.become_admin.toString()
58
- );
67
+ formData.append("become_admin", userAccountPatchBodyBody.become_admin.toString());
59
68
  }
60
69
  if (userAccountPatchBodyBody.impersonate !== void 0) {
61
70
  formData.append("impersonate", userAccountPatchBodyBody.impersonate);
62
71
  }
63
72
  if (userAccountPatchBodyBody.use_impersonation !== void 0) {
64
- formData.append(
65
- "use_impersonation",
66
- userAccountPatchBodyBody.use_impersonation.toString()
67
- );
73
+ formData.append("use_impersonation", userAccountPatchBodyBody.use_impersonation.toString());
68
74
  }
69
- return _chunkUZTHSGDTcjs.customInstance.call(void 0,
75
+ return _chunkJ22A7LHXcjs.customInstance.call(void 0,
70
76
  {
71
77
  url: `/user/account`,
72
78
  method: "patch",
@@ -89,18 +95,23 @@ var usePatchUserAccount = (options) => {
89
95
  return _reactquery.useMutation.call(void 0, mutationOptions);
90
96
  };
91
97
  var getUserApiLog = (params, options, signal) => {
92
- return _chunkUZTHSGDTcjs.customInstance.call(void 0,
93
- { url: `/user/api-log`, method: "get", params, signal },
98
+ return _chunkJ22A7LHXcjs.customInstance.call(void 0,
99
+ {
100
+ url: `/user/api-log`,
101
+ method: "get",
102
+ params,
103
+ signal
104
+ },
94
105
  options
95
106
  );
96
107
  };
97
- var getGetUserApiLogQueryKey = (params) => ["data-manager-api", `/user/api-log`, ...params ? [params] : []];
108
+ var getGetUserApiLogQueryKey = (params) => {
109
+ return ["data-manager-api", `/user/api-log`, ...params ? [params] : []];
110
+ };
98
111
  var getGetUserApiLogQueryOptions = (params, options) => {
99
112
  const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
100
113
  const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetUserApiLogQueryKey(params)));
101
- const queryFn = ({
102
- signal
103
- }) => getUserApiLog(params, requestOptions, signal);
114
+ const queryFn = ({ signal }) => getUserApiLog(params, requestOptions, signal);
104
115
  return { queryKey, queryFn, ...queryOptions };
105
116
  };
106
117
  var useGetUserApiLog = (params, options) => {