@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.
Files changed (146) 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/VoiceAgentMetadata.d.ts +6 -0
  61. package/dist/esm/models/VoiceAgentMetadata.js +2 -0
  62. package/dist/esm/models/VoiceUsageReportRequest.d.ts +62 -0
  63. package/dist/esm/models/VoiceUsageReportRequest.js +57 -0
  64. package/dist/esm/models/VoiceUsageReportResponse.d.ts +51 -0
  65. package/dist/esm/models/VoiceUsageReportResponse.js +52 -0
  66. package/dist/esm/models/index.d.ts +16 -13
  67. package/dist/esm/models/index.js +16 -13
  68. package/dist/models/AdminGrantMinutesRequest.d.ts +38 -0
  69. package/dist/models/AdminGrantMinutesRequest.js +52 -0
  70. package/dist/models/AdminSetSubscriptionRequest.d.ts +86 -0
  71. package/dist/models/AdminSetSubscriptionRequest.js +79 -0
  72. package/dist/models/BillingPortalRequest.d.ts +1 -1
  73. package/dist/models/BillingPortalResponse.d.ts +1 -1
  74. package/dist/models/CancelSubscriptionRequest.d.ts +2 -2
  75. package/dist/models/CheckoutSessionResponse.d.ts +2 -2
  76. package/dist/models/CreateCheckoutSessionRequest.d.ts +21 -7
  77. package/dist/models/CreateCheckoutSessionRequest.js +19 -5
  78. package/dist/models/CurrentPeriodUsage.d.ts +59 -0
  79. package/dist/models/CurrentPeriodUsage.js +69 -0
  80. package/dist/models/LifecycleResponse.d.ts +50 -0
  81. package/dist/models/LifecycleResponse.js +58 -0
  82. package/dist/models/PauseSubscriptionRequest.d.ts +1 -1
  83. package/dist/models/PlanCatalogEntry.d.ts +90 -0
  84. package/dist/models/PlanCatalogEntry.js +80 -0
  85. package/dist/models/PlanCatalogEntryOverageInner.d.ts +44 -0
  86. package/dist/models/PlanCatalogEntryOverageInner.js +52 -0
  87. package/dist/models/PlanCatalogPrice.d.ts +58 -0
  88. package/dist/models/PlanCatalogPrice.js +68 -0
  89. package/dist/models/SubscriptionPlanSummary.d.ts +83 -0
  90. package/dist/models/SubscriptionPlanSummary.js +77 -0
  91. package/dist/models/SubscriptionPlanSummaryOverageRate.d.ts +38 -0
  92. package/dist/models/SubscriptionPlanSummaryOverageRate.js +50 -0
  93. package/dist/models/SubscriptionStatus.d.ts +103 -10
  94. package/dist/models/SubscriptionStatus.js +59 -9
  95. package/dist/models/SubscriptionUsageSummary.d.ts +56 -0
  96. package/dist/models/SubscriptionUsageSummary.js +64 -0
  97. package/dist/models/UpdatePlanRequest.d.ts +13 -5
  98. package/dist/models/UpdatePlanRequest.js +13 -3
  99. package/dist/models/UsageBreakdownByAgent.d.ts +44 -0
  100. package/dist/models/UsageBreakdownByAgent.js +56 -0
  101. package/dist/models/UsageBreakdownByDay.d.ts +44 -0
  102. package/dist/models/UsageBreakdownByDay.js +58 -0
  103. package/dist/models/UsageHistoryResponse.d.ts +39 -0
  104. package/dist/models/UsageHistoryResponse.js +55 -0
  105. package/dist/models/UsageRecordDto.d.ts +80 -0
  106. package/dist/models/UsageRecordDto.js +72 -0
  107. package/dist/models/VoiceAgentMetadata.d.ts +6 -0
  108. package/dist/models/VoiceAgentMetadata.js +2 -0
  109. package/dist/models/VoiceUsageReportRequest.d.ts +62 -0
  110. package/dist/models/VoiceUsageReportRequest.js +64 -0
  111. package/dist/models/VoiceUsageReportResponse.d.ts +51 -0
  112. package/dist/models/VoiceUsageReportResponse.js +59 -0
  113. package/dist/models/index.d.ts +16 -13
  114. package/dist/models/index.js +16 -13
  115. package/package.json +1 -1
  116. package/src/api-client.ts +42 -6
  117. package/src/apis/AdminSubscriptionsApi.ts +327 -0
  118. package/src/apis/SubscriptionApi.ts +130 -162
  119. package/src/apis/VoiceUsageApi.ts +86 -0
  120. package/src/apis/index.ts +2 -0
  121. package/src/models/AdminGrantMinutesRequest.ts +74 -0
  122. package/src/models/AdminSetSubscriptionRequest.ts +136 -0
  123. package/src/models/BillingPortalRequest.ts +1 -1
  124. package/src/models/BillingPortalResponse.ts +1 -1
  125. package/src/models/CancelSubscriptionRequest.ts +2 -2
  126. package/src/models/CheckoutSessionResponse.ts +2 -2
  127. package/src/models/CreateCheckoutSessionRequest.ts +33 -12
  128. package/src/models/CurrentPeriodUsage.ts +124 -0
  129. package/src/models/LifecycleResponse.ts +91 -0
  130. package/src/models/PauseSubscriptionRequest.ts +1 -1
  131. package/src/models/PlanCatalogEntry.ts +158 -0
  132. package/src/models/PlanCatalogEntryOverageInner.ts +81 -0
  133. package/src/models/PlanCatalogPrice.ts +103 -0
  134. package/src/models/SubscriptionPlanSummary.ts +143 -0
  135. package/src/models/SubscriptionPlanSummaryOverageRate.ts +73 -0
  136. package/src/models/SubscriptionStatus.ts +150 -32
  137. package/src/models/SubscriptionUsageSummary.ts +101 -0
  138. package/src/models/UpdatePlanRequest.ts +20 -8
  139. package/src/models/UsageBreakdownByAgent.ts +83 -0
  140. package/src/models/UsageBreakdownByDay.ts +84 -0
  141. package/src/models/UsageHistoryResponse.ts +83 -0
  142. package/src/models/UsageRecordDto.ts +133 -0
  143. package/src/models/VoiceAgentMetadata.ts +8 -0
  144. package/src/models/VoiceUsageReportRequest.ts +108 -0
  145. package/src/models/VoiceUsageReportResponse.ts +99 -0
  146. package/src/models/index.ts +16 -13
@@ -11,15 +11,40 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
- import { SubscriptionStatusSubscriptionFromJSON, SubscriptionStatusSubscriptionToJSON, } from './SubscriptionStatusSubscription';
15
- import { SubscriptionStatusPlanFromJSON, SubscriptionStatusPlanToJSON, } from './SubscriptionStatusPlan';
16
- import { SubscriptionStatusServiceFromJSON, SubscriptionStatusServiceToJSON, } from './SubscriptionStatusService';
14
+ import { SubscriptionPlanSummaryFromJSON, SubscriptionPlanSummaryToJSON, } from './SubscriptionPlanSummary';
15
+ import { SubscriptionUsageSummaryFromJSON, SubscriptionUsageSummaryToJSON, } from './SubscriptionUsageSummary';
16
+ /**
17
+ * @export
18
+ */
19
+ export const SubscriptionStatusStatusEnum = {
20
+ Active: 'active',
21
+ PastDue: 'past_due',
22
+ Canceled: 'canceled',
23
+ Unpaid: 'unpaid',
24
+ Trialing: 'trialing',
25
+ Incomplete: 'incomplete',
26
+ IncompleteExpired: 'incomplete_expired',
27
+ Paused: 'paused'
28
+ };
29
+ /**
30
+ * @export
31
+ */
32
+ export const SubscriptionStatusBillingIntervalEnum = {
33
+ Monthly: 'monthly',
34
+ Yearly: 'yearly'
35
+ };
17
36
  /**
18
37
  * Check if a given object implements the SubscriptionStatus interface.
19
38
  */
20
39
  export function instanceOfSubscriptionStatus(value) {
40
+ if (!('status' in value) || value['status'] === undefined)
41
+ return false;
21
42
  if (!('isActive' in value) || value['isActive'] === undefined)
22
43
  return false;
44
+ if (!('currency' in value) || value['currency'] === undefined)
45
+ return false;
46
+ if (!('plan' in value) || value['plan'] === undefined)
47
+ return false;
23
48
  return true;
24
49
  }
25
50
  export function SubscriptionStatusFromJSON(json) {
@@ -30,10 +55,22 @@ export function SubscriptionStatusFromJSONTyped(json, ignoreDiscriminator) {
30
55
  return json;
31
56
  }
32
57
  return {
33
- 'service': json['service'] == null ? undefined : SubscriptionStatusServiceFromJSON(json['service']),
34
- 'subscription': json['subscription'] == null ? undefined : SubscriptionStatusSubscriptionFromJSON(json['subscription']),
35
- 'plan': json['plan'] == null ? undefined : SubscriptionStatusPlanFromJSON(json['plan']),
58
+ 'id': json['id'] == null ? undefined : json['id'],
59
+ 'organizationId': json['organizationId'] == null ? undefined : json['organizationId'],
60
+ 'status': json['status'],
36
61
  'isActive': json['isActive'],
62
+ 'billingInterval': json['billingInterval'] == null ? undefined : json['billingInterval'],
63
+ 'currency': json['currency'],
64
+ 'currentPeriodStart': json['currentPeriodStart'] == null ? undefined : (new Date(json['currentPeriodStart'])),
65
+ 'currentPeriodEnd': json['currentPeriodEnd'] == null ? undefined : (new Date(json['currentPeriodEnd'])),
66
+ 'cancelAtPeriodEnd': json['cancelAtPeriodEnd'] == null ? undefined : json['cancelAtPeriodEnd'],
67
+ 'cancelAt': json['cancelAt'] == null ? undefined : (new Date(json['cancelAt'])),
68
+ 'canceledAt': json['canceledAt'] == null ? undefined : (new Date(json['canceledAt'])),
69
+ 'trialEnd': json['trialEnd'] == null ? undefined : (new Date(json['trialEnd'])),
70
+ 'stripeCustomerId': json['stripeCustomerId'] == null ? undefined : json['stripeCustomerId'],
71
+ 'stripeSubscriptionId': json['stripeSubscriptionId'] == null ? undefined : json['stripeSubscriptionId'],
72
+ 'plan': SubscriptionPlanSummaryFromJSON(json['plan']),
73
+ 'usage': json['usage'] == null ? undefined : SubscriptionUsageSummaryFromJSON(json['usage']),
37
74
  };
38
75
  }
39
76
  export function SubscriptionStatusToJSON(json) {
@@ -44,9 +81,21 @@ export function SubscriptionStatusToJSONTyped(value, ignoreDiscriminator = false
44
81
  return value;
45
82
  }
46
83
  return {
47
- 'service': SubscriptionStatusServiceToJSON(value['service']),
48
- 'subscription': SubscriptionStatusSubscriptionToJSON(value['subscription']),
49
- 'plan': SubscriptionStatusPlanToJSON(value['plan']),
84
+ 'id': value['id'],
85
+ 'organizationId': value['organizationId'],
86
+ 'status': value['status'],
50
87
  'isActive': value['isActive'],
88
+ 'billingInterval': value['billingInterval'],
89
+ 'currency': value['currency'],
90
+ 'currentPeriodStart': value['currentPeriodStart'] == null ? value['currentPeriodStart'] : value['currentPeriodStart'].toISOString(),
91
+ 'currentPeriodEnd': value['currentPeriodEnd'] == null ? value['currentPeriodEnd'] : value['currentPeriodEnd'].toISOString(),
92
+ 'cancelAtPeriodEnd': value['cancelAtPeriodEnd'],
93
+ 'cancelAt': value['cancelAt'] == null ? value['cancelAt'] : value['cancelAt'].toISOString(),
94
+ 'canceledAt': value['canceledAt'] == null ? value['canceledAt'] : value['canceledAt'].toISOString(),
95
+ 'trialEnd': value['trialEnd'] == null ? value['trialEnd'] : value['trialEnd'].toISOString(),
96
+ 'stripeCustomerId': value['stripeCustomerId'],
97
+ 'stripeSubscriptionId': value['stripeSubscriptionId'],
98
+ 'plan': SubscriptionPlanSummaryToJSON(value['plan']),
99
+ 'usage': SubscriptionUsageSummaryToJSON(value['usage']),
51
100
  };
52
101
  }
@@ -0,0 +1,56 @@
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 SubscriptionUsageSummary
16
+ */
17
+ export interface SubscriptionUsageSummary {
18
+ /**
19
+ *
20
+ * @type {number}
21
+ * @memberof SubscriptionUsageSummary
22
+ */
23
+ includedMinutes: number;
24
+ /**
25
+ *
26
+ * @type {number}
27
+ * @memberof SubscriptionUsageSummary
28
+ */
29
+ usedSeconds: number;
30
+ /**
31
+ *
32
+ * @type {number}
33
+ * @memberof SubscriptionUsageSummary
34
+ */
35
+ usedMinutes: number;
36
+ /**
37
+ *
38
+ * @type {number}
39
+ * @memberof SubscriptionUsageSummary
40
+ */
41
+ overageMinutes: number;
42
+ /**
43
+ * max(0, includedMinutes - usedMinutes)
44
+ * @type {number}
45
+ * @memberof SubscriptionUsageSummary
46
+ */
47
+ remainingMinutes?: number;
48
+ }
49
+ /**
50
+ * Check if a given object implements the SubscriptionUsageSummary interface.
51
+ */
52
+ export declare function instanceOfSubscriptionUsageSummary(value: object): value is SubscriptionUsageSummary;
53
+ export declare function SubscriptionUsageSummaryFromJSON(json: any): SubscriptionUsageSummary;
54
+ export declare function SubscriptionUsageSummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubscriptionUsageSummary;
55
+ export declare function SubscriptionUsageSummaryToJSON(json: any): SubscriptionUsageSummary;
56
+ export declare function SubscriptionUsageSummaryToJSONTyped(value?: SubscriptionUsageSummary | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,57 @@
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 SubscriptionUsageSummary interface.
16
+ */
17
+ export function instanceOfSubscriptionUsageSummary(value) {
18
+ if (!('includedMinutes' in value) || value['includedMinutes'] === undefined)
19
+ return false;
20
+ if (!('usedSeconds' in value) || value['usedSeconds'] === undefined)
21
+ return false;
22
+ if (!('usedMinutes' in value) || value['usedMinutes'] === undefined)
23
+ return false;
24
+ if (!('overageMinutes' in value) || value['overageMinutes'] === undefined)
25
+ return false;
26
+ return true;
27
+ }
28
+ export function SubscriptionUsageSummaryFromJSON(json) {
29
+ return SubscriptionUsageSummaryFromJSONTyped(json, false);
30
+ }
31
+ export function SubscriptionUsageSummaryFromJSONTyped(json, ignoreDiscriminator) {
32
+ if (json == null) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'includedMinutes': json['includedMinutes'],
37
+ 'usedSeconds': json['usedSeconds'],
38
+ 'usedMinutes': json['usedMinutes'],
39
+ 'overageMinutes': json['overageMinutes'],
40
+ 'remainingMinutes': json['remainingMinutes'] == null ? undefined : json['remainingMinutes'],
41
+ };
42
+ }
43
+ export function SubscriptionUsageSummaryToJSON(json) {
44
+ return SubscriptionUsageSummaryToJSONTyped(json, false);
45
+ }
46
+ export function SubscriptionUsageSummaryToJSONTyped(value, ignoreDiscriminator = false) {
47
+ if (value == null) {
48
+ return value;
49
+ }
50
+ return {
51
+ 'includedMinutes': value['includedMinutes'],
52
+ 'usedSeconds': value['usedSeconds'],
53
+ 'usedMinutes': value['usedMinutes'],
54
+ 'overageMinutes': value['overageMinutes'],
55
+ 'remainingMinutes': value['remainingMinutes'],
56
+ };
57
+ }
@@ -16,24 +16,32 @@
16
16
  */
17
17
  export interface UpdatePlanRequest {
18
18
  /**
19
- * New plan slug
19
+ *
20
20
  * @type {string}
21
21
  * @memberof UpdatePlanRequest
22
22
  */
23
- planSlug?: string;
23
+ planSlug: string;
24
24
  /**
25
- * New price slug (e.g., 'monthly', 'yearly')
25
+ *
26
26
  * @type {string}
27
27
  * @memberof UpdatePlanRequest
28
28
  */
29
- priceSlug?: string;
29
+ interval?: UpdatePlanRequestIntervalEnum;
30
30
  /**
31
- * Create prorations for the price difference
31
+ *
32
32
  * @type {boolean}
33
33
  * @memberof UpdatePlanRequest
34
34
  */
35
35
  prorate?: boolean;
36
36
  }
37
+ /**
38
+ * @export
39
+ */
40
+ export declare const UpdatePlanRequestIntervalEnum: {
41
+ readonly Monthly: "monthly";
42
+ readonly Yearly: "yearly";
43
+ };
44
+ export type UpdatePlanRequestIntervalEnum = typeof UpdatePlanRequestIntervalEnum[keyof typeof UpdatePlanRequestIntervalEnum];
37
45
  /**
38
46
  * Check if a given object implements the UpdatePlanRequest interface.
39
47
  */
@@ -11,10 +11,19 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
+ /**
15
+ * @export
16
+ */
17
+ export const UpdatePlanRequestIntervalEnum = {
18
+ Monthly: 'monthly',
19
+ Yearly: 'yearly'
20
+ };
14
21
  /**
15
22
  * Check if a given object implements the UpdatePlanRequest interface.
16
23
  */
17
24
  export function instanceOfUpdatePlanRequest(value) {
25
+ if (!('planSlug' in value) || value['planSlug'] === undefined)
26
+ return false;
18
27
  return true;
19
28
  }
20
29
  export function UpdatePlanRequestFromJSON(json) {
@@ -25,8 +34,8 @@ export function UpdatePlanRequestFromJSONTyped(json, ignoreDiscriminator) {
25
34
  return json;
26
35
  }
27
36
  return {
28
- 'planSlug': json['planSlug'] == null ? undefined : json['planSlug'],
29
- 'priceSlug': json['priceSlug'] == null ? undefined : json['priceSlug'],
37
+ 'planSlug': json['planSlug'],
38
+ 'interval': json['interval'] == null ? undefined : json['interval'],
30
39
  'prorate': json['prorate'] == null ? undefined : json['prorate'],
31
40
  };
32
41
  }
@@ -39,7 +48,7 @@ export function UpdatePlanRequestToJSONTyped(value, ignoreDiscriminator = false)
39
48
  }
40
49
  return {
41
50
  'planSlug': value['planSlug'],
42
- 'priceSlug': value['priceSlug'],
51
+ 'interval': value['interval'],
43
52
  'prorate': value['prorate'],
44
53
  };
45
54
  }
@@ -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 UsageBreakdownByAgent
16
+ */
17
+ export interface UsageBreakdownByAgent {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof UsageBreakdownByAgent
22
+ */
23
+ voiceAgentId?: string | null;
24
+ /**
25
+ *
26
+ * @type {number}
27
+ * @memberof UsageBreakdownByAgent
28
+ */
29
+ seconds: number;
30
+ /**
31
+ *
32
+ * @type {number}
33
+ * @memberof UsageBreakdownByAgent
34
+ */
35
+ overageMinutes: number;
36
+ }
37
+ /**
38
+ * Check if a given object implements the UsageBreakdownByAgent interface.
39
+ */
40
+ export declare function instanceOfUsageBreakdownByAgent(value: object): value is UsageBreakdownByAgent;
41
+ export declare function UsageBreakdownByAgentFromJSON(json: any): UsageBreakdownByAgent;
42
+ export declare function UsageBreakdownByAgentFromJSONTyped(json: any, ignoreDiscriminator: boolean): UsageBreakdownByAgent;
43
+ export declare function UsageBreakdownByAgentToJSON(json: any): UsageBreakdownByAgent;
44
+ export declare function UsageBreakdownByAgentToJSONTyped(value?: UsageBreakdownByAgent | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,49 @@
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 UsageBreakdownByAgent interface.
16
+ */
17
+ export function instanceOfUsageBreakdownByAgent(value) {
18
+ if (!('seconds' in value) || value['seconds'] === undefined)
19
+ return false;
20
+ if (!('overageMinutes' in value) || value['overageMinutes'] === undefined)
21
+ return false;
22
+ return true;
23
+ }
24
+ export function UsageBreakdownByAgentFromJSON(json) {
25
+ return UsageBreakdownByAgentFromJSONTyped(json, false);
26
+ }
27
+ export function UsageBreakdownByAgentFromJSONTyped(json, ignoreDiscriminator) {
28
+ if (json == null) {
29
+ return json;
30
+ }
31
+ return {
32
+ 'voiceAgentId': json['voiceAgentId'] == null ? undefined : json['voiceAgentId'],
33
+ 'seconds': json['seconds'],
34
+ 'overageMinutes': json['overageMinutes'],
35
+ };
36
+ }
37
+ export function UsageBreakdownByAgentToJSON(json) {
38
+ return UsageBreakdownByAgentToJSONTyped(json, false);
39
+ }
40
+ export function UsageBreakdownByAgentToJSONTyped(value, ignoreDiscriminator = false) {
41
+ if (value == null) {
42
+ return value;
43
+ }
44
+ return {
45
+ 'voiceAgentId': value['voiceAgentId'],
46
+ 'seconds': value['seconds'],
47
+ 'overageMinutes': value['overageMinutes'],
48
+ };
49
+ }
@@ -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 UsageBreakdownByDay
16
+ */
17
+ export interface UsageBreakdownByDay {
18
+ /**
19
+ * YYYY-MM-DD
20
+ * @type {string}
21
+ * @memberof UsageBreakdownByDay
22
+ */
23
+ day: string;
24
+ /**
25
+ *
26
+ * @type {number}
27
+ * @memberof UsageBreakdownByDay
28
+ */
29
+ seconds: number;
30
+ /**
31
+ *
32
+ * @type {number}
33
+ * @memberof UsageBreakdownByDay
34
+ */
35
+ overageMinutes: number;
36
+ }
37
+ /**
38
+ * Check if a given object implements the UsageBreakdownByDay interface.
39
+ */
40
+ export declare function instanceOfUsageBreakdownByDay(value: object): value is UsageBreakdownByDay;
41
+ export declare function UsageBreakdownByDayFromJSON(json: any): UsageBreakdownByDay;
42
+ export declare function UsageBreakdownByDayFromJSONTyped(json: any, ignoreDiscriminator: boolean): UsageBreakdownByDay;
43
+ export declare function UsageBreakdownByDayToJSON(json: any): UsageBreakdownByDay;
44
+ export declare function UsageBreakdownByDayToJSONTyped(value?: UsageBreakdownByDay | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,51 @@
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 UsageBreakdownByDay interface.
16
+ */
17
+ export function instanceOfUsageBreakdownByDay(value) {
18
+ if (!('day' in value) || value['day'] === undefined)
19
+ return false;
20
+ if (!('seconds' in value) || value['seconds'] === undefined)
21
+ return false;
22
+ if (!('overageMinutes' in value) || value['overageMinutes'] === undefined)
23
+ return false;
24
+ return true;
25
+ }
26
+ export function UsageBreakdownByDayFromJSON(json) {
27
+ return UsageBreakdownByDayFromJSONTyped(json, false);
28
+ }
29
+ export function UsageBreakdownByDayFromJSONTyped(json, ignoreDiscriminator) {
30
+ if (json == null) {
31
+ return json;
32
+ }
33
+ return {
34
+ 'day': json['day'],
35
+ 'seconds': json['seconds'],
36
+ 'overageMinutes': json['overageMinutes'],
37
+ };
38
+ }
39
+ export function UsageBreakdownByDayToJSON(json) {
40
+ return UsageBreakdownByDayToJSONTyped(json, false);
41
+ }
42
+ export function UsageBreakdownByDayToJSONTyped(value, ignoreDiscriminator = false) {
43
+ if (value == null) {
44
+ return value;
45
+ }
46
+ return {
47
+ 'day': value['day'],
48
+ 'seconds': value['seconds'],
49
+ 'overageMinutes': value['overageMinutes'],
50
+ };
51
+ }
@@ -0,0 +1,39 @@
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 { UsageRecordDto } from './UsageRecordDto';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface UsageHistoryResponse
17
+ */
18
+ export interface UsageHistoryResponse {
19
+ /**
20
+ *
21
+ * @type {Array<UsageRecordDto>}
22
+ * @memberof UsageHistoryResponse
23
+ */
24
+ items: Array<UsageRecordDto>;
25
+ /**
26
+ *
27
+ * @type {number}
28
+ * @memberof UsageHistoryResponse
29
+ */
30
+ total: number;
31
+ }
32
+ /**
33
+ * Check if a given object implements the UsageHistoryResponse interface.
34
+ */
35
+ export declare function instanceOfUsageHistoryResponse(value: object): value is UsageHistoryResponse;
36
+ export declare function UsageHistoryResponseFromJSON(json: any): UsageHistoryResponse;
37
+ export declare function UsageHistoryResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): UsageHistoryResponse;
38
+ export declare function UsageHistoryResponseToJSON(json: any): UsageHistoryResponse;
39
+ export declare function UsageHistoryResponseToJSONTyped(value?: UsageHistoryResponse | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,48 @@
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 { UsageRecordDtoFromJSON, UsageRecordDtoToJSON, } from './UsageRecordDto';
15
+ /**
16
+ * Check if a given object implements the UsageHistoryResponse interface.
17
+ */
18
+ export function instanceOfUsageHistoryResponse(value) {
19
+ if (!('items' in value) || value['items'] === undefined)
20
+ return false;
21
+ if (!('total' in value) || value['total'] === undefined)
22
+ return false;
23
+ return true;
24
+ }
25
+ export function UsageHistoryResponseFromJSON(json) {
26
+ return UsageHistoryResponseFromJSONTyped(json, false);
27
+ }
28
+ export function UsageHistoryResponseFromJSONTyped(json, ignoreDiscriminator) {
29
+ if (json == null) {
30
+ return json;
31
+ }
32
+ return {
33
+ 'items': (json['items'].map(UsageRecordDtoFromJSON)),
34
+ 'total': json['total'],
35
+ };
36
+ }
37
+ export function UsageHistoryResponseToJSON(json) {
38
+ return UsageHistoryResponseToJSONTyped(json, false);
39
+ }
40
+ export function UsageHistoryResponseToJSONTyped(value, ignoreDiscriminator = false) {
41
+ if (value == null) {
42
+ return value;
43
+ }
44
+ return {
45
+ 'items': (value['items'].map(UsageRecordDtoToJSON)),
46
+ 'total': value['total'],
47
+ };
48
+ }
@@ -0,0 +1,80 @@
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 UsageRecordDto
16
+ */
17
+ export interface UsageRecordDto {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof UsageRecordDto
22
+ */
23
+ id: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof UsageRecordDto
28
+ */
29
+ voiceAgentId?: string | null;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof UsageRecordDto
34
+ */
35
+ callId?: string | null;
36
+ /**
37
+ *
38
+ * @type {number}
39
+ * @memberof UsageRecordDto
40
+ */
41
+ seconds: number;
42
+ /**
43
+ *
44
+ * @type {number}
45
+ * @memberof UsageRecordDto
46
+ */
47
+ overageMinutes?: number;
48
+ /**
49
+ *
50
+ * @type {Date}
51
+ * @memberof UsageRecordDto
52
+ */
53
+ reportedToStripeAt?: Date | null;
54
+ /**
55
+ *
56
+ * @type {string}
57
+ * @memberof UsageRecordDto
58
+ */
59
+ source: string;
60
+ /**
61
+ *
62
+ * @type {string}
63
+ * @memberof UsageRecordDto
64
+ */
65
+ note?: string | null;
66
+ /**
67
+ *
68
+ * @type {Date}
69
+ * @memberof UsageRecordDto
70
+ */
71
+ createdAt: Date;
72
+ }
73
+ /**
74
+ * Check if a given object implements the UsageRecordDto interface.
75
+ */
76
+ export declare function instanceOfUsageRecordDto(value: object): value is UsageRecordDto;
77
+ export declare function UsageRecordDtoFromJSON(json: any): UsageRecordDto;
78
+ export declare function UsageRecordDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): UsageRecordDto;
79
+ export declare function UsageRecordDtoToJSON(json: any): UsageRecordDto;
80
+ export declare function UsageRecordDtoToJSONTyped(value?: UsageRecordDto | null, ignoreDiscriminator?: boolean): any;