@edraj/tsdmart 4.0.3 → 4.1.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.
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="AgentMigrationStateService">
4
+ <option name="migrationStatus" value="COMPLETED" />
5
+ </component>
6
+ </project>
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="AskMigrationStateService">
4
+ <option name="migrationStatus" value="COMPLETED" />
5
+ </component>
6
+ </project>
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="Ask2AgentMigrationStateService">
4
+ <option name="migrationStatus" value="COMPLETED" />
5
+ </component>
6
+ </project>
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="EditMigrationStateService">
4
+ <option name="migrationStatus" value="COMPLETED" />
5
+ </component>
6
+ </project>
package/dmart.model.ts CHANGED
@@ -248,6 +248,7 @@ export enum ContentType {
248
248
  audio = "audio",
249
249
  video = "video",
250
250
  jsonl = "jsonl",
251
+ apk = "apk",
251
252
  csv = "csv",
252
253
  sqlite = "sqlite",
253
254
  parquet = "parquet",
@@ -353,6 +354,7 @@ export type ApiQueryResponse = ApiResponse & {
353
354
  export interface ResourcesFromCSVRequest {
354
355
  space_name: string,
355
356
  subpath: string,
357
+ isUpdate?: boolean,
356
358
  resourceType: ResourceType,
357
359
  schema: string,
358
360
  payload: File,
package/dmart.service.ts CHANGED
@@ -303,7 +303,7 @@ export class Dmart {
303
303
  ) {
304
304
  try {
305
305
  let csvUrl = `/managed/resources_from_csv/${request.resourceType}/${request.space_name}/${request.subpath}`;
306
-
306
+ const params: any = {};
307
307
  if (request.schema) {
308
308
  csvUrl += `/${request.schema}`;
309
309
  }
@@ -311,12 +311,16 @@ export class Dmart {
311
311
  let formdata = new FormData();
312
312
  formdata.append("resources_file", request.payload);
313
313
 
314
+ if(request.isUpdate){
315
+ params['is_update'] = request.isUpdate;
316
+ }
317
+
314
318
  const headers = {"Content-Type": "multipart/form-data"};
315
319
 
316
320
  const {data} = await Dmart.axiosDmartInstance.post<ApiResponse>(
317
321
  csvUrl,
318
322
  formdata,
319
- {headers}
323
+ {headers, params}
320
324
  );
321
325
 
322
326
  return data;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edraj/tsdmart",
3
- "version": "4.0.3",
3
+ "version": "4.1.1",
4
4
  "description": "A TypeScript implementation of the Dmart that depends on axios.",
5
5
  "author": "Kefah T. Issa",
6
6
  "email": "kefah.issa@gmail.com",