@onereach/types-contacts-api 1.37.7 → 1.37.8-beta.1029.0

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 (2) hide show
  1. package/dist/index.ts +62 -9
  2. package/package.json +2 -3
package/dist/index.ts CHANGED
@@ -42,11 +42,37 @@ export interface CreateContactDto {
42
42
  data: FieldValueRequestDto[];
43
43
  }
44
44
 
45
+ export interface DeleteContactMultiParamsDto extends DeleteContactParamsDto {
46
+ ids?: string[];
47
+ contact_book: string;
48
+ all?: true;
49
+ }
50
+
51
+ export interface DeleteContactParamsDto {
52
+ contact_book: string;
53
+ }
54
+
55
+ export interface LinkContactMultiParamsDto extends LinkContactParamsDto {
56
+ ids: string[];
57
+ }
58
+
59
+ export interface LinkContactParamsDto {
60
+ contact_book: string;
61
+ }
62
+
45
63
  export interface MergeContactParamsDto {
46
64
  contact_book: string;
47
65
  mergeContactId: string;
48
66
  }
49
67
 
68
+ export interface UnlinkContactMultiParamsDto extends UnlinkContactParamsDto {
69
+ ids: string[];
70
+ }
71
+
72
+ export interface UnlinkContactParamsDto {
73
+ contact_book: string;
74
+ }
75
+
50
76
  export interface UpdateContactDto extends CreateContactDto {
51
77
  }
52
78
 
@@ -87,8 +113,9 @@ export interface ContactBookResponseDto extends CreateContactBookDto {
87
113
  id: string;
88
114
  created_at: Date;
89
115
  updated_at: Date;
90
- contacts?: ContactResponseDto[];
91
- crossAccountMeta: CrossAccountMetaDto | null;
116
+ contactsCount: number;
117
+ status?: SharedBookStatus;
118
+ sharedBy?: string;
92
119
  }
93
120
 
94
121
  export interface CreateContactBookDto {
@@ -97,13 +124,15 @@ export interface CreateContactBookDto {
97
124
  schemaPresets?: SchemaPresetResponseDto[];
98
125
  }
99
126
 
127
+ export interface UpdateContactBookDto extends ReturnType<typeof PartialType<CreateContactBookDto>> {
128
+ }
129
+
100
130
  export interface CrossAccountMetaDto {
101
131
  id: string;
102
132
  created_at: Date;
103
- is_approved: boolean;
133
+ updated_at: Date;
104
134
  account_name: string;
105
135
  account_id: string;
106
- approved_by: string;
107
136
  original_book_id: string;
108
137
  }
109
138
 
@@ -111,7 +140,24 @@ export interface ShareContactBookParamsDto {
111
140
  targetAccountId: string;
112
141
  }
113
142
 
114
- export interface UpdateContactBookDto extends ReturnType<typeof PartialType<CreateContactBookDto>> {
143
+ export interface SharedBookResponseDto {
144
+ id: string;
145
+ approved_by?: string;
146
+ status: SharedBookStatus;
147
+ target_account: string;
148
+ contact_book: string;
149
+ }
150
+
151
+ export enum SharedBookStatus {
152
+ pending = 'pending',
153
+ shared = 'shared',
154
+ canceled = 'canceled',
155
+ deletedFromTarget = 'deletedFromTarget',
156
+ deletedFromSource = 'deletedFromSource'
157
+ }
158
+
159
+ export interface FieldSchemaListParamsDto extends ReturnType<typeof IntersectionType<OrderParams, ListApiParams>> {
160
+ q?: string;
115
161
  }
116
162
 
117
163
  export interface FieldSchemaListDto extends ListApiResponse {
@@ -137,17 +183,24 @@ export interface FieldValueResponseDto {
137
183
  schemaId: string;
138
184
  }
139
185
 
186
+ export interface ContactFilterConditionDto extends AbstractFilterCondition {
187
+ contactField: 'created_at' | 'updated_at';
188
+ }
189
+
190
+ export interface AbstractFilterCondition {
191
+ operator: string;
192
+ value: any;
193
+ }
194
+
140
195
  export interface CreateFilterDto {
141
196
  name: string;
142
197
  contact_book: string;
143
198
  match_all: boolean;
144
- conditions: FilterConditionDto[];
199
+ conditions: FieldValueFilterConditionDto[] | ContactFilterConditionDto[];
145
200
  }
146
201
 
147
- export interface FilterConditionDto {
202
+ export interface FieldValueFilterConditionDto extends AbstractFilterCondition {
148
203
  schema: string;
149
- operator: string;
150
- value: any;
151
204
  propertyPath?: string[];
152
205
  }
153
206
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@onereach/types-contacts-api",
3
3
  "description": "Generated types for Contacts Api",
4
- "version": "1.37.7",
4
+ "version": "1.37.8-beta.1029.0",
5
5
  "author": "OneReach.ai",
6
6
  "main": "./dist/index.ts",
7
7
  "publishConfig": {
@@ -17,6 +17,5 @@
17
17
  "@types/node": "^16.0.0",
18
18
  "ts-morph": "^15.1.0",
19
19
  "ts-node": "^10.0.0"
20
- },
21
- "gitHead": "244800cd8a5585931ad14f8b72b3c86f0219ece8"
20
+ }
22
21
  }