@l7mp/tivadar-ai-api-sdk 0.2.7 → 0.2.9

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 (41) hide show
  1. package/dist/api-client.d.ts +1 -0
  2. package/dist/api-client.js +1 -0
  3. package/dist/apis/InvitationsApi.d.ts +14 -0
  4. package/dist/apis/InvitationsApi.js +42 -0
  5. package/dist/apis/PhonebookApi.d.ts +2 -2
  6. package/dist/apis/PhonebookApi.js +2 -2
  7. package/dist/esm/api-client.d.ts +1 -0
  8. package/dist/esm/api-client.js +1 -0
  9. package/dist/esm/apis/InvitationsApi.d.ts +14 -0
  10. package/dist/esm/apis/InvitationsApi.js +42 -0
  11. package/dist/esm/apis/PhonebookApi.d.ts +2 -2
  12. package/dist/esm/apis/PhonebookApi.js +2 -2
  13. package/dist/esm/models/InvitationResponse.d.ts +18 -0
  14. package/dist/esm/models/InvitationResponse.js +6 -0
  15. package/dist/esm/models/PhonebookEntry.d.ts +7 -1
  16. package/dist/esm/models/PhonebookEntry.js +5 -3
  17. package/dist/esm/models/PhonebookEntryCreate.d.ts +7 -1
  18. package/dist/esm/models/PhonebookEntryCreate.js +5 -3
  19. package/dist/esm/models/PhonebookEntryUpdate.d.ts +7 -1
  20. package/dist/esm/models/PhonebookEntryUpdate.js +4 -2
  21. package/dist/esm/models/VoiceAgentMetadata.d.ts +24 -0
  22. package/dist/esm/models/VoiceAgentMetadata.js +8 -0
  23. package/dist/models/InvitationResponse.d.ts +18 -0
  24. package/dist/models/InvitationResponse.js +6 -0
  25. package/dist/models/PhonebookEntry.d.ts +7 -1
  26. package/dist/models/PhonebookEntry.js +5 -3
  27. package/dist/models/PhonebookEntryCreate.d.ts +7 -1
  28. package/dist/models/PhonebookEntryCreate.js +5 -3
  29. package/dist/models/PhonebookEntryUpdate.d.ts +7 -1
  30. package/dist/models/PhonebookEntryUpdate.js +4 -2
  31. package/dist/models/VoiceAgentMetadata.d.ts +24 -0
  32. package/dist/models/VoiceAgentMetadata.js +8 -0
  33. package/package.json +1 -1
  34. package/src/api-client.ts +2 -0
  35. package/src/apis/InvitationsApi.ts +59 -0
  36. package/src/apis/PhonebookApi.ts +2 -2
  37. package/src/models/InvitationResponse.ts +24 -0
  38. package/src/models/PhonebookEntry.ts +12 -4
  39. package/src/models/PhonebookEntryCreate.ts +12 -4
  40. package/src/models/PhonebookEntryUpdate.ts +11 -3
  41. package/src/models/VoiceAgentMetadata.ts +32 -0
@@ -73,6 +73,7 @@ export declare class Api {
73
73
  accept: (invitationAccept: InvitationAccept, options?: RequestInit) => ReturnType<InvitationsApi["invitationsAcceptPost"]>;
74
74
  list: (organizationId: string, options?: RequestInit) => ReturnType<InvitationsApi["organizationsOrganizationIdInvitationsGet"]>;
75
75
  create: (organizationId: string, invitationCreate: InvitationCreate, options?: RequestInit) => ReturnType<InvitationsApi["organizationsOrganizationIdInvitationsPost"]>;
76
+ cancel: (organizationId: string, invitationId: number, options?: RequestInit) => ReturnType<InvitationsApi["organizationsOrganizationIdInvitationsInvitationIdDelete"]>;
76
77
  };
77
78
  readonly recordings: {
78
79
  get: (organizationId: string, callId: string, options?: RequestInit) => ReturnType<RecordingsApi["organizationsOrganizationIdRecordingsCallIdGet"]>;
@@ -121,6 +121,7 @@ class Api {
121
121
  accept: (invitationAccept, options) => this.invitationsApi.invitationsAcceptPost({ invitationAccept }, options),
122
122
  list: (organizationId, options) => this.invitationsApi.organizationsOrganizationIdInvitationsGet({ organizationId }, options),
123
123
  create: (organizationId, invitationCreate, options) => this.invitationsApi.organizationsOrganizationIdInvitationsPost({ organizationId, invitationCreate }, options),
124
+ cancel: (organizationId, invitationId, options) => this.invitationsApi.organizationsOrganizationIdInvitationsInvitationIdDelete({ organizationId, invitationId }, options),
124
125
  };
125
126
  this.recordings = {
126
127
  get: (organizationId, callId, options) => this.recordingsApi.organizationsOrganizationIdRecordingsCallIdGet({ organizationId, callId }, options),
@@ -17,6 +17,10 @@ export interface InvitationsAcceptPostRequest {
17
17
  export interface OrganizationsOrganizationIdInvitationsGetRequest {
18
18
  organizationId: string;
19
19
  }
20
+ export interface OrganizationsOrganizationIdInvitationsInvitationIdDeleteRequest {
21
+ organizationId: string;
22
+ invitationId: number;
23
+ }
20
24
  export interface OrganizationsOrganizationIdInvitationsPostRequest {
21
25
  organizationId: string;
22
26
  invitationCreate: InvitationCreate;
@@ -26,10 +30,12 @@ export interface OrganizationsOrganizationIdInvitationsPostRequest {
26
30
  */
27
31
  export declare class InvitationsApi extends runtime.BaseAPI {
28
32
  /**
33
+ * Requires a valid JWT. The signed-in user is used as the accepting member; `user_id` is not read from the body. Responses (all return HTTP 200; check the body): - success: `{ message, organization_id }` - already a member: `{ message, organization_id, already_member: true }` (the invitation is consumed) - email mismatch: `{ error, invited_email }` - invalid/used/expired: `{ error }`
29
34
  * Accept an invitation
30
35
  */
31
36
  invitationsAcceptPostRaw(requestParameters: InvitationsAcceptPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InvitationResponse>>;
32
37
  /**
38
+ * Requires a valid JWT. The signed-in user is used as the accepting member; `user_id` is not read from the body. Responses (all return HTTP 200; check the body): - success: `{ message, organization_id }` - already a member: `{ message, organization_id, already_member: true }` (the invitation is consumed) - email mismatch: `{ error, invited_email }` - invalid/used/expired: `{ error }`
33
39
  * Accept an invitation
34
40
  */
35
41
  invitationsAcceptPost(requestParameters: InvitationsAcceptPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InvitationResponse>;
@@ -41,6 +47,14 @@ export declare class InvitationsApi extends runtime.BaseAPI {
41
47
  * List all invitations for an organization
42
48
  */
43
49
  organizationsOrganizationIdInvitationsGet(requestParameters: OrganizationsOrganizationIdInvitationsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<InvitationResponse>>;
50
+ /**
51
+ * Cancel (delete) a pending invitation
52
+ */
53
+ organizationsOrganizationIdInvitationsInvitationIdDeleteRaw(requestParameters: OrganizationsOrganizationIdInvitationsInvitationIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
54
+ /**
55
+ * Cancel (delete) a pending invitation
56
+ */
57
+ organizationsOrganizationIdInvitationsInvitationIdDelete(requestParameters: OrganizationsOrganizationIdInvitationsInvitationIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
44
58
  /**
45
59
  * Create a new invitation
46
60
  */
@@ -30,6 +30,7 @@ const index_1 = require("../models/index");
30
30
  */
31
31
  class InvitationsApi extends runtime.BaseAPI {
32
32
  /**
33
+ * Requires a valid JWT. The signed-in user is used as the accepting member; `user_id` is not read from the body. Responses (all return HTTP 200; check the body): - success: `{ message, organization_id }` - already a member: `{ message, organization_id, already_member: true }` (the invitation is consumed) - email mismatch: `{ error, invited_email }` - invalid/used/expired: `{ error }`
33
34
  * Accept an invitation
34
35
  */
35
36
  invitationsAcceptPostRaw(requestParameters, initOverrides) {
@@ -59,6 +60,7 @@ class InvitationsApi extends runtime.BaseAPI {
59
60
  });
60
61
  }
61
62
  /**
63
+ * Requires a valid JWT. The signed-in user is used as the accepting member; `user_id` is not read from the body. Responses (all return HTTP 200; check the body): - success: `{ message, organization_id }` - already a member: `{ message, organization_id, already_member: true }` (the invitation is consumed) - email mismatch: `{ error, invited_email }` - invalid/used/expired: `{ error }`
62
64
  * Accept an invitation
63
65
  */
64
66
  invitationsAcceptPost(requestParameters, initOverrides) {
@@ -104,6 +106,46 @@ class InvitationsApi extends runtime.BaseAPI {
104
106
  return yield response.value();
105
107
  });
106
108
  }
109
+ /**
110
+ * Cancel (delete) a pending invitation
111
+ */
112
+ organizationsOrganizationIdInvitationsInvitationIdDeleteRaw(requestParameters, initOverrides) {
113
+ return __awaiter(this, void 0, void 0, function* () {
114
+ if (requestParameters['organizationId'] == null) {
115
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdInvitationsInvitationIdDelete().');
116
+ }
117
+ if (requestParameters['invitationId'] == null) {
118
+ throw new runtime.RequiredError('invitationId', 'Required parameter "invitationId" was null or undefined when calling organizationsOrganizationIdInvitationsInvitationIdDelete().');
119
+ }
120
+ const queryParameters = {};
121
+ const headerParameters = {};
122
+ if (this.configuration && this.configuration.accessToken) {
123
+ const token = this.configuration.accessToken;
124
+ const tokenString = yield token("bearerAuth", []);
125
+ if (tokenString) {
126
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
127
+ }
128
+ }
129
+ let urlPath = `/organizations/{organizationId}/invitations/{invitationId}`;
130
+ urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
131
+ urlPath = urlPath.replace(`{${"invitationId"}}`, encodeURIComponent(String(requestParameters['invitationId'])));
132
+ const response = yield this.request({
133
+ path: urlPath,
134
+ method: 'DELETE',
135
+ headers: headerParameters,
136
+ query: queryParameters,
137
+ }, initOverrides);
138
+ return new runtime.VoidApiResponse(response);
139
+ });
140
+ }
141
+ /**
142
+ * Cancel (delete) a pending invitation
143
+ */
144
+ organizationsOrganizationIdInvitationsInvitationIdDelete(requestParameters, initOverrides) {
145
+ return __awaiter(this, void 0, void 0, function* () {
146
+ yield this.organizationsOrganizationIdInvitationsInvitationIdDeleteRaw(requestParameters, initOverrides);
147
+ });
148
+ }
107
149
  /**
108
150
  * Create a new invitation
109
151
  */
@@ -93,12 +93,12 @@ export declare class PhonebookApi extends runtime.BaseAPI {
93
93
  */
94
94
  organizationsOrganizationIdPhonebookEntriesGet(requestParameters: OrganizationsOrganizationIdPhonebookEntriesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<PhonebookEntry>>;
95
95
  /**
96
- * Upload a CSV file. The header row is required and must contain at least `phone` and `name` columns. Optional columns: `company`, `email`. Header aliases (case-insensitive): phone/phone_number/number, name/full_name/contact, company/organization, email/email_address. Existing entries with the same phone are updated; new ones are inserted.
96
+ * Upload a CSV file. The header row is required and must contain at least `phone` and either `first_name` (and optionally `last_name`) or a combined `name` column (split on the first space). Optional columns: `company`, `email`. Header aliases (case-insensitive): phone/phone_number/number, first_name/firstname/given_name, last_name/lastname/surname/family_name, name/full_name/contact, company/organization, email/email_address. Existing entries with the same phone are updated; new ones are inserted.
97
97
  * Import phonebook entries from a CSV file
98
98
  */
99
99
  organizationsOrganizationIdPhonebookEntriesImportPostRaw(requestParameters: OrganizationsOrganizationIdPhonebookEntriesImportPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PhonebookImportResult>>;
100
100
  /**
101
- * Upload a CSV file. The header row is required and must contain at least `phone` and `name` columns. Optional columns: `company`, `email`. Header aliases (case-insensitive): phone/phone_number/number, name/full_name/contact, company/organization, email/email_address. Existing entries with the same phone are updated; new ones are inserted.
101
+ * Upload a CSV file. The header row is required and must contain at least `phone` and either `first_name` (and optionally `last_name`) or a combined `name` column (split on the first space). Optional columns: `company`, `email`. Header aliases (case-insensitive): phone/phone_number/number, first_name/firstname/given_name, last_name/lastname/surname/family_name, name/full_name/contact, company/organization, email/email_address. Existing entries with the same phone are updated; new ones are inserted.
102
102
  * Import phonebook entries from a CSV file
103
103
  */
104
104
  organizationsOrganizationIdPhonebookEntriesImportPost(requestParameters: OrganizationsOrganizationIdPhonebookEntriesImportPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PhonebookImportResult>;
@@ -245,7 +245,7 @@ class PhonebookApi extends runtime.BaseAPI {
245
245
  });
246
246
  }
247
247
  /**
248
- * Upload a CSV file. The header row is required and must contain at least `phone` and `name` columns. Optional columns: `company`, `email`. Header aliases (case-insensitive): phone/phone_number/number, name/full_name/contact, company/organization, email/email_address. Existing entries with the same phone are updated; new ones are inserted.
248
+ * Upload a CSV file. The header row is required and must contain at least `phone` and either `first_name` (and optionally `last_name`) or a combined `name` column (split on the first space). Optional columns: `company`, `email`. Header aliases (case-insensitive): phone/phone_number/number, first_name/firstname/given_name, last_name/lastname/surname/family_name, name/full_name/contact, company/organization, email/email_address. Existing entries with the same phone are updated; new ones are inserted.
249
249
  * Import phonebook entries from a CSV file
250
250
  */
251
251
  organizationsOrganizationIdPhonebookEntriesImportPostRaw(requestParameters, initOverrides) {
@@ -296,7 +296,7 @@ class PhonebookApi extends runtime.BaseAPI {
296
296
  });
297
297
  }
298
298
  /**
299
- * Upload a CSV file. The header row is required and must contain at least `phone` and `name` columns. Optional columns: `company`, `email`. Header aliases (case-insensitive): phone/phone_number/number, name/full_name/contact, company/organization, email/email_address. Existing entries with the same phone are updated; new ones are inserted.
299
+ * Upload a CSV file. The header row is required and must contain at least `phone` and either `first_name` (and optionally `last_name`) or a combined `name` column (split on the first space). Optional columns: `company`, `email`. Header aliases (case-insensitive): phone/phone_number/number, first_name/firstname/given_name, last_name/lastname/surname/family_name, name/full_name/contact, company/organization, email/email_address. Existing entries with the same phone are updated; new ones are inserted.
300
300
  * Import phonebook entries from a CSV file
301
301
  */
302
302
  organizationsOrganizationIdPhonebookEntriesImportPost(requestParameters, initOverrides) {
@@ -73,6 +73,7 @@ export declare class Api {
73
73
  accept: (invitationAccept: InvitationAccept, options?: RequestInit) => ReturnType<InvitationsApi["invitationsAcceptPost"]>;
74
74
  list: (organizationId: string, options?: RequestInit) => ReturnType<InvitationsApi["organizationsOrganizationIdInvitationsGet"]>;
75
75
  create: (organizationId: string, invitationCreate: InvitationCreate, options?: RequestInit) => ReturnType<InvitationsApi["organizationsOrganizationIdInvitationsPost"]>;
76
+ cancel: (organizationId: string, invitationId: number, options?: RequestInit) => ReturnType<InvitationsApi["organizationsOrganizationIdInvitationsInvitationIdDelete"]>;
76
77
  };
77
78
  readonly recordings: {
78
79
  get: (organizationId: string, callId: string, options?: RequestInit) => ReturnType<RecordingsApi["organizationsOrganizationIdRecordingsCallIdGet"]>;
@@ -118,6 +118,7 @@ export class Api {
118
118
  accept: (invitationAccept, options) => this.invitationsApi.invitationsAcceptPost({ invitationAccept }, options),
119
119
  list: (organizationId, options) => this.invitationsApi.organizationsOrganizationIdInvitationsGet({ organizationId }, options),
120
120
  create: (organizationId, invitationCreate, options) => this.invitationsApi.organizationsOrganizationIdInvitationsPost({ organizationId, invitationCreate }, options),
121
+ cancel: (organizationId, invitationId, options) => this.invitationsApi.organizationsOrganizationIdInvitationsInvitationIdDelete({ organizationId, invitationId }, options),
121
122
  };
122
123
  this.recordings = {
123
124
  get: (organizationId, callId, options) => this.recordingsApi.organizationsOrganizationIdRecordingsCallIdGet({ organizationId, callId }, options),
@@ -17,6 +17,10 @@ export interface InvitationsAcceptPostRequest {
17
17
  export interface OrganizationsOrganizationIdInvitationsGetRequest {
18
18
  organizationId: string;
19
19
  }
20
+ export interface OrganizationsOrganizationIdInvitationsInvitationIdDeleteRequest {
21
+ organizationId: string;
22
+ invitationId: number;
23
+ }
20
24
  export interface OrganizationsOrganizationIdInvitationsPostRequest {
21
25
  organizationId: string;
22
26
  invitationCreate: InvitationCreate;
@@ -26,10 +30,12 @@ export interface OrganizationsOrganizationIdInvitationsPostRequest {
26
30
  */
27
31
  export declare class InvitationsApi extends runtime.BaseAPI {
28
32
  /**
33
+ * Requires a valid JWT. The signed-in user is used as the accepting member; `user_id` is not read from the body. Responses (all return HTTP 200; check the body): - success: `{ message, organization_id }` - already a member: `{ message, organization_id, already_member: true }` (the invitation is consumed) - email mismatch: `{ error, invited_email }` - invalid/used/expired: `{ error }`
29
34
  * Accept an invitation
30
35
  */
31
36
  invitationsAcceptPostRaw(requestParameters: InvitationsAcceptPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InvitationResponse>>;
32
37
  /**
38
+ * Requires a valid JWT. The signed-in user is used as the accepting member; `user_id` is not read from the body. Responses (all return HTTP 200; check the body): - success: `{ message, organization_id }` - already a member: `{ message, organization_id, already_member: true }` (the invitation is consumed) - email mismatch: `{ error, invited_email }` - invalid/used/expired: `{ error }`
33
39
  * Accept an invitation
34
40
  */
35
41
  invitationsAcceptPost(requestParameters: InvitationsAcceptPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InvitationResponse>;
@@ -41,6 +47,14 @@ export declare class InvitationsApi extends runtime.BaseAPI {
41
47
  * List all invitations for an organization
42
48
  */
43
49
  organizationsOrganizationIdInvitationsGet(requestParameters: OrganizationsOrganizationIdInvitationsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<InvitationResponse>>;
50
+ /**
51
+ * Cancel (delete) a pending invitation
52
+ */
53
+ organizationsOrganizationIdInvitationsInvitationIdDeleteRaw(requestParameters: OrganizationsOrganizationIdInvitationsInvitationIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
54
+ /**
55
+ * Cancel (delete) a pending invitation
56
+ */
57
+ organizationsOrganizationIdInvitationsInvitationIdDelete(requestParameters: OrganizationsOrganizationIdInvitationsInvitationIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
44
58
  /**
45
59
  * Create a new invitation
46
60
  */
@@ -27,6 +27,7 @@ import { InvitationAcceptToJSON, InvitationCreateToJSON, InvitationResponseFromJ
27
27
  */
28
28
  export class InvitationsApi extends runtime.BaseAPI {
29
29
  /**
30
+ * Requires a valid JWT. The signed-in user is used as the accepting member; `user_id` is not read from the body. Responses (all return HTTP 200; check the body): - success: `{ message, organization_id }` - already a member: `{ message, organization_id, already_member: true }` (the invitation is consumed) - email mismatch: `{ error, invited_email }` - invalid/used/expired: `{ error }`
30
31
  * Accept an invitation
31
32
  */
32
33
  invitationsAcceptPostRaw(requestParameters, initOverrides) {
@@ -56,6 +57,7 @@ export class InvitationsApi extends runtime.BaseAPI {
56
57
  });
57
58
  }
58
59
  /**
60
+ * Requires a valid JWT. The signed-in user is used as the accepting member; `user_id` is not read from the body. Responses (all return HTTP 200; check the body): - success: `{ message, organization_id }` - already a member: `{ message, organization_id, already_member: true }` (the invitation is consumed) - email mismatch: `{ error, invited_email }` - invalid/used/expired: `{ error }`
59
61
  * Accept an invitation
60
62
  */
61
63
  invitationsAcceptPost(requestParameters, initOverrides) {
@@ -101,6 +103,46 @@ export class InvitationsApi extends runtime.BaseAPI {
101
103
  return yield response.value();
102
104
  });
103
105
  }
106
+ /**
107
+ * Cancel (delete) a pending invitation
108
+ */
109
+ organizationsOrganizationIdInvitationsInvitationIdDeleteRaw(requestParameters, initOverrides) {
110
+ return __awaiter(this, void 0, void 0, function* () {
111
+ if (requestParameters['organizationId'] == null) {
112
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdInvitationsInvitationIdDelete().');
113
+ }
114
+ if (requestParameters['invitationId'] == null) {
115
+ throw new runtime.RequiredError('invitationId', 'Required parameter "invitationId" was null or undefined when calling organizationsOrganizationIdInvitationsInvitationIdDelete().');
116
+ }
117
+ const queryParameters = {};
118
+ const headerParameters = {};
119
+ if (this.configuration && this.configuration.accessToken) {
120
+ const token = this.configuration.accessToken;
121
+ const tokenString = yield token("bearerAuth", []);
122
+ if (tokenString) {
123
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
124
+ }
125
+ }
126
+ let urlPath = `/organizations/{organizationId}/invitations/{invitationId}`;
127
+ urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
128
+ urlPath = urlPath.replace(`{${"invitationId"}}`, encodeURIComponent(String(requestParameters['invitationId'])));
129
+ const response = yield this.request({
130
+ path: urlPath,
131
+ method: 'DELETE',
132
+ headers: headerParameters,
133
+ query: queryParameters,
134
+ }, initOverrides);
135
+ return new runtime.VoidApiResponse(response);
136
+ });
137
+ }
138
+ /**
139
+ * Cancel (delete) a pending invitation
140
+ */
141
+ organizationsOrganizationIdInvitationsInvitationIdDelete(requestParameters, initOverrides) {
142
+ return __awaiter(this, void 0, void 0, function* () {
143
+ yield this.organizationsOrganizationIdInvitationsInvitationIdDeleteRaw(requestParameters, initOverrides);
144
+ });
145
+ }
104
146
  /**
105
147
  * Create a new invitation
106
148
  */
@@ -93,12 +93,12 @@ export declare class PhonebookApi extends runtime.BaseAPI {
93
93
  */
94
94
  organizationsOrganizationIdPhonebookEntriesGet(requestParameters: OrganizationsOrganizationIdPhonebookEntriesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<PhonebookEntry>>;
95
95
  /**
96
- * Upload a CSV file. The header row is required and must contain at least `phone` and `name` columns. Optional columns: `company`, `email`. Header aliases (case-insensitive): phone/phone_number/number, name/full_name/contact, company/organization, email/email_address. Existing entries with the same phone are updated; new ones are inserted.
96
+ * Upload a CSV file. The header row is required and must contain at least `phone` and either `first_name` (and optionally `last_name`) or a combined `name` column (split on the first space). Optional columns: `company`, `email`. Header aliases (case-insensitive): phone/phone_number/number, first_name/firstname/given_name, last_name/lastname/surname/family_name, name/full_name/contact, company/organization, email/email_address. Existing entries with the same phone are updated; new ones are inserted.
97
97
  * Import phonebook entries from a CSV file
98
98
  */
99
99
  organizationsOrganizationIdPhonebookEntriesImportPostRaw(requestParameters: OrganizationsOrganizationIdPhonebookEntriesImportPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PhonebookImportResult>>;
100
100
  /**
101
- * Upload a CSV file. The header row is required and must contain at least `phone` and `name` columns. Optional columns: `company`, `email`. Header aliases (case-insensitive): phone/phone_number/number, name/full_name/contact, company/organization, email/email_address. Existing entries with the same phone are updated; new ones are inserted.
101
+ * Upload a CSV file. The header row is required and must contain at least `phone` and either `first_name` (and optionally `last_name`) or a combined `name` column (split on the first space). Optional columns: `company`, `email`. Header aliases (case-insensitive): phone/phone_number/number, first_name/firstname/given_name, last_name/lastname/surname/family_name, name/full_name/contact, company/organization, email/email_address. Existing entries with the same phone are updated; new ones are inserted.
102
102
  * Import phonebook entries from a CSV file
103
103
  */
104
104
  organizationsOrganizationIdPhonebookEntriesImportPost(requestParameters: OrganizationsOrganizationIdPhonebookEntriesImportPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PhonebookImportResult>;
@@ -242,7 +242,7 @@ export class PhonebookApi extends runtime.BaseAPI {
242
242
  });
243
243
  }
244
244
  /**
245
- * Upload a CSV file. The header row is required and must contain at least `phone` and `name` columns. Optional columns: `company`, `email`. Header aliases (case-insensitive): phone/phone_number/number, name/full_name/contact, company/organization, email/email_address. Existing entries with the same phone are updated; new ones are inserted.
245
+ * Upload a CSV file. The header row is required and must contain at least `phone` and either `first_name` (and optionally `last_name`) or a combined `name` column (split on the first space). Optional columns: `company`, `email`. Header aliases (case-insensitive): phone/phone_number/number, first_name/firstname/given_name, last_name/lastname/surname/family_name, name/full_name/contact, company/organization, email/email_address. Existing entries with the same phone are updated; new ones are inserted.
246
246
  * Import phonebook entries from a CSV file
247
247
  */
248
248
  organizationsOrganizationIdPhonebookEntriesImportPostRaw(requestParameters, initOverrides) {
@@ -293,7 +293,7 @@ export class PhonebookApi extends runtime.BaseAPI {
293
293
  });
294
294
  }
295
295
  /**
296
- * Upload a CSV file. The header row is required and must contain at least `phone` and `name` columns. Optional columns: `company`, `email`. Header aliases (case-insensitive): phone/phone_number/number, name/full_name/contact, company/organization, email/email_address. Existing entries with the same phone are updated; new ones are inserted.
296
+ * Upload a CSV file. The header row is required and must contain at least `phone` and either `first_name` (and optionally `last_name`) or a combined `name` column (split on the first space). Optional columns: `company`, `email`. Header aliases (case-insensitive): phone/phone_number/number, first_name/firstname/given_name, last_name/lastname/surname/family_name, name/full_name/contact, company/organization, email/email_address. Existing entries with the same phone are updated; new ones are inserted.
297
297
  * Import phonebook entries from a CSV file
298
298
  */
299
299
  organizationsOrganizationIdPhonebookEntriesImportPost(requestParameters, initOverrides) {
@@ -27,6 +27,24 @@ export interface InvitationResponse {
27
27
  * @memberof InvitationResponse
28
28
  */
29
29
  error?: string;
30
+ /**
31
+ * Set on successful accept (including already-a-member).
32
+ * @type {string}
33
+ * @memberof InvitationResponse
34
+ */
35
+ organization_id?: string;
36
+ /**
37
+ * True when the signed-in user was already a member of the org; invitation is still consumed.
38
+ * @type {boolean}
39
+ * @memberof InvitationResponse
40
+ */
41
+ already_member?: boolean;
42
+ /**
43
+ * Set when the signed-in account's email does not match the invited email.
44
+ * @type {string}
45
+ * @memberof InvitationResponse
46
+ */
47
+ invited_email?: string;
30
48
  }
31
49
  /**
32
50
  * Check if a given object implements the InvitationResponse interface.
@@ -27,6 +27,9 @@ export function InvitationResponseFromJSONTyped(json, ignoreDiscriminator) {
27
27
  return {
28
28
  'message': json['message'] == null ? undefined : json['message'],
29
29
  'error': json['error'] == null ? undefined : json['error'],
30
+ 'organization_id': json['organization_id'] == null ? undefined : json['organization_id'],
31
+ 'already_member': json['already_member'] == null ? undefined : json['already_member'],
32
+ 'invited_email': json['invited_email'] == null ? undefined : json['invited_email'],
30
33
  };
31
34
  }
32
35
  export function InvitationResponseToJSON(json) {
@@ -39,5 +42,8 @@ export function InvitationResponseToJSONTyped(value, ignoreDiscriminator = false
39
42
  return {
40
43
  'message': value['message'],
41
44
  'error': value['error'],
45
+ 'organization_id': value['organization_id'],
46
+ 'already_member': value['already_member'],
47
+ 'invited_email': value['invited_email'],
42
48
  };
43
49
  }
@@ -38,7 +38,13 @@ export interface PhonebookEntry {
38
38
  * @type {string}
39
39
  * @memberof PhonebookEntry
40
40
  */
41
- name: string;
41
+ first_name: string;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof PhonebookEntry
46
+ */
47
+ last_name?: string | null;
42
48
  /**
43
49
  *
44
50
  * @type {string}
@@ -29,7 +29,7 @@ export function instanceOfPhonebookEntry(value) {
29
29
  return false;
30
30
  if (!('phone' in value) || value['phone'] === undefined)
31
31
  return false;
32
- if (!('name' in value) || value['name'] === undefined)
32
+ if (!('first_name' in value) || value['first_name'] === undefined)
33
33
  return false;
34
34
  if (!('source' in value) || value['source'] === undefined)
35
35
  return false;
@@ -50,7 +50,8 @@ export function PhonebookEntryFromJSONTyped(json, ignoreDiscriminator) {
50
50
  'id': json['id'],
51
51
  'phonebook_id': json['phonebook_id'],
52
52
  'phone': json['phone'],
53
- 'name': json['name'],
53
+ 'first_name': json['first_name'],
54
+ 'last_name': json['last_name'] == null ? undefined : json['last_name'],
54
55
  'company': json['company'] == null ? undefined : json['company'],
55
56
  'email': json['email'] == null ? undefined : json['email'],
56
57
  'source': json['source'],
@@ -69,7 +70,8 @@ export function PhonebookEntryToJSONTyped(value, ignoreDiscriminator = false) {
69
70
  'id': value['id'],
70
71
  'phonebook_id': value['phonebook_id'],
71
72
  'phone': value['phone'],
72
- 'name': value['name'],
73
+ 'first_name': value['first_name'],
74
+ 'last_name': value['last_name'],
73
75
  'company': value['company'],
74
76
  'email': value['email'],
75
77
  'source': value['source'],
@@ -26,7 +26,13 @@ export interface PhonebookEntryCreate {
26
26
  * @type {string}
27
27
  * @memberof PhonebookEntryCreate
28
28
  */
29
- name: string;
29
+ first_name: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof PhonebookEntryCreate
34
+ */
35
+ last_name?: string | null;
30
36
  /**
31
37
  *
32
38
  * @type {string}
@@ -17,7 +17,7 @@
17
17
  export function instanceOfPhonebookEntryCreate(value) {
18
18
  if (!('phone' in value) || value['phone'] === undefined)
19
19
  return false;
20
- if (!('name' in value) || value['name'] === undefined)
20
+ if (!('first_name' in value) || value['first_name'] === undefined)
21
21
  return false;
22
22
  return true;
23
23
  }
@@ -30,7 +30,8 @@ export function PhonebookEntryCreateFromJSONTyped(json, ignoreDiscriminator) {
30
30
  }
31
31
  return {
32
32
  'phone': json['phone'],
33
- 'name': json['name'],
33
+ 'first_name': json['first_name'],
34
+ 'last_name': json['last_name'] == null ? undefined : json['last_name'],
34
35
  'company': json['company'] == null ? undefined : json['company'],
35
36
  'email': json['email'] == null ? undefined : json['email'],
36
37
  };
@@ -44,7 +45,8 @@ export function PhonebookEntryCreateToJSONTyped(value, ignoreDiscriminator = fal
44
45
  }
45
46
  return {
46
47
  'phone': value['phone'],
47
- 'name': value['name'],
48
+ 'first_name': value['first_name'],
49
+ 'last_name': value['last_name'],
48
50
  'company': value['company'],
49
51
  'email': value['email'],
50
52
  };
@@ -26,7 +26,13 @@ export interface PhonebookEntryUpdate {
26
26
  * @type {string}
27
27
  * @memberof PhonebookEntryUpdate
28
28
  */
29
- name?: string;
29
+ first_name?: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof PhonebookEntryUpdate
34
+ */
35
+ last_name?: string | null;
30
36
  /**
31
37
  *
32
38
  * @type {string}
@@ -26,7 +26,8 @@ export function PhonebookEntryUpdateFromJSONTyped(json, ignoreDiscriminator) {
26
26
  }
27
27
  return {
28
28
  'phone': json['phone'] == null ? undefined : json['phone'],
29
- 'name': json['name'] == null ? undefined : json['name'],
29
+ 'first_name': json['first_name'] == null ? undefined : json['first_name'],
30
+ 'last_name': json['last_name'] == null ? undefined : json['last_name'],
30
31
  'company': json['company'] == null ? undefined : json['company'],
31
32
  'email': json['email'] == null ? undefined : json['email'],
32
33
  };
@@ -40,7 +41,8 @@ export function PhonebookEntryUpdateToJSONTyped(value, ignoreDiscriminator = fal
40
41
  }
41
42
  return {
42
43
  'phone': value['phone'],
43
- 'name': value['name'],
44
+ 'first_name': value['first_name'],
45
+ 'last_name': value['last_name'],
44
46
  'company': value['company'],
45
47
  'email': value['email'],
46
48
  };
@@ -27,6 +27,30 @@ export interface VoiceAgentMetadata {
27
27
  * @memberof VoiceAgentMetadata
28
28
  */
29
29
  rag_index?: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof VoiceAgentMetadata
34
+ */
35
+ display_instructions?: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof VoiceAgentMetadata
40
+ */
41
+ runtime_instructions?: string;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof VoiceAgentMetadata
46
+ */
47
+ display_greeting?: string;
48
+ /**
49
+ *
50
+ * @type {string}
51
+ * @memberof VoiceAgentMetadata
52
+ */
53
+ runtime_greeting?: string;
30
54
  }
31
55
  /**
32
56
  * Check if a given object implements the VoiceAgentMetadata interface.
@@ -27,6 +27,10 @@ export function VoiceAgentMetadataFromJSONTyped(json, ignoreDiscriminator) {
27
27
  return {
28
28
  'allowedFunctions': json['allowedFunctions'] == null ? undefined : json['allowedFunctions'],
29
29
  'rag_index': json['rag_index'] == null ? undefined : json['rag_index'],
30
+ 'display_instructions': json['display_instructions'] == null ? undefined : json['display_instructions'],
31
+ 'runtime_instructions': json['runtime_instructions'] == null ? undefined : json['runtime_instructions'],
32
+ 'display_greeting': json['display_greeting'] == null ? undefined : json['display_greeting'],
33
+ 'runtime_greeting': json['runtime_greeting'] == null ? undefined : json['runtime_greeting'],
30
34
  };
31
35
  }
32
36
  export function VoiceAgentMetadataToJSON(json) {
@@ -39,5 +43,9 @@ export function VoiceAgentMetadataToJSONTyped(value, ignoreDiscriminator = false
39
43
  return {
40
44
  'allowedFunctions': value['allowedFunctions'],
41
45
  'rag_index': value['rag_index'],
46
+ 'display_instructions': value['display_instructions'],
47
+ 'runtime_instructions': value['runtime_instructions'],
48
+ 'display_greeting': value['display_greeting'],
49
+ 'runtime_greeting': value['runtime_greeting'],
42
50
  };
43
51
  }
@@ -27,6 +27,24 @@ export interface InvitationResponse {
27
27
  * @memberof InvitationResponse
28
28
  */
29
29
  error?: string;
30
+ /**
31
+ * Set on successful accept (including already-a-member).
32
+ * @type {string}
33
+ * @memberof InvitationResponse
34
+ */
35
+ organization_id?: string;
36
+ /**
37
+ * True when the signed-in user was already a member of the org; invitation is still consumed.
38
+ * @type {boolean}
39
+ * @memberof InvitationResponse
40
+ */
41
+ already_member?: boolean;
42
+ /**
43
+ * Set when the signed-in account's email does not match the invited email.
44
+ * @type {string}
45
+ * @memberof InvitationResponse
46
+ */
47
+ invited_email?: string;
30
48
  }
31
49
  /**
32
50
  * Check if a given object implements the InvitationResponse interface.
@@ -34,6 +34,9 @@ function InvitationResponseFromJSONTyped(json, ignoreDiscriminator) {
34
34
  return {
35
35
  'message': json['message'] == null ? undefined : json['message'],
36
36
  'error': json['error'] == null ? undefined : json['error'],
37
+ 'organization_id': json['organization_id'] == null ? undefined : json['organization_id'],
38
+ 'already_member': json['already_member'] == null ? undefined : json['already_member'],
39
+ 'invited_email': json['invited_email'] == null ? undefined : json['invited_email'],
37
40
  };
38
41
  }
39
42
  function InvitationResponseToJSON(json) {
@@ -46,5 +49,8 @@ function InvitationResponseToJSONTyped(value, ignoreDiscriminator = false) {
46
49
  return {
47
50
  'message': value['message'],
48
51
  'error': value['error'],
52
+ 'organization_id': value['organization_id'],
53
+ 'already_member': value['already_member'],
54
+ 'invited_email': value['invited_email'],
49
55
  };
50
56
  }
@@ -38,7 +38,13 @@ export interface PhonebookEntry {
38
38
  * @type {string}
39
39
  * @memberof PhonebookEntry
40
40
  */
41
- name: string;
41
+ first_name: string;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof PhonebookEntry
46
+ */
47
+ last_name?: string | null;
42
48
  /**
43
49
  *
44
50
  * @type {string}
@@ -37,7 +37,7 @@ function instanceOfPhonebookEntry(value) {
37
37
  return false;
38
38
  if (!('phone' in value) || value['phone'] === undefined)
39
39
  return false;
40
- if (!('name' in value) || value['name'] === undefined)
40
+ if (!('first_name' in value) || value['first_name'] === undefined)
41
41
  return false;
42
42
  if (!('source' in value) || value['source'] === undefined)
43
43
  return false;
@@ -58,7 +58,8 @@ function PhonebookEntryFromJSONTyped(json, ignoreDiscriminator) {
58
58
  'id': json['id'],
59
59
  'phonebook_id': json['phonebook_id'],
60
60
  'phone': json['phone'],
61
- 'name': json['name'],
61
+ 'first_name': json['first_name'],
62
+ 'last_name': json['last_name'] == null ? undefined : json['last_name'],
62
63
  'company': json['company'] == null ? undefined : json['company'],
63
64
  'email': json['email'] == null ? undefined : json['email'],
64
65
  'source': json['source'],
@@ -77,7 +78,8 @@ function PhonebookEntryToJSONTyped(value, ignoreDiscriminator = false) {
77
78
  'id': value['id'],
78
79
  'phonebook_id': value['phonebook_id'],
79
80
  'phone': value['phone'],
80
- 'name': value['name'],
81
+ 'first_name': value['first_name'],
82
+ 'last_name': value['last_name'],
81
83
  'company': value['company'],
82
84
  'email': value['email'],
83
85
  'source': value['source'],
@@ -26,7 +26,13 @@ export interface PhonebookEntryCreate {
26
26
  * @type {string}
27
27
  * @memberof PhonebookEntryCreate
28
28
  */
29
- name: string;
29
+ first_name: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof PhonebookEntryCreate
34
+ */
35
+ last_name?: string | null;
30
36
  /**
31
37
  *
32
38
  * @type {string}
@@ -24,7 +24,7 @@ exports.PhonebookEntryCreateToJSONTyped = PhonebookEntryCreateToJSONTyped;
24
24
  function instanceOfPhonebookEntryCreate(value) {
25
25
  if (!('phone' in value) || value['phone'] === undefined)
26
26
  return false;
27
- if (!('name' in value) || value['name'] === undefined)
27
+ if (!('first_name' in value) || value['first_name'] === undefined)
28
28
  return false;
29
29
  return true;
30
30
  }
@@ -37,7 +37,8 @@ function PhonebookEntryCreateFromJSONTyped(json, ignoreDiscriminator) {
37
37
  }
38
38
  return {
39
39
  'phone': json['phone'],
40
- 'name': json['name'],
40
+ 'first_name': json['first_name'],
41
+ 'last_name': json['last_name'] == null ? undefined : json['last_name'],
41
42
  'company': json['company'] == null ? undefined : json['company'],
42
43
  'email': json['email'] == null ? undefined : json['email'],
43
44
  };
@@ -51,7 +52,8 @@ function PhonebookEntryCreateToJSONTyped(value, ignoreDiscriminator = false) {
51
52
  }
52
53
  return {
53
54
  'phone': value['phone'],
54
- 'name': value['name'],
55
+ 'first_name': value['first_name'],
56
+ 'last_name': value['last_name'],
55
57
  'company': value['company'],
56
58
  'email': value['email'],
57
59
  };
@@ -26,7 +26,13 @@ export interface PhonebookEntryUpdate {
26
26
  * @type {string}
27
27
  * @memberof PhonebookEntryUpdate
28
28
  */
29
- name?: string;
29
+ first_name?: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof PhonebookEntryUpdate
34
+ */
35
+ last_name?: string | null;
30
36
  /**
31
37
  *
32
38
  * @type {string}
@@ -33,7 +33,8 @@ function PhonebookEntryUpdateFromJSONTyped(json, ignoreDiscriminator) {
33
33
  }
34
34
  return {
35
35
  'phone': json['phone'] == null ? undefined : json['phone'],
36
- 'name': json['name'] == null ? undefined : json['name'],
36
+ 'first_name': json['first_name'] == null ? undefined : json['first_name'],
37
+ 'last_name': json['last_name'] == null ? undefined : json['last_name'],
37
38
  'company': json['company'] == null ? undefined : json['company'],
38
39
  'email': json['email'] == null ? undefined : json['email'],
39
40
  };
@@ -47,7 +48,8 @@ function PhonebookEntryUpdateToJSONTyped(value, ignoreDiscriminator = false) {
47
48
  }
48
49
  return {
49
50
  'phone': value['phone'],
50
- 'name': value['name'],
51
+ 'first_name': value['first_name'],
52
+ 'last_name': value['last_name'],
51
53
  'company': value['company'],
52
54
  'email': value['email'],
53
55
  };
@@ -27,6 +27,30 @@ export interface VoiceAgentMetadata {
27
27
  * @memberof VoiceAgentMetadata
28
28
  */
29
29
  rag_index?: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof VoiceAgentMetadata
34
+ */
35
+ display_instructions?: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof VoiceAgentMetadata
40
+ */
41
+ runtime_instructions?: string;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof VoiceAgentMetadata
46
+ */
47
+ display_greeting?: string;
48
+ /**
49
+ *
50
+ * @type {string}
51
+ * @memberof VoiceAgentMetadata
52
+ */
53
+ runtime_greeting?: string;
30
54
  }
31
55
  /**
32
56
  * Check if a given object implements the VoiceAgentMetadata interface.
@@ -34,6 +34,10 @@ function VoiceAgentMetadataFromJSONTyped(json, ignoreDiscriminator) {
34
34
  return {
35
35
  'allowedFunctions': json['allowedFunctions'] == null ? undefined : json['allowedFunctions'],
36
36
  'rag_index': json['rag_index'] == null ? undefined : json['rag_index'],
37
+ 'display_instructions': json['display_instructions'] == null ? undefined : json['display_instructions'],
38
+ 'runtime_instructions': json['runtime_instructions'] == null ? undefined : json['runtime_instructions'],
39
+ 'display_greeting': json['display_greeting'] == null ? undefined : json['display_greeting'],
40
+ 'runtime_greeting': json['runtime_greeting'] == null ? undefined : json['runtime_greeting'],
37
41
  };
38
42
  }
39
43
  function VoiceAgentMetadataToJSON(json) {
@@ -46,5 +50,9 @@ function VoiceAgentMetadataToJSONTyped(value, ignoreDiscriminator = false) {
46
50
  return {
47
51
  'allowedFunctions': value['allowedFunctions'],
48
52
  'rag_index': value['rag_index'],
53
+ 'display_instructions': value['display_instructions'],
54
+ 'runtime_instructions': value['runtime_instructions'],
55
+ 'display_greeting': value['display_greeting'],
56
+ 'runtime_greeting': value['runtime_greeting'],
49
57
  };
50
58
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@l7mp/tivadar-ai-api-sdk",
3
- "version": "0.2.7",
3
+ "version": "0.2.9",
4
4
  "description": "TypeScript/JavaScript SDK for Tivadar AI Backend API",
5
5
  "author": "L7mp Technologies",
6
6
  "repository": {
package/src/api-client.ts CHANGED
@@ -113,6 +113,7 @@ export class Api {
113
113
  accept: (invitationAccept: InvitationAccept, options?: RequestInit) => ReturnType<InvitationsApi["invitationsAcceptPost"]>;
114
114
  list: (organizationId: string, options?: RequestInit) => ReturnType<InvitationsApi["organizationsOrganizationIdInvitationsGet"]>;
115
115
  create: (organizationId: string, invitationCreate: InvitationCreate, options?: RequestInit) => ReturnType<InvitationsApi["organizationsOrganizationIdInvitationsPost"]>;
116
+ cancel: (organizationId: string, invitationId: number, options?: RequestInit) => ReturnType<InvitationsApi["organizationsOrganizationIdInvitationsInvitationIdDelete"]>;
116
117
  };
117
118
  public readonly recordings: {
118
119
  get: (organizationId: string, callId: string, options?: RequestInit) => ReturnType<RecordingsApi["organizationsOrganizationIdRecordingsCallIdGet"]>;
@@ -324,6 +325,7 @@ export class Api {
324
325
  accept: (invitationAccept, options) => this.invitationsApi.invitationsAcceptPost({ invitationAccept }, options),
325
326
  list: (organizationId, options) => this.invitationsApi.organizationsOrganizationIdInvitationsGet({ organizationId }, options),
326
327
  create: (organizationId, invitationCreate, options) => this.invitationsApi.organizationsOrganizationIdInvitationsPost({ organizationId, invitationCreate }, options),
328
+ cancel: (organizationId, invitationId, options) => this.invitationsApi.organizationsOrganizationIdInvitationsInvitationIdDelete({ organizationId, invitationId }, options),
327
329
  };
328
330
 
329
331
  this.recordings = {
@@ -36,6 +36,11 @@ export interface OrganizationsOrganizationIdInvitationsGetRequest {
36
36
  organizationId: string;
37
37
  }
38
38
 
39
+ export interface OrganizationsOrganizationIdInvitationsInvitationIdDeleteRequest {
40
+ organizationId: string;
41
+ invitationId: number;
42
+ }
43
+
39
44
  export interface OrganizationsOrganizationIdInvitationsPostRequest {
40
45
  organizationId: string;
41
46
  invitationCreate: InvitationCreate;
@@ -47,6 +52,7 @@ export interface OrganizationsOrganizationIdInvitationsPostRequest {
47
52
  export class InvitationsApi extends runtime.BaseAPI {
48
53
 
49
54
  /**
55
+ * Requires a valid JWT. The signed-in user is used as the accepting member; `user_id` is not read from the body. Responses (all return HTTP 200; check the body): - success: `{ message, organization_id }` - already a member: `{ message, organization_id, already_member: true }` (the invitation is consumed) - email mismatch: `{ error, invited_email }` - invalid/used/expired: `{ error }`
50
56
  * Accept an invitation
51
57
  */
52
58
  async invitationsAcceptPostRaw(requestParameters: InvitationsAcceptPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InvitationResponse>> {
@@ -86,6 +92,7 @@ export class InvitationsApi extends runtime.BaseAPI {
86
92
  }
87
93
 
88
94
  /**
95
+ * Requires a valid JWT. The signed-in user is used as the accepting member; `user_id` is not read from the body. Responses (all return HTTP 200; check the body): - success: `{ message, organization_id }` - already a member: `{ message, organization_id, already_member: true }` (the invitation is consumed) - email mismatch: `{ error, invited_email }` - invalid/used/expired: `{ error }`
89
96
  * Accept an invitation
90
97
  */
91
98
  async invitationsAcceptPost(requestParameters: InvitationsAcceptPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InvitationResponse> {
@@ -138,6 +145,58 @@ export class InvitationsApi extends runtime.BaseAPI {
138
145
  return await response.value();
139
146
  }
140
147
 
148
+ /**
149
+ * Cancel (delete) a pending invitation
150
+ */
151
+ async organizationsOrganizationIdInvitationsInvitationIdDeleteRaw(requestParameters: OrganizationsOrganizationIdInvitationsInvitationIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
152
+ if (requestParameters['organizationId'] == null) {
153
+ throw new runtime.RequiredError(
154
+ 'organizationId',
155
+ 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdInvitationsInvitationIdDelete().'
156
+ );
157
+ }
158
+
159
+ if (requestParameters['invitationId'] == null) {
160
+ throw new runtime.RequiredError(
161
+ 'invitationId',
162
+ 'Required parameter "invitationId" was null or undefined when calling organizationsOrganizationIdInvitationsInvitationIdDelete().'
163
+ );
164
+ }
165
+
166
+ const queryParameters: any = {};
167
+
168
+ const headerParameters: runtime.HTTPHeaders = {};
169
+
170
+ if (this.configuration && this.configuration.accessToken) {
171
+ const token = this.configuration.accessToken;
172
+ const tokenString = await token("bearerAuth", []);
173
+
174
+ if (tokenString) {
175
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
176
+ }
177
+ }
178
+
179
+ let urlPath = `/organizations/{organizationId}/invitations/{invitationId}`;
180
+ urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
181
+ urlPath = urlPath.replace(`{${"invitationId"}}`, encodeURIComponent(String(requestParameters['invitationId'])));
182
+
183
+ const response = await this.request({
184
+ path: urlPath,
185
+ method: 'DELETE',
186
+ headers: headerParameters,
187
+ query: queryParameters,
188
+ }, initOverrides);
189
+
190
+ return new runtime.VoidApiResponse(response);
191
+ }
192
+
193
+ /**
194
+ * Cancel (delete) a pending invitation
195
+ */
196
+ async organizationsOrganizationIdInvitationsInvitationIdDelete(requestParameters: OrganizationsOrganizationIdInvitationsInvitationIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
197
+ await this.organizationsOrganizationIdInvitationsInvitationIdDeleteRaw(requestParameters, initOverrides);
198
+ }
199
+
141
200
  /**
142
201
  * Create a new invitation
143
202
  */
@@ -363,7 +363,7 @@ export class PhonebookApi extends runtime.BaseAPI {
363
363
  }
364
364
 
365
365
  /**
366
- * Upload a CSV file. The header row is required and must contain at least `phone` and `name` columns. Optional columns: `company`, `email`. Header aliases (case-insensitive): phone/phone_number/number, name/full_name/contact, company/organization, email/email_address. Existing entries with the same phone are updated; new ones are inserted.
366
+ * Upload a CSV file. The header row is required and must contain at least `phone` and either `first_name` (and optionally `last_name`) or a combined `name` column (split on the first space). Optional columns: `company`, `email`. Header aliases (case-insensitive): phone/phone_number/number, first_name/firstname/given_name, last_name/lastname/surname/family_name, name/full_name/contact, company/organization, email/email_address. Existing entries with the same phone are updated; new ones are inserted.
367
367
  * Import phonebook entries from a CSV file
368
368
  */
369
369
  async organizationsOrganizationIdPhonebookEntriesImportPostRaw(requestParameters: OrganizationsOrganizationIdPhonebookEntriesImportPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PhonebookImportResult>> {
@@ -429,7 +429,7 @@ export class PhonebookApi extends runtime.BaseAPI {
429
429
  }
430
430
 
431
431
  /**
432
- * Upload a CSV file. The header row is required and must contain at least `phone` and `name` columns. Optional columns: `company`, `email`. Header aliases (case-insensitive): phone/phone_number/number, name/full_name/contact, company/organization, email/email_address. Existing entries with the same phone are updated; new ones are inserted.
432
+ * Upload a CSV file. The header row is required and must contain at least `phone` and either `first_name` (and optionally `last_name`) or a combined `name` column (split on the first space). Optional columns: `company`, `email`. Header aliases (case-insensitive): phone/phone_number/number, first_name/firstname/given_name, last_name/lastname/surname/family_name, name/full_name/contact, company/organization, email/email_address. Existing entries with the same phone are updated; new ones are inserted.
433
433
  * Import phonebook entries from a CSV file
434
434
  */
435
435
  async organizationsOrganizationIdPhonebookEntriesImportPost(requestParameters: OrganizationsOrganizationIdPhonebookEntriesImportPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PhonebookImportResult> {
@@ -31,6 +31,24 @@ export interface InvitationResponse {
31
31
  * @memberof InvitationResponse
32
32
  */
33
33
  error?: string;
34
+ /**
35
+ * Set on successful accept (including already-a-member).
36
+ * @type {string}
37
+ * @memberof InvitationResponse
38
+ */
39
+ organization_id?: string;
40
+ /**
41
+ * True when the signed-in user was already a member of the org; invitation is still consumed.
42
+ * @type {boolean}
43
+ * @memberof InvitationResponse
44
+ */
45
+ already_member?: boolean;
46
+ /**
47
+ * Set when the signed-in account's email does not match the invited email.
48
+ * @type {string}
49
+ * @memberof InvitationResponse
50
+ */
51
+ invited_email?: string;
34
52
  }
35
53
 
36
54
  /**
@@ -52,6 +70,9 @@ export function InvitationResponseFromJSONTyped(json: any, ignoreDiscriminator:
52
70
 
53
71
  'message': json['message'] == null ? undefined : json['message'],
54
72
  'error': json['error'] == null ? undefined : json['error'],
73
+ 'organization_id': json['organization_id'] == null ? undefined : json['organization_id'],
74
+ 'already_member': json['already_member'] == null ? undefined : json['already_member'],
75
+ 'invited_email': json['invited_email'] == null ? undefined : json['invited_email'],
55
76
  };
56
77
  }
57
78
 
@@ -68,6 +89,9 @@ export function InvitationResponseToJSONTyped(value?: InvitationResponse | null,
68
89
 
69
90
  'message': value['message'],
70
91
  'error': value['error'],
92
+ 'organization_id': value['organization_id'],
93
+ 'already_member': value['already_member'],
94
+ 'invited_email': value['invited_email'],
71
95
  };
72
96
  }
73
97
 
@@ -42,7 +42,13 @@ export interface PhonebookEntry {
42
42
  * @type {string}
43
43
  * @memberof PhonebookEntry
44
44
  */
45
- name: string;
45
+ first_name: string;
46
+ /**
47
+ *
48
+ * @type {string}
49
+ * @memberof PhonebookEntry
50
+ */
51
+ last_name?: string | null;
46
52
  /**
47
53
  *
48
54
  * @type {string}
@@ -94,7 +100,7 @@ export function instanceOfPhonebookEntry(value: object): value is PhonebookEntry
94
100
  if (!('id' in value) || value['id'] === undefined) return false;
95
101
  if (!('phonebook_id' in value) || value['phonebook_id'] === undefined) return false;
96
102
  if (!('phone' in value) || value['phone'] === undefined) return false;
97
- if (!('name' in value) || value['name'] === undefined) return false;
103
+ if (!('first_name' in value) || value['first_name'] === undefined) return false;
98
104
  if (!('source' in value) || value['source'] === undefined) return false;
99
105
  if (!('created_at' in value) || value['created_at'] === undefined) return false;
100
106
  if (!('updated_at' in value) || value['updated_at'] === undefined) return false;
@@ -114,7 +120,8 @@ export function PhonebookEntryFromJSONTyped(json: any, ignoreDiscriminator: bool
114
120
  'id': json['id'],
115
121
  'phonebook_id': json['phonebook_id'],
116
122
  'phone': json['phone'],
117
- 'name': json['name'],
123
+ 'first_name': json['first_name'],
124
+ 'last_name': json['last_name'] == null ? undefined : json['last_name'],
118
125
  'company': json['company'] == null ? undefined : json['company'],
119
126
  'email': json['email'] == null ? undefined : json['email'],
120
127
  'source': json['source'],
@@ -137,7 +144,8 @@ export function PhonebookEntryToJSONTyped(value?: PhonebookEntry | null, ignoreD
137
144
  'id': value['id'],
138
145
  'phonebook_id': value['phonebook_id'],
139
146
  'phone': value['phone'],
140
- 'name': value['name'],
147
+ 'first_name': value['first_name'],
148
+ 'last_name': value['last_name'],
141
149
  'company': value['company'],
142
150
  'email': value['email'],
143
151
  'source': value['source'],
@@ -30,7 +30,13 @@ export interface PhonebookEntryCreate {
30
30
  * @type {string}
31
31
  * @memberof PhonebookEntryCreate
32
32
  */
33
- name: string;
33
+ first_name: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof PhonebookEntryCreate
38
+ */
39
+ last_name?: string | null;
34
40
  /**
35
41
  *
36
42
  * @type {string}
@@ -50,7 +56,7 @@ export interface PhonebookEntryCreate {
50
56
  */
51
57
  export function instanceOfPhonebookEntryCreate(value: object): value is PhonebookEntryCreate {
52
58
  if (!('phone' in value) || value['phone'] === undefined) return false;
53
- if (!('name' in value) || value['name'] === undefined) return false;
59
+ if (!('first_name' in value) || value['first_name'] === undefined) return false;
54
60
  return true;
55
61
  }
56
62
 
@@ -65,7 +71,8 @@ export function PhonebookEntryCreateFromJSONTyped(json: any, ignoreDiscriminator
65
71
  return {
66
72
 
67
73
  'phone': json['phone'],
68
- 'name': json['name'],
74
+ 'first_name': json['first_name'],
75
+ 'last_name': json['last_name'] == null ? undefined : json['last_name'],
69
76
  'company': json['company'] == null ? undefined : json['company'],
70
77
  'email': json['email'] == null ? undefined : json['email'],
71
78
  };
@@ -83,7 +90,8 @@ export function PhonebookEntryCreateToJSONTyped(value?: PhonebookEntryCreate | n
83
90
  return {
84
91
 
85
92
  'phone': value['phone'],
86
- 'name': value['name'],
93
+ 'first_name': value['first_name'],
94
+ 'last_name': value['last_name'],
87
95
  'company': value['company'],
88
96
  'email': value['email'],
89
97
  };
@@ -30,7 +30,13 @@ export interface PhonebookEntryUpdate {
30
30
  * @type {string}
31
31
  * @memberof PhonebookEntryUpdate
32
32
  */
33
- name?: string;
33
+ first_name?: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof PhonebookEntryUpdate
38
+ */
39
+ last_name?: string | null;
34
40
  /**
35
41
  *
36
42
  * @type {string}
@@ -63,7 +69,8 @@ export function PhonebookEntryUpdateFromJSONTyped(json: any, ignoreDiscriminator
63
69
  return {
64
70
 
65
71
  'phone': json['phone'] == null ? undefined : json['phone'],
66
- 'name': json['name'] == null ? undefined : json['name'],
72
+ 'first_name': json['first_name'] == null ? undefined : json['first_name'],
73
+ 'last_name': json['last_name'] == null ? undefined : json['last_name'],
67
74
  'company': json['company'] == null ? undefined : json['company'],
68
75
  'email': json['email'] == null ? undefined : json['email'],
69
76
  };
@@ -81,7 +88,8 @@ export function PhonebookEntryUpdateToJSONTyped(value?: PhonebookEntryUpdate | n
81
88
  return {
82
89
 
83
90
  'phone': value['phone'],
84
- 'name': value['name'],
91
+ 'first_name': value['first_name'],
92
+ 'last_name': value['last_name'],
85
93
  'company': value['company'],
86
94
  'email': value['email'],
87
95
  };
@@ -31,6 +31,30 @@ export interface VoiceAgentMetadata {
31
31
  * @memberof VoiceAgentMetadata
32
32
  */
33
33
  rag_index?: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof VoiceAgentMetadata
38
+ */
39
+ display_instructions?: string;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof VoiceAgentMetadata
44
+ */
45
+ runtime_instructions?: string;
46
+ /**
47
+ *
48
+ * @type {string}
49
+ * @memberof VoiceAgentMetadata
50
+ */
51
+ display_greeting?: string;
52
+ /**
53
+ *
54
+ * @type {string}
55
+ * @memberof VoiceAgentMetadata
56
+ */
57
+ runtime_greeting?: string;
34
58
  }
35
59
 
36
60
  /**
@@ -52,6 +76,10 @@ export function VoiceAgentMetadataFromJSONTyped(json: any, ignoreDiscriminator:
52
76
 
53
77
  'allowedFunctions': json['allowedFunctions'] == null ? undefined : json['allowedFunctions'],
54
78
  'rag_index': json['rag_index'] == null ? undefined : json['rag_index'],
79
+ 'display_instructions': json['display_instructions'] == null ? undefined : json['display_instructions'],
80
+ 'runtime_instructions': json['runtime_instructions'] == null ? undefined : json['runtime_instructions'],
81
+ 'display_greeting': json['display_greeting'] == null ? undefined : json['display_greeting'],
82
+ 'runtime_greeting': json['runtime_greeting'] == null ? undefined : json['runtime_greeting'],
55
83
  };
56
84
  }
57
85
 
@@ -68,6 +96,10 @@ export function VoiceAgentMetadataToJSONTyped(value?: VoiceAgentMetadata | null,
68
96
 
69
97
  'allowedFunctions': value['allowedFunctions'],
70
98
  'rag_index': value['rag_index'],
99
+ 'display_instructions': value['display_instructions'],
100
+ 'runtime_instructions': value['runtime_instructions'],
101
+ 'display_greeting': value['display_greeting'],
102
+ 'runtime_greeting': value['runtime_greeting'],
71
103
  };
72
104
  }
73
105