@onereach/types-contacts-api 1.40.2-beta.1283.0 → 1.41.1-beta.1295.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.
- package/dist/index.ts +51 -36
- package/package.json +1 -1
package/dist/index.ts
CHANGED
|
@@ -20,6 +20,11 @@ export interface ListApiParams {
|
|
|
20
20
|
skip?: number;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
export interface ContactRequestDto {
|
|
24
|
+
id?: string;
|
|
25
|
+
data: FieldValueRequestDto[];
|
|
26
|
+
}
|
|
27
|
+
|
|
23
28
|
export interface ContactResponseDto {
|
|
24
29
|
id: string;
|
|
25
30
|
created_at: Date;
|
|
@@ -44,7 +49,7 @@ export interface CreateContactDto {
|
|
|
44
49
|
|
|
45
50
|
export interface CreateMultipleContactsDto {
|
|
46
51
|
contact_book: string;
|
|
47
|
-
|
|
52
|
+
contacts: ContactRequestDto[];
|
|
48
53
|
}
|
|
49
54
|
|
|
50
55
|
export interface DeleteContactMultiParamsDto extends DeleteContactParamsDto {
|
|
@@ -85,7 +90,7 @@ export interface ContactBookFieldSchemaDto extends CreateFieldSchemaDto {
|
|
|
85
90
|
id?: string;
|
|
86
91
|
}
|
|
87
92
|
|
|
88
|
-
export interface CreateFieldSchemaDto
|
|
93
|
+
export interface CreateFieldSchemaDto {
|
|
89
94
|
label: string;
|
|
90
95
|
singular_label?: string;
|
|
91
96
|
properties?: Record<string, string>;
|
|
@@ -107,10 +112,6 @@ export enum ColumnTypes {
|
|
|
107
112
|
|
|
108
113
|
export type ColumnValueName = 'string_values' | 'object_values' | 'number_values' | 'date_values' | 'double_values';
|
|
109
114
|
|
|
110
|
-
export interface MachineNameParamDto {
|
|
111
|
-
machine_name: string;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
115
|
export interface ContactBookListDto extends ListApiResponse {
|
|
115
116
|
items: ContactBookResponseDto[];
|
|
116
117
|
}
|
|
@@ -126,6 +127,17 @@ export interface ContactBookResponseDto extends CreateContactBookDto {
|
|
|
126
127
|
contactsCount: number;
|
|
127
128
|
status?: SharedBookStatus;
|
|
128
129
|
sharedBy?: string;
|
|
130
|
+
contactPermission: SharedBookContactPermissionResponseDto;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export interface SharedBookContactPermissionResponseDto extends CreateSharedBookContactPermissionDto {
|
|
134
|
+
id: string;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export interface CreateSharedBookContactPermissionDto {
|
|
138
|
+
edit?: boolean;
|
|
139
|
+
delete?: boolean;
|
|
140
|
+
create?: boolean;
|
|
129
141
|
}
|
|
130
142
|
|
|
131
143
|
export interface CreateContactBookDto {
|
|
@@ -146,26 +158,6 @@ export interface CrossAccountMetaDto {
|
|
|
146
158
|
original_book_id: string;
|
|
147
159
|
}
|
|
148
160
|
|
|
149
|
-
export interface ShareContactBookParamsDto {
|
|
150
|
-
targetAccountId: string;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
export interface SharedBookResponseDto {
|
|
154
|
-
id: string;
|
|
155
|
-
approved_by?: string;
|
|
156
|
-
status: SharedBookStatus;
|
|
157
|
-
target_account: string;
|
|
158
|
-
contact_book: string;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
export enum SharedBookStatus {
|
|
162
|
-
pending = 'pending',
|
|
163
|
-
shared = 'shared',
|
|
164
|
-
canceled = 'canceled',
|
|
165
|
-
deletedFromTarget = 'deletedFromTarget',
|
|
166
|
-
deletedFromSource = 'deletedFromSource'
|
|
167
|
-
}
|
|
168
|
-
|
|
169
161
|
export interface FieldSchemaListParamsDto extends ReturnType<typeof IntersectionType<OrderParams, ListApiParams>> {
|
|
170
162
|
q?: string;
|
|
171
163
|
}
|
|
@@ -178,16 +170,7 @@ export interface FieldSchemaResponseDto extends CreateFieldSchemaDto {
|
|
|
178
170
|
id: string;
|
|
179
171
|
}
|
|
180
172
|
|
|
181
|
-
export interface UpdateFieldSchemaDto extends ReturnType<typeof PartialType<ReturnType<typeof OmitType<CreateFieldSchemaDto, 'type'
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
export interface DeleteFieldValueByMachineNameDto extends ReturnType<typeof OmitType<UpsertFieldValueByMachineNameDto, 'value'>> {
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
export interface UpsertFieldValueByMachineNameDto {
|
|
188
|
-
contact: string;
|
|
189
|
-
machine_name: string;
|
|
190
|
-
value: any;
|
|
173
|
+
export interface UpdateFieldSchemaDto extends ReturnType<typeof PartialType<ReturnType<typeof OmitType<CreateFieldSchemaDto, 'type'>>>> {
|
|
191
174
|
}
|
|
192
175
|
|
|
193
176
|
export interface FieldValueRequestDto {
|
|
@@ -257,3 +240,35 @@ export interface SchemaPresetResponseDto extends CreateSchemaPresetDto {
|
|
|
257
240
|
|
|
258
241
|
export interface UpdateSchemaPresetDto extends ReturnType<typeof PartialType<CreateSchemaPresetDto>> {
|
|
259
242
|
}
|
|
243
|
+
|
|
244
|
+
export interface ShareContactBookParamsDto {
|
|
245
|
+
targetAccountId: string;
|
|
246
|
+
contactPermission?: CreateSharedBookContactPermissionDto;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
export interface SharedBookResponseDto {
|
|
250
|
+
id: string;
|
|
251
|
+
approved_by?: string;
|
|
252
|
+
status: SharedBookStatus;
|
|
253
|
+
target_account: string;
|
|
254
|
+
contact_book: string;
|
|
255
|
+
contactPermission: SharedBookContactPermissionResponseDto;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export enum SharedBookStatus {
|
|
259
|
+
pending = 'pending',
|
|
260
|
+
shared = 'shared',
|
|
261
|
+
canceled = 'canceled',
|
|
262
|
+
deletedFromTarget = 'deletedFromTarget',
|
|
263
|
+
deletedFromSource = 'deletedFromSource'
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
export interface SharedBookContactPermissionListDto extends ListApiResponse {
|
|
267
|
+
items: SharedBookContactPermissionResponseDto[];
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export interface SharedBookContactPermissionParamsDto extends ReturnType<typeof IntersectionType<OrderParams, ListApiParams>> {
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
export interface UpdateSharedBookContactPermissionDto extends CreateSharedBookContactPermissionDto {
|
|
274
|
+
}
|
package/package.json
CHANGED