@attlaz/client 1.95.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.
- package/dist/Catalog/Service/CatalogEndpoint.js +2 -1
- package/dist/Catalog/Service/CatalogProductEndpoint.js +3 -2
- package/dist/Client.d.ts +12 -12
- package/dist/Client.js +12 -12
- package/dist/{EnhanceData → DataEnrichment}/Service/GenerateContentEndpoint.js +3 -2
- package/dist/DataQuality/Model/QualityDataset.d.ts +1 -1
- package/dist/DataQuality/Model/QualityDataset.js +1 -1
- package/dist/DataQuality/Model/QualityEntity.d.ts +1 -1
- package/dist/DataQuality/Model/QualityEntity.js +1 -1
- package/dist/DataQuality/Model/{QualitySuppression.d.ts → QualityEntityProblemSuppression.d.ts} +3 -3
- package/dist/DataQuality/Model/{QualitySuppression.js → QualityEntityProblemSuppression.js} +3 -3
- package/dist/DataQuality/Model/QualityEntityProblemSuppressionResult.d.ts +6 -0
- package/dist/DataQuality/Model/QualityProblem.d.ts +1 -1
- package/dist/DataQuality/Model/QualityProblem.js +1 -1
- package/dist/DataQuality/Model/QualityProblemDefinition.d.ts +1 -1
- package/dist/DataQuality/Model/QualityProblemDefinition.js +1 -1
- package/dist/DataQuality/Model/QualityProblemEvent.d.ts +1 -1
- package/dist/DataQuality/Model/QualityProblemEvent.js +1 -1
- package/dist/DataQuality/Model/QualityReportEntity.d.ts +31 -0
- package/dist/DataQuality/Model/QualityReportEntity.js +44 -0
- package/dist/DataQuality/Model/QualityReportProblem.d.ts +22 -0
- package/dist/DataQuality/Model/QualityReportProblem.js +35 -0
- package/dist/DataQuality/Model/QualityReportResult.d.ts +9 -0
- package/dist/DataQuality/Model/QualityReportResult.js +14 -0
- package/dist/DataQuality/Model/QualityScan.d.ts +19 -0
- package/dist/DataQuality/Model/QualityScan.js +28 -0
- package/dist/DataQuality/Service/QualityEndpoint.d.ts +64 -7
- package/dist/DataQuality/Service/QualityEndpoint.js +116 -30
- package/dist/FeedManagement/Service/CatalogFeedEndpoint.js +2 -1
- package/dist/Flow/Service/FlowEndpoint.js +6 -5
- package/dist/Flow/Service/FlowRunEndpoint.js +8 -7
- package/dist/Flow/Service/FlowRunRequestEndpoint.js +2 -1
- package/dist/Flow/Service/FlowRunStatsEndpoint.js +2 -1
- package/dist/Helper/LoadAllHelper.js +7 -1
- package/dist/Http/Data/Path.d.ts +11 -0
- package/dist/Http/Data/Path.js +31 -0
- package/dist/Http/HttpClient.d.ts +8 -1
- package/dist/Http/HttpClient.js +21 -1
- package/dist/Http/OAuthClientOptions.d.ts +2 -0
- package/dist/Http/OAuthClientOptions.js +3 -0
- package/dist/Http/Transport/OAuthClient.d.ts +7 -0
- package/dist/Http/Transport/OAuthClient.js +31 -4
- package/dist/Logging/Service/LogEndpoint.d.ts +5 -1
- package/dist/Logging/Service/LogEndpoint.js +14 -8
- package/dist/{Pulse → MarketPulse}/Service/CompetitorEndpoint.js +4 -3
- package/dist/{Pulse → MarketPulse}/Service/CrawlJobEndpoint.d.ts +1 -0
- package/dist/{Pulse → MarketPulse}/Service/CrawlJobEndpoint.js +8 -6
- package/dist/{Pulse → MarketPulse}/Service/IndexJobEndpoint.js +5 -4
- package/dist/{Pulse → MarketPulse}/Service/PriceAlertEndpoint.js +8 -7
- package/dist/{Pulse → MarketPulse}/Service/PricingEndpoint.js +9 -8
- package/dist/{Pulse → MarketPulse}/Service/ProductGroupEndpoint.js +4 -3
- package/dist/{Pulse → MarketPulse}/Service/ProductMatchEndpoint.js +6 -5
- package/dist/{Pulse → MarketPulse}/Service/ProductMatchJobEndpoint.js +5 -4
- package/dist/{Pulse → MarketPulse}/Service/PulseCatalogProductEndpoint.js +4 -3
- package/dist/{Pulse → MarketPulse}/Service/PulseStatisticsEndpoint.js +5 -4
- package/dist/{Pulse → MarketPulse}/Service/VendorProductEndpoint.js +11 -7
- package/dist/Service/AccessTokenEndpoint.js +3 -2
- package/dist/Service/AdapterConnectionEndpoint.js +9 -8
- package/dist/Service/AdapterEndpoint.js +3 -2
- package/dist/Service/ChannelEndpoint.js +5 -4
- package/dist/Service/CodeDeployEndpoint.js +5 -4
- package/dist/Service/CodeSourceStrategiesEndpoint.js +3 -2
- package/dist/Service/CollectionsEndpoint.js +5 -4
- package/dist/Service/CommandExecutionEndpoint.js +2 -1
- package/dist/Service/ConfigEndpoint.d.ts +6 -1
- package/dist/Service/ConfigEndpoint.js +9 -3
- package/dist/Service/ConfigurationEndpoint.js +5 -4
- package/dist/Service/HealthAlertEndpoint.js +3 -2
- package/dist/Service/PlatformEndpoint.js +3 -2
- package/dist/Service/PlatformLanguageEndpoint.js +2 -1
- package/dist/Service/ProjectEndpoint.js +3 -2
- package/dist/Service/ProjectEnvironmentEndpoint.js +3 -2
- package/dist/Service/ProviderTokenEndpoint.js +4 -3
- package/dist/Service/RunnerPoolEndpoint.js +5 -4
- package/dist/Service/SourcesAccountEndpoint.js +6 -5
- package/dist/Service/StorageEndpoint.js +8 -7
- package/dist/Service/SubscriberEndpoint.js +4 -3
- package/dist/Service/TriggerEndpoint.js +5 -4
- package/dist/Service/UserActionEndpoint.js +4 -3
- package/dist/Service/UserEndpoint.js +3 -2
- package/dist/Service/WorkspaceEndpoint.js +2 -1
- package/dist/Service/WorkspaceMemberEndpoint.js +5 -4
- package/dist/index.d.ts +52 -48
- package/dist/index.js +38 -34
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -2
- package/dist/DataQuality/Model/QualitySuppressionResult.d.ts +0 -6
- /package/dist/{EnhanceData → DataEnrichment}/Model/GenerateContentBatch.d.ts +0 -0
- /package/dist/{EnhanceData → DataEnrichment}/Model/GenerateContentBatch.js +0 -0
- /package/dist/{EnhanceData → DataEnrichment}/Model/GenerateContentBatchData.d.ts +0 -0
- /package/dist/{EnhanceData → DataEnrichment}/Model/GenerateContentBatchData.js +0 -0
- /package/dist/{EnhanceData → DataEnrichment}/Service/GenerateContentEndpoint.d.ts +0 -0
- /package/dist/DataQuality/Model/{QualitySuppressionResult.js → QualityEntityProblemSuppressionResult.js} +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/CatalogProductWithMatches.d.ts +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/CatalogProductWithMatches.js +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/CompetingVendorProduct.d.ts +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/CompetingVendorProduct.js +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/Competitor.d.ts +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/Competitor.js +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/CrawlJob.d.ts +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/CrawlJob.js +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/IndexJob.d.ts +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/IndexJob.js +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/MarketSummaryEntry.d.ts +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/MarketSummaryEntry.js +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/MatchHistory.d.ts +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/MatchHistory.js +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/MatchHistoryBucket.d.ts +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/MatchHistoryBucket.js +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/MatchHistoryInterval.d.ts +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/MatchHistoryInterval.js +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/MatchedVendorProduct.d.ts +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/MatchedVendorProduct.js +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/PriceAlertConfig.d.ts +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/PriceAlertConfig.js +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/PriceAlertConfigData.d.ts +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/PriceAlertConfigData.js +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/PriceAlertEvent.d.ts +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/PriceAlertEvent.js +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/PriceIndexSnapshotEntry.d.ts +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/PriceIndexSnapshotEntry.js +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/PriceSuggestion.d.ts +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/PriceSuggestion.js +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/PricingRule.d.ts +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/PricingRule.js +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/PricingRuleData.d.ts +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/PricingRuleData.js +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/ProductGroup.d.ts +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/ProductGroup.js +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/ProductGroupData.d.ts +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/ProductGroupData.js +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/ProductMatch.d.ts +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/ProductMatch.js +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/ProductMatchJob.d.ts +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/ProductMatchJob.js +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/ProductSegmentType.d.ts +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/ProductSegmentType.js +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/ProductsSegment.d.ts +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/ProductsSegment.js +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/PulseCatalogProductFilterOptions.d.ts +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/PulseCatalogProductFilterOptions.js +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/PulseCatalogProductFilters.d.ts +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/PulseCatalogProductFilters.js +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/ReviewMatch.d.ts +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/ReviewMatch.js +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/ReviewMatchFilters.d.ts +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/ReviewMatchFilters.js +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/TopCompetitor.d.ts +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/TopCompetitor.js +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/Vendor.d.ts +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/Vendor.js +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/VendorProduct.d.ts +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/VendorProduct.js +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/VendorProductPriceHistoryEntry.d.ts +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/VendorProductPriceHistoryEntry.js +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/VendorStatus.d.ts +0 -0
- /package/dist/{Pulse → MarketPulse}/Model/VendorStatus.js +0 -0
- /package/dist/{Pulse → MarketPulse}/Service/CompetitorEndpoint.d.ts +0 -0
- /package/dist/{Pulse → MarketPulse}/Service/IndexJobEndpoint.d.ts +0 -0
- /package/dist/{Pulse → MarketPulse}/Service/PriceAlertEndpoint.d.ts +0 -0
- /package/dist/{Pulse → MarketPulse}/Service/PricingEndpoint.d.ts +0 -0
- /package/dist/{Pulse → MarketPulse}/Service/ProductGroupEndpoint.d.ts +0 -0
- /package/dist/{Pulse → MarketPulse}/Service/ProductMatchEndpoint.d.ts +0 -0
- /package/dist/{Pulse → MarketPulse}/Service/ProductMatchJobEndpoint.d.ts +0 -0
- /package/dist/{Pulse → MarketPulse}/Service/PulseCatalogProductEndpoint.d.ts +0 -0
- /package/dist/{Pulse → MarketPulse}/Service/PulseStatisticsEndpoint.d.ts +0 -0
- /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 { 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/'
|
|
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
|
|
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/'
|
|
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/'
|
|
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/'
|
|
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/'
|
|
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/'
|
|
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/'
|
|
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
|
|
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/'
|
|
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
|
|
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/'
|
|
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/'
|
|
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/'
|
|
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();
|
|
@@ -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
|
|
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/'
|
|
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/'
|
|
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/'
|
|
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/'
|
|
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/'
|
|
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/'
|
|
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
|
|
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/'
|
|
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
|
|
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
|
|
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
|
}
|
|
@@ -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
|
-
|
|
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/'
|
|
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
|
-
|
|
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/'
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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/'
|
|
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/'
|
|
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
|
|
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/'
|
|
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
|
|
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/'
|
|
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
|
|
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
|
|
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/'
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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/'
|
|
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/'
|
|
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/'
|
|
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
|
|
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/'
|
|
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
|
|
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/'
|
|
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/'
|
|
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
|
|
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
|
|
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/'
|
|
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
|
|
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
|
|
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');
|