@attlaz/client 1.96.0 → 1.97.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 (153) hide show
  1. package/dist/Catalog/Service/CatalogEndpoint.js +2 -1
  2. package/dist/Catalog/Service/CatalogProductEndpoint.js +3 -2
  3. package/dist/Client.d.ts +12 -12
  4. package/dist/Client.js +12 -12
  5. package/dist/{EnhanceData → DataEnrichment}/Service/GenerateContentEndpoint.js +3 -2
  6. package/dist/DataQuality/Model/QualityReportEntity.d.ts +31 -0
  7. package/dist/DataQuality/Model/QualityReportEntity.js +44 -0
  8. package/dist/DataQuality/Model/QualityReportProblem.d.ts +22 -0
  9. package/dist/DataQuality/Model/QualityReportProblem.js +35 -0
  10. package/dist/DataQuality/Model/QualityReportResult.d.ts +9 -0
  11. package/dist/DataQuality/Model/QualityReportResult.js +14 -0
  12. package/dist/DataQuality/Model/QualityScan.d.ts +19 -0
  13. package/dist/DataQuality/Model/QualityScan.js +28 -0
  14. package/dist/DataQuality/Service/QualityEndpoint.d.ts +57 -0
  15. package/dist/DataQuality/Service/QualityEndpoint.js +107 -21
  16. package/dist/FeedManagement/Service/CatalogFeedEndpoint.js +2 -1
  17. package/dist/Flow/Service/FlowEndpoint.js +6 -5
  18. package/dist/Flow/Service/FlowRunEndpoint.js +8 -7
  19. package/dist/Flow/Service/FlowRunRequestEndpoint.js +2 -1
  20. package/dist/Flow/Service/FlowRunStatsEndpoint.js +2 -1
  21. package/dist/Helper/LoadAllHelper.js +7 -1
  22. package/dist/Http/Data/Path.d.ts +11 -0
  23. package/dist/Http/Data/Path.js +31 -0
  24. package/dist/Http/HttpClient.d.ts +8 -1
  25. package/dist/Http/HttpClient.js +21 -1
  26. package/dist/Http/OAuthClientOptions.d.ts +2 -0
  27. package/dist/Http/OAuthClientOptions.js +3 -0
  28. package/dist/Http/Transport/OAuthClient.d.ts +7 -0
  29. package/dist/Http/Transport/OAuthClient.js +31 -4
  30. package/dist/Logging/Service/LogEndpoint.d.ts +5 -1
  31. package/dist/Logging/Service/LogEndpoint.js +14 -8
  32. package/dist/{Pulse → MarketPulse}/Service/CompetitorEndpoint.js +4 -3
  33. package/dist/{Pulse → MarketPulse}/Service/CrawlJobEndpoint.d.ts +1 -0
  34. package/dist/{Pulse → MarketPulse}/Service/CrawlJobEndpoint.js +8 -6
  35. package/dist/{Pulse → MarketPulse}/Service/IndexJobEndpoint.js +5 -4
  36. package/dist/{Pulse → MarketPulse}/Service/PriceAlertEndpoint.js +8 -7
  37. package/dist/{Pulse → MarketPulse}/Service/PricingEndpoint.js +9 -8
  38. package/dist/{Pulse → MarketPulse}/Service/ProductGroupEndpoint.js +4 -3
  39. package/dist/{Pulse → MarketPulse}/Service/ProductMatchEndpoint.js +6 -5
  40. package/dist/{Pulse → MarketPulse}/Service/ProductMatchJobEndpoint.js +5 -4
  41. package/dist/{Pulse → MarketPulse}/Service/PulseCatalogProductEndpoint.js +4 -3
  42. package/dist/{Pulse → MarketPulse}/Service/PulseStatisticsEndpoint.js +5 -4
  43. package/dist/{Pulse → MarketPulse}/Service/VendorProductEndpoint.js +11 -7
  44. package/dist/Service/AccessTokenEndpoint.js +3 -2
  45. package/dist/Service/AdapterConnectionEndpoint.js +9 -8
  46. package/dist/Service/AdapterEndpoint.js +3 -2
  47. package/dist/Service/ChannelEndpoint.js +5 -4
  48. package/dist/Service/CodeDeployEndpoint.js +5 -4
  49. package/dist/Service/CodeSourceStrategiesEndpoint.js +3 -2
  50. package/dist/Service/CollectionsEndpoint.js +5 -4
  51. package/dist/Service/CommandExecutionEndpoint.js +2 -1
  52. package/dist/Service/ConfigEndpoint.d.ts +6 -1
  53. package/dist/Service/ConfigEndpoint.js +9 -3
  54. package/dist/Service/ConfigurationEndpoint.js +5 -4
  55. package/dist/Service/HealthAlertEndpoint.js +3 -2
  56. package/dist/Service/PlatformEndpoint.js +3 -2
  57. package/dist/Service/PlatformLanguageEndpoint.js +2 -1
  58. package/dist/Service/ProjectEndpoint.js +3 -2
  59. package/dist/Service/ProjectEnvironmentEndpoint.js +3 -2
  60. package/dist/Service/ProviderTokenEndpoint.js +4 -3
  61. package/dist/Service/RunnerPoolEndpoint.js +5 -4
  62. package/dist/Service/SourcesAccountEndpoint.js +6 -5
  63. package/dist/Service/StorageEndpoint.js +8 -7
  64. package/dist/Service/SubscriberEndpoint.js +4 -3
  65. package/dist/Service/TriggerEndpoint.js +5 -4
  66. package/dist/Service/UserActionEndpoint.js +4 -3
  67. package/dist/Service/UserEndpoint.js +3 -2
  68. package/dist/Service/WorkspaceEndpoint.js +2 -1
  69. package/dist/Service/WorkspaceMemberEndpoint.js +5 -4
  70. package/dist/index.d.ts +50 -46
  71. package/dist/index.js +37 -33
  72. package/dist/version.d.ts +1 -1
  73. package/dist/version.js +1 -1
  74. package/package.json +4 -2
  75. /package/dist/{EnhanceData → DataEnrichment}/Model/GenerateContentBatch.d.ts +0 -0
  76. /package/dist/{EnhanceData → DataEnrichment}/Model/GenerateContentBatch.js +0 -0
  77. /package/dist/{EnhanceData → DataEnrichment}/Model/GenerateContentBatchData.d.ts +0 -0
  78. /package/dist/{EnhanceData → DataEnrichment}/Model/GenerateContentBatchData.js +0 -0
  79. /package/dist/{EnhanceData → DataEnrichment}/Service/GenerateContentEndpoint.d.ts +0 -0
  80. /package/dist/{Pulse → MarketPulse}/Model/CatalogProductWithMatches.d.ts +0 -0
  81. /package/dist/{Pulse → MarketPulse}/Model/CatalogProductWithMatches.js +0 -0
  82. /package/dist/{Pulse → MarketPulse}/Model/CompetingVendorProduct.d.ts +0 -0
  83. /package/dist/{Pulse → MarketPulse}/Model/CompetingVendorProduct.js +0 -0
  84. /package/dist/{Pulse → MarketPulse}/Model/Competitor.d.ts +0 -0
  85. /package/dist/{Pulse → MarketPulse}/Model/Competitor.js +0 -0
  86. /package/dist/{Pulse → MarketPulse}/Model/CrawlJob.d.ts +0 -0
  87. /package/dist/{Pulse → MarketPulse}/Model/CrawlJob.js +0 -0
  88. /package/dist/{Pulse → MarketPulse}/Model/IndexJob.d.ts +0 -0
  89. /package/dist/{Pulse → MarketPulse}/Model/IndexJob.js +0 -0
  90. /package/dist/{Pulse → MarketPulse}/Model/MarketSummaryEntry.d.ts +0 -0
  91. /package/dist/{Pulse → MarketPulse}/Model/MarketSummaryEntry.js +0 -0
  92. /package/dist/{Pulse → MarketPulse}/Model/MatchHistory.d.ts +0 -0
  93. /package/dist/{Pulse → MarketPulse}/Model/MatchHistory.js +0 -0
  94. /package/dist/{Pulse → MarketPulse}/Model/MatchHistoryBucket.d.ts +0 -0
  95. /package/dist/{Pulse → MarketPulse}/Model/MatchHistoryBucket.js +0 -0
  96. /package/dist/{Pulse → MarketPulse}/Model/MatchHistoryInterval.d.ts +0 -0
  97. /package/dist/{Pulse → MarketPulse}/Model/MatchHistoryInterval.js +0 -0
  98. /package/dist/{Pulse → MarketPulse}/Model/MatchedVendorProduct.d.ts +0 -0
  99. /package/dist/{Pulse → MarketPulse}/Model/MatchedVendorProduct.js +0 -0
  100. /package/dist/{Pulse → MarketPulse}/Model/PriceAlertConfig.d.ts +0 -0
  101. /package/dist/{Pulse → MarketPulse}/Model/PriceAlertConfig.js +0 -0
  102. /package/dist/{Pulse → MarketPulse}/Model/PriceAlertConfigData.d.ts +0 -0
  103. /package/dist/{Pulse → MarketPulse}/Model/PriceAlertConfigData.js +0 -0
  104. /package/dist/{Pulse → MarketPulse}/Model/PriceAlertEvent.d.ts +0 -0
  105. /package/dist/{Pulse → MarketPulse}/Model/PriceAlertEvent.js +0 -0
  106. /package/dist/{Pulse → MarketPulse}/Model/PriceIndexSnapshotEntry.d.ts +0 -0
  107. /package/dist/{Pulse → MarketPulse}/Model/PriceIndexSnapshotEntry.js +0 -0
  108. /package/dist/{Pulse → MarketPulse}/Model/PriceSuggestion.d.ts +0 -0
  109. /package/dist/{Pulse → MarketPulse}/Model/PriceSuggestion.js +0 -0
  110. /package/dist/{Pulse → MarketPulse}/Model/PricingRule.d.ts +0 -0
  111. /package/dist/{Pulse → MarketPulse}/Model/PricingRule.js +0 -0
  112. /package/dist/{Pulse → MarketPulse}/Model/PricingRuleData.d.ts +0 -0
  113. /package/dist/{Pulse → MarketPulse}/Model/PricingRuleData.js +0 -0
  114. /package/dist/{Pulse → MarketPulse}/Model/ProductGroup.d.ts +0 -0
  115. /package/dist/{Pulse → MarketPulse}/Model/ProductGroup.js +0 -0
  116. /package/dist/{Pulse → MarketPulse}/Model/ProductGroupData.d.ts +0 -0
  117. /package/dist/{Pulse → MarketPulse}/Model/ProductGroupData.js +0 -0
  118. /package/dist/{Pulse → MarketPulse}/Model/ProductMatch.d.ts +0 -0
  119. /package/dist/{Pulse → MarketPulse}/Model/ProductMatch.js +0 -0
  120. /package/dist/{Pulse → MarketPulse}/Model/ProductMatchJob.d.ts +0 -0
  121. /package/dist/{Pulse → MarketPulse}/Model/ProductMatchJob.js +0 -0
  122. /package/dist/{Pulse → MarketPulse}/Model/ProductSegmentType.d.ts +0 -0
  123. /package/dist/{Pulse → MarketPulse}/Model/ProductSegmentType.js +0 -0
  124. /package/dist/{Pulse → MarketPulse}/Model/ProductsSegment.d.ts +0 -0
  125. /package/dist/{Pulse → MarketPulse}/Model/ProductsSegment.js +0 -0
  126. /package/dist/{Pulse → MarketPulse}/Model/PulseCatalogProductFilterOptions.d.ts +0 -0
  127. /package/dist/{Pulse → MarketPulse}/Model/PulseCatalogProductFilterOptions.js +0 -0
  128. /package/dist/{Pulse → MarketPulse}/Model/PulseCatalogProductFilters.d.ts +0 -0
  129. /package/dist/{Pulse → MarketPulse}/Model/PulseCatalogProductFilters.js +0 -0
  130. /package/dist/{Pulse → MarketPulse}/Model/ReviewMatch.d.ts +0 -0
  131. /package/dist/{Pulse → MarketPulse}/Model/ReviewMatch.js +0 -0
  132. /package/dist/{Pulse → MarketPulse}/Model/ReviewMatchFilters.d.ts +0 -0
  133. /package/dist/{Pulse → MarketPulse}/Model/ReviewMatchFilters.js +0 -0
  134. /package/dist/{Pulse → MarketPulse}/Model/TopCompetitor.d.ts +0 -0
  135. /package/dist/{Pulse → MarketPulse}/Model/TopCompetitor.js +0 -0
  136. /package/dist/{Pulse → MarketPulse}/Model/Vendor.d.ts +0 -0
  137. /package/dist/{Pulse → MarketPulse}/Model/Vendor.js +0 -0
  138. /package/dist/{Pulse → MarketPulse}/Model/VendorProduct.d.ts +0 -0
  139. /package/dist/{Pulse → MarketPulse}/Model/VendorProduct.js +0 -0
  140. /package/dist/{Pulse → MarketPulse}/Model/VendorProductPriceHistoryEntry.d.ts +0 -0
  141. /package/dist/{Pulse → MarketPulse}/Model/VendorProductPriceHistoryEntry.js +0 -0
  142. /package/dist/{Pulse → MarketPulse}/Model/VendorStatus.d.ts +0 -0
  143. /package/dist/{Pulse → MarketPulse}/Model/VendorStatus.js +0 -0
  144. /package/dist/{Pulse → MarketPulse}/Service/CompetitorEndpoint.d.ts +0 -0
  145. /package/dist/{Pulse → MarketPulse}/Service/IndexJobEndpoint.d.ts +0 -0
  146. /package/dist/{Pulse → MarketPulse}/Service/PriceAlertEndpoint.d.ts +0 -0
  147. /package/dist/{Pulse → MarketPulse}/Service/PricingEndpoint.d.ts +0 -0
  148. /package/dist/{Pulse → MarketPulse}/Service/ProductGroupEndpoint.d.ts +0 -0
  149. /package/dist/{Pulse → MarketPulse}/Service/ProductMatchEndpoint.d.ts +0 -0
  150. /package/dist/{Pulse → MarketPulse}/Service/ProductMatchJobEndpoint.d.ts +0 -0
  151. /package/dist/{Pulse → MarketPulse}/Service/PulseCatalogProductEndpoint.d.ts +0 -0
  152. /package/dist/{Pulse → MarketPulse}/Service/PulseStatisticsEndpoint.d.ts +0 -0
  153. /package/dist/{Pulse → MarketPulse}/Service/VendorProductEndpoint.d.ts +0 -0
@@ -1,3 +1,4 @@
1
+ import { path } from '../../Http/Data/Path.js';
1
2
  import { QueryString } from '../../Http/Data/QueryString.js';
2
3
  import { Catalog } from '../Model/Catalog.js';
3
4
  import { Endpoint } from '../../Service/Endpoint.js';
@@ -15,7 +16,7 @@ export class CatalogEndpoint extends Endpoint {
15
16
  }
16
17
  /** The catalog with this id, or null. */
17
18
  async getById(catalogId) {
18
- const result = await this.requestObject('/catalogs/' + catalogId.toString(), null, Catalog.parse, 'GET');
19
+ const result = await this.requestObject(path('/catalogs/:catalogId', { catalogId: catalogId.toString() }), null, Catalog.parse, 'GET');
19
20
  return result.getData();
20
21
  }
21
22
  }
@@ -1,3 +1,4 @@
1
+ import { path } from '../../Http/Data/Path.js';
1
2
  import { QueryString } from '../../Http/Data/QueryString.js';
2
3
  import { Endpoint } from '../../Service/Endpoint.js';
3
4
  import { CatalogProduct } from '../Model/CatalogProduct.js';
@@ -9,13 +10,13 @@ import { CatalogProduct } from '../Model/CatalogProduct.js';
9
10
  */
10
11
  export class CatalogProductEndpoint extends Endpoint {
11
12
  async getByCatalog(catalogId, pagination = null) {
12
- const queryString = new QueryString('/catalogs/' + catalogId.toString() + '/products');
13
+ const queryString = new QueryString(path('/catalogs/:catalogId/products', { catalogId: catalogId.toString() }));
13
14
  queryString.addPagination(pagination);
14
15
  return await this.requestCollection(queryString, CatalogProduct.parse);
15
16
  }
16
17
  /** The product with this catalog identifier, or null. */
17
18
  async getByIdentifier(catalogId, identifier) {
18
- const queryString = new QueryString('/catalogs/' + catalogId.toString() + '/products');
19
+ const queryString = new QueryString(path('/catalogs/:catalogId/products', { catalogId: catalogId.toString() }));
19
20
  queryString.set('identifier', identifier);
20
21
  const result = await this.requestCollection(queryString, CatalogProduct.parse);
21
22
  const products = result.getData();
package/dist/Client.d.ts CHANGED
@@ -24,20 +24,20 @@ import { PlatformLanguageEndpoint } from './Service/PlatformLanguageEndpoint.js'
24
24
  import { ProjectEndpoint } from './Service/ProjectEndpoint.js';
25
25
  import { ProjectEnvironmentEndpoint } from './Service/ProjectEnvironmentEndpoint.js';
26
26
  import { ProviderTokenEndpoint } from './Service/ProviderTokenEndpoint.js';
27
- import { VendorProductEndpoint } from './Pulse/Service/VendorProductEndpoint.js';
28
- import { CrawlJobEndpoint } from './Pulse/Service/CrawlJobEndpoint.js';
27
+ import { VendorProductEndpoint } from './MarketPulse/Service/VendorProductEndpoint.js';
28
+ import { CrawlJobEndpoint } from './MarketPulse/Service/CrawlJobEndpoint.js';
29
29
  import { CatalogEndpoint } from './Catalog/Service/CatalogEndpoint.js';
30
- import { ProductMatchJobEndpoint } from './Pulse/Service/ProductMatchJobEndpoint.js';
31
- import { IndexJobEndpoint } from './Pulse/Service/IndexJobEndpoint.js';
32
- import { ProductMatchEndpoint } from './Pulse/Service/ProductMatchEndpoint.js';
33
- import { PulseCatalogProductEndpoint } from './Pulse/Service/PulseCatalogProductEndpoint.js';
34
- import { PriceAlertEndpoint } from './Pulse/Service/PriceAlertEndpoint.js';
35
- import { PricingEndpoint } from './Pulse/Service/PricingEndpoint.js';
36
- import { ProductGroupEndpoint } from './Pulse/Service/ProductGroupEndpoint.js';
30
+ import { ProductMatchJobEndpoint } from './MarketPulse/Service/ProductMatchJobEndpoint.js';
31
+ import { IndexJobEndpoint } from './MarketPulse/Service/IndexJobEndpoint.js';
32
+ import { ProductMatchEndpoint } from './MarketPulse/Service/ProductMatchEndpoint.js';
33
+ import { PulseCatalogProductEndpoint } from './MarketPulse/Service/PulseCatalogProductEndpoint.js';
34
+ import { PriceAlertEndpoint } from './MarketPulse/Service/PriceAlertEndpoint.js';
35
+ import { PricingEndpoint } from './MarketPulse/Service/PricingEndpoint.js';
36
+ import { ProductGroupEndpoint } from './MarketPulse/Service/ProductGroupEndpoint.js';
37
37
  import { CatalogProductEndpoint } from './Catalog/Service/CatalogProductEndpoint.js';
38
- import { GenerateContentEndpoint } from './EnhanceData/Service/GenerateContentEndpoint.js';
39
- import { CompetitorEndpoint } from './Pulse/Service/CompetitorEndpoint.js';
40
- import { PulseStatisticsEndpoint } from './Pulse/Service/PulseStatisticsEndpoint.js';
38
+ import { GenerateContentEndpoint } from './DataEnrichment/Service/GenerateContentEndpoint.js';
39
+ import { CompetitorEndpoint } from './MarketPulse/Service/CompetitorEndpoint.js';
40
+ import { PulseStatisticsEndpoint } from './MarketPulse/Service/PulseStatisticsEndpoint.js';
41
41
  import { QualityEndpoint } from './DataQuality/Service/QualityEndpoint.js';
42
42
  import { CatalogFeedEndpoint } from './FeedManagement/Service/CatalogFeedEndpoint.js';
43
43
  import { RunnerEndpoint } from './Service/RunnerEndpoint.js';
package/dist/Client.js CHANGED
@@ -24,20 +24,20 @@ import { PlatformLanguageEndpoint } from './Service/PlatformLanguageEndpoint.js'
24
24
  import { ProjectEndpoint } from './Service/ProjectEndpoint.js';
25
25
  import { ProjectEnvironmentEndpoint } from './Service/ProjectEnvironmentEndpoint.js';
26
26
  import { ProviderTokenEndpoint } from './Service/ProviderTokenEndpoint.js';
27
- import { VendorProductEndpoint } from './Pulse/Service/VendorProductEndpoint.js';
28
- import { CrawlJobEndpoint } from './Pulse/Service/CrawlJobEndpoint.js';
27
+ import { VendorProductEndpoint } from './MarketPulse/Service/VendorProductEndpoint.js';
28
+ import { CrawlJobEndpoint } from './MarketPulse/Service/CrawlJobEndpoint.js';
29
29
  import { CatalogEndpoint } from './Catalog/Service/CatalogEndpoint.js';
30
- import { ProductMatchJobEndpoint } from './Pulse/Service/ProductMatchJobEndpoint.js';
31
- import { IndexJobEndpoint } from './Pulse/Service/IndexJobEndpoint.js';
32
- import { ProductMatchEndpoint } from './Pulse/Service/ProductMatchEndpoint.js';
33
- import { PulseCatalogProductEndpoint } from './Pulse/Service/PulseCatalogProductEndpoint.js';
34
- import { PriceAlertEndpoint } from './Pulse/Service/PriceAlertEndpoint.js';
35
- import { PricingEndpoint } from './Pulse/Service/PricingEndpoint.js';
36
- import { ProductGroupEndpoint } from './Pulse/Service/ProductGroupEndpoint.js';
30
+ import { ProductMatchJobEndpoint } from './MarketPulse/Service/ProductMatchJobEndpoint.js';
31
+ import { IndexJobEndpoint } from './MarketPulse/Service/IndexJobEndpoint.js';
32
+ import { ProductMatchEndpoint } from './MarketPulse/Service/ProductMatchEndpoint.js';
33
+ import { PulseCatalogProductEndpoint } from './MarketPulse/Service/PulseCatalogProductEndpoint.js';
34
+ import { PriceAlertEndpoint } from './MarketPulse/Service/PriceAlertEndpoint.js';
35
+ import { PricingEndpoint } from './MarketPulse/Service/PricingEndpoint.js';
36
+ import { ProductGroupEndpoint } from './MarketPulse/Service/ProductGroupEndpoint.js';
37
37
  import { CatalogProductEndpoint } from './Catalog/Service/CatalogProductEndpoint.js';
38
- import { GenerateContentEndpoint } from './EnhanceData/Service/GenerateContentEndpoint.js';
39
- import { CompetitorEndpoint } from './Pulse/Service/CompetitorEndpoint.js';
40
- import { PulseStatisticsEndpoint } from './Pulse/Service/PulseStatisticsEndpoint.js';
38
+ import { GenerateContentEndpoint } from './DataEnrichment/Service/GenerateContentEndpoint.js';
39
+ import { CompetitorEndpoint } from './MarketPulse/Service/CompetitorEndpoint.js';
40
+ import { PulseStatisticsEndpoint } from './MarketPulse/Service/PulseStatisticsEndpoint.js';
41
41
  import { QualityEndpoint } from './DataQuality/Service/QualityEndpoint.js';
42
42
  import { CatalogFeedEndpoint } from './FeedManagement/Service/CatalogFeedEndpoint.js';
43
43
  import { RunnerEndpoint } from './Service/RunnerEndpoint.js';
@@ -1,3 +1,4 @@
1
+ import { path } from '../../Http/Data/Path.js';
1
2
  import { QueryString } from '../../Http/Data/QueryString.js';
2
3
  import { Endpoint } from '../../Service/Endpoint.js';
3
4
  import { GenerateContentBatch } from '../Model/GenerateContentBatch.js';
@@ -9,13 +10,13 @@ import { GenerateContentBatch } from '../Model/GenerateContentBatch.js';
9
10
  */
10
11
  export class GenerateContentEndpoint extends Endpoint {
11
12
  async getBatches(projectId, pagination = null) {
12
- const queryString = new QueryString('/projects/' + projectId + '/content-generation-batches');
13
+ const queryString = new QueryString(path('/projects/:projectId/content-generation-batches', { projectId }));
13
14
  queryString.addPagination(pagination);
14
15
  return await this.requestCollection(queryString, GenerateContentBatch.parse);
15
16
  }
16
17
  /** Queue a batch. The generated values become proposals to review, not direct writes. */
17
18
  async requestGeneration(projectId, data) {
18
- const result = await this.requestObject('/projects/' + projectId + '/content-generation-batches', data, GenerateContentBatch.parse, 'POST');
19
+ const result = await this.requestObject(path('/projects/:projectId/content-generation-batches', { projectId }), data, GenerateContentBatch.parse, 'POST');
19
20
  return result.getData();
20
21
  }
21
22
  }
@@ -0,0 +1,31 @@
1
+ import { QualityReportProblem } from './QualityReportProblem.js';
2
+ /**
3
+ * One entity being reported on: its identity, optionally what it is, and what was found.
4
+ *
5
+ * `entityType` + `entityId` are the natural key within the dataset — an entity is created on first
6
+ * report, so there is nothing to register up front. `name`, `url` and `imageUrl` are optional: send
7
+ * them and the dashboard can show a recognisable row instead of a bare identifier.
8
+ *
9
+ * `passed` carries codes that were *checked and found clean*. That is what lets the platform close
10
+ * a problem that is no longer there — an entity reported with no problems and no `passed` codes says
11
+ * nothing about the codes it was previously failing.
12
+ */
13
+ export declare class QualityReportEntity {
14
+ entityType: string;
15
+ entityId: string;
16
+ name: string | null;
17
+ url: string | null;
18
+ imageUrl: string | null;
19
+ data: Record<string, unknown> | null;
20
+ problems: QualityReportProblem[];
21
+ passed: string[];
22
+ constructor(entityType: string, entityId: string);
23
+ /**
24
+ * The snake_case wire shape.
25
+ *
26
+ * Built explicitly, and sent with `_formatted: true`, because the client's key formatter
27
+ * snake_cases keys *and strips a trailing `_id`* — it would turn `entity_id` into `entity`, which
28
+ * the report endpoint rejects. See Endpoint.prepareParameters().
29
+ */
30
+ toPayload(): Record<string, unknown>;
31
+ }
@@ -0,0 +1,44 @@
1
+ /**
2
+ * One entity being reported on: its identity, optionally what it is, and what was found.
3
+ *
4
+ * `entityType` + `entityId` are the natural key within the dataset — an entity is created on first
5
+ * report, so there is nothing to register up front. `name`, `url` and `imageUrl` are optional: send
6
+ * them and the dashboard can show a recognisable row instead of a bare identifier.
7
+ *
8
+ * `passed` carries codes that were *checked and found clean*. That is what lets the platform close
9
+ * a problem that is no longer there — an entity reported with no problems and no `passed` codes says
10
+ * nothing about the codes it was previously failing.
11
+ */
12
+ export class QualityReportEntity {
13
+ entityType;
14
+ entityId;
15
+ name = null;
16
+ url = null;
17
+ imageUrl = null;
18
+ data = null;
19
+ problems = [];
20
+ passed = [];
21
+ constructor(entityType, entityId) {
22
+ this.entityType = entityType;
23
+ this.entityId = entityId;
24
+ }
25
+ /**
26
+ * The snake_case wire shape.
27
+ *
28
+ * Built explicitly, and sent with `_formatted: true`, because the client's key formatter
29
+ * snake_cases keys *and strips a trailing `_id`* — it would turn `entity_id` into `entity`, which
30
+ * the report endpoint rejects. See Endpoint.prepareParameters().
31
+ */
32
+ toPayload() {
33
+ return {
34
+ entity_type: this.entityType,
35
+ entity_id: this.entityId,
36
+ name: this.name,
37
+ url: this.url,
38
+ image_url: this.imageUrl,
39
+ data: this.data,
40
+ problems: this.problems.map((problem) => problem.toPayload()),
41
+ passed: this.passed,
42
+ };
43
+ }
44
+ }
@@ -0,0 +1,22 @@
1
+ /**
2
+ * One problem found on one entity, as sent to the report endpoint.
3
+ *
4
+ * `code` is the machine key the problem definition hangs off (`shop.ean_invalid_checkdigit`);
5
+ * `property` is what the problem is about (`ean`, `name`, `image`). Severity is optional: leave it
6
+ * null and the platform applies the definition's default.
7
+ */
8
+ export declare class QualityReportProblem {
9
+ code: string;
10
+ property: string;
11
+ severity: string | null;
12
+ note: string | null;
13
+ data: Record<string, unknown> | null;
14
+ channel: string | null;
15
+ locale: string | null;
16
+ constructor(code: string, property: string);
17
+ /**
18
+ * The snake_case wire shape. Built here rather than left to the client's key formatter, which
19
+ * would rewrite the keys — see QualityReportEntity.toPayload().
20
+ */
21
+ toPayload(): Record<string, unknown>;
22
+ }
@@ -0,0 +1,35 @@
1
+ /**
2
+ * One problem found on one entity, as sent to the report endpoint.
3
+ *
4
+ * `code` is the machine key the problem definition hangs off (`shop.ean_invalid_checkdigit`);
5
+ * `property` is what the problem is about (`ean`, `name`, `image`). Severity is optional: leave it
6
+ * null and the platform applies the definition's default.
7
+ */
8
+ export class QualityReportProblem {
9
+ code;
10
+ property;
11
+ severity = null;
12
+ note = null;
13
+ data = null;
14
+ channel = null;
15
+ locale = null;
16
+ constructor(code, property) {
17
+ this.code = code;
18
+ this.property = property;
19
+ }
20
+ /**
21
+ * The snake_case wire shape. Built here rather than left to the client's key formatter, which
22
+ * would rewrite the keys — see QualityReportEntity.toPayload().
23
+ */
24
+ toPayload() {
25
+ return {
26
+ code: this.code,
27
+ property: this.property,
28
+ severity: this.severity,
29
+ note: this.note,
30
+ data: this.data,
31
+ channel: this.channel,
32
+ locale: this.locale,
33
+ };
34
+ }
35
+ }
@@ -0,0 +1,9 @@
1
+ import { ApiRecord } from '../../Model/ApiRecord.js';
2
+ /** What a report call did: how much was ingested, and how much it resolved. */
3
+ export declare class QualityReportResult {
4
+ entityCount: number;
5
+ problemCount: number;
6
+ /** Problems closed because the reporter said the code now passes on that entity. */
7
+ resolvedCount: number;
8
+ static parse(raw: ApiRecord): QualityReportResult;
9
+ }
@@ -0,0 +1,14 @@
1
+ /** What a report call did: how much was ingested, and how much it resolved. */
2
+ export class QualityReportResult {
3
+ entityCount = 0;
4
+ problemCount = 0;
5
+ /** Problems closed because the reporter said the code now passes on that entity. */
6
+ resolvedCount = 0;
7
+ static parse(raw) {
8
+ const result = new QualityReportResult();
9
+ result.entityCount = Number(raw.entity_count ?? 0);
10
+ result.problemCount = Number(raw.problem_count ?? 0);
11
+ result.resolvedCount = Number(raw.resolved_count ?? 0);
12
+ return result;
13
+ }
14
+ }
@@ -0,0 +1,19 @@
1
+ import { ApiRecord } from '../../Model/ApiRecord.js';
2
+ /**
3
+ * One reporting run against a dataset — the `/data-quality/datasets/:datasetId/scans` resource.
4
+ *
5
+ * A scan brackets the problems a reporter sends: open one, report into it, complete it. Completing
6
+ * is what lets the platform resolve problems that were not re-reported, so a scan that is opened and
7
+ * never completed leaves stale problems open.
8
+ */
9
+ export declare class QualityScan {
10
+ id: string;
11
+ dataset: string;
12
+ /** The check pack this run covers; scopes what auto-close is allowed to resolve. */
13
+ pack: string | null;
14
+ status: string;
15
+ startedAt: Date | null;
16
+ completedAt: Date | null;
17
+ constructor(id: string, dataset: string, status: string);
18
+ static parse(raw: ApiRecord): QualityScan;
19
+ }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * One reporting run against a dataset — the `/data-quality/datasets/:datasetId/scans` resource.
3
+ *
4
+ * A scan brackets the problems a reporter sends: open one, report into it, complete it. Completing
5
+ * is what lets the platform resolve problems that were not re-reported, so a scan that is opened and
6
+ * never completed leaves stale problems open.
7
+ */
8
+ export class QualityScan {
9
+ id;
10
+ dataset;
11
+ /** The check pack this run covers; scopes what auto-close is allowed to resolve. */
12
+ pack = null;
13
+ status;
14
+ startedAt = null;
15
+ completedAt = null;
16
+ constructor(id, dataset, status) {
17
+ this.id = id;
18
+ this.dataset = dataset;
19
+ this.status = status;
20
+ }
21
+ static parse(raw) {
22
+ const scan = new QualityScan(raw.id, raw.dataset, raw.status);
23
+ scan.pack = raw.pack ?? null;
24
+ scan.startedAt = raw.started_at ? new Date(raw.started_at) : null;
25
+ scan.completedAt = raw.completed_at ? new Date(raw.completed_at) : null;
26
+ return scan;
27
+ }
28
+ }
@@ -5,6 +5,9 @@ import { QualityFilterOptions } from '../Model/QualityFilterOptions.js';
5
5
  import { QualityProblem } from '../Model/QualityProblem.js';
6
6
  import { QualityProblemDefinition } from '../Model/QualityProblemDefinition.js';
7
7
  import { QualityProblemEvent } from '../Model/QualityProblemEvent.js';
8
+ import { QualityReportEntity } from '../Model/QualityReportEntity.js';
9
+ import { QualityReportResult } from '../Model/QualityReportResult.js';
10
+ import { QualityScan } from '../Model/QualityScan.js';
8
11
  import { QualitySummary } from '../Model/QualitySummary.js';
9
12
  import { QualityEntityProblemSuppression } from '../Model/QualityEntityProblemSuppression.js';
10
13
  import { QualityEntityProblemSuppressionResult } from '../Model/QualityEntityProblemSuppressionResult.js';
@@ -29,6 +32,60 @@ export declare class QualityEndpoint extends Endpoint {
29
32
  getEntityProblems(datasetId: string, entityType: string, entityId: string, includeSuppressed?: boolean): Promise<CollectionResult<QualityProblem>>;
30
33
  /** The transition timeline for one problem, oldest first. */
31
34
  getProblemEvents(datasetId: string, entityType: string, entityId: string, code: string): Promise<CollectionResult<QualityProblemEvent>>;
35
+ /**
36
+ * Open a scan: the bracket a reporter puts around one run of checks.
37
+ *
38
+ * `pack` names the group of checks this run covers. It scopes what completing the scan is allowed
39
+ * to close, so a partial run cannot resolve problems it never looked at.
40
+ */
41
+ openScan(datasetId: string, pack?: string | null): Promise<QualityScan>;
42
+ /**
43
+ * Report what an open scan found. Safe to call repeatedly to send entities in batches.
44
+ *
45
+ * Entities are created on first report — there is nothing to register up front.
46
+ *
47
+ * **Batch size**: the API caps a request body at 512 KB (the Gateway rejects over 1 MB before it
48
+ * even arrives), and an entity carrying one problem is roughly 250-300 bytes of JSON — so keep
49
+ * batches to a low four figures of entities. An oversize request comes back as `413` with error
50
+ * code `payload_too_large`. Send several batches into the same scan rather than one large one.
51
+ */
52
+ reportToScan(datasetId: string, scanId: string, entities: QualityReportEntity[]): Promise<QualityReportResult>;
53
+ /**
54
+ * Close the scan, resolving problems the run covered but did not re-report. Returns how many were
55
+ * resolved.
56
+ *
57
+ * Skipping this leaves problems open that the reporter has already stopped finding.
58
+ */
59
+ completeScan(datasetId: string, scanId: string): Promise<number>;
60
+ /**
61
+ * Open a scan, report everything and complete it in one call — for a reporter that already has
62
+ * the full picture in memory and does not need to stream it in batches.
63
+ *
64
+ * Everything goes in one request, so this is bounded by the API's 512 KB body cap — a few
65
+ * thousand entities at most. Beyond that use `openScan` / `reportToScan` / `completeScan`, which
66
+ * can send as many batches as you like into one scan.
67
+ */
68
+ reportProblems(datasetId: string, entities: QualityReportEntity[], pack?: string | null): Promise<QualityReportResult>;
69
+ /**
70
+ * Both report routes take the same already-snake_cased body and return the same counts.
71
+ *
72
+ * `_formatted: true` sends the body verbatim. Without it the client's key formatter would rewrite
73
+ * every key and strip the trailing `_id` from `entity_id`, which the endpoint requires.
74
+ */
75
+ private postReport;
76
+ /**
77
+ * A write that came back with nothing — the base Endpoint maps a 404 to null data, and also
78
+ * returns null when the response cannot be parsed.
79
+ *
80
+ * Reads may legitimately answer "no such thing" with null, but a write cannot: returning a zero
81
+ * count here would be indistinguishable from a report that genuinely changed nothing, and a
82
+ * reporter would log success while its problems went nowhere.
83
+ *
84
+ * The message names both causes because the API cannot yet tell them apart — a missing dataset
85
+ * and a path that no longer exists (a reporter still on `/data_quality/`) both come back as a
86
+ * bare 404. Once the API sets an error `code`, branch on that instead.
87
+ */
88
+ private static writeFailed;
32
89
  /** Clear an entity's problems so the next scan starts from scratch; returns how many were removed. */
33
90
  resetEntity(datasetId: string, entityType: string, entityId: string): Promise<number>;
34
91
  getFilterOptions(datasetId: string): Promise<QualityFilterOptions>;
@@ -1,9 +1,14 @@
1
+ import { path } from '../../Http/Data/Path.js';
2
+ import { HttpStatus } from '../../Http/HttpStatus.js';
1
3
  import { QueryString } from '../../Http/Data/QueryString.js';
4
+ import { ApiError } from '../../Model/Error/ApiError.js';
2
5
  import { QualityDataset } from '../Model/QualityDataset.js';
3
6
  import { QualityEntity } from '../Model/QualityEntity.js';
4
7
  import { QualityProblem } from '../Model/QualityProblem.js';
5
8
  import { QualityProblemDefinition } from '../Model/QualityProblemDefinition.js';
6
9
  import { QualityProblemEvent } from '../Model/QualityProblemEvent.js';
10
+ import { QualityReportResult } from '../Model/QualityReportResult.js';
11
+ import { QualityScan } from '../Model/QualityScan.js';
7
12
  import { QualityEntityProblemSuppression } from '../Model/QualityEntityProblemSuppression.js';
8
13
  import { Endpoint } from '../../Service/Endpoint.js';
9
14
  /**
@@ -18,7 +23,7 @@ export class QualityEndpoint extends Endpoint {
18
23
  return await this.requestCollection(queryString, QualityDataset.parse);
19
24
  }
20
25
  async getDataset(datasetId) {
21
- const result = await this.requestObject('/data-quality/datasets/' + datasetId, null, QualityDataset.parse, 'GET');
26
+ const result = await this.requestObject(path('/data-quality/datasets/:datasetId', { datasetId }), null, QualityDataset.parse, 'GET');
22
27
  return result.getData();
23
28
  }
24
29
  async createDataset(projectId, name, autoCloseMode = null) {
@@ -31,14 +36,14 @@ export class QualityEndpoint extends Endpoint {
31
36
  }
32
37
  async updateDataset(datasetId, changes) {
33
38
  // camelCase keys are snake_cased by the base Endpoint (autoCloseMode -> auto_close_mode).
34
- const result = await this.requestObject('/data-quality/datasets/' + datasetId, changes, QualityDataset.parse, 'PATCH');
39
+ const result = await this.requestObject(path('/data-quality/datasets/:datasetId', { datasetId }), changes, QualityDataset.parse, 'PATCH');
35
40
  return result.getData();
36
41
  }
37
42
  async deleteDataset(datasetId) {
38
- await this.requestObject('/data-quality/datasets/' + datasetId, null, (raw) => raw, 'DELETE');
43
+ await this.requestObject(path('/data-quality/datasets/:datasetId', { datasetId }), null, (raw) => raw, 'DELETE');
39
44
  }
40
45
  async getEntities(datasetId, pagination = null, filters = {}) {
41
- const queryString = new QueryString('/data-quality/datasets/' + datasetId + '/entities');
46
+ const queryString = new QueryString(path('/data-quality/datasets/:datasetId/entities', { datasetId }));
42
47
  if (filters.entityType) {
43
48
  queryString.set('entity_type', filters.entityType);
44
49
  }
@@ -62,9 +67,7 @@ export class QualityEndpoint extends Endpoint {
62
67
  }
63
68
  /** Suppressed problems are hidden unless `includeSuppressed` is set. */
64
69
  async getEntityProblems(datasetId, entityType, entityId, includeSuppressed = false) {
65
- const queryString = new QueryString('/data-quality/datasets/' + datasetId
66
- + '/entities/' + encodeURIComponent(entityType)
67
- + '/' + encodeURIComponent(entityId) + '/problems');
70
+ const queryString = new QueryString(path('/data-quality/datasets/:datasetId/entities/:entityType/:entityId/problems', { datasetId, entityType, entityId }));
68
71
  if (includeSuppressed) {
69
72
  queryString.set('include_suppressed', 'true');
70
73
  }
@@ -72,22 +75,105 @@ export class QualityEndpoint extends Endpoint {
72
75
  }
73
76
  /** The transition timeline for one problem, oldest first. */
74
77
  async getProblemEvents(datasetId, entityType, entityId, code) {
75
- const path = '/data-quality/datasets/' + datasetId
76
- + '/entities/' + encodeURIComponent(entityType)
77
- + '/' + encodeURIComponent(entityId)
78
- + '/problems/' + encodeURIComponent(code) + '/events';
79
- return await this.requestCollection(path, QualityProblemEvent.parse);
78
+ const requestPath = path('/data-quality/datasets/:datasetId/entities/:entityType/:entityId/problems/:code/events', { datasetId, entityType, entityId, code });
79
+ return await this.requestCollection(requestPath, QualityProblemEvent.parse);
80
+ }
81
+ // ---- Ingest ----
82
+ /**
83
+ * Open a scan: the bracket a reporter puts around one run of checks.
84
+ *
85
+ * `pack` names the group of checks this run covers. It scopes what completing the scan is allowed
86
+ * to close, so a partial run cannot resolve problems it never looked at.
87
+ */
88
+ async openScan(datasetId, pack = null) {
89
+ const requestPath = path('/data-quality/datasets/:datasetId/scans', { datasetId });
90
+ const result = await this.requestObject(requestPath, { pack: pack }, QualityScan.parse, 'POST');
91
+ const scan = result.getData();
92
+ if (scan === null) {
93
+ throw QualityEndpoint.writeFailed(requestPath);
94
+ }
95
+ return scan;
96
+ }
97
+ /**
98
+ * Report what an open scan found. Safe to call repeatedly to send entities in batches.
99
+ *
100
+ * Entities are created on first report — there is nothing to register up front.
101
+ *
102
+ * **Batch size**: the API caps a request body at 512 KB (the Gateway rejects over 1 MB before it
103
+ * even arrives), and an entity carrying one problem is roughly 250-300 bytes of JSON — so keep
104
+ * batches to a low four figures of entities. An oversize request comes back as `413` with error
105
+ * code `payload_too_large`. Send several batches into the same scan rather than one large one.
106
+ */
107
+ async reportToScan(datasetId, scanId, entities) {
108
+ return await this.postReport(path('/data-quality/datasets/:datasetId/scans/:scanId/report', { datasetId, scanId }), { entities: entities.map((entity) => entity.toPayload()) });
109
+ }
110
+ /**
111
+ * Close the scan, resolving problems the run covered but did not re-report. Returns how many were
112
+ * resolved.
113
+ *
114
+ * Skipping this leaves problems open that the reporter has already stopped finding.
115
+ */
116
+ async completeScan(datasetId, scanId) {
117
+ const requestPath = path('/data-quality/datasets/:datasetId/scans/:scanId/complete', { datasetId, scanId });
118
+ const result = await this.requestObject(requestPath, {}, (raw) => ({ resolved: Number(raw.resolved ?? 0) }), 'POST');
119
+ const data = result.getData();
120
+ if (data === null) {
121
+ throw QualityEndpoint.writeFailed(requestPath);
122
+ }
123
+ return data.resolved;
124
+ }
125
+ /**
126
+ * Open a scan, report everything and complete it in one call — for a reporter that already has
127
+ * the full picture in memory and does not need to stream it in batches.
128
+ *
129
+ * Everything goes in one request, so this is bounded by the API's 512 KB body cap — a few
130
+ * thousand entities at most. Beyond that use `openScan` / `reportToScan` / `completeScan`, which
131
+ * can send as many batches as you like into one scan.
132
+ */
133
+ async reportProblems(datasetId, entities, pack = null) {
134
+ return await this.postReport(path('/data-quality/datasets/:datasetId/problems', { datasetId }), {
135
+ pack: pack,
136
+ entities: entities.map((entity) => entity.toPayload()),
137
+ });
138
+ }
139
+ /**
140
+ * Both report routes take the same already-snake_cased body and return the same counts.
141
+ *
142
+ * `_formatted: true` sends the body verbatim. Without it the client's key formatter would rewrite
143
+ * every key and strip the trailing `_id` from `entity_id`, which the endpoint requires.
144
+ */
145
+ async postReport(requestPath, body) {
146
+ const result = await this.requestObject(requestPath, { ...body, _formatted: true }, QualityReportResult.parse, 'POST');
147
+ const reportResult = result.getData();
148
+ if (reportResult === null) {
149
+ throw QualityEndpoint.writeFailed(requestPath);
150
+ }
151
+ return reportResult;
152
+ }
153
+ /**
154
+ * A write that came back with nothing — the base Endpoint maps a 404 to null data, and also
155
+ * returns null when the response cannot be parsed.
156
+ *
157
+ * Reads may legitimately answer "no such thing" with null, but a write cannot: returning a zero
158
+ * count here would be indistinguishable from a report that genuinely changed nothing, and a
159
+ * reporter would log success while its problems went nowhere.
160
+ *
161
+ * The message names both causes because the API cannot yet tell them apart — a missing dataset
162
+ * and a path that no longer exists (a reporter still on `/data_quality/`) both come back as a
163
+ * bare 404. Once the API sets an error `code`, branch on that instead.
164
+ */
165
+ static writeFailed(requestPath) {
166
+ return new ApiError('Data Quality write to `' + requestPath + '` returned nothing. Either the dataset or scan does not exist, '
167
+ + 'or the endpoint does not — check the id, and that the client version matches the API.', HttpStatus.HTTP_NOTFOUND);
80
168
  }
81
169
  /** Clear an entity's problems so the next scan starts from scratch; returns how many were removed. */
82
170
  async resetEntity(datasetId, entityType, entityId) {
83
- const path = '/data-quality/datasets/' + datasetId
84
- + '/entities/' + encodeURIComponent(entityType)
85
- + '/' + encodeURIComponent(entityId) + '/reset';
86
- const result = await this.requestObject(path, {}, (raw) => ({ deleted: raw.deleted ?? 0 }), 'POST');
171
+ const requestPath = path('/data-quality/datasets/:datasetId/entities/:entityType/:entityId/reset', { datasetId, entityType, entityId });
172
+ const result = await this.requestObject(requestPath, {}, (raw) => ({ deleted: raw.deleted ?? 0 }), 'POST');
87
173
  return result.getData()?.deleted ?? 0;
88
174
  }
89
175
  async getFilterOptions(datasetId) {
90
- const result = await this.requestObject('/data-quality/datasets/' + datasetId + '/filter-options', null, (raw) => ({
176
+ const result = await this.requestObject(path('/data-quality/datasets/:datasetId/filter-options', { datasetId }), null, (raw) => ({
91
177
  entityTypes: raw.entity_types ?? [],
92
178
  properties: raw.properties ?? [],
93
179
  codes: (raw.codes ?? []).map((row) => ({
@@ -100,7 +186,7 @@ export class QualityEndpoint extends Endpoint {
100
186
  }
101
187
  /** Both groupings in one call: `counts` by (property, severity) and `codes` for the fix cards. */
102
188
  async getSummary(datasetId) {
103
- const result = await this.requestObject('/data-quality/datasets/' + datasetId + '/summary', null, (raw) => ({
189
+ const result = await this.requestObject(path('/data-quality/datasets/:datasetId/summary', { datasetId }), null, (raw) => ({
104
190
  counts: (raw.counts ?? []).map((row) => ({
105
191
  property: row.property,
106
192
  severity: row.severity,
@@ -134,7 +220,7 @@ export class QualityEndpoint extends Endpoint {
134
220
  }
135
221
  // ---- Suppressions ----
136
222
  async getEntityProblemSuppressions(datasetId) {
137
- return await this.requestCollection('/data-quality/datasets/' + datasetId + '/entity-problem-suppressions', QualityEntityProblemSuppression.parse);
223
+ return await this.requestCollection(path('/data-quality/datasets/:datasetId/entity-problem-suppressions', { datasetId }), QualityEntityProblemSuppression.parse);
138
224
  }
139
225
  /**
140
226
  * Suppress a code, either on one entity or — with both entity fields omitted — across the whole
@@ -154,7 +240,7 @@ export class QualityEndpoint extends Endpoint {
154
240
  entity: suppression.entityId ?? null,
155
241
  reason: suppression.reason ?? null,
156
242
  };
157
- const result = await this.requestObject('/data-quality/datasets/' + datasetId + '/entity-problem-suppressions', body, (raw) => ({
243
+ const result = await this.requestObject(path('/data-quality/datasets/:datasetId/entity-problem-suppressions', { datasetId }), body, (raw) => ({
158
244
  suppression: raw.id ? QualityEntityProblemSuppression.parse(raw) : null,
159
245
  muted: Number(raw.muted ?? 0),
160
246
  }), 'POST');
@@ -162,7 +248,7 @@ export class QualityEndpoint extends Endpoint {
162
248
  }
163
249
  /** Lift a suppression; returns how many muted problems were returned to the open list. */
164
250
  async deleteEntityProblemSuppression(datasetId, entityProblemSuppressionId) {
165
- const result = await this.requestObject('/data-quality/datasets/' + datasetId + '/entity-problem-suppressions/' + entityProblemSuppressionId, null, (raw) => ({ reopened: Number(raw.reopened ?? 0) }), 'DELETE');
251
+ const result = await this.requestObject(path('/data-quality/datasets/:datasetId/entity-problem-suppressions/:entityProblemSuppressionId', { datasetId, entityProblemSuppressionId }), null, (raw) => ({ reopened: Number(raw.reopened ?? 0) }), 'DELETE');
166
252
  return result.getData()?.reopened ?? 0;
167
253
  }
168
254
  }
@@ -1,3 +1,4 @@
1
+ import { path } from '../../Http/Data/Path.js';
1
2
  import { QueryString } from '../../Http/Data/QueryString.js';
2
3
  import { Endpoint } from '../../Service/Endpoint.js';
3
4
  import { CatalogFeed } from '../Model/CatalogFeed.js';
@@ -9,7 +10,7 @@ import { CatalogFeed } from '../Model/CatalogFeed.js';
9
10
  */
10
11
  export class CatalogFeedEndpoint extends Endpoint {
11
12
  async getByCatalog(catalogId, pagination = null, expand = []) {
12
- const queryString = new QueryString('/catalogs/' + catalogId.toString() + '/feeds');
13
+ const queryString = new QueryString(path('/catalogs/:catalogId/feeds', { catalogId: catalogId.toString() }));
13
14
  if (expand.length > 0) {
14
15
  queryString.set('expand', expand);
15
16
  }