@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.
Files changed (141) hide show
  1. package/dist/api-client.d.ts +29 -4
  2. package/dist/api-client.js +22 -3
  3. package/dist/apis/AdminSubscriptionsApi.d.ts +82 -0
  4. package/dist/apis/AdminSubscriptionsApi.js +242 -0
  5. package/dist/apis/SubscriptionApi.d.ts +54 -75
  6. package/dist/apis/SubscriptionApi.js +95 -114
  7. package/dist/apis/VoiceUsageApi.d.ts +31 -0
  8. package/dist/apis/VoiceUsageApi.js +73 -0
  9. package/dist/apis/index.d.ts +2 -0
  10. package/dist/apis/index.js +2 -0
  11. package/dist/esm/api-client.d.ts +29 -4
  12. package/dist/esm/api-client.js +22 -3
  13. package/dist/esm/apis/AdminSubscriptionsApi.d.ts +82 -0
  14. package/dist/esm/apis/AdminSubscriptionsApi.js +238 -0
  15. package/dist/esm/apis/SubscriptionApi.d.ts +54 -75
  16. package/dist/esm/apis/SubscriptionApi.js +96 -115
  17. package/dist/esm/apis/VoiceUsageApi.d.ts +31 -0
  18. package/dist/esm/apis/VoiceUsageApi.js +69 -0
  19. package/dist/esm/apis/index.d.ts +2 -0
  20. package/dist/esm/apis/index.js +2 -0
  21. package/dist/esm/models/AdminGrantMinutesRequest.d.ts +38 -0
  22. package/dist/esm/models/AdminGrantMinutesRequest.js +45 -0
  23. package/dist/esm/models/AdminSetSubscriptionRequest.d.ts +86 -0
  24. package/dist/esm/models/AdminSetSubscriptionRequest.js +71 -0
  25. package/dist/esm/models/BillingPortalRequest.d.ts +1 -1
  26. package/dist/esm/models/BillingPortalResponse.d.ts +1 -1
  27. package/dist/esm/models/CancelSubscriptionRequest.d.ts +2 -2
  28. package/dist/esm/models/CheckoutSessionResponse.d.ts +2 -2
  29. package/dist/esm/models/CreateCheckoutSessionRequest.d.ts +21 -7
  30. package/dist/esm/models/CreateCheckoutSessionRequest.js +18 -5
  31. package/dist/esm/models/CurrentPeriodUsage.d.ts +59 -0
  32. package/dist/esm/models/CurrentPeriodUsage.js +62 -0
  33. package/dist/esm/models/LifecycleResponse.d.ts +50 -0
  34. package/dist/esm/models/LifecycleResponse.js +51 -0
  35. package/dist/esm/models/PauseSubscriptionRequest.d.ts +1 -1
  36. package/dist/esm/models/PlanCatalogEntry.d.ts +90 -0
  37. package/dist/esm/models/PlanCatalogEntry.js +73 -0
  38. package/dist/esm/models/PlanCatalogEntryOverageInner.d.ts +44 -0
  39. package/dist/esm/models/PlanCatalogEntryOverageInner.js +45 -0
  40. package/dist/esm/models/PlanCatalogPrice.d.ts +58 -0
  41. package/dist/esm/models/PlanCatalogPrice.js +60 -0
  42. package/dist/esm/models/SubscriptionPlanSummary.d.ts +83 -0
  43. package/dist/esm/models/SubscriptionPlanSummary.js +70 -0
  44. package/dist/esm/models/SubscriptionPlanSummaryOverageRate.d.ts +38 -0
  45. package/dist/esm/models/SubscriptionPlanSummaryOverageRate.js +43 -0
  46. package/dist/esm/models/SubscriptionStatus.d.ts +103 -10
  47. package/dist/esm/models/SubscriptionStatus.js +58 -9
  48. package/dist/esm/models/SubscriptionUsageSummary.d.ts +56 -0
  49. package/dist/esm/models/SubscriptionUsageSummary.js +57 -0
  50. package/dist/esm/models/UpdatePlanRequest.d.ts +13 -5
  51. package/dist/esm/models/UpdatePlanRequest.js +12 -3
  52. package/dist/esm/models/UsageBreakdownByAgent.d.ts +44 -0
  53. package/dist/esm/models/UsageBreakdownByAgent.js +49 -0
  54. package/dist/esm/models/UsageBreakdownByDay.d.ts +44 -0
  55. package/dist/esm/models/UsageBreakdownByDay.js +51 -0
  56. package/dist/esm/models/UsageHistoryResponse.d.ts +39 -0
  57. package/dist/esm/models/UsageHistoryResponse.js +48 -0
  58. package/dist/esm/models/UsageRecordDto.d.ts +80 -0
  59. package/dist/esm/models/UsageRecordDto.js +65 -0
  60. package/dist/esm/models/VoiceUsageReportRequest.d.ts +62 -0
  61. package/dist/esm/models/VoiceUsageReportRequest.js +57 -0
  62. package/dist/esm/models/VoiceUsageReportResponse.d.ts +51 -0
  63. package/dist/esm/models/VoiceUsageReportResponse.js +52 -0
  64. package/dist/esm/models/index.d.ts +16 -13
  65. package/dist/esm/models/index.js +16 -13
  66. package/dist/models/AdminGrantMinutesRequest.d.ts +38 -0
  67. package/dist/models/AdminGrantMinutesRequest.js +52 -0
  68. package/dist/models/AdminSetSubscriptionRequest.d.ts +86 -0
  69. package/dist/models/AdminSetSubscriptionRequest.js +79 -0
  70. package/dist/models/BillingPortalRequest.d.ts +1 -1
  71. package/dist/models/BillingPortalResponse.d.ts +1 -1
  72. package/dist/models/CancelSubscriptionRequest.d.ts +2 -2
  73. package/dist/models/CheckoutSessionResponse.d.ts +2 -2
  74. package/dist/models/CreateCheckoutSessionRequest.d.ts +21 -7
  75. package/dist/models/CreateCheckoutSessionRequest.js +19 -5
  76. package/dist/models/CurrentPeriodUsage.d.ts +59 -0
  77. package/dist/models/CurrentPeriodUsage.js +69 -0
  78. package/dist/models/LifecycleResponse.d.ts +50 -0
  79. package/dist/models/LifecycleResponse.js +58 -0
  80. package/dist/models/PauseSubscriptionRequest.d.ts +1 -1
  81. package/dist/models/PlanCatalogEntry.d.ts +90 -0
  82. package/dist/models/PlanCatalogEntry.js +80 -0
  83. package/dist/models/PlanCatalogEntryOverageInner.d.ts +44 -0
  84. package/dist/models/PlanCatalogEntryOverageInner.js +52 -0
  85. package/dist/models/PlanCatalogPrice.d.ts +58 -0
  86. package/dist/models/PlanCatalogPrice.js +68 -0
  87. package/dist/models/SubscriptionPlanSummary.d.ts +83 -0
  88. package/dist/models/SubscriptionPlanSummary.js +77 -0
  89. package/dist/models/SubscriptionPlanSummaryOverageRate.d.ts +38 -0
  90. package/dist/models/SubscriptionPlanSummaryOverageRate.js +50 -0
  91. package/dist/models/SubscriptionStatus.d.ts +103 -10
  92. package/dist/models/SubscriptionStatus.js +59 -9
  93. package/dist/models/SubscriptionUsageSummary.d.ts +56 -0
  94. package/dist/models/SubscriptionUsageSummary.js +64 -0
  95. package/dist/models/UpdatePlanRequest.d.ts +13 -5
  96. package/dist/models/UpdatePlanRequest.js +13 -3
  97. package/dist/models/UsageBreakdownByAgent.d.ts +44 -0
  98. package/dist/models/UsageBreakdownByAgent.js +56 -0
  99. package/dist/models/UsageBreakdownByDay.d.ts +44 -0
  100. package/dist/models/UsageBreakdownByDay.js +58 -0
  101. package/dist/models/UsageHistoryResponse.d.ts +39 -0
  102. package/dist/models/UsageHistoryResponse.js +55 -0
  103. package/dist/models/UsageRecordDto.d.ts +80 -0
  104. package/dist/models/UsageRecordDto.js +72 -0
  105. package/dist/models/VoiceUsageReportRequest.d.ts +62 -0
  106. package/dist/models/VoiceUsageReportRequest.js +64 -0
  107. package/dist/models/VoiceUsageReportResponse.d.ts +51 -0
  108. package/dist/models/VoiceUsageReportResponse.js +59 -0
  109. package/dist/models/index.d.ts +16 -13
  110. package/dist/models/index.js +16 -13
  111. package/package.json +1 -1
  112. package/src/api-client.ts +42 -6
  113. package/src/apis/AdminSubscriptionsApi.ts +327 -0
  114. package/src/apis/SubscriptionApi.ts +130 -162
  115. package/src/apis/VoiceUsageApi.ts +86 -0
  116. package/src/apis/index.ts +2 -0
  117. package/src/models/AdminGrantMinutesRequest.ts +74 -0
  118. package/src/models/AdminSetSubscriptionRequest.ts +136 -0
  119. package/src/models/BillingPortalRequest.ts +1 -1
  120. package/src/models/BillingPortalResponse.ts +1 -1
  121. package/src/models/CancelSubscriptionRequest.ts +2 -2
  122. package/src/models/CheckoutSessionResponse.ts +2 -2
  123. package/src/models/CreateCheckoutSessionRequest.ts +33 -12
  124. package/src/models/CurrentPeriodUsage.ts +124 -0
  125. package/src/models/LifecycleResponse.ts +91 -0
  126. package/src/models/PauseSubscriptionRequest.ts +1 -1
  127. package/src/models/PlanCatalogEntry.ts +158 -0
  128. package/src/models/PlanCatalogEntryOverageInner.ts +81 -0
  129. package/src/models/PlanCatalogPrice.ts +103 -0
  130. package/src/models/SubscriptionPlanSummary.ts +143 -0
  131. package/src/models/SubscriptionPlanSummaryOverageRate.ts +73 -0
  132. package/src/models/SubscriptionStatus.ts +150 -32
  133. package/src/models/SubscriptionUsageSummary.ts +101 -0
  134. package/src/models/UpdatePlanRequest.ts +20 -8
  135. package/src/models/UsageBreakdownByAgent.ts +83 -0
  136. package/src/models/UsageBreakdownByDay.ts +84 -0
  137. package/src/models/UsageHistoryResponse.ts +83 -0
  138. package/src/models/UsageRecordDto.ts +133 -0
  139. package/src/models/VoiceUsageReportRequest.ts +108 -0
  140. package/src/models/VoiceUsageReportResponse.ts +99 -0
  141. package/src/models/index.ts +16 -13
@@ -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
+ import { PlanCatalogPriceFromJSON, PlanCatalogPriceToJSON, } from './PlanCatalogPrice';
15
+ import { PlanCatalogEntryOverageInnerFromJSON, PlanCatalogEntryOverageInnerToJSON, } from './PlanCatalogEntryOverageInner';
16
+ /**
17
+ * Check if a given object implements the PlanCatalogEntry interface.
18
+ */
19
+ export function instanceOfPlanCatalogEntry(value) {
20
+ if (!('slug' in value) || value['slug'] === undefined)
21
+ return false;
22
+ if (!('name' in value) || value['name'] === undefined)
23
+ return false;
24
+ if (!('rank' in value) || value['rank'] === undefined)
25
+ return false;
26
+ if (!('includedVoiceMinutes' in value) || value['includedVoiceMinutes'] === undefined)
27
+ return false;
28
+ if (!('prices' in value) || value['prices'] === undefined)
29
+ return false;
30
+ if (!('overage' in value) || value['overage'] === undefined)
31
+ return false;
32
+ return true;
33
+ }
34
+ export function PlanCatalogEntryFromJSON(json) {
35
+ return PlanCatalogEntryFromJSONTyped(json, false);
36
+ }
37
+ export function PlanCatalogEntryFromJSONTyped(json, ignoreDiscriminator) {
38
+ if (json == null) {
39
+ return json;
40
+ }
41
+ return {
42
+ 'slug': json['slug'],
43
+ 'name': json['name'],
44
+ 'description': json['description'] == null ? undefined : json['description'],
45
+ 'rank': json['rank'],
46
+ 'hasStripeProduct': json['hasStripeProduct'] == null ? undefined : json['hasStripeProduct'],
47
+ 'includedVoiceMinutes': json['includedVoiceMinutes'],
48
+ 'features': json['features'] == null ? undefined : json['features'],
49
+ 'limits': json['limits'] == null ? undefined : json['limits'],
50
+ 'prices': (json['prices'].map(PlanCatalogPriceFromJSON)),
51
+ 'overage': (json['overage'].map(PlanCatalogEntryOverageInnerFromJSON)),
52
+ };
53
+ }
54
+ export function PlanCatalogEntryToJSON(json) {
55
+ return PlanCatalogEntryToJSONTyped(json, false);
56
+ }
57
+ export function PlanCatalogEntryToJSONTyped(value, ignoreDiscriminator = false) {
58
+ if (value == null) {
59
+ return value;
60
+ }
61
+ return {
62
+ 'slug': value['slug'],
63
+ 'name': value['name'],
64
+ 'description': value['description'],
65
+ 'rank': value['rank'],
66
+ 'hasStripeProduct': value['hasStripeProduct'],
67
+ 'includedVoiceMinutes': value['includedVoiceMinutes'],
68
+ 'features': value['features'],
69
+ 'limits': value['limits'],
70
+ 'prices': (value['prices'].map(PlanCatalogPriceToJSON)),
71
+ 'overage': (value['overage'].map(PlanCatalogEntryOverageInnerToJSON)),
72
+ };
73
+ }
@@ -0,0 +1,44 @@
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 PlanCatalogEntryOverageInner
16
+ */
17
+ export interface PlanCatalogEntryOverageInner {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof PlanCatalogEntryOverageInner
22
+ */
23
+ currency?: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof PlanCatalogEntryOverageInner
28
+ */
29
+ priceId?: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof PlanCatalogEntryOverageInner
34
+ */
35
+ unitAmountDecimal?: string | null;
36
+ }
37
+ /**
38
+ * Check if a given object implements the PlanCatalogEntryOverageInner interface.
39
+ */
40
+ export declare function instanceOfPlanCatalogEntryOverageInner(value: object): value is PlanCatalogEntryOverageInner;
41
+ export declare function PlanCatalogEntryOverageInnerFromJSON(json: any): PlanCatalogEntryOverageInner;
42
+ export declare function PlanCatalogEntryOverageInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlanCatalogEntryOverageInner;
43
+ export declare function PlanCatalogEntryOverageInnerToJSON(json: any): PlanCatalogEntryOverageInner;
44
+ export declare function PlanCatalogEntryOverageInnerToJSONTyped(value?: PlanCatalogEntryOverageInner | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,45 @@
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
+ * Check if a given object implements the PlanCatalogEntryOverageInner interface.
16
+ */
17
+ export function instanceOfPlanCatalogEntryOverageInner(value) {
18
+ return true;
19
+ }
20
+ export function PlanCatalogEntryOverageInnerFromJSON(json) {
21
+ return PlanCatalogEntryOverageInnerFromJSONTyped(json, false);
22
+ }
23
+ export function PlanCatalogEntryOverageInnerFromJSONTyped(json, ignoreDiscriminator) {
24
+ if (json == null) {
25
+ return json;
26
+ }
27
+ return {
28
+ 'currency': json['currency'] == null ? undefined : json['currency'],
29
+ 'priceId': json['priceId'] == null ? undefined : json['priceId'],
30
+ 'unitAmountDecimal': json['unitAmountDecimal'] == null ? undefined : json['unitAmountDecimal'],
31
+ };
32
+ }
33
+ export function PlanCatalogEntryOverageInnerToJSON(json) {
34
+ return PlanCatalogEntryOverageInnerToJSONTyped(json, false);
35
+ }
36
+ export function PlanCatalogEntryOverageInnerToJSONTyped(value, ignoreDiscriminator = false) {
37
+ if (value == null) {
38
+ return value;
39
+ }
40
+ return {
41
+ 'currency': value['currency'],
42
+ 'priceId': value['priceId'],
43
+ 'unitAmountDecimal': value['unitAmountDecimal'],
44
+ };
45
+ }
@@ -0,0 +1,58 @@
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 PlanCatalogPrice
16
+ */
17
+ export interface PlanCatalogPrice {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof PlanCatalogPrice
22
+ */
23
+ interval: PlanCatalogPriceIntervalEnum;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof PlanCatalogPrice
28
+ */
29
+ currency: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof PlanCatalogPrice
34
+ */
35
+ priceId: string;
36
+ /**
37
+ *
38
+ * @type {number}
39
+ * @memberof PlanCatalogPrice
40
+ */
41
+ unitAmount?: number | null;
42
+ }
43
+ /**
44
+ * @export
45
+ */
46
+ export declare const PlanCatalogPriceIntervalEnum: {
47
+ readonly Monthly: "monthly";
48
+ readonly Yearly: "yearly";
49
+ };
50
+ export type PlanCatalogPriceIntervalEnum = typeof PlanCatalogPriceIntervalEnum[keyof typeof PlanCatalogPriceIntervalEnum];
51
+ /**
52
+ * Check if a given object implements the PlanCatalogPrice interface.
53
+ */
54
+ export declare function instanceOfPlanCatalogPrice(value: object): value is PlanCatalogPrice;
55
+ export declare function PlanCatalogPriceFromJSON(json: any): PlanCatalogPrice;
56
+ export declare function PlanCatalogPriceFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlanCatalogPrice;
57
+ export declare function PlanCatalogPriceToJSON(json: any): PlanCatalogPrice;
58
+ export declare function PlanCatalogPriceToJSONTyped(value?: PlanCatalogPrice | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,60 @@
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
+ * @export
16
+ */
17
+ export const PlanCatalogPriceIntervalEnum = {
18
+ Monthly: 'monthly',
19
+ Yearly: 'yearly'
20
+ };
21
+ /**
22
+ * Check if a given object implements the PlanCatalogPrice interface.
23
+ */
24
+ export function instanceOfPlanCatalogPrice(value) {
25
+ if (!('interval' in value) || value['interval'] === undefined)
26
+ return false;
27
+ if (!('currency' in value) || value['currency'] === undefined)
28
+ return false;
29
+ if (!('priceId' in value) || value['priceId'] === undefined)
30
+ return false;
31
+ return true;
32
+ }
33
+ export function PlanCatalogPriceFromJSON(json) {
34
+ return PlanCatalogPriceFromJSONTyped(json, false);
35
+ }
36
+ export function PlanCatalogPriceFromJSONTyped(json, ignoreDiscriminator) {
37
+ if (json == null) {
38
+ return json;
39
+ }
40
+ return {
41
+ 'interval': json['interval'],
42
+ 'currency': json['currency'],
43
+ 'priceId': json['priceId'],
44
+ 'unitAmount': json['unitAmount'] == null ? undefined : json['unitAmount'],
45
+ };
46
+ }
47
+ export function PlanCatalogPriceToJSON(json) {
48
+ return PlanCatalogPriceToJSONTyped(json, false);
49
+ }
50
+ export function PlanCatalogPriceToJSONTyped(value, ignoreDiscriminator = false) {
51
+ if (value == null) {
52
+ return value;
53
+ }
54
+ return {
55
+ 'interval': value['interval'],
56
+ 'currency': value['currency'],
57
+ 'priceId': value['priceId'],
58
+ 'unitAmount': value['unitAmount'],
59
+ };
60
+ }
@@ -0,0 +1,83 @@
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 { SubscriptionPlanSummaryOverageRate } from './SubscriptionPlanSummaryOverageRate';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface SubscriptionPlanSummary
17
+ */
18
+ export interface SubscriptionPlanSummary {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof SubscriptionPlanSummary
23
+ */
24
+ slug: string;
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof SubscriptionPlanSummary
29
+ */
30
+ name: string;
31
+ /**
32
+ *
33
+ * @type {string}
34
+ * @memberof SubscriptionPlanSummary
35
+ */
36
+ description?: string;
37
+ /**
38
+ *
39
+ * @type {number}
40
+ * @memberof SubscriptionPlanSummary
41
+ */
42
+ rank: number;
43
+ /**
44
+ *
45
+ * @type {boolean}
46
+ * @memberof SubscriptionPlanSummary
47
+ */
48
+ hasStripeProduct?: boolean;
49
+ /**
50
+ * Voice minutes included per billing period before overage.
51
+ * @type {number}
52
+ * @memberof SubscriptionPlanSummary
53
+ */
54
+ includedVoiceMinutes: number;
55
+ /**
56
+ *
57
+ * @type {Array<string>}
58
+ * @memberof SubscriptionPlanSummary
59
+ */
60
+ features: Array<string>;
61
+ /**
62
+ *
63
+ * @type {{ [key: string]: number | null; }}
64
+ * @memberof SubscriptionPlanSummary
65
+ */
66
+ limits: {
67
+ [key: string]: number | null;
68
+ };
69
+ /**
70
+ *
71
+ * @type {SubscriptionPlanSummaryOverageRate}
72
+ * @memberof SubscriptionPlanSummary
73
+ */
74
+ overageRate?: SubscriptionPlanSummaryOverageRate | null;
75
+ }
76
+ /**
77
+ * Check if a given object implements the SubscriptionPlanSummary interface.
78
+ */
79
+ export declare function instanceOfSubscriptionPlanSummary(value: object): value is SubscriptionPlanSummary;
80
+ export declare function SubscriptionPlanSummaryFromJSON(json: any): SubscriptionPlanSummary;
81
+ export declare function SubscriptionPlanSummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubscriptionPlanSummary;
82
+ export declare function SubscriptionPlanSummaryToJSON(json: any): SubscriptionPlanSummary;
83
+ export declare function SubscriptionPlanSummaryToJSONTyped(value?: SubscriptionPlanSummary | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,70 @@
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
+ import { SubscriptionPlanSummaryOverageRateFromJSON, SubscriptionPlanSummaryOverageRateToJSON, } from './SubscriptionPlanSummaryOverageRate';
15
+ /**
16
+ * Check if a given object implements the SubscriptionPlanSummary interface.
17
+ */
18
+ export function instanceOfSubscriptionPlanSummary(value) {
19
+ if (!('slug' in value) || value['slug'] === undefined)
20
+ return false;
21
+ if (!('name' in value) || value['name'] === undefined)
22
+ return false;
23
+ if (!('rank' in value) || value['rank'] === undefined)
24
+ return false;
25
+ if (!('includedVoiceMinutes' in value) || value['includedVoiceMinutes'] === undefined)
26
+ return false;
27
+ if (!('features' in value) || value['features'] === undefined)
28
+ return false;
29
+ if (!('limits' in value) || value['limits'] === undefined)
30
+ return false;
31
+ return true;
32
+ }
33
+ export function SubscriptionPlanSummaryFromJSON(json) {
34
+ return SubscriptionPlanSummaryFromJSONTyped(json, false);
35
+ }
36
+ export function SubscriptionPlanSummaryFromJSONTyped(json, ignoreDiscriminator) {
37
+ if (json == null) {
38
+ return json;
39
+ }
40
+ return {
41
+ 'slug': json['slug'],
42
+ 'name': json['name'],
43
+ 'description': json['description'] == null ? undefined : json['description'],
44
+ 'rank': json['rank'],
45
+ 'hasStripeProduct': json['hasStripeProduct'] == null ? undefined : json['hasStripeProduct'],
46
+ 'includedVoiceMinutes': json['includedVoiceMinutes'],
47
+ 'features': json['features'],
48
+ 'limits': json['limits'],
49
+ 'overageRate': json['overageRate'] == null ? undefined : SubscriptionPlanSummaryOverageRateFromJSON(json['overageRate']),
50
+ };
51
+ }
52
+ export function SubscriptionPlanSummaryToJSON(json) {
53
+ return SubscriptionPlanSummaryToJSONTyped(json, false);
54
+ }
55
+ export function SubscriptionPlanSummaryToJSONTyped(value, ignoreDiscriminator = false) {
56
+ if (value == null) {
57
+ return value;
58
+ }
59
+ return {
60
+ 'slug': value['slug'],
61
+ 'name': value['name'],
62
+ 'description': value['description'],
63
+ 'rank': value['rank'],
64
+ 'hasStripeProduct': value['hasStripeProduct'],
65
+ 'includedVoiceMinutes': value['includedVoiceMinutes'],
66
+ 'features': value['features'],
67
+ 'limits': value['limits'],
68
+ 'overageRate': SubscriptionPlanSummaryOverageRateToJSON(value['overageRate']),
69
+ };
70
+ }
@@ -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 SubscriptionPlanSummaryOverageRate
16
+ */
17
+ export interface SubscriptionPlanSummaryOverageRate {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof SubscriptionPlanSummaryOverageRate
22
+ */
23
+ currency?: string;
24
+ /**
25
+ * Stripe unit amount per metered unit, as a decimal string.
26
+ * @type {string}
27
+ * @memberof SubscriptionPlanSummaryOverageRate
28
+ */
29
+ unitAmountDecimal?: string | null;
30
+ }
31
+ /**
32
+ * Check if a given object implements the SubscriptionPlanSummaryOverageRate interface.
33
+ */
34
+ export declare function instanceOfSubscriptionPlanSummaryOverageRate(value: object): value is SubscriptionPlanSummaryOverageRate;
35
+ export declare function SubscriptionPlanSummaryOverageRateFromJSON(json: any): SubscriptionPlanSummaryOverageRate;
36
+ export declare function SubscriptionPlanSummaryOverageRateFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubscriptionPlanSummaryOverageRate;
37
+ export declare function SubscriptionPlanSummaryOverageRateToJSON(json: any): SubscriptionPlanSummaryOverageRate;
38
+ export declare function SubscriptionPlanSummaryOverageRateToJSONTyped(value?: SubscriptionPlanSummaryOverageRate | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,43 @@
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
+ * Check if a given object implements the SubscriptionPlanSummaryOverageRate interface.
16
+ */
17
+ export function instanceOfSubscriptionPlanSummaryOverageRate(value) {
18
+ return true;
19
+ }
20
+ export function SubscriptionPlanSummaryOverageRateFromJSON(json) {
21
+ return SubscriptionPlanSummaryOverageRateFromJSONTyped(json, false);
22
+ }
23
+ export function SubscriptionPlanSummaryOverageRateFromJSONTyped(json, ignoreDiscriminator) {
24
+ if (json == null) {
25
+ return json;
26
+ }
27
+ return {
28
+ 'currency': json['currency'] == null ? undefined : json['currency'],
29
+ 'unitAmountDecimal': json['unitAmountDecimal'] == null ? undefined : json['unitAmountDecimal'],
30
+ };
31
+ }
32
+ export function SubscriptionPlanSummaryOverageRateToJSON(json) {
33
+ return SubscriptionPlanSummaryOverageRateToJSONTyped(json, false);
34
+ }
35
+ export function SubscriptionPlanSummaryOverageRateToJSONTyped(value, ignoreDiscriminator = false) {
36
+ if (value == null) {
37
+ return value;
38
+ }
39
+ return {
40
+ 'currency': value['currency'],
41
+ 'unitAmountDecimal': value['unitAmountDecimal'],
42
+ };
43
+ }
@@ -9,9 +9,8 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import type { SubscriptionStatusSubscription } from './SubscriptionStatusSubscription';
13
- import type { SubscriptionStatusPlan } from './SubscriptionStatusPlan';
14
- import type { SubscriptionStatusService } from './SubscriptionStatusService';
12
+ import type { SubscriptionPlanSummary } from './SubscriptionPlanSummary';
13
+ import type { SubscriptionUsageSummary } from './SubscriptionUsageSummary';
15
14
  /**
16
15
  *
17
16
  * @export
@@ -20,29 +19,123 @@ import type { SubscriptionStatusService } from './SubscriptionStatusService';
20
19
  export interface SubscriptionStatus {
21
20
  /**
22
21
  *
23
- * @type {SubscriptionStatusService}
22
+ * @type {string}
24
23
  * @memberof SubscriptionStatus
25
24
  */
26
- service?: SubscriptionStatusService;
25
+ id?: string | null;
27
26
  /**
28
27
  *
29
- * @type {SubscriptionStatusSubscription}
28
+ * @type {string}
30
29
  * @memberof SubscriptionStatus
31
30
  */
32
- subscription?: SubscriptionStatusSubscription | null;
31
+ organizationId?: string;
33
32
  /**
34
33
  *
35
- * @type {SubscriptionStatusPlan}
34
+ * @type {string}
36
35
  * @memberof SubscriptionStatus
37
36
  */
38
- plan?: SubscriptionStatusPlan | null;
37
+ status: SubscriptionStatusStatusEnum;
39
38
  /**
40
- * Whether the subscription is in an active state (active or trialing)
39
+ *
41
40
  * @type {boolean}
42
41
  * @memberof SubscriptionStatus
43
42
  */
44
43
  isActive: boolean;
44
+ /**
45
+ *
46
+ * @type {string}
47
+ * @memberof SubscriptionStatus
48
+ */
49
+ billingInterval?: SubscriptionStatusBillingIntervalEnum | null;
50
+ /**
51
+ *
52
+ * @type {string}
53
+ * @memberof SubscriptionStatus
54
+ */
55
+ currency: string;
56
+ /**
57
+ *
58
+ * @type {Date}
59
+ * @memberof SubscriptionStatus
60
+ */
61
+ currentPeriodStart?: Date | null;
62
+ /**
63
+ *
64
+ * @type {Date}
65
+ * @memberof SubscriptionStatus
66
+ */
67
+ currentPeriodEnd?: Date | null;
68
+ /**
69
+ *
70
+ * @type {boolean}
71
+ * @memberof SubscriptionStatus
72
+ */
73
+ cancelAtPeriodEnd?: boolean;
74
+ /**
75
+ *
76
+ * @type {Date}
77
+ * @memberof SubscriptionStatus
78
+ */
79
+ cancelAt?: Date | null;
80
+ /**
81
+ *
82
+ * @type {Date}
83
+ * @memberof SubscriptionStatus
84
+ */
85
+ canceledAt?: Date | null;
86
+ /**
87
+ *
88
+ * @type {Date}
89
+ * @memberof SubscriptionStatus
90
+ */
91
+ trialEnd?: Date | null;
92
+ /**
93
+ *
94
+ * @type {string}
95
+ * @memberof SubscriptionStatus
96
+ */
97
+ stripeCustomerId?: string | null;
98
+ /**
99
+ *
100
+ * @type {string}
101
+ * @memberof SubscriptionStatus
102
+ */
103
+ stripeSubscriptionId?: string | null;
104
+ /**
105
+ *
106
+ * @type {SubscriptionPlanSummary}
107
+ * @memberof SubscriptionStatus
108
+ */
109
+ plan: SubscriptionPlanSummary;
110
+ /**
111
+ *
112
+ * @type {SubscriptionUsageSummary}
113
+ * @memberof SubscriptionStatus
114
+ */
115
+ usage?: SubscriptionUsageSummary;
45
116
  }
117
+ /**
118
+ * @export
119
+ */
120
+ export declare const SubscriptionStatusStatusEnum: {
121
+ readonly Active: "active";
122
+ readonly PastDue: "past_due";
123
+ readonly Canceled: "canceled";
124
+ readonly Unpaid: "unpaid";
125
+ readonly Trialing: "trialing";
126
+ readonly Incomplete: "incomplete";
127
+ readonly IncompleteExpired: "incomplete_expired";
128
+ readonly Paused: "paused";
129
+ };
130
+ export type SubscriptionStatusStatusEnum = typeof SubscriptionStatusStatusEnum[keyof typeof SubscriptionStatusStatusEnum];
131
+ /**
132
+ * @export
133
+ */
134
+ export declare const SubscriptionStatusBillingIntervalEnum: {
135
+ readonly Monthly: "monthly";
136
+ readonly Yearly: "yearly";
137
+ };
138
+ export type SubscriptionStatusBillingIntervalEnum = typeof SubscriptionStatusBillingIntervalEnum[keyof typeof SubscriptionStatusBillingIntervalEnum];
46
139
  /**
47
140
  * Check if a given object implements the SubscriptionStatus interface.
48
141
  */