@onereach/types-contacts-api 1.37.6 → 1.37.7-beta.863.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 +45 -9
  2. package/package.json +2 -3
package/dist/index.ts CHANGED
@@ -42,6 +42,16 @@ 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
+
45
55
  export interface MergeContactParamsDto {
46
56
  contact_book: string;
47
57
  mergeContactId: string;
@@ -87,8 +97,8 @@ export interface ContactBookResponseDto extends CreateContactBookDto {
87
97
  id: string;
88
98
  created_at: Date;
89
99
  updated_at: Date;
90
- contacts?: ContactResponseDto[];
91
- crossAccountMeta: CrossAccountMetaDto | null;
100
+ contactsCount: number;
101
+ status?: SharedBookStatus;
92
102
  }
93
103
 
94
104
  export interface CreateContactBookDto {
@@ -97,13 +107,15 @@ export interface CreateContactBookDto {
97
107
  schemaPresets?: SchemaPresetResponseDto[];
98
108
  }
99
109
 
110
+ export interface UpdateContactBookDto extends ReturnType<typeof PartialType<CreateContactBookDto>> {
111
+ }
112
+
100
113
  export interface CrossAccountMetaDto {
101
114
  id: string;
102
115
  created_at: Date;
103
- is_approved: boolean;
116
+ updated_at: Date;
104
117
  account_name: string;
105
118
  account_id: string;
106
- approved_by: string;
107
119
  original_book_id: string;
108
120
  }
109
121
 
@@ -111,7 +123,24 @@ export interface ShareContactBookParamsDto {
111
123
  targetAccountId: string;
112
124
  }
113
125
 
114
- export interface UpdateContactBookDto extends ReturnType<typeof PartialType<CreateContactBookDto>> {
126
+ export interface SharedBookMetaParamsDto {
127
+ accountId: string;
128
+ bookIds: string;
129
+ }
130
+
131
+ export interface SharedBookResponseDto {
132
+ approved_by?: string;
133
+ status: SharedBookStatus;
134
+ target_account: string;
135
+ contact_book: string;
136
+ }
137
+
138
+ export enum SharedBookStatus {
139
+ pending = 'pending',
140
+ shared = 'shared',
141
+ canceled = 'canceled',
142
+ deletedFromTarget = 'deletedFromTarget',
143
+ deletedFromSource = 'deletedFromSource'
115
144
  }
116
145
 
117
146
  export interface FieldSchemaListDto extends ListApiResponse {
@@ -137,17 +166,24 @@ export interface FieldValueResponseDto {
137
166
  schemaId: string;
138
167
  }
139
168
 
169
+ export interface ContactFilterConditionDto extends AbstractFilterCondition {
170
+ contactField: 'created_at' | 'updated_at';
171
+ }
172
+
173
+ export interface AbstractFilterCondition {
174
+ operator: string;
175
+ value: any;
176
+ }
177
+
140
178
  export interface CreateFilterDto {
141
179
  name: string;
142
180
  contact_book: string;
143
181
  match_all: boolean;
144
- conditions: FilterConditionDto[];
182
+ conditions: FieldValueFilterConditionDto[] | ContactFilterConditionDto[];
145
183
  }
146
184
 
147
- export interface FilterConditionDto {
185
+ export interface FieldValueFilterConditionDto extends AbstractFilterCondition {
148
186
  schema: string;
149
- operator: string;
150
- value: any;
151
187
  propertyPath?: string[];
152
188
  }
153
189
 
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.6",
4
+ "version": "1.37.7-beta.863.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": "b604e514255677dcb2a648600273de0f620738ce"
20
+ }
22
21
  }