@webitel/api-services 26.8.25 → 26.8.26
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/package.json
CHANGED
|
@@ -157,7 +157,7 @@ const getList = async (params: ApiParams) => {
|
|
|
157
157
|
}
|
|
158
158
|
};
|
|
159
159
|
|
|
160
|
-
const contactFieldsToSend = [
|
|
160
|
+
export const contactFieldsToSend = [
|
|
161
161
|
'name',
|
|
162
162
|
'about',
|
|
163
163
|
'labels',
|
|
@@ -172,12 +172,14 @@ const contactFieldsToSend = [
|
|
|
172
172
|
'imclients',
|
|
173
173
|
'user',
|
|
174
174
|
'custom',
|
|
175
|
-
];
|
|
175
|
+
] as const;
|
|
176
176
|
|
|
177
177
|
const get = async ({ itemId: id }: GetItemParams) => {
|
|
178
178
|
try {
|
|
179
179
|
const response = await getContacts().locateContact(String(id), {
|
|
180
|
-
fields:
|
|
180
|
+
fields: [
|
|
181
|
+
...contactFieldsToSend,
|
|
182
|
+
],
|
|
181
183
|
});
|
|
182
184
|
return applyTransform(response.data, [
|
|
183
185
|
snakeToCamel([
|
|
@@ -322,7 +324,9 @@ const update = async ({ itemInstance }: AddItemParams) => {
|
|
|
322
324
|
]);
|
|
323
325
|
try {
|
|
324
326
|
const response = await getContacts().updateContact(etag, item, {
|
|
325
|
-
fields:
|
|
327
|
+
fields: [
|
|
328
|
+
...contactFieldsToSend,
|
|
329
|
+
],
|
|
326
330
|
});
|
|
327
331
|
return applyTransform(response.data, [
|
|
328
332
|
snakeToCamel([
|