@hed-hog/contact 0.0.270 → 0.0.275

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.
@@ -1,115 +1,157 @@
1
- 'use client';
2
-
3
- export type PaginatedResult<T> = {
4
- data: T[];
5
- total: number;
6
- page: number;
7
- pageSize: number;
8
- };
9
-
10
- export type AddressTypeValue =
11
- | 'residential'
12
- | 'commercial'
13
- | 'correspondence'
14
- | 'alternative'
15
- | 'work'
16
- | 'billing'
17
- | 'shipping';
18
-
19
- export const ADDRESS_TYPE_OPTIONS: Array<{
20
- value: AddressTypeValue;
21
- labelKey: string;
22
- }> = [
23
- { value: 'residential', labelKey: 'addressTypeResidential' },
24
- { value: 'commercial', labelKey: 'addressTypeCommercial' },
25
- { value: 'correspondence', labelKey: 'addressTypeCorrespondence' },
26
- { value: 'alternative', labelKey: 'addressTypeAlternative' },
27
- { value: 'work', labelKey: 'addressTypeWork' },
28
- { value: 'billing', labelKey: 'addressTypeBilling' },
29
- { value: 'shipping', labelKey: 'addressTypeShipping' },
30
- ];
31
-
32
- export type PersonContact = {
33
- id?: number;
34
- value: string;
35
- is_primary: boolean;
36
- contact_type_id: number;
37
- contact_type?: {
38
- id: number;
39
- code: string;
40
- };
41
- };
42
-
43
- export type PersonAddress = {
44
- id?: number;
45
- line1: string;
46
- line2?: string;
47
- city: string;
48
- state: string;
49
- is_primary: boolean;
50
- address_type: AddressTypeValue;
51
- postal_code?: string;
52
- country_code?: string;
53
- };
54
-
55
- export type PersonDocument = {
56
- id?: number;
57
- value: string;
58
- document_type_id: number;
59
- document_type?: {
60
- id: number;
61
- code: string;
62
- };
63
- };
64
-
65
- export type PersonGender = 'male' | 'female' | 'other';
66
-
67
- export type PersonRelationSummary = {
68
- id: number;
69
- name: string;
70
- type?: 'individual' | 'company';
71
- status: 'active' | 'inactive';
72
- avatar_id?: number | null;
73
- trade_name?: string | null;
74
- };
75
-
76
- export type Person = {
77
- id: number;
78
- name: string;
79
- type: 'individual' | 'company';
80
- status: 'active' | 'inactive';
81
- avatar_id?: number | null;
82
- birth_date?: string | null;
83
- gender?: PersonGender | null;
84
- job_title?: string | null;
85
- trade_name?: string | null;
86
- foundation_date?: string | null;
87
- legal_nature?: string | null;
88
- notes?: string | null;
89
- employer_company_id?: number | null;
90
- employer_company?: PersonRelationSummary | null;
91
- created_at: string;
92
- contact?: PersonContact[];
93
- address?: PersonAddress[];
94
- document?: PersonDocument[];
95
- };
96
-
97
- export type ContactTypeOption = {
98
- id: number;
99
- code: string;
100
- contact_type_id: number;
101
- name: string;
102
- };
103
-
104
- export type DocumentTypeOption = {
105
- id: number;
106
- document_type_id: number;
107
- code: string;
108
- name: string;
109
- };
110
-
111
- export type CompanyOption = {
112
- id: number;
113
- name: string;
114
- trade_name?: string | null;
115
- };
1
+ 'use client';
2
+
3
+ export type PaginatedResult<T> = {
4
+ data: T[];
5
+ total: number;
6
+ page: number;
7
+ pageSize: number;
8
+ };
9
+
10
+ export type AddressTypeValue =
11
+ | 'residential'
12
+ | 'commercial'
13
+ | 'correspondence'
14
+ | 'alternative'
15
+ | 'work'
16
+ | 'billing'
17
+ | 'shipping';
18
+
19
+ export const ADDRESS_TYPE_OPTIONS: Array<{
20
+ value: AddressTypeValue;
21
+ labelKey: string;
22
+ }> = [
23
+ { value: 'residential', labelKey: 'addressTypeResidential' },
24
+ { value: 'commercial', labelKey: 'addressTypeCommercial' },
25
+ { value: 'correspondence', labelKey: 'addressTypeCorrespondence' },
26
+ { value: 'alternative', labelKey: 'addressTypeAlternative' },
27
+ { value: 'work', labelKey: 'addressTypeWork' },
28
+ { value: 'billing', labelKey: 'addressTypeBilling' },
29
+ { value: 'shipping', labelKey: 'addressTypeShipping' },
30
+ ];
31
+
32
+ export type PersonContact = {
33
+ id?: number;
34
+ value: string;
35
+ is_primary: boolean;
36
+ contact_type_id: number;
37
+ contact_type?: {
38
+ id: number;
39
+ code: string;
40
+ };
41
+ };
42
+
43
+ export type PersonAddress = {
44
+ id?: number;
45
+ line1: string;
46
+ line2?: string;
47
+ city: string;
48
+ state: string;
49
+ is_primary: boolean;
50
+ address_type: AddressTypeValue;
51
+ postal_code?: string;
52
+ country_code?: string;
53
+ };
54
+
55
+ export type PersonDocument = {
56
+ id?: number;
57
+ value: string;
58
+ document_type_id: number;
59
+ document_type?: {
60
+ id: number;
61
+ code: string;
62
+ };
63
+ };
64
+
65
+ export type PersonGender = 'male' | 'female' | 'other';
66
+
67
+ export type PersonSource =
68
+ | 'referral'
69
+ | 'website'
70
+ | 'social'
71
+ | 'inbound'
72
+ | 'outbound'
73
+ | 'other';
74
+
75
+ export type PersonLifecycleStage =
76
+ | 'new'
77
+ | 'contacted'
78
+ | 'qualified'
79
+ | 'proposal'
80
+ | 'negotiation'
81
+ | 'customer'
82
+ | 'lost';
83
+
84
+ export type PersonInteractionType =
85
+ | 'call'
86
+ | 'email'
87
+ | 'whatsapp'
88
+ | 'meeting'
89
+ | 'note';
90
+
91
+ export type UserOption = {
92
+ id: number;
93
+ name: string;
94
+ };
95
+
96
+ export type PersonStats = {
97
+ total: number;
98
+ individual: number;
99
+ company: number;
100
+ active: number;
101
+ inactive: number;
102
+ };
103
+
104
+ export type PersonRelationSummary = {
105
+ id: number;
106
+ name: string;
107
+ type?: 'individual' | 'company';
108
+ status: 'active' | 'inactive';
109
+ avatar_id?: number | null;
110
+ trade_name?: string | null;
111
+ };
112
+
113
+ export type Person = {
114
+ id: number;
115
+ name: string;
116
+ type: 'individual' | 'company';
117
+ status: 'active' | 'inactive';
118
+ avatar_id?: number | null;
119
+ birth_date?: string | null;
120
+ gender?: PersonGender | null;
121
+ job_title?: string | null;
122
+ trade_name?: string | null;
123
+ foundation_date?: string | null;
124
+ legal_nature?: string | null;
125
+ notes?: string | null;
126
+ owner_user_id?: number | null;
127
+ owner_user?: UserOption | null;
128
+ source?: PersonSource | null;
129
+ lifecycle_stage?: PersonLifecycleStage | null;
130
+ next_action_at?: string | null;
131
+ employer_company_id?: number | null;
132
+ employer_company?: PersonRelationSummary | null;
133
+ created_at: string;
134
+ contact?: PersonContact[];
135
+ address?: PersonAddress[];
136
+ document?: PersonDocument[];
137
+ };
138
+
139
+ export type ContactTypeOption = {
140
+ id: number;
141
+ code: string;
142
+ contact_type_id: number;
143
+ name: string;
144
+ };
145
+
146
+ export type DocumentTypeOption = {
147
+ id: number;
148
+ document_type_id: number;
149
+ code: string;
150
+ name: string;
151
+ };
152
+
153
+ export type CompanyOption = {
154
+ id: number;
155
+ name: string;
156
+ trade_name?: string | null;
157
+ };