{"ScriptPreparationCode":"function getNewObj(note) {\r\n return {\r\n id: note.id,\r\n entity_id: note.entity_id,\r\n created_by: note.created_by,\r\n updated_by: note.updated_by,\r\n created_at: note.created_at,\r\n updated_at: note.updated_at,\r\n responsible_user_id: note.responsible_user_id,\r\n group_id: note.group_id,\r\n note_type: note.note_type,\r\n params_uniq: note.params.uniq,\r\n params_duration: note.params.duration,\r\n params_source: note.params.source,\r\n params_link: note.params.link,\r\n params_phone: note.params.phone,\r\n params_call_result: note.params.call_result,\r\n params_call_status: note.params.call_status,\r\n account_id: note.account_id,\r\n }\r\n}\r\n\r\nfunction destructObj({\r\n _links,\r\n params,\r\n ...props\r\n}) {\r\n return {\r\n ...props,\r\n params_uniq: params.uniq,\r\n params_duration: params.duration,\r\n params_source: params.source,\r\n params_link: params.link,\r\n params_phone: params.phone,\r\n params_call_result: params.call_result,\r\n params_call_status: params.call_status,\r\n }\r\n}\r\n\r\nconst sample = {\r\n id: 334078557,\r\n entity_id: 41208705,\r\n created_by: 9016986,\r\n updated_by: 9016986,\r\n created_at: 1684479922,\r\n updated_at: 1684479921,\r\n responsible_user_id: 9016986,\r\n group_id: 176992,\r\n note_type: \u0027call_out\u0027,\r\n params: {\r\n uniq: \u00271684479899.477515\u0027,\r\n duration: 0,\r\n source: \u0027sipuni\u0027,\r\n link: null,\r\n phone: \u0027\u0410\u043B\u0435\u043A\u0441\u0435\u0439\u0027,\r\n call_result: \u0027\u041D\u0435 \u0434\u043E\u0437\u0432\u043E\u043D\u0438\u043B\u0438\u0441\u044C\u0027,\r\n call_status: 6,\r\n },\r\n account_id: 14085820,\r\n _links: {\r\n self: {\r\n href: \u0027https://amocrm.ru\u0027,\r\n },\r\n },\r\n}","TestCases":[{"Name":"fields","Code":"const sample = {\r\n id: 334078557,\r\n entity_id: 41208705,\r\n created_by: 9016986,\r\n updated_by: 9016986,\r\n created_at: 1684479922,\r\n updated_at: 1684479921,\r\n responsible_user_id: 9016986,\r\n group_id: 176992,\r\n note_type: \u0027call_out\u0027,\r\n params: {\r\n uniq: \u00271684479899.477515\u0027,\r\n duration: 0,\r\n source: \u0027sipuni\u0027,\r\n link: null,\r\n phone: \u0027\u0410\u043B\u0435\u043A\u0441\u0435\u0439\u0027,\r\n call_result: \u0027\u041D\u0435 \u0434\u043E\u0437\u0432\u043E\u043D\u0438\u043B\u0438\u0441\u044C\u0027,\r\n call_status: 6,\r\n },\r\n account_id: 14085820,\r\n _links: {\r\n self: {\r\n href: \u0027https://amocrm.ru\u0027,\r\n },\r\n },\r\n}\r\nconst newObj = getNewObj(sample)","IsDeferred":false},{"Name":"destruct","Code":"const sample = {\r\n id: 334078557,\r\n entity_id: 41208705,\r\n created_by: 9016986,\r\n updated_by: 9016986,\r\n created_at: 1684479922,\r\n updated_at: 1684479921,\r\n responsible_user_id: 9016986,\r\n group_id: 176992,\r\n note_type: \u0027call_out\u0027,\r\n params: {\r\n uniq: \u00271684479899.477515\u0027,\r\n duration: 0,\r\n source: \u0027sipuni\u0027,\r\n link: null,\r\n phone: \u0027\u0410\u043B\u0435\u043A\u0441\u0435\u0439\u0027,\r\n call_result: \u0027\u041D\u0435 \u0434\u043E\u0437\u0432\u043E\u043D\u0438\u043B\u0438\u0441\u044C\u0027,\r\n call_status: 6,\r\n },\r\n account_id: 14085820,\r\n _links: {\r\n self: {\r\n href: \u0027https://amocrm.ru\u0027,\r\n },\r\n },\r\n}\r\nconst newObj = destructObj(sample)","IsDeferred":false}]}