aspose-barcode-cloud-node 23.1.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 CHANGED
@@ -5,7 +5,7 @@
5
5
  [![npm](https://img.shields.io/npm/v/aspose-barcode-cloud-node)](https://www.npmjs.com/package/aspose-barcode-cloud-node)
6
6
 
7
7
  + API version: 3.0
8
- + Package version: 23.1.0
8
+ + Package version: 23.3.0
9
9
 
10
10
  ## Demo applications
11
11
 
@@ -115,7 +115,7 @@ Class | Method | HTTP request | Description
115
115
  ----- | ------ | ------------ | -----------
116
116
  BarcodeApi | [**getBarcodeGenerate**](docs/index.md#getbarcodegenerate) | **GET** /barcode/generate | Generate barcode.
117
117
  BarcodeApi | [**getBarcodeRecognize**](docs/index.md#getbarcoderecognize) | **GET** /barcode/{name}/recognize | Recognize barcode from a file on server.
118
- BarcodeApi | [**postBarcodeRecognizeFromUrlOrContent**](docs/index.md#postbarcoderecognizefromurlorcontent) | **POST** /barcode/recognize | Recognize barcode from an url or from request body. Request body can contain raw data bytes of the image or encoded with base64.
118
+ BarcodeApi | [**postBarcodeRecognizeFromUrlOrContent**](docs/index.md#postbarcoderecognizefromurlorcontent) | **POST** /barcode/recognize | Recognize barcode from an url or from request body. Request body can contain raw data bytes of the image with content-type \"application/octet-stream\". An image can also be passed as a form field.
119
119
  BarcodeApi | [**postGenerateMultiple**](docs/index.md#postgeneratemultiple) | **POST** /barcode/generateMultiple | Generate multiple barcodes and return in response stream
120
120
  BarcodeApi | [**putBarcodeGenerateFile**](docs/index.md#putbarcodegeneratefile) | **PUT** /barcode/{name}/generate | Generate barcode and save on server (from query params or from file with json or xml content)
121
121
  BarcodeApi | [**putBarcodeRecognizeFromBody**](docs/index.md#putbarcoderecognizefrombody) | **PUT** /barcode/{name}/recognize | Recognition of a barcode from file on server with parameters in body.
@@ -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
- constructor(clientId: string, clientSecret: string, baseUrl?: string, accessToken?: string);
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
  */
package/dist/api.d.ts CHANGED
@@ -28,7 +28,7 @@ export declare class BarcodeApi {
28
28
  }>;
29
29
  /**
30
30
  *
31
- * @summary Recognize barcode from an url or from request body. Request body can contain raw data bytes of the image or encoded with base64.
31
+ * @summary Recognize barcode from an url or from request body. Request body can contain raw data bytes of the image with content-type \"application/octet-stream\". An image can also be passed as a form field.
32
32
  * @param request PostBarcodeRecognizeFromUrlOrContentRequest
33
33
  */
34
34
  postBarcodeRecognizeFromUrlOrContent(request: PostBarcodeRecognizeFromUrlOrContentRequest): Promise<{
@@ -1689,7 +1689,7 @@ class GetBarcodeRecognizeRequest {
1689
1689
  }
1690
1690
  }
1691
1691
  /**
1692
- * Recognize barcode from an url or from request body. Request body can contain raw data bytes of the image or encoded with base64.
1692
+ * Recognize barcode from an url or from request body. Request body can contain raw data bytes of the image with content-type \"application/octet-stream\". An image can also be passed as a form field.
1693
1693
  */
1694
1694
  class PostBarcodeRecognizeFromUrlOrContentRequest {}
1695
1695
  /**
@@ -2007,7 +2007,7 @@ class ObjectSerializer {
2007
2007
  return enumsMap[type][data];
2008
2008
  }
2009
2009
  if (!typeMap[type]) {
2010
- // in case we dont know the type
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
- // dont know the type
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
- const value = ObjectSerializer.deserialize(data[key], attributeType.type);
2064
- instance[attributeType.name] = value;
2063
+ instance[attributeType.name] = ObjectSerializer.deserialize(data[key], attributeType.type);
2065
2064
  }
2066
2065
  return instance;
2067
2066
  }
@@ -2457,7 +2456,7 @@ class BarcodeApi {
2457
2456
  }
2458
2457
  /**
2459
2458
  *
2460
- * @summary Recognize barcode from an url or from request body. Request body can contain raw data bytes of the image or encoded with base64.
2459
+ * @summary Recognize barcode from an url or from request body. Request body can contain raw data bytes of the image with content-type \"application/octet-stream\". An image can also be passed as a form field.
2461
2460
  * @param request PostBarcodeRecognizeFromUrlOrContentRequest
2462
2461
  */
2463
2462
  async postBarcodeRecognizeFromUrlOrContent(request) {
@@ -3694,7 +3693,7 @@ class JWTAuth {
3694
3693
  const requestOptions = {
3695
3694
  method: 'POST',
3696
3695
  json: true,
3697
- uri: this._configuration.baseUrl + '/connect/token',
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
- reject(response.body);
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 {