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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,21 @@ All notable changes to the Inkbox SDK, CLI, and skills live here.
Versions move in lockstep across `@inkbox/sdk` (TypeScript), `inkbox`
(Python), `@inkbox/cli`, and `inkbox` (Rust, crates.io).

## 0.5.5 — Action-only contact-rule updates

### Changed

- Version bumped to 0.5.5 across `@inkbox/sdk` (TypeScript), `inkbox` (Python), `@inkbox/cli`, and `inkbox` (Rust). The CLI depends on `@inkbox/sdk` `^0.5.5`.
- Contact-rule updates now require an allow/block `action`.

### Removed

- **Source-breaking:** identity updates and contact-rule updates no longer accept lifecycle status. The CLI likewise removes identity/contact-rule `--status` flags. Remove those arguments and flags before upgrading.

### Compatibility

- Response models continue to parse existing `paused` rows for backward compatibility.

## 0.5.4 — Dedicated outbound iMessage groups

### Added
Expand Down
11 changes: 11 additions & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## 0.5.5 — Action-only contact-rule updates

### Changed

- Contact-rule update commands now require `--action`.
- CLI version moved in lockstep with `@inkbox/sdk` 0.5.5 and depends on `^0.5.5`.

### Removed

- Identity and contact-rule update commands no longer accept lifecycle `--status`.

## 0.5.4 — Dedicated outbound iMessage groups

### Added
Expand Down
3 changes: 1 addition & 2 deletions cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ inkbox identity update <handle> # Update an identity
--display-name <name> # New display name ("" to clear)
--description <text> # New description ("" to clear)
--clear-description # Explicit null (mutually exclusive with --description)
--status <status> # active or paused
--imessage-enabled <bool> # Toggle iMessage reachability (true/false)
--imessage-filter-mode <mode> # whitelist or blacklist (admin API key required)
inkbox identity refresh <handle> # Re-fetch identity from API
Expand Down Expand Up @@ -332,7 +331,7 @@ inkbox imessage contact-rule list -i <handle> # Allow/block rules for the ide
inkbox imessage contact-rule create -i <handle> # Add a rule
--action <action> # 'allow' or 'block'
--match-target <number> # Phone number to match (E.164)
inkbox imessage contact-rule update <rule-id> -i <handle> # Change action/status (admin key)
inkbox imessage contact-rule update <rule-id> -i <handle> --action allow|block
inkbox imessage contact-rule delete <rule-id> -i <handle> # Delete a rule (admin key)
inkbox imessage contact-rule list-all # Org-wide rule list (admin key)
--agent-identity-id <id> # Narrow to one identity
Expand Down
8 changes: 4 additions & 4 deletions cli/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@inkbox/cli",
"version": "0.5.4",
"version": "0.5.5",
"description": "CLI for the Inkbox API",
"license": "MIT",
"type": "module",
Expand All @@ -18,7 +18,7 @@
"prepublishOnly": "npm run build"
},
"dependencies": {
"@inkbox/sdk": "^0.5.4",
"@inkbox/sdk": "^0.5.5",
"commander": "^13.0.0",
"undici": "^7.28.0"
},
Expand Down
2 changes: 1 addition & 1 deletion cli/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Inkbox } from "@inkbox/sdk";
import type { Command } from "commander";

// Keep in sync with package.json "version".
export const CLI_VERSION = "0.5.4";
export const CLI_VERSION = "0.5.5";

export interface GlobalOpts {
apiKey?: string;
Expand Down
32 changes: 9 additions & 23 deletions cli/src/commands/identity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import type {
MailRuleMatchType,
PhoneRuleAction,
PhoneRuleMatchType,
ContactRuleStatus,
} from "@inkbox/sdk";
import { parseTotpUri } from "@inkbox/sdk";

Expand Down Expand Up @@ -193,7 +192,7 @@ function registerIdentityMailRuleCommands(parent: Command): void {

rules
.command("create <handle>")
.description("Create a mail contact rule (always starts active; use `update` to pause)")
.description("Create a mail allow or block contact rule")
.requiredOption("--action <action>", "allow or block")
.requiredOption("--match-type <type>", "exact_email or domain")
.requiredOption("--match-target <value>", "Address or domain to match")
Expand All @@ -216,21 +215,19 @@ function registerIdentityMailRuleCommands(parent: Command): void {

rules
.command("update <handle> <rule-id>")
.description("Update action and/or status on a mail rule (admin-only)")
.option("--action <action>", "allow or block")
.option("--status <status>", "active or paused")
.description("Update the action on a mail rule (admin-only)")
.requiredOption("--action <action>", "allow or block")
.action(
withErrorHandler(async function (
this: Command,
handle: string,
ruleId: string,
cmdOpts: { action?: string; status?: string },
cmdOpts: { action: string },
) {
const opts = getGlobalOpts(this);
const inkbox = createClient(opts);
const rule = await inkbox.mailIdentityContactRules.update(handle, ruleId, {
action: cmdOpts.action as MailRuleAction | undefined,
status: cmdOpts.status as ContactRuleStatus | undefined,
action: cmdOpts.action as MailRuleAction,
});
output(rule as unknown as Record<string, unknown>, { json: !!opts.json });
}),
Expand Down Expand Up @@ -348,21 +345,19 @@ function registerIdentityPhoneRuleCommands(parent: Command): void {

rules
.command("update <handle> <rule-id>")
.description("Update action and/or status on a phone rule (admin-only)")
.option("--action <action>", "allow or block")
.option("--status <status>", "active or paused")
.description("Update the action on a phone rule (admin-only)")
.requiredOption("--action <action>", "allow or block")
.action(
withErrorHandler(async function (
this: Command,
handle: string,
ruleId: string,
cmdOpts: { action?: string; status?: string },
cmdOpts: { action: string },
) {
const opts = getGlobalOpts(this);
const inkbox = createClient(opts);
const rule = await inkbox.phoneIdentityContactRules.update(handle, ruleId, {
action: cmdOpts.action as PhoneRuleAction | undefined,
status: cmdOpts.status as ContactRuleStatus | undefined,
action: cmdOpts.action as PhoneRuleAction,
});
output(rule as unknown as Record<string, unknown>, { json: !!opts.json });
}),
Expand Down Expand Up @@ -609,7 +604,6 @@ export function registerIdentityCommands(program: Command): void {
.option("--imessage-filter-mode <mode>", "iMessage contact-rule mode: whitelist or blacklist (admin-only)")
.option("--mail-filter-mode <mode>", "Mail contact-rule mode: whitelist or blacklist (admin-only)")
.option("--phone-filter-mode <mode>", "Phone contact-rule mode: whitelist or blacklist (admin-only; identity must have a phone number)")
.option("--status <status>", "active or paused")
.action(
withErrorHandler(async function (
this: Command,
Expand All @@ -623,7 +617,6 @@ export function registerIdentityCommands(program: Command): void {
imessageFilterMode?: string;
mailFilterMode?: string;
phoneFilterMode?: string;
status?: string;
},
) {
if (cmdOpts.description !== undefined && cmdOpts.clearDescription) {
Expand All @@ -641,9 +634,6 @@ export function registerIdentityCommands(program: Command): void {
throw new Error(`${flag} must be 'whitelist' or 'blacklist'`);
}
}
if (cmdOpts.status !== undefined && cmdOpts.status !== "active" && cmdOpts.status !== "paused") {
throw new Error("--status must be 'active' or 'paused'");
}
const opts = getGlobalOpts(this);
const inkbox = createClient(opts);
const id = await inkbox.getIdentity(handle);
Expand All @@ -655,7 +645,6 @@ export function registerIdentityCommands(program: Command): void {
imessageFilterMode?: "whitelist" | "blacklist";
mailFilterMode?: "whitelist" | "blacklist";
phoneFilterMode?: "whitelist" | "blacklist";
status?: "active" | "paused";
} = {};
if (cmdOpts.newHandle !== undefined) updateOpts.newHandle = cmdOpts.newHandle;
if (cmdOpts.displayName !== undefined) {
Expand All @@ -678,9 +667,6 @@ export function registerIdentityCommands(program: Command): void {
if (cmdOpts.phoneFilterMode !== undefined) {
updateOpts.phoneFilterMode = cmdOpts.phoneFilterMode as "whitelist" | "blacklist";
}
if (cmdOpts.status !== undefined) {
updateOpts.status = cmdOpts.status as "active" | "paused";
}
await id.update(updateOpts);
console.log(`Updated identity '${handle}'.`);
}),
Expand Down
15 changes: 4 additions & 11 deletions cli/src/commands/imessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,31 +168,24 @@ function registerContactRuleCommands(parent: Command): void {

rule
.command("update <rule-id>")
.description("Update an iMessage contact rule's action or status (admin-only)")
.description("Update an iMessage contact rule's action (admin-only)")
.requiredOption("-i, --identity <handle>", "Agent identity handle")
.option("--action <action>", "'allow' or 'block'")
.option("--status <status>", "'active' or 'paused'")
.requiredOption("--action <action>", "'allow' or 'block'")
.action(
withErrorHandler(async function (
this: Command,
ruleId: string,
cmdOpts: { identity: string; action?: string; status?: string },
cmdOpts: { identity: string; action: string },
) {
if (cmdOpts.action !== undefined && cmdOpts.action !== "allow" && cmdOpts.action !== "block") {
throw new Error("--action must be 'allow' or 'block'");
}
if (cmdOpts.status !== undefined && cmdOpts.status !== "active" && cmdOpts.status !== "paused") {
throw new Error("--status must be 'active' or 'paused'");
}
const opts = getGlobalOpts(this);
const inkbox = createClient(opts);
const row = await inkbox.imessageContactRules.update(
cmdOpts.identity,
ruleId,
{
action: cmdOpts.action as never,
status: cmdOpts.status as never,
},
{ action: cmdOpts.action as never },
);
output(row, { json: !!opts.json });
}),
Expand Down
13 changes: 5 additions & 8 deletions cli/src/commands/mailbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
FilterMode,
MailRuleAction,
MailRuleMatchType,
ContactRuleStatus,
} from "@inkbox/sdk";
import type { Mailbox } from "@inkbox/sdk";
import { createClient, getGlobalOpts, resolveBaseUrl } from "../client.js";
Expand Down Expand Up @@ -222,7 +221,7 @@ function registerMailboxRulesCommands(parent: Command): void {

rules
.command("create")
.description("Create a rule (always starts active; use `update` to pause)")
.description("Create an allow or block rule")
.requiredOption("--mailbox <email>", "Mailbox email address")
.requiredOption("--action <action>", "allow or block")
.requiredOption("--match-type <type>", "exact_email or domain")
Expand Down Expand Up @@ -250,21 +249,19 @@ function registerMailboxRulesCommands(parent: Command): void {

rules
.command("update <rule-id>")
.description("Update action and/or status on a rule (admin-only)")
.description("Update the action on a rule (admin-only)")
.requiredOption("--mailbox <email>", "Mailbox email address")
.option("--action <action>", "allow or block")
.option("--status <status>", "active or paused")
.requiredOption("--action <action>", "allow or block")
.action(
withErrorHandler(async function (
this: Command,
ruleId: string,
cmdOpts: { mailbox: string; action?: string; status?: string },
cmdOpts: { mailbox: string; action: string },
) {
const opts = getGlobalOpts(this);
const inkbox = createClient(opts);
const rule = await inkbox.mailContactRules.update(cmdOpts.mailbox, ruleId, {
action: cmdOpts.action as MailRuleAction | undefined,
status: cmdOpts.status as ContactRuleStatus | undefined,
action: cmdOpts.action as MailRuleAction,
});
output(rule as unknown as Record<string, unknown>, { json: !!opts.json });
}),
Expand Down
13 changes: 5 additions & 8 deletions cli/src/commands/number.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Command } from "commander";
import {
ContactRuleStatus,
FilterMode,
PhoneRuleAction,
PhoneRuleMatchType,
Expand Down Expand Up @@ -111,7 +110,7 @@ function registerNumberRulesCommands(parent: Command): void {

rules
.command("create")
.description("Create a rule (always starts active; use `update` to pause)")
.description("Create an allow or block rule")
.requiredOption("--number <id>", "Phone number id")
.requiredOption("--action <action>", "allow or block")
.requiredOption("--match-target <value>", "Phone number to match (E.164)")
Expand Down Expand Up @@ -139,21 +138,19 @@ function registerNumberRulesCommands(parent: Command): void {

rules
.command("update <rule-id>")
.description("Update action and/or status on a rule (admin-only)")
.description("Update the action on a rule (admin-only)")
.requiredOption("--number <id>", "Phone number id")
.option("--action <action>", "allow or block")
.option("--status <status>", "active or paused")
.requiredOption("--action <action>", "allow or block")
.action(
withErrorHandler(async function (
this: Command,
ruleId: string,
cmdOpts: { number: string; action?: string; status?: string },
cmdOpts: { number: string; action: string },
) {
const opts = getGlobalOpts(this);
const inkbox = createClient(opts);
const rule = await inkbox.phoneContactRules.update(cmdOpts.number, ruleId, {
action: cmdOpts.action as PhoneRuleAction | undefined,
status: cmdOpts.status as ContactRuleStatus | undefined,
action: cmdOpts.action as PhoneRuleAction,
});
output(rule as unknown as Record<string, unknown>, { json: !!opts.json });
}),
Expand Down
14 changes: 14 additions & 0 deletions sdk/python/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## 0.5.5 — Action-only contact-rule updates

### Changed

- Contact-rule update methods now require `action`.

### Removed

- **Source-breaking:** identity update methods and contact-rule update methods no longer accept lifecycle `status`. Remove those keyword arguments before upgrading.

### Compatibility

- Response models continue to parse existing `paused` rows.

## 0.5.4 — Dedicated outbound iMessage groups

### Added
Expand Down
3 changes: 1 addition & 2 deletions sdk/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,8 @@ identity.refresh() # re-fetch channels from API
# List all identities for your org
all_identities = inkbox.list_identities()

# Update handle, display name, description, status. For description,
# Update handle, display name, and description. For description,
# pass None to clear and omit the kwarg to leave untouched.
identity.update(status="paused")
identity.update(new_handle="sales-bot-v2")
identity.update(display_name="New Name", description="New blurb")
identity.update(description=None) # clear
Expand Down
Loading
Loading