@l7mp/tivadar-ai-api-sdk 0.2.20 → 0.2.21

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 (136) hide show
  1. package/dist/api-client.d.ts +36 -1
  2. package/dist/api-client.js +13 -0
  3. package/dist/apis/AdminSIPApi.d.ts +16 -1
  4. package/dist/apis/AdminSIPApi.js +43 -0
  5. package/dist/apis/OrganizationsApi.d.ts +40 -1
  6. package/dist/apis/OrganizationsApi.js +117 -0
  7. package/dist/apis/ProfileApi.d.ts +53 -1
  8. package/dist/apis/ProfileApi.js +181 -0
  9. package/dist/esm/api-client.d.ts +36 -1
  10. package/dist/esm/api-client.js +13 -0
  11. package/dist/esm/apis/AdminSIPApi.d.ts +16 -1
  12. package/dist/esm/apis/AdminSIPApi.js +44 -1
  13. package/dist/esm/apis/OrganizationsApi.d.ts +40 -1
  14. package/dist/esm/apis/OrganizationsApi.js +118 -1
  15. package/dist/esm/apis/ProfileApi.d.ts +53 -1
  16. package/dist/esm/apis/ProfileApi.js +182 -1
  17. package/dist/esm/models/AccountDeletionBlocker.d.ts +44 -0
  18. package/dist/esm/models/AccountDeletionBlocker.js +51 -0
  19. package/dist/esm/models/AccountDeletionStatus.d.ts +50 -0
  20. package/dist/esm/models/AccountDeletionStatus.js +49 -0
  21. package/dist/esm/models/AdminSipReconcilePostRequest.d.ts +38 -0
  22. package/dist/esm/models/AdminSipReconcilePostRequest.js +43 -0
  23. package/dist/esm/models/Organization.d.ts +7 -0
  24. package/dist/esm/models/Organization.js +3 -0
  25. package/dist/esm/models/OrganizationDeletionBillingBlock.d.ts +44 -0
  26. package/dist/esm/models/OrganizationDeletionBillingBlock.js +51 -0
  27. package/dist/esm/models/OrganizationDeletionStatus.d.ts +56 -0
  28. package/dist/esm/models/OrganizationDeletionStatus.js +51 -0
  29. package/dist/esm/models/OrganizationsOrganizationIdDeletionPost409Response.d.ts +39 -0
  30. package/dist/esm/models/OrganizationsOrganizationIdDeletionPost409Response.js +44 -0
  31. package/dist/esm/models/OrganizationsOrganizationIdDeletionPost409ResponseError.d.ts +45 -0
  32. package/dist/esm/models/OrganizationsOrganizationIdDeletionPost409ResponseError.js +46 -0
  33. package/dist/esm/models/OrganizationsOrganizationIdDeletionPost409ResponseErrorDetails.d.ts +33 -0
  34. package/dist/esm/models/OrganizationsOrganizationIdDeletionPost409ResponseErrorDetails.js +42 -0
  35. package/dist/esm/models/Profile.d.ts +69 -0
  36. package/dist/esm/models/Profile.js +66 -0
  37. package/dist/esm/models/ProfileDeletionPost409Response.d.ts +39 -0
  38. package/dist/esm/models/ProfileDeletionPost409Response.js +44 -0
  39. package/dist/esm/models/ProfileDeletionPost409ResponseError.d.ts +45 -0
  40. package/dist/esm/models/ProfileDeletionPost409ResponseError.js +46 -0
  41. package/dist/esm/models/ProfileDeletionPost409ResponseErrorDetails.d.ts +33 -0
  42. package/dist/esm/models/ProfileDeletionPost409ResponseErrorDetails.js +42 -0
  43. package/dist/esm/models/ProfileDeletionPostRequest.d.ts +45 -0
  44. package/dist/esm/models/ProfileDeletionPostRequest.js +51 -0
  45. package/dist/esm/models/ProfileUpdate.d.ts +44 -0
  46. package/dist/esm/models/ProfileUpdate.js +45 -0
  47. package/dist/esm/models/SipReconciliationReport.d.ts +80 -0
  48. package/dist/esm/models/SipReconciliationReport.js +61 -0
  49. package/dist/esm/models/SipReconciliationReportDeleted.d.ts +44 -0
  50. package/dist/esm/models/SipReconciliationReportDeleted.js +45 -0
  51. package/dist/esm/models/SipReconciliationReportFailedInner.d.ts +53 -0
  52. package/dist/esm/models/SipReconciliationReportFailedInner.js +53 -0
  53. package/dist/esm/models/SipReconciliationReportMissingDispatchRulesInner.d.ts +44 -0
  54. package/dist/esm/models/SipReconciliationReportMissingDispatchRulesInner.js +45 -0
  55. package/dist/esm/models/SipReconciliationReportMissingTrunksInner.d.ts +44 -0
  56. package/dist/esm/models/SipReconciliationReportMissingTrunksInner.js +45 -0
  57. package/dist/esm/models/SipReconciliationReportOrphanDispatchRulesInner.d.ts +44 -0
  58. package/dist/esm/models/SipReconciliationReportOrphanDispatchRulesInner.js +45 -0
  59. package/dist/esm/models/SipReconciliationReportOrphanTrunksInner.d.ts +44 -0
  60. package/dist/esm/models/SipReconciliationReportOrphanTrunksInner.js +45 -0
  61. package/dist/esm/models/index.d.ts +21 -0
  62. package/dist/esm/models/index.js +21 -0
  63. package/dist/models/AccountDeletionBlocker.d.ts +44 -0
  64. package/dist/models/AccountDeletionBlocker.js +58 -0
  65. package/dist/models/AccountDeletionStatus.d.ts +50 -0
  66. package/dist/models/AccountDeletionStatus.js +56 -0
  67. package/dist/models/AdminSipReconcilePostRequest.d.ts +38 -0
  68. package/dist/models/AdminSipReconcilePostRequest.js +50 -0
  69. package/dist/models/Organization.d.ts +7 -0
  70. package/dist/models/Organization.js +3 -0
  71. package/dist/models/OrganizationDeletionBillingBlock.d.ts +44 -0
  72. package/dist/models/OrganizationDeletionBillingBlock.js +58 -0
  73. package/dist/models/OrganizationDeletionStatus.d.ts +56 -0
  74. package/dist/models/OrganizationDeletionStatus.js +58 -0
  75. package/dist/models/OrganizationsOrganizationIdDeletionPost409Response.d.ts +39 -0
  76. package/dist/models/OrganizationsOrganizationIdDeletionPost409Response.js +51 -0
  77. package/dist/models/OrganizationsOrganizationIdDeletionPost409ResponseError.d.ts +45 -0
  78. package/dist/models/OrganizationsOrganizationIdDeletionPost409ResponseError.js +53 -0
  79. package/dist/models/OrganizationsOrganizationIdDeletionPost409ResponseErrorDetails.d.ts +33 -0
  80. package/dist/models/OrganizationsOrganizationIdDeletionPost409ResponseErrorDetails.js +49 -0
  81. package/dist/models/Profile.d.ts +69 -0
  82. package/dist/models/Profile.js +73 -0
  83. package/dist/models/ProfileDeletionPost409Response.d.ts +39 -0
  84. package/dist/models/ProfileDeletionPost409Response.js +51 -0
  85. package/dist/models/ProfileDeletionPost409ResponseError.d.ts +45 -0
  86. package/dist/models/ProfileDeletionPost409ResponseError.js +53 -0
  87. package/dist/models/ProfileDeletionPost409ResponseErrorDetails.d.ts +33 -0
  88. package/dist/models/ProfileDeletionPost409ResponseErrorDetails.js +49 -0
  89. package/dist/models/ProfileDeletionPostRequest.d.ts +45 -0
  90. package/dist/models/ProfileDeletionPostRequest.js +59 -0
  91. package/dist/models/ProfileUpdate.d.ts +44 -0
  92. package/dist/models/ProfileUpdate.js +52 -0
  93. package/dist/models/SipReconciliationReport.d.ts +80 -0
  94. package/dist/models/SipReconciliationReport.js +68 -0
  95. package/dist/models/SipReconciliationReportDeleted.d.ts +44 -0
  96. package/dist/models/SipReconciliationReportDeleted.js +52 -0
  97. package/dist/models/SipReconciliationReportFailedInner.d.ts +53 -0
  98. package/dist/models/SipReconciliationReportFailedInner.js +61 -0
  99. package/dist/models/SipReconciliationReportMissingDispatchRulesInner.d.ts +44 -0
  100. package/dist/models/SipReconciliationReportMissingDispatchRulesInner.js +52 -0
  101. package/dist/models/SipReconciliationReportMissingTrunksInner.d.ts +44 -0
  102. package/dist/models/SipReconciliationReportMissingTrunksInner.js +52 -0
  103. package/dist/models/SipReconciliationReportOrphanDispatchRulesInner.d.ts +44 -0
  104. package/dist/models/SipReconciliationReportOrphanDispatchRulesInner.js +52 -0
  105. package/dist/models/SipReconciliationReportOrphanTrunksInner.d.ts +44 -0
  106. package/dist/models/SipReconciliationReportOrphanTrunksInner.js +52 -0
  107. package/dist/models/index.d.ts +21 -0
  108. package/dist/models/index.js +21 -0
  109. package/package.json +1 -1
  110. package/src/api-client.ts +47 -0
  111. package/src/apis/AdminSIPApi.ts +62 -0
  112. package/src/apis/OrganizationsApi.ts +159 -0
  113. package/src/apis/ProfileApi.ts +234 -0
  114. package/src/models/AccountDeletionBlocker.ts +84 -0
  115. package/src/models/AccountDeletionStatus.ts +90 -0
  116. package/src/models/AdminSipReconcilePostRequest.ts +73 -0
  117. package/src/models/Organization.ts +16 -0
  118. package/src/models/OrganizationDeletionBillingBlock.ts +84 -0
  119. package/src/models/OrganizationDeletionStatus.ts +98 -0
  120. package/src/models/OrganizationsOrganizationIdDeletionPost409Response.ts +81 -0
  121. package/src/models/OrganizationsOrganizationIdDeletionPost409ResponseError.ts +89 -0
  122. package/src/models/OrganizationsOrganizationIdDeletionPost409ResponseErrorDetails.ts +73 -0
  123. package/src/models/Profile.ts +127 -0
  124. package/src/models/ProfileDeletionPost409Response.ts +81 -0
  125. package/src/models/ProfileDeletionPost409ResponseError.ts +89 -0
  126. package/src/models/ProfileDeletionPost409ResponseErrorDetails.ts +73 -0
  127. package/src/models/ProfileDeletionPostRequest.ts +84 -0
  128. package/src/models/ProfileUpdate.ts +81 -0
  129. package/src/models/SipReconciliationReport.ts +164 -0
  130. package/src/models/SipReconciliationReportDeleted.ts +81 -0
  131. package/src/models/SipReconciliationReportFailedInner.ts +93 -0
  132. package/src/models/SipReconciliationReportMissingDispatchRulesInner.ts +81 -0
  133. package/src/models/SipReconciliationReportMissingTrunksInner.ts +81 -0
  134. package/src/models/SipReconciliationReportOrphanDispatchRulesInner.ts +81 -0
  135. package/src/models/SipReconciliationReportOrphanTrunksInner.ts +81 -0
  136. package/src/models/index.ts +21 -0
@@ -26,7 +26,7 @@ import { VoiceUsageApi } from "./apis/VoiceUsageApi";
26
26
  import { VoiceAgentsApi } from "./apis/VoiceAgentsApi";
27
27
  import { ToolsApi } from "./apis/ToolsApi";
28
28
  import { PhonebookApi } from "./apis/PhonebookApi";
29
- import type { CallCreate, CallUpdate, CallFlagCreate, CallFlagUpdate, CallFlagResolve, NotificationScope, NotificationSeverity, NotificationType, VoiceAgentCreate, VoiceAgentUpdate, ChatAgentCreate, ChatAgentUpdate, Calendar, CalendarCreate, CalendarUpdate, CalendarEventCreate, CalendarEventUpdate, InvitationAccept, InvitationCreate, RagConfigCreate, SipTrunkCreate, DispatchRuleCreate, PhoneNumberCreate, OrganizationCreate, CreateCheckoutSessionRequest, CancelSubscriptionRequest, UpdatePlanRequest, PauseSubscriptionRequest, BillingPortalRequest, AdminSetSubscriptionRequest, AdminGrantMinutesRequest, AdminPhoneNumberUpdate, AdminPhoneNumberAssign, AdminSipTrunkCreate, AdminDispatchRuleCreate, OutboundCallRequest, VoiceUsageReportRequest, UserPreferencesUpdate, AgentToolUpsert, PhonebookUpdate, PhonebookEntryCreate, PhonebookEntryUpdate } from "./models";
29
+ import type { CallCreate, CallUpdate, CallFlagCreate, CallFlagUpdate, CallFlagResolve, NotificationScope, NotificationSeverity, NotificationType, VoiceAgentCreate, VoiceAgentUpdate, ChatAgentCreate, ChatAgentUpdate, Calendar, CalendarCreate, CalendarUpdate, CalendarEventCreate, CalendarEventUpdate, InvitationAccept, InvitationCreate, RagConfigCreate, SipTrunkCreate, DispatchRuleCreate, PhoneNumberCreate, OrganizationCreate, CreateCheckoutSessionRequest, CancelSubscriptionRequest, UpdatePlanRequest, PauseSubscriptionRequest, BillingPortalRequest, AdminSetSubscriptionRequest, AdminGrantMinutesRequest, AdminPhoneNumberUpdate, AdminPhoneNumberAssign, AdminSipTrunkCreate, AdminDispatchRuleCreate, OutboundCallRequest, VoiceUsageReportRequest, UserPreferencesUpdate, ProfileUpdate, ProfileDeletionPostRequest, AgentToolUpsert, PhonebookUpdate, PhonebookEntryCreate, PhonebookEntryUpdate } from "./models";
30
30
  export interface ApiClientConfig {
31
31
  baseUrl: string;
32
32
  options?: {
@@ -106,6 +106,18 @@ export declare class Api {
106
106
  readonly organizations: {
107
107
  list: (options?: RequestInit) => ReturnType<OrganizationsApi["organizationsGet"]>;
108
108
  create: (organizationCreate: OrganizationCreate, options?: RequestInit) => ReturnType<OrganizationsApi["organizationsPost"]>;
109
+ deletion: {
110
+ status: (organizationId: string, options?: RequestInit) => ReturnType<OrganizationsApi["organizationsOrganizationIdDeletionGet"]>;
111
+ /**
112
+ * Schedule the organization for deletion after the grace period.
113
+ * Owner only. Rejects with 409 while a paid subscription is live —
114
+ * cancel it first. NOT cancelled by activity: call `cancel()`
115
+ * before the deadline to keep the organization.
116
+ */
117
+ request: (organizationId: string, options?: RequestInit) => ReturnType<OrganizationsApi["organizationsOrganizationIdDeletionPost"]>;
118
+ /** Cancel a pending deletion. Owner only. Idempotent. */
119
+ cancel: (organizationId: string, options?: RequestInit) => ReturnType<OrganizationsApi["organizationsOrganizationIdDeletionDelete"]>;
120
+ };
109
121
  };
110
122
  readonly playground: {
111
123
  sandboxToken: (organizationId: string, voiceAgentId: string, options?: RequestInit) => ReturnType<PlaygroundApi["organizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPost"]>;
@@ -113,6 +125,21 @@ export declare class Api {
113
125
  readonly profile: {
114
126
  getPreferences: (organizationId: string, options?: RequestInit) => ReturnType<ProfileApi["organizationsOrganizationIdProfilePreferencesGet"]>;
115
127
  updatePreferences: (organizationId: string, userPreferencesUpdate: UserPreferencesUpdate, options?: RequestInit) => ReturnType<ProfileApi["organizationsOrganizationIdProfilePreferencesPut"]>;
128
+ /** The authenticated user's own profile, including any pending deletion. */
129
+ get: (options?: RequestInit) => ReturnType<ProfileApi["profileGet"]>;
130
+ /** Patch the user's own profile. Only supplied fields change. */
131
+ update: (profileUpdate: ProfileUpdate, options?: RequestInit) => ReturnType<ProfileApi["profilePatch"]>;
132
+ deletion: {
133
+ status: (options?: RequestInit) => ReturnType<ProfileApi["profileDeletionGet"]>;
134
+ /**
135
+ * Schedule the account for deletion after the grace period.
136
+ * Rejects with 409 while the user owns organizations that have
137
+ * other members.
138
+ */
139
+ request: (profileDeletionPostRequest: ProfileDeletionPostRequest, options?: RequestInit) => ReturnType<ProfileApi["profileDeletionPost"]>;
140
+ /** Cancel a pending deletion. Idempotent. */
141
+ cancel: (options?: RequestInit) => ReturnType<ProfileApi["profileDeletionDelete"]>;
142
+ };
116
143
  };
117
144
  readonly rag: {
118
145
  list: (organizationId: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagGet"]>;
@@ -212,6 +239,14 @@ export declare class Api {
212
239
  deleteDispatchRule: (dispatchId: string, options?: RequestInit) => ReturnType<AdminSIPApi["adminSipDispatchRulesDispatchIdDelete"]>;
213
240
  listLiveKitTrunks: (options?: RequestInit) => ReturnType<AdminSIPApi["adminSipLivekitTrunksGet"]>;
214
241
  listLiveKitDispatchRules: (options?: RequestInit) => ReturnType<AdminSIPApi["adminSipLivekitDispatchRulesGet"]>;
242
+ /**
243
+ * Report drift between LiveKit and the database. Pass `apply: true` to
244
+ * delete the orphaned LiveKit trunks and dispatch rules it finds.
245
+ */
246
+ reconcile: (params?: {
247
+ apply?: boolean;
248
+ force?: boolean;
249
+ }, options?: RequestInit) => ReturnType<AdminSIPApi["adminSipReconcilePost"]>;
215
250
  };
216
251
  readonly outboundCalls: {
217
252
  create: (organizationId: string, outboundCallRequest: OutboundCallRequest, options?: RequestInit) => ReturnType<OutboundCallsApi["organizationsOrganizationIdOutboundCallsPost"]>;
@@ -157,6 +157,11 @@ export class Api {
157
157
  this.organizations = {
158
158
  list: (options) => this.organizationsApi.organizationsGet(options),
159
159
  create: (organizationCreate, options) => this.organizationsApi.organizationsPost({ organizationCreate }, options),
160
+ deletion: {
161
+ status: (organizationId, options) => this.organizationsApi.organizationsOrganizationIdDeletionGet({ organizationId }, options),
162
+ request: (organizationId, options) => this.organizationsApi.organizationsOrganizationIdDeletionPost({ organizationId }, options),
163
+ cancel: (organizationId, options) => this.organizationsApi.organizationsOrganizationIdDeletionDelete({ organizationId }, options),
164
+ },
160
165
  };
161
166
  this.playground = {
162
167
  sandboxToken: (organizationId, voiceAgentId, options) => this.playgroundApi.organizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPost({ organizationId, voiceAgentId }, options),
@@ -164,6 +169,13 @@ export class Api {
164
169
  this.profile = {
165
170
  getPreferences: (organizationId, options) => this.profileApi.organizationsOrganizationIdProfilePreferencesGet({ organizationId }, options),
166
171
  updatePreferences: (organizationId, userPreferencesUpdate, options) => this.profileApi.organizationsOrganizationIdProfilePreferencesPut({ organizationId, userPreferencesUpdate }, options),
172
+ get: (options) => this.profileApi.profileGet(options),
173
+ update: (profileUpdate, options) => this.profileApi.profilePatch({ profileUpdate }, options),
174
+ deletion: {
175
+ status: (options) => this.profileApi.profileDeletionGet(options),
176
+ request: (profileDeletionPostRequest, options) => this.profileApi.profileDeletionPost({ profileDeletionPostRequest }, options),
177
+ cancel: (options) => this.profileApi.profileDeletionDelete(options),
178
+ },
167
179
  };
168
180
  this.rag = {
169
181
  list: (organizationId, options) => this.ragApi.organizationsOrganizationIdRagGet({ organizationId }, options),
@@ -239,6 +251,7 @@ export class Api {
239
251
  deleteDispatchRule: (dispatchId, options) => this.adminSipApi.adminSipDispatchRulesDispatchIdDelete({ dispatchId }, options),
240
252
  listLiveKitTrunks: (options) => this.adminSipApi.adminSipLivekitTrunksGet(options),
241
253
  listLiveKitDispatchRules: (options) => this.adminSipApi.adminSipLivekitDispatchRulesGet(options),
254
+ reconcile: (params, options) => this.adminSipApi.adminSipReconcilePost({ adminSipReconcilePostRequest: { apply: params === null || params === void 0 ? void 0 : params.apply, force: params === null || params === void 0 ? void 0 : params.force } }, options),
242
255
  };
243
256
  this.outboundCalls = {
244
257
  create: (organizationId, outboundCallRequest, options) => this.outboundCallsApi.organizationsOrganizationIdOutboundCallsPost({ organizationId, outboundCallRequest }, options),
@@ -10,13 +10,18 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AdminDispatchRuleCreate, AdminSipTrunkCreate, AdminSipTrunksListResponse, OrganizationsOrganizationIdSipDispatchRulesPost200Response, SipTrunk } from '../models/index';
13
+ import type { AdminDispatchRuleCreate, AdminSipReconcilePostRequest, AdminSipTrunkCreate, AdminSipTrunksListResponse, OrganizationsOrganizationIdSipDispatchRulesPost200Response, SipReconciliationReport, SipTrunk } from '../models/index';
14
14
  export interface AdminSipDispatchRulesDispatchIdDeleteRequest {
15
15
  dispatchId: string;
16
16
  }
17
17
  export interface AdminSipDispatchRulesPostRequest {
18
18
  adminDispatchRuleCreate: AdminDispatchRuleCreate;
19
19
  }
20
+ export interface AdminSipReconcilePostOperationRequest {
21
+ apply?: boolean;
22
+ force?: boolean;
23
+ adminSipReconcilePostRequest?: AdminSipReconcilePostRequest;
24
+ }
20
25
  export interface AdminSipTrunksGetRequest {
21
26
  organizationId?: string;
22
27
  agentId?: string;
@@ -69,6 +74,16 @@ export declare class AdminSIPApi extends runtime.BaseAPI {
69
74
  * List raw LiveKit inbound SIP trunks for reconciliation (app-admin only)
70
75
  */
71
76
  adminSipLivekitTrunksGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
77
+ /**
78
+ * Lists LiveKit SIP trunks and dispatch rules that no database row refers to (orphans left behind by partial failures — they make LiveKit reject new trunks for the same number), plus database rows whose LiveKit resource has disappeared. With `apply: true` the orphaned LiveKit resources are deleted; the database is never modified.
79
+ * Report (and optionally clean up) drift between LiveKit and the database (app-admin only)
80
+ */
81
+ adminSipReconcilePostRaw(requestParameters: AdminSipReconcilePostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SipReconciliationReport>>;
82
+ /**
83
+ * Lists LiveKit SIP trunks and dispatch rules that no database row refers to (orphans left behind by partial failures — they make LiveKit reject new trunks for the same number), plus database rows whose LiveKit resource has disappeared. With `apply: true` the orphaned LiveKit resources are deleted; the database is never modified.
84
+ * Report (and optionally clean up) drift between LiveKit and the database (app-admin only)
85
+ */
86
+ adminSipReconcilePost(requestParameters?: AdminSipReconcilePostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SipReconciliationReport>;
72
87
  /**
73
88
  * List SIP trunks across all organizations (app-admin only)
74
89
  */
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime';
24
- import { AdminDispatchRuleCreateToJSON, AdminSipTrunkCreateToJSON, AdminSipTrunksListResponseFromJSON, OrganizationsOrganizationIdSipDispatchRulesPost200ResponseFromJSON, SipTrunkFromJSON, } from '../models/index';
24
+ import { AdminDispatchRuleCreateToJSON, AdminSipReconcilePostRequestToJSON, AdminSipTrunkCreateToJSON, AdminSipTrunksListResponseFromJSON, OrganizationsOrganizationIdSipDispatchRulesPost200ResponseFromJSON, SipReconciliationReportFromJSON, SipTrunkFromJSON, } from '../models/index';
25
25
  /**
26
26
  *
27
27
  */
@@ -164,6 +164,49 @@ export class AdminSIPApi extends runtime.BaseAPI {
164
164
  yield this.adminSipLivekitTrunksGetRaw(initOverrides);
165
165
  });
166
166
  }
167
+ /**
168
+ * Lists LiveKit SIP trunks and dispatch rules that no database row refers to (orphans left behind by partial failures — they make LiveKit reject new trunks for the same number), plus database rows whose LiveKit resource has disappeared. With `apply: true` the orphaned LiveKit resources are deleted; the database is never modified.
169
+ * Report (and optionally clean up) drift between LiveKit and the database (app-admin only)
170
+ */
171
+ adminSipReconcilePostRaw(requestParameters, initOverrides) {
172
+ return __awaiter(this, void 0, void 0, function* () {
173
+ const queryParameters = {};
174
+ if (requestParameters['apply'] != null) {
175
+ queryParameters['apply'] = requestParameters['apply'];
176
+ }
177
+ if (requestParameters['force'] != null) {
178
+ queryParameters['force'] = requestParameters['force'];
179
+ }
180
+ const headerParameters = {};
181
+ headerParameters['Content-Type'] = 'application/json';
182
+ if (this.configuration && this.configuration.accessToken) {
183
+ const token = this.configuration.accessToken;
184
+ const tokenString = yield token("bearerAuth", []);
185
+ if (tokenString) {
186
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
187
+ }
188
+ }
189
+ let urlPath = `/admin/sip/reconcile`;
190
+ const response = yield this.request({
191
+ path: urlPath,
192
+ method: 'POST',
193
+ headers: headerParameters,
194
+ query: queryParameters,
195
+ body: AdminSipReconcilePostRequestToJSON(requestParameters['adminSipReconcilePostRequest']),
196
+ }, initOverrides);
197
+ return new runtime.JSONApiResponse(response, (jsonValue) => SipReconciliationReportFromJSON(jsonValue));
198
+ });
199
+ }
200
+ /**
201
+ * Lists LiveKit SIP trunks and dispatch rules that no database row refers to (orphans left behind by partial failures — they make LiveKit reject new trunks for the same number), plus database rows whose LiveKit resource has disappeared. With `apply: true` the orphaned LiveKit resources are deleted; the database is never modified.
202
+ * Report (and optionally clean up) drift between LiveKit and the database (app-admin only)
203
+ */
204
+ adminSipReconcilePost() {
205
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
206
+ const response = yield this.adminSipReconcilePostRaw(requestParameters, initOverrides);
207
+ return yield response.value();
208
+ });
209
+ }
167
210
  /**
168
211
  * List SIP trunks across all organizations (app-admin only)
169
212
  */
@@ -10,7 +10,16 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { Organization, OrganizationCreate } from '../models/index';
13
+ import type { Organization, OrganizationCreate, OrganizationDeletionStatus } from '../models/index';
14
+ export interface OrganizationsOrganizationIdDeletionDeleteRequest {
15
+ organizationId: string;
16
+ }
17
+ export interface OrganizationsOrganizationIdDeletionGetRequest {
18
+ organizationId: string;
19
+ }
20
+ export interface OrganizationsOrganizationIdDeletionPostRequest {
21
+ organizationId: string;
22
+ }
14
23
  export interface OrganizationsPostRequest {
15
24
  organizationCreate: OrganizationCreate;
16
25
  }
@@ -26,6 +35,36 @@ export declare class OrganizationsApi extends runtime.BaseAPI {
26
35
  * List all organizations for the authenticated user
27
36
  */
28
37
  organizationsGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Organization>>;
38
+ /**
39
+ * Owner only. Idempotent - succeeds whether or not a deletion was pending.
40
+ * Cancel a pending organization deletion
41
+ */
42
+ organizationsOrganizationIdDeletionDeleteRaw(requestParameters: OrganizationsOrganizationIdDeletionDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Organization>>;
43
+ /**
44
+ * Owner only. Idempotent - succeeds whether or not a deletion was pending.
45
+ * Cancel a pending organization deletion
46
+ */
47
+ organizationsOrganizationIdDeletionDelete(requestParameters: OrganizationsOrganizationIdDeletionDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Organization>;
48
+ /**
49
+ * Owner only. Non-owners receive 404.
50
+ * Get the status of a pending organization deletion
51
+ */
52
+ organizationsOrganizationIdDeletionGetRaw(requestParameters: OrganizationsOrganizationIdDeletionGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrganizationDeletionStatus>>;
53
+ /**
54
+ * Owner only. Non-owners receive 404.
55
+ * Get the status of a pending organization deletion
56
+ */
57
+ organizationsOrganizationIdDeletionGet(requestParameters: OrganizationsOrganizationIdDeletionGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrganizationDeletionStatus>;
58
+ /**
59
+ * Owner only. Nothing is erased immediately - the organization and all its agents, telephony and call history are purged after a grace period (15 days by default). The subscription must already be cancelled. Unlike account deletion this is NOT cancelled by activity: it must be cancelled deliberately via DELETE before the deadline.
60
+ * Schedule an organization for deletion
61
+ */
62
+ organizationsOrganizationIdDeletionPostRaw(requestParameters: OrganizationsOrganizationIdDeletionPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Organization>>;
63
+ /**
64
+ * Owner only. Nothing is erased immediately - the organization and all its agents, telephony and call history are purged after a grace period (15 days by default). The subscription must already be cancelled. Unlike account deletion this is NOT cancelled by activity: it must be cancelled deliberately via DELETE before the deadline.
65
+ * Schedule an organization for deletion
66
+ */
67
+ organizationsOrganizationIdDeletionPost(requestParameters: OrganizationsOrganizationIdDeletionPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Organization>;
29
68
  /**
30
69
  * Create a new organization
31
70
  */
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime';
24
- import { OrganizationFromJSON, OrganizationCreateToJSON, } from '../models/index';
24
+ import { OrganizationFromJSON, OrganizationCreateToJSON, OrganizationDeletionStatusFromJSON, } from '../models/index';
25
25
  /**
26
26
  *
27
27
  */
@@ -59,6 +59,123 @@ export class OrganizationsApi extends runtime.BaseAPI {
59
59
  return yield response.value();
60
60
  });
61
61
  }
62
+ /**
63
+ * Owner only. Idempotent - succeeds whether or not a deletion was pending.
64
+ * Cancel a pending organization deletion
65
+ */
66
+ organizationsOrganizationIdDeletionDeleteRaw(requestParameters, initOverrides) {
67
+ return __awaiter(this, void 0, void 0, function* () {
68
+ if (requestParameters['organizationId'] == null) {
69
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdDeletionDelete().');
70
+ }
71
+ const queryParameters = {};
72
+ const headerParameters = {};
73
+ if (this.configuration && this.configuration.accessToken) {
74
+ const token = this.configuration.accessToken;
75
+ const tokenString = yield token("bearerAuth", []);
76
+ if (tokenString) {
77
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
78
+ }
79
+ }
80
+ let urlPath = `/organizations/{organizationId}/deletion`;
81
+ urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
82
+ const response = yield this.request({
83
+ path: urlPath,
84
+ method: 'DELETE',
85
+ headers: headerParameters,
86
+ query: queryParameters,
87
+ }, initOverrides);
88
+ return new runtime.JSONApiResponse(response, (jsonValue) => OrganizationFromJSON(jsonValue));
89
+ });
90
+ }
91
+ /**
92
+ * Owner only. Idempotent - succeeds whether or not a deletion was pending.
93
+ * Cancel a pending organization deletion
94
+ */
95
+ organizationsOrganizationIdDeletionDelete(requestParameters, initOverrides) {
96
+ return __awaiter(this, void 0, void 0, function* () {
97
+ const response = yield this.organizationsOrganizationIdDeletionDeleteRaw(requestParameters, initOverrides);
98
+ return yield response.value();
99
+ });
100
+ }
101
+ /**
102
+ * Owner only. Non-owners receive 404.
103
+ * Get the status of a pending organization deletion
104
+ */
105
+ organizationsOrganizationIdDeletionGetRaw(requestParameters, initOverrides) {
106
+ return __awaiter(this, void 0, void 0, function* () {
107
+ if (requestParameters['organizationId'] == null) {
108
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdDeletionGet().');
109
+ }
110
+ const queryParameters = {};
111
+ const headerParameters = {};
112
+ if (this.configuration && this.configuration.accessToken) {
113
+ const token = this.configuration.accessToken;
114
+ const tokenString = yield token("bearerAuth", []);
115
+ if (tokenString) {
116
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
117
+ }
118
+ }
119
+ let urlPath = `/organizations/{organizationId}/deletion`;
120
+ urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
121
+ const response = yield this.request({
122
+ path: urlPath,
123
+ method: 'GET',
124
+ headers: headerParameters,
125
+ query: queryParameters,
126
+ }, initOverrides);
127
+ return new runtime.JSONApiResponse(response, (jsonValue) => OrganizationDeletionStatusFromJSON(jsonValue));
128
+ });
129
+ }
130
+ /**
131
+ * Owner only. Non-owners receive 404.
132
+ * Get the status of a pending organization deletion
133
+ */
134
+ organizationsOrganizationIdDeletionGet(requestParameters, initOverrides) {
135
+ return __awaiter(this, void 0, void 0, function* () {
136
+ const response = yield this.organizationsOrganizationIdDeletionGetRaw(requestParameters, initOverrides);
137
+ return yield response.value();
138
+ });
139
+ }
140
+ /**
141
+ * Owner only. Nothing is erased immediately - the organization and all its agents, telephony and call history are purged after a grace period (15 days by default). The subscription must already be cancelled. Unlike account deletion this is NOT cancelled by activity: it must be cancelled deliberately via DELETE before the deadline.
142
+ * Schedule an organization for deletion
143
+ */
144
+ organizationsOrganizationIdDeletionPostRaw(requestParameters, initOverrides) {
145
+ return __awaiter(this, void 0, void 0, function* () {
146
+ if (requestParameters['organizationId'] == null) {
147
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdDeletionPost().');
148
+ }
149
+ const queryParameters = {};
150
+ const headerParameters = {};
151
+ if (this.configuration && this.configuration.accessToken) {
152
+ const token = this.configuration.accessToken;
153
+ const tokenString = yield token("bearerAuth", []);
154
+ if (tokenString) {
155
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
156
+ }
157
+ }
158
+ let urlPath = `/organizations/{organizationId}/deletion`;
159
+ urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
160
+ const response = yield this.request({
161
+ path: urlPath,
162
+ method: 'POST',
163
+ headers: headerParameters,
164
+ query: queryParameters,
165
+ }, initOverrides);
166
+ return new runtime.JSONApiResponse(response, (jsonValue) => OrganizationFromJSON(jsonValue));
167
+ });
168
+ }
169
+ /**
170
+ * Owner only. Nothing is erased immediately - the organization and all its agents, telephony and call history are purged after a grace period (15 days by default). The subscription must already be cancelled. Unlike account deletion this is NOT cancelled by activity: it must be cancelled deliberately via DELETE before the deadline.
171
+ * Schedule an organization for deletion
172
+ */
173
+ organizationsOrganizationIdDeletionPost(requestParameters, initOverrides) {
174
+ return __awaiter(this, void 0, void 0, function* () {
175
+ const response = yield this.organizationsOrganizationIdDeletionPostRaw(requestParameters, initOverrides);
176
+ return yield response.value();
177
+ });
178
+ }
62
179
  /**
63
180
  * Create a new organization
64
181
  */
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { UserPreferences, UserPreferencesUpdate } from '../models/index';
13
+ import type { AccountDeletionStatus, Profile, ProfileDeletionPostRequest, ProfileUpdate, UserPreferences, UserPreferencesUpdate } from '../models/index';
14
14
  export interface OrganizationsOrganizationIdProfilePreferencesGetRequest {
15
15
  organizationId: string;
16
16
  }
@@ -18,6 +18,12 @@ export interface OrganizationsOrganizationIdProfilePreferencesPutRequest {
18
18
  organizationId: string;
19
19
  userPreferencesUpdate: UserPreferencesUpdate;
20
20
  }
21
+ export interface ProfileDeletionPostOperationRequest {
22
+ profileDeletionPostRequest: ProfileDeletionPostRequest;
23
+ }
24
+ export interface ProfilePatchRequest {
25
+ profileUpdate: ProfileUpdate;
26
+ }
21
27
  /**
22
28
  *
23
29
  */
@@ -38,4 +44,50 @@ export declare class ProfileApi extends runtime.BaseAPI {
38
44
  * Update current user preferences
39
45
  */
40
46
  organizationsOrganizationIdProfilePreferencesPut(requestParameters: OrganizationsOrganizationIdProfilePreferencesPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserPreferences>;
47
+ /**
48
+ * Idempotent - succeeds whether or not a deletion was pending.
49
+ * Cancel a pending account deletion
50
+ */
51
+ profileDeletionDeleteRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Profile>>;
52
+ /**
53
+ * Idempotent - succeeds whether or not a deletion was pending.
54
+ * Cancel a pending account deletion
55
+ */
56
+ profileDeletionDelete(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Profile>;
57
+ /**
58
+ * Get the status of a pending account deletion
59
+ */
60
+ profileDeletionGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountDeletionStatus>>;
61
+ /**
62
+ * Get the status of a pending account deletion
63
+ */
64
+ profileDeletionGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountDeletionStatus>;
65
+ /**
66
+ * Nothing is erased immediately. The account and every organization the user solely owns are purged after a grace period (15 days by default), and only if the user has not signed in since the request — any authenticated request cancels the deletion.
67
+ * Schedule the authenticated user\'s account for deletion
68
+ */
69
+ profileDeletionPostRaw(requestParameters: ProfileDeletionPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Profile>>;
70
+ /**
71
+ * Nothing is erased immediately. The account and every organization the user solely owns are purged after a grace period (15 days by default), and only if the user has not signed in since the request — any authenticated request cancels the deletion.
72
+ * Schedule the authenticated user\'s account for deletion
73
+ */
74
+ profileDeletionPost(requestParameters: ProfileDeletionPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Profile>;
75
+ /**
76
+ * Get the authenticated user\'s own profile
77
+ */
78
+ profileGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Profile>>;
79
+ /**
80
+ * Get the authenticated user\'s own profile
81
+ */
82
+ profileGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Profile>;
83
+ /**
84
+ * Only the supplied fields are changed. Email is owned by the identity provider and cannot be set here.
85
+ * Update the authenticated user\'s own profile
86
+ */
87
+ profilePatchRaw(requestParameters: ProfilePatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Profile>>;
88
+ /**
89
+ * Only the supplied fields are changed. Email is owned by the identity provider and cannot be set here.
90
+ * Update the authenticated user\'s own profile
91
+ */
92
+ profilePatch(requestParameters: ProfilePatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Profile>;
41
93
  }
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime';
24
- import { UserPreferencesFromJSON, UserPreferencesUpdateToJSON, } from '../models/index';
24
+ import { AccountDeletionStatusFromJSON, ProfileFromJSON, ProfileDeletionPostRequestToJSON, ProfileUpdateToJSON, UserPreferencesFromJSON, UserPreferencesUpdateToJSON, } from '../models/index';
25
25
  /**
26
26
  *
27
27
  */
@@ -105,4 +105,185 @@ export class ProfileApi extends runtime.BaseAPI {
105
105
  return yield response.value();
106
106
  });
107
107
  }
108
+ /**
109
+ * Idempotent - succeeds whether or not a deletion was pending.
110
+ * Cancel a pending account deletion
111
+ */
112
+ profileDeletionDeleteRaw(initOverrides) {
113
+ return __awaiter(this, void 0, void 0, function* () {
114
+ const queryParameters = {};
115
+ const headerParameters = {};
116
+ if (this.configuration && this.configuration.accessToken) {
117
+ const token = this.configuration.accessToken;
118
+ const tokenString = yield token("bearerAuth", []);
119
+ if (tokenString) {
120
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
121
+ }
122
+ }
123
+ let urlPath = `/profile/deletion`;
124
+ const response = yield this.request({
125
+ path: urlPath,
126
+ method: 'DELETE',
127
+ headers: headerParameters,
128
+ query: queryParameters,
129
+ }, initOverrides);
130
+ return new runtime.JSONApiResponse(response, (jsonValue) => ProfileFromJSON(jsonValue));
131
+ });
132
+ }
133
+ /**
134
+ * Idempotent - succeeds whether or not a deletion was pending.
135
+ * Cancel a pending account deletion
136
+ */
137
+ profileDeletionDelete(initOverrides) {
138
+ return __awaiter(this, void 0, void 0, function* () {
139
+ const response = yield this.profileDeletionDeleteRaw(initOverrides);
140
+ return yield response.value();
141
+ });
142
+ }
143
+ /**
144
+ * Get the status of a pending account deletion
145
+ */
146
+ profileDeletionGetRaw(initOverrides) {
147
+ return __awaiter(this, void 0, void 0, function* () {
148
+ const queryParameters = {};
149
+ const headerParameters = {};
150
+ if (this.configuration && this.configuration.accessToken) {
151
+ const token = this.configuration.accessToken;
152
+ const tokenString = yield token("bearerAuth", []);
153
+ if (tokenString) {
154
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
155
+ }
156
+ }
157
+ let urlPath = `/profile/deletion`;
158
+ const response = yield this.request({
159
+ path: urlPath,
160
+ method: 'GET',
161
+ headers: headerParameters,
162
+ query: queryParameters,
163
+ }, initOverrides);
164
+ return new runtime.JSONApiResponse(response, (jsonValue) => AccountDeletionStatusFromJSON(jsonValue));
165
+ });
166
+ }
167
+ /**
168
+ * Get the status of a pending account deletion
169
+ */
170
+ profileDeletionGet(initOverrides) {
171
+ return __awaiter(this, void 0, void 0, function* () {
172
+ const response = yield this.profileDeletionGetRaw(initOverrides);
173
+ return yield response.value();
174
+ });
175
+ }
176
+ /**
177
+ * Nothing is erased immediately. The account and every organization the user solely owns are purged after a grace period (15 days by default), and only if the user has not signed in since the request — any authenticated request cancels the deletion.
178
+ * Schedule the authenticated user\'s account for deletion
179
+ */
180
+ profileDeletionPostRaw(requestParameters, initOverrides) {
181
+ return __awaiter(this, void 0, void 0, function* () {
182
+ if (requestParameters['profileDeletionPostRequest'] == null) {
183
+ throw new runtime.RequiredError('profileDeletionPostRequest', 'Required parameter "profileDeletionPostRequest" was null or undefined when calling profileDeletionPost().');
184
+ }
185
+ const queryParameters = {};
186
+ const headerParameters = {};
187
+ headerParameters['Content-Type'] = 'application/json';
188
+ if (this.configuration && this.configuration.accessToken) {
189
+ const token = this.configuration.accessToken;
190
+ const tokenString = yield token("bearerAuth", []);
191
+ if (tokenString) {
192
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
193
+ }
194
+ }
195
+ let urlPath = `/profile/deletion`;
196
+ const response = yield this.request({
197
+ path: urlPath,
198
+ method: 'POST',
199
+ headers: headerParameters,
200
+ query: queryParameters,
201
+ body: ProfileDeletionPostRequestToJSON(requestParameters['profileDeletionPostRequest']),
202
+ }, initOverrides);
203
+ return new runtime.JSONApiResponse(response, (jsonValue) => ProfileFromJSON(jsonValue));
204
+ });
205
+ }
206
+ /**
207
+ * Nothing is erased immediately. The account and every organization the user solely owns are purged after a grace period (15 days by default), and only if the user has not signed in since the request — any authenticated request cancels the deletion.
208
+ * Schedule the authenticated user\'s account for deletion
209
+ */
210
+ profileDeletionPost(requestParameters, initOverrides) {
211
+ return __awaiter(this, void 0, void 0, function* () {
212
+ const response = yield this.profileDeletionPostRaw(requestParameters, initOverrides);
213
+ return yield response.value();
214
+ });
215
+ }
216
+ /**
217
+ * Get the authenticated user\'s own profile
218
+ */
219
+ profileGetRaw(initOverrides) {
220
+ return __awaiter(this, void 0, void 0, function* () {
221
+ const queryParameters = {};
222
+ const headerParameters = {};
223
+ if (this.configuration && this.configuration.accessToken) {
224
+ const token = this.configuration.accessToken;
225
+ const tokenString = yield token("bearerAuth", []);
226
+ if (tokenString) {
227
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
228
+ }
229
+ }
230
+ let urlPath = `/profile`;
231
+ const response = yield this.request({
232
+ path: urlPath,
233
+ method: 'GET',
234
+ headers: headerParameters,
235
+ query: queryParameters,
236
+ }, initOverrides);
237
+ return new runtime.JSONApiResponse(response, (jsonValue) => ProfileFromJSON(jsonValue));
238
+ });
239
+ }
240
+ /**
241
+ * Get the authenticated user\'s own profile
242
+ */
243
+ profileGet(initOverrides) {
244
+ return __awaiter(this, void 0, void 0, function* () {
245
+ const response = yield this.profileGetRaw(initOverrides);
246
+ return yield response.value();
247
+ });
248
+ }
249
+ /**
250
+ * Only the supplied fields are changed. Email is owned by the identity provider and cannot be set here.
251
+ * Update the authenticated user\'s own profile
252
+ */
253
+ profilePatchRaw(requestParameters, initOverrides) {
254
+ return __awaiter(this, void 0, void 0, function* () {
255
+ if (requestParameters['profileUpdate'] == null) {
256
+ throw new runtime.RequiredError('profileUpdate', 'Required parameter "profileUpdate" was null or undefined when calling profilePatch().');
257
+ }
258
+ const queryParameters = {};
259
+ const headerParameters = {};
260
+ headerParameters['Content-Type'] = 'application/json';
261
+ if (this.configuration && this.configuration.accessToken) {
262
+ const token = this.configuration.accessToken;
263
+ const tokenString = yield token("bearerAuth", []);
264
+ if (tokenString) {
265
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
266
+ }
267
+ }
268
+ let urlPath = `/profile`;
269
+ const response = yield this.request({
270
+ path: urlPath,
271
+ method: 'PATCH',
272
+ headers: headerParameters,
273
+ query: queryParameters,
274
+ body: ProfileUpdateToJSON(requestParameters['profileUpdate']),
275
+ }, initOverrides);
276
+ return new runtime.JSONApiResponse(response, (jsonValue) => ProfileFromJSON(jsonValue));
277
+ });
278
+ }
279
+ /**
280
+ * Only the supplied fields are changed. Email is owned by the identity provider and cannot be set here.
281
+ * Update the authenticated user\'s own profile
282
+ */
283
+ profilePatch(requestParameters, initOverrides) {
284
+ return __awaiter(this, void 0, void 0, function* () {
285
+ const response = yield this.profilePatchRaw(requestParameters, initOverrides);
286
+ return yield response.value();
287
+ });
288
+ }
108
289
  }