diff --git a/packages/conversation/src/rest/v1/conversation-domain-api.ts b/packages/conversation/src/rest/v1/conversation-domain-api.ts index 400f75fe..cd5d3fd7 100644 --- a/packages/conversation/src/rest/v1/conversation-domain-api.ts +++ b/packages/conversation/src/rest/v1/conversation-domain-api.ts @@ -104,7 +104,7 @@ export class ConversationDomainApi implements Api { switch (this.apiName) { case 'TemplatesV1Api': case 'TemplatesV2Api': - return this.sinchClientParameters.templatesHostname ?? `https://${region}.template.api.sinch.com`; + return this.sinchClientParameters.conversationTemplatesHostname ?? `https://${region}.template.api.sinch.com`; default: return this.sinchClientParameters.conversationHostname ?? `https://${region}.conversation.api.sinch.com`; } diff --git a/packages/conversation/tests/rest/v1/conversation-domain-api.test.ts b/packages/conversation/tests/rest/v1/conversation-domain-api.test.ts index 318f8d2d..22f9cbde 100644 --- a/packages/conversation/tests/rest/v1/conversation-domain-api.test.ts +++ b/packages/conversation/tests/rest/v1/conversation-domain-api.test.ts @@ -5,7 +5,7 @@ import { ApiHostname, Region, UnifiedCredentials } from '@sinch/sdk-client'; describe('Conversation API', () => { let conversationApi: ConversationDomainApi; let templateApi: TemplatesV2Api; - let params: UnifiedCredentials & Pick; + let params: UnifiedCredentials & Pick; const CUSTOM_HOSTNAME = 'https://new.host.name'; const CUSTOM_HOSTNAME_TEMPLATES = 'https://templates.new.host.name'; @@ -54,7 +54,7 @@ describe('Conversation API', () => { }); it('should use the hostname parameter for templates only', () => { - params.templatesHostname = CUSTOM_HOSTNAME_TEMPLATES; + params.conversationTemplatesHostname = CUSTOM_HOSTNAME_TEMPLATES; conversationApi = new ConversationDomainApi(params, 'dummy'); conversationApi.getSinchClient(); templateApi = new TemplatesV2Api(params); @@ -65,7 +65,7 @@ describe('Conversation API', () => { it('should use the hostname parameter for the 2 different domains', () => { params.conversationHostname = CUSTOM_HOSTNAME; - params.templatesHostname = CUSTOM_HOSTNAME_TEMPLATES; + params.conversationTemplatesHostname = CUSTOM_HOSTNAME_TEMPLATES; conversationApi = new ConversationDomainApi(params, 'dummy'); conversationApi.getSinchClient(); templateApi = new TemplatesV2Api(params); diff --git a/packages/sdk-client/src/domain/domain-interface.ts b/packages/sdk-client/src/domain/domain-interface.ts index 232d3ecc..d630c7ac 100644 --- a/packages/sdk-client/src/domain/domain-interface.ts +++ b/packages/sdk-client/src/domain/domain-interface.ts @@ -38,7 +38,7 @@ export interface ApplicationCredentials { export interface ApiHostname { authHostname?: string; conversationHostname?: string; - templatesHostname?: string; + conversationTemplatesHostname?: string; faxHostname?: string; numbersHostname?: string; smsHostname?: string;