@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,9 +1,10 @@
1
+ import { path } from '../Http/Data/Path.js';
1
2
  import { CodeDeploy } from '../Model/Project/CodeDeploy.js';
2
3
  import { Endpoint } from './Endpoint.js';
3
4
  export class CodeDeployEndpoint extends Endpoint {
4
5
  async getById(deployId) {
5
6
  try {
6
- const rawDeploy = await this.requestObject('/deploys/' + deployId, null, CodeDeploy.parse);
7
+ const rawDeploy = await this.requestObject(path('/deploys/:deployId', { deployId }), null, CodeDeploy.parse);
7
8
  return rawDeploy.getData();
8
9
  }
9
10
  catch (error) {
@@ -15,7 +16,7 @@ export class CodeDeployEndpoint extends Endpoint {
15
16
  }
16
17
  async getLatestDeploy(codeSourceId) {
17
18
  try {
18
- const rawDeploy = await this.requestObject('/codesources/' + codeSourceId + '/latestdeploy', null, CodeDeploy.parse);
19
+ const rawDeploy = await this.requestObject(path('/codesources/:codeSourceId/latestdeploy', { codeSourceId }), null, CodeDeploy.parse);
19
20
  return rawDeploy.getData();
20
21
  }
21
22
  catch (error) {
@@ -27,7 +28,7 @@ export class CodeDeployEndpoint extends Endpoint {
27
28
  }
28
29
  async getByCodeSource(codeSourceId) {
29
30
  try {
30
- const rawDeploys = await this.requestCollection('/codesources/' + codeSourceId + '/deploys', CodeDeploy.parse);
31
+ const rawDeploys = await this.requestCollection(path('/codesources/:codeSourceId/deploys', { codeSourceId }), CodeDeploy.parse);
31
32
  return rawDeploys;
32
33
  }
33
34
  catch (error) {
@@ -39,7 +40,7 @@ export class CodeDeployEndpoint extends Endpoint {
39
40
  }
40
41
  async requestDeploy(codeSourceId) {
41
42
  try {
42
- const result = await this.requestObject('/codesources/' + codeSourceId + '/deploys', null, CodeDeploy.parse, 'POST');
43
+ const result = await this.requestObject(path('/codesources/:codeSourceId/deploys', { codeSourceId }), null, CodeDeploy.parse, 'POST');
43
44
  const requestedDeploy = result.getData();
44
45
  if (requestedDeploy === null) {
45
46
  throw new Error('Deploy not requested');
@@ -1,13 +1,14 @@
1
+ import { path } from '../Http/Data/Path.js';
1
2
  import { CodeSourceBuildStrategy } from '../Model/Deployment/CodeSourceBuildStrategy.js';
2
3
  import { CodeSourceRunStrategy } from '../Model/Deployment/CodeSourceRunStrategy.js';
3
4
  import { Endpoint } from './Endpoint.js';
4
5
  export class CodeSourceStrategiesEndpoint extends Endpoint {
5
6
  async getAllBuildStrategies(workspaceId) {
6
- const cmd = '/workspaces/' + workspaceId + '/codesources/buildstrategies';
7
+ const cmd = path('/workspaces/:workspaceId/codesources/buildstrategies', { workspaceId });
7
8
  return await this.requestCollection(cmd, CodeSourceBuildStrategy.parse);
8
9
  }
9
10
  async getAllRunStrategies(workspaceId) {
10
- const cmd = '/workspaces/' + workspaceId + '/codesources/runstrategies';
11
+ const cmd = path('/workspaces/:workspaceId/codesources/runstrategies', { workspaceId });
11
12
  return await this.requestCollection(cmd, CodeSourceRunStrategy.parse);
12
13
  }
13
14
  }
@@ -1,16 +1,17 @@
1
+ import { path } from '../Http/Data/Path.js';
1
2
  import { QueryString } from '../Http/Data/QueryString.js';
2
3
  import { Collection } from '../Model/Collections/Collection.js';
3
4
  import { Endpoint } from './Endpoint.js';
4
5
  import { CollectionRecord } from '../Model/Collections/CollectionRecord.js';
5
6
  export class CollectionsEndpoint extends Endpoint {
6
7
  async getAll(projectId, pagination) {
7
- const qs = new QueryString('/projects/' + projectId + '/collections');
8
+ const qs = new QueryString(path('/projects/:projectId/collections', { projectId }));
8
9
  qs.addPagination(pagination);
9
10
  return await this.requestCollection(qs, Collection.parse);
10
11
  }
11
12
  async getById(collectionId) {
12
13
  try {
13
- const qs = new QueryString('/collections/' + collectionId + '');
14
+ const qs = new QueryString(path('/collections/:collectionId', { collectionId }));
14
15
  const result = await this.requestObject(qs, null, Collection.parse);
15
16
  return result.getData();
16
17
  }
@@ -23,7 +24,7 @@ export class CollectionsEndpoint extends Endpoint {
23
24
  }
24
25
  async getRecords(collectionId, pagination) {
25
26
  try {
26
- const qs = new QueryString('/collections/' + collectionId + '/records');
27
+ const qs = new QueryString(path('/collections/:collectionId/records', { collectionId }));
27
28
  qs.addPagination(pagination);
28
29
  return await this.requestCollection(qs, CollectionRecord.parse);
29
30
  }
@@ -36,7 +37,7 @@ export class CollectionsEndpoint extends Endpoint {
36
37
  }
37
38
  async addRecord(collectionId, properties) {
38
39
  try {
39
- const qs = new QueryString('/collections/' + collectionId + '');
40
+ const qs = new QueryString(path('/collections/:collectionId', { collectionId }));
40
41
  const result = await this.requestObject(qs, { properties }, CollectionRecord.parse, 'POST');
41
42
  const updatedWorkspace = result.getData();
42
43
  if (updatedWorkspace === null) {
@@ -1,3 +1,4 @@
1
+ import { path } from '../Http/Data/Path.js';
1
2
  import { QueryString } from '../Http/Data/QueryString.js';
2
3
  import { CommandExecutionHistory } from '../Model/Command/CommandExecutionHistory.js';
3
4
  import { CommandExecutionStatus } from '../Model/Command/CommandExecutionStatus.js';
@@ -24,7 +25,7 @@ export class CommandExecutionEndpoint extends Endpoint {
24
25
  return await this.requestCollection(queryString, CommandExecutionEndpoint.parse, null, 'GET');
25
26
  }
26
27
  async getById(id) {
27
- const queryString = new QueryString('/system/command-executions/' + id);
28
+ const queryString = new QueryString(path('/system/command-executions/:id', { id }));
28
29
  const result = await this.requestObject(queryString, null, CommandExecutionEndpoint.parse, 'GET');
29
30
  return result.getData();
30
31
  }
@@ -0,0 +1,26 @@
1
+ import { Component } from '../Model/Component/Component.js';
2
+ import { ComponentStatus } from '../Model/Component/ComponentStatus.js';
3
+ import { ComponentVersion } from '../Model/Component/ComponentVersion.js';
4
+ import { CursorPagination } from '../Model/Pagination/CursorPagination.js';
5
+ import { CollectionResult } from '../Model/Result/CollectionResult.js';
6
+ import { Endpoint } from './Endpoint.js';
7
+ /**
8
+ * The platform's own inventory: what we build, which versions the registry has, what the cluster is
9
+ * actually running, and which version each component should run.
10
+ *
11
+ * Root-only, reads included.
12
+ */
13
+ export declare class ComponentEndpoint extends Endpoint {
14
+ getAll(pagination?: CursorPagination | null): Promise<CollectionResult<Component>>;
15
+ getVersions(componentId: string, pagination?: CursorPagination | null): Promise<CollectionResult<ComponentVersion>>;
16
+ /** Observed state for every component at once — one call, not one per component. */
17
+ getStatus(pagination?: CursorPagination | null): Promise<CollectionResult<ComponentStatus>>;
18
+ /**
19
+ * Declare which version a component should run. Writes desired state only — the rollout is a
20
+ * separate asynchronous step that can fail, so a success here does not mean it is running.
21
+ */
22
+ setActiveVersion(componentId: string, versionId: string): Promise<void>;
23
+ private static parseComponent;
24
+ private static parseVersion;
25
+ private static parseStatus;
26
+ }
@@ -0,0 +1,77 @@
1
+ import { path } from '../Http/Data/Path.js';
2
+ import { QueryString } from '../Http/Data/QueryString.js';
3
+ import { Component } from '../Model/Component/Component.js';
4
+ import { ComponentKind } from '../Model/Component/ComponentKind.js';
5
+ import { ComponentStatus } from '../Model/Component/ComponentStatus.js';
6
+ import { ComponentVersion } from '../Model/Component/ComponentVersion.js';
7
+ import { State } from '../Model/State.js';
8
+ import { Utils } from '../Utils.js';
9
+ import { Endpoint } from './Endpoint.js';
10
+ /**
11
+ * The platform's own inventory: what we build, which versions the registry has, what the cluster is
12
+ * actually running, and which version each component should run.
13
+ *
14
+ * Root-only, reads included.
15
+ */
16
+ export class ComponentEndpoint extends Endpoint {
17
+ async getAll(pagination = null) {
18
+ const queryString = new QueryString('/system/components');
19
+ queryString.addPagination(pagination);
20
+ return await this.requestCollection(queryString, ComponentEndpoint.parseComponent, null, 'GET');
21
+ }
22
+ async getVersions(componentId, pagination = null) {
23
+ const queryString = new QueryString(path('/system/components/:componentId/versions', { componentId }));
24
+ queryString.addPagination(pagination);
25
+ return await this.requestCollection(queryString, ComponentEndpoint.parseVersion, null, 'GET');
26
+ }
27
+ /** Observed state for every component at once — one call, not one per component. */
28
+ async getStatus(pagination = null) {
29
+ const queryString = new QueryString('/system/component-status');
30
+ queryString.addPagination(pagination);
31
+ return await this.requestCollection(queryString, ComponentEndpoint.parseStatus, null, 'GET');
32
+ }
33
+ /**
34
+ * Declare which version a component should run. Writes desired state only — the rollout is a
35
+ * separate asynchronous step that can fail, so a success here does not mean it is running.
36
+ */
37
+ async setActiveVersion(componentId, versionId) {
38
+ const queryString = new QueryString(path('/system/components/:componentId/active-version', { componentId }));
39
+ await this.requestObject(queryString, { version_id: versionId }, (raw) => raw, 'POST');
40
+ }
41
+ static parseComponent(raw) {
42
+ const component = new Component();
43
+ component.id = raw.id;
44
+ component.name = raw.name;
45
+ component.kind = ComponentKind.fromString(raw.kind);
46
+ component.imageRepository = raw.image_repository;
47
+ component.activeVersionId = raw.active_version ?? null;
48
+ component.createdAt = Utils.parseRawDate(raw.created_at);
49
+ component.updatedAt = Utils.parseRawDate(raw.updated_at);
50
+ component.state = State.fromString(raw.state);
51
+ return component;
52
+ }
53
+ static parseVersion(raw) {
54
+ const version = new ComponentVersion();
55
+ version.id = raw.id;
56
+ version.componentId = raw.component;
57
+ version.version = raw.version;
58
+ version.image = raw.image;
59
+ version.releasedAt = Utils.parseRawDate(raw.released_at);
60
+ version.state = State.fromString(raw.state);
61
+ return version;
62
+ }
63
+ static parseStatus(raw) {
64
+ const status = new ComponentStatus();
65
+ status.id = raw.id;
66
+ status.componentId = raw.component;
67
+ status.namespace = raw.namespace;
68
+ status.deploymentName = raw.deployment_name;
69
+ status.image = raw.image;
70
+ status.readyReplicas = raw.ready_replicas;
71
+ status.desiredReplicas = raw.desired_replicas;
72
+ status.available = raw.available;
73
+ status.progressing = raw.progressing;
74
+ status.observedAt = Utils.parseRawDate(raw.observed_at);
75
+ return status;
76
+ }
77
+ }
@@ -3,6 +3,11 @@ import { CollectionResult } from '../Model/Result/CollectionResult.js';
3
3
  import { Endpoint } from './Endpoint.js';
4
4
  export declare class ConfigEndpoint extends Endpoint {
5
5
  getConfigByFlow(flowId: string, projectEnvironmentId?: string | null): Promise<CollectionResult<Config>>;
6
- getByProjectEnvironment(projectEnvironmentId?: string | null): Promise<CollectionResult<Config>>;
6
+ /**
7
+ * The id is required: the API route is `/projectenvironments/:projectEnvironmentId/configvalues`
8
+ * and 404s on an unknown environment. It used to default to null, which built
9
+ * `/projectenvironments/null/configvalues` — a request that could never succeed.
10
+ */
11
+ getByProjectEnvironment(projectEnvironmentId: string): Promise<CollectionResult<Config>>;
7
12
  saveConfigs(projectId: string, configs: Config[]): Promise<CollectionResult<Config>>;
8
13
  }
@@ -1,3 +1,4 @@
1
+ import { path } from '../Http/Data/Path.js';
1
2
  import { Utils } from '../Utils.js';
2
3
  import { Config } from '../Model/Config.js';
3
4
  import { Endpoint } from './Endpoint.js';
@@ -8,7 +9,7 @@ export class ConfigEndpoint extends Endpoint {
8
9
  if (!Utils.isNullOrUndefined(projectEnvironmentId)) {
9
10
  parameters = { environment: projectEnvironmentId };
10
11
  }
11
- const result = await this.requestCollection('/flows/' + flowId + '/configvalues', Config.parse, parameters);
12
+ const result = await this.requestCollection(path('/flows/:flowId/configvalues', { flowId }), Config.parse, parameters);
12
13
  return result;
13
14
  }
14
15
  catch (error) {
@@ -18,9 +19,14 @@ export class ConfigEndpoint extends Endpoint {
18
19
  throw error;
19
20
  }
20
21
  }
21
- async getByProjectEnvironment(projectEnvironmentId = null) {
22
+ /**
23
+ * The id is required: the API route is `/projectenvironments/:projectEnvironmentId/configvalues`
24
+ * and 404s on an unknown environment. It used to default to null, which built
25
+ * `/projectenvironments/null/configvalues` — a request that could never succeed.
26
+ */
27
+ async getByProjectEnvironment(projectEnvironmentId) {
22
28
  try {
23
- const result = await this.requestCollection('/projectenvironments/' + projectEnvironmentId + '/configvalues', Config.parse);
29
+ const result = await this.requestCollection(path('/projectenvironments/:projectEnvironmentId/configvalues', { projectEnvironmentId }), Config.parse);
24
30
  return result;
25
31
  }
26
32
  catch (error) {
@@ -1,10 +1,11 @@
1
+ import { path as buildPath } from '../Http/Data/Path.js';
1
2
  import { QueryString } from '../Http/Data/QueryString.js';
2
3
  import { Configuration } from '../Model/Configuration/Configuration.js';
3
4
  import { Endpoint } from './Endpoint.js';
4
5
  export class ConfigurationEndpoint extends Endpoint {
5
6
  async getByPath(scopeId, path) {
6
7
  try {
7
- const qs = new QueryString('/configurations/' + scopeId);
8
+ const qs = new QueryString(buildPath('/configurations/:scopeId', { scopeId }));
8
9
  qs.set('path', path);
9
10
  const result = await this.requestObject(qs, null, Configuration.parse);
10
11
  return result.getData();
@@ -18,7 +19,7 @@ export class ConfigurationEndpoint extends Endpoint {
18
19
  }
19
20
  async getByPathQuery(scopeId, pathQuery, pagination) {
20
21
  try {
21
- const qs = new QueryString('/configurations/query/' + scopeId);
22
+ const qs = new QueryString(buildPath('/configurations/query/:scopeId', { scopeId }));
22
23
  qs.set('query', pathQuery);
23
24
  qs.addPagination(pagination);
24
25
  const result = await this.requestCollection(qs, Configuration.parse);
@@ -33,7 +34,7 @@ export class ConfigurationEndpoint extends Endpoint {
33
34
  }
34
35
  /** Write the value at this path and scope, returning the row as stored. */
35
36
  async save(scopeId, path, value) {
36
- const qs = new QueryString('/configurations/' + scopeId);
37
+ const qs = new QueryString(buildPath('/configurations/:scopeId', { scopeId }));
37
38
  qs.set('path', path);
38
39
  // The API answers with the single saved row, not a collection.
39
40
  const result = await this.requestObject(qs, { value: value }, Configuration.parse, 'POST');
@@ -47,7 +48,7 @@ export class ConfigurationEndpoint extends Endpoint {
47
48
  * override at this scope (e.g. for limit fields meaning "no limit").
48
49
  */
49
50
  async delete(scopeId, path) {
50
- const qs = new QueryString('/configurations/' + scopeId);
51
+ const qs = new QueryString(buildPath('/configurations/:scopeId', { scopeId }));
51
52
  qs.set('path', path);
52
53
  const result = await this.requestObject(qs, null, (raw) => raw, 'DELETE');
53
54
  return result;
@@ -1,10 +1,11 @@
1
+ import { path } from '../Http/Data/Path.js';
1
2
  import { QueryString } from '../Http/Data/QueryString.js';
2
3
  import { HealthAlert } from '../Model/HealthAlert/HealthAlert.js';
3
4
  import { Endpoint } from './Endpoint.js';
4
5
  export class HealthAlertEndpoint extends Endpoint {
5
6
  async getCurrentAlertsByScope(scopeType, scopeId) {
6
7
  try {
7
- const q = new QueryString('/health/' + scopeType + '/' + scopeId);
8
+ const q = new QueryString(path('/health/:scopeType/:scopeId', { scopeType, scopeId }));
8
9
  const result = await this.requestCollection(q, HealthAlert.parse);
9
10
  return result;
10
11
  }
@@ -22,7 +23,7 @@ export class HealthAlertEndpoint extends Endpoint {
22
23
  */
23
24
  async getCurrentAlertsByParentScope(parentScopeType, parentScopeId) {
24
25
  try {
25
- const q = new QueryString('/health/by-parent/' + parentScopeType + '/' + parentScopeId);
26
+ const q = new QueryString(path('/health/by-parent/:parentScopeType/:parentScopeId', { parentScopeType, parentScopeId }));
26
27
  const result = await this.requestCollection(q, HealthAlert.parse);
27
28
  return result;
28
29
  }
@@ -1,16 +1,17 @@
1
+ import { path } from '../Http/Data/Path.js';
1
2
  import { Platform } from '../Model/Worker/Platform.js';
2
3
  import { PlatformImage } from '../Model/Worker/PlatformImage.js';
3
4
  import { QueryString } from '../Http/Data/QueryString.js';
4
5
  import { Endpoint } from './Endpoint.js';
5
6
  export class PlatformEndpoint extends Endpoint {
6
7
  async getAll(workspaceId, pagination) {
7
- const qs = new QueryString('/workspaces/' + (workspaceId === null ? 'all' : workspaceId) + '/platforms');
8
+ const qs = new QueryString(path('/workspaces/:workspaceId/platforms', { workspaceId: workspaceId === null ? 'all' : workspaceId }));
8
9
  qs.addPagination(pagination);
9
10
  const result = await this.requestCollection(qs, Platform.parse);
10
11
  return result;
11
12
  }
12
13
  async getPlatformImages(workspaceId, platformId, pagination) {
13
- const qs = new QueryString('/workspaces/' + (workspaceId === null ? 'all' : workspaceId) + '/platforms/' + platformId + '/images');
14
+ const qs = new QueryString(path('/workspaces/:workspaceId/platforms/:platformId/images', { workspaceId: workspaceId === null ? 'all' : workspaceId, platformId }));
14
15
  qs.addPagination(pagination);
15
16
  const result = await this.requestCollection(qs, PlatformImage.parse);
16
17
  return result;
@@ -1,7 +1,8 @@
1
+ import { path } from '../Http/Data/Path.js';
1
2
  import { PlatformLanguage } from '../Model/Project/PlatformLanguage.js';
2
3
  import { Endpoint } from './Endpoint.js';
3
4
  export class PlatformLanguageEndpoint extends Endpoint {
4
5
  async getAll(workspaceId) {
5
- return await this.requestCollection('/workspaces/' + workspaceId + '/platforms/languages', PlatformLanguage.parse);
6
+ return await this.requestCollection(path('/workspaces/:workspaceId/platforms/languages', { workspaceId }), PlatformLanguage.parse);
6
7
  }
7
8
  }
@@ -1,3 +1,4 @@
1
+ import { path } from '../Http/Data/Path.js';
1
2
  import { Project } from '../Model/Project/Project.js';
2
3
  import { QueryString } from '../Http/Data/QueryString.js';
3
4
  import { Endpoint } from './Endpoint.js';
@@ -18,7 +19,7 @@ export class ProjectEndpoint extends Endpoint {
18
19
  }
19
20
  async getByWorkspace(workspaceId, pagination = null, states = null) {
20
21
  try {
21
- const queryString = new QueryString('workspaces/' + workspaceId + '/projects');
22
+ const queryString = new QueryString(path('workspaces/:workspaceId/projects', { workspaceId }));
22
23
  queryString.addPagination(pagination);
23
24
  queryString.addStateFilter(states);
24
25
  const result = await this.requestCollection(queryString, Project.parse);
@@ -33,7 +34,7 @@ export class ProjectEndpoint extends Endpoint {
33
34
  }
34
35
  async getById(projectId) {
35
36
  try {
36
- const result = await this.requestObject('projects/' + projectId + '', null, Project.parse);
37
+ const result = await this.requestObject(path('projects/:projectId', { projectId }), null, Project.parse);
37
38
  return result.getData();
38
39
  }
39
40
  catch (error) {
@@ -1,10 +1,11 @@
1
+ import { path } from '../Http/Data/Path.js';
1
2
  import { ProjectEnvironment } from '../Model/Project/ProjectEnvironment.js';
2
3
  import { HttpStatus } from '../Http/HttpStatus.js';
3
4
  import { Endpoint } from './Endpoint.js';
4
5
  export class ProjectEnvironmentEndpoint extends Endpoint {
5
6
  async getByProject(id) {
6
7
  try {
7
- const result = await this.requestCollection('/projects/' + id + '/environments', ProjectEnvironment.parse);
8
+ const result = await this.requestCollection(path('/projects/:id/environments', { id }), ProjectEnvironment.parse);
8
9
  return result;
9
10
  }
10
11
  catch (error) {
@@ -16,7 +17,7 @@ export class ProjectEnvironmentEndpoint extends Endpoint {
16
17
  }
17
18
  async getById(id) {
18
19
  try {
19
- const rawProjectEnvironment = await this.requestObject('/projectenvironments/' + id + '', null, ProjectEnvironment.parse);
20
+ const rawProjectEnvironment = await this.requestObject(path('/projectenvironments/:id', { id }), null, ProjectEnvironment.parse);
20
21
  return rawProjectEnvironment.getData();
21
22
  }
22
23
  catch (error) {
@@ -1,15 +1,16 @@
1
+ import { path } from '../Http/Data/Path.js';
1
2
  import { QueryString } from '../Http/Data/QueryString.js';
2
3
  import { ProviderToken } from '../Model/ProviderToken/ProviderToken.js';
3
4
  import { ProviderTokenAccessToken } from '../Model/ProviderToken/ProviderTokenAccessToken.js';
4
5
  import { Endpoint } from './Endpoint.js';
5
6
  export class ProviderTokenEndpoint extends Endpoint {
6
7
  async getProviderToken(providerTokenId) {
7
- const queryString = new QueryString('/provider-tokens/' + providerTokenId);
8
+ const queryString = new QueryString(path('/provider-tokens/:providerTokenId', { providerTokenId }));
8
9
  const result = await this.requestObject(queryString, null, ProviderToken.parse);
9
10
  return result.getData();
10
11
  }
11
12
  async getProviderTokenAccessToken(providerTokenId) {
12
- const queryString = new QueryString('/provider-tokens/' + providerTokenId + '/access-token');
13
+ const queryString = new QueryString(path('/provider-tokens/:providerTokenId/access-token', { providerTokenId }));
13
14
  const result = await this.requestObject(queryString, null, ProviderTokenAccessToken.parse);
14
15
  return result.getData();
15
16
  }
@@ -19,7 +20,7 @@ export class ProviderTokenEndpoint extends Endpoint {
19
20
  * token, so disconnecting a connection's auth is a single request.
20
21
  */
21
22
  async revokeProviderToken(providerTokenId, connectionConfiguration = null) {
22
- const queryString = new QueryString('/provider-tokens/' + providerTokenId);
23
+ const queryString = new QueryString(path('/provider-tokens/:providerTokenId', { providerTokenId }));
23
24
  if (connectionConfiguration !== null) {
24
25
  queryString.set('connection', connectionConfiguration.connection);
25
26
  queryString.set('configuration', connectionConfiguration.configuration);
@@ -1,15 +1,16 @@
1
+ import { path } from '../Http/Data/Path.js';
1
2
  import { QueryString } from '../Http/Data/QueryString.js';
2
3
  import { RunnerPool } from '../Model/Infrastructure/RunnerPool.js';
3
4
  import { Endpoint } from './Endpoint.js';
4
5
  export class RunnerPoolEndpoint extends Endpoint {
5
6
  async getByProjectEnvironment(projectEnvironmentId, pagination = null) {
6
- const queryString = new QueryString('/runner-pools/project-environments/' + projectEnvironmentId + '');
7
+ const queryString = new QueryString(path('/runner-pools/project-environments/:projectEnvironmentId', { projectEnvironmentId }));
7
8
  queryString.addPagination(pagination);
8
9
  const result = await this.requestCollection(queryString, RunnerPool.parse);
9
10
  return result;
10
11
  }
11
12
  async create(projectEnvironmentId, pool) {
12
- const queryString = new QueryString('/runner-pools/project-environments/' + projectEnvironmentId + '');
13
+ const queryString = new QueryString(path('/runner-pools/project-environments/:projectEnvironmentId', { projectEnvironmentId }));
13
14
  const body = {
14
15
  name: pool.name,
15
16
  };
@@ -17,12 +18,12 @@ export class RunnerPoolEndpoint extends Endpoint {
17
18
  return result.getData();
18
19
  }
19
20
  async getById(queueSpecificationId) {
20
- const queryString = new QueryString('/runner-pools/' + queueSpecificationId);
21
+ const queryString = new QueryString(path('/runner-pools/:queueSpecificationId', { queueSpecificationId }));
21
22
  const result = await this.requestObject(queryString, null, RunnerPool.parse);
22
23
  return result.getData();
23
24
  }
24
25
  async redeploy(runnerPoolId) {
25
- const queryString = new QueryString('/runner-pools/' + runnerPoolId + '/redeploy');
26
+ const queryString = new QueryString(path('/runner-pools/:runnerPoolId/redeploy', { runnerPoolId }));
26
27
  await this.requestObject(queryString, null, (raw) => raw, 'POST');
27
28
  }
28
29
  }
@@ -1,3 +1,4 @@
1
+ import { path } from '../Http/Data/Path.js';
1
2
  import { CodeSourceAccount } from '../Model/Deployment/CodeSourceAccount.js';
2
3
  import { CodeSource } from '../Model/Deployment/CodeSource.js';
3
4
  import { SourcesAccountRepository } from '../Model/Deployment/SourcesAccountRepository.js';
@@ -7,13 +8,13 @@ import { HttpStatus } from '../Http/HttpStatus.js';
7
8
  import { Endpoint } from './Endpoint.js';
8
9
  export class SourcesAccountEndpoint extends Endpoint {
9
10
  async getAllCodeSources(workspaceId, pagination = null) {
10
- const queryString = new QueryString('workspaces/' + workspaceId + '/codesources');
11
+ const queryString = new QueryString(path('workspaces/:workspaceId/codesources', { workspaceId }));
11
12
  queryString.addPagination(pagination);
12
13
  const result = await this.requestCollection(queryString, CodeSource.parse);
13
14
  return result;
14
15
  }
15
16
  async getAllCodeSourceAccounts(workspaceId, pagination = null) {
16
- const queryString = new QueryString('workspaces/' + workspaceId + '/codesourceaccounts');
17
+ const queryString = new QueryString(path('workspaces/:workspaceId/codesourceaccounts', { workspaceId }));
17
18
  queryString.addPagination(pagination);
18
19
  const result = await this.requestCollection(queryString, CodeSourceAccount.parse);
19
20
  return result;
@@ -40,7 +41,7 @@ export class SourcesAccountEndpoint extends Endpoint {
40
41
  }
41
42
  async getCodeSourceById(codeSourceId) {
42
43
  try {
43
- const result = await this.requestObject('/codesources/' + codeSourceId, null, CodeSource.parse);
44
+ const result = await this.requestObject(path('/codesources/:codeSourceId', { codeSourceId }), null, CodeSource.parse);
44
45
  return result.getData();
45
46
  }
46
47
  catch (error) {
@@ -54,13 +55,13 @@ export class SourcesAccountEndpoint extends Endpoint {
54
55
  }
55
56
  }
56
57
  async getRepositories(codeSourceAccountId, pagination = null) {
57
- const queryString = new QueryString('codesourceaccounts/' + codeSourceAccountId + '/repositories');
58
+ const queryString = new QueryString(path('codesourceaccounts/:codeSourceAccountId/repositories', { codeSourceAccountId }));
58
59
  queryString.addPagination(pagination);
59
60
  const rawSourcesAccountRepositories = await this.requestCollection(queryString, SourcesAccountRepository.parse);
60
61
  return rawSourcesAccountRepositories;
61
62
  }
62
63
  async getRepositoryBranches(codeSourceAccountId, repositoryKey, pagination = null) {
63
- const queryString = new QueryString('codesourceaccounts/' + codeSourceAccountId + '/repositories/' + repositoryKey + '/branches');
64
+ const queryString = new QueryString(path('codesourceaccounts/:codeSourceAccountId/repositories/:repositoryKey/branches', { codeSourceAccountId, repositoryKey }));
64
65
  queryString.addPagination(pagination);
65
66
  const rawBranches = await this.requestCollection(queryString, SourcesAccountRepositoryBranch.parse);
66
67
  return rawBranches;
@@ -1,3 +1,4 @@
1
+ import { path } from '../Http/Data/Path.js';
1
2
  import { StorageInformation } from '../Model/Storage/StorageInformation.js';
2
3
  import { StorageItem } from '../Model/Storage/StorageItem.js';
3
4
  import { StorageItemInformation } from '../Model/Storage/StorageItemInformation.js';
@@ -5,7 +6,7 @@ import { QueryString } from '../Http/Data/QueryString.js';
5
6
  import { Endpoint } from './Endpoint.js';
6
7
  export class StorageEndpoint extends Endpoint {
7
8
  async getInformation(projectEnvironmentId, storageType) {
8
- const cmd = '/projectenvironments/' + projectEnvironmentId + '/storage/' + storageType;
9
+ const cmd = path('/projectenvironments/:projectEnvironmentId/storage/:storageType', { projectEnvironmentId, storageType });
9
10
  try {
10
11
  const parser = (raw) => {
11
12
  const storageInformation = new StorageInformation();
@@ -27,7 +28,7 @@ export class StorageEndpoint extends Endpoint {
27
28
  }
28
29
  }
29
30
  async clearBucket(projectEnvironmentId, storageType, bucketKey) {
30
- const cmd = '/projectenvironments/' + projectEnvironmentId + '/storage/' + storageType + '/' + bucketKey;
31
+ const cmd = path('/projectenvironments/:projectEnvironmentId/storage/:storageType/:bucketKey', { projectEnvironmentId, storageType, bucketKey });
31
32
  try {
32
33
  const parser = (raw) => raw.deleted;
33
34
  const result = await this.requestObject(cmd, null, parser, 'DELETE');
@@ -45,7 +46,7 @@ export class StorageEndpoint extends Endpoint {
45
46
  }
46
47
  }
47
48
  async getBucketItemsInformation(projectEnvironmentId, storageType, bucketKey, pagination = null) {
48
- const qs = new QueryString('/projectenvironments/' + projectEnvironmentId + '/storage/' + storageType + '/' + bucketKey + '/items');
49
+ const qs = new QueryString(path('/projectenvironments/:projectEnvironmentId/storage/:storageType/:bucketKey/items', { projectEnvironmentId, storageType, bucketKey }));
49
50
  qs.addPagination(pagination);
50
51
  try {
51
52
  const result = await this.requestCollection(qs, StorageItemInformation.parse, null, 'GET');
@@ -67,7 +68,7 @@ export class StorageEndpoint extends Endpoint {
67
68
  return this.clearBucket(projectEnvironmentId, storageType, bucketKey);
68
69
  }
69
70
  async getItem(projectEnvironmentId, storageType, bucketKey, storageItemKey) {
70
- const cmd = '/projectenvironments/' + projectEnvironmentId + '/storage/' + storageType + '/' + bucketKey + '/items/' + storageItemKey;
71
+ const cmd = path('/projectenvironments/:projectEnvironmentId/storage/:storageType/:bucketKey/items/:storageItemKey', { projectEnvironmentId, storageType, bucketKey, storageItemKey });
71
72
  try {
72
73
  const result = await this.requestObject(cmd, null, StorageItem.parse, 'GET');
73
74
  return result.getData();
@@ -80,7 +81,7 @@ export class StorageEndpoint extends Endpoint {
80
81
  }
81
82
  }
82
83
  async getBucketItem(storageBucketId, storageItemKey) {
83
- const cmd = '/storage-buckets/' + storageBucketId + '/items/' + storageItemKey;
84
+ const cmd = path('/storage-buckets/:storageBucketId/items/:storageItemKey', { storageBucketId, storageItemKey });
84
85
  try {
85
86
  const result = await this.requestObject(cmd, null, StorageItem.parse, 'GET');
86
87
  return result.getData();
@@ -93,7 +94,7 @@ export class StorageEndpoint extends Endpoint {
93
94
  }
94
95
  }
95
96
  async setItem(projectEnvironmentId, storageType, bucketKey, storageItem) {
96
- const cmd = '/projectenvironments/' + projectEnvironmentId + '/storage/' + storageType + '/' + bucketKey + '/items/' + storageItem.key;
97
+ const cmd = path('/projectenvironments/:projectEnvironmentId/storage/:storageType/:bucketKey/items/:key', { projectEnvironmentId, storageType, bucketKey, key: storageItem.key });
97
98
  try {
98
99
  const result = await this.requestObject(cmd, storageItem, StorageItem.parse, 'POST');
99
100
  const savedItem = result.getData();
@@ -110,7 +111,7 @@ export class StorageEndpoint extends Endpoint {
110
111
  }
111
112
  }
112
113
  async deleteItem(projectEnvironmentId, storageType, bucketKey, storageItemKey) {
113
- const cmd = '/projectenvironments/' + projectEnvironmentId + '/storage/' + storageType + '/' + bucketKey + '/items/' + storageItemKey;
114
+ const cmd = path('/projectenvironments/:projectEnvironmentId/storage/:storageType/:bucketKey/items/:storageItemKey', { projectEnvironmentId, storageType, bucketKey, storageItemKey });
114
115
  try {
115
116
  const parser = (raw) => ({ deleted: raw.deleted });
116
117
  const result = await this.requestObject(cmd, null, parser, 'DELETE');
@@ -1,9 +1,10 @@
1
+ import { path } from '../Http/Data/Path.js';
1
2
  import { Subscriber } from '../Model/Messaging/Subscriber.js';
2
3
  import { QueryString } from '../Http/Data/QueryString.js';
3
4
  import { Endpoint } from './Endpoint.js';
4
5
  export class SubscriberEndpoint extends Endpoint {
5
6
  async getSubscribersByFlow(flowId, projectEnvironmentId = null, pagination = null) {
6
- const qu = new QueryString('/flows/' + flowId + '/subscribers');
7
+ const qu = new QueryString(path('/flows/:flowId/subscribers', { flowId }));
7
8
  if (projectEnvironmentId !== null && projectEnvironmentId !== undefined) {
8
9
  qu.set('environment', projectEnvironmentId);
9
10
  }
@@ -12,13 +13,13 @@ export class SubscriberEndpoint extends Endpoint {
12
13
  return result;
13
14
  }
14
15
  async getSubscribersByChannel(channelId, pagination = null) {
15
- const qu = new QueryString('/channels/' + channelId + '/subscribers');
16
+ const qu = new QueryString(path('/channels/:channelId/subscribers', { channelId }));
16
17
  qu.addPagination(pagination);
17
18
  const result = await this.requestCollection(qu, Subscriber.parseRaw);
18
19
  return result;
19
20
  }
20
21
  async save(subscriber) {
21
- const url = '/flows/' + subscriber.flowId + '/subscribers';
22
+ const url = path('/flows/:flowId/subscribers', { flowId: subscriber.flowId });
22
23
  const result = await this.requestObject(url, subscriber, Subscriber.parseRaw, 'POST');
23
24
  const createdSubscriber = result.getData();
24
25
  if (createdSubscriber === null) {