Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .source
4 changes: 2 additions & 2 deletions apps/dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
"@types/react-dom": "^19.2.3",
"@types/react-window": "^1.8.8",
"@types/uuid": "^8.3.4",
"@vitejs/plugin-react": "^4.3.1",
"@vitejs/plugin-react": "^4.7.0",
"cross-fetch": "^4.0.0",
"dotenv": "^16.4.5",
"express": "^4.21.0",
Expand All @@ -184,7 +184,7 @@
"rimraf": "^3.0.2",
"tailwindcss": "^4.1.18",
"typescript": "5.6.2",
"vite": "^5.4.21",
"vite": "^6.4.2",
"vite-plugin-ejs": "^1.7.0",
"vite-plugin-static-copy": "^2.3.2"
},
Expand Down
2 changes: 1 addition & 1 deletion apps/dashboard/src/components/create-workflow-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ type CreateWorkflowTab = 'guided' | 'manual';
const WORKFLOW_SUGGESTIONS = [
'Welcome email workflow',
'Order confirmation workflow',
'Payment failed',
'Payment failed workflow',
'Password reset workflow',
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import {
FeatureFlagsKeysEnum,
IAttachmentOptions,
IEmailOptions,
safeJsonStringify,
WebhookEventEnum,
WebhookObjectTypeEnum,
} from '@novu/shared';
Expand Down Expand Up @@ -574,7 +575,8 @@ export class SendMessageEmail extends SendMessageBase {
status: ExecutionDetailsStatusEnum.FAILED,
isTest: false,
isRetry: false,
raw: JSON.stringify(error) === '{}' ? JSON.stringify({ message: error.message }) : JSON.stringify(error),
raw:
safeJsonStringify(error) === '{}' ? JSON.stringify({ message: error.message }) : safeJsonStringify(error),
})
);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { CreateExecutionDetails, DetailEnum } from '@novu/application-generic';
import { DeliveryLifecycleState, JobEntity, MessageEntity, MessageRepository } from '@novu/dal';
import { safeJsonStringify } from '@novu/shared';
import { SendMessageChannelCommand } from './send-message-channel.command';

export enum SendMessageStatus {
Expand Down Expand Up @@ -77,7 +78,7 @@ export abstract class SendMessageType {
return error.toString();
}
if (Object.keys(error)?.length > 0) {
return JSON.stringify(error);
return safeJsonStringify(error);
}

return '';
Expand Down
1 change: 1 addition & 0 deletions libs/internal-sdk/.speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ typescript:
enableReactQuery: true
enumFormat: union
exportZodModelNamespace: false
fixEnumNameSanitization: false
flatAdditionalProperties: false
flattenGlobalSecurity: true
flatteningOrder: body-first
Expand Down
2 changes: 1 addition & 1 deletion libs/internal-sdk/examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
"dependencies": {
"@novu/api": "file:.."
}
}
}
22 changes: 10 additions & 12 deletions libs/internal-sdk/examples/trigger.example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,37 @@
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/

import dotenv from 'dotenv';

import dotenv from "dotenv";
dotenv.config();

/**
* Example usage of the @novu/api SDK
*
* To run this example from the examples directory:
* npm run build && npx tsx trigger.example.ts
*/

import { Novu } from '@novu/api';
import { Novu } from "@novu/api";

const novu = new Novu({
security: {
bearerAuth: '<YOUR_BEARER_TOKEN_HERE>',
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
},
});

async function main() {
const result = await novu.trigger({
workflowId: 'workflow_identifier',
workflowId: "workflow_identifier",
payload: {
comment_id: 'string',
post: {
text: 'string',
"comment_id": "string",
"post": {
"text": "string",
},
},
overrides: {},
to: 'SUBSCRIBER_ID',
actor: '<value>',
to: "SUBSCRIBER_ID",
actor: "<value>",
context: {
key: 'org-acme',
"key": "org-acme",
},
});

Expand Down
12 changes: 3 additions & 9 deletions libs/internal-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,9 @@
"react-dom": "^18 || ^19"
},
"peerDependenciesMeta": {
"@tanstack/react-query": {
"optional": true
},
"react": {
"optional": true
},
"react-dom": {
"optional": true
}
"@tanstack/react-query": {"optional":true},
"react": {"optional":true},
"react-dom": {"optional":true}
},
"devDependencies": {
"@eslint/js": "^9.26.0",
Expand Down
4 changes: 3 additions & 1 deletion libs/internal-sdk/src/funcs/activityChartsRetrieve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ import { Result } from "../types/fp.js";
*
* @remarks
* Retrieve chart data for activity analytics and metrics visualization.
*
* This operation requires {@link Security.bearerAuth} to be set on the `security` parameter when initializing the SDK.
*/
export function activityChartsRetrieve(
client: NovuCore,
Expand Down Expand Up @@ -111,7 +113,7 @@ async function $do(
}));

const securityInput = await extractSecurity(client._options.security);
const requestSecurity = resolveGlobalSecurity(securityInput);
const requestSecurity = resolveGlobalSecurity(securityInput, [1]);

const context = {
options: client._options,
Expand Down
4 changes: 3 additions & 1 deletion libs/internal-sdk/src/funcs/activityRequestsList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ import { Result } from "../types/fp.js";
*
* @remarks
* Retrieve a list of activity requests with optional filtering and pagination.
*
* This operation requires {@link Security.bearerAuth} to be set on the `security` parameter when initializing the SDK.
*/
export function activityRequestsList(
client: NovuCore,
Expand Down Expand Up @@ -108,7 +110,7 @@ async function $do(
}));

const securityInput = await extractSecurity(client._options.security);
const requestSecurity = resolveGlobalSecurity(securityInput);
const requestSecurity = resolveGlobalSecurity(securityInput, [1]);

const context = {
options: client._options,
Expand Down
Loading
Loading