@attlaz/client 1.96.0 → 1.98.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 (169) 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 +16 -12
  4. package/dist/Client.js +22 -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}/Model/Competitor.d.ts +4 -3
  33. package/dist/{Pulse → MarketPulse}/Model/Competitor.js +6 -5
  34. package/dist/{Pulse → MarketPulse}/Model/MatchedVendorProduct.d.ts +6 -0
  35. package/dist/{Pulse → MarketPulse}/Model/MatchedVendorProduct.js +12 -0
  36. package/dist/{Pulse → MarketPulse}/Model/ReviewMatch.d.ts +8 -0
  37. package/dist/{Pulse → MarketPulse}/Model/ReviewMatch.js +5 -0
  38. package/dist/{Pulse → MarketPulse}/Model/TopCompetitor.d.ts +1 -1
  39. package/dist/{Pulse → MarketPulse}/Model/TopCompetitor.js +2 -2
  40. package/dist/MarketPulse/Model/Vendor.d.ts +21 -0
  41. package/dist/MarketPulse/Model/Vendor.js +30 -0
  42. package/dist/MarketPulse/Service/CompetitorEndpoint.d.ts +37 -0
  43. package/dist/MarketPulse/Service/CompetitorEndpoint.js +49 -0
  44. package/dist/{Pulse → MarketPulse}/Service/CrawlJobEndpoint.d.ts +1 -0
  45. package/dist/{Pulse → MarketPulse}/Service/CrawlJobEndpoint.js +8 -6
  46. package/dist/{Pulse → MarketPulse}/Service/IndexJobEndpoint.js +5 -4
  47. package/dist/{Pulse → MarketPulse}/Service/PriceAlertEndpoint.js +8 -7
  48. package/dist/{Pulse → MarketPulse}/Service/PricingEndpoint.js +9 -8
  49. package/dist/{Pulse → MarketPulse}/Service/ProductGroupEndpoint.js +4 -3
  50. package/dist/{Pulse → MarketPulse}/Service/ProductMatchEndpoint.js +6 -5
  51. package/dist/{Pulse → MarketPulse}/Service/ProductMatchJobEndpoint.js +5 -4
  52. package/dist/{Pulse → MarketPulse}/Service/PulseCatalogProductEndpoint.js +4 -3
  53. package/dist/{Pulse → MarketPulse}/Service/PulseStatisticsEndpoint.js +5 -4
  54. package/dist/MarketPulse/Service/VendorEndpoint.d.ts +26 -0
  55. package/dist/MarketPulse/Service/VendorEndpoint.js +33 -0
  56. package/dist/{Pulse → MarketPulse}/Service/VendorProductEndpoint.js +15 -7
  57. package/dist/Model/Component/Component.d.ts +18 -0
  58. package/dist/Model/Component/Component.js +16 -0
  59. package/dist/Model/Component/ComponentKind.d.ts +8 -0
  60. package/dist/Model/Component/ComponentKind.js +18 -0
  61. package/dist/Model/Component/ComponentStatus.d.ts +31 -0
  62. package/dist/Model/Component/ComponentStatus.js +31 -0
  63. package/dist/Model/Component/ComponentVersion.d.ts +16 -0
  64. package/dist/Model/Component/ComponentVersion.js +15 -0
  65. package/dist/Service/AccessTokenEndpoint.js +3 -2
  66. package/dist/Service/AdapterConnectionEndpoint.js +9 -8
  67. package/dist/Service/AdapterEndpoint.js +3 -2
  68. package/dist/Service/ChannelEndpoint.js +5 -4
  69. package/dist/Service/CodeDeployEndpoint.js +5 -4
  70. package/dist/Service/CodeSourceStrategiesEndpoint.js +3 -2
  71. package/dist/Service/CollectionsEndpoint.js +5 -4
  72. package/dist/Service/CommandExecutionEndpoint.js +2 -1
  73. package/dist/Service/ComponentEndpoint.d.ts +26 -0
  74. package/dist/Service/ComponentEndpoint.js +77 -0
  75. package/dist/Service/ConfigEndpoint.d.ts +6 -1
  76. package/dist/Service/ConfigEndpoint.js +9 -3
  77. package/dist/Service/ConfigurationEndpoint.js +5 -4
  78. package/dist/Service/HealthAlertEndpoint.js +3 -2
  79. package/dist/Service/PlatformEndpoint.js +3 -2
  80. package/dist/Service/PlatformLanguageEndpoint.js +2 -1
  81. package/dist/Service/ProjectEndpoint.js +3 -2
  82. package/dist/Service/ProjectEnvironmentEndpoint.js +3 -2
  83. package/dist/Service/ProviderTokenEndpoint.js +4 -3
  84. package/dist/Service/RunnerPoolEndpoint.js +5 -4
  85. package/dist/Service/SourcesAccountEndpoint.js +6 -5
  86. package/dist/Service/StorageEndpoint.js +8 -7
  87. package/dist/Service/SubscriberEndpoint.js +4 -3
  88. package/dist/Service/TriggerEndpoint.js +5 -4
  89. package/dist/Service/UserActionEndpoint.js +4 -3
  90. package/dist/Service/UserEndpoint.js +3 -2
  91. package/dist/Service/WorkspaceEndpoint.js +2 -1
  92. package/dist/Service/WorkspaceMemberEndpoint.js +5 -4
  93. package/dist/index.d.ts +55 -46
  94. package/dist/index.js +42 -33
  95. package/dist/version.d.ts +1 -1
  96. package/dist/version.js +1 -1
  97. package/package.json +4 -2
  98. package/dist/Pulse/Model/Vendor.d.ts +0 -12
  99. package/dist/Pulse/Model/Vendor.js +0 -18
  100. package/dist/Pulse/Service/CompetitorEndpoint.d.ts +0 -15
  101. package/dist/Pulse/Service/CompetitorEndpoint.js +0 -23
  102. /package/dist/{EnhanceData → DataEnrichment}/Model/GenerateContentBatch.d.ts +0 -0
  103. /package/dist/{EnhanceData → DataEnrichment}/Model/GenerateContentBatch.js +0 -0
  104. /package/dist/{EnhanceData → DataEnrichment}/Model/GenerateContentBatchData.d.ts +0 -0
  105. /package/dist/{EnhanceData → DataEnrichment}/Model/GenerateContentBatchData.js +0 -0
  106. /package/dist/{EnhanceData → DataEnrichment}/Service/GenerateContentEndpoint.d.ts +0 -0
  107. /package/dist/{Pulse → MarketPulse}/Model/CatalogProductWithMatches.d.ts +0 -0
  108. /package/dist/{Pulse → MarketPulse}/Model/CatalogProductWithMatches.js +0 -0
  109. /package/dist/{Pulse → MarketPulse}/Model/CompetingVendorProduct.d.ts +0 -0
  110. /package/dist/{Pulse → MarketPulse}/Model/CompetingVendorProduct.js +0 -0
  111. /package/dist/{Pulse → MarketPulse}/Model/CrawlJob.d.ts +0 -0
  112. /package/dist/{Pulse → MarketPulse}/Model/CrawlJob.js +0 -0
  113. /package/dist/{Pulse → MarketPulse}/Model/IndexJob.d.ts +0 -0
  114. /package/dist/{Pulse → MarketPulse}/Model/IndexJob.js +0 -0
  115. /package/dist/{Pulse → MarketPulse}/Model/MarketSummaryEntry.d.ts +0 -0
  116. /package/dist/{Pulse → MarketPulse}/Model/MarketSummaryEntry.js +0 -0
  117. /package/dist/{Pulse → MarketPulse}/Model/MatchHistory.d.ts +0 -0
  118. /package/dist/{Pulse → MarketPulse}/Model/MatchHistory.js +0 -0
  119. /package/dist/{Pulse → MarketPulse}/Model/MatchHistoryBucket.d.ts +0 -0
  120. /package/dist/{Pulse → MarketPulse}/Model/MatchHistoryBucket.js +0 -0
  121. /package/dist/{Pulse → MarketPulse}/Model/MatchHistoryInterval.d.ts +0 -0
  122. /package/dist/{Pulse → MarketPulse}/Model/MatchHistoryInterval.js +0 -0
  123. /package/dist/{Pulse → MarketPulse}/Model/PriceAlertConfig.d.ts +0 -0
  124. /package/dist/{Pulse → MarketPulse}/Model/PriceAlertConfig.js +0 -0
  125. /package/dist/{Pulse → MarketPulse}/Model/PriceAlertConfigData.d.ts +0 -0
  126. /package/dist/{Pulse → MarketPulse}/Model/PriceAlertConfigData.js +0 -0
  127. /package/dist/{Pulse → MarketPulse}/Model/PriceAlertEvent.d.ts +0 -0
  128. /package/dist/{Pulse → MarketPulse}/Model/PriceAlertEvent.js +0 -0
  129. /package/dist/{Pulse → MarketPulse}/Model/PriceIndexSnapshotEntry.d.ts +0 -0
  130. /package/dist/{Pulse → MarketPulse}/Model/PriceIndexSnapshotEntry.js +0 -0
  131. /package/dist/{Pulse → MarketPulse}/Model/PriceSuggestion.d.ts +0 -0
  132. /package/dist/{Pulse → MarketPulse}/Model/PriceSuggestion.js +0 -0
  133. /package/dist/{Pulse → MarketPulse}/Model/PricingRule.d.ts +0 -0
  134. /package/dist/{Pulse → MarketPulse}/Model/PricingRule.js +0 -0
  135. /package/dist/{Pulse → MarketPulse}/Model/PricingRuleData.d.ts +0 -0
  136. /package/dist/{Pulse → MarketPulse}/Model/PricingRuleData.js +0 -0
  137. /package/dist/{Pulse → MarketPulse}/Model/ProductGroup.d.ts +0 -0
  138. /package/dist/{Pulse → MarketPulse}/Model/ProductGroup.js +0 -0
  139. /package/dist/{Pulse → MarketPulse}/Model/ProductGroupData.d.ts +0 -0
  140. /package/dist/{Pulse → MarketPulse}/Model/ProductGroupData.js +0 -0
  141. /package/dist/{Pulse → MarketPulse}/Model/ProductMatch.d.ts +0 -0
  142. /package/dist/{Pulse → MarketPulse}/Model/ProductMatch.js +0 -0
  143. /package/dist/{Pulse → MarketPulse}/Model/ProductMatchJob.d.ts +0 -0
  144. /package/dist/{Pulse → MarketPulse}/Model/ProductMatchJob.js +0 -0
  145. /package/dist/{Pulse → MarketPulse}/Model/ProductSegmentType.d.ts +0 -0
  146. /package/dist/{Pulse → MarketPulse}/Model/ProductSegmentType.js +0 -0
  147. /package/dist/{Pulse → MarketPulse}/Model/ProductsSegment.d.ts +0 -0
  148. /package/dist/{Pulse → MarketPulse}/Model/ProductsSegment.js +0 -0
  149. /package/dist/{Pulse → MarketPulse}/Model/PulseCatalogProductFilterOptions.d.ts +0 -0
  150. /package/dist/{Pulse → MarketPulse}/Model/PulseCatalogProductFilterOptions.js +0 -0
  151. /package/dist/{Pulse → MarketPulse}/Model/PulseCatalogProductFilters.d.ts +0 -0
  152. /package/dist/{Pulse → MarketPulse}/Model/PulseCatalogProductFilters.js +0 -0
  153. /package/dist/{Pulse → MarketPulse}/Model/ReviewMatchFilters.d.ts +0 -0
  154. /package/dist/{Pulse → MarketPulse}/Model/ReviewMatchFilters.js +0 -0
  155. /package/dist/{Pulse → MarketPulse}/Model/VendorProduct.d.ts +0 -0
  156. /package/dist/{Pulse → MarketPulse}/Model/VendorProduct.js +0 -0
  157. /package/dist/{Pulse → MarketPulse}/Model/VendorProductPriceHistoryEntry.d.ts +0 -0
  158. /package/dist/{Pulse → MarketPulse}/Model/VendorProductPriceHistoryEntry.js +0 -0
  159. /package/dist/{Pulse → MarketPulse}/Model/VendorStatus.d.ts +0 -0
  160. /package/dist/{Pulse → MarketPulse}/Model/VendorStatus.js +0 -0
  161. /package/dist/{Pulse → MarketPulse}/Service/IndexJobEndpoint.d.ts +0 -0
  162. /package/dist/{Pulse → MarketPulse}/Service/PriceAlertEndpoint.d.ts +0 -0
  163. /package/dist/{Pulse → MarketPulse}/Service/PricingEndpoint.d.ts +0 -0
  164. /package/dist/{Pulse → MarketPulse}/Service/ProductGroupEndpoint.d.ts +0 -0
  165. /package/dist/{Pulse → MarketPulse}/Service/ProductMatchEndpoint.d.ts +0 -0
  166. /package/dist/{Pulse → MarketPulse}/Service/ProductMatchJobEndpoint.d.ts +0 -0
  167. /package/dist/{Pulse → MarketPulse}/Service/PulseCatalogProductEndpoint.d.ts +0 -0
  168. /package/dist/{Pulse → MarketPulse}/Service/PulseStatisticsEndpoint.d.ts +0 -0
  169. /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 { Endpoint } from '../../Service/Endpoint.js';
3
4
  import { ProductMatch } from '../Model/ProductMatch.js';
@@ -9,7 +10,7 @@ import { ReviewMatch } from '../Model/ReviewMatch.js';
9
10
  export class ProductMatchEndpoint extends Endpoint {
10
11
  /** The review queue of a catalog; pending matches unless `statuses` says otherwise. */
11
12
  async getForReview(catalogId, pagination = null, filters = {}) {
12
- const queryString = new QueryString('/pulse/catalogs/' + catalogId.toString() + '/matches');
13
+ const queryString = new QueryString(path('/pulse/catalogs/:catalogId/matches', { catalogId: catalogId.toString() }));
13
14
  queryString.set('status', (filters.statuses ?? ['pending']).join(','));
14
15
  if (filters.competitor) {
15
16
  queryString.set('competitor', filters.competitor);
@@ -25,20 +26,20 @@ export class ProductMatchEndpoint extends Endpoint {
25
26
  }
26
27
  /** The match record, or null. */
27
28
  async getById(matchId) {
28
- const result = await this.requestObject('/pulse/matches/' + matchId, null, ProductMatch.parse, 'GET');
29
+ const result = await this.requestObject(path('/pulse/matches/:matchId', { matchId }), null, ProductMatch.parse, 'GET');
29
30
  return result.getData();
30
31
  }
31
32
  /** Confirm a match. `note` records why, for the reviewer's own audit trail. */
32
33
  async accept(matchId, note = null) {
33
- await this.requestObject('/pulse/matches/' + matchId + '/accept', note === null ? {} : { note }, (raw) => raw, 'POST');
34
+ await this.requestObject(path('/pulse/matches/:matchId/accept', { matchId }), note === null ? {} : { note }, (raw) => raw, 'POST');
34
35
  }
35
36
  /** Reject a match, so it stops counting towards the competitor's price index. */
36
37
  async decline(matchId, note = null) {
37
- await this.requestObject('/pulse/matches/' + matchId + '/decline', note === null ? {} : { note }, (raw) => raw, 'POST');
38
+ await this.requestObject(path('/pulse/matches/:matchId/decline', { matchId }), note === null ? {} : { note }, (raw) => raw, 'POST');
38
39
  }
39
40
  /** How many matches were discovered and reviewed over time, optionally for one competitor. */
40
41
  async getHistory(catalogId, competitor = null, interval = 'day') {
41
- const queryString = new QueryString('/pulse/catalogs/' + catalogId.toString() + '/matches/history');
42
+ const queryString = new QueryString(path('/pulse/catalogs/:catalogId/matches/history', { catalogId: catalogId.toString() }));
42
43
  queryString.set('interval', interval);
43
44
  if (competitor !== null) {
44
45
  queryString.set('competitor', competitor);
@@ -1,3 +1,4 @@
1
+ import { path } from '../../Http/Data/Path.js';
1
2
  import { QueryString } from '../../Http/Data/QueryString.js';
2
3
  import { ProductMatchJob } from '../Model/ProductMatchJob.js';
3
4
  import { Endpoint } from '../../Service/Endpoint.js';
@@ -8,23 +9,23 @@ import { Endpoint } from '../../Service/Endpoint.js';
8
9
  export class ProductMatchJobEndpoint extends Endpoint {
9
10
  /** Every match job of a catalog, newest first. */
10
11
  async getByCatalog(catalogId, pagination = null) {
11
- const queryString = new QueryString('/pulse/catalogs/' + catalogId.toString() + '/match-jobs');
12
+ const queryString = new QueryString(path('/pulse/catalogs/:catalogId/match-jobs', { catalogId: catalogId.toString() }));
12
13
  queryString.addPagination(pagination);
13
14
  return await this.requestCollection(queryString, ProductMatchJob.parse);
14
15
  }
15
16
  /** The match jobs of one of the catalog's competitors. */
16
17
  async getByVendor(catalogId, vendorId, pagination = null) {
17
- const queryString = new QueryString('/pulse/catalogs/' + catalogId.toString() + '/vendors/' + vendorId + '/match-jobs');
18
+ const queryString = new QueryString(path('/pulse/catalogs/:catalogId/vendors/:vendorId/match-jobs', { catalogId: catalogId.toString(), vendorId }));
18
19
  queryString.addPagination(pagination);
19
20
  return await this.requestCollection(queryString, ProductMatchJob.parse);
20
21
  }
21
22
  /** Queue a matching run of the catalog against one competitor. */
22
23
  async requestMatching(catalogId, vendorId) {
23
- await this.requestObject('/pulse/catalogs/' + catalogId.toString() + '/vendors/' + vendorId + '/match', {}, (raw) => raw, 'POST');
24
+ await this.requestObject(path('/pulse/catalogs/:catalogId/vendors/:vendorId/match', { catalogId: catalogId.toString(), vendorId }), {}, (raw) => raw, 'POST');
24
25
  }
25
26
  /** The match job with this id, or null. */
26
27
  async getById(productMatchJobId) {
27
- const result = await this.requestObject('/pulse/match-jobs/' + productMatchJobId, null, ProductMatchJob.parse, 'GET');
28
+ const result = await this.requestObject(path('/pulse/match-jobs/:productMatchJobId', { productMatchJobId }), null, ProductMatchJob.parse, 'GET');
28
29
  return result.getData();
29
30
  }
30
31
  }
@@ -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 { CatalogProductWithMatches } from '../Model/CatalogProductWithMatches.js';
@@ -13,7 +14,7 @@ export class PulseCatalogProductEndpoint extends Endpoint {
13
14
  * anything the simple filters cannot express.
14
15
  */
15
16
  async getProducts(catalogId, pagination = null, filters = {}, filter = null) {
16
- const queryString = new QueryString('/pulse/catalogs/' + catalogId.toString() + '/products');
17
+ const queryString = new QueryString(path('/pulse/catalogs/:catalogId/products', { catalogId: catalogId.toString() }));
17
18
  queryString.set('expand', ['matches.vendor']);
18
19
  if (filters.brand) {
19
20
  queryString.set('brand', filters.brand);
@@ -39,7 +40,7 @@ export class PulseCatalogProductEndpoint extends Endpoint {
39
40
  return await this.requestCollection(queryString, CatalogProductWithMatches.parse);
40
41
  }
41
42
  async getFilterOptions(catalogId) {
42
- const result = await this.requestObject('/pulse/catalogs/' + catalogId.toString() + '/filter-options', null, (raw) => ({
43
+ const result = await this.requestObject(path('/pulse/catalogs/:catalogId/filter-options', { catalogId: catalogId.toString() }), null, (raw) => ({
43
44
  brands: raw.brands ?? [],
44
45
  categories: raw.categories ?? [],
45
46
  productGroups: raw.product_groups ?? [],
@@ -49,6 +50,6 @@ export class PulseCatalogProductEndpoint extends Endpoint {
49
50
  }
50
51
  /** Recalculate the catalog's cached statistics (price index, match counts, segments). */
51
52
  async recomputeStatistics(catalogId) {
52
- await this.requestObject('/pulse/catalogs/' + catalogId.toString() + '/recompute-stats', {}, (raw) => raw, 'POST');
53
+ await this.requestObject(path('/pulse/catalogs/:catalogId/recompute-stats', { catalogId: catalogId.toString() }), {}, (raw) => raw, 'POST');
53
54
  }
54
55
  }
@@ -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 { PriceIndexSnapshotEntry } from '../Model/PriceIndexSnapshotEntry.js';
@@ -9,7 +10,7 @@ import { TopCompetitor } from '../Model/TopCompetitor.js';
9
10
  export class PulseStatisticsEndpoint extends Endpoint {
10
11
  /** Headline figures (products tracked, matches, competitors …) against the previous period. */
11
12
  async getAccountSummary(catalogId) {
12
- return await this.requestCollection('/pulse/catalogs/' + catalogId.toString() + '/statistics/account-summary', (raw) => ({
13
+ return await this.requestCollection(path('/pulse/catalogs/:catalogId/statistics/account-summary', { catalogId: catalogId.toString() }), (raw) => ({
13
14
  id: raw.id,
14
15
  title: raw.title,
15
16
  currentAmount: raw.current_amount ?? 0,
@@ -18,7 +19,7 @@ export class PulseStatisticsEndpoint extends Endpoint {
18
19
  }
19
20
  /** Distribution of the catalog's products across price or profit segments. */
20
21
  async getProductSegments(catalogId, type = null) {
21
- const queryString = new QueryString('/pulse/catalogs/' + catalogId.toString() + '/statistics/product-segments');
22
+ const queryString = new QueryString(path('/pulse/catalogs/:catalogId/statistics/product-segments', { catalogId: catalogId.toString() }));
22
23
  if (type !== null) {
23
24
  queryString.set('type', type);
24
25
  }
@@ -33,7 +34,7 @@ export class PulseStatisticsEndpoint extends Endpoint {
33
34
  * the comparison against the previous period spans.
34
35
  */
35
36
  async getTopCompetitors(catalogId, limit = null, period = null) {
36
- const queryString = new QueryString('/pulse/catalogs/' + catalogId.toString() + '/statistics/top-competitors');
37
+ const queryString = new QueryString(path('/pulse/catalogs/:catalogId/statistics/top-competitors', { catalogId: catalogId.toString() }));
37
38
  if (limit !== null) {
38
39
  queryString.set('limit', limit);
39
40
  }
@@ -47,7 +48,7 @@ export class PulseStatisticsEndpoint extends Endpoint {
47
48
  * optionally a product group to scope to and a date range (`YYYY-MM-DD`).
48
49
  */
49
50
  async getPriceIndexHistory(catalogId, competitorIds = [], options = {}) {
50
- const queryString = new QueryString('/pulse/catalogs/' + catalogId.toString() + '/statistics/price-index-history');
51
+ const queryString = new QueryString(path('/pulse/catalogs/:catalogId/statistics/price-index-history', { catalogId: catalogId.toString() }));
51
52
  if (competitorIds.length > 0) {
52
53
  queryString.set('competitor', competitorIds.join(','));
53
54
  }
@@ -0,0 +1,26 @@
1
+ import { Endpoint } from '../../Service/Endpoint.js';
2
+ import { Vendor } from '../Model/Vendor.js';
3
+ /**
4
+ * Vendors — the shops Market Pulse knows about, independent of who watches them.
5
+ *
6
+ * Creating a vendor and watching it as a competitor are separate steps: create here, then link it
7
+ * to a catalog with {@link CompetitorEndpoint.add}. That split is what lets one vendor be watched
8
+ * by several catalogs without being duplicated.
9
+ *
10
+ * There is deliberately no "list vendors" method: vendors are global, so listing them would expose
11
+ * every customer's tracked shops. Discovery gets designed alongside the UI that needs it.
12
+ */
13
+ export declare class VendorEndpoint extends Endpoint {
14
+ getById(vendorId: string): Promise<Vendor | null>;
15
+ /**
16
+ * Register a shop.
17
+ *
18
+ * `url` is normalised server-side (scheme added, trailing slash dropped, host lowercased), and a
19
+ * storefront that already has a vendor is rejected — so this is safe to call without checking
20
+ * first, but it will throw rather than return the existing vendor.
21
+ *
22
+ * @param url Storefront root. A locale path is significant: `https://shop.com/nl` is a
23
+ * different storefront from `https://shop.com`.
24
+ */
25
+ create(name: string, url: string, currency?: string | null, type?: string | null): Promise<Vendor | null>;
26
+ }
@@ -0,0 +1,33 @@
1
+ import { path } from '../../Http/Data/Path.js';
2
+ import { Endpoint } from '../../Service/Endpoint.js';
3
+ import { Vendor } from '../Model/Vendor.js';
4
+ /**
5
+ * Vendors — the shops Market Pulse knows about, independent of who watches them.
6
+ *
7
+ * Creating a vendor and watching it as a competitor are separate steps: create here, then link it
8
+ * to a catalog with {@link CompetitorEndpoint.add}. That split is what lets one vendor be watched
9
+ * by several catalogs without being duplicated.
10
+ *
11
+ * There is deliberately no "list vendors" method: vendors are global, so listing them would expose
12
+ * every customer's tracked shops. Discovery gets designed alongside the UI that needs it.
13
+ */
14
+ export class VendorEndpoint extends Endpoint {
15
+ async getById(vendorId) {
16
+ const result = await this.requestObject(path('/pulse/vendors/:vendorId', { vendorId }), null, Vendor.parse, 'GET');
17
+ return result.getData();
18
+ }
19
+ /**
20
+ * Register a shop.
21
+ *
22
+ * `url` is normalised server-side (scheme added, trailing slash dropped, host lowercased), and a
23
+ * storefront that already has a vendor is rejected — so this is safe to call without checking
24
+ * first, but it will throw rather than return the existing vendor.
25
+ *
26
+ * @param url Storefront root. A locale path is significant: `https://shop.com/nl` is a
27
+ * different storefront from `https://shop.com`.
28
+ */
29
+ async create(name, url, currency = null, type = null) {
30
+ const result = await this.requestObject('/pulse/vendors', { name, url, currency, type }, Vendor.parse, 'POST');
31
+ return result.getData();
32
+ }
33
+ }
@@ -1,3 +1,4 @@
1
+ import { path } from '../../Http/Data/Path.js';
1
2
  import { QueryString } from '../../Http/Data/QueryString.js';
2
3
  import { CompetingVendorProduct } from '../Model/CompetingVendorProduct.js';
3
4
  import { VendorProduct } from '../Model/VendorProduct.js';
@@ -10,7 +11,7 @@ import { Endpoint } from '../../Service/Endpoint.js';
10
11
  export class VendorProductEndpoint extends Endpoint {
11
12
  /** The product with this identifier for the vendor, or null. */
12
13
  async getByIdentifier(vendorId, identifier) {
13
- const result = await this.requestCollection('/pulse/vendors/' + vendorId + '/products?identifier=' + encodeURIComponent(identifier), VendorProduct.parse);
14
+ const result = await this.requestCollection(path('/pulse/vendors/:vendorId/products', { vendorId }) + '?identifier=' + encodeURIComponent(identifier), VendorProduct.parse);
14
15
  const products = result.getData();
15
16
  return products.length > 0 ? products[0] : null;
16
17
  }
@@ -19,18 +20,18 @@ export class VendorProductEndpoint extends Endpoint {
19
20
  * Same products as {@link getByVendor}, read through the competitor, so `competitorId` is set.
20
21
  */
21
22
  async getByCompetitor(competitorId, pagination = null) {
22
- const queryString = new QueryString('/pulse/competing-vendors/' + competitorId + '/products');
23
+ const queryString = new QueryString(path('/pulse/competing-vendors/:competitorId/products', { competitorId }));
23
24
  queryString.addPagination(pagination);
24
25
  return await this.requestCollection(queryString, CompetingVendorProduct.parse);
25
26
  }
26
27
  /** A single competitor product — `/pulse/competing-vendors/products/:id`. */
27
28
  async getCompetitorProductById(competingVendorProductId) {
28
- const result = await this.requestObject('/pulse/competing-vendors/products/' + competingVendorProductId, null, CompetingVendorProduct.parse, 'GET');
29
+ const result = await this.requestObject(path('/pulse/competing-vendors/products/:competingVendorProductId', { competingVendorProductId }), null, CompetingVendorProduct.parse, 'GET');
29
30
  return result.getData();
30
31
  }
31
32
  /** A vendor's products. */
32
33
  async getByVendor(vendorId, pagination = null) {
33
- const queryString = new QueryString('/pulse/vendors/' + vendorId + '/products');
34
+ const queryString = new QueryString(path('/pulse/vendors/:vendorId/products', { vendorId }));
34
35
  queryString.addPagination(pagination);
35
36
  return await this.requestCollection(queryString, VendorProduct.parse);
36
37
  }
@@ -39,7 +40,7 @@ export class VendorProductEndpoint extends Endpoint {
39
40
  * entries (the API defaults to 365).
40
41
  */
41
42
  async getPriceHistory(vendorProductId, limit = null) {
42
- const queryString = new QueryString('/pulse/vendor-products/' + vendorProductId + '/price-history');
43
+ const queryString = new QueryString(path('/pulse/vendor-products/:vendorProductId/price-history', { vendorProductId }));
43
44
  if (limit !== null) {
44
45
  queryString.set('limit', limit.toString());
45
46
  }
@@ -54,6 +55,7 @@ export class VendorProductEndpoint extends Endpoint {
54
55
  image: product.image,
55
56
  identifier: product.identifier,
56
57
  gtin: product.gtin,
58
+ sku: product.sku,
57
59
  brand: product.brand,
58
60
  url: product.url,
59
61
  currency: product.currency,
@@ -63,12 +65,13 @@ export class VendorProductEndpoint extends Endpoint {
63
65
  isInStock: product.isInStock,
64
66
  properties: product.properties,
65
67
  };
66
- const result = await this.requestObject('/pulse/vendors/' + product.vendorId + '/products', body, VendorProduct.parse, 'POST');
68
+ const result = await this.requestObject(path('/pulse/vendors/:vendorId/products', { vendorId: product.vendorId }), body, VendorProduct.parse, 'POST');
67
69
  return result.getData() ?? product;
68
70
  }
69
71
  /** Update the mutable fields of an existing vendor product (JSON-patch style, per the API). */
70
72
  async update(product) {
71
73
  const operations = [
74
+ { op: 'add', path: 'name', value: product.name },
72
75
  { op: 'add', path: 'price', value: product.price },
73
76
  { op: 'add', path: 'original_price', value: product.originalPrice },
74
77
  { op: 'add', path: 'brand', value: product.brand },
@@ -77,8 +80,13 @@ export class VendorProductEndpoint extends Endpoint {
77
80
  { op: 'add', path: 'url', value: product.url },
78
81
  { op: 'add', path: 'gtin', value: product.gtin },
79
82
  { op: 'add', path: 'image', value: product.image },
83
+ { op: 'add', path: 'sku', value: product.sku },
84
+ { op: 'add', path: 'currency', value: product.currency },
80
85
  { op: 'add', path: 'properties', value: product.properties },
81
86
  ];
82
- await this.requestObject('/pulse/vendors/' + product.vendorId + '/products/' + product.id, operations, (raw) => raw, 'PATCH');
87
+ if (product.id === null) {
88
+ throw new Error('Unable to update vendor product: the product has no id. Save it first.');
89
+ }
90
+ await this.requestObject(path('/pulse/vendors/:vendorId/products/:id', { vendorId: product.vendorId, id: product.id }), operations, (raw) => raw, 'PATCH');
83
91
  }
84
92
  }
@@ -0,0 +1,18 @@
1
+ import { State } from '../State.js';
2
+ import { ComponentKind } from './ComponentKind.js';
3
+ /** One thing the platform builds and deploys: an api, a service, or the runner. */
4
+ export declare class Component {
5
+ id: string;
6
+ name: string;
7
+ kind: ComponentKind;
8
+ /** Registry path without a tag, e.g. `registry.gitlab.com/attlaz/platform/message_service`. */
9
+ imageRepository: string;
10
+ /**
11
+ * The version that *should* be deployed — desired state, set by promoting. Null means the
12
+ * component is not managed this way, never "deploy nothing".
13
+ */
14
+ activeVersionId: string | null;
15
+ createdAt: Date;
16
+ updatedAt: Date;
17
+ state: State;
18
+ }
@@ -0,0 +1,16 @@
1
+ /** One thing the platform builds and deploys: an api, a service, or the runner. */
2
+ export class Component {
3
+ id;
4
+ name;
5
+ kind;
6
+ /** Registry path without a tag, e.g. `registry.gitlab.com/attlaz/platform/message_service`. */
7
+ imageRepository;
8
+ /**
9
+ * The version that *should* be deployed — desired state, set by promoting. Null means the
10
+ * component is not managed this way, never "deploy nothing".
11
+ */
12
+ activeVersionId;
13
+ createdAt;
14
+ updatedAt;
15
+ state;
16
+ }
@@ -0,0 +1,8 @@
1
+ export declare enum ComponentKind {
2
+ Api = "api",
3
+ Service = "service",
4
+ Runner = "runner"
5
+ }
6
+ export declare namespace ComponentKind {
7
+ const fromString: (input: string) => ComponentKind;
8
+ }
@@ -0,0 +1,18 @@
1
+ export var ComponentKind;
2
+ (function (ComponentKind) {
3
+ ComponentKind["Api"] = "api";
4
+ ComponentKind["Service"] = "service";
5
+ ComponentKind["Runner"] = "runner";
6
+ })(ComponentKind || (ComponentKind = {}));
7
+ (function (ComponentKind) {
8
+ ComponentKind.fromString = (input) => {
9
+ switch (input) {
10
+ case ComponentKind.Api:
11
+ case ComponentKind.Service:
12
+ case ComponentKind.Runner:
13
+ return input;
14
+ default:
15
+ throw new Error('Unknown ComponentKind "' + input + '"');
16
+ }
17
+ };
18
+ })(ComponentKind || (ComponentKind = {}));
@@ -0,0 +1,31 @@
1
+ /**
2
+ * What one Kubernetes deployment of a component actually runs, as last observed.
3
+ *
4
+ * The counterpart to `Component.activeVersionId`: that is what should run, this is what does.
5
+ * One row per deployment — a component running several version lines has several.
6
+ */
7
+ export declare class ComponentStatus {
8
+ id: string;
9
+ componentId: string;
10
+ namespace: string;
11
+ deploymentName: string;
12
+ /** Fully-qualified image including the tag, exactly as the container reports it. */
13
+ image: string;
14
+ readyReplicas: number;
15
+ desiredReplicas: number;
16
+ /**
17
+ * Whether enough replicas are ready to serve. **True for a deployment scaled to zero** — with no
18
+ * replicas wanted, the requirement is trivially met. Treat `desiredReplicas > 0 &&
19
+ * readyReplicas < desiredReplicas` as unhealthy rather than trusting this alone.
20
+ */
21
+ available: boolean;
22
+ /**
23
+ * Reads backwards: false means the last rollout missed its deadline, i.e. the deploy failed.
24
+ * True covers both a settled deployment and one still rolling out. Replica counts cannot
25
+ * substitute — a new pod that never becomes ready leaves the old ones serving, so the counts
26
+ * still look right while the deploy has failed.
27
+ */
28
+ progressing: boolean;
29
+ /** When the cluster was last read. Stale means nobody has looked, not that all is well. */
30
+ observedAt: Date;
31
+ }
@@ -0,0 +1,31 @@
1
+ /**
2
+ * What one Kubernetes deployment of a component actually runs, as last observed.
3
+ *
4
+ * The counterpart to `Component.activeVersionId`: that is what should run, this is what does.
5
+ * One row per deployment — a component running several version lines has several.
6
+ */
7
+ export class ComponentStatus {
8
+ id;
9
+ componentId;
10
+ namespace;
11
+ deploymentName;
12
+ /** Fully-qualified image including the tag, exactly as the container reports it. */
13
+ image;
14
+ readyReplicas;
15
+ desiredReplicas;
16
+ /**
17
+ * Whether enough replicas are ready to serve. **True for a deployment scaled to zero** — with no
18
+ * replicas wanted, the requirement is trivially met. Treat `desiredReplicas > 0 &&
19
+ * readyReplicas < desiredReplicas` as unhealthy rather than trusting this alone.
20
+ */
21
+ available;
22
+ /**
23
+ * Reads backwards: false means the last rollout missed its deadline, i.e. the deploy failed.
24
+ * True covers both a settled deployment and one still rolling out. Replica counts cannot
25
+ * substitute — a new pod that never becomes ready leaves the old ones serving, so the counts
26
+ * still look right while the deploy has failed.
27
+ */
28
+ progressing;
29
+ /** When the cluster was last read. Stale means nobody has looked, not that all is well. */
30
+ observedAt;
31
+ }
@@ -0,0 +1,16 @@
1
+ import { State } from '../State.js';
2
+ /** One tag of a component as the container registry has it. */
3
+ export declare class ComponentVersion {
4
+ id: string;
5
+ componentId: string;
6
+ /** The registry tag, e.g. `1.15.1`. */
7
+ version: string;
8
+ /** Fully-qualified reference including the tag. */
9
+ image: string;
10
+ /**
11
+ * When the image was published to the registry and became available to select. Not a build time,
12
+ * and not evidence it was ever deployed — most versions never are.
13
+ */
14
+ releasedAt: Date;
15
+ state: State;
16
+ }
@@ -0,0 +1,15 @@
1
+ /** One tag of a component as the container registry has it. */
2
+ export class ComponentVersion {
3
+ id;
4
+ componentId;
5
+ /** The registry tag, e.g. `1.15.1`. */
6
+ version;
7
+ /** Fully-qualified reference including the tag. */
8
+ image;
9
+ /**
10
+ * When the image was published to the registry and became available to select. Not a build time,
11
+ * and not evidence it was ever deployed — most versions never are.
12
+ */
13
+ releasedAt;
14
+ state;
15
+ }
@@ -1,3 +1,4 @@
1
+ import { path } from '../Http/Data/Path.js';
1
2
  import { QueryString } from '../Http/Data/QueryString.js';
2
3
  import { UserAccessToken } from '../Model/AccessToken/UserAccessToken.js';
3
4
  import { Endpoint } from './Endpoint.js';
@@ -43,7 +44,7 @@ export class AccessTokenEndpoint extends Endpoint {
43
44
  }
44
45
  async update(tokenId, name) {
45
46
  try {
46
- const url = '/access-tokens/' + tokenId;
47
+ const url = path('/access-tokens/:tokenId', { tokenId });
47
48
  const result = await this.requestObject(url, {
48
49
  name,
49
50
  }, UserAccessToken.parse, 'POST');
@@ -62,7 +63,7 @@ export class AccessTokenEndpoint extends Endpoint {
62
63
  }
63
64
  async revoke(tokenId) {
64
65
  try {
65
- const url = '/access-tokens/' + tokenId;
66
+ const url = path('/access-tokens/:tokenId', { tokenId });
66
67
  const parser = (raw) => ({ revoked: raw.revoked });
67
68
  const result = await this.requestObject(url, null, parser, 'DELETE');
68
69
  const res = result.getData();
@@ -1,3 +1,4 @@
1
+ import { path } from '../Http/Data/Path.js';
1
2
  import { AdapterConnection } from '../Model/Adapter/AdapterConnection.js';
2
3
  import { parseTestConnectionResult } from '../Model/Adapter/TestConnectionResult.js';
3
4
  import { QueryString } from '../Http/Data/QueryString.js';
@@ -6,7 +7,7 @@ import { Endpoint } from './Endpoint.js';
6
7
  export class AdapterConnectionEndpoint extends Endpoint {
7
8
  async getConnections(projectId, pagination) {
8
9
  try {
9
- const queryString = new QueryString('/projects/' + projectId + '/connections');
10
+ const queryString = new QueryString(path('/projects/:projectId/connections', { projectId }));
10
11
  queryString.addPagination(pagination);
11
12
  return await this.requestCollection(queryString, AdapterConnection.parse);
12
13
  }
@@ -19,7 +20,7 @@ export class AdapterConnectionEndpoint extends Endpoint {
19
20
  }
20
21
  async getConnectionById(connectionId) {
21
22
  try {
22
- const url = '/connections/' + connectionId;
23
+ const url = path('/connections/:connectionId', { connectionId });
23
24
  const result = await this.requestObject(url, null, AdapterConnection.parse);
24
25
  return result.getData();
25
26
  }
@@ -32,7 +33,7 @@ export class AdapterConnectionEndpoint extends Endpoint {
32
33
  }
33
34
  async getConnectionByKey(projectId, connectionKey) {
34
35
  try {
35
- const url = '/projects/' + projectId + '/connections/' + connectionKey;
36
+ const url = path('/projects/:projectId/connections/:connectionKey', { projectId, connectionKey });
36
37
  const result = await this.requestObject(url, null, AdapterConnection.parse);
37
38
  return result.getData();
38
39
  }
@@ -45,7 +46,7 @@ export class AdapterConnectionEndpoint extends Endpoint {
45
46
  }
46
47
  async getConnectionConfiguration(connectionId) {
47
48
  try {
48
- const url = '/connections/' + connectionId + '/configuration';
49
+ const url = path('/connections/:connectionId/configuration', { connectionId });
49
50
  const parser = (raw) => ({
50
51
  id: raw.id,
51
52
  adapterConnectionId: raw.adapter_connection,
@@ -63,7 +64,7 @@ export class AdapterConnectionEndpoint extends Endpoint {
63
64
  }
64
65
  async saveConnection(projectId, connection) {
65
66
  try {
66
- const url = '/projects/' + projectId + '/connections';
67
+ const url = path('/projects/:projectId/connections', { projectId });
67
68
  const result = await this.requestObject(url, connection, AdapterConnection.parse, 'POST');
68
69
  const updatedAdapterConnection = result.getData();
69
70
  if (updatedAdapterConnection === null) {
@@ -80,7 +81,7 @@ export class AdapterConnectionEndpoint extends Endpoint {
80
81
  }
81
82
  async saveConnectionConfiguration(connectionId, configuration) {
82
83
  try {
83
- const url = '/connections/' + connectionId + '/configuration';
84
+ const url = path('/connections/:connectionId/configuration', { connectionId });
84
85
  const parser = (raw) => ({ saved: raw.saved });
85
86
  const result = await this.requestObject(url, { configuration: configuration }, parser, 'POST');
86
87
  const res = result.getData();
@@ -97,7 +98,7 @@ export class AdapterConnectionEndpoint extends Endpoint {
97
98
  }
98
99
  }
99
100
  async getConnectionEvents(connectionId, pagination) {
100
- const queryString = new QueryString('/adapters/connections/' + connectionId + '/events');
101
+ const queryString = new QueryString(path('/adapters/connections/:connectionId/events', { connectionId }));
101
102
  queryString.addPagination(pagination);
102
103
  return await this.requestCollection(queryString, AdapterConnectionEvent.parse);
103
104
  }
@@ -113,7 +114,7 @@ export class AdapterConnectionEndpoint extends Endpoint {
113
114
  * `POST /connections/:id/check` route on Core-Api (removed).
114
115
  */
115
116
  async testConnection(connectionId) {
116
- const url = '/services/' + connectionId + '/test-connection';
117
+ const url = path('/services/:connectionId/test-connection', { connectionId });
117
118
  const result = await this.requestObject(url, null, parseTestConnectionResult, 'POST');
118
119
  const data = result.getData();
119
120
  if (data === null) {
@@ -1,3 +1,4 @@
1
+ import { path } from '../Http/Data/Path.js';
1
2
  import { Adapter } from '../Model/Adapter/Adapter.js';
2
3
  import { AdapterConfiguration } from '../Model/Adapter/AdapterConfiguration.js';
3
4
  import { QueryString } from '../Http/Data/QueryString.js';
@@ -22,7 +23,7 @@ export class AdapterEndpoint extends Endpoint {
22
23
  }
23
24
  async getAdapter(adapterId, withMedia = false) {
24
25
  try {
25
- const queryString = new QueryString('/adapters/' + adapterId);
26
+ const queryString = new QueryString(path('/adapters/:adapterId', { adapterId }));
26
27
  if (withMedia) {
27
28
  queryString.set('with-media', true);
28
29
  }
@@ -38,7 +39,7 @@ export class AdapterEndpoint extends Endpoint {
38
39
  }
39
40
  async getAdapterConfiguration(adapterId) {
40
41
  try {
41
- const url = '/adapters/' + adapterId + '/configuration';
42
+ const url = path('/adapters/:adapterId/configuration', { adapterId });
42
43
  return await this.requestCollection(url, AdapterConfiguration.parse);
43
44
  }
44
45
  catch (error) {
@@ -1,3 +1,4 @@
1
+ import { path } from '../Http/Data/Path.js';
1
2
  import { Channel } from '../Model/Messaging/Channel/Channel.js';
2
3
  import { ChannelHistory } from '../Model/Messaging/ChannelHistory.js';
3
4
  import { QueryString } from '../Http/Data/QueryString.js';
@@ -5,7 +6,7 @@ import { Endpoint } from './Endpoint.js';
5
6
  export class ChannelEndpoint extends Endpoint {
6
7
  async getById(channelId) {
7
8
  try {
8
- const result = await this.requestObject('/channels/' + channelId + '', null, Channel.parse);
9
+ const result = await this.requestObject(path('/channels/:channelId', { channelId }), null, Channel.parse);
9
10
  return result.getData();
10
11
  }
11
12
  catch (ex) {
@@ -17,7 +18,7 @@ export class ChannelEndpoint extends Endpoint {
17
18
  }
18
19
  async getByWorkspace(workspaceId, pagination = null) {
19
20
  try {
20
- const queryString = new QueryString('/workspaces/' + workspaceId + '/channels');
21
+ const queryString = new QueryString(path('/workspaces/:workspaceId/channels', { workspaceId }));
21
22
  queryString.addPagination(pagination);
22
23
  const result = await this.requestCollection(queryString, Channel.parse);
23
24
  return result;
@@ -45,7 +46,7 @@ export class ChannelEndpoint extends Endpoint {
45
46
  }
46
47
  async getMessages(channelId, pagination = null) {
47
48
  try {
48
- const querystring = new QueryString('/channels/' + channelId + '/messages');
49
+ const querystring = new QueryString(path('/channels/:channelId/messages', { channelId }));
49
50
  querystring.addPagination(pagination);
50
51
  const result = await this.requestCollection(querystring, ChannelHistory.parse);
51
52
  return result;
@@ -76,7 +77,7 @@ export class ChannelEndpoint extends Endpoint {
76
77
  }
77
78
  async testChannel(subscriberChannel) {
78
79
  try {
79
- const url = '/channels/' + subscriberChannel.id + '/test';
80
+ const url = path('/channels/:id/test', { id: subscriberChannel.id });
80
81
  const parser = (raw) => ({ tested: raw.tested });
81
82
  const result = await this.requestObject(url, {}, parser, 'POST');
82
83
  const re = result.getData();