diff --git a/src/framework.module.ts b/src/framework.module.ts index e523736..ca70df0 100644 --- a/src/framework.module.ts +++ b/src/framework.module.ts @@ -25,6 +25,7 @@ import { LocationInfoService } from "./services/utils/location.service"; import { ShareUtil } from "./services/utils/share.service"; import { BuildParamService } from "./services/utils/buildparam.service"; import { FormService } from "./services/form/form.service"; +import { DialCodeService } from "./services/dialcode/dialcode.service"; @NgModule({ declarations: [ @@ -54,6 +55,7 @@ import { FormService } from "./services/form/form.service"; LocationInfoService, BuildParamService, FormService, + DialCodeService, QRScanner, ShareUtil ], diff --git a/src/index.ts b/src/index.ts index 463cec7..e3ab563 100644 --- a/src/index.ts +++ b/src/index.ts @@ -51,5 +51,7 @@ export * from "./services/utils/share.service"; export * from "./services/utils/buildparam.service"; export * from "./services/form/bean"; export * from "./services/form/form.service"; +export * from "./services/dialcode/bean"; +export * from "./services/dialcode/dialcode.service"; export * from "./framework.module"; \ No newline at end of file diff --git a/src/services/content/content.service.ts b/src/services/content/content.service.ts index 907ea89..06ee364 100644 --- a/src/services/content/content.service.ts +++ b/src/services/content/content.service.ts @@ -34,16 +34,18 @@ export class ContentService { searchContent(request: ContentSearchCriteria, isFilterApplied: boolean, + isDialCodeSearch: boolean , + isGuestUser: boolean, successCallback: (response: string) => void, errorCallback: (error: string) => void) { try { - this.factory.getContentService().searchContent(JSON.stringify(request), isFilterApplied, successCallback, errorCallback); + this.factory.getContentService().searchContent(JSON.stringify(request), isFilterApplied, isDialCodeSearch , isGuestUser, successCallback, errorCallback); } catch (error) { console.log(error); } } - getAllLocalContents(request: ContentFilterCriteria, + getAllLocalContents(request: ContentFilterCriteria, successCallback: (response: string) => void, errorCallback: (response: string) => void) { try { diff --git a/src/services/dialcode/bean.ts b/src/services/dialcode/bean.ts new file mode 100644 index 0000000..ca2392c --- /dev/null +++ b/src/services/dialcode/bean.ts @@ -0,0 +1,3 @@ +export class DialCodeRequest { + identifier: string; +} diff --git a/src/services/dialcode/dialcode.service.ts b/src/services/dialcode/dialcode.service.ts new file mode 100644 index 0000000..06a9f92 --- /dev/null +++ b/src/services/dialcode/dialcode.service.ts @@ -0,0 +1,21 @@ +import { Injectable } from "@angular/core"; +import { ServiceProvider } from "../factory"; +import { DialCodeRequest } from "./bean"; + +@Injectable() +export class DialCodeService { + + constructor(private factory: ServiceProvider) { + } + + getForm(request: DialCodeRequest, + successCallback: (response: string) => void, + errorCallback: (error: string) => void) { + try { + this.factory.getDialCodeService().getDialCode(JSON.stringify(request), successCallback, errorCallback); + } catch (error) { + console.log(error); + } + } + +} \ No newline at end of file diff --git a/src/services/factory.ts b/src/services/factory.ts index 9ab35f3..25c1ac0 100644 --- a/src/services/factory.ts +++ b/src/services/factory.ts @@ -57,4 +57,8 @@ export class ServiceProvider { getFormService(): any { } + + getDialCodeService(): any { + + } } \ No newline at end of file diff --git a/src/services/geniesdk.service.ts b/src/services/geniesdk.service.ts index 636626f..eebbb78 100644 --- a/src/services/geniesdk.service.ts +++ b/src/services/geniesdk.service.ts @@ -56,4 +56,8 @@ export class GenieSDKServiceProvider extends ServiceProvider { return (window).GenieSDK.form; } + getDialCodeService(): any { + return (window).GenieSDK.dialcode; + } + } \ No newline at end of file