@ted-galago/wave-cli 0.1.11 → 0.1.14

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/index.cjs CHANGED
@@ -3043,11 +3043,44 @@ var import_zod7 = require("zod");
3043
3043
  var idSchema6 = import_zod7.z.string().min(1);
3044
3044
  var createHelp3 = buildDataJsonHelp("member", "create") ?? 'JSON object for member or {"member": {...}}';
3045
3045
  var updateHelp3 = buildDataJsonHelp("member", "update") ?? 'JSON object for member or {"member": {...}}';
3046
+ function parseStrictBooleanOption(value, optionName) {
3047
+ if (typeof value === "boolean") {
3048
+ return value;
3049
+ }
3050
+ if (typeof value === "string") {
3051
+ const lowered = value.trim().toLowerCase();
3052
+ if (lowered === "true") {
3053
+ return true;
3054
+ }
3055
+ if (lowered === "false") {
3056
+ return false;
3057
+ }
3058
+ }
3059
+ throw new CliError({
3060
+ message: `Invalid ${optionName} value. Use true or false.`,
3061
+ kind: "invalid_args",
3062
+ status: 400,
3063
+ exitCode: EXIT_CODES.invalidArgs,
3064
+ details: {
3065
+ option: optionName,
3066
+ value,
3067
+ allowed: ["true", "false"]
3068
+ }
3069
+ });
3070
+ }
3046
3071
  function registerMemberCommands(program) {
3047
3072
  const members = program.command("members").description("Member operations");
3048
- members.command("list").option("--page <page>").option("--per <per>").action(async (opts, cmd) => {
3073
+ members.command("list").option("--page <page>").option("--per <per>").option(
3074
+ "--include-coaches <includeCoaches>",
3075
+ "Include linked coach members. Defaults to false; omitted/false returns organization members only."
3076
+ ).option(
3077
+ "--include-disabled <includeDisabled>",
3078
+ "Include deactivated members. Defaults to false; omitted/false returns active members only."
3079
+ ).action(async (opts, cmd) => {
3049
3080
  const context = await resolveCommandContext(cmd.optsWithGlobals());
3050
3081
  const organizationId = resolveOrganizationId(context.organizationId);
3082
+ const includeCoaches = opts.includeCoaches === void 0 ? void 0 : parseStrictBooleanOption(opts.includeCoaches, "--include-coaches");
3083
+ const includeDisabled = opts.includeDisabled === void 0 ? void 0 : parseStrictBooleanOption(opts.includeDisabled, "--include-disabled");
3051
3084
  await runGraphqlQueryCommand({
3052
3085
  command: "members.list",
3053
3086
  runtimeOptions: context.runtimeOptions,
@@ -3055,7 +3088,9 @@ function registerMemberCommands(program) {
3055
3088
  variables: normalizeGraphqlVariables2({
3056
3089
  organization_id: organizationId,
3057
3090
  page: opts.page,
3058
- per: opts.per
3091
+ per: opts.per,
3092
+ include_coaches: includeCoaches,
3093
+ include_disabled: includeDisabled
3059
3094
  }),
3060
3095
  isList: true
3061
3096
  });
package/dist/index.js CHANGED
@@ -3042,11 +3042,44 @@ import { z as z7 } from "zod";
3042
3042
  var idSchema6 = z7.string().min(1);
3043
3043
  var createHelp3 = buildDataJsonHelp("member", "create") ?? 'JSON object for member or {"member": {...}}';
3044
3044
  var updateHelp3 = buildDataJsonHelp("member", "update") ?? 'JSON object for member or {"member": {...}}';
3045
+ function parseStrictBooleanOption(value, optionName) {
3046
+ if (typeof value === "boolean") {
3047
+ return value;
3048
+ }
3049
+ if (typeof value === "string") {
3050
+ const lowered = value.trim().toLowerCase();
3051
+ if (lowered === "true") {
3052
+ return true;
3053
+ }
3054
+ if (lowered === "false") {
3055
+ return false;
3056
+ }
3057
+ }
3058
+ throw new CliError({
3059
+ message: `Invalid ${optionName} value. Use true or false.`,
3060
+ kind: "invalid_args",
3061
+ status: 400,
3062
+ exitCode: EXIT_CODES.invalidArgs,
3063
+ details: {
3064
+ option: optionName,
3065
+ value,
3066
+ allowed: ["true", "false"]
3067
+ }
3068
+ });
3069
+ }
3045
3070
  function registerMemberCommands(program) {
3046
3071
  const members = program.command("members").description("Member operations");
3047
- members.command("list").option("--page <page>").option("--per <per>").action(async (opts, cmd) => {
3072
+ members.command("list").option("--page <page>").option("--per <per>").option(
3073
+ "--include-coaches <includeCoaches>",
3074
+ "Include linked coach members. Defaults to false; omitted/false returns organization members only."
3075
+ ).option(
3076
+ "--include-disabled <includeDisabled>",
3077
+ "Include deactivated members. Defaults to false; omitted/false returns active members only."
3078
+ ).action(async (opts, cmd) => {
3048
3079
  const context = await resolveCommandContext(cmd.optsWithGlobals());
3049
3080
  const organizationId = resolveOrganizationId(context.organizationId);
3081
+ const includeCoaches = opts.includeCoaches === void 0 ? void 0 : parseStrictBooleanOption(opts.includeCoaches, "--include-coaches");
3082
+ const includeDisabled = opts.includeDisabled === void 0 ? void 0 : parseStrictBooleanOption(opts.includeDisabled, "--include-disabled");
3050
3083
  await runGraphqlQueryCommand({
3051
3084
  command: "members.list",
3052
3085
  runtimeOptions: context.runtimeOptions,
@@ -3054,7 +3087,9 @@ function registerMemberCommands(program) {
3054
3087
  variables: normalizeGraphqlVariables2({
3055
3088
  organization_id: organizationId,
3056
3089
  page: opts.page,
3057
- per: opts.per
3090
+ per: opts.per,
3091
+ include_coaches: includeCoaches,
3092
+ include_disabled: includeDisabled
3058
3093
  }),
3059
3094
  isList: true
3060
3095
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ted-galago/wave-cli",
3
- "version": "0.1.11",
3
+ "version": "0.1.14",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "wave": "dist/index.js"