@debugbundle/cli 1.27.0 → 1.28.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.
Files changed (2) hide show
  1. package/dist/main.cjs +29 -10
  2. package/package.json +1 -1
package/dist/main.cjs CHANGED
@@ -50858,8 +50858,9 @@ var reserved = /* @__PURE__ */ new Set([
50858
50858
  "SYSTEM",
50859
50859
  "TERMS"
50860
50860
  ]);
50861
- var CreatorCodeSchema = external_exports.string().trim().regex(/^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$/).toUpperCase().min(3).max(24).regex(/^[A-Z0-9]+(?:-[A-Z0-9]+)*$/).refine(
50862
- (code) => !legacyCode.test(code) && !reserved.has(code) && !code.startsWith("DEBUGBUNDLE"),
50861
+ var PromotionCodeSchema = external_exports.string().trim().regex(/^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$/).toUpperCase().min(3).max(24).regex(/^[A-Z0-9]+(?:-[A-Z0-9]+)*$/).refine((code) => !reserved.has(code) && !code.startsWith("DEBUGBUNDLE"), "reserved_code");
50862
+ var CreatorCodeSchema = PromotionCodeSchema.refine(
50863
+ (code) => !legacyCode.test(code),
50863
50864
  "reserved_code"
50864
50865
  );
50865
50866
  var PublicOfferCodeSchema = external_exports.string().trim().regex(/^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$/).toUpperCase().max(24).regex(/^[A-Z0-9]+(?:-[A-Z0-9]+)*$/).min(3);
@@ -50912,6 +50913,9 @@ var ProgrammeDraftSchema = ProgrammeVersionSchema.pick({
50912
50913
  name: true,
50913
50914
  public_description: true,
50914
50915
  policy: true
50916
+ }).extend({ promotion_code: PromotionCodeSchema.optional() }).refine((draft) => draft.promotion_code === void 0 || draft.policy.kind === "promotion", {
50917
+ message: "promotion_code_requires_promotion",
50918
+ path: ["promotion_code"]
50915
50919
  });
50916
50920
  var CreatorProgrammeSchema = external_exports.object({
50917
50921
  partner_id: external_exports.uuid(),
@@ -51239,7 +51243,12 @@ var OfferPerformanceReportSchema = external_exports.object({
51239
51243
 
51240
51244
  // ../../packages/referrals/src/offer-inventory-contracts.ts
51241
51245
  var page = { limit: external_exports.number().int().min(1).max(100).default(25), before: external_exports.uuid().optional() };
51242
- var OfferCodeInventoryQuerySchema = external_exports.object({ ...page, code: PublicOfferCodeSchema.optional(), partner_id: external_exports.uuid().optional() }).strict();
51246
+ var OfferCodeInventoryQuerySchema = external_exports.object({
51247
+ ...page,
51248
+ code: PublicOfferCodeSchema.optional(),
51249
+ partner_id: external_exports.uuid().optional(),
51250
+ version_id: external_exports.uuid().optional()
51251
+ }).strict();
51243
51252
  var OfferClaimInventoryQuerySchema = external_exports.object({
51244
51253
  ...page,
51245
51254
  code: PublicOfferCodeSchema.optional(),
@@ -51828,7 +51837,7 @@ var OFFER_OPERATIONS = {
51828
51837
  draft: {
51829
51838
  method: "POST",
51830
51839
  path: "/v2/offers/operator/programmes",
51831
- input: ProgrammeDraftSchema.extend({ programme_id: external_exports.uuid().optional() }),
51840
+ input: ProgrammeDraftSchema.safeExtend({ programme_id: external_exports.uuid().optional() }),
51832
51841
  response: external_exports.object({ programme: ProgrammeVersionSchema }).strict(),
51833
51842
  read: false,
51834
51843
  operator: true
@@ -51861,7 +51870,7 @@ var OFFER_OPERATIONS = {
51861
51870
  promotion_code: {
51862
51871
  method: "POST",
51863
51872
  path: "/v2/offers/operator/promotion-codes",
51864
- input: external_exports.object({ version_id: external_exports.uuid(), code: CreatorCodeSchema }).strict(),
51873
+ input: external_exports.object({ version_id: external_exports.uuid(), code: PromotionCodeSchema }).strict(),
51865
51874
  response: ok,
51866
51875
  read: false,
51867
51876
  operator: true
@@ -54306,6 +54315,7 @@ var OrganizationPersonSchema = external_exports.object({
54306
54315
  user_id: external_exports.uuid(),
54307
54316
  email: external_exports.email(),
54308
54317
  role: OrganizationRoleSchema.nullable(),
54318
+ avatar_url: external_exports.string().nullable().optional(),
54309
54319
  project_access: external_exports.enum(["selected", "all"]),
54310
54320
  default_project_role: external_exports.enum(["member", "viewer"]),
54311
54321
  suspended_at: external_exports.string().nullable(),
@@ -60467,7 +60477,7 @@ function parseArgv(argv) {
60467
60477
  positionals.push(token);
60468
60478
  continue;
60469
60479
  }
60470
- if (token === "--fix" || token === "--json" || token === "--check-relay" || token === "--privacy" || token === "--help" || token === "--version" || token === "--non-interactive" || token === "--local" || token === "--cloud" || token === "--events" || token === "--bundles" || token === "--all" || token === "--all-projects" || token === "--confirm-change" || token === "--confirm-external-payment" || token === "--trigger-5xx" || token === "--expect-app-event" || token === "--github" || token === "--github-cli" || token === "--github-device" || token === "--clear-color-tag" || token === "--clear-description" || token === "--clear-repository") {
60480
+ if (token === "--fix" || token === "--json" || token === "--check-relay" || token === "--privacy" || token === "--help" || token === "--version" || token === "--non-interactive" || token === "--local" || token === "--cloud" || token === "--events" || token === "--bundles" || token === "--all" || token === "--all-projects" || token === "--include-avatars" || token === "--confirm-change" || token === "--confirm-external-payment" || token === "--trigger-5xx" || token === "--expect-app-event" || token === "--github" || token === "--github-cli" || token === "--github-device" || token === "--clear-color-tag" || token === "--clear-description" || token === "--clear-repository") {
60471
60481
  options.set(token.slice(2), true);
60472
60482
  continue;
60473
60483
  }
@@ -61542,7 +61552,7 @@ function createOrganizationApi(client) {
61542
61552
  return (await request(
61543
61553
  input3,
61544
61554
  "GET",
61545
- `${path(input3)}/people`,
61555
+ `${path(input3)}/people${input3.includeAvatars === true ? "?include_avatars=true" : ""}`,
61546
61556
  external_exports.object({ people: external_exports.array(OrganizationPersonSchema) }).strict()
61547
61557
  )).people;
61548
61558
  },
@@ -61664,7 +61674,12 @@ async function execute(api, bearerToken, input3) {
61664
61674
  const scope = { bearerToken, organizationId: input3.organizationId };
61665
61675
  switch (input3.action) {
61666
61676
  case "people":
61667
- return { people: await api.listPeople(scope) };
61677
+ return {
61678
+ people: await api.listPeople({
61679
+ ...scope,
61680
+ ...input3.includeAvatars === void 0 ? {} : { includeAvatars: input3.includeAvatars }
61681
+ })
61682
+ };
61668
61683
  case "invites":
61669
61684
  return { invites: await api.listInvites(scope) };
61670
61685
  case "invite":
@@ -61722,6 +61737,7 @@ async function handleOrganizationCommand(parsed, command = organizationWithAuthC
61722
61737
  const inviteOptions = ["email", "role", "project-access", "project-role", "projects"];
61723
61738
  expectNoUnknownOptions(parsed, [
61724
61739
  ...common,
61740
+ ...selected === "people" ? ["include-avatars"] : [],
61725
61741
  ...selected === "invite" ? inviteOptions : [],
61726
61742
  ...selected === "update-person" ? ["changes-json"] : []
61727
61743
  ]);
@@ -61729,6 +61745,8 @@ async function handleOrganizationCommand(parsed, command = organizationWithAuthC
61729
61745
  const hasResource = selected === "cancel-invite" || selected === "resend-invite" || selected === "update-person" || selected === "remove-person";
61730
61746
  ensureNoExtraPositionals(parsed, noOrganization ? 2 : hasResource ? 4 : 3);
61731
61747
  const input3 = { action: selected };
61748
+ if (selected === "people" && readBooleanOption(parsed, "include-avatars") === true)
61749
+ input3.includeAvatars = true;
61732
61750
  if (!noOrganization) input3.organizationId = requirePositional(parsed, 2, "organization-id");
61733
61751
  if (selected === "cancel-invite" || selected === "resend-invite")
61734
61752
  input3.inviteId = requirePositional(parsed, 3, "invite-id");
@@ -81213,7 +81231,8 @@ var CLI_USAGE_LINES = [
81213
81231
  " debugbundle token agent revoke <project-id> <token-id> [--auth-file <path>] [--json]",
81214
81232
  " debugbundle token member list [--limit <n>] [--include-scope] [--auth-file <path>] [--json]",
81215
81233
  " debugbundle organization list [--auth-file <path>] [--json]",
81216
- " debugbundle organization people|invites <organization-id> [--auth-file <path>] [--json]",
81234
+ " debugbundle organization people <organization-id> [--include-avatars] [--auth-file <path>] [--json]",
81235
+ " debugbundle organization invites <organization-id> [--auth-file <path>] [--json]",
81217
81236
  " debugbundle organization invite <organization-id> --email <email> [--role admin|member] [--project-access selected|all] [--project-role member|viewer] [--projects <ids>] [--json]",
81218
81237
  " debugbundle organization cancel-invite|resend-invite <organization-id> <invite-id> [--json]",
81219
81238
  " debugbundle organization update-person <organization-id> <user-id> --changes-json <object> [--json]",
@@ -90657,7 +90676,7 @@ async function handleCaptureRuleCommand2(parsedArgv, dependencies) {
90657
90676
  // package.json
90658
90677
  var package_default = {
90659
90678
  name: "@debugbundle/cli",
90660
- version: "1.27.0",
90679
+ version: "1.28.0",
90661
90680
  private: false,
90662
90681
  description: "Command-line interface for DebugBundle",
90663
90682
  license: "Apache-2.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@debugbundle/cli",
3
- "version": "1.27.0",
3
+ "version": "1.28.0",
4
4
  "private": false,
5
5
  "description": "Command-line interface for DebugBundle",
6
6
  "license": "Apache-2.0",