Skip to content

Commit 29126da

Browse files
committed
Updated sources
1 parent ae77139 commit 29126da

19 files changed

Lines changed: 256 additions & 133 deletions

package-lock.json

Lines changed: 136 additions & 114 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-editor-cloud",
3-
"version": "21.7.0",
3+
"version": "22.5.0",
44
"description": "GroupDocs.Editor Cloud SDK for Node.js",
55
"homepage": "https://products.groupdocs.cloud/editor",
66
"author": {

src/api_client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* The MIT License (MIT)
33
*
4-
* Copyright (c) 2003-2021 Aspose Pty Ltd
4+
* Copyright (c) 2003-2022 Aspose Pty Ltd
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

src/api_error.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* The MIT License (MIT)
33
*
4-
* Copyright (c) 2003-2021 Aspose Pty Ltd
4+
* Copyright (c) 2003-2022 Aspose Pty Ltd
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

src/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* The MIT License (MIT)
33
*
4-
* Copyright (c) 2003-2021 Aspose Pty Ltd
4+
* Copyright (c) 2003-2022 Aspose Pty Ltd
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

src/configuration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* The MIT License (MIT)
33
*
4-
* Copyright (c) 2003-2021 Aspose Pty Ltd
4+
* Copyright (c) 2003-2022 Aspose Pty Ltd
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

src/editor_api.ts

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* The MIT License (MIT)
33
*
4-
* Copyright (c) 2003-2021 Aspose Pty Ltd
4+
* Copyright (c) 2003-2022 Aspose Pty Ltd
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal
@@ -639,6 +639,63 @@ export class InfoApi {
639639
return Promise.resolve(result);
640640
}
641641

642+
}
643+
/**
644+
* GroupDocs.Editor Cloud API
645+
*/
646+
export class LicenseApi {
647+
648+
/**
649+
* Creates new instance of LicenseApi
650+
* @param appSid Application identifier (App SID).
651+
* @param appKey Application private key (App Key).
652+
*/
653+
public static fromKeys(appSid: string, appKey: string) {
654+
const config = new Configuration(appSid, appKey);
655+
return new LicenseApi(config);
656+
}
657+
658+
/**
659+
* Creates new instance of LicenseApi
660+
* @param config API configuration.
661+
*/
662+
public static fromConfig(config: Configuration) {
663+
return new LicenseApi(config);
664+
}
665+
666+
/**
667+
* Configuration
668+
*/
669+
private configuration: Configuration;
670+
671+
/**
672+
* @param config Configuration.
673+
*/
674+
private constructor(config: Configuration) {
675+
this.configuration = config;
676+
}
677+
678+
/**
679+
* Get license consumption
680+
* @param requestObj contains request parameters
681+
*/
682+
public async getConsumptionCredit(): Promise<model.ConsumptionResult> {
683+
684+
const localVarPath = this.configuration.getServerUrl() + "/editor/consumption";
685+
const queryParameters: any = {};
686+
687+
const requestOptions: request.Options = {
688+
method: "GET",
689+
qs: queryParameters,
690+
uri: localVarPath,
691+
json: true,
692+
};
693+
694+
const response = await invokeApiMethod(requestOptions, this.configuration);
695+
const result = Serializer.deserialize(response.body, "ConsumptionResult");
696+
return Promise.resolve(result);
697+
}
698+
642699
}
643700
/**
644701
* GroupDocs.Editor Cloud API

src/model.ts

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* The MIT License (MIT)
33
*
4-
* Copyright (c) 2003-2021 Aspose Pty Ltd
4+
* Copyright (c) 2003-2022 Aspose Pty Ltd
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal
@@ -22,6 +22,49 @@
2222
* SOFTWARE.
2323
*/
2424

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

16591702
const typeMap = {
1703+
ConsumptionResult,
16601704
DiscUsage,
16611705
DocumentResult,
16621706
ErrorDetails,

src/package_version.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* The MIT License (MIT)
33
*
4-
* Copyright (c) 2003-2021 Aspose Pty Ltd
4+
* Copyright (c) 2003-2022 Aspose Pty Ltd
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal
@@ -25,4 +25,4 @@
2525
/**
2626
* Package version
2727
*/
28-
export const PackageVersion: string = "21.7.0";
28+
export const PackageVersion: string = "22.5.0";

src/serializer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* The MIT License (MIT)
33
*
4-
* Copyright (c) 2003-2021 Aspose Pty Ltd
4+
* Copyright (c) 2003-2022 Aspose Pty Ltd
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)