ozone-api-request
Advanced tools
Comparing version 1.0.4 to 3.0.0
@@ -149,3 +149,5 @@ /// <amd-module name="ozone-api-request"/> | ||
constructor() { | ||
this._url = ''; | ||
this._method = 'GET'; | ||
this._body = ''; | ||
this._responseType = 'json'; | ||
@@ -203,3 +205,3 @@ /** | ||
this.eventTarget.dispatchEvent(new CustomEvent('ozone-api-request-success', { | ||
bubbles: true, composed: true, detail: xmlhttp | ||
bubbles: true, detail: xmlhttp | ||
})); | ||
@@ -210,3 +212,3 @@ resolve(xmlhttp); | ||
this.eventTarget.dispatchEvent(new CustomEvent('ozone-api-request-unauthorized', { | ||
bubbles: true, composed: true, detail: xmlhttp | ||
bubbles: true, detail: xmlhttp | ||
})); | ||
@@ -217,3 +219,3 @@ reject(xmlhttp); | ||
this.eventTarget.dispatchEvent(new CustomEvent('ozone-api-request-error', { | ||
bubbles: true, composed: true, detail: xmlhttp | ||
bubbles: true, detail: xmlhttp | ||
})); | ||
@@ -226,3 +228,3 @@ reject(xmlhttp); | ||
this.eventTarget.dispatchEvent(new CustomEvent('ozone-api-request-timeout', { | ||
bubbles: true, composed: true, detail: xmlhttp | ||
bubbles: true, detail: xmlhttp | ||
})); | ||
@@ -229,0 +231,0 @@ reject(xmlhttp); |
{ | ||
"name": "ozone-api-request", | ||
"version": "1.0.4", | ||
"version": "3.0.0", | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"description": "light api for ozone ajax call", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/taktik/ozone-api-request" | ||
"url": "https://github.com/taktik/ozone-components/packages/ozone-helper/ozone-api-request" | ||
}, | ||
@@ -14,3 +17,4 @@ "main": "dist/ozone-api-request.js", | ||
"build": "tsc", | ||
"test": "tsc && git diff --exit-code" | ||
"test": "tsc", | ||
"doc": "typedoc --excludeExternals --out doc/ src/" | ||
}, | ||
@@ -20,7 +24,10 @@ "author": "hj@taktik", | ||
"devDependencies": { | ||
"typescript": "^2.4.1" | ||
"ozone-type": "^3.0.0", | ||
"typescript": "^2.7.2" | ||
}, | ||
"dependencies": { | ||
"taktik-polymer-typescript": "^2.2.0" | ||
"@types/lodash": "^4.14.104", | ||
"taktik-polymer-typescript": "^3.0.0", | ||
"typedoc": "^0.11.1" | ||
} | ||
} |
@@ -77,5 +77,5 @@ /// <amd-module name="ozone-api-request"/> | ||
export class OzoneAPIRequest{ | ||
private _url: string; | ||
private _url: string =''; | ||
private _method: string = 'GET'; | ||
private _body: string; | ||
private _body: string = ''; | ||
private _responseType: XMLHttpRequestResponseType = 'json'; | ||
@@ -143,4 +143,4 @@ | ||
case 200: | ||
this.eventTarget.dispatchEvent(new CustomEvent('ozone-api-request-success', { | ||
bubbles: true, composed: true, detail: xmlhttp | ||
this.eventTarget.dispatchEvent(new CustomEvent<XMLHttpRequest>('ozone-api-request-success', { | ||
bubbles: true, detail: xmlhttp | ||
})); | ||
@@ -150,4 +150,4 @@ resolve(xmlhttp); | ||
case 403: | ||
this.eventTarget.dispatchEvent(new CustomEvent('ozone-api-request-unauthorized', { | ||
bubbles: true, composed: true, detail: xmlhttp | ||
this.eventTarget.dispatchEvent(new CustomEvent<XMLHttpRequest>('ozone-api-request-unauthorized', { | ||
bubbles: true, detail: xmlhttp | ||
})); | ||
@@ -157,4 +157,4 @@ reject(xmlhttp); | ||
default: | ||
this.eventTarget.dispatchEvent(new CustomEvent('ozone-api-request-error', { | ||
bubbles: true, composed: true, detail: xmlhttp | ||
this.eventTarget.dispatchEvent(new CustomEvent<XMLHttpRequest>('ozone-api-request-error', { | ||
bubbles: true, detail: xmlhttp | ||
})); | ||
@@ -168,4 +168,4 @@ reject(xmlhttp); | ||
xmlhttp.ontimeout = () =>{ | ||
this.eventTarget.dispatchEvent(new CustomEvent('ozone-api-request-timeout', { | ||
bubbles: true, composed: true, detail: xmlhttp | ||
this.eventTarget.dispatchEvent(new CustomEvent<XMLHttpRequest>('ozone-api-request-timeout', { | ||
bubbles: true, detail: xmlhttp | ||
})); | ||
@@ -172,0 +172,0 @@ reject(xmlhttp); |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
21178
10
508
0
3
2
+ Added@types/lodash@^4.14.104
+ Addedtypedoc@^0.11.1
+ Added@types/fs-extra@5.0.1(transitive)
+ Added@types/glob@8.1.0(transitive)
+ Added@types/handlebars@4.0.36(transitive)
+ Added@types/highlight.js@9.12.2(transitive)
+ Added@types/lodash@4.14.1044.17.12(transitive)
+ Added@types/marked@0.3.0(transitive)
+ Added@types/minimatch@3.0.35.1.2(transitive)
+ Added@types/node@22.7.8(transitive)
+ Added@types/shelljs@0.7.8(transitive)
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedfs-extra@5.0.0(transitive)
+ Addedfs.realpath@1.0.0(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedglob@7.2.3(transitive)
+ Addedgraceful-fs@4.2.11(transitive)
+ Addedhandlebars@4.7.8(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedhighlight.js@9.18.5(transitive)
+ Addedinflight@1.0.6(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedinterpret@1.4.0(transitive)
+ Addedis-core-module@2.15.1(transitive)
+ Addedjsonfile@4.0.0(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedmarked@0.3.19(transitive)
+ Addedminimatch@3.1.2(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedneo-async@2.6.2(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
+ Addedpath-parse@1.0.7(transitive)
+ Addedprogress@2.0.3(transitive)
+ Addedrechoir@0.6.2(transitive)
+ Addedresolve@1.22.8(transitive)
+ Addedshelljs@0.8.5(transitive)
+ Addedsource-map@0.6.1(transitive)
+ Addedsupports-preserve-symlinks-flag@1.0.0(transitive)
+ Addedtaktik-polymer-typescript@3.4.6(transitive)
+ Addedtypedoc@0.11.1(transitive)
+ Addedtypedoc-default-themes@0.5.0(transitive)
+ Addedtypescript@2.7.22.9.2(transitive)
+ Addeduglify-js@3.19.3(transitive)
+ Addedundici-types@6.19.8(transitive)
+ Addeduniversalify@0.1.2(transitive)
+ Addedwordwrap@1.0.0(transitive)
+ Addedwrappy@1.0.2(transitive)
- Removedtaktik-polymer-typescript@2.3.3(transitive)