aspose-barcode-cloud-node 23.2.0 → 23.3.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.
- package/README.md +1 -1
- package/dist/Configuration.d.ts +2 -3
- package/dist/aspose-barcode-cloud-node.cjs.development.js +8 -9
- package/dist/aspose-barcode-cloud-node.cjs.development.js.map +1 -1
- package/dist/aspose-barcode-cloud-node.cjs.production.min.js +1 -1
- package/dist/aspose-barcode-cloud-node.cjs.production.min.js.map +1 -1
- package/dist/aspose-barcode-cloud-node.esm.js +8 -9
- package/dist/aspose-barcode-cloud-node.esm.js.map +1 -1
- package/dist/models.d.ts +3 -1
- package/package.json +4 -14
package/README.md
CHANGED
package/dist/Configuration.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { Authentication } from './Authentication';
|
|
2
2
|
export declare enum ApiVersion {
|
|
3
|
-
v1 = "v1",
|
|
4
|
-
v2 = "v1.1",
|
|
5
3
|
v3 = "v3.0"
|
|
6
4
|
}
|
|
7
5
|
export declare class Configuration {
|
|
@@ -23,7 +21,8 @@ export declare class Configuration {
|
|
|
23
21
|
baseUrl: string;
|
|
24
22
|
readonly version: ApiVersion;
|
|
25
23
|
readonly accessToken: string;
|
|
26
|
-
|
|
24
|
+
readonly tokenUrl: string;
|
|
25
|
+
constructor(clientId: string, clientSecret: string, baseUrl?: string, accessToken?: string, tokenUrl?: string);
|
|
27
26
|
/**
|
|
28
27
|
* Returns api base url
|
|
29
28
|
*/
|
|
@@ -2007,7 +2007,7 @@ class ObjectSerializer {
|
|
|
2007
2007
|
return enumsMap[type][data];
|
|
2008
2008
|
}
|
|
2009
2009
|
if (!typeMap[type]) {
|
|
2010
|
-
// in case we
|
|
2010
|
+
// in case we don't know the type
|
|
2011
2011
|
return data;
|
|
2012
2012
|
}
|
|
2013
2013
|
// get the map for the correct type.
|
|
@@ -2047,7 +2047,7 @@ class ObjectSerializer {
|
|
|
2047
2047
|
return data;
|
|
2048
2048
|
}
|
|
2049
2049
|
if (!typeMap[type]) {
|
|
2050
|
-
//
|
|
2050
|
+
// don't know the type
|
|
2051
2051
|
return data;
|
|
2052
2052
|
}
|
|
2053
2053
|
if (typeof data === 'string') {
|
|
@@ -2060,8 +2060,7 @@ class ObjectSerializer {
|
|
|
2060
2060
|
const key = attributeType.baseName.replace(/^(.)/, $1 => {
|
|
2061
2061
|
return $1.toLowerCase();
|
|
2062
2062
|
});
|
|
2063
|
-
|
|
2064
|
-
instance[attributeType.name] = value;
|
|
2063
|
+
instance[attributeType.name] = ObjectSerializer.deserialize(data[key], attributeType.type);
|
|
2065
2064
|
}
|
|
2066
2065
|
return instance;
|
|
2067
2066
|
}
|
|
@@ -3694,7 +3693,7 @@ class JWTAuth {
|
|
|
3694
3693
|
const requestOptions = {
|
|
3695
3694
|
method: 'POST',
|
|
3696
3695
|
json: true,
|
|
3697
|
-
uri: this._configuration.
|
|
3696
|
+
uri: this._configuration.tokenUrl,
|
|
3698
3697
|
form: {
|
|
3699
3698
|
grant_type: 'client_credentials',
|
|
3700
3699
|
client_id: this._configuration.clientId,
|
|
@@ -3711,7 +3710,8 @@ class JWTAuth {
|
|
|
3711
3710
|
self._accessToken = response.body.access_token;
|
|
3712
3711
|
resolve();
|
|
3713
3712
|
} else {
|
|
3714
|
-
|
|
3713
|
+
var _response$body;
|
|
3714
|
+
reject((_response$body = response.body) != null ? _response$body : `Error fetching token from '${requestOptions.uri}': ${response.statusCode} ${response.statusMessage}`);
|
|
3715
3715
|
}
|
|
3716
3716
|
}
|
|
3717
3717
|
});
|
|
@@ -3720,12 +3720,10 @@ class JWTAuth {
|
|
|
3720
3720
|
}
|
|
3721
3721
|
|
|
3722
3722
|
(function (ApiVersion) {
|
|
3723
|
-
ApiVersion["v1"] = "v1";
|
|
3724
|
-
ApiVersion["v2"] = "v1.1";
|
|
3725
3723
|
ApiVersion["v3"] = "v3.0";
|
|
3726
3724
|
})(exports.ApiVersion || (exports.ApiVersion = {}));
|
|
3727
3725
|
class Configuration {
|
|
3728
|
-
constructor(clientId, clientSecret, baseUrl, accessToken) {
|
|
3726
|
+
constructor(clientId, clientSecret, baseUrl, accessToken, tokenUrl) {
|
|
3729
3727
|
this.version = exports.ApiVersion.v3;
|
|
3730
3728
|
this.clientId = clientId;
|
|
3731
3729
|
this.clientSecret = clientSecret;
|
|
@@ -3734,6 +3732,7 @@ class Configuration {
|
|
|
3734
3732
|
} else {
|
|
3735
3733
|
this.baseUrl = 'https://api.aspose.cloud';
|
|
3736
3734
|
}
|
|
3735
|
+
this.tokenUrl = tokenUrl != null ? tokenUrl : this.baseUrl + '/connect/token';
|
|
3737
3736
|
if (accessToken) {
|
|
3738
3737
|
this.accessToken = accessToken;
|
|
3739
3738
|
} else {
|