@agenzo/merchant-cli 0.8.7 → 0.8.9

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.js CHANGED
@@ -861,6 +861,22 @@ var PromptEngine = class {
861
861
  }
862
862
  };
863
863
 
864
+ // src/member.ts
865
+ var MEMBER_OPTION_DESCRIPTION = "End-user member id this order is attributed to (optional, max 128 chars). On write it is stored on the order; on list it filters to that member only (orders without a member_id are excluded).";
866
+ var MEMBER_FLAG_SCHEMA = {
867
+ type: "string",
868
+ required: false,
869
+ source: "session",
870
+ description: MEMBER_OPTION_DESCRIPTION,
871
+ constraints: "1-128 characters; any character set. Omit to keep the order unattributed."
872
+ };
873
+ function memberIdOf(opts) {
874
+ const raw = opts.member;
875
+ if (typeof raw !== "string") return void 0;
876
+ const trimmed = raw.trim();
877
+ return trimmed.length > 0 ? trimmed : void 0;
878
+ }
879
+
864
880
  // src/ride-elife/watch.ts
865
881
  var TERMINAL_STATUSES = /* @__PURE__ */ new Set([
866
882
  "At destination",
@@ -1026,6 +1042,12 @@ var bookSchema = {
1026
1042
  required: "conditional",
1027
1043
  description: "Required when billing_mode=pay_per_call (a PAID payment order). Forbidden when billing_mode=monthly_settlement"
1028
1044
  },
1045
+ "payment-method-id": {
1046
+ type: "string",
1047
+ required: false,
1048
+ description: "Bound payment method id to charge (pay_per_call only). Opaque id from `token payment-methods list`; ignored for monthly_settlement"
1049
+ },
1050
+ member: MEMBER_FLAG_SCHEMA,
1029
1051
  "passenger-name": { type: "string", required: true, description: "Passenger full name" },
1030
1052
  "passenger-phone": { type: "string", required: true, description: "Passenger phone in E.164 format (e.g. +14155551234)" },
1031
1053
  "passenger-email": { type: "string", required: true, description: "Passenger email (required by eLife for booking)" },
@@ -1168,6 +1190,7 @@ var listOrdersSchema = {
1168
1190
  flags: {
1169
1191
  status: { type: "string", required: false, description: "Filter by ride status (case-sensitive server casing)" },
1170
1192
  "order-type": { type: "string", required: false, description: "Filter by order type (e.g. realtime / airport)" },
1193
+ member: MEMBER_FLAG_SCHEMA,
1171
1194
  page: { type: "int", required: false, default: 1, description: "Page number", constraints: ">= 1" },
1172
1195
  "page-size": { type: "int", required: false, default: 20, description: "Items per page", constraints: ">= 1" }
1173
1196
  },
@@ -1177,6 +1200,7 @@ var listOrdersSchema = {
1177
1200
  description: "List of ride orders (slim list-item shape)",
1178
1201
  items: {
1179
1202
  order_id: { type: "string", description: "Internal order id" },
1203
+ member_id: { type: "string|null", description: "End-user this order is attributed to; null when unattributed" },
1180
1204
  ride_id: { type: "string", description: "Ride id (same as ride_id from book)" },
1181
1205
  status: { type: "string", description: "Current ride status" },
1182
1206
  vehicle_class: { type: "string", description: "Vehicle class" },
@@ -1345,6 +1369,7 @@ var hotelCreateOrderSchema = {
1345
1369
  "contact-phone": { type: "string", required: true, description: "Booking contact phone number", constraints: "Digits; collect country code separately in --contact-country-code" },
1346
1370
  "contact-country-code": { type: "string", required: false, default: "86", description: "Phone country calling code without '+'" },
1347
1371
  "contact-email": { type: "string", required: false, description: "Booking contact email" },
1372
+ member: MEMBER_FLAG_SCHEMA,
1348
1373
  "arrive-time": { type: "string", required: false, description: "Expected arrival time", constraints: "HH:mm, hotel local time" },
1349
1374
  "special-requests": { type: "string", required: false, description: "Free-text special requests (non-binding)" },
1350
1375
  tips: { type: "string", required: false, description: "FCG \u5BA2\u6237\u81EA\u6D4B\u70B95 \u63D0\u793A\u4FE1\u606F: the chosen quote rate's tips (tips[].tipsDetails[]) as a JSON array [{title,text}], captured at booking. Stored on the order for the order-detail page only; platform-local, not sent upstream", constraints: "JSON array of {title (string, optional), text (string, optional)}; else PARAM_INVALID" },
@@ -1622,6 +1647,7 @@ var hotelListOrdersSchema = {
1622
1647
  description: "List the developer's hotel orders with optional status filtering and pagination",
1623
1648
  flags: {
1624
1649
  status: { type: "string", required: false, description: "Filter by order status (e.g. PROCESSING / CONFIRMED / CANCELLED / COMPLETED). Omitted entirely when absent (all statuses)" },
1650
+ member: MEMBER_FLAG_SCHEMA,
1625
1651
  page: { type: "int", required: false, default: 1, description: "Page number", constraints: ">= 1" },
1626
1652
  "page-size": { type: "int", required: false, default: 20, description: "Items per page", constraints: ">= 1 (platform caps at 100 server-side)" }
1627
1653
  },
@@ -1631,6 +1657,7 @@ var hotelListOrdersSchema = {
1631
1657
  description: "List of hotel orders (slim list-item shape).",
1632
1658
  items: {
1633
1659
  order_id: { type: "string", description: "Our order reference." },
1660
+ member_id: { type: "string|null", description: "End-user this order is attributed to; null when unattributed" },
1634
1661
  fc_order_code: { type: "string", description: "Supplier order reference." },
1635
1662
  status: { type: "string", description: "Current order status (string)." },
1636
1663
  provider: { type: "string", description: "Service provider ('redaug')." },
@@ -1908,6 +1935,7 @@ var unifiedOrdersListSchema = {
1908
1935
  description: 'List orders across ALL providers (ride + hotel) in one call. Use this for generic "my orders" / "order history" requests. Prefer ride-elife/hotel-redaug list-orders when the user names a specific business.',
1909
1936
  flags: {
1910
1937
  "order-type": { type: "string", required: false, description: "Filter by provider: ride | hotel" },
1938
+ member: MEMBER_FLAG_SCHEMA,
1911
1939
  status: { type: "string", required: false, description: "Filter by NORMALIZED status (NOT the domain-specific status): PENDING | CONFIRMED | COMPLETED | CANCELLED | FAILED" },
1912
1940
  page: { type: "int", required: false, default: 1, description: "Page number", constraints: ">= 1" },
1913
1941
  "page-size": { type: "int", required: false, default: 20, description: "Items per page", constraints: ">= 1" }
@@ -1918,6 +1946,7 @@ var unifiedOrdersListSchema = {
1918
1946
  description: "Slim cross-provider order-index items. For business-specific fields (vehicle_class, hotel_name, etc.), call `orders get --order-id <id>` or the domain-specific `get`.",
1919
1947
  items: {
1920
1948
  order_id: { type: "string", description: "Order id (rio_... for ride, hho_... for hotel). Pass to `orders get`." },
1949
+ member_id: { type: "string|null", description: "End-user this order is attributed to; null when unattributed" },
1921
1950
  order_type: { type: "string", description: "'ride' or 'hotel'" },
1922
1951
  status: { type: "string", description: "Normalized status: PENDING | CONFIRMED | COMPLETED | CANCELLED | FAILED" },
1923
1952
  amount: { type: "float|null", description: "Order amount in DECIMAL currency units (NOT cents)" },
@@ -2055,6 +2084,7 @@ var flightCreateOrderSchema = flightSchema(
2055
2084
  "contact-phone": { type: "string", required: true, description: "Contact phone." },
2056
2085
  "contact-email": { type: "string", required: true, description: "Contact email." },
2057
2086
  passengers: { type: "json", required: true, description: 'JSON array of passengers. gender/id_type are STRINGS ("1"/"2"). child/infant require adult_passenger_name.' },
2087
+ member: MEMBER_FLAG_SCHEMA,
2058
2088
  "idempotency-key": { type: "string", required: true, description: "Forwarded verbatim as the Idempotency-Key header." }
2059
2089
  },
2060
2090
  {
@@ -2122,10 +2152,11 @@ var flightListOrdersSchema = flightSchema(
2122
2152
  "List the developer's flight orders (local read, no upstream call).",
2123
2153
  {
2124
2154
  status: { type: "string", required: false, description: "Optional status filter." },
2155
+ member: MEMBER_FLAG_SCHEMA,
2125
2156
  page: { type: "int", required: false, default: 1, description: "1-based page." },
2126
2157
  "page-size": { type: "int", required: false, default: 20, description: "Items per page (1-100)." }
2127
2158
  },
2128
- { orders: { type: "array", description: "Flight order summaries." }, total: { type: "int", description: "Total count." } },
2159
+ { orders: { type: "array", description: "Flight order summaries; each item carries member_id (null when unattributed)." }, total: { type: "int", description: "Total count." } },
2129
2160
  { command: "agenzo-merchant-cli flight-flink list-orders", output_summary: "Paged flight orders." }
2130
2161
  );
2131
2162
  var flightChangeSearchSchema = flightSchema(
@@ -2416,7 +2447,10 @@ function formatBook(data) {
2416
2447
  return Formatter.keyValue(lines);
2417
2448
  }
2418
2449
  function registerBookCommand(parent, deps) {
2419
- const cmd = parent.command("book").description("Book a ride using a quote_id returned by quote").option("--api-key <key>", "API Key for authentication (X-Api-Key)").option("--quote-id <id>", "Quote id from `ride-elife quote`").option("--vehicle-class <class>", "Chosen vehicle class").option("--price-amount <amount>", "Fare in decimal currency units (not cents)").option("--price-currency <currency>", "Currency code (default USD)").option("--payment-order-id <id>", "Paid payment order id (pay_per_call mode only)").option("--passenger-name <name>", "Passenger full name").option("--passenger-phone <phone>", "Passenger phone").option("--passenger-email <email>", "Passenger email").option("--luggage-count <n>", "Luggage count").option("--special-requests <text>", "Free-text special requests").option("--pickup-lat <lat>", "Pickup latitude").option("--pickup-lng <lng>", "Pickup longitude").option("--pickup-name <name>", "Pickup location name").option("--dropoff-lat <lat>", "Dropoff latitude").option("--dropoff-lng <lng>", "Dropoff longitude").option("--dropoff-name <name>", "Dropoff location name").option("--pickup-time <time>", 'Pickup time: epoch seconds, or "now"').option("--meet-and-greet", "Enable meet & greet service").option("--meet-and-greet-price <amount>", "Meet & greet surcharge").option("--welcome-sign <text>", "Welcome sign text").option("--child-seat-count <n>", "Number of child seats needed (0-5)").option("--infant-seat-count <n>", "Number of infant seats needed (0-5)").option("--toddler-seat-count <n>", "Number of toddler seats needed (0-5)").option("--arrival-flight-no <no>", "Arrival flight number").option("--arrival-airline <airline>", "Arrival airline").option("--departure-flight-no <no>", "Departure flight number").option("--departure-airline <airline>", "Departure airline").option(
2450
+ const cmd = parent.command("book").description("Book a ride using a quote_id returned by quote").option("--api-key <key>", "API Key for authentication (X-Api-Key)").option("--quote-id <id>", "Quote id from `ride-elife quote`").option("--vehicle-class <class>", "Chosen vehicle class").option("--price-amount <amount>", "Fare in decimal currency units (not cents)").option("--price-currency <currency>", "Currency code (default USD)").option("--payment-order-id <id>", "Paid payment order id (pay_per_call mode only)").option(
2451
+ "--payment-method-id <id>",
2452
+ "Bound payment method id to charge (pay_per_call mode only)"
2453
+ ).option("--passenger-name <name>", "Passenger full name").option("--passenger-phone <phone>", "Passenger phone").option("--passenger-email <email>", "Passenger email").option("--luggage-count <n>", "Luggage count").option("--special-requests <text>", "Free-text special requests").option("--pickup-lat <lat>", "Pickup latitude").option("--pickup-lng <lng>", "Pickup longitude").option("--pickup-name <name>", "Pickup location name").option("--dropoff-lat <lat>", "Dropoff latitude").option("--dropoff-lng <lng>", "Dropoff longitude").option("--dropoff-name <name>", "Dropoff location name").option("--pickup-time <time>", 'Pickup time: epoch seconds, or "now"').option("--meet-and-greet", "Enable meet & greet service").option("--meet-and-greet-price <amount>", "Meet & greet surcharge").option("--welcome-sign <text>", "Welcome sign text").option("--child-seat-count <n>", "Number of child seats needed (0-5)").option("--infant-seat-count <n>", "Number of infant seats needed (0-5)").option("--toddler-seat-count <n>", "Number of toddler seats needed (0-5)").option("--arrival-flight-no <no>", "Arrival flight number").option("--arrival-airline <airline>", "Arrival airline").option("--departure-flight-no <no>", "Departure flight number").option("--departure-airline <airline>", "Departure airline").option("--member <id>", MEMBER_OPTION_DESCRIPTION).option(
2420
2454
  "--idempotency-key <key>",
2421
2455
  "Idempotency key forwarded verbatim as the Idempotency-Key header"
2422
2456
  );
@@ -2439,6 +2473,9 @@ function registerBookCommand(parent, deps) {
2439
2473
  passenger_phone: phone(opts.passengerPhone, "passenger-phone")
2440
2474
  };
2441
2475
  if (opts.paymentOrderId) body.payment_order_id = opts.paymentOrderId;
2476
+ if (opts.paymentMethodId) body.payment_method_id = opts.paymentMethodId;
2477
+ const member = memberIdOf(opts);
2478
+ if (member !== void 0) body.member_id = member;
2442
2479
  if (opts.passengerEmail) body.passenger_email = opts.passengerEmail;
2443
2480
  if (opts.luggageCount !== void 0) {
2444
2481
  body.luggage_count = num2(opts.luggageCount, "luggage-count");
@@ -2721,7 +2758,7 @@ function formatOrders(data) {
2721
2758
  ${Formatter.keyValue(summary)}`;
2722
2759
  }
2723
2760
  function registerListOrdersCommand(parent, deps) {
2724
- const cmd = parent.command("list-orders").description("List previously placed ride orders").option("--api-key <key>", "API Key for authentication (X-Api-Key)").option("--page <page>", "Page number", DEFAULT_PAGE).option("--page-size <size>", "Page size", DEFAULT_PAGE_SIZE).option("--status <status>", "Filter by order status").option("--order-type <type>", "Filter by order type");
2761
+ const cmd = parent.command("list-orders").description("List previously placed ride orders").option("--api-key <key>", "API Key for authentication (X-Api-Key)").option("--page <page>", "Page number", DEFAULT_PAGE).option("--page-size <size>", "Page size", DEFAULT_PAGE_SIZE).option("--status <status>", "Filter by order status").option("--order-type <type>", "Filter by order type").option("--member <id>", MEMBER_OPTION_DESCRIPTION);
2725
2762
  attachSchemaHelp(cmd, listOrdersSchema);
2726
2763
  cmd.action(async () => {
2727
2764
  const opts = cmd.optsWithGlobals();
@@ -2736,6 +2773,8 @@ function registerListOrdersCommand(parent, deps) {
2736
2773
  };
2737
2774
  if (opts.status !== void 0) params.status = opts.status;
2738
2775
  if (opts.orderType !== void 0) params.order_type = opts.orderType;
2776
+ const member = memberIdOf(opts);
2777
+ if (member !== void 0) params.member_id = member;
2739
2778
  const spinner = format === "json" ? null : createSpinner("Fetching orders...");
2740
2779
  const result = await deps.apiClient.get(
2741
2780
  "/ride/orders",
@@ -3114,7 +3153,7 @@ function formatOrders2(data) {
3114
3153
  ${Formatter.keyValue(summary)}`;
3115
3154
  }
3116
3155
  function registerOrdersListCommand(parent, deps) {
3117
- const cmd = parent.command("list").description("List orders across ALL providers (ride + hotel), with optional type/status filters").option("--api-key <key>", "API Key for authentication (X-Api-Key)").option("--order-type <type>", "Filter by order type: ride | hotel").option("--status <status>", "Filter by normalized status: PENDING | CONFIRMED | COMPLETED | CANCELLED | FAILED").option("--page <page>", "Page number", DEFAULT_PAGE2).option("--page-size <size>", "Page size", DEFAULT_PAGE_SIZE2);
3156
+ const cmd = parent.command("list").description("List orders across ALL providers (ride + hotel), with optional type/status filters").option("--api-key <key>", "API Key for authentication (X-Api-Key)").option("--order-type <type>", "Filter by order type: ride | hotel").option("--status <status>", "Filter by normalized status: PENDING | CONFIRMED | COMPLETED | CANCELLED | FAILED").option("--page <page>", "Page number", DEFAULT_PAGE2).option("--page-size <size>", "Page size", DEFAULT_PAGE_SIZE2).option("--member <id>", MEMBER_OPTION_DESCRIPTION);
3118
3157
  attachSchemaHelp(cmd, unifiedOrdersListSchema);
3119
3158
  cmd.action(async () => {
3120
3159
  const opts = cmd.optsWithGlobals();
@@ -3129,6 +3168,8 @@ function registerOrdersListCommand(parent, deps) {
3129
3168
  };
3130
3169
  if (opts.orderType !== void 0) params.order_type = opts.orderType;
3131
3170
  if (opts.status !== void 0) params.status = opts.status;
3171
+ const member = memberIdOf(opts);
3172
+ if (member !== void 0) params.member_id = member;
3132
3173
  const spinner = format === "json" ? null : createSpinner("Fetching orders...");
3133
3174
  const result = await deps.apiClient.get(
3134
3175
  "/orders",
@@ -3541,7 +3582,7 @@ function registerHotelCreateOrderCommand(parent, deps) {
3541
3582
  ).option(
3542
3583
  "--payment-token-id <id>",
3543
3584
  "UPI Agent Pay: payment token id from an already-completed UnionPay network-token capture. When set, the platform skips EVO preauth/capture and only locks the order + records this credential (funds already charged)."
3544
- ).option(
3585
+ ).option("--member <id>", MEMBER_OPTION_DESCRIPTION).option(
3545
3586
  "--idempotency-key <key>",
3546
3587
  "Idempotency key forwarded verbatim as the Idempotency-Key header"
3547
3588
  );
@@ -3592,6 +3633,8 @@ function registerHotelCreateOrderCommand(parent, deps) {
3592
3633
  if (opts.bedType !== void 0) body.bed_type = opts.bedType;
3593
3634
  if (opts.paymentMethodId !== void 0) body.payment_method_id = opts.paymentMethodId;
3594
3635
  if (opts.paymentTokenId !== void 0) body.payment_token_id = opts.paymentTokenId;
3636
+ const member = memberIdOf(opts);
3637
+ if (member !== void 0) body.member_id = member;
3595
3638
  if (!isYes) {
3596
3639
  const chargeNote = opts.paymentTokenId !== void 0 ? "Payment has already been captured via UPI Agent Pay; this only locks the room." : "This locks the rate but does NOT charge anything yet.";
3597
3640
  const confirmed = await confirm3({
@@ -4286,7 +4329,7 @@ function formatOrders3(data) {
4286
4329
  ${Formatter.keyValue(summary)}`;
4287
4330
  }
4288
4331
  function registerHotelListOrdersCommand(parent, deps) {
4289
- const cmd = parent.command("list-orders").description("List the developer's hotel orders with optional status filtering and pagination").option("--api-key <key>", "API Key for authentication (X-Api-Key)").option("--status <status>", "Filter by order status (omitted entirely when absent \u2192 all statuses)").option("--page <page>", "Page number", DEFAULT_PAGE3).option("--page-size <size>", "Page size", DEFAULT_PAGE_SIZE3);
4332
+ const cmd = parent.command("list-orders").description("List the developer's hotel orders with optional status filtering and pagination").option("--api-key <key>", "API Key for authentication (X-Api-Key)").option("--status <status>", "Filter by order status (omitted entirely when absent \u2192 all statuses)").option("--page <page>", "Page number", DEFAULT_PAGE3).option("--page-size <size>", "Page size", DEFAULT_PAGE_SIZE3).option("--member <id>", MEMBER_OPTION_DESCRIPTION);
4290
4333
  attachSchemaHelp(cmd, hotelListOrdersSchema);
4291
4334
  cmd.action(async () => {
4292
4335
  const opts = cmd.optsWithGlobals();
@@ -4300,6 +4343,8 @@ function registerHotelListOrdersCommand(parent, deps) {
4300
4343
  page_size: positiveInt4(opts.pageSize ?? DEFAULT_PAGE_SIZE3, "page-size")
4301
4344
  };
4302
4345
  if (opts.status !== void 0) params.status = opts.status;
4346
+ const member = memberIdOf(opts);
4347
+ if (member !== void 0) params.member_id = member;
4303
4348
  const spinner = format === "json" ? null : createSpinner("Fetching orders...");
4304
4349
  const result = await deps.apiClient.get(
4305
4350
  "/hotel/orders",
@@ -5115,7 +5160,7 @@ function registerVerifyCommand(parent, deps) {
5115
5160
  // src/flight-flink/create-order.ts
5116
5161
  import { confirm as confirm6 } from "@inquirer/prompts";
5117
5162
  function registerCreateOrderCommand(parent, deps) {
5118
- const cmd = parent.command("create-order").description("Create a flight order without charging (locks the fare, await payment)").option("--api-key <key>", "API Key for authentication (X-Api-Key)").option("--product-token <token>", "Authoritative rate token from verify").option("--total-amount <amount>", "Verified total price in decimal units").option("--currency <currency>", "ISO 4217 currency code").option("--trip-type <n>", "1/2/3", "1").option("--contact-name <name>", "Booking contact name").option("--contact-region <code>", "Contact phone country code (no '+')").option("--contact-phone <phone>", "Booking contact phone").option("--contact-email <email>", "Booking contact email").option("--passengers <json>", "JSON array of passengers (gender/id_type are strings)").option("--payment-method-id <id>", "Optional bound-card id (pay_per_call only)").option("--payment-token-id <id>", "Optional UPI network-token id (unionpay charge path)").option("--idempotency-key <key>", "Forwarded verbatim as the Idempotency-Key header");
5163
+ const cmd = parent.command("create-order").description("Create a flight order without charging (locks the fare, await payment)").option("--api-key <key>", "API Key for authentication (X-Api-Key)").option("--product-token <token>", "Authoritative rate token from verify").option("--total-amount <amount>", "Verified total price in decimal units").option("--currency <currency>", "ISO 4217 currency code").option("--trip-type <n>", "1/2/3", "1").option("--contact-name <name>", "Booking contact name").option("--contact-region <code>", "Contact phone country code (no '+')").option("--contact-phone <phone>", "Booking contact phone").option("--contact-email <email>", "Booking contact email").option("--passengers <json>", "JSON array of passengers (gender/id_type are strings)").option("--payment-method-id <id>", "Optional bound-card id (pay_per_call only)").option("--payment-token-id <id>", "Optional UPI network-token id (unionpay charge path)").option("--member <id>", MEMBER_OPTION_DESCRIPTION).option("--idempotency-key <key>", "Forwarded verbatim as the Idempotency-Key header");
5119
5164
  attachSchemaHelp(cmd, flightCreateOrderSchema);
5120
5165
  cmd.action(async () => {
5121
5166
  const opts = cmd.optsWithGlobals();
@@ -5138,6 +5183,8 @@ function registerCreateOrderCommand(parent, deps) {
5138
5183
  };
5139
5184
  if (opts.paymentMethodId !== void 0) body.payment_method_id = opts.paymentMethodId;
5140
5185
  if (opts.paymentTokenId !== void 0) body.payment_token_id = opts.paymentTokenId;
5186
+ const member = memberIdOf(opts);
5187
+ if (member !== void 0) body.member_id = member;
5141
5188
  if (!isYes) {
5142
5189
  const ok = await confirm6({
5143
5190
  message: `Create this flight order for ${totalAmount} ${currency}? This locks the fare but does NOT charge yet.`,
@@ -5318,7 +5365,7 @@ function registerCancelOrderCommand(parent, deps) {
5318
5365
 
5319
5366
  // src/flight-flink/list-orders.ts
5320
5367
  function registerListOrdersCommand2(parent, deps) {
5321
- const cmd = parent.command("list-orders").description("List the developer's flight orders (local read, no upstream call)").option("--api-key <key>", "API Key for authentication (X-Api-Key)").option("--status <status>", "Optional status filter").option("--page <n>", "Page (1-based)", "1").option("--page-size <n>", "Items per page (1-100)", "20");
5368
+ const cmd = parent.command("list-orders").description("List the developer's flight orders (local read, no upstream call)").option("--api-key <key>", "API Key for authentication (X-Api-Key)").option("--status <status>", "Optional status filter").option("--page <n>", "Page (1-based)", "1").option("--page-size <n>", "Items per page (1-100)", "20").option("--member <id>", MEMBER_OPTION_DESCRIPTION);
5322
5369
  attachSchemaHelp(cmd, flightListOrdersSchema);
5323
5370
  cmd.action(async () => {
5324
5371
  const opts = cmd.optsWithGlobals();
@@ -5326,6 +5373,8 @@ function registerListOrdersCommand2(parent, deps) {
5326
5373
  const apiKey = await resolveApiKey(opts.apiKey);
5327
5374
  const params = new URLSearchParams();
5328
5375
  if (opts.status !== void 0) params.set("status", opts.status);
5376
+ const member = memberIdOf(opts);
5377
+ if (member !== void 0) params.set("member_id", member);
5329
5378
  params.set("page", String(num8(opts.page, "page")));
5330
5379
  params.set("page_size", String(num8(opts.pageSize, "page-size")));
5331
5380
  const spinner = format === "json" ? null : createSpinner("Fetching flight orders...");