@stackfactor/client-api 1.1.120 → 1.1.121

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.
Files changed (2) hide show
  1. package/lib/quotas.js +29 -0
  2. package/package.json +1 -1
package/lib/quotas.js CHANGED
@@ -20,6 +20,35 @@ const getAllQuota = (token) => {
20
20
  });
21
21
  };
22
22
 
23
+ /**
24
+ * Increase quota utilization
25
+ * @param {String} quotaId
26
+ * @param {Number} value
27
+ * @param {String} token
28
+ */
29
+ const increaseQuotaUtilization = (quotaId, value, token) => {
30
+ return new Promise(function (resolve, reject) {
31
+ let confirmationRequest = client.post(
32
+ `/api/v1/quotas/increaseutilization`,
33
+ {
34
+ quotaId: quotaId,
35
+ value: value,
36
+ },
37
+ {
38
+ headers: { authorization: token },
39
+ }
40
+ );
41
+ confirmationRequest
42
+ .then((response) => {
43
+ resolve(response.data);
44
+ })
45
+ .catch((error) => {
46
+ reject(error);
47
+ });
48
+ });
49
+ };
50
+
23
51
  export default {
24
52
  getAllQuota,
53
+ increaseQuotaUtilization,
25
54
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackfactor/client-api",
3
- "version": "1.1.120",
3
+ "version": "1.1.121",
4
4
  "description": "Node.js library for the StackFactor API",
5
5
  "main": "index.js",
6
6
  "exports": {