@startsimpli/integrations 0.2.229 → 0.2.231
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/src/__tests__/corpus-ask-lookup.test.ts +70 -0
- package/src/__tests__/today-agenda-list.test.tsx +96 -0
- package/src/__tests__/today-agenda-route.test.ts +41 -0
- package/src/__tests__/today-agenda.test.ts +143 -0
- package/src/comms/__tests__/email-auth.test.tsx +173 -0
- package/src/comms/api/comms.ts +21 -0
- package/src/comms/components/EmailAuthApply.tsx +83 -0
- package/src/comms/components/EmailAuthPanel.tsx +140 -0
- package/src/comms/components/SendingDomain.tsx +3 -0
- package/src/comms/components/index.ts +1 -0
- package/src/comms/hooks/index.ts +38 -0
- package/src/comms/types/index.ts +77 -0
- package/src/components/pages/home/BriefCard.tsx +5 -3
- package/src/components/pages/home/HomeBriefPage.tsx +17 -6
- package/src/components/pages/home/TodayAgendaList.tsx +115 -0
- package/src/components/pages/home/index.ts +2 -0
- package/src/corpus/ask-items.ts +15 -5
- package/src/corpus/converse/brain.ts +3 -3
- package/src/corpus/give-up.ts +4 -0
- package/src/corpus/index.ts +4 -0
- package/src/corpus/llm.ts +5 -1
- package/src/corpus/today-agenda-route.ts +80 -0
- package/src/corpus/today-agenda.ts +144 -0
- package/src/native/home/AgendaSection.tsx +40 -0
- package/src/native/home/HomeScreen.tsx +14 -9
- package/src/native/home/__tests__/agenda-controller.test.ts +54 -0
- package/src/native/home/__tests__/home-agenda.test.tsx +42 -0
- package/src/native/home/agenda-controller.ts +46 -0
- package/src/native/home/tab.tsx +5 -1
- package/src/native/index.ts +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@startsimpli/integrations",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.231",
|
|
4
4
|
"description": "Provider-agnostic types, API clients, hooks, and UI primitives for email + calendar integrations across StartSimpli apps, plus foundry customer email (subpath ./comms).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://startsimpli.com",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"react-native": ">=0.74.0",
|
|
51
51
|
"@startsimpli/ui-native": ">=0.1.12",
|
|
52
52
|
"react-native-safe-area-context": ">=4.0.0",
|
|
53
|
-
"@startsimpli/auth": "^0.4.64",
|
|
54
53
|
"@startsimpli/ui": "^0.4.211",
|
|
54
|
+
"@startsimpli/auth": "^0.4.64",
|
|
55
55
|
"@startsimpli/utils": "^0.4.23"
|
|
56
56
|
},
|
|
57
57
|
"peerDependenciesMeta": {
|
|
@@ -98,10 +98,10 @@
|
|
|
98
98
|
"vitest": "^3.0.0",
|
|
99
99
|
"react-native": "0.85.3",
|
|
100
100
|
"react-native-safe-area-context": "~5.7.0",
|
|
101
|
-
"@startsimpli/llm": "0.4.
|
|
102
|
-
"@startsimpli/ui": "0.4.211",
|
|
101
|
+
"@startsimpli/llm": "0.4.33",
|
|
103
102
|
"@startsimpli/ui-native": "0.1.15",
|
|
104
103
|
"@startsimpli/auth": "0.4.64",
|
|
104
|
+
"@startsimpli/ui": "0.4.211",
|
|
105
105
|
"@startsimpli/utils": "0.4.23"
|
|
106
106
|
},
|
|
107
107
|
"scripts": {
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Talk's "What is ENG-141 about?" answered "unanswerable: true" (bd, Todo: tandem-go-assistant): (a) the model put the give-up
|
|
3
|
+
* phrase inside the answer string and it was shown as the answer; (b) a question that names a tracked item by its key had
|
|
4
|
+
* no item words or dates, so no to-do was ever read.
|
|
5
|
+
*/
|
|
6
|
+
import { describe, expect, it } from 'vitest';
|
|
7
|
+
|
|
8
|
+
import { askCorpus } from '../corpus/ask';
|
|
9
|
+
import { itemKeysIn } from '../corpus/ask-items';
|
|
10
|
+
import { isGiveUp } from '../corpus/give-up';
|
|
11
|
+
import { parseAnswerDraft } from '../corpus/llm';
|
|
12
|
+
import { createFixtureCorpusApi, FIXTURE_ORG } from '../corpus/fixtures';
|
|
13
|
+
import type { AnswerDraft, AnswerRequest, Commitment, CorpusLlm } from '../corpus/types';
|
|
14
|
+
|
|
15
|
+
const SCOPE = { orgId: FIXTURE_ORG };
|
|
16
|
+
const NOW = Date.parse('2026-11-11T12:00:00Z');
|
|
17
|
+
const item = (id: string, over: Partial<Commitment>): Commitment => ({
|
|
18
|
+
id, externalId: `commit:${id}`, dedupeKey: id, subtype: 'task', title: `Item ${id}`, detail: '', status: 'open', subjectKey: '', actionKey: '', mentions: [],
|
|
19
|
+
firstSeenAt: '2026-10-01T00:00:00Z', lastSeenAt: null, extractorVersion: 'x', source: 'linear', sourceLabel: 'Linear', scope: SCOPE, ownerSub: 'me', ...over,
|
|
20
|
+
}) as Commitment;
|
|
21
|
+
const ITEMS = [
|
|
22
|
+
item('a', { title: "Don't add the prompt box.", sync: { state: 'synced', key: 'ENG-141', stateName: 'Todo' } }),
|
|
23
|
+
item('b', { title: 'Old finished thing', status: 'done', sync: { state: 'synced', key: 'ENG-9', stateName: 'Done' } }),
|
|
24
|
+
item('c', { title: 'Something else', sync: { state: 'synced', key: 'ENG-1410', stateName: 'Todo' } }),
|
|
25
|
+
];
|
|
26
|
+
const commitments = { listCommitments: async () => ({ count: ITEMS.length, next: null, previous: null, results: ITEMS }) };
|
|
27
|
+
const llm = (calls: AnswerRequest[]): CorpusLlm => ({
|
|
28
|
+
describe: () => ({ provider: 'scripted', model: 's', live: false }),
|
|
29
|
+
async answer(input): Promise<AnswerDraft> { calls.push(input); return { answer: 'It says not to add the prompt box.', citations: [{ documentId: 'item:commit:a' }] }; },
|
|
30
|
+
});
|
|
31
|
+
const ask = (question: string, calls: AnswerRequest[]) =>
|
|
32
|
+
askCorpus({ question, mode: 'ask', scope: SCOPE }, { corpus: createFixtureCorpusApi(), llm: llm(calls), commitments }, { now: NOW });
|
|
33
|
+
|
|
34
|
+
describe('questions that name a tracked item by its key', () => {
|
|
35
|
+
it('reads the keys a question names, case-insensitively, whole keys only', () => {
|
|
36
|
+
expect(itemKeysIn('What is ENG-141 about?')).toEqual(['ENG-141']);
|
|
37
|
+
expect(itemKeysIn('compare eng-141 and TAN-7')).toEqual(['ENG-141', 'TAN-7']);
|
|
38
|
+
expect(itemKeysIn('what happened in 2026-11')).toEqual([]);
|
|
39
|
+
});
|
|
40
|
+
it('hands the model that item, with no item words or dates in the question, and cites it', async () => {
|
|
41
|
+
const calls: AnswerRequest[] = [];
|
|
42
|
+
const res = await ask('What is ENG-141 about?', calls);
|
|
43
|
+
expect(calls).toHaveLength(1);
|
|
44
|
+
expect(JSON.stringify(calls[0])).toContain("Don't add the prompt box.");
|
|
45
|
+
expect(JSON.stringify(calls[0])).not.toContain('Something else');
|
|
46
|
+
expect(res.status).toBe('answered');
|
|
47
|
+
expect(res.citations.map((c) => c.document.id)).toEqual(['item:commit:a']);
|
|
48
|
+
});
|
|
49
|
+
it('finds a finished item by its key too, and never confuses ENG-141 with ENG-1410', async () => {
|
|
50
|
+
const calls: AnswerRequest[] = [];
|
|
51
|
+
await ask('what was eng-9?', calls);
|
|
52
|
+
expect(JSON.stringify(calls[0] ?? {})).toContain('Old finished thing');
|
|
53
|
+
const c2: AnswerRequest[] = [];
|
|
54
|
+
await ask('What is ENG-141 about?', c2);
|
|
55
|
+
expect(JSON.stringify(c2[0])).not.toContain('ENG-1410');
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
describe('a give-up phrase is never shown as an answer', () => {
|
|
60
|
+
it('recognises the bare word, with a value, and the usual non-answers', () => {
|
|
61
|
+
for (const s of ['unanswerable', 'Unanswerable: true', 'unanswerable: true.', ' n/a ', 'unknown', 'null']) expect(isGiveUp(s)).toBe(true);
|
|
62
|
+
});
|
|
63
|
+
it('leaves a real sentence alone', () => {
|
|
64
|
+
for (const s of ['The status is unknown until Friday.', 'It is not unanswerable: see the deck.', 'ENG-141 says not to add the prompt box.']) expect(isGiveUp(s)).toBe(false);
|
|
65
|
+
});
|
|
66
|
+
it('a draft whose answer is the give-up phrase becomes an empty, unanswerable draft', () => {
|
|
67
|
+
expect(parseAnswerDraft('{"answer":"unanswerable: true","citations":[],"unanswerable":false}')).toEqual({ answer: '', citations: [], unanswerable: true });
|
|
68
|
+
expect(parseAnswerDraft('{"answer":"Fine.","citations":[],"unanswerable":false}')?.answer).toBe('Fine.');
|
|
69
|
+
});
|
|
70
|
+
});
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { render, screen, within, waitFor } from '@testing-library/react';
|
|
3
|
+
import userEvent from '@testing-library/user-event';
|
|
4
|
+
import { describe, expect, it, vi } from 'vitest';
|
|
5
|
+
|
|
6
|
+
import { HomeBriefPage, TodayAgendaList } from '../components/pages/home';
|
|
7
|
+
import type { TodayAgenda, AgendaItem } from '../corpus/today-agenda';
|
|
8
|
+
|
|
9
|
+
const item = (o: Partial<AgendaItem> & { id: string }): AgendaItem => ({
|
|
10
|
+
source: 'todo', title: o.id, reason: 'Due today', score: 1,
|
|
11
|
+
action: { kind: 'complete', label: 'Mark done', todoIds: [o.id.replace('todo:', '')] }, ...o,
|
|
12
|
+
} as AgendaItem);
|
|
13
|
+
const agenda = (doNow: AgendaItem[], rest: AgendaItem[] = [], shipped: TodayAgenda['shipped'] = []): TodayAgenda =>
|
|
14
|
+
({ doNow, rest, shipped, total: doNow.length + rest.length, empty: doNow.length + rest.length === 0 });
|
|
15
|
+
const api = (a: TodayAgenda) => ({ load: vi.fn(async () => a), answer: vi.fn(async () => undefined), complete: vi.fn(async () => undefined) });
|
|
16
|
+
|
|
17
|
+
describe('TodayAgendaList', () => {
|
|
18
|
+
it('shows each item with its reason and exactly one action control', async () => {
|
|
19
|
+
const a = agenda([item({ id: 'todo:t1', title: 'Send invoice', reason: 'Overdue since Nov 20' })]);
|
|
20
|
+
render(<TodayAgendaList api={api(a)} />);
|
|
21
|
+
const row = (await screen.findByText('Send invoice')).closest('li')!;
|
|
22
|
+
expect(within(row).getByText('Overdue since Nov 20')).toBeInTheDocument();
|
|
23
|
+
expect(within(row).getAllByRole('button')).toHaveLength(1);
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it('completing a to-do closes it through the api and the row disappears at once', async () => {
|
|
27
|
+
const a = agenda([item({ id: 'todo:t1', title: 'Send invoice', action: { kind: 'complete', label: 'Mark done', todoIds: ['t1', 't2'] } })]);
|
|
28
|
+
const x = api(a);
|
|
29
|
+
render(<TodayAgendaList api={x} />);
|
|
30
|
+
await userEvent.click(await screen.findByRole('button', { name: 'Mark done' }));
|
|
31
|
+
expect(screen.queryByText('Send invoice')).toBeNull();
|
|
32
|
+
expect(x.complete).toHaveBeenCalledWith(['t1', 't2']);
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
it('puts the row back with a plain message when the save fails', async () => {
|
|
36
|
+
const x = api(agenda([item({ id: 'todo:t1', title: 'Send invoice' })]));
|
|
37
|
+
x.complete.mockRejectedValueOnce(new Error('nope'));
|
|
38
|
+
render(<TodayAgendaList api={x} />);
|
|
39
|
+
await userEvent.click(await screen.findByRole('button', { name: 'Mark done' }));
|
|
40
|
+
expect(await screen.findByText('Send invoice')).toBeInTheDocument();
|
|
41
|
+
expect(screen.getByRole('alert').textContent).toMatch(/did not save/i);
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
it('answers a question with its own options, and falls back to Yes / No', async () => {
|
|
45
|
+
const q = (id: string, options: string[]) => item({ id, source: 'decision', title: `Q ${id}`, reason: 'Only you can decide', action: { kind: 'answer', label: 'Choose', questionId: id, options, freeform: false } });
|
|
46
|
+
const x = api(agenda([q('relay:a', ['schedule', 'manual']), q('relay:b', [])]));
|
|
47
|
+
render(<TodayAgendaList api={x} />);
|
|
48
|
+
await userEvent.click(await screen.findByRole('button', { name: 'manual' }));
|
|
49
|
+
expect(x.answer).toHaveBeenCalledWith('relay:a', 'manual');
|
|
50
|
+
expect(screen.getByRole('button', { name: 'Yes' })).toBeInTheDocument();
|
|
51
|
+
expect(screen.getByRole('button', { name: 'No' })).toBeInTheDocument();
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
it('an open question takes a typed answer with one Send button', async () => {
|
|
55
|
+
const x = api(agenda([item({ id: 'relay:c', source: 'decision', title: 'Who owns the site?', reason: 'Waiting on your answer', action: { kind: 'answer', label: 'Answer', questionId: 'relay:c', options: [], freeform: true } })]));
|
|
56
|
+
render(<TodayAgendaList api={x} />);
|
|
57
|
+
await userEvent.type(await screen.findByRole('textbox', { name: /answer/i }), 'Marketing');
|
|
58
|
+
await userEvent.click(screen.getByRole('button', { name: 'Send' }));
|
|
59
|
+
expect(x.answer).toHaveBeenCalledWith('relay:c', 'Marketing');
|
|
60
|
+
expect(screen.queryByText('Who owns the site?')).toBeNull();
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
it('opens a link action as a link', async () => {
|
|
64
|
+
const a = agenda([item({ id: 'draft:d1', source: 'draft', title: 'Reply to Kevin', action: { kind: 'open', label: 'Review and send', href: 'https://mail.example/d1' } })]);
|
|
65
|
+
render(<TodayAgendaList api={api(a)} />);
|
|
66
|
+
expect((await screen.findByRole('link', { name: 'Review and send' })).getAttribute('href')).toBe('https://mail.example/d1');
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
it('keeps the rest collapsed until asked, and lists shipped lines under a quiet heading', async () => {
|
|
70
|
+
const a = agenda([item({ id: 'todo:a', title: 'A' })], [item({ id: 'todo:b', title: 'B' })], [{ id: 's1', text: 'Talk key fixed', at: '2026-12-01T10:00:00Z' }]);
|
|
71
|
+
render(<TodayAgendaList api={api(a)} />);
|
|
72
|
+
await screen.findByText('A');
|
|
73
|
+
expect(screen.queryByText('B')).toBeNull();
|
|
74
|
+
await userEvent.click(screen.getByRole('button', { name: /1 more/ }));
|
|
75
|
+
expect(screen.getByText('B')).toBeInTheDocument();
|
|
76
|
+
expect(screen.getByText('Talk key fixed')).toBeInTheDocument();
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
it('says plainly when nothing is waiting, and when it cannot load', async () => {
|
|
80
|
+
const { unmount } = render(<TodayAgendaList api={api(agenda([]))} />);
|
|
81
|
+
expect(await screen.findByText(/Nothing needs you today/)).toBeInTheDocument();
|
|
82
|
+
unmount();
|
|
83
|
+
render(<TodayAgendaList api={{ ...api(agenda([])), load: vi.fn(async () => { throw new Error('boom'); }) }} />);
|
|
84
|
+
expect(await screen.findByRole('alert')).toBeInTheDocument();
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
describe('HomeBriefPage with an agenda', () => {
|
|
89
|
+
it('shows the agenda as the main list and the brief only as Play and the week, with no second list', async () => {
|
|
90
|
+
const RESULT = { briefingId: 'b1', text: 'Good morning. Three things overdue.', markdown: '## Overdue\n- **Dup**', audioUrl: null, items: [], remaining: 0 } as never;
|
|
91
|
+
render(<HomeBriefPage brief={{ fetch: async () => RESULT, loadAudio: async () => null }} agenda={api(agenda([item({ id: 'todo:t1', title: 'Send invoice' })]))} />);
|
|
92
|
+
expect(await screen.findByText('Send invoice')).toBeInTheDocument();
|
|
93
|
+
await waitFor(() => expect(screen.getByRole('button', { name: 'Play' })).toBeInTheDocument());
|
|
94
|
+
expect(screen.queryByTestId('brief-text')).toBeNull();
|
|
95
|
+
});
|
|
96
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// @vitest-environment node
|
|
2
|
+
/** The Today agenda's server side: build from the real needs-you queue, record an answer so the item leaves (ASK 2). */
|
|
3
|
+
import { describe, expect, it, vi } from 'vitest';
|
|
4
|
+
import { postRelayItems } from '../corpus/notify/relay-items';
|
|
5
|
+
import { answerTodayItem, loadTodayAgenda } from '../corpus/today-agenda-route';
|
|
6
|
+
|
|
7
|
+
const NOW = '2026-12-01T17:00:00Z';
|
|
8
|
+
function tenant() {
|
|
9
|
+
const rows = new Map<string, any>();
|
|
10
|
+
let seq = 0;
|
|
11
|
+
const http = {
|
|
12
|
+
get: vi.fn(async (_p: string, o?: { params?: Record<string, unknown> }) => ({ results: [...rows.values()].filter((r) => r.external_id === o?.params?.external_id__in) })),
|
|
13
|
+
post: vi.fn(async (_p: string, b: any) => { const row = { id: String(++seq), external_id: b.external_id, data: b.data }; rows.set(b.external_id, row); return row; }),
|
|
14
|
+
};
|
|
15
|
+
return { http: http as never, ownerSub: 'me', now: () => Date.parse(NOW), loadTodos: async () => [{ id: 't1', title: 'Send invoice', status: 'open', dueAt: '2026-12-01' }] };
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
describe('today agenda route', () => {
|
|
19
|
+
it('puts a relay question first, then the to-do, and a failing optional source does not blank the list', async () => {
|
|
20
|
+
const deps = { ...tenant(), loadDrafts: async () => { throw new Error('mail down'); } };
|
|
21
|
+
await postRelayItems(deps, { items: [{ id: 'go-live', text: 'CROCHETS: go live with v8?', options: ['yes', 'no'] }] });
|
|
22
|
+
const a = await loadTodayAgenda(deps, { timeZone: 'America/Los_Angeles' });
|
|
23
|
+
expect(a.doNow.map((i) => i.id)).toEqual(['relay:go-live', 'todo:t1']);
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it('answering a question records it, tells the relay, and the item disappears', async () => {
|
|
27
|
+
const deliverRelay = vi.fn(async () => undefined);
|
|
28
|
+
const deps = { ...tenant(), deliverRelay };
|
|
29
|
+
await postRelayItems(deps, { items: [{ id: 'go-live', text: 'CROCHETS: go live with v8?', options: ['yes', 'no'] }] });
|
|
30
|
+
await answerTodayItem(deps, { id: 'relay:go-live', answer: 'yes' });
|
|
31
|
+
expect(deliverRelay).toHaveBeenCalledWith(expect.objectContaining({ id: 'go-live', answer: 'yes' }));
|
|
32
|
+
const a = await loadTodayAgenda(deps, { timeZone: 'America/Los_Angeles' });
|
|
33
|
+
expect(a.doNow.map((i) => i.id)).toEqual(['todo:t1']);
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
it('rejects an answer for an item that is not in the queue (404) and an empty answer (400)', async () => {
|
|
37
|
+
const deps = tenant();
|
|
38
|
+
await expect(answerTodayItem(deps, { id: 'relay:nope', answer: 'yes' })).rejects.toMatchObject({ status: 404 });
|
|
39
|
+
await expect(answerTodayItem(deps, { id: 'relay:nope', answer: ' ' })).rejects.toMatchObject({ status: 400 });
|
|
40
|
+
});
|
|
41
|
+
});
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import { buildTodayAgenda } from '../corpus/today-agenda';
|
|
3
|
+
import type { QueuedItem } from '../corpus/attention/types';
|
|
4
|
+
|
|
5
|
+
const now = Date.parse('2026-12-01T17:00:00Z'); // 09:00 in Los Angeles
|
|
6
|
+
const base = { now, timeZone: 'America/Los_Angeles' };
|
|
7
|
+
const q = (o: Partial<QueuedItem> & { id: string; text: string }): QueuedItem =>
|
|
8
|
+
({ source: 'relay', class: 'needs-answer', importance: 50, ...o }) as QueuedItem;
|
|
9
|
+
|
|
10
|
+
describe('today agenda (ASK 2)', () => {
|
|
11
|
+
it('a fleet line that is a question is his decision, not a blocker; only PR, credential and approval lines are blockers', () => {
|
|
12
|
+
const a = buildTodayAgenda({ ...base, needsYou: [
|
|
13
|
+
q({ id: 'f1', text: 'Tandem sidebar name: "Plan" or "Strategy"?', source: 'fleet' }),
|
|
14
|
+
q({ id: 'f2', text: 'Need your GitHub token for the deploy', source: 'fleet' }),
|
|
15
|
+
] });
|
|
16
|
+
expect(a.doNow.find((i) => i.id === 'f1')!.source).toBe('decision');
|
|
17
|
+
expect(a.doNow.find((i) => i.id === 'f2')!.source).toBe('blocked');
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('a question with no options is yes/no only when it reads as one; otherwise the answer is typed', () => {
|
|
21
|
+
const a = buildTodayAgenda({ ...base, needsYou: [
|
|
22
|
+
q({ id: 'a', text: 'Hard per-task memory limits? yes/no', source: 'fleet' }),
|
|
23
|
+
q({ id: 'b', text: 'Should we ship the pricing page?', source: 'fleet' }),
|
|
24
|
+
q({ id: 'c', text: 'Who owns the debugg.ai site?', source: 'fleet' }),
|
|
25
|
+
] });
|
|
26
|
+
const act = (id: string) => a.doNow.find((i) => i.id === id)!.action as { kind: 'answer'; freeform: boolean };
|
|
27
|
+
expect(act('a').freeform).toBe(false);
|
|
28
|
+
expect(act('b').freeform).toBe(false);
|
|
29
|
+
expect(act('c').freeform).toBe(true);
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
it('ranks his decisions above due to-dos and gives each item a reason and exactly one action', () => {
|
|
33
|
+
const a = buildTodayAgenda({
|
|
34
|
+
...base,
|
|
35
|
+
needsYou: [q({ id: 'relay:r1', text: 'CROCHETS: go live with v8?', options: ['yes', 'no'] })],
|
|
36
|
+
todos: [{ id: 't1', title: 'Send invoice', status: 'open', dueAt: '2026-12-01' }],
|
|
37
|
+
});
|
|
38
|
+
expect(a.doNow.map((i) => i.id)).toEqual(['relay:r1', 'todo:t1']);
|
|
39
|
+
for (const i of a.doNow) {
|
|
40
|
+
expect(i.reason.length).toBeGreaterThan(3);
|
|
41
|
+
expect(i.action.label.length).toBeGreaterThan(1);
|
|
42
|
+
}
|
|
43
|
+
expect(a.doNow[0].action).toMatchObject({ kind: 'answer', options: ['yes', 'no'] });
|
|
44
|
+
expect(a.doNow[1].action).toMatchObject({ kind: 'complete', todoIds: ['t1'] });
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
it('caps do-now at 5 and keeps the rest collapsed, in order', () => {
|
|
48
|
+
const todos = Array.from({ length: 8 }, (_, n) => ({ id: `t${n}`, title: `Task ${n}`, status: 'open', dueAt: '2026-12-01' }));
|
|
49
|
+
const a = buildTodayAgenda({ ...base, todos });
|
|
50
|
+
expect(a.doNow).toHaveLength(5);
|
|
51
|
+
expect(a.rest).toHaveLength(3);
|
|
52
|
+
expect(a.total).toBe(8);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
it('drops done, dropped, undated and future to-dos and answered questions', () => {
|
|
56
|
+
const a = buildTodayAgenda({
|
|
57
|
+
...base,
|
|
58
|
+
todos: [
|
|
59
|
+
{ id: 'a', title: 'Done', status: 'done', dueAt: '2026-11-30' },
|
|
60
|
+
{ id: 'b', title: 'Dropped', status: 'dropped', dueAt: '2026-11-30' },
|
|
61
|
+
{ id: 'c', title: 'Someday', status: 'open' },
|
|
62
|
+
{ id: 'd', title: 'Later', status: 'open', dueAt: '2026-12-09' },
|
|
63
|
+
],
|
|
64
|
+
});
|
|
65
|
+
expect(a.total).toBe(0);
|
|
66
|
+
expect(a.empty).toBe(true);
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
it('collapses a recurring overdue to-do into one line that closes every copy', () => {
|
|
70
|
+
const todos = ['2026-11-20', '2026-11-21', '2026-11-22'].map((d, n) => ({ id: `r${n}`, title: '10 lovable / v0 builders reach out', status: 'open', dueAt: d }));
|
|
71
|
+
const a = buildTodayAgenda({ ...base, todos });
|
|
72
|
+
expect(a.total).toBe(1);
|
|
73
|
+
expect(a.doNow[0].reason).toMatch(/overdue since Nov 20/i);
|
|
74
|
+
expect(a.doNow[0].reason).toMatch(/3 times/);
|
|
75
|
+
expect(a.doNow[0].action).toMatchObject({ kind: 'complete', todoIds: ['r0', 'r1', 'r2'] });
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
it('puts an urgent blocker first and a PR waiting on him ahead of a plain question', () => {
|
|
79
|
+
const a = buildTodayAgenda({
|
|
80
|
+
...base,
|
|
81
|
+
needsYou: [
|
|
82
|
+
q({ id: 'x1', text: 'Which tagline do you prefer?', importance: 30 }),
|
|
83
|
+
q({ id: 'x2', text: 'PR #935 waits for your merge approval', source: 'fleet', importance: 60, link: 'https://github.com/o/r/pull/935' }),
|
|
84
|
+
q({ id: 'x3', text: 'Prod is down', class: 'urgent', importance: 100 }),
|
|
85
|
+
],
|
|
86
|
+
});
|
|
87
|
+
expect(a.doNow.map((i) => i.id)).toEqual(['x3', 'x2', 'x1']);
|
|
88
|
+
expect(a.doNow[1].action).toMatchObject({ kind: 'open', href: 'https://github.com/o/r/pull/935' });
|
|
89
|
+
expect(a.doNow[1].source).toBe('blocked');
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
it('lists drafts waiting to send and the next calendar events with a time reason', () => {
|
|
93
|
+
const a = buildTodayAgenda({
|
|
94
|
+
...base,
|
|
95
|
+
drafts: [{ id: 'd1', title: 'Reply to Kevin', to: 'kevin@example.com', link: 'https://mail.example/d1' }],
|
|
96
|
+
events: [
|
|
97
|
+
{ id: 'e1', title: 'Investor call', startsAt: '2026-12-01T19:00:00Z' },
|
|
98
|
+
{ id: 'e0', title: 'Yesterday standup', startsAt: '2026-11-30T19:00:00Z' },
|
|
99
|
+
],
|
|
100
|
+
});
|
|
101
|
+
const ids = a.doNow.map((i) => i.id);
|
|
102
|
+
expect(ids).toContain('draft:d1');
|
|
103
|
+
expect(ids).toContain('event:e1');
|
|
104
|
+
expect(ids).not.toContain('event:e0');
|
|
105
|
+
expect(a.doNow.find((i) => i.id === 'event:e1')!.reason).toMatch(/11:00 AM/);
|
|
106
|
+
expect(a.doNow.find((i) => i.id === 'draft:d1')!.action).toMatchObject({ kind: 'open', label: 'Review and send' });
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
it('merges a fleet line and a to-do that name the same thing into one item', () => {
|
|
110
|
+
const a = buildTodayAgenda({
|
|
111
|
+
...base,
|
|
112
|
+
needsYou: [q({ id: 'f1', text: 'Send the invoice', source: 'fleet' })],
|
|
113
|
+
todos: [{ id: 't1', title: 'Send the invoice', status: 'open', dueAt: '2026-12-01' }],
|
|
114
|
+
});
|
|
115
|
+
expect(a.total).toBe(1);
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
it('shows what shipped since yesterday, one line each, newest first, capped', () => {
|
|
119
|
+
const a = buildTodayAgenda({
|
|
120
|
+
...base,
|
|
121
|
+
shipped: [
|
|
122
|
+
{ id: 's1', text: 'Needs-you push merged', at: '2026-11-30T20:00:00Z' },
|
|
123
|
+
{ id: 's2', text: 'Old thing', at: '2026-11-20T20:00:00Z' },
|
|
124
|
+
{ id: 's3', text: 'Talk key lookup fixed', at: '2026-12-01T10:00:00Z' },
|
|
125
|
+
],
|
|
126
|
+
});
|
|
127
|
+
expect(a.shipped.map((s) => s.id)).toEqual(['s3', 's1']);
|
|
128
|
+
expect(a.empty).toBe(true); // shipped is a footer, not work
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
it('an optional or on-hold question waits behind a to-do that is due', () => {
|
|
132
|
+
const a = buildTodayAgenda({ ...base,
|
|
133
|
+
needsYou: [q({ id: 'd1', text: 'Search Console numbers (optional)', class: 'digest', importance: 10 })],
|
|
134
|
+
todos: [{ id: 't1', title: 'Send invoice', status: 'open', dueAt: '2026-12-01' }] });
|
|
135
|
+
expect(a.doNow.map((i) => i.id)).toEqual(['todo:t1', 'd1']);
|
|
136
|
+
expect(a.doNow[1].reason).toMatch(/can wait/i);
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
it('is stable for ties (same input, same order)', () => {
|
|
140
|
+
const todos = [{ id: 'b', title: 'B', status: 'open', dueAt: '2026-12-01' }, { id: 'a', title: 'A', status: 'open', dueAt: '2026-12-01' }];
|
|
141
|
+
expect(buildTodayAgenda({ ...base, todos }).doNow.map((i) => i.id)).toEqual(['todo:a', 'todo:b']);
|
|
142
|
+
});
|
|
143
|
+
});
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
/** Email security section of the sending-domain panel (bd startsim-7p3vi.8). */
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, it } from 'vitest';
|
|
4
|
+
import { fireEvent, render, screen, waitFor, within } from '@testing-library/react';
|
|
5
|
+
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|
6
|
+
import { http, HttpResponse } from 'msw';
|
|
7
|
+
import { setupServer } from 'msw/node';
|
|
8
|
+
|
|
9
|
+
import { SendingDomain } from '../components/SendingDomain';
|
|
10
|
+
import { createCommsApi, setApiBase } from '../api/index';
|
|
11
|
+
import type { DmarcReportSummary, EmailAuthDiagnosis } from '../types/index';
|
|
12
|
+
import { BASE, P, SLUG, settings } from './fixtures';
|
|
13
|
+
|
|
14
|
+
let diagnosis: EmailAuthDiagnosis;
|
|
15
|
+
let reports: DmarcReportSummary;
|
|
16
|
+
let connected = false;
|
|
17
|
+
const calls: string[] = [];
|
|
18
|
+
const DNS = `${BASE}/api/v1/foundry/tenants/${SLUG}/dns-connection/`;
|
|
19
|
+
|
|
20
|
+
const server = setupServer(
|
|
21
|
+
http.get(`${P}/settings/`, () =>
|
|
22
|
+
HttpResponse.json(settings({ sending_domain: 'crochets.site', domain_status: 'pending' }))),
|
|
23
|
+
http.get(`${P}/settings/domain/email-auth/`, () => HttpResponse.json(diagnosis)),
|
|
24
|
+
http.get(`${P}/settings/domain/dmarc-reports/`, () => HttpResponse.json(reports)),
|
|
25
|
+
http.get(DNS, () => HttpResponse.json({ provider: 'namecheap', connected, zone_name: 'crochets.site', has_token: connected })),
|
|
26
|
+
http.put(DNS, async ({ request }) => {
|
|
27
|
+
calls.push(`put ${JSON.stringify(await request.json())}`);
|
|
28
|
+
connected = true;
|
|
29
|
+
return HttpResponse.json({ provider: 'namecheap', connected: true, zone_name: 'crochets.site', has_token: true });
|
|
30
|
+
}),
|
|
31
|
+
http.post(`${P}/settings/domain/email-auth/apply/`, () => {
|
|
32
|
+
calls.push('apply');
|
|
33
|
+
return HttpResponse.json({ applied: true, records: ['@', '_dmarc'] });
|
|
34
|
+
}),
|
|
35
|
+
http.post(`${P}/settings/domain/email-auth/rollback/`, () => {
|
|
36
|
+
calls.push('rollback');
|
|
37
|
+
return HttpResponse.json({ applied: false, rolled_back: true, records: ['@'] });
|
|
38
|
+
}),
|
|
39
|
+
);
|
|
40
|
+
beforeAll(() => {
|
|
41
|
+
server.listen({ onUnhandledRequest: 'error' });
|
|
42
|
+
setApiBase(`${BASE}/api/v1`);
|
|
43
|
+
});
|
|
44
|
+
afterEach(() => server.resetHandlers());
|
|
45
|
+
afterAll(() => server.close());
|
|
46
|
+
|
|
47
|
+
function mount() {
|
|
48
|
+
const qc = new QueryClient({ defaultOptions: { queries: { retry: false } } });
|
|
49
|
+
return render(
|
|
50
|
+
<QueryClientProvider client={qc}>
|
|
51
|
+
<SendingDomain api={createCommsApi(SLUG)} />
|
|
52
|
+
</QueryClientProvider>,
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const NO_REPORTS: DmarcReportSummary = {
|
|
57
|
+
days: 30, reports: 0, messages: 0, dmarc_fail: 0, pass_rate: null, last_report_at: null, sources: [],
|
|
58
|
+
};
|
|
59
|
+
beforeEach(() => { reports = NO_REPORTS; connected = false; calls.length = 0; });
|
|
60
|
+
|
|
61
|
+
describe('EmailAuthPanel', () => {
|
|
62
|
+
it('shows each record with its reason and the record to publish', async () => {
|
|
63
|
+
diagnosis = {
|
|
64
|
+
domain: 'crochets.site',
|
|
65
|
+
status: 'missing',
|
|
66
|
+
records: [
|
|
67
|
+
{ purpose: 'spf', type: 'TXT', host: 'crochets.site', status: 'fail', reason: 'SPF does not list mailjet.',
|
|
68
|
+
current: 'v=spf1 ~all', recommended: 'v=spf1 include:spf.mailjet.com ~all' },
|
|
69
|
+
{ purpose: 'dkim', type: 'TXT', host: 'k._domainkey.crochets.site', status: 'ok', reason: 'DKIM ok.',
|
|
70
|
+
current: 'x', recommended: 'x' },
|
|
71
|
+
{ purpose: 'dmarc', type: 'TXT', host: '_dmarc.crochets.site', status: 'missing', reason: 'No DMARC record.',
|
|
72
|
+
current: '', recommended: 'v=DMARC1; p=none' },
|
|
73
|
+
],
|
|
74
|
+
};
|
|
75
|
+
mount();
|
|
76
|
+
const spf = await screen.findByTestId('email-auth-spf');
|
|
77
|
+
expect(within(spf).getByText('Fix')).toBeTruthy();
|
|
78
|
+
expect(within(spf).getByText('v=spf1 include:spf.mailjet.com ~all')).toBeTruthy();
|
|
79
|
+
const dmarc = screen.getByTestId('email-auth-dmarc');
|
|
80
|
+
expect(within(dmarc).getByText('Missing')).toBeTruthy();
|
|
81
|
+
expect(within(dmarc).getByText('v=DMARC1; p=none')).toBeTruthy();
|
|
82
|
+
// A passing record shows no record to publish.
|
|
83
|
+
expect(within(screen.getByTestId('email-auth-dkim')).queryByText('Copy')).toBeNull();
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
it('shows the DMARC report roll-up with failing senders, or says none arrived yet', async () => {
|
|
87
|
+
diagnosis = { domain: 'crochets.site', status: 'ok', records: [] };
|
|
88
|
+
mount();
|
|
89
|
+
expect(await screen.findByText(/No DMARC reports received yet/)).toBeTruthy();
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
it('lists the sources that failed DMARC', async () => {
|
|
93
|
+
diagnosis = { domain: 'crochets.site', status: 'ok', records: [] };
|
|
94
|
+
reports = {
|
|
95
|
+
days: 30, reports: 2, messages: 20, dmarc_fail: 5, pass_rate: 0.75, last_report_at: null,
|
|
96
|
+
sources: [{ source_ip: '9.9.9.9', messages: 5, dmarc_fail: 5, reporters: ['google.com'] }],
|
|
97
|
+
};
|
|
98
|
+
mount();
|
|
99
|
+
const box = await screen.findByTestId('dmarc-reports');
|
|
100
|
+
expect(within(box).getByText(/75% passed DMARC/)).toBeTruthy();
|
|
101
|
+
expect(within(box).getByText(/9\.9\.9\.9/)).toBeTruthy();
|
|
102
|
+
});
|
|
103
|
+
it('offers the next DMARC step with the record when the last 30 days are clean', async () => {
|
|
104
|
+
diagnosis = {
|
|
105
|
+
domain: 'crochets.site', status: 'ok', records: [],
|
|
106
|
+
ladder: { policy: 'none', next: 'quarantine', ready: true, recommended: 'v=DMARC1; p=quarantine',
|
|
107
|
+
evidence: { days: 30, reports: 4, messages: 120, dmarc_fail: 0 } },
|
|
108
|
+
};
|
|
109
|
+
mount();
|
|
110
|
+
const box = await screen.findByTestId('dmarc-ladder');
|
|
111
|
+
expect(within(box).getByText(/move to p=quarantine/)).toBeTruthy();
|
|
112
|
+
expect(within(box).getByText('v=DMARC1; p=quarantine')).toBeTruthy();
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
it('says why the next DMARC step is not ready, and shows nothing at p=reject', async () => {
|
|
116
|
+
diagnosis = {
|
|
117
|
+
domain: 'crochets.site', status: 'ok', records: [],
|
|
118
|
+
ladder: { policy: 'none', next: 'quarantine', ready: false, recommended: '',
|
|
119
|
+
evidence: { days: 30, reports: 4, messages: 120, dmarc_fail: 7 } },
|
|
120
|
+
};
|
|
121
|
+
const { unmount } = mount();
|
|
122
|
+
expect(await screen.findByText(/7 of 120 messages failed DMARC/)).toBeTruthy();
|
|
123
|
+
unmount();
|
|
124
|
+
diagnosis = {
|
|
125
|
+
domain: 'crochets.site', status: 'ok', records: [],
|
|
126
|
+
ladder: { policy: 'reject', next: null, ready: false, recommended: '',
|
|
127
|
+
evidence: { days: 30, reports: 4, messages: 120, dmarc_fail: 0 } },
|
|
128
|
+
};
|
|
129
|
+
mount();
|
|
130
|
+
expect(await screen.findByText(/No DMARC reports received yet/)).toBeTruthy();
|
|
131
|
+
expect(screen.queryByTestId('dmarc-ladder')).toBeNull();
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
const FIXABLE: EmailAuthDiagnosis = {
|
|
135
|
+
domain: 'crochets.site', status: 'missing',
|
|
136
|
+
records: [{ purpose: 'dmarc', type: 'TXT', host: '_dmarc.crochets.site', status: 'missing',
|
|
137
|
+
reason: 'No DMARC record.', current: '', recommended: 'v=DMARC1; p=none' }],
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
it('connects Namecheap with the foundry domain as the zone, never echoing the key', async () => {
|
|
141
|
+
diagnosis = FIXABLE;
|
|
142
|
+
mount();
|
|
143
|
+
fireEvent.click(await screen.findByText('Connect Namecheap to publish these for me'));
|
|
144
|
+
fireEvent.change(screen.getByLabelText('API user'), { target: { value: 'qosha' } });
|
|
145
|
+
fireEvent.change(screen.getByLabelText('API key'), { target: { value: 'k-123' } });
|
|
146
|
+
fireEvent.change(screen.getByLabelText('Allowlisted IP'), { target: { value: '1.2.3.4' } });
|
|
147
|
+
fireEvent.click(screen.getByText('Connect'));
|
|
148
|
+
await screen.findByText('Publish these records');
|
|
149
|
+
expect(JSON.parse(calls[0].slice(4))).toEqual({
|
|
150
|
+
provider: 'namecheap', api_user: 'qosha', api_key: 'k-123', client_ip: '1.2.3.4', zone_name: 'crochets.site',
|
|
151
|
+
});
|
|
152
|
+
expect(screen.queryByDisplayValue('k-123')).toBeNull();
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
it('publishes the records and can undo, once connected', async () => {
|
|
156
|
+
diagnosis = FIXABLE;
|
|
157
|
+
connected = true;
|
|
158
|
+
mount();
|
|
159
|
+
fireEvent.click(await screen.findByText('Publish these records'));
|
|
160
|
+
await screen.findByText(/Published: @, _dmarc/);
|
|
161
|
+
fireEvent.click(screen.getByText('Undo last publish'));
|
|
162
|
+
await screen.findByText(/Restored the zone/);
|
|
163
|
+
await waitFor(() => expect(calls).toEqual(['apply', 'rollback']));
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
it('offers no publish or connect when every record is fine', async () => {
|
|
167
|
+
diagnosis = { domain: 'crochets.site', status: 'ok', records: [] };
|
|
168
|
+
mount();
|
|
169
|
+
await screen.findByText(/No DMARC reports received yet/);
|
|
170
|
+
expect(screen.queryByText('Publish these records')).toBeNull();
|
|
171
|
+
expect(screen.queryByText('Connect Namecheap to publish these for me')).toBeNull();
|
|
172
|
+
});
|
|
173
|
+
});
|
package/src/comms/api/comms.ts
CHANGED
|
@@ -20,6 +20,11 @@ import type {
|
|
|
20
20
|
AssetsQuery,
|
|
21
21
|
CommsAsset,
|
|
22
22
|
CommsSettings,
|
|
23
|
+
DmarcReportSummary,
|
|
24
|
+
DnsConnection,
|
|
25
|
+
EmailAuthChange,
|
|
26
|
+
EmailAuthDiagnosis,
|
|
27
|
+
NamecheapConnectInput,
|
|
23
28
|
CommsSettingsPatch,
|
|
24
29
|
AudienceSegments,
|
|
25
30
|
AudienceSpec,
|
|
@@ -52,6 +57,15 @@ export interface CommsApi {
|
|
|
52
57
|
updateSettings(patch: CommsSettingsPatch): Promise<CommsSettings>;
|
|
53
58
|
connectDomain(domain: string): Promise<CommsSettings>;
|
|
54
59
|
checkDomain(): Promise<CommsSettings>;
|
|
60
|
+
/** Live SPF / DKIM / DMARC diagnosis of the sending domain. Read-only. */
|
|
61
|
+
getEmailAuth(): Promise<EmailAuthDiagnosis>;
|
|
62
|
+
/** Publish the records the diagnosis asks for through the connected registrar (snapshot kept for undo). */
|
|
63
|
+
applyEmailAuth(): Promise<EmailAuthChange>;
|
|
64
|
+
/** Restore the zone as it was before the last apply. */
|
|
65
|
+
rollbackEmailAuth(): Promise<EmailAuthChange>;
|
|
66
|
+
getDnsConnection(): Promise<DnsConnection>;
|
|
67
|
+
connectNamecheap(input: NamecheapConnectInput): Promise<DnsConnection>;
|
|
68
|
+
getDmarcReports(): Promise<DmarcReportSummary>;
|
|
55
69
|
|
|
56
70
|
// programs
|
|
57
71
|
listPrograms(): Promise<CommsProgram[]>;
|
|
@@ -118,6 +132,13 @@ export function createCommsApi(slug: string): CommsApi {
|
|
|
118
132
|
updateSettings: (patch) => request(`${P}/settings/`, { method: 'PATCH', body: patch }),
|
|
119
133
|
connectDomain: (domain) => request(`${P}/settings/domain/`, { method: 'POST', body: { domain } }),
|
|
120
134
|
checkDomain: () => request(`${P}/settings/domain/check/`, { method: 'POST' }),
|
|
135
|
+
getEmailAuth: () => request(`${P}/settings/domain/email-auth/`),
|
|
136
|
+
applyEmailAuth: () => request(`${P}/settings/domain/email-auth/apply/`, { method: 'POST' }),
|
|
137
|
+
rollbackEmailAuth: () => request(`${P}/settings/domain/email-auth/rollback/`, { method: 'POST' }),
|
|
138
|
+
getDnsConnection: () => request(`/foundry/tenants/${seg(slug)}/dns-connection/?provider=namecheap`),
|
|
139
|
+
connectNamecheap: (input) =>
|
|
140
|
+
request(`/foundry/tenants/${seg(slug)}/dns-connection/`, { method: 'PUT', body: { provider: 'namecheap', ...input } }),
|
|
141
|
+
getDmarcReports: () => request(`${P}/settings/domain/dmarc-reports/`),
|
|
121
142
|
|
|
122
143
|
listPrograms: () => request(`${P}/programs/`),
|
|
123
144
|
getProgram: (key) => request(`${P}/programs/${seg(key)}/`),
|