@l7mp/tivadar-ai-api-sdk 0.2.10 → 0.2.12

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.
Files changed (186) hide show
  1. package/dist/api-client.d.ts +46 -4
  2. package/dist/api-client.js +33 -3
  3. package/dist/apis/AdminSubscriptionsApi.d.ts +82 -0
  4. package/dist/apis/AdminSubscriptionsApi.js +243 -0
  5. package/dist/apis/CallFlagsApi.d.ts +133 -0
  6. package/dist/apis/CallFlagsApi.js +376 -0
  7. package/dist/apis/SubscriptionApi.d.ts +54 -75
  8. package/dist/apis/SubscriptionApi.js +95 -114
  9. package/dist/apis/VoiceUsageApi.d.ts +31 -0
  10. package/dist/apis/VoiceUsageApi.js +73 -0
  11. package/dist/apis/index.d.ts +3 -0
  12. package/dist/apis/index.js +3 -0
  13. package/dist/esm/api-client.d.ts +46 -4
  14. package/dist/esm/api-client.js +33 -3
  15. package/dist/esm/apis/AdminSubscriptionsApi.d.ts +82 -0
  16. package/dist/esm/apis/AdminSubscriptionsApi.js +239 -0
  17. package/dist/esm/apis/CallFlagsApi.d.ts +133 -0
  18. package/dist/esm/apis/CallFlagsApi.js +372 -0
  19. package/dist/esm/apis/SubscriptionApi.d.ts +54 -75
  20. package/dist/esm/apis/SubscriptionApi.js +96 -115
  21. package/dist/esm/apis/VoiceUsageApi.d.ts +31 -0
  22. package/dist/esm/apis/VoiceUsageApi.js +69 -0
  23. package/dist/esm/apis/index.d.ts +3 -0
  24. package/dist/esm/apis/index.js +3 -0
  25. package/dist/esm/models/AdminGrantMinutesRequest.d.ts +38 -0
  26. package/dist/esm/models/AdminGrantMinutesRequest.js +45 -0
  27. package/dist/esm/models/AdminSetSubscriptionRequest.d.ts +86 -0
  28. package/dist/esm/models/AdminSetSubscriptionRequest.js +71 -0
  29. package/dist/esm/models/AdminSubscriptionsListResponse.d.ts +39 -0
  30. package/dist/esm/models/AdminSubscriptionsListResponse.js +48 -0
  31. package/dist/esm/models/BillingPortalRequest.d.ts +1 -1
  32. package/dist/esm/models/BillingPortalResponse.d.ts +1 -1
  33. package/dist/esm/models/Call.d.ts +7 -0
  34. package/dist/esm/models/Call.js +3 -0
  35. package/dist/esm/models/CallFlag.d.ts +110 -0
  36. package/dist/esm/models/CallFlag.js +89 -0
  37. package/dist/esm/models/CallFlagCreate.d.ts +48 -0
  38. package/dist/esm/models/CallFlagCreate.js +54 -0
  39. package/dist/esm/models/CallFlagResolve.d.ts +32 -0
  40. package/dist/esm/models/CallFlagResolve.js +41 -0
  41. package/dist/esm/models/CallFlagUpdate.d.ts +48 -0
  42. package/dist/esm/models/CallFlagUpdate.js +52 -0
  43. package/dist/esm/models/CallFlagWithCall.d.ts +117 -0
  44. package/dist/esm/models/CallFlagWithCall.js +92 -0
  45. package/dist/esm/models/CallFlagWithCallAllOfCall.d.ts +56 -0
  46. package/dist/esm/models/CallFlagWithCallAllOfCall.js +49 -0
  47. package/dist/esm/models/CancelSubscriptionRequest.d.ts +2 -2
  48. package/dist/esm/models/CheckoutSessionResponse.d.ts +2 -2
  49. package/dist/esm/models/CreateCheckoutSessionRequest.d.ts +21 -7
  50. package/dist/esm/models/CreateCheckoutSessionRequest.js +18 -5
  51. package/dist/esm/models/CurrentPeriodUsage.d.ts +59 -0
  52. package/dist/esm/models/CurrentPeriodUsage.js +62 -0
  53. package/dist/esm/models/LifecycleResponse.d.ts +50 -0
  54. package/dist/esm/models/LifecycleResponse.js +51 -0
  55. package/dist/esm/models/PauseSubscriptionRequest.d.ts +1 -1
  56. package/dist/esm/models/PlanCatalogEntry.d.ts +90 -0
  57. package/dist/esm/models/PlanCatalogEntry.js +73 -0
  58. package/dist/esm/models/PlanCatalogEntryOverageInner.d.ts +44 -0
  59. package/dist/esm/models/PlanCatalogEntryOverageInner.js +45 -0
  60. package/dist/esm/models/PlanCatalogPrice.d.ts +58 -0
  61. package/dist/esm/models/PlanCatalogPrice.js +60 -0
  62. package/dist/esm/models/SubscriptionPlanSummary.d.ts +83 -0
  63. package/dist/esm/models/SubscriptionPlanSummary.js +70 -0
  64. package/dist/esm/models/SubscriptionPlanSummaryOverageRate.d.ts +38 -0
  65. package/dist/esm/models/SubscriptionPlanSummaryOverageRate.js +43 -0
  66. package/dist/esm/models/SubscriptionStatus.d.ts +103 -10
  67. package/dist/esm/models/SubscriptionStatus.js +58 -9
  68. package/dist/esm/models/SubscriptionUsageSummary.d.ts +56 -0
  69. package/dist/esm/models/SubscriptionUsageSummary.js +57 -0
  70. package/dist/esm/models/UpdatePlanRequest.d.ts +13 -5
  71. package/dist/esm/models/UpdatePlanRequest.js +12 -3
  72. package/dist/esm/models/UsageBreakdownByAgent.d.ts +44 -0
  73. package/dist/esm/models/UsageBreakdownByAgent.js +49 -0
  74. package/dist/esm/models/UsageBreakdownByDay.d.ts +44 -0
  75. package/dist/esm/models/UsageBreakdownByDay.js +51 -0
  76. package/dist/esm/models/UsageHistoryResponse.d.ts +39 -0
  77. package/dist/esm/models/UsageHistoryResponse.js +48 -0
  78. package/dist/esm/models/UsageRecordDto.d.ts +80 -0
  79. package/dist/esm/models/UsageRecordDto.js +65 -0
  80. package/dist/esm/models/VoiceUsageReportRequest.d.ts +62 -0
  81. package/dist/esm/models/VoiceUsageReportRequest.js +57 -0
  82. package/dist/esm/models/VoiceUsageReportResponse.d.ts +51 -0
  83. package/dist/esm/models/VoiceUsageReportResponse.js +52 -0
  84. package/dist/esm/models/index.d.ts +23 -13
  85. package/dist/esm/models/index.js +23 -13
  86. package/dist/models/AdminGrantMinutesRequest.d.ts +38 -0
  87. package/dist/models/AdminGrantMinutesRequest.js +52 -0
  88. package/dist/models/AdminSetSubscriptionRequest.d.ts +86 -0
  89. package/dist/models/AdminSetSubscriptionRequest.js +79 -0
  90. package/dist/models/AdminSubscriptionsListResponse.d.ts +39 -0
  91. package/dist/models/AdminSubscriptionsListResponse.js +55 -0
  92. package/dist/models/BillingPortalRequest.d.ts +1 -1
  93. package/dist/models/BillingPortalResponse.d.ts +1 -1
  94. package/dist/models/Call.d.ts +7 -0
  95. package/dist/models/Call.js +3 -0
  96. package/dist/models/CallFlag.d.ts +110 -0
  97. package/dist/models/CallFlag.js +97 -0
  98. package/dist/models/CallFlagCreate.d.ts +48 -0
  99. package/dist/models/CallFlagCreate.js +62 -0
  100. package/dist/models/CallFlagResolve.d.ts +32 -0
  101. package/dist/models/CallFlagResolve.js +48 -0
  102. package/dist/models/CallFlagUpdate.d.ts +48 -0
  103. package/dist/models/CallFlagUpdate.js +60 -0
  104. package/dist/models/CallFlagWithCall.d.ts +117 -0
  105. package/dist/models/CallFlagWithCall.js +100 -0
  106. package/dist/models/CallFlagWithCallAllOfCall.d.ts +56 -0
  107. package/dist/models/CallFlagWithCallAllOfCall.js +56 -0
  108. package/dist/models/CancelSubscriptionRequest.d.ts +2 -2
  109. package/dist/models/CheckoutSessionResponse.d.ts +2 -2
  110. package/dist/models/CreateCheckoutSessionRequest.d.ts +21 -7
  111. package/dist/models/CreateCheckoutSessionRequest.js +19 -5
  112. package/dist/models/CurrentPeriodUsage.d.ts +59 -0
  113. package/dist/models/CurrentPeriodUsage.js +69 -0
  114. package/dist/models/LifecycleResponse.d.ts +50 -0
  115. package/dist/models/LifecycleResponse.js +58 -0
  116. package/dist/models/PauseSubscriptionRequest.d.ts +1 -1
  117. package/dist/models/PlanCatalogEntry.d.ts +90 -0
  118. package/dist/models/PlanCatalogEntry.js +80 -0
  119. package/dist/models/PlanCatalogEntryOverageInner.d.ts +44 -0
  120. package/dist/models/PlanCatalogEntryOverageInner.js +52 -0
  121. package/dist/models/PlanCatalogPrice.d.ts +58 -0
  122. package/dist/models/PlanCatalogPrice.js +68 -0
  123. package/dist/models/SubscriptionPlanSummary.d.ts +83 -0
  124. package/dist/models/SubscriptionPlanSummary.js +77 -0
  125. package/dist/models/SubscriptionPlanSummaryOverageRate.d.ts +38 -0
  126. package/dist/models/SubscriptionPlanSummaryOverageRate.js +50 -0
  127. package/dist/models/SubscriptionStatus.d.ts +103 -10
  128. package/dist/models/SubscriptionStatus.js +59 -9
  129. package/dist/models/SubscriptionUsageSummary.d.ts +56 -0
  130. package/dist/models/SubscriptionUsageSummary.js +64 -0
  131. package/dist/models/UpdatePlanRequest.d.ts +13 -5
  132. package/dist/models/UpdatePlanRequest.js +13 -3
  133. package/dist/models/UsageBreakdownByAgent.d.ts +44 -0
  134. package/dist/models/UsageBreakdownByAgent.js +56 -0
  135. package/dist/models/UsageBreakdownByDay.d.ts +44 -0
  136. package/dist/models/UsageBreakdownByDay.js +58 -0
  137. package/dist/models/UsageHistoryResponse.d.ts +39 -0
  138. package/dist/models/UsageHistoryResponse.js +55 -0
  139. package/dist/models/UsageRecordDto.d.ts +80 -0
  140. package/dist/models/UsageRecordDto.js +72 -0
  141. package/dist/models/VoiceUsageReportRequest.d.ts +62 -0
  142. package/dist/models/VoiceUsageReportRequest.js +64 -0
  143. package/dist/models/VoiceUsageReportResponse.d.ts +51 -0
  144. package/dist/models/VoiceUsageReportResponse.js +59 -0
  145. package/dist/models/index.d.ts +23 -13
  146. package/dist/models/index.js +23 -13
  147. package/package.json +1 -1
  148. package/src/api-client.ts +71 -6
  149. package/src/apis/AdminSubscriptionsApi.ts +331 -0
  150. package/src/apis/CallFlagsApi.ts +546 -0
  151. package/src/apis/SubscriptionApi.ts +130 -162
  152. package/src/apis/VoiceUsageApi.ts +86 -0
  153. package/src/apis/index.ts +3 -0
  154. package/src/models/AdminGrantMinutesRequest.ts +74 -0
  155. package/src/models/AdminSetSubscriptionRequest.ts +136 -0
  156. package/src/models/AdminSubscriptionsListResponse.ts +83 -0
  157. package/src/models/BillingPortalRequest.ts +1 -1
  158. package/src/models/BillingPortalResponse.ts +1 -1
  159. package/src/models/Call.ts +16 -0
  160. package/src/models/CallFlag.ts +173 -0
  161. package/src/models/CallFlagCreate.ts +87 -0
  162. package/src/models/CallFlagResolve.ts +65 -0
  163. package/src/models/CallFlagUpdate.ts +86 -0
  164. package/src/models/CallFlagWithCall.ts +189 -0
  165. package/src/models/CallFlagWithCallAllOfCall.ts +97 -0
  166. package/src/models/CancelSubscriptionRequest.ts +2 -2
  167. package/src/models/CheckoutSessionResponse.ts +2 -2
  168. package/src/models/CreateCheckoutSessionRequest.ts +33 -12
  169. package/src/models/CurrentPeriodUsage.ts +124 -0
  170. package/src/models/LifecycleResponse.ts +91 -0
  171. package/src/models/PauseSubscriptionRequest.ts +1 -1
  172. package/src/models/PlanCatalogEntry.ts +158 -0
  173. package/src/models/PlanCatalogEntryOverageInner.ts +81 -0
  174. package/src/models/PlanCatalogPrice.ts +103 -0
  175. package/src/models/SubscriptionPlanSummary.ts +143 -0
  176. package/src/models/SubscriptionPlanSummaryOverageRate.ts +73 -0
  177. package/src/models/SubscriptionStatus.ts +150 -32
  178. package/src/models/SubscriptionUsageSummary.ts +101 -0
  179. package/src/models/UpdatePlanRequest.ts +20 -8
  180. package/src/models/UsageBreakdownByAgent.ts +83 -0
  181. package/src/models/UsageBreakdownByDay.ts +84 -0
  182. package/src/models/UsageHistoryResponse.ts +83 -0
  183. package/src/models/UsageRecordDto.ts +133 -0
  184. package/src/models/VoiceUsageReportRequest.ts +108 -0
  185. package/src/models/VoiceUsageReportResponse.ts +99 -0
  186. package/src/models/index.ts +23 -13
@@ -0,0 +1,124 @@
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 { UsageBreakdownByDay } from './UsageBreakdownByDay';
17
+ import {
18
+ UsageBreakdownByDayFromJSON,
19
+ UsageBreakdownByDayFromJSONTyped,
20
+ UsageBreakdownByDayToJSON,
21
+ UsageBreakdownByDayToJSONTyped,
22
+ } from './UsageBreakdownByDay';
23
+ import type { SubscriptionUsageSummary } from './SubscriptionUsageSummary';
24
+ import {
25
+ SubscriptionUsageSummaryFromJSON,
26
+ SubscriptionUsageSummaryFromJSONTyped,
27
+ SubscriptionUsageSummaryToJSON,
28
+ SubscriptionUsageSummaryToJSONTyped,
29
+ } from './SubscriptionUsageSummary';
30
+ import type { UsageBreakdownByAgent } from './UsageBreakdownByAgent';
31
+ import {
32
+ UsageBreakdownByAgentFromJSON,
33
+ UsageBreakdownByAgentFromJSONTyped,
34
+ UsageBreakdownByAgentToJSON,
35
+ UsageBreakdownByAgentToJSONTyped,
36
+ } from './UsageBreakdownByAgent';
37
+
38
+ /**
39
+ *
40
+ * @export
41
+ * @interface CurrentPeriodUsage
42
+ */
43
+ export interface CurrentPeriodUsage {
44
+ /**
45
+ *
46
+ * @type {Date}
47
+ * @memberof CurrentPeriodUsage
48
+ */
49
+ periodStart: Date | null;
50
+ /**
51
+ *
52
+ * @type {Date}
53
+ * @memberof CurrentPeriodUsage
54
+ */
55
+ periodEnd: Date | null;
56
+ /**
57
+ *
58
+ * @type {SubscriptionUsageSummary}
59
+ * @memberof CurrentPeriodUsage
60
+ */
61
+ usage: SubscriptionUsageSummary;
62
+ /**
63
+ *
64
+ * @type {Array<UsageBreakdownByDay>}
65
+ * @memberof CurrentPeriodUsage
66
+ */
67
+ byDay: Array<UsageBreakdownByDay>;
68
+ /**
69
+ *
70
+ * @type {Array<UsageBreakdownByAgent>}
71
+ * @memberof CurrentPeriodUsage
72
+ */
73
+ byAgent: Array<UsageBreakdownByAgent>;
74
+ }
75
+
76
+ /**
77
+ * Check if a given object implements the CurrentPeriodUsage interface.
78
+ */
79
+ export function instanceOfCurrentPeriodUsage(value: object): value is CurrentPeriodUsage {
80
+ if (!('periodStart' in value) || value['periodStart'] === undefined) return false;
81
+ if (!('periodEnd' in value) || value['periodEnd'] === undefined) return false;
82
+ if (!('usage' in value) || value['usage'] === undefined) return false;
83
+ if (!('byDay' in value) || value['byDay'] === undefined) return false;
84
+ if (!('byAgent' in value) || value['byAgent'] === undefined) return false;
85
+ return true;
86
+ }
87
+
88
+ export function CurrentPeriodUsageFromJSON(json: any): CurrentPeriodUsage {
89
+ return CurrentPeriodUsageFromJSONTyped(json, false);
90
+ }
91
+
92
+ export function CurrentPeriodUsageFromJSONTyped(json: any, ignoreDiscriminator: boolean): CurrentPeriodUsage {
93
+ if (json == null) {
94
+ return json;
95
+ }
96
+ return {
97
+
98
+ 'periodStart': (json['periodStart'] == null ? null : new Date(json['periodStart'])),
99
+ 'periodEnd': (json['periodEnd'] == null ? null : new Date(json['periodEnd'])),
100
+ 'usage': SubscriptionUsageSummaryFromJSON(json['usage']),
101
+ 'byDay': ((json['byDay'] as Array<any>).map(UsageBreakdownByDayFromJSON)),
102
+ 'byAgent': ((json['byAgent'] as Array<any>).map(UsageBreakdownByAgentFromJSON)),
103
+ };
104
+ }
105
+
106
+ export function CurrentPeriodUsageToJSON(json: any): CurrentPeriodUsage {
107
+ return CurrentPeriodUsageToJSONTyped(json, false);
108
+ }
109
+
110
+ export function CurrentPeriodUsageToJSONTyped(value?: CurrentPeriodUsage | null, ignoreDiscriminator: boolean = false): any {
111
+ if (value == null) {
112
+ return value;
113
+ }
114
+
115
+ return {
116
+
117
+ 'periodStart': value['periodStart'] == null ? value['periodStart'] : value['periodStart'].toISOString(),
118
+ 'periodEnd': value['periodEnd'] == null ? value['periodEnd'] : value['periodEnd'].toISOString(),
119
+ 'usage': SubscriptionUsageSummaryToJSON(value['usage']),
120
+ 'byDay': ((value['byDay'] as Array<any>).map(UsageBreakdownByDayToJSON)),
121
+ 'byAgent': ((value['byAgent'] as Array<any>).map(UsageBreakdownByAgentToJSON)),
122
+ };
123
+ }
124
+
@@ -0,0 +1,91 @@
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 LifecycleResponse
20
+ */
21
+ export interface LifecycleResponse {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof LifecycleResponse
26
+ */
27
+ subscriptionId: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof LifecycleResponse
32
+ */
33
+ status: string;
34
+ /**
35
+ *
36
+ * @type {boolean}
37
+ * @memberof LifecycleResponse
38
+ */
39
+ cancelAtPeriodEnd?: boolean;
40
+ /**
41
+ *
42
+ * @type {Date}
43
+ * @memberof LifecycleResponse
44
+ */
45
+ currentPeriodEnd?: Date | null;
46
+ }
47
+
48
+ /**
49
+ * Check if a given object implements the LifecycleResponse interface.
50
+ */
51
+ export function instanceOfLifecycleResponse(value: object): value is LifecycleResponse {
52
+ if (!('subscriptionId' in value) || value['subscriptionId'] === undefined) return false;
53
+ if (!('status' in value) || value['status'] === undefined) return false;
54
+ return true;
55
+ }
56
+
57
+ export function LifecycleResponseFromJSON(json: any): LifecycleResponse {
58
+ return LifecycleResponseFromJSONTyped(json, false);
59
+ }
60
+
61
+ export function LifecycleResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): LifecycleResponse {
62
+ if (json == null) {
63
+ return json;
64
+ }
65
+ return {
66
+
67
+ 'subscriptionId': json['subscriptionId'],
68
+ 'status': json['status'],
69
+ 'cancelAtPeriodEnd': json['cancelAtPeriodEnd'] == null ? undefined : json['cancelAtPeriodEnd'],
70
+ 'currentPeriodEnd': json['currentPeriodEnd'] == null ? undefined : (new Date(json['currentPeriodEnd'])),
71
+ };
72
+ }
73
+
74
+ export function LifecycleResponseToJSON(json: any): LifecycleResponse {
75
+ return LifecycleResponseToJSONTyped(json, false);
76
+ }
77
+
78
+ export function LifecycleResponseToJSONTyped(value?: LifecycleResponse | null, ignoreDiscriminator: boolean = false): any {
79
+ if (value == null) {
80
+ return value;
81
+ }
82
+
83
+ return {
84
+
85
+ 'subscriptionId': value['subscriptionId'],
86
+ 'status': value['status'],
87
+ 'cancelAtPeriodEnd': value['cancelAtPeriodEnd'],
88
+ 'currentPeriodEnd': value['currentPeriodEnd'] == null ? value['currentPeriodEnd'] : value['currentPeriodEnd'].toISOString(),
89
+ };
90
+ }
91
+
@@ -20,7 +20,7 @@ import { mapValues } from '../runtime';
20
20
  */
21
21
  export interface PauseSubscriptionRequest {
22
22
  /**
23
- * Optional date to automatically resume payment collection
23
+ *
24
24
  * @type {Date}
25
25
  * @memberof PauseSubscriptionRequest
26
26
  */
@@ -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
+