@nomalism-com/api 0.8.82 → 0.8.84

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.
@@ -1,5 +1,6 @@
1
1
  import { Multimedia as Entity } from '@nomalism-com/types';
2
2
  export import IEntity = Entity.Entity;
3
3
  export declare const route: string;
4
+ export declare const publicRoute: string;
4
5
  export declare const getUrl: (multimediaId: string) => string;
5
6
  export declare const create: (multipartFormData: any, headers?: any) => Promise<import("@nomalism-com/types/dist/shared/entities").Multimedia>;
@@ -39,12 +39,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
39
39
  return (mod && mod.__esModule) ? mod : { "default": mod };
40
40
  };
41
41
  Object.defineProperty(exports, "__esModule", { value: true });
42
- exports.create = exports.getUrl = exports.route = void 0;
42
+ exports.create = exports.getUrl = exports.publicRoute = exports.route = void 0;
43
43
  var client_1 = __importDefault(require("../../shared/client"));
44
44
  var _1 = require(".");
45
45
  exports.route = "".concat(_1.serviceHostname).concat(_1.serviceAuthPath);
46
+ exports.publicRoute = "".concat(_1.serviceHostname).concat(_1.servicePublicPath);
46
47
  var getUrl = function (multimediaId) {
47
- return "".concat(exports.route).concat(_1.servicePublicPath, "multimedia/").concat(multimediaId);
48
+ return "".concat(exports.publicRoute, "multimedia/").concat(multimediaId);
48
49
  };
49
50
  exports.getUrl = getUrl;
50
51
  var repository = {
@@ -52,11 +53,9 @@ var repository = {
52
53
  var response;
53
54
  return __generator(this, function (_a) {
54
55
  switch (_a.label) {
55
- case 0:
56
- headers = headers || { 'content-type': 'multipart/form-data' };
57
- return [4, client_1.default.post("".concat(exports.route).concat(_1.serviceAuthPath, "multimedia/upload"), multipartFormData, {
58
- headers: headers,
59
- })];
56
+ case 0: return [4, client_1.default.post("".concat(exports.route, "multimedia/upload"), multipartFormData, {
57
+ headers: headers || { 'content-type': 'multipart/form-data' },
58
+ })];
60
59
  case 1:
61
60
  response = _a.sent();
62
61
  return [2, response.data];
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "typescript",
10
10
  "helper"
11
11
  ],
12
- "version": "0.8.82",
12
+ "version": "0.8.84",
13
13
  "main": "dist/index.js",
14
14
  "types": "./dist/index.d.ts",
15
15
  "files": [
@@ -47,7 +47,7 @@
47
47
  "typescript": "^4.9.5"
48
48
  },
49
49
  "dependencies": {
50
- "@nomalism-com/types": "^0.9.90",
50
+ "@nomalism-com/types": "^0.9.91",
51
51
  "axios": "^0.27.2"
52
52
  }
53
53
  }