@edraj/tsdmart 4.0.3 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dmart.model.ts CHANGED
@@ -353,6 +353,7 @@ export type ApiQueryResponse = ApiResponse & {
353
353
  export interface ResourcesFromCSVRequest {
354
354
  space_name: string,
355
355
  subpath: string,
356
+ isUpdate?: boolean,
356
357
  resourceType: ResourceType,
357
358
  schema: string,
358
359
  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.0",
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",