@devopness/sdk-js 2.51.0 → 2.52.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.
@@ -12,6 +12,7 @@
12
12
  import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
14
  import { User } from '../../generated/models';
15
+ import { UserBilling } from '../../generated/models';
15
16
  import { UserCreate } from '../../generated/models';
16
17
  import { UserLogin } from '../../generated/models';
17
18
  import { UserLoginResponse } from '../../generated/models';
@@ -38,6 +39,11 @@ export declare class UsersApiService extends ApiBaseService {
38
39
  * @param {number} userId The ID of the user.
39
40
  */
40
41
  getUser(userId: number): Promise<ApiResponse<User>>;
42
+ /**
43
+ *
44
+ * @summary Get details of the current user active subscription
45
+ */
46
+ getUserBilling(): Promise<ApiResponse<UserBilling>>;
41
47
  /**
42
48
  *
43
49
  * @summary Logout/revoke an existing token
@@ -61,6 +61,18 @@ class UsersApiService extends ApiBaseService_1.ApiBaseService {
61
61
  return new ApiResponse_1.ApiResponse(response);
62
62
  });
63
63
  }
64
+ /**
65
+ *
66
+ * @summary Get details of the current user active subscription
67
+ */
68
+ getUserBilling() {
69
+ return __awaiter(this, void 0, void 0, function* () {
70
+ let queryString = '';
71
+ const requestUrl = '/users/billing' + (queryString ? `?${queryString}` : '');
72
+ const response = yield this.get(requestUrl);
73
+ return new ApiResponse_1.ApiResponse(response);
74
+ });
75
+ }
64
76
  /**
65
77
  *
66
78
  * @summary Logout/revoke an existing token
@@ -0,0 +1,36 @@
1
+ /**
2
+ * devopness API
3
+ * Devopness API - Painless essential DevOps to everyone
4
+ *
5
+ * The version of the OpenAPI document: latest
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * The user\'s active subscription credits
14
+ * @export
15
+ * @interface Credits
16
+ */
17
+ export interface Credits {
18
+ /**
19
+ * Total credits that can be used to perform actions in the subscription period
20
+ * @type {number}
21
+ * @memberof Credits
22
+ */
23
+ plan_limit?: number;
24
+ /**
25
+ * Total credits that were used to perform actions
26
+ * @type {number}
27
+ * @memberof Credits
28
+ */
29
+ used?: number;
30
+ /**
31
+ * Total credits available to use to perform actions
32
+ * @type {number}
33
+ * @memberof Credits
34
+ */
35
+ remaining?: number;
36
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ /* eslint-disable */
3
+ /**
4
+ * devopness API
5
+ * Devopness API - Painless essential DevOps to everyone
6
+ *
7
+ * The version of the OpenAPI document: latest
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -48,6 +48,7 @@ export * from './credential-digital-ocean';
48
48
  export * from './credential-google-cloud';
49
49
  export * from './credential-relation';
50
50
  export * from './credential-setting';
51
+ export * from './credits';
51
52
  export * from './cron-job';
52
53
  export * from './cron-job-environment-create';
53
54
  export * from './cron-job-options';
@@ -189,6 +190,7 @@ export * from './step';
189
190
  export * from './step-pipeline-create';
190
191
  export * from './step-pipeline-update';
191
192
  export * from './subscription';
193
+ export * from './subscription-balance';
192
194
  export * from './subscription-plan';
193
195
  export * from './team';
194
196
  export * from './team-environment-link';
@@ -200,6 +202,7 @@ export * from './team-relation';
200
202
  export * from './team-update';
201
203
  export * from './trigger-event';
202
204
  export * from './user';
205
+ export * from './user-billing';
203
206
  export * from './user-create';
204
207
  export * from './user-login';
205
208
  export * from './user-login-response';
@@ -64,6 +64,7 @@ __exportStar(require("./credential-digital-ocean"), exports);
64
64
  __exportStar(require("./credential-google-cloud"), exports);
65
65
  __exportStar(require("./credential-relation"), exports);
66
66
  __exportStar(require("./credential-setting"), exports);
67
+ __exportStar(require("./credits"), exports);
67
68
  __exportStar(require("./cron-job"), exports);
68
69
  __exportStar(require("./cron-job-environment-create"), exports);
69
70
  __exportStar(require("./cron-job-options"), exports);
@@ -205,6 +206,7 @@ __exportStar(require("./step"), exports);
205
206
  __exportStar(require("./step-pipeline-create"), exports);
206
207
  __exportStar(require("./step-pipeline-update"), exports);
207
208
  __exportStar(require("./subscription"), exports);
209
+ __exportStar(require("./subscription-balance"), exports);
208
210
  __exportStar(require("./subscription-plan"), exports);
209
211
  __exportStar(require("./team"), exports);
210
212
  __exportStar(require("./team-environment-link"), exports);
@@ -216,6 +218,7 @@ __exportStar(require("./team-relation"), exports);
216
218
  __exportStar(require("./team-update"), exports);
217
219
  __exportStar(require("./trigger-event"), exports);
218
220
  __exportStar(require("./user"), exports);
221
+ __exportStar(require("./user-billing"), exports);
219
222
  __exportStar(require("./user-create"), exports);
220
223
  __exportStar(require("./user-login"), exports);
221
224
  __exportStar(require("./user-login-response"), exports);
@@ -0,0 +1,55 @@
1
+ /**
2
+ * devopness API
3
+ * Devopness API - Painless essential DevOps to everyone
4
+ *
5
+ * The version of the OpenAPI document: latest
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { Credits } from './credits';
13
+ /**
14
+ * The user\'s active subscription balance
15
+ * @export
16
+ * @interface SubscriptionBalance
17
+ */
18
+ export interface SubscriptionBalance {
19
+ /**
20
+ *
21
+ * @type {Credits}
22
+ * @memberof SubscriptionBalance
23
+ */
24
+ credits?: Credits;
25
+ /**
26
+ * The unit of measurement to count credits
27
+ * @type {string}
28
+ * @memberof SubscriptionBalance
29
+ */
30
+ unit?: string;
31
+ /**
32
+ * The date and time the subscription plan starts
33
+ * @type {string}
34
+ * @memberof SubscriptionBalance
35
+ */
36
+ billing_period_started_at?: string;
37
+ /**
38
+ * The date and time the subscription plan ends
39
+ * @type {string}
40
+ * @memberof SubscriptionBalance
41
+ */
42
+ billing_period_ends_at?: string;
43
+ /**
44
+ * The date and time when the record was created
45
+ * @type {string}
46
+ * @memberof SubscriptionBalance
47
+ */
48
+ created_at?: string;
49
+ /**
50
+ * The date and time when the record was last updated
51
+ * @type {string}
52
+ * @memberof SubscriptionBalance
53
+ */
54
+ updated_at?: string;
55
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ /* eslint-disable */
3
+ /**
4
+ * devopness API
5
+ * Devopness API - Painless essential DevOps to everyone
6
+ *
7
+ * The version of the OpenAPI document: latest
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import { SubscriptionBalance } from './subscription-balance';
12
13
  /**
13
14
  * The user\'s active subscription
14
15
  * @export
@@ -87,4 +88,10 @@ export interface Subscription {
87
88
  * @memberof Subscription
88
89
  */
89
90
  updated_at?: string;
91
+ /**
92
+ * The list of subscription balances
93
+ * @type {Array<SubscriptionBalance>}
94
+ * @memberof Subscription
95
+ */
96
+ balances?: Array<SubscriptionBalance>;
90
97
  }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * devopness API
3
+ * Devopness API - Painless essential DevOps to everyone
4
+ *
5
+ * The version of the OpenAPI document: latest
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { Subscription } from './subscription';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface UserBilling
17
+ */
18
+ export interface UserBilling {
19
+ /**
20
+ *
21
+ * @type {Subscription}
22
+ * @memberof UserBilling
23
+ */
24
+ active_subscription: Subscription | null;
25
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ /* eslint-disable */
3
+ /**
4
+ * devopness API
5
+ * Devopness API - Painless essential DevOps to everyone
6
+ *
7
+ * The version of the OpenAPI document: latest
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -11,7 +11,6 @@
11
11
  */
12
12
  import { Language } from './language';
13
13
  import { SocialAccountRelation } from './social-account-relation';
14
- import { Subscription } from './subscription';
15
14
  /**
16
15
  *
17
16
  * @export
@@ -54,12 +53,6 @@ export interface UserMe {
54
53
  * @memberof UserMe
55
54
  */
56
55
  social_accounts: Array<SocialAccountRelation>;
57
- /**
58
- *
59
- * @type {Subscription}
60
- * @memberof UserMe
61
- */
62
- active_subscription: Subscription | null;
63
56
  /**
64
57
  * The date and time when the record was created
65
58
  * @type {string}
@@ -11,7 +11,6 @@
11
11
  */
12
12
  import { Language } from './language';
13
13
  import { SocialAccountRelation } from './social-account-relation';
14
- import { Subscription } from './subscription';
15
14
  /**
16
15
  *
17
16
  * @export
@@ -54,12 +53,6 @@ export interface User {
54
53
  * @memberof User
55
54
  */
56
55
  social_accounts: Array<SocialAccountRelation>;
57
- /**
58
- *
59
- * @type {Subscription}
60
- * @memberof User
61
- */
62
- active_subscription: Subscription | null;
63
56
  /**
64
57
  * The date and time when the record was created
65
58
  * @type {string}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devopness/sdk-js",
3
- "version": "2.51.0",
3
+ "version": "2.52.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },