@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
|
@@ -0,0 +1,86 @@
|
|
|
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 AdminSetSubscriptionRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface AdminSetSubscriptionRequest {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof AdminSetSubscriptionRequest
|
|
22
|
+
*/
|
|
23
|
+
planSlug: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof AdminSetSubscriptionRequest
|
|
28
|
+
*/
|
|
29
|
+
status?: AdminSetSubscriptionRequestStatusEnum;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof AdminSetSubscriptionRequest
|
|
34
|
+
*/
|
|
35
|
+
billingInterval?: AdminSetSubscriptionRequestBillingIntervalEnum | null;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof AdminSetSubscriptionRequest
|
|
40
|
+
*/
|
|
41
|
+
currency?: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {Date}
|
|
45
|
+
* @memberof AdminSetSubscriptionRequest
|
|
46
|
+
*/
|
|
47
|
+
currentPeriodStart?: Date;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {Date}
|
|
51
|
+
* @memberof AdminSetSubscriptionRequest
|
|
52
|
+
*/
|
|
53
|
+
currentPeriodEnd?: Date;
|
|
54
|
+
/**
|
|
55
|
+
* Stored on the audit event for context.
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof AdminSetSubscriptionRequest
|
|
58
|
+
*/
|
|
59
|
+
note?: string;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* @export
|
|
63
|
+
*/
|
|
64
|
+
export declare const AdminSetSubscriptionRequestStatusEnum: {
|
|
65
|
+
readonly Active: "active";
|
|
66
|
+
readonly Trialing: "trialing";
|
|
67
|
+
readonly Paused: "paused";
|
|
68
|
+
readonly Canceled: "canceled";
|
|
69
|
+
};
|
|
70
|
+
export type AdminSetSubscriptionRequestStatusEnum = typeof AdminSetSubscriptionRequestStatusEnum[keyof typeof AdminSetSubscriptionRequestStatusEnum];
|
|
71
|
+
/**
|
|
72
|
+
* @export
|
|
73
|
+
*/
|
|
74
|
+
export declare const AdminSetSubscriptionRequestBillingIntervalEnum: {
|
|
75
|
+
readonly Monthly: "monthly";
|
|
76
|
+
readonly Yearly: "yearly";
|
|
77
|
+
};
|
|
78
|
+
export type AdminSetSubscriptionRequestBillingIntervalEnum = typeof AdminSetSubscriptionRequestBillingIntervalEnum[keyof typeof AdminSetSubscriptionRequestBillingIntervalEnum];
|
|
79
|
+
/**
|
|
80
|
+
* Check if a given object implements the AdminSetSubscriptionRequest interface.
|
|
81
|
+
*/
|
|
82
|
+
export declare function instanceOfAdminSetSubscriptionRequest(value: object): value is AdminSetSubscriptionRequest;
|
|
83
|
+
export declare function AdminSetSubscriptionRequestFromJSON(json: any): AdminSetSubscriptionRequest;
|
|
84
|
+
export declare function AdminSetSubscriptionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdminSetSubscriptionRequest;
|
|
85
|
+
export declare function AdminSetSubscriptionRequestToJSON(json: any): AdminSetSubscriptionRequest;
|
|
86
|
+
export declare function AdminSetSubscriptionRequestToJSONTyped(value?: AdminSetSubscriptionRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Tivadar AI Backend API
|
|
6
|
+
* Unified REST API for Tivadar AI Voice Agents platform
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.AdminSetSubscriptionRequestBillingIntervalEnum = exports.AdminSetSubscriptionRequestStatusEnum = void 0;
|
|
17
|
+
exports.instanceOfAdminSetSubscriptionRequest = instanceOfAdminSetSubscriptionRequest;
|
|
18
|
+
exports.AdminSetSubscriptionRequestFromJSON = AdminSetSubscriptionRequestFromJSON;
|
|
19
|
+
exports.AdminSetSubscriptionRequestFromJSONTyped = AdminSetSubscriptionRequestFromJSONTyped;
|
|
20
|
+
exports.AdminSetSubscriptionRequestToJSON = AdminSetSubscriptionRequestToJSON;
|
|
21
|
+
exports.AdminSetSubscriptionRequestToJSONTyped = AdminSetSubscriptionRequestToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.AdminSetSubscriptionRequestStatusEnum = {
|
|
26
|
+
Active: 'active',
|
|
27
|
+
Trialing: 'trialing',
|
|
28
|
+
Paused: 'paused',
|
|
29
|
+
Canceled: 'canceled'
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* @export
|
|
33
|
+
*/
|
|
34
|
+
exports.AdminSetSubscriptionRequestBillingIntervalEnum = {
|
|
35
|
+
Monthly: 'monthly',
|
|
36
|
+
Yearly: 'yearly'
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the AdminSetSubscriptionRequest interface.
|
|
40
|
+
*/
|
|
41
|
+
function instanceOfAdminSetSubscriptionRequest(value) {
|
|
42
|
+
if (!('planSlug' in value) || value['planSlug'] === undefined)
|
|
43
|
+
return false;
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
function AdminSetSubscriptionRequestFromJSON(json) {
|
|
47
|
+
return AdminSetSubscriptionRequestFromJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
function AdminSetSubscriptionRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
'planSlug': json['planSlug'],
|
|
55
|
+
'status': json['status'] == null ? undefined : json['status'],
|
|
56
|
+
'billingInterval': json['billingInterval'] == null ? undefined : json['billingInterval'],
|
|
57
|
+
'currency': json['currency'] == null ? undefined : json['currency'],
|
|
58
|
+
'currentPeriodStart': json['currentPeriodStart'] == null ? undefined : (new Date(json['currentPeriodStart'])),
|
|
59
|
+
'currentPeriodEnd': json['currentPeriodEnd'] == null ? undefined : (new Date(json['currentPeriodEnd'])),
|
|
60
|
+
'note': json['note'] == null ? undefined : json['note'],
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
function AdminSetSubscriptionRequestToJSON(json) {
|
|
64
|
+
return AdminSetSubscriptionRequestToJSONTyped(json, false);
|
|
65
|
+
}
|
|
66
|
+
function AdminSetSubscriptionRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
67
|
+
if (value == null) {
|
|
68
|
+
return value;
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
'planSlug': value['planSlug'],
|
|
72
|
+
'status': value['status'],
|
|
73
|
+
'billingInterval': value['billingInterval'],
|
|
74
|
+
'currency': value['currency'],
|
|
75
|
+
'currentPeriodStart': value['currentPeriodStart'] == null ? value['currentPeriodStart'] : value['currentPeriodStart'].toISOString(),
|
|
76
|
+
'currentPeriodEnd': value['currentPeriodEnd'] == null ? value['currentPeriodEnd'] : value['currentPeriodEnd'].toISOString(),
|
|
77
|
+
'note': value['note'],
|
|
78
|
+
};
|
|
79
|
+
}
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
*/
|
|
17
17
|
export interface CancelSubscriptionRequest {
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
*
|
|
20
20
|
* @type {boolean}
|
|
21
21
|
* @memberof CancelSubscriptionRequest
|
|
22
22
|
*/
|
|
23
23
|
cancelImmediately?: boolean;
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
*
|
|
26
26
|
* @type {string}
|
|
27
27
|
* @memberof CancelSubscriptionRequest
|
|
28
28
|
*/
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
*/
|
|
17
17
|
export interface CheckoutSessionResponse {
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
*
|
|
20
20
|
* @type {string}
|
|
21
21
|
* @memberof CheckoutSessionResponse
|
|
22
22
|
*/
|
|
23
23
|
id: string;
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
*
|
|
26
26
|
* @type {string}
|
|
27
27
|
* @memberof CheckoutSessionResponse
|
|
28
28
|
*/
|
|
@@ -16,30 +16,44 @@
|
|
|
16
16
|
*/
|
|
17
17
|
export interface CreateCheckoutSessionRequest {
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
*
|
|
20
20
|
* @type {string}
|
|
21
21
|
* @memberof CreateCheckoutSessionRequest
|
|
22
22
|
*/
|
|
23
23
|
planSlug: string;
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
*
|
|
26
26
|
* @type {string}
|
|
27
27
|
* @memberof CreateCheckoutSessionRequest
|
|
28
28
|
*/
|
|
29
|
-
|
|
29
|
+
interval: CreateCheckoutSessionRequestIntervalEnum;
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* ISO-4217 lowercase. Defaults to the org subscription currency or the system default.
|
|
32
32
|
* @type {string}
|
|
33
33
|
* @memberof CreateCheckoutSessionRequest
|
|
34
34
|
*/
|
|
35
|
-
|
|
35
|
+
currency?: string;
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
*
|
|
38
38
|
* @type {string}
|
|
39
39
|
* @memberof CreateCheckoutSessionRequest
|
|
40
40
|
*/
|
|
41
|
-
|
|
41
|
+
successUrl: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof CreateCheckoutSessionRequest
|
|
46
|
+
*/
|
|
47
|
+
cancelUrl: string;
|
|
42
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* @export
|
|
51
|
+
*/
|
|
52
|
+
export declare const CreateCheckoutSessionRequestIntervalEnum: {
|
|
53
|
+
readonly Monthly: "monthly";
|
|
54
|
+
readonly Yearly: "yearly";
|
|
55
|
+
};
|
|
56
|
+
export type CreateCheckoutSessionRequestIntervalEnum = typeof CreateCheckoutSessionRequestIntervalEnum[keyof typeof CreateCheckoutSessionRequestIntervalEnum];
|
|
43
57
|
/**
|
|
44
58
|
* Check if a given object implements the CreateCheckoutSessionRequest interface.
|
|
45
59
|
*/
|
|
@@ -13,18 +13,30 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.CreateCheckoutSessionRequestIntervalEnum = void 0;
|
|
16
17
|
exports.instanceOfCreateCheckoutSessionRequest = instanceOfCreateCheckoutSessionRequest;
|
|
17
18
|
exports.CreateCheckoutSessionRequestFromJSON = CreateCheckoutSessionRequestFromJSON;
|
|
18
19
|
exports.CreateCheckoutSessionRequestFromJSONTyped = CreateCheckoutSessionRequestFromJSONTyped;
|
|
19
20
|
exports.CreateCheckoutSessionRequestToJSON = CreateCheckoutSessionRequestToJSON;
|
|
20
21
|
exports.CreateCheckoutSessionRequestToJSONTyped = CreateCheckoutSessionRequestToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.CreateCheckoutSessionRequestIntervalEnum = {
|
|
26
|
+
Monthly: 'monthly',
|
|
27
|
+
Yearly: 'yearly'
|
|
28
|
+
};
|
|
21
29
|
/**
|
|
22
30
|
* Check if a given object implements the CreateCheckoutSessionRequest interface.
|
|
23
31
|
*/
|
|
24
32
|
function instanceOfCreateCheckoutSessionRequest(value) {
|
|
25
33
|
if (!('planSlug' in value) || value['planSlug'] === undefined)
|
|
26
34
|
return false;
|
|
27
|
-
if (!('
|
|
35
|
+
if (!('interval' in value) || value['interval'] === undefined)
|
|
36
|
+
return false;
|
|
37
|
+
if (!('successUrl' in value) || value['successUrl'] === undefined)
|
|
38
|
+
return false;
|
|
39
|
+
if (!('cancelUrl' in value) || value['cancelUrl'] === undefined)
|
|
28
40
|
return false;
|
|
29
41
|
return true;
|
|
30
42
|
}
|
|
@@ -37,9 +49,10 @@ function CreateCheckoutSessionRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
37
49
|
}
|
|
38
50
|
return {
|
|
39
51
|
'planSlug': json['planSlug'],
|
|
40
|
-
'
|
|
41
|
-
'
|
|
42
|
-
'
|
|
52
|
+
'interval': json['interval'],
|
|
53
|
+
'currency': json['currency'] == null ? undefined : json['currency'],
|
|
54
|
+
'successUrl': json['successUrl'],
|
|
55
|
+
'cancelUrl': json['cancelUrl'],
|
|
43
56
|
};
|
|
44
57
|
}
|
|
45
58
|
function CreateCheckoutSessionRequestToJSON(json) {
|
|
@@ -51,7 +64,8 @@ function CreateCheckoutSessionRequestToJSONTyped(value, ignoreDiscriminator = fa
|
|
|
51
64
|
}
|
|
52
65
|
return {
|
|
53
66
|
'planSlug': value['planSlug'],
|
|
54
|
-
'
|
|
67
|
+
'interval': value['interval'],
|
|
68
|
+
'currency': value['currency'],
|
|
55
69
|
'successUrl': value['successUrl'],
|
|
56
70
|
'cancelUrl': value['cancelUrl'],
|
|
57
71
|
};
|
|
@@ -0,0 +1,59 @@
|
|
|
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 type { UsageBreakdownByDay } from './UsageBreakdownByDay';
|
|
13
|
+
import type { SubscriptionUsageSummary } from './SubscriptionUsageSummary';
|
|
14
|
+
import type { UsageBreakdownByAgent } from './UsageBreakdownByAgent';
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @export
|
|
18
|
+
* @interface CurrentPeriodUsage
|
|
19
|
+
*/
|
|
20
|
+
export interface CurrentPeriodUsage {
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @type {Date}
|
|
24
|
+
* @memberof CurrentPeriodUsage
|
|
25
|
+
*/
|
|
26
|
+
periodStart: Date | null;
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* @type {Date}
|
|
30
|
+
* @memberof CurrentPeriodUsage
|
|
31
|
+
*/
|
|
32
|
+
periodEnd: Date | null;
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @type {SubscriptionUsageSummary}
|
|
36
|
+
* @memberof CurrentPeriodUsage
|
|
37
|
+
*/
|
|
38
|
+
usage: SubscriptionUsageSummary;
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
* @type {Array<UsageBreakdownByDay>}
|
|
42
|
+
* @memberof CurrentPeriodUsage
|
|
43
|
+
*/
|
|
44
|
+
byDay: Array<UsageBreakdownByDay>;
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @type {Array<UsageBreakdownByAgent>}
|
|
48
|
+
* @memberof CurrentPeriodUsage
|
|
49
|
+
*/
|
|
50
|
+
byAgent: Array<UsageBreakdownByAgent>;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Check if a given object implements the CurrentPeriodUsage interface.
|
|
54
|
+
*/
|
|
55
|
+
export declare function instanceOfCurrentPeriodUsage(value: object): value is CurrentPeriodUsage;
|
|
56
|
+
export declare function CurrentPeriodUsageFromJSON(json: any): CurrentPeriodUsage;
|
|
57
|
+
export declare function CurrentPeriodUsageFromJSONTyped(json: any, ignoreDiscriminator: boolean): CurrentPeriodUsage;
|
|
58
|
+
export declare function CurrentPeriodUsageToJSON(json: any): CurrentPeriodUsage;
|
|
59
|
+
export declare function CurrentPeriodUsageToJSONTyped(value?: CurrentPeriodUsage | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Tivadar AI Backend API
|
|
6
|
+
* Unified REST API for Tivadar AI Voice Agents platform
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfCurrentPeriodUsage = instanceOfCurrentPeriodUsage;
|
|
17
|
+
exports.CurrentPeriodUsageFromJSON = CurrentPeriodUsageFromJSON;
|
|
18
|
+
exports.CurrentPeriodUsageFromJSONTyped = CurrentPeriodUsageFromJSONTyped;
|
|
19
|
+
exports.CurrentPeriodUsageToJSON = CurrentPeriodUsageToJSON;
|
|
20
|
+
exports.CurrentPeriodUsageToJSONTyped = CurrentPeriodUsageToJSONTyped;
|
|
21
|
+
const UsageBreakdownByDay_1 = require("./UsageBreakdownByDay");
|
|
22
|
+
const SubscriptionUsageSummary_1 = require("./SubscriptionUsageSummary");
|
|
23
|
+
const UsageBreakdownByAgent_1 = require("./UsageBreakdownByAgent");
|
|
24
|
+
/**
|
|
25
|
+
* Check if a given object implements the CurrentPeriodUsage interface.
|
|
26
|
+
*/
|
|
27
|
+
function instanceOfCurrentPeriodUsage(value) {
|
|
28
|
+
if (!('periodStart' in value) || value['periodStart'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('periodEnd' in value) || value['periodEnd'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
if (!('usage' in value) || value['usage'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
if (!('byDay' in value) || value['byDay'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
if (!('byAgent' in value) || value['byAgent'] === undefined)
|
|
37
|
+
return false;
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
function CurrentPeriodUsageFromJSON(json) {
|
|
41
|
+
return CurrentPeriodUsageFromJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function CurrentPeriodUsageFromJSONTyped(json, ignoreDiscriminator) {
|
|
44
|
+
if (json == null) {
|
|
45
|
+
return json;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'periodStart': (json['periodStart'] == null ? null : new Date(json['periodStart'])),
|
|
49
|
+
'periodEnd': (json['periodEnd'] == null ? null : new Date(json['periodEnd'])),
|
|
50
|
+
'usage': (0, SubscriptionUsageSummary_1.SubscriptionUsageSummaryFromJSON)(json['usage']),
|
|
51
|
+
'byDay': (json['byDay'].map(UsageBreakdownByDay_1.UsageBreakdownByDayFromJSON)),
|
|
52
|
+
'byAgent': (json['byAgent'].map(UsageBreakdownByAgent_1.UsageBreakdownByAgentFromJSON)),
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function CurrentPeriodUsageToJSON(json) {
|
|
56
|
+
return CurrentPeriodUsageToJSONTyped(json, false);
|
|
57
|
+
}
|
|
58
|
+
function CurrentPeriodUsageToJSONTyped(value, ignoreDiscriminator = false) {
|
|
59
|
+
if (value == null) {
|
|
60
|
+
return value;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
'periodStart': value['periodStart'] == null ? value['periodStart'] : value['periodStart'].toISOString(),
|
|
64
|
+
'periodEnd': value['periodEnd'] == null ? value['periodEnd'] : value['periodEnd'].toISOString(),
|
|
65
|
+
'usage': (0, SubscriptionUsageSummary_1.SubscriptionUsageSummaryToJSON)(value['usage']),
|
|
66
|
+
'byDay': (value['byDay'].map(UsageBreakdownByDay_1.UsageBreakdownByDayToJSON)),
|
|
67
|
+
'byAgent': (value['byAgent'].map(UsageBreakdownByAgent_1.UsageBreakdownByAgentToJSON)),
|
|
68
|
+
};
|
|
69
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
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 LifecycleResponse
|
|
16
|
+
*/
|
|
17
|
+
export interface LifecycleResponse {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof LifecycleResponse
|
|
22
|
+
*/
|
|
23
|
+
subscriptionId: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof LifecycleResponse
|
|
28
|
+
*/
|
|
29
|
+
status: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {boolean}
|
|
33
|
+
* @memberof LifecycleResponse
|
|
34
|
+
*/
|
|
35
|
+
cancelAtPeriodEnd?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {Date}
|
|
39
|
+
* @memberof LifecycleResponse
|
|
40
|
+
*/
|
|
41
|
+
currentPeriodEnd?: Date | null;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Check if a given object implements the LifecycleResponse interface.
|
|
45
|
+
*/
|
|
46
|
+
export declare function instanceOfLifecycleResponse(value: object): value is LifecycleResponse;
|
|
47
|
+
export declare function LifecycleResponseFromJSON(json: any): LifecycleResponse;
|
|
48
|
+
export declare function LifecycleResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): LifecycleResponse;
|
|
49
|
+
export declare function LifecycleResponseToJSON(json: any): LifecycleResponse;
|
|
50
|
+
export declare function LifecycleResponseToJSONTyped(value?: LifecycleResponse | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Tivadar AI Backend API
|
|
6
|
+
* Unified REST API for Tivadar AI Voice Agents platform
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfLifecycleResponse = instanceOfLifecycleResponse;
|
|
17
|
+
exports.LifecycleResponseFromJSON = LifecycleResponseFromJSON;
|
|
18
|
+
exports.LifecycleResponseFromJSONTyped = LifecycleResponseFromJSONTyped;
|
|
19
|
+
exports.LifecycleResponseToJSON = LifecycleResponseToJSON;
|
|
20
|
+
exports.LifecycleResponseToJSONTyped = LifecycleResponseToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the LifecycleResponse interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfLifecycleResponse(value) {
|
|
25
|
+
if (!('subscriptionId' in value) || value['subscriptionId'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('status' in value) || value['status'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
function LifecycleResponseFromJSON(json) {
|
|
32
|
+
return LifecycleResponseFromJSONTyped(json, false);
|
|
33
|
+
}
|
|
34
|
+
function LifecycleResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
35
|
+
if (json == null) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
'subscriptionId': json['subscriptionId'],
|
|
40
|
+
'status': json['status'],
|
|
41
|
+
'cancelAtPeriodEnd': json['cancelAtPeriodEnd'] == null ? undefined : json['cancelAtPeriodEnd'],
|
|
42
|
+
'currentPeriodEnd': json['currentPeriodEnd'] == null ? undefined : (new Date(json['currentPeriodEnd'])),
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function LifecycleResponseToJSON(json) {
|
|
46
|
+
return LifecycleResponseToJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
function LifecycleResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
49
|
+
if (value == null) {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
'subscriptionId': value['subscriptionId'],
|
|
54
|
+
'status': value['status'],
|
|
55
|
+
'cancelAtPeriodEnd': value['cancelAtPeriodEnd'],
|
|
56
|
+
'currentPeriodEnd': value['currentPeriodEnd'] == null ? value['currentPeriodEnd'] : value['currentPeriodEnd'].toISOString(),
|
|
57
|
+
};
|
|
58
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
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 type { PlanCatalogPrice } from './PlanCatalogPrice';
|
|
13
|
+
import type { PlanCatalogEntryOverageInner } from './PlanCatalogEntryOverageInner';
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @export
|
|
17
|
+
* @interface PlanCatalogEntry
|
|
18
|
+
*/
|
|
19
|
+
export interface PlanCatalogEntry {
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @type {string}
|
|
23
|
+
* @memberof PlanCatalogEntry
|
|
24
|
+
*/
|
|
25
|
+
slug: string;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @type {string}
|
|
29
|
+
* @memberof PlanCatalogEntry
|
|
30
|
+
*/
|
|
31
|
+
name: string;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @type {string}
|
|
35
|
+
* @memberof PlanCatalogEntry
|
|
36
|
+
*/
|
|
37
|
+
description?: string;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @type {number}
|
|
41
|
+
* @memberof PlanCatalogEntry
|
|
42
|
+
*/
|
|
43
|
+
rank: number;
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @type {boolean}
|
|
47
|
+
* @memberof PlanCatalogEntry
|
|
48
|
+
*/
|
|
49
|
+
hasStripeProduct?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
* @type {number}
|
|
53
|
+
* @memberof PlanCatalogEntry
|
|
54
|
+
*/
|
|
55
|
+
includedVoiceMinutes: number;
|
|
56
|
+
/**
|
|
57
|
+
*
|
|
58
|
+
* @type {Array<string>}
|
|
59
|
+
* @memberof PlanCatalogEntry
|
|
60
|
+
*/
|
|
61
|
+
features?: Array<string>;
|
|
62
|
+
/**
|
|
63
|
+
*
|
|
64
|
+
* @type {{ [key: string]: number | null; }}
|
|
65
|
+
* @memberof PlanCatalogEntry
|
|
66
|
+
*/
|
|
67
|
+
limits?: {
|
|
68
|
+
[key: string]: number | null;
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {Array<PlanCatalogPrice>}
|
|
73
|
+
* @memberof PlanCatalogEntry
|
|
74
|
+
*/
|
|
75
|
+
prices: Array<PlanCatalogPrice>;
|
|
76
|
+
/**
|
|
77
|
+
*
|
|
78
|
+
* @type {Array<PlanCatalogEntryOverageInner>}
|
|
79
|
+
* @memberof PlanCatalogEntry
|
|
80
|
+
*/
|
|
81
|
+
overage: Array<PlanCatalogEntryOverageInner>;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Check if a given object implements the PlanCatalogEntry interface.
|
|
85
|
+
*/
|
|
86
|
+
export declare function instanceOfPlanCatalogEntry(value: object): value is PlanCatalogEntry;
|
|
87
|
+
export declare function PlanCatalogEntryFromJSON(json: any): PlanCatalogEntry;
|
|
88
|
+
export declare function PlanCatalogEntryFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlanCatalogEntry;
|
|
89
|
+
export declare function PlanCatalogEntryToJSON(json: any): PlanCatalogEntry;
|
|
90
|
+
export declare function PlanCatalogEntryToJSONTyped(value?: PlanCatalogEntry | null, ignoreDiscriminator?: boolean): any;
|