hunk.code_window:   }
     async registerTemplates(): Promise<any> {
       const templatePromises = [];
       for (let i = 0; i < this.templates.length; i += 1) {
         const waiting = await this.notifire.registerTemplate(this.templates[i]);
         templatePromises.push(waiting);
       }
  
hunk.labels: keep keep replace replace replace replace replace replace keep
hunk.after_edit:   async registerTemplates(): Promise<void> {
       for (const template of this.templates) {
         await this.notifire.registerTemplate(template);
  
hunk.file_path: packages/nest/src/services/notifire.service.ts
hunk.type: replace
file: import uniqid from 'uniqid';
  import { clone } from './clone';
  /* eslint react/prop-types: 0 */
  /* eslint no-param-reassign: 0 */
  
  export const assignIds = (data: any): any => {
    data = { children: clone(data) };
  
    const run = (d: any): any => {
      if (typeof d.children !== 'undefined') {
        d.children = d.children.map((item: any) => {
          item.id = uniqid();
          return run(item);
        });
      }
  
      return d;
    };
  
    return run(data).children;
  };
  