@attlaz/client 1.88.0 → 1.90.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/Model/Catalog.d.ts +19 -0
- package/dist/Catalog/Model/Catalog.js +28 -0
- package/dist/Catalog/Model/CatalogId.d.ts +4 -0
- package/dist/Catalog/Model/CatalogId.js +4 -0
- package/dist/Catalog/Model/CatalogProduct.d.ts +21 -0
- package/dist/Catalog/Model/CatalogProduct.js +31 -0
- package/dist/Catalog/Service/CatalogEndpoint.d.ts +15 -0
- package/dist/Catalog/Service/CatalogEndpoint.js +21 -0
- package/dist/Catalog/Service/CatalogProductEndpoint.d.ts +16 -0
- package/dist/Catalog/Service/CatalogProductEndpoint.js +24 -0
- package/dist/Client.d.ts +35 -7
- package/dist/Client.js +77 -7
- package/dist/DataQuality/Model/QualityDataset.d.ts +17 -0
- package/dist/DataQuality/Model/QualityDataset.js +26 -0
- package/dist/DataQuality/Model/QualityEntity.d.ts +24 -0
- package/dist/DataQuality/Model/QualityEntity.js +41 -0
- package/dist/DataQuality/Model/QualityProblem.d.ts +25 -0
- package/dist/DataQuality/Model/QualityProblem.js +43 -0
- package/dist/DataQuality/Service/QualityEndpoint.d.ts +45 -0
- package/dist/DataQuality/Service/QualityEndpoint.js +89 -0
- package/dist/EnhanceData/Model/GenerateContentBatch.d.ts +22 -0
- package/dist/EnhanceData/Model/GenerateContentBatch.js +34 -0
- package/dist/EnhanceData/Service/GenerateContentEndpoint.d.ts +23 -0
- package/dist/EnhanceData/Service/GenerateContentEndpoint.js +21 -0
- package/dist/FeedManagement/Model/CatalogFeed.d.ts +26 -0
- package/dist/FeedManagement/Model/CatalogFeed.js +51 -0
- package/dist/FeedManagement/Service/CatalogFeedEndpoint.d.ts +14 -0
- package/dist/FeedManagement/Service/CatalogFeedEndpoint.js +19 -0
- package/dist/{Model/Flow → Flow/Model}/Flow.d.ts +3 -3
- package/dist/{Model/Flow → Flow/Model}/Flow.js +1 -1
- package/dist/{Model/Flow → Flow/Model}/FlowRun.d.ts +3 -3
- package/dist/{Model/Flow → Flow/Model}/FlowRun.js +1 -1
- package/dist/{Model/Flow → Flow/Model}/FlowRunHistory.d.ts +1 -1
- package/dist/{Model/Flow → Flow/Model}/FlowRunLifecycle.d.ts +1 -1
- package/dist/{Model/Flow → Flow/Model}/FlowRunStats.d.ts +1 -1
- package/dist/{Model/Flow → Flow/Model}/FlowRunSummary.d.ts +1 -1
- package/dist/{Model/Flow → Flow/Model}/FlowSummary.d.ts +1 -1
- package/dist/{Service → Flow/Service}/FlowEndpoint.d.ts +5 -5
- package/dist/{Service → Flow/Service}/FlowEndpoint.js +6 -6
- package/dist/{Service → Flow/Service}/FlowRunEndpoint.d.ts +8 -8
- package/dist/{Service → Flow/Service}/FlowRunEndpoint.js +6 -6
- package/dist/Flow/Service/FlowRunRequestEndpoint.d.ts +6 -0
- package/dist/{Service → Flow/Service}/FlowRunRequestEndpoint.js +2 -2
- package/dist/{Service → Flow/Service}/FlowRunStatsEndpoint.d.ts +2 -2
- package/dist/{Service → Flow/Service}/FlowRunStatsEndpoint.js +2 -2
- package/dist/{Model/Log → Logging/Model}/Log.d.ts +2 -2
- package/dist/{Model/Log → Logging/Model}/Log.js +1 -1
- package/dist/{Model/Log → Logging/Model}/LogQuery.d.ts +1 -1
- package/dist/{Model/Log → Logging/Model}/LogStreamId.d.ts +1 -1
- package/dist/{Model/Log → Logging/Model}/LogStreamId.js +1 -1
- package/dist/{Model/Log → Logging/Model}/LogStreamInformation.d.ts +2 -2
- package/dist/{Service → Logging/Service}/LogEndpoint.d.ts +9 -9
- package/dist/{Service → Logging/Service}/LogEndpoint.js +6 -6
- package/dist/Model/Messaging/Subscriber.d.ts +1 -1
- package/dist/Model/Messaging/Subscriber.js +1 -1
- package/dist/Model/Search/SearchResult.d.ts +2 -2
- package/dist/Model/Search/SearchResult.js +2 -2
- package/dist/Pulse/Model/CatalogProductWithMatches.d.ts +31 -0
- package/dist/Pulse/Model/CatalogProductWithMatches.js +50 -0
- package/dist/Pulse/Model/CompetingVendorProduct.d.ts +15 -0
- package/dist/Pulse/Model/CompetingVendorProduct.js +21 -0
- package/dist/Pulse/Model/Competitor.d.ts +27 -0
- package/dist/Pulse/Model/Competitor.js +43 -0
- package/dist/{Model/Pulse → Pulse/Model}/CrawlJob.d.ts +2 -2
- package/dist/Pulse/Model/IndexJob.d.ts +19 -0
- package/dist/Pulse/Model/IndexJob.js +29 -0
- package/dist/Pulse/Model/MatchedVendorProduct.d.ts +29 -0
- package/dist/Pulse/Model/MatchedVendorProduct.js +48 -0
- package/dist/Pulse/Model/PriceAlertConfig.d.ts +22 -0
- package/dist/Pulse/Model/PriceAlertConfig.js +34 -0
- package/dist/Pulse/Model/PriceAlertEvent.d.ts +20 -0
- package/dist/Pulse/Model/PriceAlertEvent.js +33 -0
- package/dist/Pulse/Model/PriceIndexSnapshotEntry.d.ts +16 -0
- package/dist/Pulse/Model/PriceIndexSnapshotEntry.js +23 -0
- package/dist/Pulse/Model/PriceSuggestion.d.ts +29 -0
- package/dist/Pulse/Model/PriceSuggestion.js +46 -0
- package/dist/Pulse/Model/PricingRule.d.ts +30 -0
- package/dist/Pulse/Model/PricingRule.js +49 -0
- package/dist/Pulse/Model/ProductGroup.d.ts +25 -0
- package/dist/Pulse/Model/ProductGroup.js +36 -0
- package/dist/Pulse/Model/ProductMatch.d.ts +21 -0
- package/dist/Pulse/Model/ProductMatch.js +28 -0
- package/dist/Pulse/Model/ProductMatchJob.d.ts +27 -0
- package/dist/Pulse/Model/ProductMatchJob.js +42 -0
- package/dist/Pulse/Model/ReviewMatch.d.ts +42 -0
- package/dist/Pulse/Model/ReviewMatch.js +55 -0
- package/dist/Pulse/Model/TopCompetitor.d.ts +23 -0
- package/dist/Pulse/Model/TopCompetitor.js +37 -0
- package/dist/Pulse/Model/Vendor.d.ts +12 -0
- package/dist/Pulse/Model/Vendor.js +18 -0
- package/dist/{Model/Pulse → Pulse/Model}/VendorProduct.d.ts +6 -1
- package/dist/{Model/Pulse → Pulse/Model}/VendorProduct.js +9 -1
- package/dist/Pulse/Model/VendorProductPriceHistoryEntry.d.ts +18 -0
- package/dist/Pulse/Model/VendorProductPriceHistoryEntry.js +36 -0
- package/dist/Pulse/Model/VendorStatus.d.ts +25 -0
- package/dist/Pulse/Model/VendorStatus.js +34 -0
- package/dist/Pulse/Service/CompetitorEndpoint.d.ts +15 -0
- package/dist/Pulse/Service/CompetitorEndpoint.js +23 -0
- package/dist/{Service/Pulse → Pulse/Service}/CrawlJobEndpoint.d.ts +13 -3
- package/dist/{Service/Pulse → Pulse/Service}/CrawlJobEndpoint.js +18 -5
- package/dist/Pulse/Service/IndexJobEndpoint.d.ts +20 -0
- package/dist/Pulse/Service/IndexJobEndpoint.js +31 -0
- package/dist/Pulse/Service/PriceAlertEndpoint.d.ts +31 -0
- package/dist/Pulse/Service/PriceAlertEndpoint.js +42 -0
- package/dist/Pulse/Service/PricingEndpoint.d.ts +40 -0
- package/dist/Pulse/Service/PricingEndpoint.js +51 -0
- package/dist/Pulse/Service/ProductGroupEndpoint.d.ts +18 -0
- package/dist/Pulse/Service/ProductGroupEndpoint.js +19 -0
- package/dist/Pulse/Service/ProductMatchEndpoint.d.ts +47 -0
- package/dist/Pulse/Service/ProductMatchEndpoint.js +66 -0
- package/dist/Pulse/Service/ProductMatchJobEndpoint.d.ts +19 -0
- package/dist/Pulse/Service/ProductMatchJobEndpoint.js +30 -0
- package/dist/Pulse/Service/PulseCatalogProductEndpoint.d.ts +40 -0
- package/dist/Pulse/Service/PulseCatalogProductEndpoint.js +54 -0
- package/dist/Pulse/Service/PulseStatisticsEndpoint.d.ts +44 -0
- package/dist/Pulse/Service/PulseStatisticsEndpoint.js +65 -0
- package/dist/Pulse/Service/VendorProductEndpoint.d.ts +32 -0
- package/dist/{Service/Pulse → Pulse/Service}/VendorProductEndpoint.js +37 -2
- package/dist/Service/Endpoint.js +5 -3
- package/dist/index.d.ts +67 -27
- package/dist/index.js +67 -27
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Service/FlowRunRequestEndpoint.d.ts +0 -6
- package/dist/Service/Pulse/VendorProductEndpoint.d.ts +0 -14
- /package/dist/{Model/Flow → Flow/Model}/FlowRunHistory.js +0 -0
- /package/dist/{Model/Flow → Flow/Model}/FlowRunHistoryStatus.d.ts +0 -0
- /package/dist/{Model/Flow → Flow/Model}/FlowRunHistoryStatus.js +0 -0
- /package/dist/{Model/Flow → Flow/Model}/FlowRunLifecycle.js +0 -0
- /package/dist/{Model/Flow → Flow/Model}/FlowRunPriority.d.ts +0 -0
- /package/dist/{Model/Flow → Flow/Model}/FlowRunPriority.js +0 -0
- /package/dist/{Model/Flow → Flow/Model}/FlowRunResponse.d.ts +0 -0
- /package/dist/{Model/Flow → Flow/Model}/FlowRunResponse.js +0 -0
- /package/dist/{Model/Flow → Flow/Model}/FlowRunStats.js +0 -0
- /package/dist/{Model/Flow → Flow/Model}/FlowRunStatus.d.ts +0 -0
- /package/dist/{Model/Flow → Flow/Model}/FlowRunStatus.js +0 -0
- /package/dist/{Model/Flow → Flow/Model}/FlowRunSummary.js +0 -0
- /package/dist/{Model/Flow → Flow/Model}/FlowSummary.js +0 -0
- /package/dist/{Model/Flow → Flow/Model}/FlowTemplate.d.ts +0 -0
- /package/dist/{Model/Flow → Flow/Model}/FlowTemplate.js +0 -0
- /package/dist/{Model/Log → Logging/Model}/LogLevel.d.ts +0 -0
- /package/dist/{Model/Log → Logging/Model}/LogLevel.js +0 -0
- /package/dist/{Model/Log → Logging/Model}/LogQuery.js +0 -0
- /package/dist/{Model/Log → Logging/Model}/LogStatus.d.ts +0 -0
- /package/dist/{Model/Log → Logging/Model}/LogStatus.js +0 -0
- /package/dist/{Model/Log → Logging/Model}/LogStream.d.ts +0 -0
- /package/dist/{Model/Log → Logging/Model}/LogStream.js +0 -0
- /package/dist/{Model/Log → Logging/Model}/LogStreamInformation.js +0 -0
- /package/dist/{Model/Pulse → Pulse/Model}/CrawlJob.js +0 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { QueryString } from '../../Http/Data/QueryString.js';
|
|
2
|
+
import { QualityDataset } from '../Model/QualityDataset.js';
|
|
3
|
+
import { QualityEntity } from '../Model/QualityEntity.js';
|
|
4
|
+
import { QualityProblem } from '../Model/QualityProblem.js';
|
|
5
|
+
import { Endpoint } from '../../Service/Endpoint.js';
|
|
6
|
+
/**
|
|
7
|
+
* Data Quality — `/data_quality/datasets`. A dataset holds the entities being checked and the
|
|
8
|
+
* problems open on them.
|
|
9
|
+
*/
|
|
10
|
+
export class QualityEndpoint extends Endpoint {
|
|
11
|
+
async getDatasets(projectId, pagination = null) {
|
|
12
|
+
const queryString = new QueryString('/data_quality/datasets');
|
|
13
|
+
queryString.set('project', projectId);
|
|
14
|
+
queryString.addPagination(pagination);
|
|
15
|
+
return await this.requestCollection(queryString, QualityDataset.parse);
|
|
16
|
+
}
|
|
17
|
+
async getDataset(datasetId) {
|
|
18
|
+
const result = await this.requestObject('/data_quality/datasets/' + datasetId, null, QualityDataset.parse, 'GET');
|
|
19
|
+
return result.getData();
|
|
20
|
+
}
|
|
21
|
+
async createDataset(projectId, name, autoCloseMode = null) {
|
|
22
|
+
const body = { project: projectId, name };
|
|
23
|
+
if (autoCloseMode !== null) {
|
|
24
|
+
body['auto_close_mode'] = autoCloseMode;
|
|
25
|
+
}
|
|
26
|
+
const result = await this.requestObject('/data_quality/datasets', body, QualityDataset.parse, 'POST');
|
|
27
|
+
return result.getData();
|
|
28
|
+
}
|
|
29
|
+
async updateDataset(datasetId, changes) {
|
|
30
|
+
// camelCase keys are snake_cased by the base Endpoint (autoCloseMode -> auto_close_mode).
|
|
31
|
+
const result = await this.requestObject('/data_quality/datasets/' + datasetId, changes, QualityDataset.parse, 'PATCH');
|
|
32
|
+
return result.getData();
|
|
33
|
+
}
|
|
34
|
+
async deleteDataset(datasetId) {
|
|
35
|
+
await this.requestObject('/data_quality/datasets/' + datasetId, null, (raw) => raw, 'DELETE');
|
|
36
|
+
}
|
|
37
|
+
async getEntities(datasetId, pagination = null, filters = {}) {
|
|
38
|
+
const queryString = new QueryString('/data_quality/datasets/' + datasetId + '/entities');
|
|
39
|
+
if (filters.entityType) {
|
|
40
|
+
queryString.set('entity_type', filters.entityType);
|
|
41
|
+
}
|
|
42
|
+
if (filters.status) {
|
|
43
|
+
queryString.set('status', filters.status);
|
|
44
|
+
}
|
|
45
|
+
if (filters.search) {
|
|
46
|
+
queryString.set('search', filters.search);
|
|
47
|
+
}
|
|
48
|
+
if (filters.severity) {
|
|
49
|
+
queryString.set('severity', filters.severity);
|
|
50
|
+
}
|
|
51
|
+
if (filters.property) {
|
|
52
|
+
queryString.set('property', filters.property);
|
|
53
|
+
}
|
|
54
|
+
queryString.addPagination(pagination);
|
|
55
|
+
return await this.requestCollection(queryString, QualityEntity.parse);
|
|
56
|
+
}
|
|
57
|
+
async getEntityProblems(datasetId, entityType, entityId) {
|
|
58
|
+
const path = '/data_quality/datasets/' + datasetId
|
|
59
|
+
+ '/entities/' + encodeURIComponent(entityType)
|
|
60
|
+
+ '/' + encodeURIComponent(entityId) + '/problems';
|
|
61
|
+
return await this.requestCollection(path, QualityProblem.parse);
|
|
62
|
+
}
|
|
63
|
+
/** Clear an entity's problems so the next scan starts from scratch; returns how many were removed. */
|
|
64
|
+
async resetEntity(datasetId, entityType, entityId) {
|
|
65
|
+
const path = '/data_quality/datasets/' + datasetId
|
|
66
|
+
+ '/entities/' + encodeURIComponent(entityType)
|
|
67
|
+
+ '/' + encodeURIComponent(entityId) + '/reset';
|
|
68
|
+
const result = await this.requestObject(path, {}, (raw) => ({ deleted: raw.deleted ?? 0 }), 'POST');
|
|
69
|
+
return result.getData()?.deleted ?? 0;
|
|
70
|
+
}
|
|
71
|
+
async getFilterOptions(datasetId) {
|
|
72
|
+
const result = await this.requestObject('/data_quality/datasets/' + datasetId + '/filter-options', null, (raw) => ({
|
|
73
|
+
entityTypes: raw.entity_types ?? [],
|
|
74
|
+
properties: raw.properties ?? [],
|
|
75
|
+
}), 'GET');
|
|
76
|
+
return result.getData() ?? { entityTypes: [], properties: [] };
|
|
77
|
+
}
|
|
78
|
+
async getSummary(datasetId) {
|
|
79
|
+
const result = await this.requestObject('/data_quality/datasets/' + datasetId + '/summary', null, (raw) => {
|
|
80
|
+
const rows = raw.counts ?? [];
|
|
81
|
+
return rows.map((row) => ({
|
|
82
|
+
property: row.property,
|
|
83
|
+
severity: row.severity,
|
|
84
|
+
count: Number(row.count),
|
|
85
|
+
}));
|
|
86
|
+
}, 'GET');
|
|
87
|
+
return result.getData() ?? [];
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ApiRecord } from '../../Model/ApiRecord.js';
|
|
2
|
+
/**
|
|
3
|
+
* One request to generate content for a set of resources — the
|
|
4
|
+
* `/projects/:projectId/content-generation-batches` resource.
|
|
5
|
+
*
|
|
6
|
+
* `resourcePool` is what the resources are drawn from (today always a catalog), `resources` the
|
|
7
|
+
* entities to generate for, and `properties` which fields of them to write (name, description, …).
|
|
8
|
+
* The generated values land as proposals for review rather than being applied directly.
|
|
9
|
+
*/
|
|
10
|
+
export declare class GenerateContentBatch {
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
projectId: string;
|
|
14
|
+
strategyId: string;
|
|
15
|
+
resourcePoolId: string;
|
|
16
|
+
resourceIds: string[];
|
|
17
|
+
properties: string[];
|
|
18
|
+
createdAt: Date | null;
|
|
19
|
+
updatedAt: Date | null;
|
|
20
|
+
constructor(id: string, name: string, projectId: string);
|
|
21
|
+
static parse(raw: ApiRecord): GenerateContentBatch;
|
|
22
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One request to generate content for a set of resources — the
|
|
3
|
+
* `/projects/:projectId/content-generation-batches` resource.
|
|
4
|
+
*
|
|
5
|
+
* `resourcePool` is what the resources are drawn from (today always a catalog), `resources` the
|
|
6
|
+
* entities to generate for, and `properties` which fields of them to write (name, description, …).
|
|
7
|
+
* The generated values land as proposals for review rather than being applied directly.
|
|
8
|
+
*/
|
|
9
|
+
export class GenerateContentBatch {
|
|
10
|
+
id;
|
|
11
|
+
name;
|
|
12
|
+
projectId;
|
|
13
|
+
strategyId = '';
|
|
14
|
+
resourcePoolId = '';
|
|
15
|
+
resourceIds = [];
|
|
16
|
+
properties = [];
|
|
17
|
+
createdAt = null;
|
|
18
|
+
updatedAt = null;
|
|
19
|
+
constructor(id, name, projectId) {
|
|
20
|
+
this.id = id;
|
|
21
|
+
this.name = name;
|
|
22
|
+
this.projectId = projectId;
|
|
23
|
+
}
|
|
24
|
+
static parse(raw) {
|
|
25
|
+
const batch = new GenerateContentBatch(raw.id, raw.name ?? '', raw.project);
|
|
26
|
+
batch.strategyId = raw.strategy ?? '';
|
|
27
|
+
batch.resourcePoolId = raw.resource_pool ?? '';
|
|
28
|
+
batch.resourceIds = raw.resources ?? [];
|
|
29
|
+
batch.properties = raw.properties ?? [];
|
|
30
|
+
batch.createdAt = raw.created_at ? new Date(raw.created_at) : null;
|
|
31
|
+
batch.updatedAt = raw.updated_at ? new Date(raw.updated_at) : null;
|
|
32
|
+
return batch;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { CursorPagination } from '../../Model/Pagination/CursorPagination.js';
|
|
2
|
+
import { CollectionResult } from '../../Model/Result/CollectionResult.js';
|
|
3
|
+
import { Endpoint } from '../../Service/Endpoint.js';
|
|
4
|
+
import { GenerateContentBatch } from '../Model/GenerateContentBatch.js';
|
|
5
|
+
/** What to generate, for which resources, using which strategy. */
|
|
6
|
+
export type GenerateContentBatchData = {
|
|
7
|
+
name: string;
|
|
8
|
+
strategy: string;
|
|
9
|
+
resourcePool: string;
|
|
10
|
+
resources: string[];
|
|
11
|
+
properties: string[];
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Data Enrichment content generation — `/projects/:projectId/content-generation-batches`.
|
|
15
|
+
*
|
|
16
|
+
* Only batches are exposed by the API today; strategies, languages and the resulting proposals are
|
|
17
|
+
* not yet endpoints, so they have no models here.
|
|
18
|
+
*/
|
|
19
|
+
export declare class GenerateContentEndpoint extends Endpoint {
|
|
20
|
+
getBatches(projectId: string, pagination?: CursorPagination | null): Promise<CollectionResult<GenerateContentBatch>>;
|
|
21
|
+
/** Queue a batch. The generated values become proposals to review, not direct writes. */
|
|
22
|
+
requestGeneration(projectId: string, data: GenerateContentBatchData): Promise<GenerateContentBatch | null>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { QueryString } from '../../Http/Data/QueryString.js';
|
|
2
|
+
import { Endpoint } from '../../Service/Endpoint.js';
|
|
3
|
+
import { GenerateContentBatch } from '../Model/GenerateContentBatch.js';
|
|
4
|
+
/**
|
|
5
|
+
* Data Enrichment content generation — `/projects/:projectId/content-generation-batches`.
|
|
6
|
+
*
|
|
7
|
+
* Only batches are exposed by the API today; strategies, languages and the resulting proposals are
|
|
8
|
+
* not yet endpoints, so they have no models here.
|
|
9
|
+
*/
|
|
10
|
+
export class GenerateContentEndpoint extends Endpoint {
|
|
11
|
+
async getBatches(projectId, pagination = null) {
|
|
12
|
+
const queryString = new QueryString('/projects/' + projectId + '/content-generation-batches');
|
|
13
|
+
queryString.addPagination(pagination);
|
|
14
|
+
return await this.requestCollection(queryString, GenerateContentBatch.parse);
|
|
15
|
+
}
|
|
16
|
+
/** Queue a batch. The generated values become proposals to review, not direct writes. */
|
|
17
|
+
async requestGeneration(projectId, data) {
|
|
18
|
+
const result = await this.requestObject('/projects/' + projectId + '/content-generation-batches', data, GenerateContentBatch.parse, 'POST');
|
|
19
|
+
return result.getData();
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Catalog } from '../../Catalog/Model/Catalog.js';
|
|
2
|
+
import { ApiRecord } from '../../Model/ApiRecord.js';
|
|
3
|
+
/**
|
|
4
|
+
* A feed generated from a catalog and published to a connection — the `/catalogs/:catalogId/feeds`
|
|
5
|
+
* resource (a `ResourceFeed` server-side).
|
|
6
|
+
*
|
|
7
|
+
* `source` and `destination` are ids unless the request expands them; `expand=source` fills
|
|
8
|
+
* {@link source}, and the destination connection is left raw because its shape depends on the
|
|
9
|
+
* adapter.
|
|
10
|
+
*/
|
|
11
|
+
export declare class CatalogFeed {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
description: string;
|
|
15
|
+
status: string;
|
|
16
|
+
/** When this feed last ran; null if it never has. */
|
|
17
|
+
lastRunAt: Date | null;
|
|
18
|
+
sourceId: string | null;
|
|
19
|
+
destinationId: string | null;
|
|
20
|
+
/** Set only when the request asked for `expand=source`. */
|
|
21
|
+
source: Catalog | null;
|
|
22
|
+
/** Set only when the request asked for `expand=destination`; shape varies per adapter. */
|
|
23
|
+
destination: Record<string, unknown> | null;
|
|
24
|
+
constructor(id: string, name: string);
|
|
25
|
+
static parse(raw: ApiRecord): CatalogFeed;
|
|
26
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Catalog } from '../../Catalog/Model/Catalog.js';
|
|
2
|
+
/**
|
|
3
|
+
* A feed generated from a catalog and published to a connection — the `/catalogs/:catalogId/feeds`
|
|
4
|
+
* resource (a `ResourceFeed` server-side).
|
|
5
|
+
*
|
|
6
|
+
* `source` and `destination` are ids unless the request expands them; `expand=source` fills
|
|
7
|
+
* {@link source}, and the destination connection is left raw because its shape depends on the
|
|
8
|
+
* adapter.
|
|
9
|
+
*/
|
|
10
|
+
export class CatalogFeed {
|
|
11
|
+
id;
|
|
12
|
+
name;
|
|
13
|
+
description = '';
|
|
14
|
+
status = '';
|
|
15
|
+
/** When this feed last ran; null if it never has. */
|
|
16
|
+
lastRunAt = null;
|
|
17
|
+
sourceId = null;
|
|
18
|
+
destinationId = null;
|
|
19
|
+
/** Set only when the request asked for `expand=source`. */
|
|
20
|
+
source = null;
|
|
21
|
+
/** Set only when the request asked for `expand=destination`; shape varies per adapter. */
|
|
22
|
+
destination = null;
|
|
23
|
+
constructor(id, name) {
|
|
24
|
+
this.id = id;
|
|
25
|
+
this.name = name;
|
|
26
|
+
}
|
|
27
|
+
static parse(raw) {
|
|
28
|
+
const feed = new CatalogFeed(raw.id, raw.name);
|
|
29
|
+
feed.description = raw.description ?? '';
|
|
30
|
+
feed.status = raw.status ?? '';
|
|
31
|
+
feed.lastRunAt = raw.last_run_at ? new Date(raw.last_run_at) : null;
|
|
32
|
+
// Both arrive as a bare id, or as the full object when expanded.
|
|
33
|
+
const source = raw.source;
|
|
34
|
+
if (typeof source === 'string') {
|
|
35
|
+
feed.sourceId = source;
|
|
36
|
+
}
|
|
37
|
+
else if (source !== null && typeof source === 'object') {
|
|
38
|
+
feed.source = Catalog.parse(source);
|
|
39
|
+
feed.sourceId = feed.source.id.toString();
|
|
40
|
+
}
|
|
41
|
+
const destination = raw.destination;
|
|
42
|
+
if (typeof destination === 'string') {
|
|
43
|
+
feed.destinationId = destination;
|
|
44
|
+
}
|
|
45
|
+
else if (destination !== null && typeof destination === 'object') {
|
|
46
|
+
feed.destination = destination;
|
|
47
|
+
feed.destinationId = feed.destination.id ?? null;
|
|
48
|
+
}
|
|
49
|
+
return feed;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CatalogId } from '../../Catalog/Model/CatalogId.js';
|
|
2
|
+
import { CursorPagination } from '../../Model/Pagination/CursorPagination.js';
|
|
3
|
+
import { CollectionResult } from '../../Model/Result/CollectionResult.js';
|
|
4
|
+
import { Endpoint } from '../../Service/Endpoint.js';
|
|
5
|
+
import { CatalogFeed } from '../Model/CatalogFeed.js';
|
|
6
|
+
/**
|
|
7
|
+
* Feeds of a catalog — `/catalogs/:catalogId/feeds`.
|
|
8
|
+
*
|
|
9
|
+
* `expand` accepts `source`, `source.source`, `destination` and `destination.adapter`; without it
|
|
10
|
+
* the feed carries only the ids.
|
|
11
|
+
*/
|
|
12
|
+
export declare class CatalogFeedEndpoint extends Endpoint {
|
|
13
|
+
getByCatalog(catalogId: CatalogId | string, pagination?: CursorPagination | null, expand?: string[]): Promise<CollectionResult<CatalogFeed>>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { QueryString } from '../../Http/Data/QueryString.js';
|
|
2
|
+
import { Endpoint } from '../../Service/Endpoint.js';
|
|
3
|
+
import { CatalogFeed } from '../Model/CatalogFeed.js';
|
|
4
|
+
/**
|
|
5
|
+
* Feeds of a catalog — `/catalogs/:catalogId/feeds`.
|
|
6
|
+
*
|
|
7
|
+
* `expand` accepts `source`, `source.source`, `destination` and `destination.adapter`; without it
|
|
8
|
+
* the feed carries only the ids.
|
|
9
|
+
*/
|
|
10
|
+
export class CatalogFeedEndpoint extends Endpoint {
|
|
11
|
+
async getByCatalog(catalogId, pagination = null, expand = []) {
|
|
12
|
+
const queryString = new QueryString('/catalogs/' + catalogId.toString() + '/feeds');
|
|
13
|
+
if (expand.length > 0) {
|
|
14
|
+
queryString.set('expand', expand);
|
|
15
|
+
}
|
|
16
|
+
queryString.addPagination(pagination);
|
|
17
|
+
return await this.requestCollection(queryString, CatalogFeed.parse);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { State } from '
|
|
2
|
-
import { StateAware } from '
|
|
1
|
+
import { State } from '../../Model/State.js';
|
|
2
|
+
import { StateAware } from '../../Model/StateAware.js';
|
|
3
3
|
import { MetaDataAware } from '../../Core/MetaDataAware.js';
|
|
4
|
-
import { ApiRecord } from '
|
|
4
|
+
import { ApiRecord } from '../../Model/ApiRecord.js';
|
|
5
5
|
export declare class Flow extends MetaDataAware implements StateAware {
|
|
6
6
|
id: string;
|
|
7
7
|
key: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MetaDataAware } from '../../Core/MetaDataAware.js';
|
|
2
|
-
import { ApiRecord } from '
|
|
3
|
-
import { LogLevel } from '
|
|
4
|
-
import { LogStreamId } from '
|
|
2
|
+
import { ApiRecord } from '../../Model/ApiRecord.js';
|
|
3
|
+
import { LogLevel } from '../../Logging/Model/LogLevel.js';
|
|
4
|
+
import { LogStreamId } from '../../Logging/Model/LogStreamId.js';
|
|
5
5
|
import { FlowRunPriority } from './FlowRunPriority.js';
|
|
6
6
|
export declare class FlowRun extends MetaDataAware {
|
|
7
7
|
id: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MetaDataAware } from '../../Core/MetaDataAware.js';
|
|
2
2
|
import { Utils } from '../../Utils.js';
|
|
3
|
-
import { LogStreamId } from '
|
|
3
|
+
import { LogStreamId } from '../../Logging/Model/LogStreamId.js';
|
|
4
4
|
import { FlowRunPriority } from './FlowRunPriority.js';
|
|
5
5
|
export class FlowRun extends MetaDataAware {
|
|
6
6
|
id;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FlowRunStatus } from './FlowRunStatus.js';
|
|
2
2
|
import { FlowRun } from './FlowRun.js';
|
|
3
|
-
import { ApiRecord } from '
|
|
3
|
+
import { ApiRecord } from '../../Model/ApiRecord.js';
|
|
4
4
|
export declare class FlowRunSummary extends FlowRun {
|
|
5
5
|
time: Date;
|
|
6
6
|
runDuration: number;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Flow } from '../Model/Flow
|
|
2
|
-
import { FlowSummary } from '../Model/
|
|
3
|
-
import { CursorPagination } from '
|
|
4
|
-
import { CollectionResult } from '
|
|
5
|
-
import { Endpoint } from '
|
|
1
|
+
import { Flow } from '../Model/Flow.js';
|
|
2
|
+
import { FlowSummary } from '../Model/FlowSummary.js';
|
|
3
|
+
import { CursorPagination } from '../../Model/Pagination/CursorPagination.js';
|
|
4
|
+
import { CollectionResult } from '../../Model/Result/CollectionResult.js';
|
|
5
|
+
import { Endpoint } from '../../Service/Endpoint.js';
|
|
6
6
|
export declare class FlowEndpoint extends Endpoint {
|
|
7
7
|
getByProject(projectId: string, pagination: CursorPagination): Promise<CollectionResult<Flow>>;
|
|
8
8
|
getById(flowId: string): Promise<Flow | null>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { QueryString } from '
|
|
2
|
-
import { HttpStatus } from '
|
|
3
|
-
import { Flow } from '../Model/Flow
|
|
4
|
-
import { FlowSummary } from '../Model/
|
|
5
|
-
import { Utils } from '
|
|
6
|
-
import { Endpoint } from '
|
|
1
|
+
import { QueryString } from '../../Http/Data/QueryString.js';
|
|
2
|
+
import { HttpStatus } from '../../Http/HttpStatus.js';
|
|
3
|
+
import { Flow } from '../Model/Flow.js';
|
|
4
|
+
import { FlowSummary } from '../Model/FlowSummary.js';
|
|
5
|
+
import { Utils } from '../../Utils.js';
|
|
6
|
+
import { Endpoint } from '../../Service/Endpoint.js';
|
|
7
7
|
export class FlowEndpoint extends Endpoint {
|
|
8
8
|
async getByProject(projectId, pagination) {
|
|
9
9
|
try {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { FlowRun } from '../Model/
|
|
2
|
-
import { FlowRunStatus } from '../Model/
|
|
3
|
-
import { FlowRunSummary } from '../Model/
|
|
4
|
-
import { FlowRunHistory } from '../Model/
|
|
5
|
-
import { FlowRunLifecycle } from '../Model/
|
|
6
|
-
import { CollectionResult } from '
|
|
7
|
-
import { CursorPagination } from '
|
|
8
|
-
import { Endpoint } from '
|
|
1
|
+
import { FlowRun } from '../Model/FlowRun.js';
|
|
2
|
+
import { FlowRunStatus } from '../Model/FlowRunStatus.js';
|
|
3
|
+
import { FlowRunSummary } from '../Model/FlowRunSummary.js';
|
|
4
|
+
import { FlowRunHistory } from '../Model/FlowRunHistory.js';
|
|
5
|
+
import { FlowRunLifecycle } from '../Model/FlowRunLifecycle.js';
|
|
6
|
+
import { CollectionResult } from '../../Model/Result/CollectionResult.js';
|
|
7
|
+
import { CursorPagination } from '../../Model/Pagination/CursorPagination.js';
|
|
8
|
+
import { Endpoint } from '../../Service/Endpoint.js';
|
|
9
9
|
export declare class FlowRunEndpoint extends Endpoint {
|
|
10
10
|
getFlowRuns(flowId: string): Promise<CollectionResult<FlowRun>>;
|
|
11
11
|
getFlowRunSummaries(flowId: string, flowRunStatuses?: FlowRunStatus[] | null, pagination?: CursorPagination | null, projectEnvironmentId?: string | null): Promise<CollectionResult<FlowRunSummary>>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { FlowRun } from '../Model/
|
|
2
|
-
import { FlowRunSummary } from '../Model/
|
|
3
|
-
import { FlowRunHistory } from '../Model/
|
|
4
|
-
import { FlowRunLifecycle } from '../Model/
|
|
5
|
-
import { QueryString } from '
|
|
6
|
-
import { Endpoint } from '
|
|
1
|
+
import { FlowRun } from '../Model/FlowRun.js';
|
|
2
|
+
import { FlowRunSummary } from '../Model/FlowRunSummary.js';
|
|
3
|
+
import { FlowRunHistory } from '../Model/FlowRunHistory.js';
|
|
4
|
+
import { FlowRunLifecycle } from '../Model/FlowRunLifecycle.js';
|
|
5
|
+
import { QueryString } from '../../Http/Data/QueryString.js';
|
|
6
|
+
import { Endpoint } from '../../Service/Endpoint.js';
|
|
7
7
|
export class FlowRunEndpoint extends Endpoint {
|
|
8
8
|
async getFlowRuns(flowId) {
|
|
9
9
|
const result = await this.requestCollection('/flows/' + flowId + '/runs', FlowRun.parse);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FlowRunResponse } from '../Model/FlowRunResponse.js';
|
|
2
|
+
import { Parameters } from '../../Http/Data/Parameters.js';
|
|
3
|
+
import { Endpoint } from '../../Service/Endpoint.js';
|
|
4
|
+
export declare class FlowRunRequestEndpoint extends Endpoint {
|
|
5
|
+
requestFlowRun(flowId: string, params: Parameters, wait?: boolean): Promise<FlowRunResponse>;
|
|
6
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FlowRunResponse } from '../Model/
|
|
2
|
-
import { Endpoint } from '
|
|
1
|
+
import { FlowRunResponse } from '../Model/FlowRunResponse.js';
|
|
2
|
+
import { Endpoint } from '../../Service/Endpoint.js';
|
|
3
3
|
export class FlowRunRequestEndpoint extends Endpoint {
|
|
4
4
|
async requestFlowRun(flowId, params, wait = false) {
|
|
5
5
|
let url = '/flows/' + flowId + '/flowrunrequests';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FlowRunStats } from '../Model/
|
|
2
|
-
import { Endpoint } from '
|
|
1
|
+
import { FlowRunStats } from '../Model/FlowRunStats.js';
|
|
2
|
+
import { Endpoint } from '../../Service/Endpoint.js';
|
|
3
3
|
export declare class FlowRunStatsEndpoint extends Endpoint {
|
|
4
4
|
create(flowRunStats: FlowRunStats): Promise<FlowRunStats>;
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FlowRunStats } from '../Model/
|
|
2
|
-
import { Endpoint } from '
|
|
1
|
+
import { FlowRunStats } from '../Model/FlowRunStats.js';
|
|
2
|
+
import { Endpoint } from '../../Service/Endpoint.js';
|
|
3
3
|
export class FlowRunStatsEndpoint extends Endpoint {
|
|
4
4
|
async create(flowRunStats) {
|
|
5
5
|
const url = '/flowruns/' + flowRunStats.flowRunId + '/stats';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ApiRecord } from '
|
|
2
|
-
import { DataValueCollection } from '
|
|
1
|
+
import { ApiRecord } from '../../Model/ApiRecord.js';
|
|
2
|
+
import { DataValueCollection } from '../../Model/DataValueCollection.js';
|
|
3
3
|
import { LogLevel } from './LogLevel.js';
|
|
4
4
|
import { LogStatus } from './LogStatus.js';
|
|
5
5
|
import { LogStreamId } from './LogStreamId.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Utils } from '../../Utils.js';
|
|
2
|
-
import { DataValueCollection } from '
|
|
2
|
+
import { DataValueCollection } from '../../Model/DataValueCollection.js';
|
|
3
3
|
import { LogLevel } from './LogLevel.js';
|
|
4
4
|
import { LogStatus } from './LogStatus.js';
|
|
5
5
|
import { LogStreamId } from './LogStreamId.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LogLevel } from './LogLevel.js';
|
|
2
2
|
import { LogStreamId } from './LogStreamId.js';
|
|
3
|
-
import { DataValueValue } from '
|
|
3
|
+
import { DataValueValue } from '../../Model/DataValue.js';
|
|
4
4
|
export declare class LogQuery {
|
|
5
5
|
readonly logStreamId: LogStreamId;
|
|
6
6
|
/** @deprecated use filters property instead **/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LogLevel } from './LogLevel.js';
|
|
2
|
-
import { ApiRecord } from '
|
|
3
|
-
import { DataValueValue } from '
|
|
2
|
+
import { ApiRecord } from '../../Model/ApiRecord.js';
|
|
3
|
+
import { DataValueValue } from '../../Model/DataValue.js';
|
|
4
4
|
import { LogStreamId } from './LogStreamId.js';
|
|
5
5
|
export declare class LogStreamInformation {
|
|
6
6
|
logStreamId: LogStreamId;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { FilterNode } from '
|
|
2
|
-
import { Log } from '../Model/Log
|
|
3
|
-
import { LogQuery } from '../Model/
|
|
4
|
-
import { LogStream } from '../Model/
|
|
5
|
-
import { LogStreamId } from '../Model/
|
|
6
|
-
import { LogStreamInformation } from '../Model/
|
|
7
|
-
import { CursorPagination } from '
|
|
8
|
-
import { CollectionResult } from '
|
|
9
|
-
import { Endpoint } from '
|
|
1
|
+
import { FilterNode } from '../../Model/Filter/FilterNode.js';
|
|
2
|
+
import { Log } from '../Model/Log.js';
|
|
3
|
+
import { LogQuery } from '../Model/LogQuery.js';
|
|
4
|
+
import { LogStream } from '../Model/LogStream.js';
|
|
5
|
+
import { LogStreamId } from '../Model/LogStreamId.js';
|
|
6
|
+
import { LogStreamInformation } from '../Model/LogStreamInformation.js';
|
|
7
|
+
import { CursorPagination } from '../../Model/Pagination/CursorPagination.js';
|
|
8
|
+
import { CollectionResult } from '../../Model/Result/CollectionResult.js';
|
|
9
|
+
import { Endpoint } from '../../Service/Endpoint.js';
|
|
10
10
|
export declare class LogEndpoint extends Endpoint {
|
|
11
11
|
getLogs(logQuery: LogQuery): Promise<CollectionResult<Log>>;
|
|
12
12
|
getCursoredLogEntries(logStreamId: LogStreamId, pagination: CursorPagination | null, filter: FilterNode | null): Promise<CollectionResult<Log>>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { QueryString } from '
|
|
2
|
-
import { Log } from '../Model/Log
|
|
3
|
-
import { LogStream } from '../Model/
|
|
4
|
-
import { LogStreamId } from '../Model/
|
|
5
|
-
import { LogStreamInformation } from '../Model/
|
|
6
|
-
import { Endpoint } from '
|
|
1
|
+
import { QueryString } from '../../Http/Data/QueryString.js';
|
|
2
|
+
import { Log } from '../Model/Log.js';
|
|
3
|
+
import { LogStream } from '../Model/LogStream.js';
|
|
4
|
+
import { LogStreamId } from '../Model/LogStreamId.js';
|
|
5
|
+
import { LogStreamInformation } from '../Model/LogStreamInformation.js';
|
|
6
|
+
import { Endpoint } from '../../Service/Endpoint.js';
|
|
7
7
|
export class LogEndpoint extends Endpoint {
|
|
8
8
|
async getLogs(logQuery) {
|
|
9
9
|
const arrQuery = [];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { State } from '../State.js';
|
|
2
2
|
import { EventType } from '../Event/EventType.js';
|
|
3
|
-
import { LogLevel } from '
|
|
3
|
+
import { LogLevel } from '../../Logging/Model/LogLevel.js';
|
|
4
4
|
import { StateAware } from '../StateAware.js';
|
|
5
5
|
import { MetaDataAware } from '../../Core/MetaDataAware.js';
|
|
6
6
|
import { ApiRecord } from '../ApiRecord.js';
|
|
@@ -4,8 +4,8 @@ import { ApiRecord } from '../ApiRecord.js';
|
|
|
4
4
|
import { CodeSource } from '../Deployment/CodeSource.js';
|
|
5
5
|
import { CodeSourceAccount } from '../Deployment/CodeSourceAccount.js';
|
|
6
6
|
import { EntityType } from '../EntityType.js';
|
|
7
|
-
import { Flow } from '
|
|
8
|
-
import { FlowRun } from '
|
|
7
|
+
import { Flow } from '../../Flow/Model/Flow.js';
|
|
8
|
+
import { FlowRun } from '../../Flow/Model/FlowRun.js';
|
|
9
9
|
import { Channel } from '../Messaging/Channel/Channel.js';
|
|
10
10
|
import { Subscriber } from '../Messaging/Subscriber.js';
|
|
11
11
|
import { CodeDeploy } from '../Project/CodeDeploy.js';
|