hunk.code_window:     return await this.httpClient.getFullResponse(
         `/widgets/notifications/feed`,
         {
           page,
           ...query,
         }
       );
     }
     async initializeSession(
  
hunk.labels: keep keep keep keep replace keep keep keep keep keep
hunk.after_edit:         payload: payloadString,
           ...rest,
  
hunk.file_path: packages/client/src/api/api.service.ts
hunk.type: replace
file: import { ITemplate, ITriggerPayload } from './template.interface';
  
  export class TemplateStore {
    private readonly templates: ITemplate[] = [];
  
    async addTemplate(template: ITemplate) {
      this.templates.push(template);
    }
  
    async getTemplateById(templateId: string) {
      return this.templates.find((template) => template.id === templateId);
    }
  
    async getTemplates() {
      return this.templates;
    }
  
    async getActiveMessages(template: ITemplate, data: ITriggerPayload) {
      const messages = [];
  
      for (const message of template.messages) {
        if (
          (typeof message.active === 'boolean' && message.active) ||
          typeof message.active === 'undefined' ||
          (typeof message.active === 'function' && (await message.active(data)))
        ) {
          messages.push(message);
        }
      }
  
      return messages;
    }
  }
  