@localazy/ts-api
Advanced tools
Comparing version 1.0.12 to 1.0.13
declare type Common = { | ||
url: string; | ||
projectToken: string; | ||
headers?: Record<string, string>; | ||
options?: Record<string, unknown>; | ||
@@ -5,0 +6,0 @@ rawData?: string; |
"use strict"; | ||
var __assign = (this && this.__assign) || function () { | ||
__assign = Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
return __assign.apply(this, arguments); | ||
}; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -64,5 +75,3 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
method: 'GET', | ||
headers: { | ||
Authorization: "Bearer ".concat(options.projectToken), | ||
}, | ||
headers: __assign({ Authorization: "Bearer ".concat(options.projectToken) }, options.headers), | ||
}).catch(function (e) { | ||
@@ -90,6 +99,3 @@ throw e; | ||
method: 'GET', | ||
headers: { | ||
Authorization: "Bearer ".concat(options.projectToken), | ||
'Response-Type': 'blob', | ||
}, | ||
headers: __assign({ Authorization: "Bearer ".concat(options.projectToken), 'Response-Type': 'blob' }, options.headers), | ||
}).catch(function (e) { | ||
@@ -124,6 +130,3 @@ throw e; | ||
method: 'POST', | ||
headers: { | ||
Authorization: "Bearer ".concat(options.projectToken), | ||
'Content-Type': 'application/json', | ||
}, | ||
headers: __assign({ Authorization: "Bearer ".concat(options.projectToken), 'Content-Type': 'application/json' }, options.headers), | ||
body: body, | ||
@@ -159,6 +162,3 @@ }).catch(function (e) { | ||
method: 'PUT', | ||
headers: { | ||
Authorization: "Bearer ".concat(options.projectToken), | ||
'Content-Type': 'application/json', | ||
}, | ||
headers: __assign({ Authorization: "Bearer ".concat(options.projectToken), 'Content-Type': 'application/json' }, options.headers), | ||
body: body, | ||
@@ -187,5 +187,3 @@ }).catch(function (e) { | ||
method: 'DELETE', | ||
headers: { | ||
Authorization: "Bearer ".concat(options.projectToken), | ||
}, | ||
headers: __assign({ Authorization: "Bearer ".concat(options.projectToken) }, options.headers), | ||
}).catch(function (e) { | ||
@@ -192,0 +190,0 @@ throw e; |
@@ -88,2 +88,3 @@ "use strict"; | ||
options: options, | ||
headers: config.headers, | ||
})]; | ||
@@ -112,2 +113,3 @@ }); | ||
options: payload, | ||
headers: config.headers, | ||
})]; | ||
@@ -133,2 +135,3 @@ }); | ||
projectToken: config.projectToken || this.projectToken, | ||
headers: config.headers, | ||
})]; | ||
@@ -156,2 +159,3 @@ }); | ||
projectToken: config.projectToken || this.projectToken, | ||
headers: config.headers, | ||
})]; | ||
@@ -179,2 +183,3 @@ }); | ||
projectToken: config.projectToken || this.projectToken, | ||
headers: config.headers, | ||
})]; | ||
@@ -203,2 +208,3 @@ }); | ||
options: payload, | ||
headers: config.headers, | ||
})]; | ||
@@ -226,2 +232,3 @@ }); | ||
projectToken: config.projectToken || this.projectToken, | ||
headers: config.headers, | ||
})]; | ||
@@ -250,2 +257,3 @@ }); | ||
options: options.webhooks, | ||
headers: config.headers, | ||
})]; | ||
@@ -273,2 +281,3 @@ }); | ||
projectToken: config.projectToken || this.projectToken, | ||
headers: config.headers, | ||
})]; | ||
@@ -296,2 +305,3 @@ }); | ||
projectToken: config.projectToken || this.projectToken, | ||
headers: config.headers, | ||
})]; | ||
@@ -319,2 +329,3 @@ }); | ||
projectToken: config.projectToken || this.projectToken, | ||
headers: config.headers, | ||
})]; | ||
@@ -343,2 +354,3 @@ }); | ||
rawData: options.rawScreenshot, | ||
headers: config.headers, | ||
})]; | ||
@@ -367,2 +379,3 @@ }); | ||
rawData: options.rawScreenshot, | ||
headers: config.headers, | ||
})]; | ||
@@ -391,2 +404,3 @@ }); | ||
options: options.screenshot, | ||
headers: config.headers, | ||
})]; | ||
@@ -414,2 +428,3 @@ }); | ||
projectToken: config.projectToken || this.projectToken, | ||
headers: config.headers, | ||
})]; | ||
@@ -438,2 +453,3 @@ }); | ||
options: payload, | ||
headers: config.headers, | ||
})]; | ||
@@ -461,2 +477,3 @@ }); | ||
projectToken: config.projectToken || this.projectToken, | ||
headers: config.headers, | ||
})]; | ||
@@ -463,0 +480,0 @@ }); |
@@ -6,3 +6,5 @@ declare type CommonConfig = { | ||
baseUrl?: string; | ||
/** Optionally pass additional headers */ | ||
headers?: Record<string, string>; | ||
}; | ||
export default CommonConfig; |
{ | ||
"name": "@localazy/ts-api", | ||
"version": "1.0.12", | ||
"version": "1.0.13", | ||
"description": "This is a Typescript library facilitating usage of Localazy's API.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
77733
1284