@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,158 @@
|
|
|
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 { PlanCatalogPrice } from './PlanCatalogPrice';
|
|
17
|
+
import {
|
|
18
|
+
PlanCatalogPriceFromJSON,
|
|
19
|
+
PlanCatalogPriceFromJSONTyped,
|
|
20
|
+
PlanCatalogPriceToJSON,
|
|
21
|
+
PlanCatalogPriceToJSONTyped,
|
|
22
|
+
} from './PlanCatalogPrice';
|
|
23
|
+
import type { PlanCatalogEntryOverageInner } from './PlanCatalogEntryOverageInner';
|
|
24
|
+
import {
|
|
25
|
+
PlanCatalogEntryOverageInnerFromJSON,
|
|
26
|
+
PlanCatalogEntryOverageInnerFromJSONTyped,
|
|
27
|
+
PlanCatalogEntryOverageInnerToJSON,
|
|
28
|
+
PlanCatalogEntryOverageInnerToJSONTyped,
|
|
29
|
+
} from './PlanCatalogEntryOverageInner';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface PlanCatalogEntry
|
|
35
|
+
*/
|
|
36
|
+
export interface PlanCatalogEntry {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof PlanCatalogEntry
|
|
41
|
+
*/
|
|
42
|
+
slug: string;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof PlanCatalogEntry
|
|
47
|
+
*/
|
|
48
|
+
name: string;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof PlanCatalogEntry
|
|
53
|
+
*/
|
|
54
|
+
description?: string;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {number}
|
|
58
|
+
* @memberof PlanCatalogEntry
|
|
59
|
+
*/
|
|
60
|
+
rank: number;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @type {boolean}
|
|
64
|
+
* @memberof PlanCatalogEntry
|
|
65
|
+
*/
|
|
66
|
+
hasStripeProduct?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @type {number}
|
|
70
|
+
* @memberof PlanCatalogEntry
|
|
71
|
+
*/
|
|
72
|
+
includedVoiceMinutes: number;
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
* @type {Array<string>}
|
|
76
|
+
* @memberof PlanCatalogEntry
|
|
77
|
+
*/
|
|
78
|
+
features?: Array<string>;
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @type {{ [key: string]: number | null; }}
|
|
82
|
+
* @memberof PlanCatalogEntry
|
|
83
|
+
*/
|
|
84
|
+
limits?: { [key: string]: number | null; };
|
|
85
|
+
/**
|
|
86
|
+
*
|
|
87
|
+
* @type {Array<PlanCatalogPrice>}
|
|
88
|
+
* @memberof PlanCatalogEntry
|
|
89
|
+
*/
|
|
90
|
+
prices: Array<PlanCatalogPrice>;
|
|
91
|
+
/**
|
|
92
|
+
*
|
|
93
|
+
* @type {Array<PlanCatalogEntryOverageInner>}
|
|
94
|
+
* @memberof PlanCatalogEntry
|
|
95
|
+
*/
|
|
96
|
+
overage: Array<PlanCatalogEntryOverageInner>;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Check if a given object implements the PlanCatalogEntry interface.
|
|
101
|
+
*/
|
|
102
|
+
export function instanceOfPlanCatalogEntry(value: object): value is PlanCatalogEntry {
|
|
103
|
+
if (!('slug' in value) || value['slug'] === undefined) return false;
|
|
104
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
105
|
+
if (!('rank' in value) || value['rank'] === undefined) return false;
|
|
106
|
+
if (!('includedVoiceMinutes' in value) || value['includedVoiceMinutes'] === undefined) return false;
|
|
107
|
+
if (!('prices' in value) || value['prices'] === undefined) return false;
|
|
108
|
+
if (!('overage' in value) || value['overage'] === undefined) return false;
|
|
109
|
+
return true;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export function PlanCatalogEntryFromJSON(json: any): PlanCatalogEntry {
|
|
113
|
+
return PlanCatalogEntryFromJSONTyped(json, false);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export function PlanCatalogEntryFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlanCatalogEntry {
|
|
117
|
+
if (json == null) {
|
|
118
|
+
return json;
|
|
119
|
+
}
|
|
120
|
+
return {
|
|
121
|
+
|
|
122
|
+
'slug': json['slug'],
|
|
123
|
+
'name': json['name'],
|
|
124
|
+
'description': json['description'] == null ? undefined : json['description'],
|
|
125
|
+
'rank': json['rank'],
|
|
126
|
+
'hasStripeProduct': json['hasStripeProduct'] == null ? undefined : json['hasStripeProduct'],
|
|
127
|
+
'includedVoiceMinutes': json['includedVoiceMinutes'],
|
|
128
|
+
'features': json['features'] == null ? undefined : json['features'],
|
|
129
|
+
'limits': json['limits'] == null ? undefined : json['limits'],
|
|
130
|
+
'prices': ((json['prices'] as Array<any>).map(PlanCatalogPriceFromJSON)),
|
|
131
|
+
'overage': ((json['overage'] as Array<any>).map(PlanCatalogEntryOverageInnerFromJSON)),
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export function PlanCatalogEntryToJSON(json: any): PlanCatalogEntry {
|
|
136
|
+
return PlanCatalogEntryToJSONTyped(json, false);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export function PlanCatalogEntryToJSONTyped(value?: PlanCatalogEntry | null, ignoreDiscriminator: boolean = false): any {
|
|
140
|
+
if (value == null) {
|
|
141
|
+
return value;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
return {
|
|
145
|
+
|
|
146
|
+
'slug': value['slug'],
|
|
147
|
+
'name': value['name'],
|
|
148
|
+
'description': value['description'],
|
|
149
|
+
'rank': value['rank'],
|
|
150
|
+
'hasStripeProduct': value['hasStripeProduct'],
|
|
151
|
+
'includedVoiceMinutes': value['includedVoiceMinutes'],
|
|
152
|
+
'features': value['features'],
|
|
153
|
+
'limits': value['limits'],
|
|
154
|
+
'prices': ((value['prices'] as Array<any>).map(PlanCatalogPriceToJSON)),
|
|
155
|
+
'overage': ((value['overage'] as Array<any>).map(PlanCatalogEntryOverageInnerToJSON)),
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
|
|
@@ -0,0 +1,81 @@
|
|
|
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 PlanCatalogEntryOverageInner
|
|
20
|
+
*/
|
|
21
|
+
export interface PlanCatalogEntryOverageInner {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof PlanCatalogEntryOverageInner
|
|
26
|
+
*/
|
|
27
|
+
currency?: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof PlanCatalogEntryOverageInner
|
|
32
|
+
*/
|
|
33
|
+
priceId?: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof PlanCatalogEntryOverageInner
|
|
38
|
+
*/
|
|
39
|
+
unitAmountDecimal?: string | null;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the PlanCatalogEntryOverageInner interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfPlanCatalogEntryOverageInner(value: object): value is PlanCatalogEntryOverageInner {
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function PlanCatalogEntryOverageInnerFromJSON(json: any): PlanCatalogEntryOverageInner {
|
|
50
|
+
return PlanCatalogEntryOverageInnerFromJSONTyped(json, false);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function PlanCatalogEntryOverageInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlanCatalogEntryOverageInner {
|
|
54
|
+
if (json == null) {
|
|
55
|
+
return json;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
|
|
59
|
+
'currency': json['currency'] == null ? undefined : json['currency'],
|
|
60
|
+
'priceId': json['priceId'] == null ? undefined : json['priceId'],
|
|
61
|
+
'unitAmountDecimal': json['unitAmountDecimal'] == null ? undefined : json['unitAmountDecimal'],
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function PlanCatalogEntryOverageInnerToJSON(json: any): PlanCatalogEntryOverageInner {
|
|
66
|
+
return PlanCatalogEntryOverageInnerToJSONTyped(json, false);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function PlanCatalogEntryOverageInnerToJSONTyped(value?: PlanCatalogEntryOverageInner | null, ignoreDiscriminator: boolean = false): any {
|
|
70
|
+
if (value == null) {
|
|
71
|
+
return value;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'currency': value['currency'],
|
|
77
|
+
'priceId': value['priceId'],
|
|
78
|
+
'unitAmountDecimal': value['unitAmountDecimal'],
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
@@ -0,0 +1,103 @@
|
|
|
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 PlanCatalogPrice
|
|
20
|
+
*/
|
|
21
|
+
export interface PlanCatalogPrice {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof PlanCatalogPrice
|
|
26
|
+
*/
|
|
27
|
+
interval: PlanCatalogPriceIntervalEnum;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof PlanCatalogPrice
|
|
32
|
+
*/
|
|
33
|
+
currency: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof PlanCatalogPrice
|
|
38
|
+
*/
|
|
39
|
+
priceId: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof PlanCatalogPrice
|
|
44
|
+
*/
|
|
45
|
+
unitAmount?: number | null;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @export
|
|
51
|
+
*/
|
|
52
|
+
export const PlanCatalogPriceIntervalEnum = {
|
|
53
|
+
Monthly: 'monthly',
|
|
54
|
+
Yearly: 'yearly'
|
|
55
|
+
} as const;
|
|
56
|
+
export type PlanCatalogPriceIntervalEnum = typeof PlanCatalogPriceIntervalEnum[keyof typeof PlanCatalogPriceIntervalEnum];
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Check if a given object implements the PlanCatalogPrice interface.
|
|
61
|
+
*/
|
|
62
|
+
export function instanceOfPlanCatalogPrice(value: object): value is PlanCatalogPrice {
|
|
63
|
+
if (!('interval' in value) || value['interval'] === undefined) return false;
|
|
64
|
+
if (!('currency' in value) || value['currency'] === undefined) return false;
|
|
65
|
+
if (!('priceId' in value) || value['priceId'] === undefined) return false;
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function PlanCatalogPriceFromJSON(json: any): PlanCatalogPrice {
|
|
70
|
+
return PlanCatalogPriceFromJSONTyped(json, false);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function PlanCatalogPriceFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlanCatalogPrice {
|
|
74
|
+
if (json == null) {
|
|
75
|
+
return json;
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
|
|
79
|
+
'interval': json['interval'],
|
|
80
|
+
'currency': json['currency'],
|
|
81
|
+
'priceId': json['priceId'],
|
|
82
|
+
'unitAmount': json['unitAmount'] == null ? undefined : json['unitAmount'],
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function PlanCatalogPriceToJSON(json: any): PlanCatalogPrice {
|
|
87
|
+
return PlanCatalogPriceToJSONTyped(json, false);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function PlanCatalogPriceToJSONTyped(value?: PlanCatalogPrice | null, ignoreDiscriminator: boolean = false): any {
|
|
91
|
+
if (value == null) {
|
|
92
|
+
return value;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return {
|
|
96
|
+
|
|
97
|
+
'interval': value['interval'],
|
|
98
|
+
'currency': value['currency'],
|
|
99
|
+
'priceId': value['priceId'],
|
|
100
|
+
'unitAmount': value['unitAmount'],
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
|
|
@@ -0,0 +1,143 @@
|
|
|
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 { SubscriptionPlanSummaryOverageRate } from './SubscriptionPlanSummaryOverageRate';
|
|
17
|
+
import {
|
|
18
|
+
SubscriptionPlanSummaryOverageRateFromJSON,
|
|
19
|
+
SubscriptionPlanSummaryOverageRateFromJSONTyped,
|
|
20
|
+
SubscriptionPlanSummaryOverageRateToJSON,
|
|
21
|
+
SubscriptionPlanSummaryOverageRateToJSONTyped,
|
|
22
|
+
} from './SubscriptionPlanSummaryOverageRate';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface SubscriptionPlanSummary
|
|
28
|
+
*/
|
|
29
|
+
export interface SubscriptionPlanSummary {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof SubscriptionPlanSummary
|
|
34
|
+
*/
|
|
35
|
+
slug: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof SubscriptionPlanSummary
|
|
40
|
+
*/
|
|
41
|
+
name: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof SubscriptionPlanSummary
|
|
46
|
+
*/
|
|
47
|
+
description?: string;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {number}
|
|
51
|
+
* @memberof SubscriptionPlanSummary
|
|
52
|
+
*/
|
|
53
|
+
rank: number;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {boolean}
|
|
57
|
+
* @memberof SubscriptionPlanSummary
|
|
58
|
+
*/
|
|
59
|
+
hasStripeProduct?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Voice minutes included per billing period before overage.
|
|
62
|
+
* @type {number}
|
|
63
|
+
* @memberof SubscriptionPlanSummary
|
|
64
|
+
*/
|
|
65
|
+
includedVoiceMinutes: number;
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @type {Array<string>}
|
|
69
|
+
* @memberof SubscriptionPlanSummary
|
|
70
|
+
*/
|
|
71
|
+
features: Array<string>;
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @type {{ [key: string]: number | null; }}
|
|
75
|
+
* @memberof SubscriptionPlanSummary
|
|
76
|
+
*/
|
|
77
|
+
limits: { [key: string]: number | null; };
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
* @type {SubscriptionPlanSummaryOverageRate}
|
|
81
|
+
* @memberof SubscriptionPlanSummary
|
|
82
|
+
*/
|
|
83
|
+
overageRate?: SubscriptionPlanSummaryOverageRate | null;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Check if a given object implements the SubscriptionPlanSummary interface.
|
|
88
|
+
*/
|
|
89
|
+
export function instanceOfSubscriptionPlanSummary(value: object): value is SubscriptionPlanSummary {
|
|
90
|
+
if (!('slug' in value) || value['slug'] === undefined) return false;
|
|
91
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
92
|
+
if (!('rank' in value) || value['rank'] === undefined) return false;
|
|
93
|
+
if (!('includedVoiceMinutes' in value) || value['includedVoiceMinutes'] === undefined) return false;
|
|
94
|
+
if (!('features' in value) || value['features'] === undefined) return false;
|
|
95
|
+
if (!('limits' in value) || value['limits'] === undefined) return false;
|
|
96
|
+
return true;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function SubscriptionPlanSummaryFromJSON(json: any): SubscriptionPlanSummary {
|
|
100
|
+
return SubscriptionPlanSummaryFromJSONTyped(json, false);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export function SubscriptionPlanSummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubscriptionPlanSummary {
|
|
104
|
+
if (json == null) {
|
|
105
|
+
return json;
|
|
106
|
+
}
|
|
107
|
+
return {
|
|
108
|
+
|
|
109
|
+
'slug': json['slug'],
|
|
110
|
+
'name': json['name'],
|
|
111
|
+
'description': json['description'] == null ? undefined : json['description'],
|
|
112
|
+
'rank': json['rank'],
|
|
113
|
+
'hasStripeProduct': json['hasStripeProduct'] == null ? undefined : json['hasStripeProduct'],
|
|
114
|
+
'includedVoiceMinutes': json['includedVoiceMinutes'],
|
|
115
|
+
'features': json['features'],
|
|
116
|
+
'limits': json['limits'],
|
|
117
|
+
'overageRate': json['overageRate'] == null ? undefined : SubscriptionPlanSummaryOverageRateFromJSON(json['overageRate']),
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export function SubscriptionPlanSummaryToJSON(json: any): SubscriptionPlanSummary {
|
|
122
|
+
return SubscriptionPlanSummaryToJSONTyped(json, false);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export function SubscriptionPlanSummaryToJSONTyped(value?: SubscriptionPlanSummary | null, ignoreDiscriminator: boolean = false): any {
|
|
126
|
+
if (value == null) {
|
|
127
|
+
return value;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
return {
|
|
131
|
+
|
|
132
|
+
'slug': value['slug'],
|
|
133
|
+
'name': value['name'],
|
|
134
|
+
'description': value['description'],
|
|
135
|
+
'rank': value['rank'],
|
|
136
|
+
'hasStripeProduct': value['hasStripeProduct'],
|
|
137
|
+
'includedVoiceMinutes': value['includedVoiceMinutes'],
|
|
138
|
+
'features': value['features'],
|
|
139
|
+
'limits': value['limits'],
|
|
140
|
+
'overageRate': SubscriptionPlanSummaryOverageRateToJSON(value['overageRate']),
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
|
|
@@ -0,0 +1,73 @@
|
|
|
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 SubscriptionPlanSummaryOverageRate
|
|
20
|
+
*/
|
|
21
|
+
export interface SubscriptionPlanSummaryOverageRate {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof SubscriptionPlanSummaryOverageRate
|
|
26
|
+
*/
|
|
27
|
+
currency?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Stripe unit amount per metered unit, as a decimal string.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof SubscriptionPlanSummaryOverageRate
|
|
32
|
+
*/
|
|
33
|
+
unitAmountDecimal?: string | null;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the SubscriptionPlanSummaryOverageRate interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfSubscriptionPlanSummaryOverageRate(value: object): value is SubscriptionPlanSummaryOverageRate {
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function SubscriptionPlanSummaryOverageRateFromJSON(json: any): SubscriptionPlanSummaryOverageRate {
|
|
44
|
+
return SubscriptionPlanSummaryOverageRateFromJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function SubscriptionPlanSummaryOverageRateFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubscriptionPlanSummaryOverageRate {
|
|
48
|
+
if (json == null) {
|
|
49
|
+
return json;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
|
|
53
|
+
'currency': json['currency'] == null ? undefined : json['currency'],
|
|
54
|
+
'unitAmountDecimal': json['unitAmountDecimal'] == null ? undefined : json['unitAmountDecimal'],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function SubscriptionPlanSummaryOverageRateToJSON(json: any): SubscriptionPlanSummaryOverageRate {
|
|
59
|
+
return SubscriptionPlanSummaryOverageRateToJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function SubscriptionPlanSummaryOverageRateToJSONTyped(value?: SubscriptionPlanSummaryOverageRate | null, ignoreDiscriminator: boolean = false): any {
|
|
63
|
+
if (value == null) {
|
|
64
|
+
return value;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return {
|
|
68
|
+
|
|
69
|
+
'currency': value['currency'],
|
|
70
|
+
'unitAmountDecimal': value['unitAmountDecimal'],
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|