refactor: use platform interfaces namespace
This commit is contained in:
+1
-1
@@ -28,7 +28,7 @@
|
||||
"@push.rocks/qenv": "^6.0.5",
|
||||
"@push.rocks/smartlog": "^3.0.7",
|
||||
"@push.rocks/smartntml": "^2.0.4",
|
||||
"@serve.zone/interfaces": "^5.4.3"
|
||||
"@serve.zone/interfaces": "^5.4.4"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
Generated
+5
-5
@@ -27,8 +27,8 @@ importers:
|
||||
specifier: ^2.0.4
|
||||
version: 2.0.4
|
||||
'@serve.zone/interfaces':
|
||||
specifier: ^5.4.3
|
||||
version: 5.4.3
|
||||
specifier: ^5.4.4
|
||||
version: 5.4.4
|
||||
devDependencies:
|
||||
'@git.zone/tsbuild':
|
||||
specifier: ^2.1.84
|
||||
@@ -599,8 +599,8 @@ packages:
|
||||
'@sec-ant/readable-stream@0.4.1':
|
||||
resolution: {integrity: sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==}
|
||||
|
||||
'@serve.zone/interfaces@5.4.3':
|
||||
resolution: {integrity: sha512-9ijFhHoC7GYyyAUJbBoDYmcoCmIXTFPiD6fI3x68SWiC0xA+2LG0nOe14D32c1QN9X/3i2Ac5/1sUibfjHsIGg==}
|
||||
'@serve.zone/interfaces@5.4.4':
|
||||
resolution: {integrity: sha512-0mcLvZBGHOFKG8PkpMieHo19lbPLJIpDIgKUSbuqfqOzSYymS8BLYftCr8Kw7ddl61kICZoy/m09U+TtxZbxBg==}
|
||||
|
||||
'@sindresorhus/is@5.6.0':
|
||||
resolution: {integrity: sha512-TV7t8GKYaJWsn00tFDqBw8+Uqmr8A0fRU1tvTQhyZzGv0sJCGRQL3JGMI3ucuKo3XIZdUP+Lx7/gh2t3lewy7g==}
|
||||
@@ -3974,7 +3974,7 @@ snapshots:
|
||||
|
||||
'@sec-ant/readable-stream@0.4.1': {}
|
||||
|
||||
'@serve.zone/interfaces@5.4.3':
|
||||
'@serve.zone/interfaces@5.4.4':
|
||||
dependencies:
|
||||
'@api.global/typedrequest-interfaces': 3.0.19
|
||||
'@push.rocks/smartlog-interfaces': 3.0.2
|
||||
|
||||
@@ -11,7 +11,7 @@ export class SzEmailConnector {
|
||||
}
|
||||
|
||||
public async sendEmail(
|
||||
optionsArg: plugins.servezoneInterfaces.platformservice.mta.IReq_SendEmail['request']
|
||||
optionsArg: plugins.servezoneInterfaces.platform.email.IReq_SendEmail['request']
|
||||
) {
|
||||
if (this.platformClientRef.debugMode) {
|
||||
logger.log('info', `sent email with subject ${optionsArg.title} to ${optionsArg.to}
|
||||
@@ -26,7 +26,7 @@ export class SzEmailConnector {
|
||||
}
|
||||
|
||||
const typedRequest =
|
||||
this.platformClientRef.typedsocket.createTypedRequest<plugins.servezoneInterfaces.platformservice.mta.IReq_SendEmail>(
|
||||
this.platformClientRef.typedsocket.createTypedRequest<plugins.servezoneInterfaces.platform.email.IReq_SendEmail>(
|
||||
'sendEmail'
|
||||
);
|
||||
const response = await typedRequest.fire(optionsArg);
|
||||
|
||||
@@ -9,7 +9,7 @@ export class SzLetterConnector {
|
||||
}
|
||||
|
||||
public async sendLetter(
|
||||
optionsArg: plugins.servezoneInterfaces.platformservice.letter.IRequest_SendLetter['request']
|
||||
optionsArg: plugins.servezoneInterfaces.platform.letter.IReq_SendLetter['request']
|
||||
) {
|
||||
|
||||
if (this.platformClientRef.debugMode) {
|
||||
@@ -21,7 +21,7 @@ export class SzLetterConnector {
|
||||
}
|
||||
|
||||
const typedRequest =
|
||||
this.platformClientRef.typedsocket.createTypedRequest<plugins.servezoneInterfaces.platformservice.letter.IRequest_SendLetter>(
|
||||
this.platformClientRef.typedsocket.createTypedRequest<plugins.servezoneInterfaces.platform.letter.IReq_SendLetter>(
|
||||
'sendLetter'
|
||||
);
|
||||
const response = await typedRequest.fire(optionsArg);
|
||||
|
||||
@@ -9,7 +9,7 @@ export class SzPushNotificationConnector {
|
||||
}
|
||||
|
||||
public async sendPushNotification(
|
||||
optionsArg: plugins.servezoneInterfaces.platformservice.pushnotification.IRequest_SendPushNotification['request']
|
||||
optionsArg: plugins.servezoneInterfaces.platform.pushnotification.IReq_SendPushNotification['request']
|
||||
) {
|
||||
if (this.platformClientRef.debugMode) {
|
||||
console.log('sendPushNotification', optionsArg);
|
||||
@@ -20,7 +20,7 @@ export class SzPushNotificationConnector {
|
||||
}
|
||||
|
||||
const typedRequest =
|
||||
this.platformClientRef.typedsocket.createTypedRequest<plugins.servezoneInterfaces.platformservice.pushnotification.IRequest_SendPushNotification>(
|
||||
this.platformClientRef.typedsocket.createTypedRequest<plugins.servezoneInterfaces.platform.pushnotification.IReq_SendPushNotification>(
|
||||
'sendPushNotification'
|
||||
);
|
||||
const response = await typedRequest.fire(optionsArg);
|
||||
|
||||
@@ -9,7 +9,7 @@ export class SzSmsConnector {
|
||||
this.platformClientRef = platformClientRefArg;
|
||||
}
|
||||
|
||||
public async sendSms(messageArg: plugins.servezoneInterfaces.platformservice.sms.IRequest_SendSms['request']) {
|
||||
public async sendSms(messageArg: plugins.servezoneInterfaces.platform.sms.IReq_SendSms['request']) {
|
||||
if (this.platformClientRef.debugMode) {
|
||||
logger.log('info', `sent sms to ${messageArg.toNumber}}
|
||||
body:
|
||||
@@ -22,7 +22,7 @@ export class SzSmsConnector {
|
||||
return;
|
||||
}
|
||||
|
||||
const typedrequest = this.platformClientRef.typedsocket.createTypedRequest<plugins.servezoneInterfaces.platformservice.sms.IRequest_SendSms>(
|
||||
const typedrequest = this.platformClientRef.typedsocket.createTypedRequest<plugins.servezoneInterfaces.platform.sms.IReq_SendSms>(
|
||||
'sendSms'
|
||||
);
|
||||
const response = await typedrequest.fire(messageArg);
|
||||
@@ -31,7 +31,7 @@ export class SzSmsConnector {
|
||||
}
|
||||
|
||||
public async sendSmsVerifcation(
|
||||
recipientArg: plugins.servezoneInterfaces.platformservice.sms.IRequest_SendVerificationCode['request']
|
||||
recipientArg: plugins.servezoneInterfaces.platform.sms.IReq_SendVerificationCode['request']
|
||||
) {
|
||||
if (this.platformClientRef.debugMode) {
|
||||
console.log('sendSmsVerifcation', recipientArg, '123456');
|
||||
@@ -40,7 +40,7 @@ export class SzSmsConnector {
|
||||
|
||||
|
||||
const typedrequest =
|
||||
this.platformClientRef.typedsocket.createTypedRequest<plugins.servezoneInterfaces.platformservice.sms.IRequest_SendVerificationCode>(
|
||||
this.platformClientRef.typedsocket.createTypedRequest<plugins.servezoneInterfaces.platform.sms.IReq_SendVerificationCode>(
|
||||
'sendVerificationCode'
|
||||
);
|
||||
const response = await typedrequest.fire(recipientArg);
|
||||
|
||||
Reference in New Issue
Block a user