@l7mp/tivadar-ai-api-sdk 0.2.8 → 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.
@@ -30,10 +30,12 @@ export interface OrganizationsOrganizationIdInvitationsPostRequest {
30
30
  */
31
31
  export declare 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: InvitationsAcceptPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InvitationResponse>>;
36
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 }`
37
39
  * Accept an invitation
38
40
  */
39
41
  invitationsAcceptPost(requestParameters: InvitationsAcceptPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InvitationResponse>;
@@ -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) {
@@ -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) {
@@ -30,10 +30,12 @@ export interface OrganizationsOrganizationIdInvitationsPostRequest {
30
30
  */
31
31
  export declare 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: InvitationsAcceptPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InvitationResponse>>;
36
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 }`
37
39
  * Accept an invitation
38
40
  */
39
41
  invitationsAcceptPost(requestParameters: InvitationsAcceptPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InvitationResponse>;
@@ -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) {
@@ -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,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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@l7mp/tivadar-ai-api-sdk",
3
- "version": "0.2.8",
3
+ "version": "0.2.9",
4
4
  "description": "TypeScript/JavaScript SDK for Tivadar AI Backend API",
5
5
  "author": "L7mp Technologies",
6
6
  "repository": {
@@ -52,6 +52,7 @@ export interface OrganizationsOrganizationIdInvitationsPostRequest {
52
52
  export class InvitationsApi extends runtime.BaseAPI {
53
53
 
54
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 }`
55
56
  * Accept an invitation
56
57
  */
57
58
  async invitationsAcceptPostRaw(requestParameters: InvitationsAcceptPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InvitationResponse>> {
@@ -91,6 +92,7 @@ export class InvitationsApi extends runtime.BaseAPI {
91
92
  }
92
93
 
93
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 }`
94
96
  * Accept an invitation
95
97
  */
96
98
  async invitationsAcceptPost(requestParameters: InvitationsAcceptPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InvitationResponse> {
@@ -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
  };