@attlaz/client 1.96.0 → 1.97.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/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 +57 -0
- package/dist/DataQuality/Service/QualityEndpoint.js +107 -21
- 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 +50 -46
- package/dist/index.js +37 -33
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -2
- /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/{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,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');
|
|
@@ -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/'
|
|
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/'
|
|
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/'
|
|
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) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { path } from '../Http/Data/Path.js';
|
|
1
2
|
import { Trigger } from '../Model/Trigger/Trigger.js';
|
|
2
3
|
import { Utils } from '../Utils.js';
|
|
3
4
|
import { QueryString } from '../Http/Data/QueryString.js';
|
|
@@ -5,7 +6,7 @@ import { Endpoint } from './Endpoint.js';
|
|
|
5
6
|
export class TriggerEndpoint extends Endpoint {
|
|
6
7
|
async getByFlow(flowId, projectEnvironmentId = null, pagination = null) {
|
|
7
8
|
try {
|
|
8
|
-
const queryString = new QueryString('/triggers/rfr
|
|
9
|
+
const queryString = new QueryString(path('/triggers/rfr/:flowId', { flowId }));
|
|
9
10
|
queryString.addPagination(pagination);
|
|
10
11
|
let parameters = null;
|
|
11
12
|
if (!Utils.isNullOrUndefined(projectEnvironmentId)) {
|
|
@@ -23,7 +24,7 @@ export class TriggerEndpoint extends Endpoint {
|
|
|
23
24
|
}
|
|
24
25
|
async getByCodeSource(codeSourceId, pagination = null) {
|
|
25
26
|
try {
|
|
26
|
-
const queryString = new QueryString('/triggers/csd
|
|
27
|
+
const queryString = new QueryString(path('/triggers/csd/:codeSourceId', { codeSourceId }));
|
|
27
28
|
queryString.addPagination(pagination);
|
|
28
29
|
const rawTriggers = await this.requestCollection(queryString, Trigger.parse, null);
|
|
29
30
|
return rawTriggers;
|
|
@@ -37,7 +38,7 @@ export class TriggerEndpoint extends Endpoint {
|
|
|
37
38
|
}
|
|
38
39
|
async getById(id) {
|
|
39
40
|
try {
|
|
40
|
-
const result = await this.requestObject('/triggers
|
|
41
|
+
const result = await this.requestObject(path('/triggers/:id', { id }), null, Trigger.parse);
|
|
41
42
|
return result.getData();
|
|
42
43
|
}
|
|
43
44
|
catch (error) {
|
|
@@ -49,7 +50,7 @@ export class TriggerEndpoint extends Endpoint {
|
|
|
49
50
|
}
|
|
50
51
|
async save(trigger) {
|
|
51
52
|
try {
|
|
52
|
-
const url = '/flows/'
|
|
53
|
+
const url = path('/flows/:flowId/triggers', { flowId: trigger.flowId });
|
|
53
54
|
const result = await this.requestObject(url, trigger, Trigger.parse, 'POST');
|
|
54
55
|
const createdTrigger = result.getData();
|
|
55
56
|
if (createdTrigger === null) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { path } from '../Http/Data/Path.js';
|
|
1
2
|
import { Utils } from '../Utils.js';
|
|
2
3
|
import { UserAction } from '../Model/User/UserAction.js';
|
|
3
4
|
import { UserSummary } from '../Model/User/UserSummary.js';
|
|
@@ -8,7 +9,7 @@ import { Endpoint } from './Endpoint.js';
|
|
|
8
9
|
export class UserActionEndpoint extends Endpoint {
|
|
9
10
|
async getWorkspaceMemberActions(workspaceId, memberId, pagination = null) {
|
|
10
11
|
try {
|
|
11
|
-
const queryString = new QueryString('/workspaces
|
|
12
|
+
const queryString = new QueryString(path('/workspaces/:workspaceId/members/:memberId/actions', { workspaceId, memberId }));
|
|
12
13
|
queryString.addPagination(pagination);
|
|
13
14
|
return await this.requestCollection(queryString, UserActionEndpoint.parse, null, 'GET');
|
|
14
15
|
}
|
|
@@ -21,7 +22,7 @@ export class UserActionEndpoint extends Endpoint {
|
|
|
21
22
|
}
|
|
22
23
|
async getUserActions(userId, pagination = null) {
|
|
23
24
|
try {
|
|
24
|
-
const queryString = new QueryString('/users/'
|
|
25
|
+
const queryString = new QueryString(path('/users/:userId/actions', { userId }));
|
|
25
26
|
queryString.addPagination(pagination);
|
|
26
27
|
return await this.requestCollection(queryString, UserActionEndpoint.parse, null, 'GET');
|
|
27
28
|
}
|
|
@@ -34,7 +35,7 @@ export class UserActionEndpoint extends Endpoint {
|
|
|
34
35
|
}
|
|
35
36
|
async getByResource(resourceId, resourceType, pagination = null) {
|
|
36
37
|
try {
|
|
37
|
-
const queryString = new QueryString('/resources/'
|
|
38
|
+
const queryString = new QueryString(path('/resources/:resourceType/:resourceId/actions', { resourceType, resourceId }));
|
|
38
39
|
queryString.addPagination(pagination);
|
|
39
40
|
return await this.requestCollection(queryString, UserActionEndpoint.parse, null, 'GET');
|
|
40
41
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { path } from '../Http/Data/Path.js';
|
|
1
2
|
import { UserAuthProvider } from '../Model/User/UserAuthProvider.js';
|
|
2
3
|
import { User } from '../Model/User/User.js';
|
|
3
4
|
import { UserSummary } from '../Model/User/UserSummary.js';
|
|
@@ -63,7 +64,7 @@ export class UserEndpoint extends Endpoint {
|
|
|
63
64
|
}
|
|
64
65
|
async update(user) {
|
|
65
66
|
try {
|
|
66
|
-
const url = '/users
|
|
67
|
+
const url = path('/users/:id', { id: user.id });
|
|
67
68
|
const result = await this.requestObject(url, user, User.parse, 'POST');
|
|
68
69
|
const updatedUser = result.getData();
|
|
69
70
|
if (updatedUser === null) {
|
|
@@ -116,7 +117,7 @@ export class UserEndpoint extends Endpoint {
|
|
|
116
117
|
}
|
|
117
118
|
async resetPassword(code, password) {
|
|
118
119
|
try {
|
|
119
|
-
const url = '/users/resetpassword
|
|
120
|
+
const url = path('/users/resetpassword/:code', { code });
|
|
120
121
|
const parser = (raw) => ({ updated: raw.updated });
|
|
121
122
|
const result = await this.requestObject(url, { password }, parser, 'POST', false);
|
|
122
123
|
const re = result.getData();
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { path } from '../Http/Data/Path.js';
|
|
1
2
|
import { Endpoint } from './Endpoint.js';
|
|
2
3
|
import { Workspace } from '../Model/Workspace/Workspace.js';
|
|
3
4
|
import { QueryString } from '../Http/Data/QueryString.js';
|
|
@@ -18,7 +19,7 @@ export class WorkspaceEndpoint extends Endpoint {
|
|
|
18
19
|
}
|
|
19
20
|
async getById(workspaceId) {
|
|
20
21
|
try {
|
|
21
|
-
const url = '/workspaces
|
|
22
|
+
const url = path('/workspaces/:workspaceId', { workspaceId });
|
|
22
23
|
const result = await this.requestObject(url, null, Workspace.parse);
|
|
23
24
|
return result.getData();
|
|
24
25
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { path } from '../Http/Data/Path.js';
|
|
1
2
|
import { QueryString } from '../Http/Data/QueryString.js';
|
|
2
3
|
import { WorkspaceMember } from '../Model/Workspace/WorkspaceMember.js';
|
|
3
4
|
import { WorkspaceMemberInvite2 } from '../Model/Workspace/WorkspaceMemberInvite2.js';
|
|
@@ -5,13 +6,13 @@ import { WorkspaceMemberRole } from '../Model/Workspace/WorkspaceMemberRole.js';
|
|
|
5
6
|
import { Endpoint } from './Endpoint.js';
|
|
6
7
|
export class WorkspaceMemberEndpoint extends Endpoint {
|
|
7
8
|
async getByWorkspace(workspaceId, pagination = null) {
|
|
8
|
-
const queryString = new QueryString('workspaces/'
|
|
9
|
+
const queryString = new QueryString(path('workspaces/:workspaceId/members', { workspaceId }));
|
|
9
10
|
queryString.addPagination(pagination);
|
|
10
11
|
const result = await this.requestCollection(queryString, WorkspaceMember.parse);
|
|
11
12
|
return result;
|
|
12
13
|
}
|
|
13
14
|
async invite(workspaceId, invites) {
|
|
14
|
-
const cmd = '/workspaces/'
|
|
15
|
+
const cmd = path('/workspaces/:workspaceId/invites', { workspaceId });
|
|
15
16
|
const rawInvites = [];
|
|
16
17
|
for (const invite of invites) {
|
|
17
18
|
rawInvites.push({ email: invite.email, role: invite.role.toString() });
|
|
@@ -48,7 +49,7 @@ export class WorkspaceMemberEndpoint extends Endpoint {
|
|
|
48
49
|
return null;
|
|
49
50
|
}
|
|
50
51
|
async getRoles(workspaceId) {
|
|
51
|
-
const cmd = '/workspaces/'
|
|
52
|
+
const cmd = path('/workspaces/:workspaceId/member-roles', { workspaceId });
|
|
52
53
|
const parser = (raw) => {
|
|
53
54
|
const role = new WorkspaceMemberRole();
|
|
54
55
|
role.id = raw.id;
|
|
@@ -59,7 +60,7 @@ export class WorkspaceMemberEndpoint extends Endpoint {
|
|
|
59
60
|
}
|
|
60
61
|
async saveMember(member) {
|
|
61
62
|
try {
|
|
62
|
-
const url = '/workspaces/'
|
|
63
|
+
const url = path('/workspaces/:workspaceId/members/:id', { workspaceId: member.workspaceId, id: member.id });
|
|
63
64
|
const result = await this.requestObject(url, member, WorkspaceMember.parse, 'POST');
|
|
64
65
|
const updatedWorkspaceMember = result.getData();
|
|
65
66
|
if (updatedWorkspaceMember === null) {
|