CCM-14201 - Client Subscription Management#32
CCM-14201 - Client Subscription Management#32rhyscoxnhs wants to merge 4 commits intofeature/CCM-14200-event-driven-callback-deliveryfrom
Conversation
tools/client-subscriptions-management/src/__tests__/client-subscription-builder.test.ts
Show resolved
Hide resolved
|
|
||
| ```bash | ||
| npm --workspace scripts/client-subscriptions-management get-by-client-id \ | ||
| --bucket-name my-bucket \ |
There was a problem hiding this comment.
Shouldn't we specify --environment and it figures out the bucket name itself?
There was a problem hiding this comment.
The bucket naming convention follows the pattern: {project}-{account_id}-{region}-{environment}-{component}-{name}. To derive the bucket name from just --environment, we would need to:
- Know the AWS account ID (requires either hardcoding account mappings or making AWS STS API calls)
- Know the project name, region, and component name
- Maintain environment-to-account mappings
While this is definitely possible (we could make an STS GetCallerIdentity call), it adds complexity and requires AWS credentials to be properly configured just to construct the bucket name.
The current approach is more explicit and gives users flexibility to override if needed. Users can set the CLIENT_SUBSCRIPTION_BUCKET_NAME environment variable once in their shell profile to avoid repeating it.
| --channel-statuses DELIVERED FAILED \ | ||
| --supplier-statuses READ REJECTED \ |
There was a problem hiding this comment.
Only one of --channel-status or --supplier-status (or --message-statuses for that matter) can be provided at once. Do we check?
There was a problem hiding this comment.
My current interpretation is that both --channel-statuses and --supplier-statuses are required together for channel status subscriptions. I based this on the data model specification (data-model.md lines 312-313) which states:
ChannelStatusesmust be a non-empty array of valid channel status valuesSupplierStatusesmust be a non-empty array of valid supplier status values
However, I realize there's an alternate interpretation: these validation rules might mean "when present, must be non-empty", rather than "must always be present". This would allow subscriptions to filter on:
- Only channel statuses (e.g., only DELIVERED events)
- Only supplier statuses (e.g., only 'read' events)
- OR both together (e.g., DELIVERED + received/notified/read)
In this case, we'd need validation to ensure at least one is provided (not both omitted), but they wouldn't both be required.
Could you confirm which interpretation matches the intended design?
43d5c7d to
ef886ce
Compare
ef886ce to
dabb562
Compare
Description
Context
Type of changes
Checklist
Sensitive Information Declaration
To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.