@edraj/tsdmart 2.3.1 → 2.4.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.
Files changed (2) hide show
  1. package/dmart.service.ts +2 -38
  2. package/package.json +1 -1
package/dmart.service.ts CHANGED
@@ -358,54 +358,18 @@ export class Dmart {
358
358
  }
359
359
 
360
360
  // TODO: update to enums
361
- public static async get_attachment_content(
362
- resource_type: string,
363
- space_name: string,
364
- subpath: string,
365
- shortname: string,
366
- scope: string = "managed"
367
- ) {
368
- try {
369
- const { data } = await axios.get<any>(
370
- `${scope}/payload/${resource_type}/${space_name}/${subpath}/${shortname}`,
371
- { headers }
372
- );
373
- return data;
374
- } catch (error: any) {
375
- throw error;
376
- }
377
- }
378
-
379
361
  public static async get_payload(
380
362
  resource_type: string,
381
363
  space_name: string,
382
364
  subpath: string,
383
365
  shortname: string,
366
+ schemaShortname: string = "",
384
367
  ext: string = ".json",
385
368
  scope: string = "managed"
386
369
  ) {
387
370
  try {
388
371
  const { data } = await axios.get<any>(
389
- `${scope}/payload/${resource_type}/${space_name}/${subpath}/${shortname}${ext}`,
390
- { headers }
391
- );
392
- return data;
393
- } catch (error: any) {
394
- throw error;
395
- }
396
- }
397
-
398
- public static async get_payload_content(
399
- resource_type: string,
400
- space_name: string,
401
- subpath: string,
402
- shortname: string,
403
- ext: string = ".json",
404
- scope: string = "managed"
405
- ) {
406
- try {
407
- const { data } = await axios.get<any>(
408
- `${scope}/payload/${resource_type}/${space_name}/${subpath}/${shortname}${ext}`,
372
+ `${scope}/payload/${resource_type}/${space_name}/${subpath}/${shortname}${schemaShortname}${ext}`,
409
373
  { headers }
410
374
  );
411
375
  return data;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edraj/tsdmart",
3
- "version": "2.3.1",
3
+ "version": "2.4.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",