@l7mp/tivadar-ai-api-sdk 0.2.9 → 0.2.11
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/dist/api-client.d.ts +29 -4
- package/dist/api-client.js +22 -3
- package/dist/apis/AdminSubscriptionsApi.d.ts +82 -0
- package/dist/apis/AdminSubscriptionsApi.js +242 -0
- package/dist/apis/SubscriptionApi.d.ts +54 -75
- package/dist/apis/SubscriptionApi.js +95 -114
- package/dist/apis/VoiceUsageApi.d.ts +31 -0
- package/dist/apis/VoiceUsageApi.js +73 -0
- package/dist/apis/index.d.ts +2 -0
- package/dist/apis/index.js +2 -0
- package/dist/esm/api-client.d.ts +29 -4
- package/dist/esm/api-client.js +22 -3
- package/dist/esm/apis/AdminSubscriptionsApi.d.ts +82 -0
- package/dist/esm/apis/AdminSubscriptionsApi.js +238 -0
- package/dist/esm/apis/SubscriptionApi.d.ts +54 -75
- package/dist/esm/apis/SubscriptionApi.js +96 -115
- package/dist/esm/apis/VoiceUsageApi.d.ts +31 -0
- package/dist/esm/apis/VoiceUsageApi.js +69 -0
- package/dist/esm/apis/index.d.ts +2 -0
- package/dist/esm/apis/index.js +2 -0
- package/dist/esm/models/AdminGrantMinutesRequest.d.ts +38 -0
- package/dist/esm/models/AdminGrantMinutesRequest.js +45 -0
- package/dist/esm/models/AdminSetSubscriptionRequest.d.ts +86 -0
- package/dist/esm/models/AdminSetSubscriptionRequest.js +71 -0
- package/dist/esm/models/BillingPortalRequest.d.ts +1 -1
- package/dist/esm/models/BillingPortalResponse.d.ts +1 -1
- package/dist/esm/models/CancelSubscriptionRequest.d.ts +2 -2
- package/dist/esm/models/CheckoutSessionResponse.d.ts +2 -2
- package/dist/esm/models/CreateCheckoutSessionRequest.d.ts +21 -7
- package/dist/esm/models/CreateCheckoutSessionRequest.js +18 -5
- package/dist/esm/models/CurrentPeriodUsage.d.ts +59 -0
- package/dist/esm/models/CurrentPeriodUsage.js +62 -0
- package/dist/esm/models/LifecycleResponse.d.ts +50 -0
- package/dist/esm/models/LifecycleResponse.js +51 -0
- package/dist/esm/models/PauseSubscriptionRequest.d.ts +1 -1
- package/dist/esm/models/PlanCatalogEntry.d.ts +90 -0
- package/dist/esm/models/PlanCatalogEntry.js +73 -0
- package/dist/esm/models/PlanCatalogEntryOverageInner.d.ts +44 -0
- package/dist/esm/models/PlanCatalogEntryOverageInner.js +45 -0
- package/dist/esm/models/PlanCatalogPrice.d.ts +58 -0
- package/dist/esm/models/PlanCatalogPrice.js +60 -0
- package/dist/esm/models/SubscriptionPlanSummary.d.ts +83 -0
- package/dist/esm/models/SubscriptionPlanSummary.js +70 -0
- package/dist/esm/models/SubscriptionPlanSummaryOverageRate.d.ts +38 -0
- package/dist/esm/models/SubscriptionPlanSummaryOverageRate.js +43 -0
- package/dist/esm/models/SubscriptionStatus.d.ts +103 -10
- package/dist/esm/models/SubscriptionStatus.js +58 -9
- package/dist/esm/models/SubscriptionUsageSummary.d.ts +56 -0
- package/dist/esm/models/SubscriptionUsageSummary.js +57 -0
- package/dist/esm/models/UpdatePlanRequest.d.ts +13 -5
- package/dist/esm/models/UpdatePlanRequest.js +12 -3
- package/dist/esm/models/UsageBreakdownByAgent.d.ts +44 -0
- package/dist/esm/models/UsageBreakdownByAgent.js +49 -0
- package/dist/esm/models/UsageBreakdownByDay.d.ts +44 -0
- package/dist/esm/models/UsageBreakdownByDay.js +51 -0
- package/dist/esm/models/UsageHistoryResponse.d.ts +39 -0
- package/dist/esm/models/UsageHistoryResponse.js +48 -0
- package/dist/esm/models/UsageRecordDto.d.ts +80 -0
- package/dist/esm/models/UsageRecordDto.js +65 -0
- package/dist/esm/models/VoiceAgentMetadata.d.ts +6 -0
- package/dist/esm/models/VoiceAgentMetadata.js +2 -0
- package/dist/esm/models/VoiceUsageReportRequest.d.ts +62 -0
- package/dist/esm/models/VoiceUsageReportRequest.js +57 -0
- package/dist/esm/models/VoiceUsageReportResponse.d.ts +51 -0
- package/dist/esm/models/VoiceUsageReportResponse.js +52 -0
- package/dist/esm/models/index.d.ts +16 -13
- package/dist/esm/models/index.js +16 -13
- package/dist/models/AdminGrantMinutesRequest.d.ts +38 -0
- package/dist/models/AdminGrantMinutesRequest.js +52 -0
- package/dist/models/AdminSetSubscriptionRequest.d.ts +86 -0
- package/dist/models/AdminSetSubscriptionRequest.js +79 -0
- package/dist/models/BillingPortalRequest.d.ts +1 -1
- package/dist/models/BillingPortalResponse.d.ts +1 -1
- package/dist/models/CancelSubscriptionRequest.d.ts +2 -2
- package/dist/models/CheckoutSessionResponse.d.ts +2 -2
- package/dist/models/CreateCheckoutSessionRequest.d.ts +21 -7
- package/dist/models/CreateCheckoutSessionRequest.js +19 -5
- package/dist/models/CurrentPeriodUsage.d.ts +59 -0
- package/dist/models/CurrentPeriodUsage.js +69 -0
- package/dist/models/LifecycleResponse.d.ts +50 -0
- package/dist/models/LifecycleResponse.js +58 -0
- package/dist/models/PauseSubscriptionRequest.d.ts +1 -1
- package/dist/models/PlanCatalogEntry.d.ts +90 -0
- package/dist/models/PlanCatalogEntry.js +80 -0
- package/dist/models/PlanCatalogEntryOverageInner.d.ts +44 -0
- package/dist/models/PlanCatalogEntryOverageInner.js +52 -0
- package/dist/models/PlanCatalogPrice.d.ts +58 -0
- package/dist/models/PlanCatalogPrice.js +68 -0
- package/dist/models/SubscriptionPlanSummary.d.ts +83 -0
- package/dist/models/SubscriptionPlanSummary.js +77 -0
- package/dist/models/SubscriptionPlanSummaryOverageRate.d.ts +38 -0
- package/dist/models/SubscriptionPlanSummaryOverageRate.js +50 -0
- package/dist/models/SubscriptionStatus.d.ts +103 -10
- package/dist/models/SubscriptionStatus.js +59 -9
- package/dist/models/SubscriptionUsageSummary.d.ts +56 -0
- package/dist/models/SubscriptionUsageSummary.js +64 -0
- package/dist/models/UpdatePlanRequest.d.ts +13 -5
- package/dist/models/UpdatePlanRequest.js +13 -3
- package/dist/models/UsageBreakdownByAgent.d.ts +44 -0
- package/dist/models/UsageBreakdownByAgent.js +56 -0
- package/dist/models/UsageBreakdownByDay.d.ts +44 -0
- package/dist/models/UsageBreakdownByDay.js +58 -0
- package/dist/models/UsageHistoryResponse.d.ts +39 -0
- package/dist/models/UsageHistoryResponse.js +55 -0
- package/dist/models/UsageRecordDto.d.ts +80 -0
- package/dist/models/UsageRecordDto.js +72 -0
- package/dist/models/VoiceAgentMetadata.d.ts +6 -0
- package/dist/models/VoiceAgentMetadata.js +2 -0
- package/dist/models/VoiceUsageReportRequest.d.ts +62 -0
- package/dist/models/VoiceUsageReportRequest.js +64 -0
- package/dist/models/VoiceUsageReportResponse.d.ts +51 -0
- package/dist/models/VoiceUsageReportResponse.js +59 -0
- package/dist/models/index.d.ts +16 -13
- package/dist/models/index.js +16 -13
- package/package.json +1 -1
- package/src/api-client.ts +42 -6
- package/src/apis/AdminSubscriptionsApi.ts +327 -0
- package/src/apis/SubscriptionApi.ts +130 -162
- package/src/apis/VoiceUsageApi.ts +86 -0
- package/src/apis/index.ts +2 -0
- package/src/models/AdminGrantMinutesRequest.ts +74 -0
- package/src/models/AdminSetSubscriptionRequest.ts +136 -0
- package/src/models/BillingPortalRequest.ts +1 -1
- package/src/models/BillingPortalResponse.ts +1 -1
- package/src/models/CancelSubscriptionRequest.ts +2 -2
- package/src/models/CheckoutSessionResponse.ts +2 -2
- package/src/models/CreateCheckoutSessionRequest.ts +33 -12
- package/src/models/CurrentPeriodUsage.ts +124 -0
- package/src/models/LifecycleResponse.ts +91 -0
- package/src/models/PauseSubscriptionRequest.ts +1 -1
- package/src/models/PlanCatalogEntry.ts +158 -0
- package/src/models/PlanCatalogEntryOverageInner.ts +81 -0
- package/src/models/PlanCatalogPrice.ts +103 -0
- package/src/models/SubscriptionPlanSummary.ts +143 -0
- package/src/models/SubscriptionPlanSummaryOverageRate.ts +73 -0
- package/src/models/SubscriptionStatus.ts +150 -32
- package/src/models/SubscriptionUsageSummary.ts +101 -0
- package/src/models/UpdatePlanRequest.ts +20 -8
- package/src/models/UsageBreakdownByAgent.ts +83 -0
- package/src/models/UsageBreakdownByDay.ts +84 -0
- package/src/models/UsageHistoryResponse.ts +83 -0
- package/src/models/UsageRecordDto.ts +133 -0
- package/src/models/VoiceAgentMetadata.ts +8 -0
- package/src/models/VoiceUsageReportRequest.ts +108 -0
- package/src/models/VoiceUsageReportResponse.ts +99 -0
- package/src/models/index.ts +16 -13
|
@@ -13,27 +13,20 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
-
import type {
|
|
16
|
+
import type { SubscriptionPlanSummary } from './SubscriptionPlanSummary';
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} from './
|
|
23
|
-
import type {
|
|
18
|
+
SubscriptionPlanSummaryFromJSON,
|
|
19
|
+
SubscriptionPlanSummaryFromJSONTyped,
|
|
20
|
+
SubscriptionPlanSummaryToJSON,
|
|
21
|
+
SubscriptionPlanSummaryToJSONTyped,
|
|
22
|
+
} from './SubscriptionPlanSummary';
|
|
23
|
+
import type { SubscriptionUsageSummary } from './SubscriptionUsageSummary';
|
|
24
24
|
import {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
} from './
|
|
30
|
-
import type { SubscriptionStatusService } from './SubscriptionStatusService';
|
|
31
|
-
import {
|
|
32
|
-
SubscriptionStatusServiceFromJSON,
|
|
33
|
-
SubscriptionStatusServiceFromJSONTyped,
|
|
34
|
-
SubscriptionStatusServiceToJSON,
|
|
35
|
-
SubscriptionStatusServiceToJSONTyped,
|
|
36
|
-
} from './SubscriptionStatusService';
|
|
25
|
+
SubscriptionUsageSummaryFromJSON,
|
|
26
|
+
SubscriptionUsageSummaryFromJSONTyped,
|
|
27
|
+
SubscriptionUsageSummaryToJSON,
|
|
28
|
+
SubscriptionUsageSummaryToJSONTyped,
|
|
29
|
+
} from './SubscriptionUsageSummary';
|
|
37
30
|
|
|
38
31
|
/**
|
|
39
32
|
*
|
|
@@ -43,35 +36,136 @@ import {
|
|
|
43
36
|
export interface SubscriptionStatus {
|
|
44
37
|
/**
|
|
45
38
|
*
|
|
46
|
-
* @type {
|
|
39
|
+
* @type {string}
|
|
47
40
|
* @memberof SubscriptionStatus
|
|
48
41
|
*/
|
|
49
|
-
|
|
42
|
+
id?: string | null;
|
|
50
43
|
/**
|
|
51
44
|
*
|
|
52
|
-
* @type {
|
|
45
|
+
* @type {string}
|
|
53
46
|
* @memberof SubscriptionStatus
|
|
54
47
|
*/
|
|
55
|
-
|
|
48
|
+
organizationId?: string;
|
|
56
49
|
/**
|
|
57
50
|
*
|
|
58
|
-
* @type {
|
|
51
|
+
* @type {string}
|
|
59
52
|
* @memberof SubscriptionStatus
|
|
60
53
|
*/
|
|
61
|
-
|
|
54
|
+
status: SubscriptionStatusStatusEnum;
|
|
62
55
|
/**
|
|
63
|
-
*
|
|
56
|
+
*
|
|
64
57
|
* @type {boolean}
|
|
65
58
|
* @memberof SubscriptionStatus
|
|
66
59
|
*/
|
|
67
60
|
isActive: boolean;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @type {string}
|
|
64
|
+
* @memberof SubscriptionStatus
|
|
65
|
+
*/
|
|
66
|
+
billingInterval?: SubscriptionStatusBillingIntervalEnum | null;
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @memberof SubscriptionStatus
|
|
71
|
+
*/
|
|
72
|
+
currency: string;
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
* @type {Date}
|
|
76
|
+
* @memberof SubscriptionStatus
|
|
77
|
+
*/
|
|
78
|
+
currentPeriodStart?: Date | null;
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @type {Date}
|
|
82
|
+
* @memberof SubscriptionStatus
|
|
83
|
+
*/
|
|
84
|
+
currentPeriodEnd?: Date | null;
|
|
85
|
+
/**
|
|
86
|
+
*
|
|
87
|
+
* @type {boolean}
|
|
88
|
+
* @memberof SubscriptionStatus
|
|
89
|
+
*/
|
|
90
|
+
cancelAtPeriodEnd?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
*
|
|
93
|
+
* @type {Date}
|
|
94
|
+
* @memberof SubscriptionStatus
|
|
95
|
+
*/
|
|
96
|
+
cancelAt?: Date | null;
|
|
97
|
+
/**
|
|
98
|
+
*
|
|
99
|
+
* @type {Date}
|
|
100
|
+
* @memberof SubscriptionStatus
|
|
101
|
+
*/
|
|
102
|
+
canceledAt?: Date | null;
|
|
103
|
+
/**
|
|
104
|
+
*
|
|
105
|
+
* @type {Date}
|
|
106
|
+
* @memberof SubscriptionStatus
|
|
107
|
+
*/
|
|
108
|
+
trialEnd?: Date | null;
|
|
109
|
+
/**
|
|
110
|
+
*
|
|
111
|
+
* @type {string}
|
|
112
|
+
* @memberof SubscriptionStatus
|
|
113
|
+
*/
|
|
114
|
+
stripeCustomerId?: string | null;
|
|
115
|
+
/**
|
|
116
|
+
*
|
|
117
|
+
* @type {string}
|
|
118
|
+
* @memberof SubscriptionStatus
|
|
119
|
+
*/
|
|
120
|
+
stripeSubscriptionId?: string | null;
|
|
121
|
+
/**
|
|
122
|
+
*
|
|
123
|
+
* @type {SubscriptionPlanSummary}
|
|
124
|
+
* @memberof SubscriptionStatus
|
|
125
|
+
*/
|
|
126
|
+
plan: SubscriptionPlanSummary;
|
|
127
|
+
/**
|
|
128
|
+
*
|
|
129
|
+
* @type {SubscriptionUsageSummary}
|
|
130
|
+
* @memberof SubscriptionStatus
|
|
131
|
+
*/
|
|
132
|
+
usage?: SubscriptionUsageSummary;
|
|
68
133
|
}
|
|
69
134
|
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* @export
|
|
138
|
+
*/
|
|
139
|
+
export const SubscriptionStatusStatusEnum = {
|
|
140
|
+
Active: 'active',
|
|
141
|
+
PastDue: 'past_due',
|
|
142
|
+
Canceled: 'canceled',
|
|
143
|
+
Unpaid: 'unpaid',
|
|
144
|
+
Trialing: 'trialing',
|
|
145
|
+
Incomplete: 'incomplete',
|
|
146
|
+
IncompleteExpired: 'incomplete_expired',
|
|
147
|
+
Paused: 'paused'
|
|
148
|
+
} as const;
|
|
149
|
+
export type SubscriptionStatusStatusEnum = typeof SubscriptionStatusStatusEnum[keyof typeof SubscriptionStatusStatusEnum];
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* @export
|
|
153
|
+
*/
|
|
154
|
+
export const SubscriptionStatusBillingIntervalEnum = {
|
|
155
|
+
Monthly: 'monthly',
|
|
156
|
+
Yearly: 'yearly'
|
|
157
|
+
} as const;
|
|
158
|
+
export type SubscriptionStatusBillingIntervalEnum = typeof SubscriptionStatusBillingIntervalEnum[keyof typeof SubscriptionStatusBillingIntervalEnum];
|
|
159
|
+
|
|
160
|
+
|
|
70
161
|
/**
|
|
71
162
|
* Check if a given object implements the SubscriptionStatus interface.
|
|
72
163
|
*/
|
|
73
164
|
export function instanceOfSubscriptionStatus(value: object): value is SubscriptionStatus {
|
|
165
|
+
if (!('status' in value) || value['status'] === undefined) return false;
|
|
74
166
|
if (!('isActive' in value) || value['isActive'] === undefined) return false;
|
|
167
|
+
if (!('currency' in value) || value['currency'] === undefined) return false;
|
|
168
|
+
if (!('plan' in value) || value['plan'] === undefined) return false;
|
|
75
169
|
return true;
|
|
76
170
|
}
|
|
77
171
|
|
|
@@ -85,10 +179,22 @@ export function SubscriptionStatusFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
85
179
|
}
|
|
86
180
|
return {
|
|
87
181
|
|
|
88
|
-
'
|
|
89
|
-
'
|
|
90
|
-
'
|
|
182
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
183
|
+
'organizationId': json['organizationId'] == null ? undefined : json['organizationId'],
|
|
184
|
+
'status': json['status'],
|
|
91
185
|
'isActive': json['isActive'],
|
|
186
|
+
'billingInterval': json['billingInterval'] == null ? undefined : json['billingInterval'],
|
|
187
|
+
'currency': json['currency'],
|
|
188
|
+
'currentPeriodStart': json['currentPeriodStart'] == null ? undefined : (new Date(json['currentPeriodStart'])),
|
|
189
|
+
'currentPeriodEnd': json['currentPeriodEnd'] == null ? undefined : (new Date(json['currentPeriodEnd'])),
|
|
190
|
+
'cancelAtPeriodEnd': json['cancelAtPeriodEnd'] == null ? undefined : json['cancelAtPeriodEnd'],
|
|
191
|
+
'cancelAt': json['cancelAt'] == null ? undefined : (new Date(json['cancelAt'])),
|
|
192
|
+
'canceledAt': json['canceledAt'] == null ? undefined : (new Date(json['canceledAt'])),
|
|
193
|
+
'trialEnd': json['trialEnd'] == null ? undefined : (new Date(json['trialEnd'])),
|
|
194
|
+
'stripeCustomerId': json['stripeCustomerId'] == null ? undefined : json['stripeCustomerId'],
|
|
195
|
+
'stripeSubscriptionId': json['stripeSubscriptionId'] == null ? undefined : json['stripeSubscriptionId'],
|
|
196
|
+
'plan': SubscriptionPlanSummaryFromJSON(json['plan']),
|
|
197
|
+
'usage': json['usage'] == null ? undefined : SubscriptionUsageSummaryFromJSON(json['usage']),
|
|
92
198
|
};
|
|
93
199
|
}
|
|
94
200
|
|
|
@@ -103,10 +209,22 @@ export function SubscriptionStatusToJSONTyped(value?: SubscriptionStatus | null,
|
|
|
103
209
|
|
|
104
210
|
return {
|
|
105
211
|
|
|
106
|
-
'
|
|
107
|
-
'
|
|
108
|
-
'
|
|
212
|
+
'id': value['id'],
|
|
213
|
+
'organizationId': value['organizationId'],
|
|
214
|
+
'status': value['status'],
|
|
109
215
|
'isActive': value['isActive'],
|
|
216
|
+
'billingInterval': value['billingInterval'],
|
|
217
|
+
'currency': value['currency'],
|
|
218
|
+
'currentPeriodStart': value['currentPeriodStart'] == null ? value['currentPeriodStart'] : value['currentPeriodStart'].toISOString(),
|
|
219
|
+
'currentPeriodEnd': value['currentPeriodEnd'] == null ? value['currentPeriodEnd'] : value['currentPeriodEnd'].toISOString(),
|
|
220
|
+
'cancelAtPeriodEnd': value['cancelAtPeriodEnd'],
|
|
221
|
+
'cancelAt': value['cancelAt'] == null ? value['cancelAt'] : value['cancelAt'].toISOString(),
|
|
222
|
+
'canceledAt': value['canceledAt'] == null ? value['canceledAt'] : value['canceledAt'].toISOString(),
|
|
223
|
+
'trialEnd': value['trialEnd'] == null ? value['trialEnd'] : value['trialEnd'].toISOString(),
|
|
224
|
+
'stripeCustomerId': value['stripeCustomerId'],
|
|
225
|
+
'stripeSubscriptionId': value['stripeSubscriptionId'],
|
|
226
|
+
'plan': SubscriptionPlanSummaryToJSON(value['plan']),
|
|
227
|
+
'usage': SubscriptionUsageSummaryToJSON(value['usage']),
|
|
110
228
|
};
|
|
111
229
|
}
|
|
112
230
|
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Tivadar AI Backend API
|
|
5
|
+
* Unified REST API for Tivadar AI Voice Agents platform
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
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
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface SubscriptionUsageSummary
|
|
20
|
+
*/
|
|
21
|
+
export interface SubscriptionUsageSummary {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof SubscriptionUsageSummary
|
|
26
|
+
*/
|
|
27
|
+
includedMinutes: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof SubscriptionUsageSummary
|
|
32
|
+
*/
|
|
33
|
+
usedSeconds: number;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof SubscriptionUsageSummary
|
|
38
|
+
*/
|
|
39
|
+
usedMinutes: number;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof SubscriptionUsageSummary
|
|
44
|
+
*/
|
|
45
|
+
overageMinutes: number;
|
|
46
|
+
/**
|
|
47
|
+
* max(0, includedMinutes - usedMinutes)
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof SubscriptionUsageSummary
|
|
50
|
+
*/
|
|
51
|
+
remainingMinutes?: number;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Check if a given object implements the SubscriptionUsageSummary interface.
|
|
56
|
+
*/
|
|
57
|
+
export function instanceOfSubscriptionUsageSummary(value: object): value is SubscriptionUsageSummary {
|
|
58
|
+
if (!('includedMinutes' in value) || value['includedMinutes'] === undefined) return false;
|
|
59
|
+
if (!('usedSeconds' in value) || value['usedSeconds'] === undefined) return false;
|
|
60
|
+
if (!('usedMinutes' in value) || value['usedMinutes'] === undefined) return false;
|
|
61
|
+
if (!('overageMinutes' in value) || value['overageMinutes'] === undefined) return false;
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function SubscriptionUsageSummaryFromJSON(json: any): SubscriptionUsageSummary {
|
|
66
|
+
return SubscriptionUsageSummaryFromJSONTyped(json, false);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function SubscriptionUsageSummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubscriptionUsageSummary {
|
|
70
|
+
if (json == null) {
|
|
71
|
+
return json;
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
|
|
75
|
+
'includedMinutes': json['includedMinutes'],
|
|
76
|
+
'usedSeconds': json['usedSeconds'],
|
|
77
|
+
'usedMinutes': json['usedMinutes'],
|
|
78
|
+
'overageMinutes': json['overageMinutes'],
|
|
79
|
+
'remainingMinutes': json['remainingMinutes'] == null ? undefined : json['remainingMinutes'],
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function SubscriptionUsageSummaryToJSON(json: any): SubscriptionUsageSummary {
|
|
84
|
+
return SubscriptionUsageSummaryToJSONTyped(json, false);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function SubscriptionUsageSummaryToJSONTyped(value?: SubscriptionUsageSummary | null, ignoreDiscriminator: boolean = false): any {
|
|
88
|
+
if (value == null) {
|
|
89
|
+
return value;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
return {
|
|
93
|
+
|
|
94
|
+
'includedMinutes': value['includedMinutes'],
|
|
95
|
+
'usedSeconds': value['usedSeconds'],
|
|
96
|
+
'usedMinutes': value['usedMinutes'],
|
|
97
|
+
'overageMinutes': value['overageMinutes'],
|
|
98
|
+
'remainingMinutes': value['remainingMinutes'],
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
|
|
@@ -20,29 +20,41 @@ import { mapValues } from '../runtime';
|
|
|
20
20
|
*/
|
|
21
21
|
export interface UpdatePlanRequest {
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
*
|
|
24
24
|
* @type {string}
|
|
25
25
|
* @memberof UpdatePlanRequest
|
|
26
26
|
*/
|
|
27
|
-
planSlug
|
|
27
|
+
planSlug: string;
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
*
|
|
30
30
|
* @type {string}
|
|
31
31
|
* @memberof UpdatePlanRequest
|
|
32
32
|
*/
|
|
33
|
-
|
|
33
|
+
interval?: UpdatePlanRequestIntervalEnum;
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
*
|
|
36
36
|
* @type {boolean}
|
|
37
37
|
* @memberof UpdatePlanRequest
|
|
38
38
|
*/
|
|
39
39
|
prorate?: boolean;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @export
|
|
45
|
+
*/
|
|
46
|
+
export const UpdatePlanRequestIntervalEnum = {
|
|
47
|
+
Monthly: 'monthly',
|
|
48
|
+
Yearly: 'yearly'
|
|
49
|
+
} as const;
|
|
50
|
+
export type UpdatePlanRequestIntervalEnum = typeof UpdatePlanRequestIntervalEnum[keyof typeof UpdatePlanRequestIntervalEnum];
|
|
51
|
+
|
|
52
|
+
|
|
42
53
|
/**
|
|
43
54
|
* Check if a given object implements the UpdatePlanRequest interface.
|
|
44
55
|
*/
|
|
45
56
|
export function instanceOfUpdatePlanRequest(value: object): value is UpdatePlanRequest {
|
|
57
|
+
if (!('planSlug' in value) || value['planSlug'] === undefined) return false;
|
|
46
58
|
return true;
|
|
47
59
|
}
|
|
48
60
|
|
|
@@ -56,8 +68,8 @@ export function UpdatePlanRequestFromJSONTyped(json: any, ignoreDiscriminator: b
|
|
|
56
68
|
}
|
|
57
69
|
return {
|
|
58
70
|
|
|
59
|
-
'planSlug': json['planSlug']
|
|
60
|
-
'
|
|
71
|
+
'planSlug': json['planSlug'],
|
|
72
|
+
'interval': json['interval'] == null ? undefined : json['interval'],
|
|
61
73
|
'prorate': json['prorate'] == null ? undefined : json['prorate'],
|
|
62
74
|
};
|
|
63
75
|
}
|
|
@@ -74,7 +86,7 @@ export function UpdatePlanRequestToJSONTyped(value?: UpdatePlanRequest | null, i
|
|
|
74
86
|
return {
|
|
75
87
|
|
|
76
88
|
'planSlug': value['planSlug'],
|
|
77
|
-
'
|
|
89
|
+
'interval': value['interval'],
|
|
78
90
|
'prorate': value['prorate'],
|
|
79
91
|
};
|
|
80
92
|
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Tivadar AI Backend API
|
|
5
|
+
* Unified REST API for Tivadar AI Voice Agents platform
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
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
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface UsageBreakdownByAgent
|
|
20
|
+
*/
|
|
21
|
+
export interface UsageBreakdownByAgent {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof UsageBreakdownByAgent
|
|
26
|
+
*/
|
|
27
|
+
voiceAgentId?: string | null;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof UsageBreakdownByAgent
|
|
32
|
+
*/
|
|
33
|
+
seconds: number;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof UsageBreakdownByAgent
|
|
38
|
+
*/
|
|
39
|
+
overageMinutes: number;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the UsageBreakdownByAgent interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfUsageBreakdownByAgent(value: object): value is UsageBreakdownByAgent {
|
|
46
|
+
if (!('seconds' in value) || value['seconds'] === undefined) return false;
|
|
47
|
+
if (!('overageMinutes' in value) || value['overageMinutes'] === undefined) return false;
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function UsageBreakdownByAgentFromJSON(json: any): UsageBreakdownByAgent {
|
|
52
|
+
return UsageBreakdownByAgentFromJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function UsageBreakdownByAgentFromJSONTyped(json: any, ignoreDiscriminator: boolean): UsageBreakdownByAgent {
|
|
56
|
+
if (json == null) {
|
|
57
|
+
return json;
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
|
|
61
|
+
'voiceAgentId': json['voiceAgentId'] == null ? undefined : json['voiceAgentId'],
|
|
62
|
+
'seconds': json['seconds'],
|
|
63
|
+
'overageMinutes': json['overageMinutes'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function UsageBreakdownByAgentToJSON(json: any): UsageBreakdownByAgent {
|
|
68
|
+
return UsageBreakdownByAgentToJSONTyped(json, false);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function UsageBreakdownByAgentToJSONTyped(value?: UsageBreakdownByAgent | null, ignoreDiscriminator: boolean = false): any {
|
|
72
|
+
if (value == null) {
|
|
73
|
+
return value;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return {
|
|
77
|
+
|
|
78
|
+
'voiceAgentId': value['voiceAgentId'],
|
|
79
|
+
'seconds': value['seconds'],
|
|
80
|
+
'overageMinutes': value['overageMinutes'],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Tivadar AI Backend API
|
|
5
|
+
* Unified REST API for Tivadar AI Voice Agents platform
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
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
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface UsageBreakdownByDay
|
|
20
|
+
*/
|
|
21
|
+
export interface UsageBreakdownByDay {
|
|
22
|
+
/**
|
|
23
|
+
* YYYY-MM-DD
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof UsageBreakdownByDay
|
|
26
|
+
*/
|
|
27
|
+
day: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof UsageBreakdownByDay
|
|
32
|
+
*/
|
|
33
|
+
seconds: number;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof UsageBreakdownByDay
|
|
38
|
+
*/
|
|
39
|
+
overageMinutes: number;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the UsageBreakdownByDay interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfUsageBreakdownByDay(value: object): value is UsageBreakdownByDay {
|
|
46
|
+
if (!('day' in value) || value['day'] === undefined) return false;
|
|
47
|
+
if (!('seconds' in value) || value['seconds'] === undefined) return false;
|
|
48
|
+
if (!('overageMinutes' in value) || value['overageMinutes'] === undefined) return false;
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function UsageBreakdownByDayFromJSON(json: any): UsageBreakdownByDay {
|
|
53
|
+
return UsageBreakdownByDayFromJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function UsageBreakdownByDayFromJSONTyped(json: any, ignoreDiscriminator: boolean): UsageBreakdownByDay {
|
|
57
|
+
if (json == null) {
|
|
58
|
+
return json;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
|
|
62
|
+
'day': json['day'],
|
|
63
|
+
'seconds': json['seconds'],
|
|
64
|
+
'overageMinutes': json['overageMinutes'],
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function UsageBreakdownByDayToJSON(json: any): UsageBreakdownByDay {
|
|
69
|
+
return UsageBreakdownByDayToJSONTyped(json, false);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function UsageBreakdownByDayToJSONTyped(value?: UsageBreakdownByDay | null, ignoreDiscriminator: boolean = false): any {
|
|
73
|
+
if (value == null) {
|
|
74
|
+
return value;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return {
|
|
78
|
+
|
|
79
|
+
'day': value['day'],
|
|
80
|
+
'seconds': value['seconds'],
|
|
81
|
+
'overageMinutes': value['overageMinutes'],
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Tivadar AI Backend API
|
|
5
|
+
* Unified REST API for Tivadar AI Voice Agents platform
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
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
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { UsageRecordDto } from './UsageRecordDto';
|
|
17
|
+
import {
|
|
18
|
+
UsageRecordDtoFromJSON,
|
|
19
|
+
UsageRecordDtoFromJSONTyped,
|
|
20
|
+
UsageRecordDtoToJSON,
|
|
21
|
+
UsageRecordDtoToJSONTyped,
|
|
22
|
+
} from './UsageRecordDto';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface UsageHistoryResponse
|
|
28
|
+
*/
|
|
29
|
+
export interface UsageHistoryResponse {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {Array<UsageRecordDto>}
|
|
33
|
+
* @memberof UsageHistoryResponse
|
|
34
|
+
*/
|
|
35
|
+
items: Array<UsageRecordDto>;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof UsageHistoryResponse
|
|
40
|
+
*/
|
|
41
|
+
total: number;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Check if a given object implements the UsageHistoryResponse interface.
|
|
46
|
+
*/
|
|
47
|
+
export function instanceOfUsageHistoryResponse(value: object): value is UsageHistoryResponse {
|
|
48
|
+
if (!('items' in value) || value['items'] === undefined) return false;
|
|
49
|
+
if (!('total' in value) || value['total'] === undefined) return false;
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function UsageHistoryResponseFromJSON(json: any): UsageHistoryResponse {
|
|
54
|
+
return UsageHistoryResponseFromJSONTyped(json, false);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function UsageHistoryResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): UsageHistoryResponse {
|
|
58
|
+
if (json == null) {
|
|
59
|
+
return json;
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'items': ((json['items'] as Array<any>).map(UsageRecordDtoFromJSON)),
|
|
64
|
+
'total': json['total'],
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function UsageHistoryResponseToJSON(json: any): UsageHistoryResponse {
|
|
69
|
+
return UsageHistoryResponseToJSONTyped(json, false);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function UsageHistoryResponseToJSONTyped(value?: UsageHistoryResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
73
|
+
if (value == null) {
|
|
74
|
+
return value;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return {
|
|
78
|
+
|
|
79
|
+
'items': ((value['items'] as Array<any>).map(UsageRecordDtoToJSON)),
|
|
80
|
+
'total': value['total'],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|