@attlaz/client 1.93.0 → 1.94.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.
@@ -127,14 +127,18 @@ export class QualityEndpoint extends Endpoint {
127
127
  * is there rather than only on future scans.
128
128
  */
129
129
  async createSuppression(datasetId, suppression) {
130
- const body = { code: suppression.code };
131
- if (suppression.entityType && suppression.entityId) {
132
- body.entity_type = suppression.entityType;
133
- body.entity_id = suppression.entityId;
134
- }
135
- if (suppression.reason) {
136
- body.reason = suppression.reason;
137
- }
130
+ // Both entity keys are always sent, explicitly null for a dataset-wide suppression: the
131
+ // endpoint requires them to be present so that a dropped or renamed key is an error rather
132
+ // than a silent widening to the whole dataset.
133
+ //
134
+ // `entity`, not `entity_id`: formatKey() strips a trailing `_id`, so `entity_id` is not
135
+ // expressible from this client at all.
136
+ const body = {
137
+ code: suppression.code,
138
+ entity_type: suppression.entityType ?? null,
139
+ entity: suppression.entityId ?? null,
140
+ reason: suppression.reason ?? null,
141
+ };
138
142
  const result = await this.requestObject('/data_quality/datasets/' + datasetId + '/suppressions', body, (raw) => ({
139
143
  suppression: raw.id ? QualitySuppression.parse(raw) : null,
140
144
  muted: Number(raw.muted ?? 0),
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "1.93.0";
1
+ export declare const VERSION = "1.94.0";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "1.93.0";
1
+ export const VERSION = "1.94.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@attlaz/client",
3
- "version": "1.93.0",
3
+ "version": "1.94.0",
4
4
  "description": "Javascript Client to access Attlaz API",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",