Skip to content

Commit b3be0eb

Browse files
cursoragentvcapretz
andcommitted
feat: remove workflows namespace, keeping automations
Remove the duplicate 'workflows' namespace from the SDK. The preview-workflows branch had both 'workflows' and 'automations' namespaces pointing to the same /automations API endpoints. This commit removes: - src/workflows/ (Workflows class, interfaces, specs) - src/workflow-runs/ (WorkflowRuns class, interfaces, specs) - src/workflow-run-steps/ (WorkflowRunSteps class, interfaces, specs) - workflows property from Resend client - workflow-related exports from index.ts The 'automations' namespace (automations, automation-runs, automation-run-steps) is preserved as the canonical SDK interface for these endpoints. Also fixes a stale test describe name and test data in parse-automation-to-api-options.spec.ts. Co-authored-by: Vitor Capretz <capretzvitor@gmail.com>
1 parent 84f40da commit b3be0eb

25 files changed

+4
-1282
lines changed

src/common/utils/parse-automation-to-api-options.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ describe('parseAutomationToApiOptions', () => {
6868
const apiOptions = parseAutomationToApiOptions(automation);
6969

7070
expect(apiOptions).toEqual({
71-
name: 'Welcome Series',
71+
name: 'Welcome Automation',
7272
status: 'enabled',
7373
steps: [
7474
{
@@ -154,7 +154,7 @@ describe('parseAutomationToApiOptions', () => {
154154

155155
it('handles minimal payload with only required fields', () => {
156156
const automation: CreateAutomationOptions = {
157-
name: 'Minimal Workflow',
157+
name: 'Minimal Automation',
158158
steps: [
159159
{
160160
ref: 'trigger_1',
@@ -168,7 +168,7 @@ describe('parseAutomationToApiOptions', () => {
168168
const apiOptions = parseAutomationToApiOptions(automation);
169169

170170
expect(apiOptions).toEqual({
171-
name: 'Minimal Workflow',
171+
name: 'Minimal Automation',
172172
status: undefined,
173173
steps: [
174174
{
@@ -182,7 +182,7 @@ describe('parseAutomationToApiOptions', () => {
182182
});
183183
});
184184

185-
describe('parseWorkflowEventToApiOptions', () => {
185+
describe('parseEventToApiOptions', () => {
186186
it('converts contactId to contact_id', () => {
187187
const event: SendEventOptions = {
188188
event: 'user.signed_up',

src/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,3 @@ export * from './segments/interfaces';
2020
export * from './templates/interfaces';
2121
export * from './topics/interfaces';
2222
export * from './webhooks/interfaces';
23-
export * from './workflow-run-steps/interfaces';
24-
export * from './workflow-runs/interfaces';
25-
export * from './workflows/interfaces';

src/resend.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import { Segments } from './segments/segments';
1616
import { Templates } from './templates/templates';
1717
import { Topics } from './topics/topics';
1818
import { Webhooks } from './webhooks/webhooks';
19-
import { Workflows } from './workflows/workflows';
2019

2120
const defaultBaseUrl = 'https://api.resend.com';
2221
const defaultUserAgent = `resend-node:${version}`;
@@ -49,7 +48,6 @@ export class Resend {
4948
readonly webhooks = new Webhooks(this);
5049
readonly templates = new Templates(this);
5150
readonly topics = new Topics(this);
52-
readonly workflows = new Workflows(this);
5351

5452
constructor(readonly key?: string) {
5553
if (!key) {

src/workflow-run-steps/interfaces/get-workflow-run-step.interface.ts

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/workflow-run-steps/interfaces/index.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/workflow-run-steps/interfaces/list-workflow-run-steps.interface.ts

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/workflow-run-steps/interfaces/workflow-run-step.ts

Lines changed: 0 additions & 32 deletions
This file was deleted.

src/workflow-run-steps/workflow-run-steps.spec.ts

Lines changed: 0 additions & 209 deletions
This file was deleted.

src/workflow-run-steps/workflow-run-steps.ts

Lines changed: 0 additions & 38 deletions
This file was deleted.

src/workflow-runs/interfaces/get-workflow-run.interface.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)