forked from Yara724/api
sms template corrected and now fires at the end of the fanavaran stage (Expertise). Docs also added.
This commit is contained in:
@@ -194,17 +194,18 @@ export class SmsOrchestrationService implements OnModuleInit {
|
||||
}
|
||||
|
||||
/**
|
||||
* Notify the claim owner (damaged party) that the Fanavaran base claim was
|
||||
* created. Uses the same SMS gateway/provider as login for this deployment.
|
||||
* Notify the claim owner (damaged party) after Fanavaran expertise (last
|
||||
* stage) succeeds. Uses the same SMS gateway/provider as login.
|
||||
*
|
||||
* token = ClaimNo, token2 = claimId (Fanavaran Id), token3 = Yara publicId
|
||||
* token = Yara publicId (claim case number), token2 = Fanavaran claimId,
|
||||
* token3 = Fanavaran claimNo
|
||||
*
|
||||
* Parsian body:
|
||||
* کاربر گرامی پرونده شما به شماره {publicId} در فناوران با شناسه {claimId}
|
||||
* و شماره {claimNo} ثبت شده است. جهت پیگیری های آتی پرونده خود باید از این
|
||||
* اطلاعات استفاده کنید.
|
||||
* کاربرگرامی پرونده شما به شماره {publicId} در سامانه فناوران با شناسه
|
||||
* {claimId} و شماره پرونده {claimNo} ثبت شده است. جهت پیگیری های آتی از
|
||||
* این اطلاعات استفاده کنید.
|
||||
*/
|
||||
async sendFanavaranBaseClaimRegisteredNotice(params: {
|
||||
async sendFanavaranClaimRegisteredNotice(params: {
|
||||
receptor: string;
|
||||
publicId: string;
|
||||
claimNo?: string | number | null;
|
||||
@@ -221,12 +222,22 @@ export class SmsOrchestrationService implements OnModuleInit {
|
||||
return this.sendTemplate({
|
||||
template: "yara-fanavaran-claim",
|
||||
receptor: params.receptor,
|
||||
token: params.publicId || "-",
|
||||
token: params.publicId || "-",
|
||||
token2: claimId,
|
||||
token3: claimNo,
|
||||
});
|
||||
}
|
||||
|
||||
/** @deprecated Use sendFanavaranClaimRegisteredNotice */
|
||||
async sendFanavaranBaseClaimRegisteredNotice(params: {
|
||||
receptor: string;
|
||||
publicId: string;
|
||||
claimNo?: string | number | null;
|
||||
claimId?: string | number | null;
|
||||
}): Promise<boolean> {
|
||||
return this.sendFanavaranClaimRegisteredNotice(params);
|
||||
}
|
||||
|
||||
private async sendTemplate(args: TemplateArgs): Promise<boolean> {
|
||||
try {
|
||||
await this.smsGatewayService.verifyLookUp(args);
|
||||
|
||||
Reference in New Issue
Block a user