Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: isend sms provider unexpected provider error #5135

Merged
merged 7 commits into from
Feb 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions apps/api/src/app/integrations/dtos/credentials.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,11 @@ export class CredentialsDto implements ICredentials {
@IsOptional()
datePath?: string;

@ApiPropertyOptional()
@IsString()
@IsOptional()
apiToken?: string;

@ApiPropertyOptional()
@IsBoolean()
@IsOptional()
Expand Down
Binary file not shown.
22 changes: 22 additions & 0 deletions apps/web/public/static/images/providers/dark/square/isend-sms.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
22 changes: 22 additions & 0 deletions apps/web/public/static/images/providers/light/square/isend-sms.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ const providers: Record<ChannelTypeEnum, ProvidersIdEnum[]> = {
SmsProviderIdEnum.Bandwidth,
SmsProviderIdEnum.Simpletexting,
SmsProviderIdEnum.BrevoSms,
SmsProviderIdEnum.ISendSms,
].sort(),
],
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ export class SendMessageSms extends SendMessageBase {
status: ExecutionDetailsStatusEnum.FAILED,
isTest: false,
isRetry: false,
raw: JSON.stringify(e),
raw: JSON.stringify({ message: e.message, name: e.name }),
})
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const integrationSchema = new Schema<IntegrationDBModel>(
imageUrl: Schema.Types.String,
state: Schema.Types.String,
externalLink: Schema.Types.String,
apiToken: Schema.Types.String,
},
active: {
type: Schema.Types.Boolean,
Expand Down
2 changes: 1 addition & 1 deletion libs/shared/src/consts/providers/channels/sms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export const smsProviders: IProviderConfig[] = [
channel: ChannelTypeEnum.SMS,
credentials: iSendSmsConfig,
docReference: 'https://send.com.ly/developers/docs',
logoFileName: { light: 'isend-sms.png', dark: 'isend-sms.png' },
logoFileName: { light: 'isend-sms.svg', dark: 'isend-sms.svg' },
},
{
id: SmsProviderIdEnum.Clickatell,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"commit": "cz",
"nx": "nx",
"lint-staged": "lint-staged",
"generate:provider": "npx hygen provider new --version 0.16.3",
"generate:provider": "npx hygen provider new --version 0.23.0",
"lint": "nx run-many --target=lint --all",
"test": "cross-env CI=true lerna run test:watch --parallel",
"start:dev": "cross-env TZ=UTC lerna run start:dev --parallel --concurrency=20 --scope=@novu/{api,worker,web,widget,ws,notification-center}",
Expand Down
13 changes: 2 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion providers/isend-sms/src/lib/isend-sms.provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class ISendSmsProvider implements ISmsProvider {
}
) {
this.Instance = axios.create({
baseURL: 'https://send.com.ly/',
baseURL: 'https://send.com.ly',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
Expand Down
2 changes: 1 addition & 1 deletion providers/rocket-chat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"access": "public"
},
"dependencies": {
"@novu/stateless": "0.16.3",
"@novu/stateless": "0.22.0",
"axios": "^1.6.2"
},
"devDependencies": {
Expand Down
Loading