feat: add set-linking-limit support endpoint and CLI command#3067
Draft
Sneagan wants to merge 4 commits into
Draft
feat: add set-linking-limit support endpoint and CLI command#3067Sneagan wants to merge 4 commits into
Sneagan wants to merge 4 commits into
Conversation
Adds a support operator endpoint and CLI command to set the per-order
TLV2 credential batch limit (max_active_batches_tlv2_creds), enabling
operators to increase the linked device cap for individual orders.
Backend:
- PATCH /v1/orders/{orderID}/credentials/batches/limit (supportMwr)
- SetMaxActiveBatches repo method on order_items
- SetLinkingLimit service method (validates paid + TLV2, runs in tx)
- SetLinkingLimitReq model type
CLI:
- `bat-go skus set-linking-limit` with --order-id or --email lookup,
--max, optional --item-id, --private-key, and subscriptions service
flags when using email; shows current limit/active count before
confirming
7b3552c to
a165d76
Compare
Adds PATCH /v1/orders/{orderID}/credentials/items/{itemID}/batches/limit
to set max_active_batches_tlv2_creds on a TLV2 order item. Protected by
supportMwr (ed25519 signed requests).
Adds bat-go skus set-linking-limit CLI command. When --item-id is omitted
the command fetches the order's TLV2 items and auto-selects if there is
one, or presents a numbered prompt if there are several. --item-id skips
the lookup entirely for operators who already know the UUID.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a support operator endpoint and CLI command to set the per-order TLV2 credential batch limit (max_active_batches_tlv2_creds), enabling operators to increase the linked device cap for individual orders.
Backend:
CLI:
bat-go skus set-linking-limitwith --order-id or --email lookup, --max, optional --item-id, --private-key, and subscriptions service flags when using email; shows current limit/active count before confirmingType of Change
Tested Environments
Before Requesting Review
Manual Test Plan