diff --git a/__tests__/utils/whats-app-helper.spec.ts b/__tests__/utils/whats-app-helper.spec.ts index 390f935..53a909c 100644 --- a/__tests__/utils/whats-app-helper.spec.ts +++ b/__tests__/utils/whats-app-helper.spec.ts @@ -17,7 +17,6 @@ describe("WhatsAppHelper", () => { status: TemplateStatus.APPROVED, category: "category" }; - const namespaceSample = "namespace"; const componentParametersSample: ITemplateComponentParameters[] = [ { "type": TemplateComponentTypes.body, @@ -26,12 +25,11 @@ describe("WhatsAppHelper", () => { ]; it("should return a valid IContentTemplate", () => { - const content = convertToContent(namespaceSample, templateSample, componentParametersSample); + const content = convertToContent(templateSample, componentParametersSample); expect(content).toStrictEqual({ "type": "template", template: { - "namespace": namespaceSample, name: templateSample.name, language: { policy: "deterministic", diff --git a/package.json b/package.json index 69096a3..61b5ba7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@zendesk/zaf-toolbox", - "version": "0.1.2", + "version": "0.2.0", "description": "A toolbox for ZAF application built with 🩷 by Zendesk Labs", "main": "lib/src/index.js", "types": "lib/src/index.d.ts", diff --git a/src/models/sunshine-conversation.ts b/src/models/sunshine-conversation.ts index c6b827a..66be320 100644 --- a/src/models/sunshine-conversation.ts +++ b/src/models/sunshine-conversation.ts @@ -344,10 +344,6 @@ export interface IContentText extends Text { export interface IContentTemplate { "type": "template"; template: { - /** - * WhatsApp namespace to use - */ - "namespace"?: string; /** * Name of the template */ diff --git a/src/utils/whats-app-helper.ts b/src/utils/whats-app-helper.ts index c15033a..a96b805 100644 --- a/src/utils/whats-app-helper.ts +++ b/src/utils/whats-app-helper.ts @@ -4,14 +4,12 @@ import { IContentTemplate, ITemplate, ITemplateComponentParameters } from "@mode * Convert a WhatsApp template into a valid IContent for Sunshine Conversation Api Service */ export function convertToContent( - namespace: string, template: ITemplate, componentParameters: ITemplateComponentParameters[] ): IContentTemplate { return { "type": "template", template: { - namespace, name: template.name, language: { policy: "deterministic",