@infaris/calendar-cli 0.13.0 → 0.14.0
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/README.md +5 -0
- package/dist/crm-admin.js +16 -0
- package/dist/crm-index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -568,8 +568,13 @@ infaris-crm merge R-DUPLICATE --into R-LEADING --yes
|
|
|
568
568
|
infaris-crm contact-delete RELATION CONTACT_ID --yes
|
|
569
569
|
infaris-crm note RELATION --method EMAIL --at 2026-10-05T12:00:00+02:00 --source mail:ID --body-file n.md
|
|
570
570
|
infaris-crm tidy [--apply] [--include-archived]
|
|
571
|
+
infaris-crm delete RELATION [--yes] # 0.14: without --yes only lists what blocks deletion
|
|
571
572
|
```
|
|
572
573
|
|
|
574
|
+
`delete` permanently removes an archived customer and applies the same rules as Support's Verwijderen:
|
|
575
|
+
it refuses anything with accounts, organizations, Stripe, quotes, invoices, contacts, history,
|
|
576
|
+
sync traces or Calendar tasks, so in practice it only removes empty test records.
|
|
577
|
+
|
|
573
578
|
`create` answers 409 with the similar customers when the e-mail, website or name
|
|
574
579
|
already exists; `--allow-duplicate` creates anyway and `--dry-run` only reports. `list` hides
|
|
575
580
|
archived customers unless `--include-archived` or `--status` asks for them. `kind` is
|
package/dist/crm-admin.js
CHANGED
|
@@ -120,6 +120,22 @@ export function registerAdminCommands(program) {
|
|
|
120
120
|
throw new Error("Repeat with --yes to delete the contact");
|
|
121
121
|
output(await crmFetch(`/relations/${encodeURIComponent(customer)}/contacts/${encodeURIComponent(contactId)}`, { method: "DELETE" }));
|
|
122
122
|
});
|
|
123
|
+
program
|
|
124
|
+
.command("delete <customer>")
|
|
125
|
+
.description("Permanently delete an archived customer without links or history. Without --yes only reports what blocks it")
|
|
126
|
+
.option("--yes", "Delete for real")
|
|
127
|
+
.action(async (customer, opts) => {
|
|
128
|
+
const path = `/relations/${encodeURIComponent(customer)}`;
|
|
129
|
+
if (!opts.yes) {
|
|
130
|
+
output(await crmFetch(`${path}?dryRun=1`, { method: "DELETE" }));
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
output(await crmFetch(path, {
|
|
134
|
+
method: "DELETE",
|
|
135
|
+
headers: { "content-type": "application/json" },
|
|
136
|
+
body: JSON.stringify({ confirm: customer }),
|
|
137
|
+
}));
|
|
138
|
+
});
|
|
123
139
|
program
|
|
124
140
|
.command("tidy")
|
|
125
141
|
.description("Clean imported company names (line breaks, trailing (BV)/(VOF) moved to the legal name). Dry run unless --apply")
|
package/dist/crm-index.js
CHANGED
|
@@ -10,7 +10,7 @@ import { createTask, addTaskAttachment, listTeamMembers, listTasks, } from "./ap
|
|
|
10
10
|
import { resolveAttendeeIds } from "./selectors.js";
|
|
11
11
|
const program = new Command()
|
|
12
12
|
.name("infaris-crm")
|
|
13
|
-
.version("0.
|
|
13
|
+
.version("0.14.0")
|
|
14
14
|
.description("Customer dossiers, contact people, contact history and quotes. Shares infaris-calendar login.");
|
|
15
15
|
function output(value) {
|
|
16
16
|
process.stdout.write(`${JSON.stringify(value, null, 2)}\n`);
|
package/dist/index.js
CHANGED
|
@@ -25,7 +25,7 @@ const program = new Command();
|
|
|
25
25
|
program
|
|
26
26
|
.name("infaris-calendar")
|
|
27
27
|
.description("Calendar CLI: agenda, tasks, mail drafts, and the urenstaat (hours).")
|
|
28
|
-
.version("0.
|
|
28
|
+
.version("0.14.0");
|
|
29
29
|
const loginCmd = program
|
|
30
30
|
.command("login")
|
|
31
31
|
.description("Sign in with Infaris in your browser and store a token")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@infaris/calendar-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Command line interface for Calendar by Infaris: log in once on your device, read your agenda, manage work tasks, and fill the urenstaat from tasks, commits and PRs.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|