@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.
- package/dist/api-client.d.ts +36 -1
- package/dist/api-client.js +13 -0
- package/dist/apis/AdminSIPApi.d.ts +16 -1
- package/dist/apis/AdminSIPApi.js +43 -0
- package/dist/apis/OrganizationsApi.d.ts +40 -1
- package/dist/apis/OrganizationsApi.js +117 -0
- package/dist/apis/ProfileApi.d.ts +53 -1
- package/dist/apis/ProfileApi.js +181 -0
- package/dist/esm/api-client.d.ts +36 -1
- package/dist/esm/api-client.js +13 -0
- package/dist/esm/apis/AdminSIPApi.d.ts +16 -1
- package/dist/esm/apis/AdminSIPApi.js +44 -1
- package/dist/esm/apis/OrganizationsApi.d.ts +40 -1
- package/dist/esm/apis/OrganizationsApi.js +118 -1
- package/dist/esm/apis/ProfileApi.d.ts +53 -1
- package/dist/esm/apis/ProfileApi.js +182 -1
- package/dist/esm/models/AccountDeletionBlocker.d.ts +44 -0
- package/dist/esm/models/AccountDeletionBlocker.js +51 -0
- package/dist/esm/models/AccountDeletionStatus.d.ts +50 -0
- package/dist/esm/models/AccountDeletionStatus.js +49 -0
- package/dist/esm/models/AdminSipReconcilePostRequest.d.ts +38 -0
- package/dist/esm/models/AdminSipReconcilePostRequest.js +43 -0
- package/dist/esm/models/Organization.d.ts +7 -0
- package/dist/esm/models/Organization.js +3 -0
- package/dist/esm/models/OrganizationDeletionBillingBlock.d.ts +44 -0
- package/dist/esm/models/OrganizationDeletionBillingBlock.js +51 -0
- package/dist/esm/models/OrganizationDeletionStatus.d.ts +56 -0
- package/dist/esm/models/OrganizationDeletionStatus.js +51 -0
- package/dist/esm/models/OrganizationsOrganizationIdDeletionPost409Response.d.ts +39 -0
- package/dist/esm/models/OrganizationsOrganizationIdDeletionPost409Response.js +44 -0
- package/dist/esm/models/OrganizationsOrganizationIdDeletionPost409ResponseError.d.ts +45 -0
- package/dist/esm/models/OrganizationsOrganizationIdDeletionPost409ResponseError.js +46 -0
- package/dist/esm/models/OrganizationsOrganizationIdDeletionPost409ResponseErrorDetails.d.ts +33 -0
- package/dist/esm/models/OrganizationsOrganizationIdDeletionPost409ResponseErrorDetails.js +42 -0
- package/dist/esm/models/Profile.d.ts +69 -0
- package/dist/esm/models/Profile.js +66 -0
- package/dist/esm/models/ProfileDeletionPost409Response.d.ts +39 -0
- package/dist/esm/models/ProfileDeletionPost409Response.js +44 -0
- package/dist/esm/models/ProfileDeletionPost409ResponseError.d.ts +45 -0
- package/dist/esm/models/ProfileDeletionPost409ResponseError.js +46 -0
- package/dist/esm/models/ProfileDeletionPost409ResponseErrorDetails.d.ts +33 -0
- package/dist/esm/models/ProfileDeletionPost409ResponseErrorDetails.js +42 -0
- package/dist/esm/models/ProfileDeletionPostRequest.d.ts +45 -0
- package/dist/esm/models/ProfileDeletionPostRequest.js +51 -0
- package/dist/esm/models/ProfileUpdate.d.ts +44 -0
- package/dist/esm/models/ProfileUpdate.js +45 -0
- package/dist/esm/models/SipReconciliationReport.d.ts +80 -0
- package/dist/esm/models/SipReconciliationReport.js +61 -0
- package/dist/esm/models/SipReconciliationReportDeleted.d.ts +44 -0
- package/dist/esm/models/SipReconciliationReportDeleted.js +45 -0
- package/dist/esm/models/SipReconciliationReportFailedInner.d.ts +53 -0
- package/dist/esm/models/SipReconciliationReportFailedInner.js +53 -0
- package/dist/esm/models/SipReconciliationReportMissingDispatchRulesInner.d.ts +44 -0
- package/dist/esm/models/SipReconciliationReportMissingDispatchRulesInner.js +45 -0
- package/dist/esm/models/SipReconciliationReportMissingTrunksInner.d.ts +44 -0
- package/dist/esm/models/SipReconciliationReportMissingTrunksInner.js +45 -0
- package/dist/esm/models/SipReconciliationReportOrphanDispatchRulesInner.d.ts +44 -0
- package/dist/esm/models/SipReconciliationReportOrphanDispatchRulesInner.js +45 -0
- package/dist/esm/models/SipReconciliationReportOrphanTrunksInner.d.ts +44 -0
- package/dist/esm/models/SipReconciliationReportOrphanTrunksInner.js +45 -0
- package/dist/esm/models/index.d.ts +21 -0
- package/dist/esm/models/index.js +21 -0
- package/dist/models/AccountDeletionBlocker.d.ts +44 -0
- package/dist/models/AccountDeletionBlocker.js +58 -0
- package/dist/models/AccountDeletionStatus.d.ts +50 -0
- package/dist/models/AccountDeletionStatus.js +56 -0
- package/dist/models/AdminSipReconcilePostRequest.d.ts +38 -0
- package/dist/models/AdminSipReconcilePostRequest.js +50 -0
- package/dist/models/Organization.d.ts +7 -0
- package/dist/models/Organization.js +3 -0
- package/dist/models/OrganizationDeletionBillingBlock.d.ts +44 -0
- package/dist/models/OrganizationDeletionBillingBlock.js +58 -0
- package/dist/models/OrganizationDeletionStatus.d.ts +56 -0
- package/dist/models/OrganizationDeletionStatus.js +58 -0
- package/dist/models/OrganizationsOrganizationIdDeletionPost409Response.d.ts +39 -0
- package/dist/models/OrganizationsOrganizationIdDeletionPost409Response.js +51 -0
- package/dist/models/OrganizationsOrganizationIdDeletionPost409ResponseError.d.ts +45 -0
- package/dist/models/OrganizationsOrganizationIdDeletionPost409ResponseError.js +53 -0
- package/dist/models/OrganizationsOrganizationIdDeletionPost409ResponseErrorDetails.d.ts +33 -0
- package/dist/models/OrganizationsOrganizationIdDeletionPost409ResponseErrorDetails.js +49 -0
- package/dist/models/Profile.d.ts +69 -0
- package/dist/models/Profile.js +73 -0
- package/dist/models/ProfileDeletionPost409Response.d.ts +39 -0
- package/dist/models/ProfileDeletionPost409Response.js +51 -0
- package/dist/models/ProfileDeletionPost409ResponseError.d.ts +45 -0
- package/dist/models/ProfileDeletionPost409ResponseError.js +53 -0
- package/dist/models/ProfileDeletionPost409ResponseErrorDetails.d.ts +33 -0
- package/dist/models/ProfileDeletionPost409ResponseErrorDetails.js +49 -0
- package/dist/models/ProfileDeletionPostRequest.d.ts +45 -0
- package/dist/models/ProfileDeletionPostRequest.js +59 -0
- package/dist/models/ProfileUpdate.d.ts +44 -0
- package/dist/models/ProfileUpdate.js +52 -0
- package/dist/models/SipReconciliationReport.d.ts +80 -0
- package/dist/models/SipReconciliationReport.js +68 -0
- package/dist/models/SipReconciliationReportDeleted.d.ts +44 -0
- package/dist/models/SipReconciliationReportDeleted.js +52 -0
- package/dist/models/SipReconciliationReportFailedInner.d.ts +53 -0
- package/dist/models/SipReconciliationReportFailedInner.js +61 -0
- package/dist/models/SipReconciliationReportMissingDispatchRulesInner.d.ts +44 -0
- package/dist/models/SipReconciliationReportMissingDispatchRulesInner.js +52 -0
- package/dist/models/SipReconciliationReportMissingTrunksInner.d.ts +44 -0
- package/dist/models/SipReconciliationReportMissingTrunksInner.js +52 -0
- package/dist/models/SipReconciliationReportOrphanDispatchRulesInner.d.ts +44 -0
- package/dist/models/SipReconciliationReportOrphanDispatchRulesInner.js +52 -0
- package/dist/models/SipReconciliationReportOrphanTrunksInner.d.ts +44 -0
- package/dist/models/SipReconciliationReportOrphanTrunksInner.js +52 -0
- package/dist/models/index.d.ts +21 -0
- package/dist/models/index.js +21 -0
- package/package.json +1 -1
- package/src/api-client.ts +47 -0
- package/src/apis/AdminSIPApi.ts +62 -0
- package/src/apis/OrganizationsApi.ts +159 -0
- package/src/apis/ProfileApi.ts +234 -0
- package/src/models/AccountDeletionBlocker.ts +84 -0
- package/src/models/AccountDeletionStatus.ts +90 -0
- package/src/models/AdminSipReconcilePostRequest.ts +73 -0
- package/src/models/Organization.ts +16 -0
- package/src/models/OrganizationDeletionBillingBlock.ts +84 -0
- package/src/models/OrganizationDeletionStatus.ts +98 -0
- package/src/models/OrganizationsOrganizationIdDeletionPost409Response.ts +81 -0
- package/src/models/OrganizationsOrganizationIdDeletionPost409ResponseError.ts +89 -0
- package/src/models/OrganizationsOrganizationIdDeletionPost409ResponseErrorDetails.ts +73 -0
- package/src/models/Profile.ts +127 -0
- package/src/models/ProfileDeletionPost409Response.ts +81 -0
- package/src/models/ProfileDeletionPost409ResponseError.ts +89 -0
- package/src/models/ProfileDeletionPost409ResponseErrorDetails.ts +73 -0
- package/src/models/ProfileDeletionPostRequest.ts +84 -0
- package/src/models/ProfileUpdate.ts +81 -0
- package/src/models/SipReconciliationReport.ts +164 -0
- package/src/models/SipReconciliationReportDeleted.ts +81 -0
- package/src/models/SipReconciliationReportFailedInner.ts +93 -0
- package/src/models/SipReconciliationReportMissingDispatchRulesInner.ts +81 -0
- package/src/models/SipReconciliationReportMissingTrunksInner.ts +81 -0
- package/src/models/SipReconciliationReportOrphanDispatchRulesInner.ts +81 -0
- package/src/models/SipReconciliationReportOrphanTrunksInner.ts +81 -0
- package/src/models/index.ts +21 -0
package/src/api-client.ts
CHANGED
|
@@ -75,6 +75,8 @@ import type {
|
|
|
75
75
|
VoiceUsageReportRequest,
|
|
76
76
|
OrganizationsOrganizationIdNotificationsGet200Response,
|
|
77
77
|
UserPreferencesUpdate,
|
|
78
|
+
ProfileUpdate,
|
|
79
|
+
ProfileDeletionPostRequest,
|
|
78
80
|
AgentToolUpsert,
|
|
79
81
|
PhonebookUpdate,
|
|
80
82
|
PhonebookEntryCreate,
|
|
@@ -160,6 +162,18 @@ export class Api {
|
|
|
160
162
|
public readonly organizations: {
|
|
161
163
|
list: (options?: RequestInit) => ReturnType<OrganizationsApi["organizationsGet"]>;
|
|
162
164
|
create: (organizationCreate: OrganizationCreate, options?: RequestInit) => ReturnType<OrganizationsApi["organizationsPost"]>;
|
|
165
|
+
deletion: {
|
|
166
|
+
status: (organizationId: string, options?: RequestInit) => ReturnType<OrganizationsApi["organizationsOrganizationIdDeletionGet"]>;
|
|
167
|
+
/**
|
|
168
|
+
* Schedule the organization for deletion after the grace period.
|
|
169
|
+
* Owner only. Rejects with 409 while a paid subscription is live —
|
|
170
|
+
* cancel it first. NOT cancelled by activity: call `cancel()`
|
|
171
|
+
* before the deadline to keep the organization.
|
|
172
|
+
*/
|
|
173
|
+
request: (organizationId: string, options?: RequestInit) => ReturnType<OrganizationsApi["organizationsOrganizationIdDeletionPost"]>;
|
|
174
|
+
/** Cancel a pending deletion. Owner only. Idempotent. */
|
|
175
|
+
cancel: (organizationId: string, options?: RequestInit) => ReturnType<OrganizationsApi["organizationsOrganizationIdDeletionDelete"]>;
|
|
176
|
+
};
|
|
163
177
|
};
|
|
164
178
|
public readonly playground: {
|
|
165
179
|
sandboxToken: (organizationId: string, voiceAgentId: string, options?: RequestInit) => ReturnType<PlaygroundApi["organizationsOrganizationIdVoiceAgentsVoiceAgentIdSandboxTokenPost"]>;
|
|
@@ -167,6 +181,21 @@ export class Api {
|
|
|
167
181
|
public readonly profile: {
|
|
168
182
|
getPreferences: (organizationId: string, options?: RequestInit) => ReturnType<ProfileApi["organizationsOrganizationIdProfilePreferencesGet"]>;
|
|
169
183
|
updatePreferences: (organizationId: string, userPreferencesUpdate: UserPreferencesUpdate, options?: RequestInit) => ReturnType<ProfileApi["organizationsOrganizationIdProfilePreferencesPut"]>;
|
|
184
|
+
/** The authenticated user's own profile, including any pending deletion. */
|
|
185
|
+
get: (options?: RequestInit) => ReturnType<ProfileApi["profileGet"]>;
|
|
186
|
+
/** Patch the user's own profile. Only supplied fields change. */
|
|
187
|
+
update: (profileUpdate: ProfileUpdate, options?: RequestInit) => ReturnType<ProfileApi["profilePatch"]>;
|
|
188
|
+
deletion: {
|
|
189
|
+
status: (options?: RequestInit) => ReturnType<ProfileApi["profileDeletionGet"]>;
|
|
190
|
+
/**
|
|
191
|
+
* Schedule the account for deletion after the grace period.
|
|
192
|
+
* Rejects with 409 while the user owns organizations that have
|
|
193
|
+
* other members.
|
|
194
|
+
*/
|
|
195
|
+
request: (profileDeletionPostRequest: ProfileDeletionPostRequest, options?: RequestInit) => ReturnType<ProfileApi["profileDeletionPost"]>;
|
|
196
|
+
/** Cancel a pending deletion. Idempotent. */
|
|
197
|
+
cancel: (options?: RequestInit) => ReturnType<ProfileApi["profileDeletionDelete"]>;
|
|
198
|
+
};
|
|
170
199
|
};
|
|
171
200
|
public readonly rag: {
|
|
172
201
|
list: (organizationId: string, options?: RequestInit) => ReturnType<RAGApi["organizationsOrganizationIdRagGet"]>;
|
|
@@ -236,6 +265,11 @@ export class Api {
|
|
|
236
265
|
deleteDispatchRule: (dispatchId: string, options?: RequestInit) => ReturnType<AdminSIPApi["adminSipDispatchRulesDispatchIdDelete"]>;
|
|
237
266
|
listLiveKitTrunks: (options?: RequestInit) => ReturnType<AdminSIPApi["adminSipLivekitTrunksGet"]>;
|
|
238
267
|
listLiveKitDispatchRules: (options?: RequestInit) => ReturnType<AdminSIPApi["adminSipLivekitDispatchRulesGet"]>;
|
|
268
|
+
/**
|
|
269
|
+
* Report drift between LiveKit and the database. Pass `apply: true` to
|
|
270
|
+
* delete the orphaned LiveKit trunks and dispatch rules it finds.
|
|
271
|
+
*/
|
|
272
|
+
reconcile: (params?: { apply?: boolean; force?: boolean }, options?: RequestInit) => ReturnType<AdminSIPApi["adminSipReconcilePost"]>;
|
|
239
273
|
};
|
|
240
274
|
public readonly outboundCalls: {
|
|
241
275
|
create: (organizationId: string, outboundCallRequest: OutboundCallRequest, options?: RequestInit) => ReturnType<OutboundCallsApi["organizationsOrganizationIdOutboundCallsPost"]>;
|
|
@@ -442,6 +476,11 @@ export class Api {
|
|
|
442
476
|
this.organizations = {
|
|
443
477
|
list: (options) => this.organizationsApi.organizationsGet(options),
|
|
444
478
|
create: (organizationCreate, options) => this.organizationsApi.organizationsPost({ organizationCreate }, options),
|
|
479
|
+
deletion: {
|
|
480
|
+
status: (organizationId, options) => this.organizationsApi.organizationsOrganizationIdDeletionGet({ organizationId }, options),
|
|
481
|
+
request: (organizationId, options) => this.organizationsApi.organizationsOrganizationIdDeletionPost({ organizationId }, options),
|
|
482
|
+
cancel: (organizationId, options) => this.organizationsApi.organizationsOrganizationIdDeletionDelete({ organizationId }, options),
|
|
483
|
+
},
|
|
445
484
|
};
|
|
446
485
|
|
|
447
486
|
this.playground = {
|
|
@@ -451,6 +490,13 @@ export class Api {
|
|
|
451
490
|
this.profile = {
|
|
452
491
|
getPreferences: (organizationId, options) => this.profileApi.organizationsOrganizationIdProfilePreferencesGet({ organizationId }, options),
|
|
453
492
|
updatePreferences: (organizationId, userPreferencesUpdate, options) => this.profileApi.organizationsOrganizationIdProfilePreferencesPut({ organizationId, userPreferencesUpdate }, options),
|
|
493
|
+
get: (options) => this.profileApi.profileGet(options),
|
|
494
|
+
update: (profileUpdate, options) => this.profileApi.profilePatch({ profileUpdate }, options),
|
|
495
|
+
deletion: {
|
|
496
|
+
status: (options) => this.profileApi.profileDeletionGet(options),
|
|
497
|
+
request: (profileDeletionPostRequest, options) => this.profileApi.profileDeletionPost({ profileDeletionPostRequest }, options),
|
|
498
|
+
cancel: (options) => this.profileApi.profileDeletionDelete(options),
|
|
499
|
+
},
|
|
454
500
|
};
|
|
455
501
|
|
|
456
502
|
this.rag = {
|
|
@@ -533,6 +579,7 @@ export class Api {
|
|
|
533
579
|
deleteDispatchRule: (dispatchId, options) => this.adminSipApi.adminSipDispatchRulesDispatchIdDelete({ dispatchId }, options),
|
|
534
580
|
listLiveKitTrunks: (options) => this.adminSipApi.adminSipLivekitTrunksGet(options),
|
|
535
581
|
listLiveKitDispatchRules: (options) => this.adminSipApi.adminSipLivekitDispatchRulesGet(options),
|
|
582
|
+
reconcile: (params, options) => this.adminSipApi.adminSipReconcilePost({ adminSipReconcilePostRequest: { apply: params?.apply, force: params?.force } }, options),
|
|
536
583
|
};
|
|
537
584
|
|
|
538
585
|
this.outboundCalls = {
|
package/src/apis/AdminSIPApi.ts
CHANGED
|
@@ -16,20 +16,26 @@
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
18
|
AdminDispatchRuleCreate,
|
|
19
|
+
AdminSipReconcilePostRequest,
|
|
19
20
|
AdminSipTrunkCreate,
|
|
20
21
|
AdminSipTrunksListResponse,
|
|
21
22
|
OrganizationsOrganizationIdSipDispatchRulesPost200Response,
|
|
23
|
+
SipReconciliationReport,
|
|
22
24
|
SipTrunk,
|
|
23
25
|
} from '../models/index';
|
|
24
26
|
import {
|
|
25
27
|
AdminDispatchRuleCreateFromJSON,
|
|
26
28
|
AdminDispatchRuleCreateToJSON,
|
|
29
|
+
AdminSipReconcilePostRequestFromJSON,
|
|
30
|
+
AdminSipReconcilePostRequestToJSON,
|
|
27
31
|
AdminSipTrunkCreateFromJSON,
|
|
28
32
|
AdminSipTrunkCreateToJSON,
|
|
29
33
|
AdminSipTrunksListResponseFromJSON,
|
|
30
34
|
AdminSipTrunksListResponseToJSON,
|
|
31
35
|
OrganizationsOrganizationIdSipDispatchRulesPost200ResponseFromJSON,
|
|
32
36
|
OrganizationsOrganizationIdSipDispatchRulesPost200ResponseToJSON,
|
|
37
|
+
SipReconciliationReportFromJSON,
|
|
38
|
+
SipReconciliationReportToJSON,
|
|
33
39
|
SipTrunkFromJSON,
|
|
34
40
|
SipTrunkToJSON,
|
|
35
41
|
} from '../models/index';
|
|
@@ -42,6 +48,12 @@ export interface AdminSipDispatchRulesPostRequest {
|
|
|
42
48
|
adminDispatchRuleCreate: AdminDispatchRuleCreate;
|
|
43
49
|
}
|
|
44
50
|
|
|
51
|
+
export interface AdminSipReconcilePostOperationRequest {
|
|
52
|
+
apply?: boolean;
|
|
53
|
+
force?: boolean;
|
|
54
|
+
adminSipReconcilePostRequest?: AdminSipReconcilePostRequest;
|
|
55
|
+
}
|
|
56
|
+
|
|
45
57
|
export interface AdminSipTrunksGetRequest {
|
|
46
58
|
organizationId?: string;
|
|
47
59
|
agentId?: string;
|
|
@@ -230,6 +242,56 @@ export class AdminSIPApi extends runtime.BaseAPI {
|
|
|
230
242
|
await this.adminSipLivekitTrunksGetRaw(initOverrides);
|
|
231
243
|
}
|
|
232
244
|
|
|
245
|
+
/**
|
|
246
|
+
* 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.
|
|
247
|
+
* Report (and optionally clean up) drift between LiveKit and the database (app-admin only)
|
|
248
|
+
*/
|
|
249
|
+
async adminSipReconcilePostRaw(requestParameters: AdminSipReconcilePostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SipReconciliationReport>> {
|
|
250
|
+
const queryParameters: any = {};
|
|
251
|
+
|
|
252
|
+
if (requestParameters['apply'] != null) {
|
|
253
|
+
queryParameters['apply'] = requestParameters['apply'];
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
if (requestParameters['force'] != null) {
|
|
257
|
+
queryParameters['force'] = requestParameters['force'];
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
261
|
+
|
|
262
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
263
|
+
|
|
264
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
265
|
+
const token = this.configuration.accessToken;
|
|
266
|
+
const tokenString = await token("bearerAuth", []);
|
|
267
|
+
|
|
268
|
+
if (tokenString) {
|
|
269
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
let urlPath = `/admin/sip/reconcile`;
|
|
274
|
+
|
|
275
|
+
const response = await this.request({
|
|
276
|
+
path: urlPath,
|
|
277
|
+
method: 'POST',
|
|
278
|
+
headers: headerParameters,
|
|
279
|
+
query: queryParameters,
|
|
280
|
+
body: AdminSipReconcilePostRequestToJSON(requestParameters['adminSipReconcilePostRequest']),
|
|
281
|
+
}, initOverrides);
|
|
282
|
+
|
|
283
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SipReconciliationReportFromJSON(jsonValue));
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* 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.
|
|
288
|
+
* Report (and optionally clean up) drift between LiveKit and the database (app-admin only)
|
|
289
|
+
*/
|
|
290
|
+
async adminSipReconcilePost(requestParameters: AdminSipReconcilePostOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SipReconciliationReport> {
|
|
291
|
+
const response = await this.adminSipReconcilePostRaw(requestParameters, initOverrides);
|
|
292
|
+
return await response.value();
|
|
293
|
+
}
|
|
294
|
+
|
|
233
295
|
/**
|
|
234
296
|
* List SIP trunks across all organizations (app-admin only)
|
|
235
297
|
*/
|
|
@@ -17,14 +17,32 @@ import * as runtime from '../runtime';
|
|
|
17
17
|
import type {
|
|
18
18
|
Organization,
|
|
19
19
|
OrganizationCreate,
|
|
20
|
+
OrganizationDeletionStatus,
|
|
21
|
+
OrganizationsOrganizationIdDeletionPost409Response,
|
|
20
22
|
} from '../models/index';
|
|
21
23
|
import {
|
|
22
24
|
OrganizationFromJSON,
|
|
23
25
|
OrganizationToJSON,
|
|
24
26
|
OrganizationCreateFromJSON,
|
|
25
27
|
OrganizationCreateToJSON,
|
|
28
|
+
OrganizationDeletionStatusFromJSON,
|
|
29
|
+
OrganizationDeletionStatusToJSON,
|
|
30
|
+
OrganizationsOrganizationIdDeletionPost409ResponseFromJSON,
|
|
31
|
+
OrganizationsOrganizationIdDeletionPost409ResponseToJSON,
|
|
26
32
|
} from '../models/index';
|
|
27
33
|
|
|
34
|
+
export interface OrganizationsOrganizationIdDeletionDeleteRequest {
|
|
35
|
+
organizationId: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface OrganizationsOrganizationIdDeletionGetRequest {
|
|
39
|
+
organizationId: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface OrganizationsOrganizationIdDeletionPostRequest {
|
|
43
|
+
organizationId: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
28
46
|
export interface OrganizationsPostRequest {
|
|
29
47
|
organizationCreate: OrganizationCreate;
|
|
30
48
|
}
|
|
@@ -71,6 +89,147 @@ export class OrganizationsApi extends runtime.BaseAPI {
|
|
|
71
89
|
return await response.value();
|
|
72
90
|
}
|
|
73
91
|
|
|
92
|
+
/**
|
|
93
|
+
* Owner only. Idempotent - succeeds whether or not a deletion was pending.
|
|
94
|
+
* Cancel a pending organization deletion
|
|
95
|
+
*/
|
|
96
|
+
async organizationsOrganizationIdDeletionDeleteRaw(requestParameters: OrganizationsOrganizationIdDeletionDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Organization>> {
|
|
97
|
+
if (requestParameters['organizationId'] == null) {
|
|
98
|
+
throw new runtime.RequiredError(
|
|
99
|
+
'organizationId',
|
|
100
|
+
'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdDeletionDelete().'
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const queryParameters: any = {};
|
|
105
|
+
|
|
106
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
107
|
+
|
|
108
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
109
|
+
const token = this.configuration.accessToken;
|
|
110
|
+
const tokenString = await token("bearerAuth", []);
|
|
111
|
+
|
|
112
|
+
if (tokenString) {
|
|
113
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
let urlPath = `/organizations/{organizationId}/deletion`;
|
|
118
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
119
|
+
|
|
120
|
+
const response = await this.request({
|
|
121
|
+
path: urlPath,
|
|
122
|
+
method: 'DELETE',
|
|
123
|
+
headers: headerParameters,
|
|
124
|
+
query: queryParameters,
|
|
125
|
+
}, initOverrides);
|
|
126
|
+
|
|
127
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => OrganizationFromJSON(jsonValue));
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Owner only. Idempotent - succeeds whether or not a deletion was pending.
|
|
132
|
+
* Cancel a pending organization deletion
|
|
133
|
+
*/
|
|
134
|
+
async organizationsOrganizationIdDeletionDelete(requestParameters: OrganizationsOrganizationIdDeletionDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Organization> {
|
|
135
|
+
const response = await this.organizationsOrganizationIdDeletionDeleteRaw(requestParameters, initOverrides);
|
|
136
|
+
return await response.value();
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Owner only. Non-owners receive 404.
|
|
141
|
+
* Get the status of a pending organization deletion
|
|
142
|
+
*/
|
|
143
|
+
async organizationsOrganizationIdDeletionGetRaw(requestParameters: OrganizationsOrganizationIdDeletionGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrganizationDeletionStatus>> {
|
|
144
|
+
if (requestParameters['organizationId'] == null) {
|
|
145
|
+
throw new runtime.RequiredError(
|
|
146
|
+
'organizationId',
|
|
147
|
+
'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdDeletionGet().'
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
const queryParameters: any = {};
|
|
152
|
+
|
|
153
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
154
|
+
|
|
155
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
156
|
+
const token = this.configuration.accessToken;
|
|
157
|
+
const tokenString = await token("bearerAuth", []);
|
|
158
|
+
|
|
159
|
+
if (tokenString) {
|
|
160
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
let urlPath = `/organizations/{organizationId}/deletion`;
|
|
165
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
166
|
+
|
|
167
|
+
const response = await this.request({
|
|
168
|
+
path: urlPath,
|
|
169
|
+
method: 'GET',
|
|
170
|
+
headers: headerParameters,
|
|
171
|
+
query: queryParameters,
|
|
172
|
+
}, initOverrides);
|
|
173
|
+
|
|
174
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => OrganizationDeletionStatusFromJSON(jsonValue));
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Owner only. Non-owners receive 404.
|
|
179
|
+
* Get the status of a pending organization deletion
|
|
180
|
+
*/
|
|
181
|
+
async organizationsOrganizationIdDeletionGet(requestParameters: OrganizationsOrganizationIdDeletionGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrganizationDeletionStatus> {
|
|
182
|
+
const response = await this.organizationsOrganizationIdDeletionGetRaw(requestParameters, initOverrides);
|
|
183
|
+
return await response.value();
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* 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.
|
|
188
|
+
* Schedule an organization for deletion
|
|
189
|
+
*/
|
|
190
|
+
async organizationsOrganizationIdDeletionPostRaw(requestParameters: OrganizationsOrganizationIdDeletionPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Organization>> {
|
|
191
|
+
if (requestParameters['organizationId'] == null) {
|
|
192
|
+
throw new runtime.RequiredError(
|
|
193
|
+
'organizationId',
|
|
194
|
+
'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdDeletionPost().'
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
const queryParameters: any = {};
|
|
199
|
+
|
|
200
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
201
|
+
|
|
202
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
203
|
+
const token = this.configuration.accessToken;
|
|
204
|
+
const tokenString = await token("bearerAuth", []);
|
|
205
|
+
|
|
206
|
+
if (tokenString) {
|
|
207
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
let urlPath = `/organizations/{organizationId}/deletion`;
|
|
212
|
+
urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
|
|
213
|
+
|
|
214
|
+
const response = await this.request({
|
|
215
|
+
path: urlPath,
|
|
216
|
+
method: 'POST',
|
|
217
|
+
headers: headerParameters,
|
|
218
|
+
query: queryParameters,
|
|
219
|
+
}, initOverrides);
|
|
220
|
+
|
|
221
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => OrganizationFromJSON(jsonValue));
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* 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.
|
|
226
|
+
* Schedule an organization for deletion
|
|
227
|
+
*/
|
|
228
|
+
async organizationsOrganizationIdDeletionPost(requestParameters: OrganizationsOrganizationIdDeletionPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Organization> {
|
|
229
|
+
const response = await this.organizationsOrganizationIdDeletionPostRaw(requestParameters, initOverrides);
|
|
230
|
+
return await response.value();
|
|
231
|
+
}
|
|
232
|
+
|
|
74
233
|
/**
|
|
75
234
|
* Create a new organization
|
|
76
235
|
*/
|
package/src/apis/ProfileApi.ts
CHANGED
|
@@ -15,10 +15,25 @@
|
|
|
15
15
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
|
+
AccountDeletionStatus,
|
|
19
|
+
Profile,
|
|
20
|
+
ProfileDeletionPost409Response,
|
|
21
|
+
ProfileDeletionPostRequest,
|
|
22
|
+
ProfileUpdate,
|
|
18
23
|
UserPreferences,
|
|
19
24
|
UserPreferencesUpdate,
|
|
20
25
|
} from '../models/index';
|
|
21
26
|
import {
|
|
27
|
+
AccountDeletionStatusFromJSON,
|
|
28
|
+
AccountDeletionStatusToJSON,
|
|
29
|
+
ProfileFromJSON,
|
|
30
|
+
ProfileToJSON,
|
|
31
|
+
ProfileDeletionPost409ResponseFromJSON,
|
|
32
|
+
ProfileDeletionPost409ResponseToJSON,
|
|
33
|
+
ProfileDeletionPostRequestFromJSON,
|
|
34
|
+
ProfileDeletionPostRequestToJSON,
|
|
35
|
+
ProfileUpdateFromJSON,
|
|
36
|
+
ProfileUpdateToJSON,
|
|
22
37
|
UserPreferencesFromJSON,
|
|
23
38
|
UserPreferencesToJSON,
|
|
24
39
|
UserPreferencesUpdateFromJSON,
|
|
@@ -34,6 +49,14 @@ export interface OrganizationsOrganizationIdProfilePreferencesPutRequest {
|
|
|
34
49
|
userPreferencesUpdate: UserPreferencesUpdate;
|
|
35
50
|
}
|
|
36
51
|
|
|
52
|
+
export interface ProfileDeletionPostOperationRequest {
|
|
53
|
+
profileDeletionPostRequest: ProfileDeletionPostRequest;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface ProfilePatchRequest {
|
|
57
|
+
profileUpdate: ProfileUpdate;
|
|
58
|
+
}
|
|
59
|
+
|
|
37
60
|
/**
|
|
38
61
|
*
|
|
39
62
|
*/
|
|
@@ -139,4 +162,215 @@ export class ProfileApi extends runtime.BaseAPI {
|
|
|
139
162
|
return await response.value();
|
|
140
163
|
}
|
|
141
164
|
|
|
165
|
+
/**
|
|
166
|
+
* Idempotent - succeeds whether or not a deletion was pending.
|
|
167
|
+
* Cancel a pending account deletion
|
|
168
|
+
*/
|
|
169
|
+
async profileDeletionDeleteRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Profile>> {
|
|
170
|
+
const queryParameters: any = {};
|
|
171
|
+
|
|
172
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
173
|
+
|
|
174
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
175
|
+
const token = this.configuration.accessToken;
|
|
176
|
+
const tokenString = await token("bearerAuth", []);
|
|
177
|
+
|
|
178
|
+
if (tokenString) {
|
|
179
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
let urlPath = `/profile/deletion`;
|
|
184
|
+
|
|
185
|
+
const response = await this.request({
|
|
186
|
+
path: urlPath,
|
|
187
|
+
method: 'DELETE',
|
|
188
|
+
headers: headerParameters,
|
|
189
|
+
query: queryParameters,
|
|
190
|
+
}, initOverrides);
|
|
191
|
+
|
|
192
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ProfileFromJSON(jsonValue));
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Idempotent - succeeds whether or not a deletion was pending.
|
|
197
|
+
* Cancel a pending account deletion
|
|
198
|
+
*/
|
|
199
|
+
async profileDeletionDelete(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Profile> {
|
|
200
|
+
const response = await this.profileDeletionDeleteRaw(initOverrides);
|
|
201
|
+
return await response.value();
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Get the status of a pending account deletion
|
|
206
|
+
*/
|
|
207
|
+
async profileDeletionGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountDeletionStatus>> {
|
|
208
|
+
const queryParameters: any = {};
|
|
209
|
+
|
|
210
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
211
|
+
|
|
212
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
213
|
+
const token = this.configuration.accessToken;
|
|
214
|
+
const tokenString = await token("bearerAuth", []);
|
|
215
|
+
|
|
216
|
+
if (tokenString) {
|
|
217
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
let urlPath = `/profile/deletion`;
|
|
222
|
+
|
|
223
|
+
const response = await this.request({
|
|
224
|
+
path: urlPath,
|
|
225
|
+
method: 'GET',
|
|
226
|
+
headers: headerParameters,
|
|
227
|
+
query: queryParameters,
|
|
228
|
+
}, initOverrides);
|
|
229
|
+
|
|
230
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AccountDeletionStatusFromJSON(jsonValue));
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Get the status of a pending account deletion
|
|
235
|
+
*/
|
|
236
|
+
async profileDeletionGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountDeletionStatus> {
|
|
237
|
+
const response = await this.profileDeletionGetRaw(initOverrides);
|
|
238
|
+
return await response.value();
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* 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.
|
|
243
|
+
* Schedule the authenticated user\'s account for deletion
|
|
244
|
+
*/
|
|
245
|
+
async profileDeletionPostRaw(requestParameters: ProfileDeletionPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Profile>> {
|
|
246
|
+
if (requestParameters['profileDeletionPostRequest'] == null) {
|
|
247
|
+
throw new runtime.RequiredError(
|
|
248
|
+
'profileDeletionPostRequest',
|
|
249
|
+
'Required parameter "profileDeletionPostRequest" was null or undefined when calling profileDeletionPost().'
|
|
250
|
+
);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
const queryParameters: any = {};
|
|
254
|
+
|
|
255
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
256
|
+
|
|
257
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
258
|
+
|
|
259
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
260
|
+
const token = this.configuration.accessToken;
|
|
261
|
+
const tokenString = await token("bearerAuth", []);
|
|
262
|
+
|
|
263
|
+
if (tokenString) {
|
|
264
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
let urlPath = `/profile/deletion`;
|
|
269
|
+
|
|
270
|
+
const response = await this.request({
|
|
271
|
+
path: urlPath,
|
|
272
|
+
method: 'POST',
|
|
273
|
+
headers: headerParameters,
|
|
274
|
+
query: queryParameters,
|
|
275
|
+
body: ProfileDeletionPostRequestToJSON(requestParameters['profileDeletionPostRequest']),
|
|
276
|
+
}, initOverrides);
|
|
277
|
+
|
|
278
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ProfileFromJSON(jsonValue));
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* 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.
|
|
283
|
+
* Schedule the authenticated user\'s account for deletion
|
|
284
|
+
*/
|
|
285
|
+
async profileDeletionPost(requestParameters: ProfileDeletionPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Profile> {
|
|
286
|
+
const response = await this.profileDeletionPostRaw(requestParameters, initOverrides);
|
|
287
|
+
return await response.value();
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Get the authenticated user\'s own profile
|
|
292
|
+
*/
|
|
293
|
+
async profileGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Profile>> {
|
|
294
|
+
const queryParameters: any = {};
|
|
295
|
+
|
|
296
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
297
|
+
|
|
298
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
299
|
+
const token = this.configuration.accessToken;
|
|
300
|
+
const tokenString = await token("bearerAuth", []);
|
|
301
|
+
|
|
302
|
+
if (tokenString) {
|
|
303
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
let urlPath = `/profile`;
|
|
308
|
+
|
|
309
|
+
const response = await this.request({
|
|
310
|
+
path: urlPath,
|
|
311
|
+
method: 'GET',
|
|
312
|
+
headers: headerParameters,
|
|
313
|
+
query: queryParameters,
|
|
314
|
+
}, initOverrides);
|
|
315
|
+
|
|
316
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ProfileFromJSON(jsonValue));
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Get the authenticated user\'s own profile
|
|
321
|
+
*/
|
|
322
|
+
async profileGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Profile> {
|
|
323
|
+
const response = await this.profileGetRaw(initOverrides);
|
|
324
|
+
return await response.value();
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Only the supplied fields are changed. Email is owned by the identity provider and cannot be set here.
|
|
329
|
+
* Update the authenticated user\'s own profile
|
|
330
|
+
*/
|
|
331
|
+
async profilePatchRaw(requestParameters: ProfilePatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Profile>> {
|
|
332
|
+
if (requestParameters['profileUpdate'] == null) {
|
|
333
|
+
throw new runtime.RequiredError(
|
|
334
|
+
'profileUpdate',
|
|
335
|
+
'Required parameter "profileUpdate" was null or undefined when calling profilePatch().'
|
|
336
|
+
);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
const queryParameters: any = {};
|
|
340
|
+
|
|
341
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
342
|
+
|
|
343
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
344
|
+
|
|
345
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
346
|
+
const token = this.configuration.accessToken;
|
|
347
|
+
const tokenString = await token("bearerAuth", []);
|
|
348
|
+
|
|
349
|
+
if (tokenString) {
|
|
350
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
let urlPath = `/profile`;
|
|
355
|
+
|
|
356
|
+
const response = await this.request({
|
|
357
|
+
path: urlPath,
|
|
358
|
+
method: 'PATCH',
|
|
359
|
+
headers: headerParameters,
|
|
360
|
+
query: queryParameters,
|
|
361
|
+
body: ProfileUpdateToJSON(requestParameters['profileUpdate']),
|
|
362
|
+
}, initOverrides);
|
|
363
|
+
|
|
364
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ProfileFromJSON(jsonValue));
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* Only the supplied fields are changed. Email is owned by the identity provider and cannot be set here.
|
|
369
|
+
* Update the authenticated user\'s own profile
|
|
370
|
+
*/
|
|
371
|
+
async profilePatch(requestParameters: ProfilePatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Profile> {
|
|
372
|
+
const response = await this.profilePatchRaw(requestParameters, initOverrides);
|
|
373
|
+
return await response.value();
|
|
374
|
+
}
|
|
375
|
+
|
|
142
376
|
}
|