@squonk/data-manager-client 4.3.0 → 5.0.0-5-0.2173777171
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 +55 -10
- package/accounting/accounting.cjs.map +1 -1
- package/accounting/accounting.d.cts +58 -1
- package/accounting/accounting.d.ts +58 -1
- package/accounting/accounting.js +46 -1
- package/accounting/accounting.js.map +1 -1
- package/admin/admin.cjs +15 -15
- package/admin/admin.cjs.map +1 -1
- package/admin/admin.d.cts +2 -0
- package/admin/admin.d.ts +2 -0
- package/admin/admin.js +1 -1
- package/admin/admin.js.map +1 -1
- package/application/application.cjs +5 -5
- package/application/application.cjs.map +1 -1
- package/application/application.js +1 -1
- package/application/application.js.map +1 -1
- package/{chunk-OYRETEBZ.js → chunk-76ADQBHZ.js} +3 -3
- package/chunk-76ADQBHZ.js.map +1 -0
- package/{chunk-ZLY5XEOQ.cjs → chunk-KHB5TJT7.cjs} +3 -3
- package/chunk-KHB5TJT7.cjs.map +1 -0
- package/chunk-RB2KVIEK.cjs.map +1 -1
- package/configuration/configuration.cjs +5 -5
- package/configuration/configuration.cjs.map +1 -1
- package/configuration/configuration.d.cts +1 -1
- package/configuration/configuration.d.ts +1 -1
- package/configuration/configuration.js +1 -1
- package/configuration/configuration.js.map +1 -1
- package/dataset/dataset.cjs +14 -14
- package/dataset/dataset.cjs.map +1 -1
- package/dataset/dataset.js +1 -1
- package/dataset/dataset.js.map +1 -1
- package/digest/digest.cjs +3 -3
- package/digest/digest.cjs.map +1 -1
- package/digest/digest.js +1 -1
- package/digest/digest.js.map +1 -1
- package/file-and-path/file-and-path.cjs +139 -17
- package/file-and-path/file-and-path.cjs.map +1 -1
- package/file-and-path/file-and-path.d.cts +162 -2
- package/file-and-path/file-and-path.d.ts +162 -2
- package/file-and-path/file-and-path.js +123 -1
- package/file-and-path/file-and-path.js.map +1 -1
- package/index.cjs +4 -2
- package/index.cjs.map +1 -1
- package/index.d.cts +53 -37
- package/index.d.ts +53 -37
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/instance/instance.cjs +10 -10
- package/instance/instance.cjs.map +1 -1
- package/instance/instance.js +1 -1
- package/instance/instance.js.map +1 -1
- package/inventory/inventory.cjs +3 -3
- package/inventory/inventory.cjs.map +1 -1
- package/inventory/inventory.js +1 -1
- package/inventory/inventory.js.map +1 -1
- package/job/job.cjs +124 -8
- package/job/job.cjs.map +1 -1
- package/job/job.d.cts +159 -3
- package/job/job.d.ts +159 -3
- package/job/job.js +119 -3
- package/job/job.js.map +1 -1
- package/metadata/metadata.cjs +7 -7
- package/metadata/metadata.cjs.map +1 -1
- package/metadata/metadata.js +1 -1
- package/metadata/metadata.js.map +1 -1
- package/package.json +1 -1
- package/project/project.cjs +15 -137
- package/project/project.cjs.map +1 -1
- package/project/project.d.cts +3 -163
- package/project/project.d.ts +3 -163
- package/project/project.js +1 -123
- package/project/project.js.map +1 -1
- package/src/{data-manager-api.schemas.ts → API_TARGET_NAME.schemas.ts} +52 -43
- package/src/accounting/accounting.ts +244 -2
- package/src/admin/admin.ts +4 -2
- package/src/application/application.ts +2 -2
- package/src/configuration/configuration.ts +5 -9
- package/src/dataset/dataset.ts +2 -2
- package/src/digest/digest.ts +2 -2
- package/src/file-and-path/file-and-path.ts +602 -2
- package/src/index.ts +2 -2
- package/src/instance/instance.ts +2 -2
- package/src/inventory/inventory.ts +2 -2
- package/src/job/job.ts +599 -3
- package/src/metadata/metadata.ts +2 -2
- package/src/options-mutator.ts +2 -2
- package/src/project/project.ts +5 -604
- package/src/task/task.ts +2 -2
- package/src/type/type.ts +2 -2
- package/src/user/user.ts +2 -2
- package/src/workflow/workflow.ts +5 -3
- package/task/task.cjs +6 -6
- package/task/task.cjs.map +1 -1
- package/task/task.js +1 -1
- package/task/task.js.map +1 -1
- package/type/type.cjs +3 -3
- package/type/type.cjs.map +1 -1
- package/type/type.js +1 -1
- package/type/type.js.map +1 -1
- package/user/user.cjs +10 -10
- package/user/user.cjs.map +1 -1
- package/user/user.js +1 -1
- package/user/user.js.map +1 -1
- package/workflow/workflow.cjs +20 -20
- package/workflow/workflow.cjs.map +1 -1
- package/workflow/workflow.d.cts +3 -1
- package/workflow/workflow.d.ts +3 -1
- package/workflow/workflow.js +1 -1
- package/workflow/workflow.js.map +1 -1
- package/chunk-OYRETEBZ.js.map +0 -1
- package/chunk-ZLY5XEOQ.cjs.map +0 -1
- package/exchange-rate/exchange-rate.cjs +0 -255
- package/exchange-rate/exchange-rate.cjs.map +0 -1
- package/exchange-rate/exchange-rate.d.cts +0 -319
- package/exchange-rate/exchange-rate.d.ts +0 -319
- package/exchange-rate/exchange-rate.js +0 -255
- package/exchange-rate/exchange-rate.js.map +0 -1
- package/exchange-rate/package.json +0 -7
- package/src/exchange-rate/exchange-rate.ts +0 -1276
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UseMutationOptions, QueryClient, UseMutationResult, UseQueryOptions, DataTag, QueryKey, DefinedInitialDataOptions, DefinedUseQueryResult, UndefinedInitialDataOptions, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult } from '@tanstack/react-query';
|
|
2
|
-
import { CreatePathParams, customInstance, ErrorType, DmError, DeletePathParams, MovePathParams, GetFilesParams, FilesGetResponse, FilePostBodyBody, FilePostResponse, DeleteUnmanagedFileParams, MoveFileInProjectParams } from '../index.cjs';
|
|
2
|
+
import { CreatePathParams, customInstance, ErrorType, DmError, DeletePathParams, MovePathParams, GetProjectFileParams, ProjectFilePutBodyBody, GetProjectFileWithTokenParams, GetFilesParams, FilesGetResponse, FilePostBodyBody, FilePostResponse, DeleteUnmanagedFileParams, MoveFileInProjectParams } from '../index.cjs';
|
|
3
3
|
import 'axios';
|
|
4
4
|
|
|
5
5
|
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
@@ -90,6 +90,166 @@ declare const useMovePath: <TError = ErrorType<void | DmError>, TContext = unkno
|
|
|
90
90
|
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof movePath>>, TError, {
|
|
91
91
|
params: MovePathParams;
|
|
92
92
|
}, TContext>;
|
|
93
|
+
/**
|
|
94
|
+
* Gets a file from the project, with an optional path. This method should be used to get arbitrary files from the Project's file system (typically **unmanaged** files).
|
|
95
|
+
|
|
96
|
+
For **managed** files you should consider using the `/file/{file_id}` endpoint.
|
|
97
|
+
|
|
98
|
+
You must be an `editor` of the Project if the Project is `private`
|
|
99
|
+
|
|
100
|
+
* @summary Download a Project file
|
|
101
|
+
*/
|
|
102
|
+
declare const getProjectFile: (projectId: string, params: GetProjectFileParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<void>;
|
|
103
|
+
declare const getGetProjectFileQueryKey: (projectId: string, params: GetProjectFileParams) => readonly [`/project/${string}/file`, ...GetProjectFileParams[]];
|
|
104
|
+
declare const useGetProjectFileQueryOptions: <TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<void | DmError>>(projectId: string, params: GetProjectFileParams, options?: {
|
|
105
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>>;
|
|
106
|
+
request?: SecondParameter<typeof customInstance>;
|
|
107
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData> & {
|
|
108
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
109
|
+
};
|
|
110
|
+
type GetProjectFileQueryResult = NonNullable<Awaited<ReturnType<typeof getProjectFile>>>;
|
|
111
|
+
type GetProjectFileQueryError = ErrorType<void | DmError>;
|
|
112
|
+
declare function useGetProjectFile<TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<void | DmError>>(projectId: string, params: GetProjectFileParams, options: {
|
|
113
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, Awaited<ReturnType<typeof getProjectFile>>>, "initialData">;
|
|
114
|
+
request?: SecondParameter<typeof customInstance>;
|
|
115
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
116
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
117
|
+
};
|
|
118
|
+
declare function useGetProjectFile<TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<void | DmError>>(projectId: string, params: GetProjectFileParams, options?: {
|
|
119
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, Awaited<ReturnType<typeof getProjectFile>>>, "initialData">;
|
|
120
|
+
request?: SecondParameter<typeof customInstance>;
|
|
121
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
122
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
123
|
+
};
|
|
124
|
+
declare function useGetProjectFile<TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<void | DmError>>(projectId: string, params: GetProjectFileParams, options?: {
|
|
125
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>>;
|
|
126
|
+
request?: SecondParameter<typeof customInstance>;
|
|
127
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
128
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
129
|
+
};
|
|
130
|
+
declare const useGetProjectFileSuspenseQueryOptions: <TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<void | DmError>>(projectId: string, params: GetProjectFileParams, options?: {
|
|
131
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>>;
|
|
132
|
+
request?: SecondParameter<typeof customInstance>;
|
|
133
|
+
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData> & {
|
|
134
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
135
|
+
};
|
|
136
|
+
type GetProjectFileSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProjectFile>>>;
|
|
137
|
+
type GetProjectFileSuspenseQueryError = ErrorType<void | DmError>;
|
|
138
|
+
declare function useGetProjectFileSuspense<TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<void | DmError>>(projectId: string, params: GetProjectFileParams, options: {
|
|
139
|
+
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>>;
|
|
140
|
+
request?: SecondParameter<typeof customInstance>;
|
|
141
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
142
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
143
|
+
};
|
|
144
|
+
declare function useGetProjectFileSuspense<TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<void | DmError>>(projectId: string, params: GetProjectFileParams, options?: {
|
|
145
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>>;
|
|
146
|
+
request?: SecondParameter<typeof customInstance>;
|
|
147
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
148
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
149
|
+
};
|
|
150
|
+
declare function useGetProjectFileSuspense<TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<void | DmError>>(projectId: string, params: GetProjectFileParams, options?: {
|
|
151
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>>;
|
|
152
|
+
request?: SecondParameter<typeof customInstance>;
|
|
153
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
154
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* The user provides an external file for upload to the Project using an optional Path. The path is created if it does not exist.
|
|
158
|
+
|
|
159
|
+
You must be an `editor` of the project
|
|
160
|
+
|
|
161
|
+
* @summary Upload a file into a Project
|
|
162
|
+
*/
|
|
163
|
+
declare const addFileToProject: (projectId: string, projectFilePutBodyBody: ProjectFilePutBodyBody, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
164
|
+
declare const useAddFileToProjectMutationOptions: <TError = ErrorType<void | DmError>, TContext = unknown>(options?: {
|
|
165
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof addFileToProject>>, TError, {
|
|
166
|
+
projectId: string;
|
|
167
|
+
data: ProjectFilePutBodyBody;
|
|
168
|
+
}, TContext>;
|
|
169
|
+
request?: SecondParameter<typeof customInstance>;
|
|
170
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof addFileToProject>>, TError, {
|
|
171
|
+
projectId: string;
|
|
172
|
+
data: ProjectFilePutBodyBody;
|
|
173
|
+
}, TContext>;
|
|
174
|
+
type AddFileToProjectMutationResult = NonNullable<Awaited<ReturnType<typeof addFileToProject>>>;
|
|
175
|
+
type AddFileToProjectMutationBody = ProjectFilePutBodyBody;
|
|
176
|
+
type AddFileToProjectMutationError = ErrorType<void | DmError>;
|
|
177
|
+
/**
|
|
178
|
+
* @summary Upload a file into a Project
|
|
179
|
+
*/
|
|
180
|
+
declare const useAddFileToProject: <TError = ErrorType<void | DmError>, TContext = unknown>(options?: {
|
|
181
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof addFileToProject>>, TError, {
|
|
182
|
+
projectId: string;
|
|
183
|
+
data: ProjectFilePutBodyBody;
|
|
184
|
+
}, TContext>;
|
|
185
|
+
request?: SecondParameter<typeof customInstance>;
|
|
186
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof addFileToProject>>, TError, {
|
|
187
|
+
projectId: string;
|
|
188
|
+
data: ProjectFilePutBodyBody;
|
|
189
|
+
}, TContext>;
|
|
190
|
+
/**
|
|
191
|
+
* Gets a file from the project, with an optional path. This method should be used to get arbitrary files from the Project's file system (typically **unmanaged** files).
|
|
192
|
+
|
|
193
|
+
For **managed** files you should consider using the `/file/{file_id}` endpoint.
|
|
194
|
+
|
|
195
|
+
As there is no authentication for this endpoint you must provide a valid token. The token must be a token valid for the project, usually generated when an **Instance** has been launched in the Project.
|
|
196
|
+
|
|
197
|
+
* @summary Download a Project file using a Token
|
|
198
|
+
*/
|
|
199
|
+
declare const getProjectFileWithToken: (projectId: string, params: GetProjectFileWithTokenParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<void>;
|
|
200
|
+
declare const getGetProjectFileWithTokenQueryKey: (projectId: string, params: GetProjectFileWithTokenParams) => readonly [`/project/${string}/file-with-token`, ...GetProjectFileWithTokenParams[]];
|
|
201
|
+
declare const useGetProjectFileWithTokenQueryOptions: <TData = Awaited<ReturnType<typeof getProjectFileWithToken>>, TError = ErrorType<DmError>>(projectId: string, params: GetProjectFileWithTokenParams, options?: {
|
|
202
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>>;
|
|
203
|
+
request?: SecondParameter<typeof customInstance>;
|
|
204
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData> & {
|
|
205
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
206
|
+
};
|
|
207
|
+
type GetProjectFileWithTokenQueryResult = NonNullable<Awaited<ReturnType<typeof getProjectFileWithToken>>>;
|
|
208
|
+
type GetProjectFileWithTokenQueryError = ErrorType<DmError>;
|
|
209
|
+
declare function useGetProjectFileWithToken<TData = Awaited<ReturnType<typeof getProjectFileWithToken>>, TError = ErrorType<DmError>>(projectId: string, params: GetProjectFileWithTokenParams, options: {
|
|
210
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, Awaited<ReturnType<typeof getProjectFileWithToken>>>, "initialData">;
|
|
211
|
+
request?: SecondParameter<typeof customInstance>;
|
|
212
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
213
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
214
|
+
};
|
|
215
|
+
declare function useGetProjectFileWithToken<TData = Awaited<ReturnType<typeof getProjectFileWithToken>>, TError = ErrorType<DmError>>(projectId: string, params: GetProjectFileWithTokenParams, options?: {
|
|
216
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, Awaited<ReturnType<typeof getProjectFileWithToken>>>, "initialData">;
|
|
217
|
+
request?: SecondParameter<typeof customInstance>;
|
|
218
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
219
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
220
|
+
};
|
|
221
|
+
declare function useGetProjectFileWithToken<TData = Awaited<ReturnType<typeof getProjectFileWithToken>>, TError = ErrorType<DmError>>(projectId: string, params: GetProjectFileWithTokenParams, options?: {
|
|
222
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>>;
|
|
223
|
+
request?: SecondParameter<typeof customInstance>;
|
|
224
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
225
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
226
|
+
};
|
|
227
|
+
declare const useGetProjectFileWithTokenSuspenseQueryOptions: <TData = Awaited<ReturnType<typeof getProjectFileWithToken>>, TError = ErrorType<DmError>>(projectId: string, params: GetProjectFileWithTokenParams, options?: {
|
|
228
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>>;
|
|
229
|
+
request?: SecondParameter<typeof customInstance>;
|
|
230
|
+
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData> & {
|
|
231
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
232
|
+
};
|
|
233
|
+
type GetProjectFileWithTokenSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProjectFileWithToken>>>;
|
|
234
|
+
type GetProjectFileWithTokenSuspenseQueryError = ErrorType<DmError>;
|
|
235
|
+
declare function useGetProjectFileWithTokenSuspense<TData = Awaited<ReturnType<typeof getProjectFileWithToken>>, TError = ErrorType<DmError>>(projectId: string, params: GetProjectFileWithTokenParams, options: {
|
|
236
|
+
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>>;
|
|
237
|
+
request?: SecondParameter<typeof customInstance>;
|
|
238
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
239
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
240
|
+
};
|
|
241
|
+
declare function useGetProjectFileWithTokenSuspense<TData = Awaited<ReturnType<typeof getProjectFileWithToken>>, TError = ErrorType<DmError>>(projectId: string, params: GetProjectFileWithTokenParams, options?: {
|
|
242
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>>;
|
|
243
|
+
request?: SecondParameter<typeof customInstance>;
|
|
244
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
245
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
246
|
+
};
|
|
247
|
+
declare function useGetProjectFileWithTokenSuspense<TData = Awaited<ReturnType<typeof getProjectFileWithToken>>, TError = ErrorType<DmError>>(projectId: string, params: GetProjectFileWithTokenParams, options?: {
|
|
248
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>>;
|
|
249
|
+
request?: SecondParameter<typeof customInstance>;
|
|
250
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
251
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
252
|
+
};
|
|
93
253
|
/**
|
|
94
254
|
* Given a Project and Path the files available to you on that path will be returned along with any additional paths (sub-directories).
|
|
95
255
|
|
|
@@ -336,4 +496,4 @@ declare function useDownloadFileSuspense<TData = Awaited<ReturnType<typeof downl
|
|
|
336
496
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
337
497
|
};
|
|
338
498
|
|
|
339
|
-
export { type AttachFileMutationBody, type AttachFileMutationError, type AttachFileMutationResult, type CreatePathMutationError, type CreatePathMutationResult, type DeleteFileMutationError, type DeleteFileMutationResult, type DeletePathMutationError, type DeletePathMutationResult, type DeleteUnmanagedFileMutationError, type DeleteUnmanagedFileMutationResult, type DownloadFileQueryError, type DownloadFileQueryResult, type DownloadFileSuspenseQueryError, type DownloadFileSuspenseQueryResult, type GetFilesQueryError, type GetFilesQueryResult, type GetFilesSuspenseQueryError, type GetFilesSuspenseQueryResult, type MoveFileInProjectMutationError, type MoveFileInProjectMutationResult, type MovePathMutationError, type MovePathMutationResult, attachFile, createPath, deleteFile, deletePath, deleteUnmanagedFile, downloadFile, getDownloadFileQueryKey, getFiles, getGetFilesQueryKey, moveFileInProject, movePath, useAttachFile, useAttachFileMutationOptions, useCreatePath, useCreatePathMutationOptions, useDeleteFile, useDeleteFileMutationOptions, useDeletePath, useDeletePathMutationOptions, useDeleteUnmanagedFile, useDeleteUnmanagedFileMutationOptions, useDownloadFile, useDownloadFileQueryOptions, useDownloadFileSuspense, useDownloadFileSuspenseQueryOptions, useGetFiles, useGetFilesQueryOptions, useGetFilesSuspense, useGetFilesSuspenseQueryOptions, useMoveFileInProject, useMoveFileInProjectMutationOptions, useMovePath, useMovePathMutationOptions };
|
|
499
|
+
export { type AddFileToProjectMutationBody, type AddFileToProjectMutationError, type AddFileToProjectMutationResult, type AttachFileMutationBody, type AttachFileMutationError, type AttachFileMutationResult, type CreatePathMutationError, type CreatePathMutationResult, type DeleteFileMutationError, type DeleteFileMutationResult, type DeletePathMutationError, type DeletePathMutationResult, type DeleteUnmanagedFileMutationError, type DeleteUnmanagedFileMutationResult, type DownloadFileQueryError, type DownloadFileQueryResult, type DownloadFileSuspenseQueryError, type DownloadFileSuspenseQueryResult, type GetFilesQueryError, type GetFilesQueryResult, type GetFilesSuspenseQueryError, type GetFilesSuspenseQueryResult, type GetProjectFileQueryError, type GetProjectFileQueryResult, type GetProjectFileSuspenseQueryError, type GetProjectFileSuspenseQueryResult, type GetProjectFileWithTokenQueryError, type GetProjectFileWithTokenQueryResult, type GetProjectFileWithTokenSuspenseQueryError, type GetProjectFileWithTokenSuspenseQueryResult, type MoveFileInProjectMutationError, type MoveFileInProjectMutationResult, type MovePathMutationError, type MovePathMutationResult, addFileToProject, attachFile, createPath, deleteFile, deletePath, deleteUnmanagedFile, downloadFile, getDownloadFileQueryKey, getFiles, getGetFilesQueryKey, getGetProjectFileQueryKey, getGetProjectFileWithTokenQueryKey, getProjectFile, getProjectFileWithToken, moveFileInProject, movePath, useAddFileToProject, useAddFileToProjectMutationOptions, useAttachFile, useAttachFileMutationOptions, useCreatePath, useCreatePathMutationOptions, useDeleteFile, useDeleteFileMutationOptions, useDeletePath, useDeletePathMutationOptions, useDeleteUnmanagedFile, useDeleteUnmanagedFileMutationOptions, useDownloadFile, useDownloadFileQueryOptions, useDownloadFileSuspense, useDownloadFileSuspenseQueryOptions, useGetFiles, useGetFilesQueryOptions, useGetFilesSuspense, useGetFilesSuspenseQueryOptions, useGetProjectFile, useGetProjectFileQueryOptions, useGetProjectFileSuspense, useGetProjectFileSuspenseQueryOptions, useGetProjectFileWithToken, useGetProjectFileWithTokenQueryOptions, useGetProjectFileWithTokenSuspense, useGetProjectFileWithTokenSuspenseQueryOptions, useMoveFileInProject, useMoveFileInProjectMutationOptions, useMovePath, useMovePathMutationOptions };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UseMutationOptions, QueryClient, UseMutationResult, UseQueryOptions, DataTag, QueryKey, DefinedInitialDataOptions, DefinedUseQueryResult, UndefinedInitialDataOptions, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult } from '@tanstack/react-query';
|
|
2
|
-
import { CreatePathParams, customInstance, ErrorType, DmError, DeletePathParams, MovePathParams, GetFilesParams, FilesGetResponse, FilePostBodyBody, FilePostResponse, DeleteUnmanagedFileParams, MoveFileInProjectParams } from '../index.js';
|
|
2
|
+
import { CreatePathParams, customInstance, ErrorType, DmError, DeletePathParams, MovePathParams, GetProjectFileParams, ProjectFilePutBodyBody, GetProjectFileWithTokenParams, GetFilesParams, FilesGetResponse, FilePostBodyBody, FilePostResponse, DeleteUnmanagedFileParams, MoveFileInProjectParams } from '../index.js';
|
|
3
3
|
import 'axios';
|
|
4
4
|
|
|
5
5
|
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
@@ -90,6 +90,166 @@ declare const useMovePath: <TError = ErrorType<void | DmError>, TContext = unkno
|
|
|
90
90
|
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof movePath>>, TError, {
|
|
91
91
|
params: MovePathParams;
|
|
92
92
|
}, TContext>;
|
|
93
|
+
/**
|
|
94
|
+
* Gets a file from the project, with an optional path. This method should be used to get arbitrary files from the Project's file system (typically **unmanaged** files).
|
|
95
|
+
|
|
96
|
+
For **managed** files you should consider using the `/file/{file_id}` endpoint.
|
|
97
|
+
|
|
98
|
+
You must be an `editor` of the Project if the Project is `private`
|
|
99
|
+
|
|
100
|
+
* @summary Download a Project file
|
|
101
|
+
*/
|
|
102
|
+
declare const getProjectFile: (projectId: string, params: GetProjectFileParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<void>;
|
|
103
|
+
declare const getGetProjectFileQueryKey: (projectId: string, params: GetProjectFileParams) => readonly [`/project/${string}/file`, ...GetProjectFileParams[]];
|
|
104
|
+
declare const useGetProjectFileQueryOptions: <TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<void | DmError>>(projectId: string, params: GetProjectFileParams, options?: {
|
|
105
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>>;
|
|
106
|
+
request?: SecondParameter<typeof customInstance>;
|
|
107
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData> & {
|
|
108
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
109
|
+
};
|
|
110
|
+
type GetProjectFileQueryResult = NonNullable<Awaited<ReturnType<typeof getProjectFile>>>;
|
|
111
|
+
type GetProjectFileQueryError = ErrorType<void | DmError>;
|
|
112
|
+
declare function useGetProjectFile<TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<void | DmError>>(projectId: string, params: GetProjectFileParams, options: {
|
|
113
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, Awaited<ReturnType<typeof getProjectFile>>>, "initialData">;
|
|
114
|
+
request?: SecondParameter<typeof customInstance>;
|
|
115
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
116
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
117
|
+
};
|
|
118
|
+
declare function useGetProjectFile<TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<void | DmError>>(projectId: string, params: GetProjectFileParams, options?: {
|
|
119
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, Awaited<ReturnType<typeof getProjectFile>>>, "initialData">;
|
|
120
|
+
request?: SecondParameter<typeof customInstance>;
|
|
121
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
122
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
123
|
+
};
|
|
124
|
+
declare function useGetProjectFile<TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<void | DmError>>(projectId: string, params: GetProjectFileParams, options?: {
|
|
125
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>>;
|
|
126
|
+
request?: SecondParameter<typeof customInstance>;
|
|
127
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
128
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
129
|
+
};
|
|
130
|
+
declare const useGetProjectFileSuspenseQueryOptions: <TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<void | DmError>>(projectId: string, params: GetProjectFileParams, options?: {
|
|
131
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>>;
|
|
132
|
+
request?: SecondParameter<typeof customInstance>;
|
|
133
|
+
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData> & {
|
|
134
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
135
|
+
};
|
|
136
|
+
type GetProjectFileSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProjectFile>>>;
|
|
137
|
+
type GetProjectFileSuspenseQueryError = ErrorType<void | DmError>;
|
|
138
|
+
declare function useGetProjectFileSuspense<TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<void | DmError>>(projectId: string, params: GetProjectFileParams, options: {
|
|
139
|
+
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>>;
|
|
140
|
+
request?: SecondParameter<typeof customInstance>;
|
|
141
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
142
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
143
|
+
};
|
|
144
|
+
declare function useGetProjectFileSuspense<TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<void | DmError>>(projectId: string, params: GetProjectFileParams, options?: {
|
|
145
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>>;
|
|
146
|
+
request?: SecondParameter<typeof customInstance>;
|
|
147
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
148
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
149
|
+
};
|
|
150
|
+
declare function useGetProjectFileSuspense<TData = Awaited<ReturnType<typeof getProjectFile>>, TError = ErrorType<void | DmError>>(projectId: string, params: GetProjectFileParams, options?: {
|
|
151
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>>;
|
|
152
|
+
request?: SecondParameter<typeof customInstance>;
|
|
153
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
154
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* The user provides an external file for upload to the Project using an optional Path. The path is created if it does not exist.
|
|
158
|
+
|
|
159
|
+
You must be an `editor` of the project
|
|
160
|
+
|
|
161
|
+
* @summary Upload a file into a Project
|
|
162
|
+
*/
|
|
163
|
+
declare const addFileToProject: (projectId: string, projectFilePutBodyBody: ProjectFilePutBodyBody, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
164
|
+
declare const useAddFileToProjectMutationOptions: <TError = ErrorType<void | DmError>, TContext = unknown>(options?: {
|
|
165
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof addFileToProject>>, TError, {
|
|
166
|
+
projectId: string;
|
|
167
|
+
data: ProjectFilePutBodyBody;
|
|
168
|
+
}, TContext>;
|
|
169
|
+
request?: SecondParameter<typeof customInstance>;
|
|
170
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof addFileToProject>>, TError, {
|
|
171
|
+
projectId: string;
|
|
172
|
+
data: ProjectFilePutBodyBody;
|
|
173
|
+
}, TContext>;
|
|
174
|
+
type AddFileToProjectMutationResult = NonNullable<Awaited<ReturnType<typeof addFileToProject>>>;
|
|
175
|
+
type AddFileToProjectMutationBody = ProjectFilePutBodyBody;
|
|
176
|
+
type AddFileToProjectMutationError = ErrorType<void | DmError>;
|
|
177
|
+
/**
|
|
178
|
+
* @summary Upload a file into a Project
|
|
179
|
+
*/
|
|
180
|
+
declare const useAddFileToProject: <TError = ErrorType<void | DmError>, TContext = unknown>(options?: {
|
|
181
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof addFileToProject>>, TError, {
|
|
182
|
+
projectId: string;
|
|
183
|
+
data: ProjectFilePutBodyBody;
|
|
184
|
+
}, TContext>;
|
|
185
|
+
request?: SecondParameter<typeof customInstance>;
|
|
186
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof addFileToProject>>, TError, {
|
|
187
|
+
projectId: string;
|
|
188
|
+
data: ProjectFilePutBodyBody;
|
|
189
|
+
}, TContext>;
|
|
190
|
+
/**
|
|
191
|
+
* Gets a file from the project, with an optional path. This method should be used to get arbitrary files from the Project's file system (typically **unmanaged** files).
|
|
192
|
+
|
|
193
|
+
For **managed** files you should consider using the `/file/{file_id}` endpoint.
|
|
194
|
+
|
|
195
|
+
As there is no authentication for this endpoint you must provide a valid token. The token must be a token valid for the project, usually generated when an **Instance** has been launched in the Project.
|
|
196
|
+
|
|
197
|
+
* @summary Download a Project file using a Token
|
|
198
|
+
*/
|
|
199
|
+
declare const getProjectFileWithToken: (projectId: string, params: GetProjectFileWithTokenParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<void>;
|
|
200
|
+
declare const getGetProjectFileWithTokenQueryKey: (projectId: string, params: GetProjectFileWithTokenParams) => readonly [`/project/${string}/file-with-token`, ...GetProjectFileWithTokenParams[]];
|
|
201
|
+
declare const useGetProjectFileWithTokenQueryOptions: <TData = Awaited<ReturnType<typeof getProjectFileWithToken>>, TError = ErrorType<DmError>>(projectId: string, params: GetProjectFileWithTokenParams, options?: {
|
|
202
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>>;
|
|
203
|
+
request?: SecondParameter<typeof customInstance>;
|
|
204
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData> & {
|
|
205
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
206
|
+
};
|
|
207
|
+
type GetProjectFileWithTokenQueryResult = NonNullable<Awaited<ReturnType<typeof getProjectFileWithToken>>>;
|
|
208
|
+
type GetProjectFileWithTokenQueryError = ErrorType<DmError>;
|
|
209
|
+
declare function useGetProjectFileWithToken<TData = Awaited<ReturnType<typeof getProjectFileWithToken>>, TError = ErrorType<DmError>>(projectId: string, params: GetProjectFileWithTokenParams, options: {
|
|
210
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, Awaited<ReturnType<typeof getProjectFileWithToken>>>, "initialData">;
|
|
211
|
+
request?: SecondParameter<typeof customInstance>;
|
|
212
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
213
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
214
|
+
};
|
|
215
|
+
declare function useGetProjectFileWithToken<TData = Awaited<ReturnType<typeof getProjectFileWithToken>>, TError = ErrorType<DmError>>(projectId: string, params: GetProjectFileWithTokenParams, options?: {
|
|
216
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, Awaited<ReturnType<typeof getProjectFileWithToken>>>, "initialData">;
|
|
217
|
+
request?: SecondParameter<typeof customInstance>;
|
|
218
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
219
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
220
|
+
};
|
|
221
|
+
declare function useGetProjectFileWithToken<TData = Awaited<ReturnType<typeof getProjectFileWithToken>>, TError = ErrorType<DmError>>(projectId: string, params: GetProjectFileWithTokenParams, options?: {
|
|
222
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>>;
|
|
223
|
+
request?: SecondParameter<typeof customInstance>;
|
|
224
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
225
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
226
|
+
};
|
|
227
|
+
declare const useGetProjectFileWithTokenSuspenseQueryOptions: <TData = Awaited<ReturnType<typeof getProjectFileWithToken>>, TError = ErrorType<DmError>>(projectId: string, params: GetProjectFileWithTokenParams, options?: {
|
|
228
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>>;
|
|
229
|
+
request?: SecondParameter<typeof customInstance>;
|
|
230
|
+
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData> & {
|
|
231
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
232
|
+
};
|
|
233
|
+
type GetProjectFileWithTokenSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getProjectFileWithToken>>>;
|
|
234
|
+
type GetProjectFileWithTokenSuspenseQueryError = ErrorType<DmError>;
|
|
235
|
+
declare function useGetProjectFileWithTokenSuspense<TData = Awaited<ReturnType<typeof getProjectFileWithToken>>, TError = ErrorType<DmError>>(projectId: string, params: GetProjectFileWithTokenParams, options: {
|
|
236
|
+
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>>;
|
|
237
|
+
request?: SecondParameter<typeof customInstance>;
|
|
238
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
239
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
240
|
+
};
|
|
241
|
+
declare function useGetProjectFileWithTokenSuspense<TData = Awaited<ReturnType<typeof getProjectFileWithToken>>, TError = ErrorType<DmError>>(projectId: string, params: GetProjectFileWithTokenParams, options?: {
|
|
242
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>>;
|
|
243
|
+
request?: SecondParameter<typeof customInstance>;
|
|
244
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
245
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
246
|
+
};
|
|
247
|
+
declare function useGetProjectFileWithTokenSuspense<TData = Awaited<ReturnType<typeof getProjectFileWithToken>>, TError = ErrorType<DmError>>(projectId: string, params: GetProjectFileWithTokenParams, options?: {
|
|
248
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>>;
|
|
249
|
+
request?: SecondParameter<typeof customInstance>;
|
|
250
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
251
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
252
|
+
};
|
|
93
253
|
/**
|
|
94
254
|
* Given a Project and Path the files available to you on that path will be returned along with any additional paths (sub-directories).
|
|
95
255
|
|
|
@@ -336,4 +496,4 @@ declare function useDownloadFileSuspense<TData = Awaited<ReturnType<typeof downl
|
|
|
336
496
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
337
497
|
};
|
|
338
498
|
|
|
339
|
-
export { type AttachFileMutationBody, type AttachFileMutationError, type AttachFileMutationResult, type CreatePathMutationError, type CreatePathMutationResult, type DeleteFileMutationError, type DeleteFileMutationResult, type DeletePathMutationError, type DeletePathMutationResult, type DeleteUnmanagedFileMutationError, type DeleteUnmanagedFileMutationResult, type DownloadFileQueryError, type DownloadFileQueryResult, type DownloadFileSuspenseQueryError, type DownloadFileSuspenseQueryResult, type GetFilesQueryError, type GetFilesQueryResult, type GetFilesSuspenseQueryError, type GetFilesSuspenseQueryResult, type MoveFileInProjectMutationError, type MoveFileInProjectMutationResult, type MovePathMutationError, type MovePathMutationResult, attachFile, createPath, deleteFile, deletePath, deleteUnmanagedFile, downloadFile, getDownloadFileQueryKey, getFiles, getGetFilesQueryKey, moveFileInProject, movePath, useAttachFile, useAttachFileMutationOptions, useCreatePath, useCreatePathMutationOptions, useDeleteFile, useDeleteFileMutationOptions, useDeletePath, useDeletePathMutationOptions, useDeleteUnmanagedFile, useDeleteUnmanagedFileMutationOptions, useDownloadFile, useDownloadFileQueryOptions, useDownloadFileSuspense, useDownloadFileSuspenseQueryOptions, useGetFiles, useGetFilesQueryOptions, useGetFilesSuspense, useGetFilesSuspenseQueryOptions, useMoveFileInProject, useMoveFileInProjectMutationOptions, useMovePath, useMovePathMutationOptions };
|
|
499
|
+
export { type AddFileToProjectMutationBody, type AddFileToProjectMutationError, type AddFileToProjectMutationResult, type AttachFileMutationBody, type AttachFileMutationError, type AttachFileMutationResult, type CreatePathMutationError, type CreatePathMutationResult, type DeleteFileMutationError, type DeleteFileMutationResult, type DeletePathMutationError, type DeletePathMutationResult, type DeleteUnmanagedFileMutationError, type DeleteUnmanagedFileMutationResult, type DownloadFileQueryError, type DownloadFileQueryResult, type DownloadFileSuspenseQueryError, type DownloadFileSuspenseQueryResult, type GetFilesQueryError, type GetFilesQueryResult, type GetFilesSuspenseQueryError, type GetFilesSuspenseQueryResult, type GetProjectFileQueryError, type GetProjectFileQueryResult, type GetProjectFileSuspenseQueryError, type GetProjectFileSuspenseQueryResult, type GetProjectFileWithTokenQueryError, type GetProjectFileWithTokenQueryResult, type GetProjectFileWithTokenSuspenseQueryError, type GetProjectFileWithTokenSuspenseQueryResult, type MoveFileInProjectMutationError, type MoveFileInProjectMutationResult, type MovePathMutationError, type MovePathMutationResult, addFileToProject, attachFile, createPath, deleteFile, deletePath, deleteUnmanagedFile, downloadFile, getDownloadFileQueryKey, getFiles, getGetFilesQueryKey, getGetProjectFileQueryKey, getGetProjectFileWithTokenQueryKey, getProjectFile, getProjectFileWithToken, moveFileInProject, movePath, useAddFileToProject, useAddFileToProjectMutationOptions, useAttachFile, useAttachFileMutationOptions, useCreatePath, useCreatePathMutationOptions, useDeleteFile, useDeleteFileMutationOptions, useDeletePath, useDeletePathMutationOptions, useDeleteUnmanagedFile, useDeleteUnmanagedFileMutationOptions, useDownloadFile, useDownloadFileQueryOptions, useDownloadFileSuspense, useDownloadFileSuspenseQueryOptions, useGetFiles, useGetFilesQueryOptions, useGetFilesSuspense, useGetFilesSuspenseQueryOptions, useGetProjectFile, useGetProjectFileQueryOptions, useGetProjectFileSuspense, useGetProjectFileSuspenseQueryOptions, useGetProjectFileWithToken, useGetProjectFileWithTokenQueryOptions, useGetProjectFileWithTokenSuspense, useGetProjectFileWithTokenSuspenseQueryOptions, useMoveFileInProject, useMoveFileInProjectMutationOptions, useMovePath, useMovePathMutationOptions };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
mutationMutator,
|
|
3
3
|
queryMutator
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-76ADQBHZ.js";
|
|
5
5
|
import {
|
|
6
6
|
customInstance
|
|
7
7
|
} from "../chunk-XYDLYMQ2.js";
|
|
@@ -59,6 +59,113 @@ var useMovePath = (options, queryClient) => {
|
|
|
59
59
|
const mutationOptions = useMovePathMutationOptions(options);
|
|
60
60
|
return useMutation(mutationOptions, queryClient);
|
|
61
61
|
};
|
|
62
|
+
var getProjectFile = (projectId, params, options, signal) => {
|
|
63
|
+
return customInstance(
|
|
64
|
+
{ url: `/project/${projectId}/file`, method: "GET", params, signal },
|
|
65
|
+
options
|
|
66
|
+
);
|
|
67
|
+
};
|
|
68
|
+
var getGetProjectFileQueryKey = (projectId, params) => {
|
|
69
|
+
return [`/project/${projectId}/file`, ...params ? [params] : []];
|
|
70
|
+
};
|
|
71
|
+
var useGetProjectFileQueryOptions = (projectId, params, options) => {
|
|
72
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
73
|
+
const queryKey = queryOptions?.queryKey ?? getGetProjectFileQueryKey(projectId, params);
|
|
74
|
+
const queryFn = ({ signal }) => getProjectFile(projectId, params, requestOptions, signal);
|
|
75
|
+
const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });
|
|
76
|
+
return customOptions;
|
|
77
|
+
};
|
|
78
|
+
function useGetProjectFile(projectId, params, options, queryClient) {
|
|
79
|
+
const queryOptions = useGetProjectFileQueryOptions(projectId, params, options);
|
|
80
|
+
const query = useQuery(queryOptions, queryClient);
|
|
81
|
+
query.queryKey = queryOptions.queryKey;
|
|
82
|
+
return query;
|
|
83
|
+
}
|
|
84
|
+
var useGetProjectFileSuspenseQueryOptions = (projectId, params, options) => {
|
|
85
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
86
|
+
const queryKey = queryOptions?.queryKey ?? getGetProjectFileQueryKey(projectId, params);
|
|
87
|
+
const queryFn = ({ signal }) => getProjectFile(projectId, params, requestOptions, signal);
|
|
88
|
+
const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });
|
|
89
|
+
return customOptions;
|
|
90
|
+
};
|
|
91
|
+
function useGetProjectFileSuspense(projectId, params, options, queryClient) {
|
|
92
|
+
const queryOptions = useGetProjectFileSuspenseQueryOptions(projectId, params, options);
|
|
93
|
+
const query = useSuspenseQuery(queryOptions, queryClient);
|
|
94
|
+
query.queryKey = queryOptions.queryKey;
|
|
95
|
+
return query;
|
|
96
|
+
}
|
|
97
|
+
var addFileToProject = (projectId, projectFilePutBodyBody, options) => {
|
|
98
|
+
const formData = new FormData();
|
|
99
|
+
formData.append(`file`, projectFilePutBodyBody.file);
|
|
100
|
+
if (projectFilePutBodyBody.as_filename !== void 0) {
|
|
101
|
+
formData.append(`as_filename`, projectFilePutBodyBody.as_filename);
|
|
102
|
+
}
|
|
103
|
+
if (projectFilePutBodyBody.path !== void 0) {
|
|
104
|
+
formData.append(`path`, projectFilePutBodyBody.path);
|
|
105
|
+
}
|
|
106
|
+
return customInstance(
|
|
107
|
+
{
|
|
108
|
+
url: `/project/${projectId}/file`,
|
|
109
|
+
method: "PUT",
|
|
110
|
+
headers: { "Content-Type": "multipart/form-data" },
|
|
111
|
+
data: formData
|
|
112
|
+
},
|
|
113
|
+
options
|
|
114
|
+
);
|
|
115
|
+
};
|
|
116
|
+
var useAddFileToProjectMutationOptions = (options) => {
|
|
117
|
+
const mutationKey = ["addFileToProject"];
|
|
118
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
|
|
119
|
+
const mutationFn = (props) => {
|
|
120
|
+
const { projectId, data } = props ?? {};
|
|
121
|
+
return addFileToProject(projectId, data, requestOptions);
|
|
122
|
+
};
|
|
123
|
+
const customOptions = mutationMutator({ ...mutationOptions, mutationFn });
|
|
124
|
+
return customOptions;
|
|
125
|
+
};
|
|
126
|
+
var useAddFileToProject = (options, queryClient) => {
|
|
127
|
+
const mutationOptions = useAddFileToProjectMutationOptions(options);
|
|
128
|
+
return useMutation(mutationOptions, queryClient);
|
|
129
|
+
};
|
|
130
|
+
var getProjectFileWithToken = (projectId, params, options, signal) => {
|
|
131
|
+
return customInstance(
|
|
132
|
+
{ url: `/project/${projectId}/file-with-token`, method: "GET", params, signal },
|
|
133
|
+
options
|
|
134
|
+
);
|
|
135
|
+
};
|
|
136
|
+
var getGetProjectFileWithTokenQueryKey = (projectId, params) => {
|
|
137
|
+
return [`/project/${projectId}/file-with-token`, ...params ? [params] : []];
|
|
138
|
+
};
|
|
139
|
+
var useGetProjectFileWithTokenQueryOptions = (projectId, params, options) => {
|
|
140
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
141
|
+
const queryKey = queryOptions?.queryKey ?? getGetProjectFileWithTokenQueryKey(projectId, params);
|
|
142
|
+
const queryFn = ({
|
|
143
|
+
signal
|
|
144
|
+
}) => getProjectFileWithToken(projectId, params, requestOptions, signal);
|
|
145
|
+
const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });
|
|
146
|
+
return customOptions;
|
|
147
|
+
};
|
|
148
|
+
function useGetProjectFileWithToken(projectId, params, options, queryClient) {
|
|
149
|
+
const queryOptions = useGetProjectFileWithTokenQueryOptions(projectId, params, options);
|
|
150
|
+
const query = useQuery(queryOptions, queryClient);
|
|
151
|
+
query.queryKey = queryOptions.queryKey;
|
|
152
|
+
return query;
|
|
153
|
+
}
|
|
154
|
+
var useGetProjectFileWithTokenSuspenseQueryOptions = (projectId, params, options) => {
|
|
155
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
156
|
+
const queryKey = queryOptions?.queryKey ?? getGetProjectFileWithTokenQueryKey(projectId, params);
|
|
157
|
+
const queryFn = ({
|
|
158
|
+
signal
|
|
159
|
+
}) => getProjectFileWithToken(projectId, params, requestOptions, signal);
|
|
160
|
+
const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });
|
|
161
|
+
return customOptions;
|
|
162
|
+
};
|
|
163
|
+
function useGetProjectFileWithTokenSuspense(projectId, params, options, queryClient) {
|
|
164
|
+
const queryOptions = useGetProjectFileWithTokenSuspenseQueryOptions(projectId, params, options);
|
|
165
|
+
const query = useSuspenseQuery(queryOptions, queryClient);
|
|
166
|
+
query.queryKey = queryOptions.queryKey;
|
|
167
|
+
return query;
|
|
168
|
+
}
|
|
62
169
|
var getFiles = (params, options, signal) => {
|
|
63
170
|
return customInstance({ url: `/file`, method: "GET", params, signal }, options);
|
|
64
171
|
};
|
|
@@ -215,6 +322,7 @@ function useDownloadFileSuspense(fileId, options, queryClient) {
|
|
|
215
322
|
return query;
|
|
216
323
|
}
|
|
217
324
|
export {
|
|
325
|
+
addFileToProject,
|
|
218
326
|
attachFile,
|
|
219
327
|
createPath,
|
|
220
328
|
deleteFile,
|
|
@@ -224,8 +332,14 @@ export {
|
|
|
224
332
|
getDownloadFileQueryKey,
|
|
225
333
|
getFiles,
|
|
226
334
|
getGetFilesQueryKey,
|
|
335
|
+
getGetProjectFileQueryKey,
|
|
336
|
+
getGetProjectFileWithTokenQueryKey,
|
|
337
|
+
getProjectFile,
|
|
338
|
+
getProjectFileWithToken,
|
|
227
339
|
moveFileInProject,
|
|
228
340
|
movePath,
|
|
341
|
+
useAddFileToProject,
|
|
342
|
+
useAddFileToProjectMutationOptions,
|
|
229
343
|
useAttachFile,
|
|
230
344
|
useAttachFileMutationOptions,
|
|
231
345
|
useCreatePath,
|
|
@@ -244,6 +358,14 @@ export {
|
|
|
244
358
|
useGetFilesQueryOptions,
|
|
245
359
|
useGetFilesSuspense,
|
|
246
360
|
useGetFilesSuspenseQueryOptions,
|
|
361
|
+
useGetProjectFile,
|
|
362
|
+
useGetProjectFileQueryOptions,
|
|
363
|
+
useGetProjectFileSuspense,
|
|
364
|
+
useGetProjectFileSuspenseQueryOptions,
|
|
365
|
+
useGetProjectFileWithToken,
|
|
366
|
+
useGetProjectFileWithTokenQueryOptions,
|
|
367
|
+
useGetProjectFileWithTokenSuspense,
|
|
368
|
+
useGetProjectFileWithTokenSuspenseQueryOptions,
|
|
247
369
|
useMoveFileInProject,
|
|
248
370
|
useMoveFileInProjectMutationOptions,
|
|
249
371
|
useMovePath,
|