recess-cli 3.2.0 → 3.3.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/dist/cli.js CHANGED
@@ -3022,6 +3022,9 @@ export async function executeRecessCommand(argv, options = {}) {
3022
3022
  ...(userId ? { userId } : {}),
3023
3023
  ...(id ? { id } : {}),
3024
3024
  limit,
3025
+ ...(hasFlag(parsed, "include-archived")
3026
+ ? { includeArchived: "true" }
3027
+ : {}),
3025
3028
  ...(flagString(parsed, "cursor")
3026
3029
  ? { cursor: flagString(parsed, "cursor") }
3027
3030
  : {}),
@@ -3029,6 +3032,53 @@ export async function executeRecessCommand(argv, options = {}) {
3029
3032
  },
3030
3033
  }));
3031
3034
  }
3035
+ if ((area === "recipients" &&
3036
+ ["archive", "unarchive", "remove-schedule", "add-schedule"].includes(action)) ||
3037
+ (area === "payruns" && action === "remove-account")) {
3038
+ const accountId = area === "payruns"
3039
+ ? flagString(parsed, "recipient", { required: true })
3040
+ : positional(parsed, 3, "account ID");
3041
+ const payRunId = area === "payruns" ? positional(parsed, 3, "payrun ID") : undefined;
3042
+ const scheduleId = action.endsWith("schedule")
3043
+ ? flagString(parsed, "schedule", { required: true })
3044
+ : undefined;
3045
+ const account = unwrap(await api.client.GET("/admin/payout/recipient/", {
3046
+ params: { query: { id: accountId, includeArchived: "true" } },
3047
+ })).recipients[0];
3048
+ const effects = action === "archive"
3049
+ ? "Archive payout account, end all schedules and cancel all draft/review invoices. Stops new Recess accruals; preserves payment history and the guide login."
3050
+ : action === "unarchive"
3051
+ ? "Unarchive payout account. Does not restore schedules or canceled invoices; add a schedule separately to resume payroll."
3052
+ : action === "remove-schedule"
3053
+ ? "Remove account from recurring schedule and cancel its draft/review invoices for that schedule. Other schedules and payment history are preserved."
3054
+ : action === "add-schedule"
3055
+ ? "Add active payout account to recurring schedule. Future payroll cycles will accrue compensation in Recess."
3056
+ : "Remove account from this payroll cycle and cancel its draft/review invoices. Future cycles are unchanged; regeneration will not re-add this account.";
3057
+ return writeCommand(parsed, {
3058
+ action: effects,
3059
+ target: {
3060
+ accountId,
3061
+ ...(payRunId ? { payRunId } : {}),
3062
+ ...(scheduleId ? { scheduleId } : {}),
3063
+ },
3064
+ request: { action },
3065
+ details: { accountName: account.name, user: account.user },
3066
+ }, async () => {
3067
+ if (action === "archive")
3068
+ return unwrap(await api.client.DELETE("/admin/payout/recipient/{accountId}", {
3069
+ params: { path: { accountId } },
3070
+ }));
3071
+ if (action === "unarchive")
3072
+ return unwrap(await api.client.POST("/admin/payout/recipient/{accountId}/unarchive", { params: { path: { accountId } } }));
3073
+ if (action === "add-schedule")
3074
+ return unwrap(await api.client.POST("/admin/payout/payrun/add-account/", {
3075
+ body: { accountId, scheduleId: scheduleId },
3076
+ }));
3077
+ if (action === "remove-schedule")
3078
+ return unwrap(await api.client.DELETE("/admin/payout/schedule/{targetId}/recipient/{accountId}", { params: { path: { accountId, targetId: scheduleId } } }));
3079
+ return unwrap(await api.client.DELETE("/admin/payout/cycle/{targetId}/recipient/{accountId}", { params: { path: { accountId, targetId: payRunId } } }));
3080
+ });
3081
+ }
3032
3082
  if (area === "invoices" && action === "list") {
3033
3083
  const payRunId = flagString(parsed, "payrun");
3034
3084
  const accountId = flagString(parsed, "recipient");
package/dist/help.js CHANGED
@@ -130,10 +130,15 @@ Usage:
130
130
  recess [--json] billing cancel-subscription --subscription <id>
131
131
  [--immediate] [--reason TEXT] [--restore] [--confirm]
132
132
  recess [--json] payout payruns list [--status A,B] [--schedule <id>]
133
- recess [--json] payout recipients list [--search <name>] [--user <id>] [--id <id>]
133
+ recess [--json] payout recipients list [--search <name>] [--user <id>] [--id <id>] [--include-archived]
134
134
  [--limit 20] [--cursor <id>]
135
135
  recess [--json] payout invoices list [--payrun <id>] [--recipient <account-id>]
136
136
  [--user <id>] [--status A,B] (at least one filter)
137
+ recess [--json] payout recipients archive <account-id> [--confirm]
138
+ recess [--json] payout recipients unarchive <account-id> [--confirm]
139
+ recess [--json] payout recipients remove-schedule <account-id> --schedule <id> [--confirm]
140
+ recess [--json] payout recipients add-schedule <account-id> --schedule <id> [--confirm]
141
+ recess [--json] payout payruns remove-account <payrun-id> --recipient <account-id> [--confirm]
137
142
  recess [--json] payout invoices get <invoice-id>
138
143
  recess [--json] payout invoices set-status <invoice-id>
139
144
  --status IN_REVIEW|OPEN|PAID|CANCELED [--send-email] [--confirm]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "recess-cli",
3
- "version": "3.2.0",
3
+ "version": "3.3.0",
4
4
  "description": "Safe Recess administration and family AI tools from the command line.",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {