From c278962d0fcc900f312656408d3565ccf8585382 Mon Sep 17 00:00:00 2001 From: Pawan Jain Date: Wed, 31 Jan 2024 00:46:34 +0530 Subject: [PATCH 1/6] fix: change png image to svg --- .../providers/dark/square/isend-sms.png | Bin 1410 -> 0 bytes .../providers/dark/square/isend-sms.svg | 22 ++++++++++++++++++ .../providers/light/square/isend-sms.png | Bin 1410 -> 0 bytes .../providers/light/square/isend-sms.svg | 22 ++++++++++++++++++ 4 files changed, 44 insertions(+) delete mode 100644 apps/web/public/static/images/providers/dark/square/isend-sms.png create mode 100644 apps/web/public/static/images/providers/dark/square/isend-sms.svg delete mode 100644 apps/web/public/static/images/providers/light/square/isend-sms.png create mode 100644 apps/web/public/static/images/providers/light/square/isend-sms.svg diff --git a/apps/web/public/static/images/providers/dark/square/isend-sms.png b/apps/web/public/static/images/providers/dark/square/isend-sms.png deleted file mode 100644 index 5e5dc2425265c4b6cfbe53aa7bf751b1866a1c4a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1410 zcmV-|1%3L7P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D09|QRSaefvX>d(t zbYWy+bYTDh0001cB4cc6a8Pe)Zgg`ZI$L`pcp^G5EFyU#Ixu}Kdm?xuIx{dVB6%V@ zFnuh0B6uP?GcYV7c_KP9Fnuh0B6uP?Ff1Z@B04iLeO-OTVC3x+8oh4b&gszu9CwD3--GEL@LJe5l(5$$YUG@@e9hUXEMLof^z zFTL;v-v8(jbxuLtHhdWsU+jkCS@O`5HTdj_*HI8%;El)~E@=aPYU{v-o|8hCb-2bY z4bOgigf{Kaj(~mlZ9&VXqqjt=YX)AaIV?zn$Re)&;XU+^$EhZv?%vHfvVI$6Npd@9 zf#igS7pv-V?(8p~CIg>1VI|RgI=IG}NQ@7B#^*9DQ29PhSm@nsfJsJ4Kt=BunX)G@&Lh0fao_2Of+(=-s za{wychde|OC5dE5H9$Q4tFU-Q{t{0!d+@P{NFjttRPx+BiO6Ne>viE1|NLi{u=uXn z?VjcqKf)i2t(U1TO98rc%9K8=q`VC5U;7*mt*a89L9nZpJU78l z2X?iRr{J%l5!63?n3l7lJ1Hb#V${|Ux5v@i{jnIE*#hr$vQa)}B4scsLo6eVmq1=qESFjUpl9XdpX^YY%S$5A-Z$vIJ&IO*8HoaLadYk0tyC&x7Wey$r`LVD00kfE-?$xeg3$5yiF^yb6G5+u$< zdzu()6FM5JDdAJ@M-D&@MPOMe)Y6~f znbQ} + + + + + + + + + + + diff --git a/apps/web/public/static/images/providers/light/square/isend-sms.png b/apps/web/public/static/images/providers/light/square/isend-sms.png deleted file mode 100644 index 5e5dc2425265c4b6cfbe53aa7bf751b1866a1c4a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1410 zcmV-|1%3L7P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D09|QRSaefvX>d(t zbYWy+bYTDh0001cB4cc6a8Pe)Zgg`ZI$L`pcp^G5EFyU#Ixu}Kdm?xuIx{dVB6%V@ zFnuh0B6uP?GcYV7c_KP9Fnuh0B6uP?Ff1Z@B04iLeO-OTVC3x+8oh4b&gszu9CwD3--GEL@LJe5l(5$$YUG@@e9hUXEMLof^z zFTL;v-v8(jbxuLtHhdWsU+jkCS@O`5HTdj_*HI8%;El)~E@=aPYU{v-o|8hCb-2bY z4bOgigf{Kaj(~mlZ9&VXqqjt=YX)AaIV?zn$Re)&;XU+^$EhZv?%vHfvVI$6Npd@9 zf#igS7pv-V?(8p~CIg>1VI|RgI=IG}NQ@7B#^*9DQ29PhSm@nsfJsJ4Kt=BunX)G@&Lh0fao_2Of+(=-s za{wychde|OC5dE5H9$Q4tFU-Q{t{0!d+@P{NFjttRPx+BiO6Ne>viE1|NLi{u=uXn z?VjcqKf)i2t(U1TO98rc%9K8=q`VC5U;7*mt*a89L9nZpJU78l z2X?iRr{J%l5!63?n3l7lJ1Hb#V${|Ux5v@i{jnIE*#hr$vQa)}B4scsLo6eVmq1=qESFjUpl9XdpX^YY%S$5A-Z$vIJ&IO*8HoaLadYk0tyC&x7Wey$r`LVD00kfE-?$xeg3$5yiF^yb6G5+u$< zdzu()6FM5JDdAJ@M-D&@MPOMe)Y6~f znbQ} + + + + + + + + + + + From 8455881b8c0bab95f20abe71a4c2a9e9a47dff76 Mon Sep 17 00:00:00 2001 From: Pawan Jain Date: Wed, 31 Jan 2024 00:47:55 +0530 Subject: [PATCH 2/6] fix: add api token in credentials schema and dto --- apps/api/src/app/integrations/dtos/credentials.dto.ts | 5 +++++ libs/dal/src/repositories/integration/integration.schema.ts | 1 + 2 files changed, 6 insertions(+) diff --git a/apps/api/src/app/integrations/dtos/credentials.dto.ts b/apps/api/src/app/integrations/dtos/credentials.dto.ts index 95049a0a749..d7fdecda7d5 100644 --- a/apps/api/src/app/integrations/dtos/credentials.dto.ts +++ b/apps/api/src/app/integrations/dtos/credentials.dto.ts @@ -157,6 +157,11 @@ export class CredentialsDto implements ICredentials { @IsOptional() datePath?: string; + @ApiPropertyOptional() + @IsString() + @IsOptional() + apiToken?: string; + @ApiPropertyOptional() @IsBoolean() @IsOptional() diff --git a/libs/dal/src/repositories/integration/integration.schema.ts b/libs/dal/src/repositories/integration/integration.schema.ts index 492956caa67..fe689fea143 100644 --- a/libs/dal/src/repositories/integration/integration.schema.ts +++ b/libs/dal/src/repositories/integration/integration.schema.ts @@ -58,6 +58,7 @@ const integrationSchema = new Schema( imageUrl: Schema.Types.String, state: Schema.Types.String, externalLink: Schema.Types.String, + apiToken: Schema.Types.String, }, active: { type: Schema.Types.Boolean, From 8132a943bf5ed799234ae129159b2515a8c2797f Mon Sep 17 00:00:00 2001 From: Pawan Jain Date: Wed, 31 Jan 2024 00:48:43 +0530 Subject: [PATCH 3/6] fix: change isend image name --- libs/shared/src/consts/providers/channels/sms.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/shared/src/consts/providers/channels/sms.ts b/libs/shared/src/consts/providers/channels/sms.ts index dee21414b48..0c8f3a00ce7 100644 --- a/libs/shared/src/consts/providers/channels/sms.ts +++ b/libs/shared/src/consts/providers/channels/sms.ts @@ -143,7 +143,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, From 4d46365695a729929eeec78413b8b320fa892cc5 Mon Sep 17 00:00:00 2001 From: Pawan Jain Date: Wed, 31 Jan 2024 00:49:26 +0530 Subject: [PATCH 4/6] fix: add error message and name to debug from activity feed --- .../workflow/usecases/send-message/send-message-sms.usecase.ts | 2 +- providers/isend-sms/src/lib/isend-sms.provider.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/worker/src/app/workflow/usecases/send-message/send-message-sms.usecase.ts b/apps/worker/src/app/workflow/usecases/send-message/send-message-sms.usecase.ts index f3587a24590..562ec24276b 100644 --- a/apps/worker/src/app/workflow/usecases/send-message/send-message-sms.usecase.ts +++ b/apps/worker/src/app/workflow/usecases/send-message/send-message-sms.usecase.ts @@ -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 }), }) ); } diff --git a/providers/isend-sms/src/lib/isend-sms.provider.ts b/providers/isend-sms/src/lib/isend-sms.provider.ts index 8ee5ee7c184..b26d12a2075 100644 --- a/providers/isend-sms/src/lib/isend-sms.provider.ts +++ b/providers/isend-sms/src/lib/isend-sms.provider.ts @@ -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', From 9b6d3411026b728ba7eb7d4be3316f9d1982584a Mon Sep 17 00:00:00 2001 From: Pawan Jain Date: Wed, 31 Jan 2024 02:16:54 +0530 Subject: [PATCH 5/6] fix: update version for provider generator --- package.json | 2 +- pnpm-lock.yaml | 13 ++----------- providers/rocket-chat/package.json | 2 +- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 957dbb03323..f746577c10e 100644 --- a/package.json +++ b/package.json @@ -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.22.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}", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cc5863fbcff..2a4c7d16590 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5798,8 +5798,8 @@ importers: providers/rocket-chat: dependencies: '@novu/stateless': - specifier: 0.16.3 - version: 0.16.3 + specifier: 0.22.0 + version: link:../../packages/stateless axios: specifier: ^1.6.2 version: 1.6.2 @@ -17328,15 +17328,6 @@ packages: vue-resize: 2.0.0-alpha.1(vue@3.2.47) dev: false - /@novu/stateless@0.16.3: - resolution: {integrity: sha512-9wrqUluSaR9rCdDp4oUWFBwsk6OSM4P+yMaEtFGHrGmSPMcspnvXQaQoARKakuUpCXFvQlPPJq5+yaicv4o/hA==} - engines: {node: '>=10'} - dependencies: - handlebars: 4.7.7 - lodash.get: 4.4.2 - lodash.merge: 4.6.2 - dev: false - /@npmcli/arborist@5.3.0: resolution: {integrity: sha512-+rZ9zgL1lnbl8Xbb1NQdMjveOMwj4lIYfcDtyJHHi5x4X8jtR6m8SXooJMZy5vmFVZ8w7A2Bnd/oX9eTuU8w5A==} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} diff --git a/providers/rocket-chat/package.json b/providers/rocket-chat/package.json index 7d2b8fab745..bda5fdc5364 100644 --- a/providers/rocket-chat/package.json +++ b/providers/rocket-chat/package.json @@ -29,7 +29,7 @@ "access": "public" }, "dependencies": { - "@novu/stateless": "0.16.3", + "@novu/stateless": "0.22.0", "axios": "^1.6.2" }, "devDependencies": { From 28a895d269119f757754509e909365c08645ea98 Mon Sep 17 00:00:00 2001 From: Pawan Jain Date: Sat, 3 Feb 2024 23:45:25 +0530 Subject: [PATCH 6/6] fix: add isendsms provider in sort providers file --- .../integrations/components/multi-provider/sort-providers.ts | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/web/src/pages/integrations/components/multi-provider/sort-providers.ts b/apps/web/src/pages/integrations/components/multi-provider/sort-providers.ts index 3466371c686..ac3910cf9b5 100644 --- a/apps/web/src/pages/integrations/components/multi-provider/sort-providers.ts +++ b/apps/web/src/pages/integrations/components/multi-provider/sort-providers.ts @@ -74,6 +74,7 @@ const providers: Record = { SmsProviderIdEnum.Bandwidth, SmsProviderIdEnum.Simpletexting, SmsProviderIdEnum.BrevoSms, + SmsProviderIdEnum.ISendSms, ].sort(), ], }; diff --git a/package.json b/package.json index f746577c10e..40621bdf11d 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "commit": "cz", "nx": "nx", "lint-staged": "lint-staged", - "generate:provider": "npx hygen provider new --version 0.22.0", + "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}",