Skip to content

Commit 77a224b

Browse files
committed
Updated sources
1 parent e90bc62 commit 77a224b

File tree

5 files changed

+123
-21
lines changed

5 files changed

+123
-21
lines changed

package-lock.json

Lines changed: 19 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "groupdocs-conversion-cloud",
3-
"version": "21.10.0",
3+
"version": "21.12.0",
44
"description": "GroupDocs.Conversion Cloud SDK for Node.js",
55
"homepage": "https://products.groupdocs.cloud/conversion",
66
"author": {

src/conversion_api.ts

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,63 @@ export class InfoApi {
687687
return Promise.resolve(result);
688688
}
689689

690+
}
691+
/**
692+
* GroupDocs.Conversion Cloud API
693+
*/
694+
export class LicenseApi {
695+
696+
/**
697+
* Creates new instance of LicenseApi
698+
* @param appSid Application identifier (App SID).
699+
* @param appKey Application private key (App Key).
700+
*/
701+
public static fromKeys(appSid: string, appKey: string) {
702+
const config = new Configuration(appSid, appKey);
703+
return new LicenseApi(config);
704+
}
705+
706+
/**
707+
* Creates new instance of LicenseApi
708+
* @param config API configuration.
709+
*/
710+
public static fromConfig(config: Configuration) {
711+
return new LicenseApi(config);
712+
}
713+
714+
/**
715+
* Configuration
716+
*/
717+
private configuration: Configuration;
718+
719+
/**
720+
* @param config Configuration.
721+
*/
722+
private constructor(config: Configuration) {
723+
this.configuration = config;
724+
}
725+
726+
/**
727+
* Get license consumption
728+
* @param requestObj contains request parameters
729+
*/
730+
public async getConsumptionCredit(): Promise<model.ConsumptionResult> {
731+
732+
const localVarPath = this.configuration.getServerUrl() + "/conversion/consumption";
733+
const queryParameters: any = {};
734+
735+
const requestOptions: request.Options = {
736+
method: "GET",
737+
qs: queryParameters,
738+
uri: localVarPath,
739+
json: true,
740+
};
741+
742+
const response = await invokeApiMethod(requestOptions, this.configuration);
743+
const result = Serializer.deserialize(response.body, "ConsumptionResult");
744+
return Promise.resolve(result);
745+
}
746+
690747
}
691748
/**
692749
* GroupDocs.Conversion Cloud API

src/model.ts

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,50 @@
2222
* SOFTWARE.
2323
*/
2424

25+
/**
26+
* Metered license consumption information
27+
*/
28+
// tslint:disable: completed-docs
29+
export class ConsumptionResult {
30+
31+
/**
32+
* Attribute type map
33+
*/
34+
public static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
35+
{
36+
name: "credit",
37+
baseName: "credit",
38+
type: "number",
39+
},
40+
{
41+
name: "quantity",
42+
baseName: "quantity",
43+
type: "number",
44+
} ];
45+
46+
/**
47+
* Returns attribute type map
48+
*/
49+
public static getAttributeTypeMap() {
50+
return ConsumptionResult.attributeTypeMap;
51+
}
52+
53+
/**
54+
* Amount of used credits
55+
*/
56+
public credit: number;
57+
58+
/**
59+
* Amount of MBs processed
60+
*/
61+
public quantity: number;
62+
63+
public constructor(init?: Partial<ConsumptionResult>) {
64+
65+
Object.assign(this, init);
66+
}
67+
}
68+
2569
/**
2670
* ConvertOptions base
2771
*/
@@ -6676,6 +6720,7 @@ const enumsMap = {
66766720
};
66776721

66786722
const typeMap = {
6723+
ConsumptionResult,
66796724
ConvertOptions,
66806725
ConvertSettings,
66816726
DiscUsage,

src/package_version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@
2525
/**
2626
* Package version
2727
*/
28-
export const PackageVersion: string = "21.10.0";
28+
export const PackageVersion: string = "21.12.0";

0 commit comments

Comments
 (0)