feat(clients): expose five nested *FieldNames on clients get#418
Conversation
Add `--contract-field-names`, `--contragent-field-names`, `--contragent-tin-info-field-names`, `--organization-field-names`, and `--tin-info-field-names` to `direct clients get` for the five nested WSDL `*FieldNames` request parameters declared by `ClientsGetRequest` (`ContractInfoFieldEnum`, `ContragentInfoFieldEnum`, `TinInfoFieldEnum`, `OrgInfoFieldEnum`, `TinInfoFieldEnum`). Also add `--dry-run` to `clients get` for parity with every other read-path command, and the corresponding "Read path omits optional SelectionCriteria when --ids is absent." rationale in DRY_RUN_PAYLOAD_EXCLUSIONS so the canonical dry-run command registry stays consistent. Mirrors the Wave 1 sitelinks pattern (#403). Each flag parses CSV via `parse_csv_strings`, rejects empty input with `click.UsageError`, and only injects the WSDL key when non-empty. The five options share one selector loop. Removes the corresponding rows from `NESTED_FIELDNAMES_EXCLUSIONS` so `test_every_nested_fieldnames_param_has_cli_option` enforces all five flags. Adds parametrized dry-run tests for payload, default-omission, `--help` visibility, and empty-CSV rejection. The same five enum types are reused on `direct agencyclients get` per #407; sample values and help wording stay consistent. Closes #410. Co-Authored-By: Claude Opus 4.7 <[email protected]>
|
@claude review. Focus on critical issues: bugs, security vulnerabilities, logical errors, data loss risks, performance problems. Do NOT nitpick style, naming conventions, minor formatting, or subjective preferences — only flag issues that could break functionality or cause real harm in production. |
|
Claude finished @axisrow's task in 2m 5s —— View job Code Review — PR #418
Verdict: no critical issues found. The PR is a clean read-path extension and follows existing conventions in the codebase. What I verified
Nits I'm flagging only because they're load-bearing laterNone affecting functionality. PR is ready to merge from a correctness standpoint. • Branch: |
…get (#419) Add `--contract-field-names`, `--contragent-field-names`, `--contragent-tin-info-field-names`, `--organization-field-names`, and `--tin-info-field-names` to `direct agencyclients get` for the five nested WSDL `*FieldNames` request parameters declared by `AgencyClientsGetRequest` (`ContractInfoFieldEnum`, `ContragentInfoFieldEnum`, `TinInfoFieldEnum`, `OrgInfoFieldEnum`, `TinInfoFieldEnum`). Mirrors PR #418 (clients) which exposes the exact same five enums on the sibling `clients get` request. Also add `--dry-run` for parity with every other read-path command, and the matching rationale in DRY_RUN_PAYLOAD_EXCLUSIONS. Each flag parses CSV via `parse_csv_strings`, rejects empty input with `click.UsageError`, and only injects the WSDL key when non-empty. The five options share one selector loop. Removes the corresponding rows from `NESTED_FIELDNAMES_EXCLUSIONS` so `test_every_nested_fieldnames_param_has_cli_option` enforces all five flags. Adds parametrized dry-run tests for payload, default-omission, `--help` visibility, and empty-CSV rejection. Closes #407. Co-authored-by: Claude Opus 4.7 <[email protected]> Co-authored-by: axisrow <[email protected]>
Resolve conflicts with #415 #416 #417 #418 #419 #420: keep all six previously-merged CHANGELOG entries (feeds/keywords/creatives/clients/ agencyclients/adgroups) and place the campaigns BREAKING CHANGES block at the end of Unreleased. Drop the already-removed NESTED_FIELDNAMES_EXCLUSIONS rows. Update the surviving legacy `-fields` test fixtures to the new `-field-names` form, while keeping one explicit rejection test for `--text-campaign-fields` (the old name).
Resolve conflicts with #415 #416 #417 #418 #419 #420 #421: keep all six previously-merged CHANGELOG entries (feeds/keywords/creatives/clients/ agencyclients/adgroups), the campaigns BREAKING CHANGES block, and add the bidmodifiers entry as a separate 'Additional features' block. Drop already-removed NESTED_FIELDNAMES_EXCLUSIONS rows. Append bidmodifiers tests after the canonical campaigns block in test_dry_run.py.
Summary
--*-field-namesflags todirect clients getfor the nested WSDL*FieldNamesparameters declared byClientsGetRequest:--contract-field-names(ContractInfoFieldEnum)--contragent-field-names(ContragentInfoFieldEnum)--contragent-tin-info-field-names(TinInfoFieldEnum)--organization-field-names(OrgInfoFieldEnum)--tin-info-field-names(TinInfoFieldEnum)--dry-runtoclients getfor parity with every other read-path command (and the matching rationale inDRY_RUN_PAYLOAD_EXCLUSIONS).direct agencyclients getper Wave 2 (#402): expose agencyclients get nested *FieldNames as CLI options #407 — sample values and help wording stay consistent.NESTED_FIELDNAMES_EXCLUSIONS.Closes #410. Fourth PR in Wave 2 milestone 0.3.14.
Test plan
pytest tests/test_api_coverage.py::test_every_nested_fieldnames_param_has_cli_option— passes after row removal.pytest tests/test_dry_run.py -k clients_get— 8 new tests pass (payload, default-omission, --help, 5 parametrized empty-CSV).pytest tests/test_api_coverage.py tests/test_cli.py tests/test_comprehensive.py— 247 tests pass.direct clients get --help | grep field-names— 5 new flags + existing--fieldsvisible.🤖 Generated with Claude Code