@exode-team/kinescope.api 2.0.43 → 2.0.45

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.
@@ -37,7 +37,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
37
37
  return yield this.requestApi('https://api.kinescope.io/v1/analytics/overview', params, 'get');
38
38
  }
39
39
  catch (error) {
40
- console.error(`${error}`);
40
+ console.error(`[PACKAGE:kinescope.api] ${error}`);
41
41
  throw error;
42
42
  }
43
43
  });
@@ -53,7 +53,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
53
53
  return yield this.requestApi('https://api.kinescope.io/v1/analytics', params, 'get');
54
54
  }
55
55
  catch (error) {
56
- console.error(`${error}`);
56
+ console.error(`[PACKAGE:kinescope.api] ${error}`);
57
57
  throw error;
58
58
  }
59
59
  });
@@ -20,7 +20,7 @@ export declare class BaseService {
20
20
  * Make request to Kinescope API
21
21
  * @param {string} apiUrl
22
22
  * @param {Request | File | Buffer} data
23
- * @param {"post" | "get" | "put" | "delete"} httpMethod
23
+ * @param {'post' | 'get' | 'put' | 'delete'} httpMethod
24
24
  * @param {Headers} headers
25
25
  * @returns {Promise<T>}
26
26
  */
@@ -41,7 +41,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
41
41
  * Make request to Kinescope API
42
42
  * @param {string} apiUrl
43
43
  * @param {Request | File | Buffer} data
44
- * @param {"post" | "get" | "put" | "delete"} httpMethod
44
+ * @param {'post' | 'get' | 'put' | 'delete'} httpMethod
45
45
  * @param {Headers} headers
46
46
  * @returns {Promise<T>}
47
47
  */
@@ -61,7 +61,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
61
61
  }
62
62
  catch (error) {
63
63
  const response = error.response;
64
- console.error(`[Error code is ${response === null || response === void 0 ? void 0 : response.status}] ${JSON.stringify(response === null || response === void 0 ? void 0 : response.data)}`);
64
+ console.error('[PACKAGE:kinescope.api]', `[Error code is ${response === null || response === void 0 ? void 0 : response.status}] ${JSON.stringify(response === null || response === void 0 ? void 0 : response.data)}`);
65
65
  throw error;
66
66
  }
67
67
  });
@@ -37,7 +37,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
37
37
  return yield this.requestApi('https://api.kinescope.io/v1/projects', data, 'post');
38
38
  }
39
39
  catch (error) {
40
- console.error(`${error}`);
40
+ console.error(`[PACKAGE:kinescope.api] ${error}`);
41
41
  throw error;
42
42
  }
43
43
  });
@@ -53,7 +53,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
53
53
  return yield this.requestApi('https://api.kinescope.io/v1/projects', params, 'get');
54
54
  }
55
55
  catch (error) {
56
- console.error(`${error}`);
56
+ console.error(`[PACKAGE:kinescope.api] ${error}`);
57
57
  throw error;
58
58
  }
59
59
  });
@@ -69,7 +69,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
69
69
  return yield this.requestApi(`https://api.kinescope.io/v1/projects/${params.id}`, {}, 'get');
70
70
  }
71
71
  catch (error) {
72
- console.error(`${error}`);
72
+ console.error(`[PACKAGE:kinescope.api] ${error}`);
73
73
  throw error;
74
74
  }
75
75
  });
@@ -87,7 +87,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
87
87
  return yield this.requestApi(`https://api.kinescope.io/v1/projects/${projectId}`, params, 'put');
88
88
  }
89
89
  catch (error) {
90
- console.error(`${error}`);
90
+ console.error(`[PACKAGE:kinescope.api] ${error}`);
91
91
  throw error;
92
92
  }
93
93
  });
@@ -104,7 +104,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
104
104
  return yield this.requestApi(`https://api.kinescope.io/v1/projects/${projectId}`, {}, 'delete');
105
105
  }
106
106
  catch (error) {
107
- console.error(`${error}`);
107
+ console.error(`[PACKAGE:kinescope.api] ${error}`);
108
108
  throw error;
109
109
  }
110
110
  });
@@ -38,7 +38,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
38
38
  return yield this.requestApi('https://uploader.kinescope.io/v2/video', data, 'post', Object.assign(Object.assign({}, headers), { 'X-Video-Title': encodeURI(headers['X-Video-Title']) }));
39
39
  }
40
40
  catch (error) {
41
- console.error(`${error}`);
41
+ console.error(`[PACKAGE:kinescope.api] ${error}`);
42
42
  throw error;
43
43
  }
44
44
  });
@@ -54,7 +54,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
54
54
  return yield this.requestApi('https://uploader.kinescope.io/v2/video', {}, 'post', Object.assign(Object.assign({}, headers), { 'X-Video-Title': encodeURI(headers['X-Video-Title']) }));
55
55
  }
56
56
  catch (error) {
57
- console.error(`${error}`);
57
+ console.error(`[PACKAGE:kinescope.api] ${error}`);
58
58
  throw error;
59
59
  }
60
60
  });
@@ -70,7 +70,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
70
70
  return yield this.requestApi('https://uploader.kinescope.io/v2/poster', {}, 'post', headers);
71
71
  }
72
72
  catch (error) {
73
- console.error(`${error}`);
73
+ console.error(`[PACKAGE:kinescope.api] ${error}`);
74
74
  throw error;
75
75
  }
76
76
  });
@@ -86,7 +86,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
86
86
  return yield this.requestApi(`https://api.kinescope.io/v1/videos/${videoId}`, {}, 'get');
87
87
  }
88
88
  catch (error) {
89
- console.error(`${error}`);
89
+ console.error(`[PACKAGE:kinescope.api] ${error}`);
90
90
  throw error;
91
91
  }
92
92
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exode-team/kinescope.api",
3
- "version": "2.0.43",
3
+ "version": "2.0.45",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "author": "aslanorlov <aslanorlov@gmail.com>",