@l7mp/tivadar-ai-api-sdk 0.2.10 → 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/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/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/VoiceUsageReportRequest.ts +108 -0
- package/src/models/VoiceUsageReportResponse.ts +99 -0
- package/src/models/index.ts +16 -13
|
@@ -21,14 +21,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { BillingPortalRequestToJSON, BillingPortalResponseFromJSON, CancelSubscriptionRequestToJSON,
|
|
24
|
+
import { BillingPortalRequestToJSON, BillingPortalResponseFromJSON, CancelSubscriptionRequestToJSON, CheckoutSessionResponseFromJSON, CreateCheckoutSessionRequestToJSON, CurrentPeriodUsageFromJSON, PauseSubscriptionRequestToJSON, PlanCatalogEntryFromJSON, SubscriptionStatusFromJSON, UpdatePlanRequestToJSON, UsageHistoryResponseFromJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
28
28
|
export class SubscriptionApi extends runtime.BaseAPI {
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
31
|
-
* Create billing portal session
|
|
30
|
+
* Create a Stripe billing portal session
|
|
32
31
|
*/
|
|
33
32
|
organizationsOrganizationIdSubscriptionBillingPortalPostRaw(requestParameters, initOverrides) {
|
|
34
33
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -61,8 +60,7 @@ export class SubscriptionApi extends runtime.BaseAPI {
|
|
|
61
60
|
});
|
|
62
61
|
}
|
|
63
62
|
/**
|
|
64
|
-
*
|
|
65
|
-
* Create billing portal session
|
|
63
|
+
* Create a Stripe billing portal session
|
|
66
64
|
*/
|
|
67
65
|
organizationsOrganizationIdSubscriptionBillingPortalPost(requestParameters, initOverrides) {
|
|
68
66
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -71,8 +69,7 @@ export class SubscriptionApi extends runtime.BaseAPI {
|
|
|
71
69
|
});
|
|
72
70
|
}
|
|
73
71
|
/**
|
|
74
|
-
*
|
|
75
|
-
* Cancel subscription
|
|
72
|
+
* Cancel the subscription (at period end by default)
|
|
76
73
|
*/
|
|
77
74
|
organizationsOrganizationIdSubscriptionCancelPostRaw(requestParameters, initOverrides) {
|
|
78
75
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -98,12 +95,11 @@ export class SubscriptionApi extends runtime.BaseAPI {
|
|
|
98
95
|
query: queryParameters,
|
|
99
96
|
body: CancelSubscriptionRequestToJSON(requestParameters['cancelSubscriptionRequest']),
|
|
100
97
|
}, initOverrides);
|
|
101
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
98
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SubscriptionStatusFromJSON(jsonValue));
|
|
102
99
|
});
|
|
103
100
|
}
|
|
104
101
|
/**
|
|
105
|
-
*
|
|
106
|
-
* Cancel subscription
|
|
102
|
+
* Cancel the subscription (at period end by default)
|
|
107
103
|
*/
|
|
108
104
|
organizationsOrganizationIdSubscriptionCancelPost(requestParameters, initOverrides) {
|
|
109
105
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -112,8 +108,7 @@ export class SubscriptionApi extends runtime.BaseAPI {
|
|
|
112
108
|
});
|
|
113
109
|
}
|
|
114
110
|
/**
|
|
115
|
-
*
|
|
116
|
-
* Create a checkout session for subscription
|
|
111
|
+
* Create a Stripe Checkout session
|
|
117
112
|
*/
|
|
118
113
|
organizationsOrganizationIdSubscriptionCheckoutPostRaw(requestParameters, initOverrides) {
|
|
119
114
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -146,8 +141,7 @@ export class SubscriptionApi extends runtime.BaseAPI {
|
|
|
146
141
|
});
|
|
147
142
|
}
|
|
148
143
|
/**
|
|
149
|
-
*
|
|
150
|
-
* Create a checkout session for subscription
|
|
144
|
+
* Create a Stripe Checkout session
|
|
151
145
|
*/
|
|
152
146
|
organizationsOrganizationIdSubscriptionCheckoutPost(requestParameters, initOverrides) {
|
|
153
147
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -156,13 +150,12 @@ export class SubscriptionApi extends runtime.BaseAPI {
|
|
|
156
150
|
});
|
|
157
151
|
}
|
|
158
152
|
/**
|
|
159
|
-
*
|
|
160
|
-
* Get credit balances for an organization
|
|
153
|
+
* Get subscription status with current-period usage
|
|
161
154
|
*/
|
|
162
|
-
|
|
155
|
+
organizationsOrganizationIdSubscriptionGetRaw(requestParameters, initOverrides) {
|
|
163
156
|
return __awaiter(this, void 0, void 0, function* () {
|
|
164
157
|
if (requestParameters['organizationId'] == null) {
|
|
165
|
-
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling
|
|
158
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdSubscriptionGet().');
|
|
166
159
|
}
|
|
167
160
|
const queryParameters = {};
|
|
168
161
|
const headerParameters = {};
|
|
@@ -173,7 +166,7 @@ export class SubscriptionApi extends runtime.BaseAPI {
|
|
|
173
166
|
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
174
167
|
}
|
|
175
168
|
}
|
|
176
|
-
let urlPath = `/organizations/{organizationId}/subscription
|
|
169
|
+
let urlPath = `/organizations/{organizationId}/subscription`;
|
|
177
170
|
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
178
171
|
const response = yield this.request({
|
|
179
172
|
path: urlPath,
|
|
@@ -181,39 +174,29 @@ export class SubscriptionApi extends runtime.BaseAPI {
|
|
|
181
174
|
headers: headerParameters,
|
|
182
175
|
query: queryParameters,
|
|
183
176
|
}, initOverrides);
|
|
184
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue
|
|
177
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SubscriptionStatusFromJSON(jsonValue));
|
|
185
178
|
});
|
|
186
179
|
}
|
|
187
180
|
/**
|
|
188
|
-
*
|
|
189
|
-
* Get credit balances for an organization
|
|
181
|
+
* Get subscription status with current-period usage
|
|
190
182
|
*/
|
|
191
|
-
|
|
183
|
+
organizationsOrganizationIdSubscriptionGet(requestParameters, initOverrides) {
|
|
192
184
|
return __awaiter(this, void 0, void 0, function* () {
|
|
193
|
-
const response = yield this.
|
|
185
|
+
const response = yield this.organizationsOrganizationIdSubscriptionGetRaw(requestParameters, initOverrides);
|
|
194
186
|
return yield response.value();
|
|
195
187
|
});
|
|
196
188
|
}
|
|
197
189
|
/**
|
|
198
|
-
*
|
|
199
|
-
* Get credit transaction history
|
|
190
|
+
* Pause payment collection
|
|
200
191
|
*/
|
|
201
|
-
|
|
192
|
+
organizationsOrganizationIdSubscriptionPausePostRaw(requestParameters, initOverrides) {
|
|
202
193
|
return __awaiter(this, void 0, void 0, function* () {
|
|
203
194
|
if (requestParameters['organizationId'] == null) {
|
|
204
|
-
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling
|
|
195
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdSubscriptionPausePost().');
|
|
205
196
|
}
|
|
206
197
|
const queryParameters = {};
|
|
207
|
-
if (requestParameters['creditType'] != null) {
|
|
208
|
-
queryParameters['credit_type'] = requestParameters['creditType'];
|
|
209
|
-
}
|
|
210
|
-
if (requestParameters['limit'] != null) {
|
|
211
|
-
queryParameters['limit'] = requestParameters['limit'];
|
|
212
|
-
}
|
|
213
|
-
if (requestParameters['offset'] != null) {
|
|
214
|
-
queryParameters['offset'] = requestParameters['offset'];
|
|
215
|
-
}
|
|
216
198
|
const headerParameters = {};
|
|
199
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
217
200
|
if (this.configuration && this.configuration.accessToken) {
|
|
218
201
|
const token = this.configuration.accessToken;
|
|
219
202
|
const tokenString = yield token("bearerAuth", []);
|
|
@@ -221,38 +204,41 @@ export class SubscriptionApi extends runtime.BaseAPI {
|
|
|
221
204
|
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
222
205
|
}
|
|
223
206
|
}
|
|
224
|
-
let urlPath = `/organizations/{organizationId}/subscription/
|
|
207
|
+
let urlPath = `/organizations/{organizationId}/subscription/pause`;
|
|
225
208
|
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
226
209
|
const response = yield this.request({
|
|
227
210
|
path: urlPath,
|
|
228
|
-
method: '
|
|
211
|
+
method: 'POST',
|
|
229
212
|
headers: headerParameters,
|
|
230
213
|
query: queryParameters,
|
|
214
|
+
body: PauseSubscriptionRequestToJSON(requestParameters['pauseSubscriptionRequest']),
|
|
231
215
|
}, initOverrides);
|
|
232
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
216
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SubscriptionStatusFromJSON(jsonValue));
|
|
233
217
|
});
|
|
234
218
|
}
|
|
235
219
|
/**
|
|
236
|
-
*
|
|
237
|
-
* Get credit transaction history
|
|
220
|
+
* Pause payment collection
|
|
238
221
|
*/
|
|
239
|
-
|
|
222
|
+
organizationsOrganizationIdSubscriptionPausePost(requestParameters, initOverrides) {
|
|
240
223
|
return __awaiter(this, void 0, void 0, function* () {
|
|
241
|
-
const response = yield this.
|
|
224
|
+
const response = yield this.organizationsOrganizationIdSubscriptionPausePostRaw(requestParameters, initOverrides);
|
|
242
225
|
return yield response.value();
|
|
243
226
|
});
|
|
244
227
|
}
|
|
245
228
|
/**
|
|
246
|
-
*
|
|
247
|
-
* Get detailed subscription information
|
|
229
|
+
* Change subscription plan
|
|
248
230
|
*/
|
|
249
|
-
|
|
231
|
+
organizationsOrganizationIdSubscriptionPlanPatchRaw(requestParameters, initOverrides) {
|
|
250
232
|
return __awaiter(this, void 0, void 0, function* () {
|
|
251
233
|
if (requestParameters['organizationId'] == null) {
|
|
252
|
-
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling
|
|
234
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdSubscriptionPlanPatch().');
|
|
235
|
+
}
|
|
236
|
+
if (requestParameters['updatePlanRequest'] == null) {
|
|
237
|
+
throw new runtime.RequiredError('updatePlanRequest', 'Required parameter "updatePlanRequest" was null or undefined when calling organizationsOrganizationIdSubscriptionPlanPatch().');
|
|
253
238
|
}
|
|
254
239
|
const queryParameters = {};
|
|
255
240
|
const headerParameters = {};
|
|
241
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
256
242
|
if (this.configuration && this.configuration.accessToken) {
|
|
257
243
|
const token = this.configuration.accessToken;
|
|
258
244
|
const tokenString = yield token("bearerAuth", []);
|
|
@@ -260,35 +246,34 @@ export class SubscriptionApi extends runtime.BaseAPI {
|
|
|
260
246
|
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
261
247
|
}
|
|
262
248
|
}
|
|
263
|
-
let urlPath = `/organizations/{organizationId}/subscription/
|
|
249
|
+
let urlPath = `/organizations/{organizationId}/subscription/plan`;
|
|
264
250
|
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
265
251
|
const response = yield this.request({
|
|
266
252
|
path: urlPath,
|
|
267
|
-
method: '
|
|
253
|
+
method: 'PATCH',
|
|
268
254
|
headers: headerParameters,
|
|
269
255
|
query: queryParameters,
|
|
256
|
+
body: UpdatePlanRequestToJSON(requestParameters['updatePlanRequest']),
|
|
270
257
|
}, initOverrides);
|
|
271
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
258
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SubscriptionStatusFromJSON(jsonValue));
|
|
272
259
|
});
|
|
273
260
|
}
|
|
274
261
|
/**
|
|
275
|
-
*
|
|
276
|
-
* Get detailed subscription information
|
|
262
|
+
* Change subscription plan
|
|
277
263
|
*/
|
|
278
|
-
|
|
264
|
+
organizationsOrganizationIdSubscriptionPlanPatch(requestParameters, initOverrides) {
|
|
279
265
|
return __awaiter(this, void 0, void 0, function* () {
|
|
280
|
-
const response = yield this.
|
|
266
|
+
const response = yield this.organizationsOrganizationIdSubscriptionPlanPatchRaw(requestParameters, initOverrides);
|
|
281
267
|
return yield response.value();
|
|
282
268
|
});
|
|
283
269
|
}
|
|
284
270
|
/**
|
|
285
|
-
*
|
|
286
|
-
* Check subscription status for an organization
|
|
271
|
+
* List available plans and their prices
|
|
287
272
|
*/
|
|
288
|
-
|
|
273
|
+
organizationsOrganizationIdSubscriptionPlansGetRaw(requestParameters, initOverrides) {
|
|
289
274
|
return __awaiter(this, void 0, void 0, function* () {
|
|
290
275
|
if (requestParameters['organizationId'] == null) {
|
|
291
|
-
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling
|
|
276
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdSubscriptionPlansGet().');
|
|
292
277
|
}
|
|
293
278
|
const queryParameters = {};
|
|
294
279
|
const headerParameters = {};
|
|
@@ -299,7 +284,7 @@ export class SubscriptionApi extends runtime.BaseAPI {
|
|
|
299
284
|
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
300
285
|
}
|
|
301
286
|
}
|
|
302
|
-
let urlPath = `/organizations/{organizationId}/subscription`;
|
|
287
|
+
let urlPath = `/organizations/{organizationId}/subscription/plans`;
|
|
303
288
|
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
304
289
|
const response = yield this.request({
|
|
305
290
|
path: urlPath,
|
|
@@ -307,31 +292,28 @@ export class SubscriptionApi extends runtime.BaseAPI {
|
|
|
307
292
|
headers: headerParameters,
|
|
308
293
|
query: queryParameters,
|
|
309
294
|
}, initOverrides);
|
|
310
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
295
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PlanCatalogEntryFromJSON));
|
|
311
296
|
});
|
|
312
297
|
}
|
|
313
298
|
/**
|
|
314
|
-
*
|
|
315
|
-
* Check subscription status for an organization
|
|
299
|
+
* List available plans and their prices
|
|
316
300
|
*/
|
|
317
|
-
|
|
301
|
+
organizationsOrganizationIdSubscriptionPlansGet(requestParameters, initOverrides) {
|
|
318
302
|
return __awaiter(this, void 0, void 0, function* () {
|
|
319
|
-
const response = yield this.
|
|
303
|
+
const response = yield this.organizationsOrganizationIdSubscriptionPlansGetRaw(requestParameters, initOverrides);
|
|
320
304
|
return yield response.value();
|
|
321
305
|
});
|
|
322
306
|
}
|
|
323
307
|
/**
|
|
324
|
-
*
|
|
325
|
-
* Pause subscription
|
|
308
|
+
* Resume a subscription scheduled for cancellation
|
|
326
309
|
*/
|
|
327
|
-
|
|
310
|
+
organizationsOrganizationIdSubscriptionResumePostRaw(requestParameters, initOverrides) {
|
|
328
311
|
return __awaiter(this, void 0, void 0, function* () {
|
|
329
312
|
if (requestParameters['organizationId'] == null) {
|
|
330
|
-
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling
|
|
313
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdSubscriptionResumePost().');
|
|
331
314
|
}
|
|
332
315
|
const queryParameters = {};
|
|
333
316
|
const headerParameters = {};
|
|
334
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
335
317
|
if (this.configuration && this.configuration.accessToken) {
|
|
336
318
|
const token = this.configuration.accessToken;
|
|
337
319
|
const tokenString = yield token("bearerAuth", []);
|
|
@@ -339,43 +321,36 @@ export class SubscriptionApi extends runtime.BaseAPI {
|
|
|
339
321
|
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
340
322
|
}
|
|
341
323
|
}
|
|
342
|
-
let urlPath = `/organizations/{organizationId}/subscription/
|
|
324
|
+
let urlPath = `/organizations/{organizationId}/subscription/resume`;
|
|
343
325
|
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
344
326
|
const response = yield this.request({
|
|
345
327
|
path: urlPath,
|
|
346
328
|
method: 'POST',
|
|
347
329
|
headers: headerParameters,
|
|
348
330
|
query: queryParameters,
|
|
349
|
-
body: PauseSubscriptionRequestToJSON(requestParameters['pauseSubscriptionRequest']),
|
|
350
331
|
}, initOverrides);
|
|
351
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
332
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SubscriptionStatusFromJSON(jsonValue));
|
|
352
333
|
});
|
|
353
334
|
}
|
|
354
335
|
/**
|
|
355
|
-
*
|
|
356
|
-
* Pause subscription
|
|
336
|
+
* Resume a subscription scheduled for cancellation
|
|
357
337
|
*/
|
|
358
|
-
|
|
338
|
+
organizationsOrganizationIdSubscriptionResumePost(requestParameters, initOverrides) {
|
|
359
339
|
return __awaiter(this, void 0, void 0, function* () {
|
|
360
|
-
const response = yield this.
|
|
340
|
+
const response = yield this.organizationsOrganizationIdSubscriptionResumePostRaw(requestParameters, initOverrides);
|
|
361
341
|
return yield response.value();
|
|
362
342
|
});
|
|
363
343
|
}
|
|
364
344
|
/**
|
|
365
|
-
*
|
|
366
|
-
* Update subscription plan
|
|
345
|
+
* Resume payment collection
|
|
367
346
|
*/
|
|
368
|
-
|
|
347
|
+
organizationsOrganizationIdSubscriptionUnpausePostRaw(requestParameters, initOverrides) {
|
|
369
348
|
return __awaiter(this, void 0, void 0, function* () {
|
|
370
349
|
if (requestParameters['organizationId'] == null) {
|
|
371
|
-
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling
|
|
372
|
-
}
|
|
373
|
-
if (requestParameters['updatePlanRequest'] == null) {
|
|
374
|
-
throw new runtime.RequiredError('updatePlanRequest', 'Required parameter "updatePlanRequest" was null or undefined when calling organizationsOrganizationIdSubscriptionPlanPatch().');
|
|
350
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdSubscriptionUnpausePost().');
|
|
375
351
|
}
|
|
376
352
|
const queryParameters = {};
|
|
377
353
|
const headerParameters = {};
|
|
378
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
379
354
|
if (this.configuration && this.configuration.accessToken) {
|
|
380
355
|
const token = this.configuration.accessToken;
|
|
381
356
|
const tokenString = yield token("bearerAuth", []);
|
|
@@ -383,36 +358,33 @@ export class SubscriptionApi extends runtime.BaseAPI {
|
|
|
383
358
|
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
384
359
|
}
|
|
385
360
|
}
|
|
386
|
-
let urlPath = `/organizations/{organizationId}/subscription/
|
|
361
|
+
let urlPath = `/organizations/{organizationId}/subscription/unpause`;
|
|
387
362
|
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
388
363
|
const response = yield this.request({
|
|
389
364
|
path: urlPath,
|
|
390
|
-
method: '
|
|
365
|
+
method: 'POST',
|
|
391
366
|
headers: headerParameters,
|
|
392
367
|
query: queryParameters,
|
|
393
|
-
body: UpdatePlanRequestToJSON(requestParameters['updatePlanRequest']),
|
|
394
368
|
}, initOverrides);
|
|
395
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
369
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SubscriptionStatusFromJSON(jsonValue));
|
|
396
370
|
});
|
|
397
371
|
}
|
|
398
372
|
/**
|
|
399
|
-
*
|
|
400
|
-
* Update subscription plan
|
|
373
|
+
* Resume payment collection
|
|
401
374
|
*/
|
|
402
|
-
|
|
375
|
+
organizationsOrganizationIdSubscriptionUnpausePost(requestParameters, initOverrides) {
|
|
403
376
|
return __awaiter(this, void 0, void 0, function* () {
|
|
404
|
-
const response = yield this.
|
|
377
|
+
const response = yield this.organizationsOrganizationIdSubscriptionUnpausePostRaw(requestParameters, initOverrides);
|
|
405
378
|
return yield response.value();
|
|
406
379
|
});
|
|
407
380
|
}
|
|
408
381
|
/**
|
|
409
|
-
*
|
|
410
|
-
* Resume subscription
|
|
382
|
+
* Get current-period voice usage breakdown
|
|
411
383
|
*/
|
|
412
|
-
|
|
384
|
+
organizationsOrganizationIdSubscriptionUsageGetRaw(requestParameters, initOverrides) {
|
|
413
385
|
return __awaiter(this, void 0, void 0, function* () {
|
|
414
386
|
if (requestParameters['organizationId'] == null) {
|
|
415
|
-
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling
|
|
387
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdSubscriptionUsageGet().');
|
|
416
388
|
}
|
|
417
389
|
const queryParameters = {};
|
|
418
390
|
const headerParameters = {};
|
|
@@ -423,37 +395,47 @@ export class SubscriptionApi extends runtime.BaseAPI {
|
|
|
423
395
|
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
424
396
|
}
|
|
425
397
|
}
|
|
426
|
-
let urlPath = `/organizations/{organizationId}/subscription/
|
|
398
|
+
let urlPath = `/organizations/{organizationId}/subscription/usage`;
|
|
427
399
|
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
428
400
|
const response = yield this.request({
|
|
429
401
|
path: urlPath,
|
|
430
|
-
method: '
|
|
402
|
+
method: 'GET',
|
|
431
403
|
headers: headerParameters,
|
|
432
404
|
query: queryParameters,
|
|
433
405
|
}, initOverrides);
|
|
434
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
406
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CurrentPeriodUsageFromJSON(jsonValue));
|
|
435
407
|
});
|
|
436
408
|
}
|
|
437
409
|
/**
|
|
438
|
-
*
|
|
439
|
-
* Resume subscription
|
|
410
|
+
* Get current-period voice usage breakdown
|
|
440
411
|
*/
|
|
441
|
-
|
|
412
|
+
organizationsOrganizationIdSubscriptionUsageGet(requestParameters, initOverrides) {
|
|
442
413
|
return __awaiter(this, void 0, void 0, function* () {
|
|
443
|
-
const response = yield this.
|
|
414
|
+
const response = yield this.organizationsOrganizationIdSubscriptionUsageGetRaw(requestParameters, initOverrides);
|
|
444
415
|
return yield response.value();
|
|
445
416
|
});
|
|
446
417
|
}
|
|
447
418
|
/**
|
|
448
|
-
*
|
|
449
|
-
* Unpause subscription
|
|
419
|
+
* List individual usage records (paginated)
|
|
450
420
|
*/
|
|
451
|
-
|
|
421
|
+
organizationsOrganizationIdSubscriptionUsageHistoryGetRaw(requestParameters, initOverrides) {
|
|
452
422
|
return __awaiter(this, void 0, void 0, function* () {
|
|
453
423
|
if (requestParameters['organizationId'] == null) {
|
|
454
|
-
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling
|
|
424
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdSubscriptionUsageHistoryGet().');
|
|
455
425
|
}
|
|
456
426
|
const queryParameters = {};
|
|
427
|
+
if (requestParameters['from'] != null) {
|
|
428
|
+
queryParameters['from'] = requestParameters['from'].toISOString();
|
|
429
|
+
}
|
|
430
|
+
if (requestParameters['to'] != null) {
|
|
431
|
+
queryParameters['to'] = requestParameters['to'].toISOString();
|
|
432
|
+
}
|
|
433
|
+
if (requestParameters['limit'] != null) {
|
|
434
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
435
|
+
}
|
|
436
|
+
if (requestParameters['offset'] != null) {
|
|
437
|
+
queryParameters['offset'] = requestParameters['offset'];
|
|
438
|
+
}
|
|
457
439
|
const headerParameters = {};
|
|
458
440
|
if (this.configuration && this.configuration.accessToken) {
|
|
459
441
|
const token = this.configuration.accessToken;
|
|
@@ -462,24 +444,23 @@ export class SubscriptionApi extends runtime.BaseAPI {
|
|
|
462
444
|
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
463
445
|
}
|
|
464
446
|
}
|
|
465
|
-
let urlPath = `/organizations/{organizationId}/subscription/
|
|
447
|
+
let urlPath = `/organizations/{organizationId}/subscription/usage/history`;
|
|
466
448
|
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
467
449
|
const response = yield this.request({
|
|
468
450
|
path: urlPath,
|
|
469
|
-
method: '
|
|
451
|
+
method: 'GET',
|
|
470
452
|
headers: headerParameters,
|
|
471
453
|
query: queryParameters,
|
|
472
454
|
}, initOverrides);
|
|
473
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
455
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => UsageHistoryResponseFromJSON(jsonValue));
|
|
474
456
|
});
|
|
475
457
|
}
|
|
476
458
|
/**
|
|
477
|
-
*
|
|
478
|
-
* Unpause subscription
|
|
459
|
+
* List individual usage records (paginated)
|
|
479
460
|
*/
|
|
480
|
-
|
|
461
|
+
organizationsOrganizationIdSubscriptionUsageHistoryGet(requestParameters, initOverrides) {
|
|
481
462
|
return __awaiter(this, void 0, void 0, function* () {
|
|
482
|
-
const response = yield this.
|
|
463
|
+
const response = yield this.organizationsOrganizationIdSubscriptionUsageHistoryGetRaw(requestParameters, initOverrides);
|
|
483
464
|
return yield response.value();
|
|
484
465
|
});
|
|
485
466
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tivadar AI Backend API
|
|
3
|
+
* Unified REST API for Tivadar AI Voice Agents platform
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
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 * as runtime from '../runtime';
|
|
13
|
+
import type { VoiceUsageReportRequest, VoiceUsageReportResponse } from '../models/index';
|
|
14
|
+
export interface VoiceUsageReportPostRequest {
|
|
15
|
+
voiceUsageReportRequest: VoiceUsageReportRequest;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
export declare class VoiceUsageApi extends runtime.BaseAPI {
|
|
21
|
+
/**
|
|
22
|
+
* Records voice-minute usage and reports overage to Stripe\'s Meter Events API when the included-minutes threshold is crossed. The request must be authenticated as a member of the target organization (or via the null provider in dev). Idempotent on `idempotencyKey`.
|
|
23
|
+
* Report voice usage for a call (used by agent runtimes)
|
|
24
|
+
*/
|
|
25
|
+
voiceUsageReportPostRaw(requestParameters: VoiceUsageReportPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VoiceUsageReportResponse>>;
|
|
26
|
+
/**
|
|
27
|
+
* Records voice-minute usage and reports overage to Stripe\'s Meter Events API when the included-minutes threshold is crossed. The request must be authenticated as a member of the target organization (or via the null provider in dev). Idempotent on `idempotencyKey`.
|
|
28
|
+
* Report voice usage for a call (used by agent runtimes)
|
|
29
|
+
*/
|
|
30
|
+
voiceUsageReportPost(requestParameters: VoiceUsageReportPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VoiceUsageReportResponse>;
|
|
31
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import * as runtime from '../runtime';
|
|
24
|
+
import { VoiceUsageReportRequestToJSON, VoiceUsageReportResponseFromJSON, } from '../models/index';
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export class VoiceUsageApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Records voice-minute usage and reports overage to Stripe\'s Meter Events API when the included-minutes threshold is crossed. The request must be authenticated as a member of the target organization (or via the null provider in dev). Idempotent on `idempotencyKey`.
|
|
31
|
+
* Report voice usage for a call (used by agent runtimes)
|
|
32
|
+
*/
|
|
33
|
+
voiceUsageReportPostRaw(requestParameters, initOverrides) {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
if (requestParameters['voiceUsageReportRequest'] == null) {
|
|
36
|
+
throw new runtime.RequiredError('voiceUsageReportRequest', 'Required parameter "voiceUsageReportRequest" was null or undefined when calling voiceUsageReportPost().');
|
|
37
|
+
}
|
|
38
|
+
const queryParameters = {};
|
|
39
|
+
const headerParameters = {};
|
|
40
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
41
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
42
|
+
const token = this.configuration.accessToken;
|
|
43
|
+
const tokenString = yield token("bearerAuth", []);
|
|
44
|
+
if (tokenString) {
|
|
45
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
let urlPath = `/voice-usage/report`;
|
|
49
|
+
const response = yield this.request({
|
|
50
|
+
path: urlPath,
|
|
51
|
+
method: 'POST',
|
|
52
|
+
headers: headerParameters,
|
|
53
|
+
query: queryParameters,
|
|
54
|
+
body: VoiceUsageReportRequestToJSON(requestParameters['voiceUsageReportRequest']),
|
|
55
|
+
}, initOverrides);
|
|
56
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => VoiceUsageReportResponseFromJSON(jsonValue));
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Records voice-minute usage and reports overage to Stripe\'s Meter Events API when the included-minutes threshold is crossed. The request must be authenticated as a member of the target organization (or via the null provider in dev). Idempotent on `idempotencyKey`.
|
|
61
|
+
* Report voice usage for a call (used by agent runtimes)
|
|
62
|
+
*/
|
|
63
|
+
voiceUsageReportPost(requestParameters, initOverrides) {
|
|
64
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
const response = yield this.voiceUsageReportPostRaw(requestParameters, initOverrides);
|
|
66
|
+
return yield response.value();
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
}
|
package/dist/esm/apis/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from './AdminSubscriptionsApi';
|
|
1
2
|
export * from './CalendarApi';
|
|
2
3
|
export * from './CallsApi';
|
|
3
4
|
export * from './ChatAgentsApi';
|
|
@@ -19,3 +20,4 @@ export * from './SubscriptionApi';
|
|
|
19
20
|
export * from './TTSProvidersApi';
|
|
20
21
|
export * from './ToolsApi';
|
|
21
22
|
export * from './VoiceAgentsApi';
|
|
23
|
+
export * from './VoiceUsageApi';
|
package/dist/esm/apis/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
export * from './AdminSubscriptionsApi';
|
|
3
4
|
export * from './CalendarApi';
|
|
4
5
|
export * from './CallsApi';
|
|
5
6
|
export * from './ChatAgentsApi';
|
|
@@ -21,3 +22,4 @@ export * from './SubscriptionApi';
|
|
|
21
22
|
export * from './TTSProvidersApi';
|
|
22
23
|
export * from './ToolsApi';
|
|
23
24
|
export * from './VoiceAgentsApi';
|
|
25
|
+
export * from './VoiceUsageApi';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tivadar AI Backend API
|
|
3
|
+
* Unified REST API for Tivadar AI Voice Agents platform
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
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
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface AdminGrantMinutesRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface AdminGrantMinutesRequest {
|
|
18
|
+
/**
|
|
19
|
+
* Positive to grant (credit), negative to deduct.
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof AdminGrantMinutesRequest
|
|
22
|
+
*/
|
|
23
|
+
minutes: number;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof AdminGrantMinutesRequest
|
|
28
|
+
*/
|
|
29
|
+
note?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the AdminGrantMinutesRequest interface.
|
|
33
|
+
*/
|
|
34
|
+
export declare function instanceOfAdminGrantMinutesRequest(value: object): value is AdminGrantMinutesRequest;
|
|
35
|
+
export declare function AdminGrantMinutesRequestFromJSON(json: any): AdminGrantMinutesRequest;
|
|
36
|
+
export declare function AdminGrantMinutesRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdminGrantMinutesRequest;
|
|
37
|
+
export declare function AdminGrantMinutesRequestToJSON(json: any): AdminGrantMinutesRequest;
|
|
38
|
+
export declare function AdminGrantMinutesRequestToJSONTyped(value?: AdminGrantMinutesRequest | null, ignoreDiscriminator?: boolean): any;
|