@coveo/platform-client 53.2.0 → 53.3.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/cjs/resources/Catalogs/CatalogContent.js.map +1 -1
- package/dist/cjs/resources/Pipelines/Statements/Statements.js +82 -0
- package/dist/cjs/resources/Pipelines/Statements/Statements.js.map +1 -1
- package/dist/esm/resources/Catalogs/CatalogContent.js.map +1 -1
- package/dist/esm/resources/Pipelines/Statements/Statements.js +82 -0
- package/dist/esm/resources/Pipelines/Statements/Statements.js.map +1 -1
- package/dist/types/resources/Catalogs/CatalogContent.d.ts +4 -3
- package/dist/types/resources/Catalogs/CatalogInterfaces.d.ts +14 -0
- package/dist/types/resources/Pipelines/Statements/Statements.d.ts +81 -3
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CatalogContent.js","sourceRoot":"","sources":["../../../../src/resources/Catalogs/CatalogContent.ts"],"names":[],"mappings":";;;AAAA,0EAAmC;AACnC,yEAAsC;
|
|
1
|
+
{"version":3,"file":"CatalogContent.js","sourceRoot":"","sources":["../../../../src/resources/Catalogs/CatalogContent.ts"],"names":[],"mappings":";;;AAAA,0EAAmC;AACnC,yEAAsC;AAOtC,MAAqB,cAAe,SAAQ,qBAAQ;IAChD,MAAM,CAAC,OAAO,GAAG,uBAAuB,oBAAG,CAAC,cAAc,wBAAwB,CAAC;IAEnF,cAAc,CAAC,QAAgB;QAC3B,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAW,GAAG,cAAc,CAAC,OAAO,IAAI,QAAQ,cAAc,CAAC,CAAC;IACvF,CAAC;IAED,iBAAiB,CAAC,QAAgB,EAAE,UAAsB;QACtD,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CACf,IAAI,CAAC,SAAS,CAAC,GAAG,cAAc,CAAC,OAAO,IAAI,QAAQ,iBAAiB,EAAE,UAAU,CAAC,CACrF,CAAC;IACN,CAAC;IAED,WAAW,CAAC,QAAgB,EAAE,UAAsB;QAChD,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CACf,IAAI,CAAC,SAAS,CAAC,GAAG,cAAc,CAAC,OAAO,IAAI,QAAQ,WAAW,EAAE,UAAU,CAAC,CAC/E,CAAC;IACN,CAAC;;AAjBL,iCAkBC"}
|
|
@@ -5,15 +5,36 @@ const Resource_js_1 = tslib_1.__importDefault(require("../../Resource.js"));
|
|
|
5
5
|
class Statements extends Resource_js_1.default {
|
|
6
6
|
static getBaseUrl = (pipelineId) => `/rest/search/v2/admin/pipelines/${pipelineId}/statements`;
|
|
7
7
|
static getStatementUrl = (pipelineId, statementId) => `${Statements.getBaseUrl(pipelineId)}/${statementId}`;
|
|
8
|
+
/**
|
|
9
|
+
* Gets a sorted page of query pipeline statements matching certain criteria from a specific query pipeline.
|
|
10
|
+
*
|
|
11
|
+
* @param {string} pipelineId The unique identifier of the target query pipeline.
|
|
12
|
+
* @param {ListStatementParams} options Listing options.
|
|
13
|
+
* @returns {Promise<PageModel<StatementModel, "statements">>} The matching statements in the current page of results
|
|
14
|
+
*/
|
|
8
15
|
list(pipelineId, options) {
|
|
9
16
|
return this.api.get(this.buildPath(Statements.getBaseUrl(pipelineId), { organizationId: this.api.organizationId, ...options }));
|
|
10
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Exports the definition, condition, and description of statements from a specific query pipeline to a CSV file.
|
|
20
|
+
*
|
|
21
|
+
* @param {string} pipelineId The unique identifier of the target query pipeline.
|
|
22
|
+
* @param {ExportStatementParams} options Export options
|
|
23
|
+
* @returns {Promise<Blob>} The file containing the exported data.
|
|
24
|
+
*/
|
|
11
25
|
exportCSV(pipelineId, options) {
|
|
12
26
|
return this.api.get(this.buildPath(`${Statements.getBaseUrl(pipelineId)}/export`, {
|
|
13
27
|
organizationId: this.api.organizationId,
|
|
14
28
|
...options,
|
|
15
29
|
}), { responseBodyFormat: 'blob' });
|
|
16
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* Import the definition, condition, and description of statements from a CSV file to a specific query pipeline.
|
|
33
|
+
*
|
|
34
|
+
* @param {string} pipelineId The unique identifier of the target query pipeline.
|
|
35
|
+
* @param {File | string} csvFile The file containing the statements to import.
|
|
36
|
+
* @param {ExportStatementParams} options Import options
|
|
37
|
+
*/
|
|
17
38
|
importCSV(pipelineId, csvFile, options) {
|
|
18
39
|
const formData = new FormData();
|
|
19
40
|
if (typeof csvFile === 'string') {
|
|
@@ -28,38 +49,99 @@ class Statements extends Resource_js_1.default {
|
|
|
28
49
|
...options,
|
|
29
50
|
}), formData);
|
|
30
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* Creates a new query pipeline statement in a specific query pipeline.
|
|
54
|
+
*
|
|
55
|
+
* @param {string} pipelineId The unique identifier of the target query pipeline.
|
|
56
|
+
* @param {CreateStatementModel} model The query pipeline statement information.
|
|
57
|
+
* @returns {Promise<StatementModel>} The created statement.
|
|
58
|
+
*/
|
|
31
59
|
create(pipelineId, model) {
|
|
32
60
|
return this.api.post(this.buildPath(Statements.getBaseUrl(pipelineId), { organizationId: this.api.organizationId }), model);
|
|
33
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* Updates a single query pipeline statement in a specific query pipeline.
|
|
64
|
+
*
|
|
65
|
+
* @param {string} pipelineId The unique identifier of the target query pipeline.
|
|
66
|
+
* @param {string} statementId The unique identifier of the target statement.
|
|
67
|
+
* @param {CreateStatementModel} model The updated query pipeline statement information.
|
|
68
|
+
* @returns {Promise<StatementModel>} The updated statement.
|
|
69
|
+
*/
|
|
34
70
|
update(pipelineId, statementId, model) {
|
|
35
71
|
return this.api.put(this.buildPath(Statements.getStatementUrl(pipelineId, statementId), {
|
|
36
72
|
organizationId: this.api.organizationId,
|
|
37
73
|
}), model);
|
|
38
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* Copies specific statements from an origin to a target query pipeline. Using the same pipeline as origin and target will duplicate the specified statements in that pipeline.
|
|
77
|
+
*
|
|
78
|
+
* @param {string} pipelineId The unique identifier of the target query pipeline.
|
|
79
|
+
* @param {CopyStatementModel} model The copy operation to perform.
|
|
80
|
+
* @returns {Promise<PageModel<StatementModel, "statements">>} The matching statements in the current page of results.
|
|
81
|
+
*/
|
|
39
82
|
copy(pipelineId, model) {
|
|
40
83
|
return this.api.post(this.buildPath(`${Statements.getBaseUrl(pipelineId)}/copy`, { organizationId: this.api.organizationId }), model);
|
|
41
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* Gets a single query pipeline statement from a specific query pipeline.
|
|
87
|
+
*
|
|
88
|
+
* @param {string} pipelineId The unique identifier of the target query pipeline.
|
|
89
|
+
* @param {string} statementId The unique identifier of the target statement.
|
|
90
|
+
* @returns {Promise<StatementModel>} The statement
|
|
91
|
+
*/
|
|
42
92
|
get(pipelineId, statementId) {
|
|
43
93
|
return this.api.get(this.buildPath(Statements.getStatementUrl(pipelineId, statementId), {
|
|
44
94
|
organizationId: this.api.organizationId,
|
|
45
95
|
}));
|
|
46
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* Sets the position of a query pipeline statement in a specific query pipeline and updates other statement positions as appropriate.
|
|
99
|
+
*
|
|
100
|
+
* @param {string} pipelineId The unique identifier of the target query pipeline.
|
|
101
|
+
* @param {string} statementId The unique identifier of the target statement.
|
|
102
|
+
* @param {MoveStatementModel} model The move operation to perform.
|
|
103
|
+
* @returns {Promise<PageModel<StatementModel, 'statements'>>} The matching statements in the current page of results.
|
|
104
|
+
*/
|
|
47
105
|
move(pipelineId, statementId, model) {
|
|
48
106
|
return this.api.put(this.buildPath(`${Statements.getStatementUrl(pipelineId, statementId)}/move`, {
|
|
49
107
|
organizationId: this.api.organizationId,
|
|
50
108
|
}), model);
|
|
51
109
|
}
|
|
110
|
+
/**
|
|
111
|
+
* Deletes a single query pipeline statement from a specific query pipeline.
|
|
112
|
+
*
|
|
113
|
+
* @param {string} pipelineId The unique identifier of the target query pipeline.
|
|
114
|
+
* @param {string} statementId The unique identifier of the target statement.
|
|
115
|
+
*/
|
|
52
116
|
delete(pipelineId, statementId) {
|
|
53
117
|
return this.api.delete(this.buildPath(Statements.getStatementUrl(pipelineId, statementId), {
|
|
54
118
|
organizationId: this.api.organizationId,
|
|
55
119
|
}));
|
|
56
120
|
}
|
|
121
|
+
/**
|
|
122
|
+
* Gets a sorted page of query pipeline statements matching certain criteria from a specific query pipeline.
|
|
123
|
+
*
|
|
124
|
+
* @param {string} pipelineId The unique identifier of the target query pipeline.
|
|
125
|
+
* @param {BulkGetStatementsParams} params A set of parameters to customize the results.
|
|
126
|
+
* @returns {Promise<PageModel<StatementModel, 'statements'>>} The matching statements in the current page of results.
|
|
127
|
+
*/
|
|
57
128
|
bulkGet(pipelineId, { ids, ...allQueryStringOptions }) {
|
|
58
129
|
return this.api.post(this.buildPath(`${Statements.getBaseUrl(pipelineId)}/bulkGet`, {
|
|
59
130
|
organizationId: this.api.organizationId,
|
|
60
131
|
...allQueryStringOptions,
|
|
61
132
|
}), { ids });
|
|
62
133
|
}
|
|
134
|
+
/**
|
|
135
|
+
* Delete multiple statements at once for a specific pipeline.
|
|
136
|
+
*
|
|
137
|
+
* @param {string} pipelineId The unique identifier of the target query pipeline.
|
|
138
|
+
* @param {string[]} ids A list of resource identifiers to delete. A maximum of 100 can be sent.
|
|
139
|
+
*/
|
|
140
|
+
bulkDelete(pipelineId, ids) {
|
|
141
|
+
return this.api.post(this.buildPath(`${Statements.getBaseUrl(pipelineId)}/bulkDelete`, {
|
|
142
|
+
organizationId: this.api.organizationId,
|
|
143
|
+
}), { ids });
|
|
144
|
+
}
|
|
63
145
|
}
|
|
64
146
|
exports.default = Statements;
|
|
65
147
|
//# sourceMappingURL=Statements.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Statements.js","sourceRoot":"","sources":["../../../../../src/resources/Pipelines/Statements/Statements.ts"],"names":[],"mappings":";;;AACA,4EAAyC;AAWzC,MAAqB,UAAW,SAAQ,qBAAQ;IAC5C,MAAM,CAAC,UAA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E,IAAI,CAAC,GAAG,CAAC,cAAc;SAC1C,CAAC,EACF,EAAC,GAAG,EAAC,CACR,CAAC;IACN,CAAC;;AA5LL,6BA6LC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CatalogContent.js","sourceRoot":"","sources":["../../../../src/resources/Catalogs/CatalogContent.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,kBAAkB,CAAC;AACnC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"CatalogContent.js","sourceRoot":"","sources":["../../../../src/resources/Catalogs/CatalogContent.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,kBAAkB,CAAC;AACnC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAOtC,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,QAAQ;IAChD,MAAM,CAAC,OAAO,GAAG,uBAAuB,GAAG,CAAC,cAAc,wBAAwB,CAAC;IAEnF,cAAc,CAAC,QAAgB;QAC3B,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAW,GAAG,cAAc,CAAC,OAAO,IAAI,QAAQ,cAAc,CAAC,CAAC;IACvF,CAAC;IAED,iBAAiB,CAAC,QAAgB,EAAE,UAAsB;QACtD,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CACf,IAAI,CAAC,SAAS,CAAC,GAAG,cAAc,CAAC,OAAO,IAAI,QAAQ,iBAAiB,EAAE,UAAU,CAAC,CACrF,CAAC;IACN,CAAC;IAED,WAAW,CAAC,QAAgB,EAAE,UAAsB;QAChD,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CACf,IAAI,CAAC,SAAS,CAAC,GAAG,cAAc,CAAC,OAAO,IAAI,QAAQ,WAAW,EAAE,UAAU,CAAC,CAC/E,CAAC;IACN,CAAC"}
|
|
@@ -2,15 +2,36 @@ import Resource from '../../Resource.js';
|
|
|
2
2
|
export default class Statements extends Resource {
|
|
3
3
|
static getBaseUrl = (pipelineId) => `/rest/search/v2/admin/pipelines/${pipelineId}/statements`;
|
|
4
4
|
static getStatementUrl = (pipelineId, statementId) => `${Statements.getBaseUrl(pipelineId)}/${statementId}`;
|
|
5
|
+
/**
|
|
6
|
+
* Gets a sorted page of query pipeline statements matching certain criteria from a specific query pipeline.
|
|
7
|
+
*
|
|
8
|
+
* @param {string} pipelineId The unique identifier of the target query pipeline.
|
|
9
|
+
* @param {ListStatementParams} options Listing options.
|
|
10
|
+
* @returns {Promise<PageModel<StatementModel, "statements">>} The matching statements in the current page of results
|
|
11
|
+
*/
|
|
5
12
|
list(pipelineId, options) {
|
|
6
13
|
return this.api.get(this.buildPath(Statements.getBaseUrl(pipelineId), { organizationId: this.api.organizationId, ...options }));
|
|
7
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* Exports the definition, condition, and description of statements from a specific query pipeline to a CSV file.
|
|
17
|
+
*
|
|
18
|
+
* @param {string} pipelineId The unique identifier of the target query pipeline.
|
|
19
|
+
* @param {ExportStatementParams} options Export options
|
|
20
|
+
* @returns {Promise<Blob>} The file containing the exported data.
|
|
21
|
+
*/
|
|
8
22
|
exportCSV(pipelineId, options) {
|
|
9
23
|
return this.api.get(this.buildPath(`${Statements.getBaseUrl(pipelineId)}/export`, {
|
|
10
24
|
organizationId: this.api.organizationId,
|
|
11
25
|
...options,
|
|
12
26
|
}), { responseBodyFormat: 'blob' });
|
|
13
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* Import the definition, condition, and description of statements from a CSV file to a specific query pipeline.
|
|
30
|
+
*
|
|
31
|
+
* @param {string} pipelineId The unique identifier of the target query pipeline.
|
|
32
|
+
* @param {File | string} csvFile The file containing the statements to import.
|
|
33
|
+
* @param {ExportStatementParams} options Import options
|
|
34
|
+
*/
|
|
14
35
|
importCSV(pipelineId, csvFile, options) {
|
|
15
36
|
const formData = new FormData();
|
|
16
37
|
if (typeof csvFile === 'string') {
|
|
@@ -25,37 +46,98 @@ export default class Statements extends Resource {
|
|
|
25
46
|
...options,
|
|
26
47
|
}), formData);
|
|
27
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* Creates a new query pipeline statement in a specific query pipeline.
|
|
51
|
+
*
|
|
52
|
+
* @param {string} pipelineId The unique identifier of the target query pipeline.
|
|
53
|
+
* @param {CreateStatementModel} model The query pipeline statement information.
|
|
54
|
+
* @returns {Promise<StatementModel>} The created statement.
|
|
55
|
+
*/
|
|
28
56
|
create(pipelineId, model) {
|
|
29
57
|
return this.api.post(this.buildPath(Statements.getBaseUrl(pipelineId), { organizationId: this.api.organizationId }), model);
|
|
30
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* Updates a single query pipeline statement in a specific query pipeline.
|
|
61
|
+
*
|
|
62
|
+
* @param {string} pipelineId The unique identifier of the target query pipeline.
|
|
63
|
+
* @param {string} statementId The unique identifier of the target statement.
|
|
64
|
+
* @param {CreateStatementModel} model The updated query pipeline statement information.
|
|
65
|
+
* @returns {Promise<StatementModel>} The updated statement.
|
|
66
|
+
*/
|
|
31
67
|
update(pipelineId, statementId, model) {
|
|
32
68
|
return this.api.put(this.buildPath(Statements.getStatementUrl(pipelineId, statementId), {
|
|
33
69
|
organizationId: this.api.organizationId,
|
|
34
70
|
}), model);
|
|
35
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* Copies specific statements from an origin to a target query pipeline. Using the same pipeline as origin and target will duplicate the specified statements in that pipeline.
|
|
74
|
+
*
|
|
75
|
+
* @param {string} pipelineId The unique identifier of the target query pipeline.
|
|
76
|
+
* @param {CopyStatementModel} model The copy operation to perform.
|
|
77
|
+
* @returns {Promise<PageModel<StatementModel, "statements">>} The matching statements in the current page of results.
|
|
78
|
+
*/
|
|
36
79
|
copy(pipelineId, model) {
|
|
37
80
|
return this.api.post(this.buildPath(`${Statements.getBaseUrl(pipelineId)}/copy`, { organizationId: this.api.organizationId }), model);
|
|
38
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* Gets a single query pipeline statement from a specific query pipeline.
|
|
84
|
+
*
|
|
85
|
+
* @param {string} pipelineId The unique identifier of the target query pipeline.
|
|
86
|
+
* @param {string} statementId The unique identifier of the target statement.
|
|
87
|
+
* @returns {Promise<StatementModel>} The statement
|
|
88
|
+
*/
|
|
39
89
|
get(pipelineId, statementId) {
|
|
40
90
|
return this.api.get(this.buildPath(Statements.getStatementUrl(pipelineId, statementId), {
|
|
41
91
|
organizationId: this.api.organizationId,
|
|
42
92
|
}));
|
|
43
93
|
}
|
|
94
|
+
/**
|
|
95
|
+
* Sets the position of a query pipeline statement in a specific query pipeline and updates other statement positions as appropriate.
|
|
96
|
+
*
|
|
97
|
+
* @param {string} pipelineId The unique identifier of the target query pipeline.
|
|
98
|
+
* @param {string} statementId The unique identifier of the target statement.
|
|
99
|
+
* @param {MoveStatementModel} model The move operation to perform.
|
|
100
|
+
* @returns {Promise<PageModel<StatementModel, 'statements'>>} The matching statements in the current page of results.
|
|
101
|
+
*/
|
|
44
102
|
move(pipelineId, statementId, model) {
|
|
45
103
|
return this.api.put(this.buildPath(`${Statements.getStatementUrl(pipelineId, statementId)}/move`, {
|
|
46
104
|
organizationId: this.api.organizationId,
|
|
47
105
|
}), model);
|
|
48
106
|
}
|
|
107
|
+
/**
|
|
108
|
+
* Deletes a single query pipeline statement from a specific query pipeline.
|
|
109
|
+
*
|
|
110
|
+
* @param {string} pipelineId The unique identifier of the target query pipeline.
|
|
111
|
+
* @param {string} statementId The unique identifier of the target statement.
|
|
112
|
+
*/
|
|
49
113
|
delete(pipelineId, statementId) {
|
|
50
114
|
return this.api.delete(this.buildPath(Statements.getStatementUrl(pipelineId, statementId), {
|
|
51
115
|
organizationId: this.api.organizationId,
|
|
52
116
|
}));
|
|
53
117
|
}
|
|
118
|
+
/**
|
|
119
|
+
* Gets a sorted page of query pipeline statements matching certain criteria from a specific query pipeline.
|
|
120
|
+
*
|
|
121
|
+
* @param {string} pipelineId The unique identifier of the target query pipeline.
|
|
122
|
+
* @param {BulkGetStatementsParams} params A set of parameters to customize the results.
|
|
123
|
+
* @returns {Promise<PageModel<StatementModel, 'statements'>>} The matching statements in the current page of results.
|
|
124
|
+
*/
|
|
54
125
|
bulkGet(pipelineId, { ids, ...allQueryStringOptions }) {
|
|
55
126
|
return this.api.post(this.buildPath(`${Statements.getBaseUrl(pipelineId)}/bulkGet`, {
|
|
56
127
|
organizationId: this.api.organizationId,
|
|
57
128
|
...allQueryStringOptions,
|
|
58
129
|
}), { ids });
|
|
59
130
|
}
|
|
131
|
+
/**
|
|
132
|
+
* Delete multiple statements at once for a specific pipeline.
|
|
133
|
+
*
|
|
134
|
+
* @param {string} pipelineId The unique identifier of the target query pipeline.
|
|
135
|
+
* @param {string[]} ids A list of resource identifiers to delete. A maximum of 100 can be sent.
|
|
136
|
+
*/
|
|
137
|
+
bulkDelete(pipelineId, ids) {
|
|
138
|
+
return this.api.post(this.buildPath(`${Statements.getBaseUrl(pipelineId)}/bulkDelete`, {
|
|
139
|
+
organizationId: this.api.organizationId,
|
|
140
|
+
}), { ids });
|
|
141
|
+
}
|
|
60
142
|
}
|
|
61
143
|
//# sourceMappingURL=Statements.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Statements.js","sourceRoot":"","sources":["../../../../../src/resources/Pipelines/Statements/Statements.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AAWzC,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,QAAQ;IAC5C,MAAM,CAAC,UAAU,GAAG,CAAC,UAAkB,EAAE,EAAE,CAAC,mCAAmC,UAAU,aAAa,CAAC;IACvG,MAAM,CAAC,eAAe,GAAG,CAAC,UAAkB,EAAE,WAAmB,EAAE,EAAE,CACjE,GAAG,UAAU,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,WAAW,EAAE,CAAC;IAE1D,IAAI,CAAC,UAAkB,EAAE,OAA6B;QAClD,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CACf,IAAI,CAAC,SAAS,CAAC,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AAC,cAAc,EAAC,CAAC,EAC5F,KAAK,CACR,CAAC;IACN,CAAC;IAED,MAAM,CAAC,UAAkB,EAAE,WAAmB,EAAE,KAA2B;QACvE,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CACf,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,eAAe,CAAC,UAAU,EAAE,WAAW,CAAC,EAAE;YAChE,cAAc,EAAE,IAAI,CAAC,GAAG,CAAC,cAAc;SAC1C,CAAC,EACF,KAAK,CACR,CAAC;IACN,CAAC;IAED,IAAI,CAAC,UAAkB,EAAE,KAAyB;QAC9C,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAChB,IAAI,CAAC,SAAS,CAAC,GAAG,UAAU,CAAC,UAAU,CAAC,UAAU,CAAC,OAAO,EAAE,EAAC,cAAc,EAAE,IAAI,CAAC,GAAG,CAAC,cAAc,EAAC,CAAC,EACtG,KAAK,CACR,CAAC;IACN,CAAC;IAED,GAAG,CAAC,UAAkB,EAAE,WAAmB;QACvC,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CACf,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,eAAe,CAAC,UAAU,EAAE,WAAW,CAAC,EAAE;YAChE,cAAc,EAAE,IAAI,CAAC,GAAG,CAAC,cAAc;SAC1C,CAAC,CACL,CAAC;IACN,CAAC;IAED,IAAI,
|
|
1
|
+
{"version":3,"file":"Statements.js","sourceRoot":"","sources":["../../../../../src/resources/Pipelines/Statements/Statements.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AAWzC,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,QAAQ;IAC5C,MAAM,CAAC,UAAU,GAAG,CAAC,UAAkB,EAAE,EAAE,CAAC,mCAAmC,UAAU,aAAa,CAAC;IACvG,MAAM,CAAC,eAAe,GAAG,CAAC,UAAkB,EAAE,WAAmB,EAAE,EAAE,CACjE,GAAG,UAAU,CAAC,UAAU,CAAC,UAAU,CAAC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UAAU,CAAC,eAAe,CAAC,UAAU,EAAE,WAAW,CAAC,OAAO,EAAE;YAC1E,cAAc,EAAE,IAAI,CAAC,GAAG,CAAC,cAAc;SAC1C,CAAC,EACF,KAAK,CACR,CAAC;IACN,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,UAAkB,EAAE,WAAmB;QAC1C,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,CAClB,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,eAAe,CAAC,UAAU,EAAE,WAAW,CAAC,EAAE;YAChE,cAAc,EAAE,IAAI,CAAC,GAAG,CAAC,cAAc;SAC1C,CAAC,CACL,CAAC;IACN,CAAC;IAED;;;;;;OAMG;IACH,OAAO,CACH,UAAkB,EAClB,EAAC,GAAG,EAAE,GAAG,qBAAqB,EAA0B;QAExD,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAChB,IAAI,CAAC,SAAS,CAAC,GAAG,UAAU,CAAC,UAAU,CAAC,UAAU,CAAC,UAAU,EAAE;YAC3D,cAAc,EAAE,IAAI,CAAC,GAAG,CAAC,cAAc;YACvC,GAAG,qBAAqB;SAC3B,CAAC,EACF,EAAC,GAAG,EAAC,CACR,CAAC;IACN,CAAC;IAED;;;;;OAKG;IACH,UAAU,CAAC,UAAkB,EAAE,GAAa;QACxC,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAChB,IAAI,CAAC,SAAS,CAAC,GAAG,UAAU,CAAC,UAAU,CAAC,UAAU,CAAC,aAAa,EAAE;YAC9D,cAAc,EAAE,IAAI,CAAC,GAAG,CAAC,cAAc;SAC1C,CAAC,EACF,EAAC,GAAG,EAAC,CACR,CAAC;IACN,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import Resource from '../Resource.js';
|
|
2
|
+
import { CatalogMetadata, CatalogMetadataName } from './CatalogInterfaces.js';
|
|
2
3
|
export type ObjectType = {
|
|
3
4
|
objectType: string;
|
|
4
5
|
};
|
|
5
6
|
export default class CatalogContent extends Resource {
|
|
6
7
|
static baseUrl: string;
|
|
7
|
-
getObjectTypes(sourceId: string): Promise<
|
|
8
|
-
getMetadataValues(sourceId: string, objectType: ObjectType): Promise<
|
|
9
|
-
getMetadata(sourceId: string, objectType: ObjectType): Promise<
|
|
8
|
+
getObjectTypes(sourceId: string): Promise<string[]>;
|
|
9
|
+
getMetadataValues(sourceId: string, objectType: ObjectType): Promise<CatalogMetadata>;
|
|
10
|
+
getMetadata(sourceId: string, objectType: ObjectType): Promise<CatalogMetadataName>;
|
|
10
11
|
}
|
|
@@ -391,4 +391,18 @@ export interface CatalogFieldStatsOptions {
|
|
|
391
391
|
*/
|
|
392
392
|
forceRefresh?: boolean;
|
|
393
393
|
}
|
|
394
|
+
export interface CatalogMetadata {
|
|
395
|
+
/**
|
|
396
|
+
* Metadata seen on catalog documents with a sample of values.
|
|
397
|
+
*/
|
|
398
|
+
metadataValuesByName: {
|
|
399
|
+
[name: string]: string[];
|
|
400
|
+
};
|
|
401
|
+
}
|
|
402
|
+
export interface CatalogMetadataName {
|
|
403
|
+
/**
|
|
404
|
+
* Metadata name seen on catalog documents.
|
|
405
|
+
*/
|
|
406
|
+
metadataNames: string[];
|
|
407
|
+
}
|
|
394
408
|
export {};
|
|
@@ -4,14 +4,92 @@ import { BulkGetStatementsParams, CopyStatementModel, CreateStatementModel, Expo
|
|
|
4
4
|
export default class Statements extends Resource {
|
|
5
5
|
static getBaseUrl: (pipelineId: string) => string;
|
|
6
6
|
static getStatementUrl: (pipelineId: string, statementId: string) => string;
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Gets a sorted page of query pipeline statements matching certain criteria from a specific query pipeline.
|
|
9
|
+
*
|
|
10
|
+
* @param {string} pipelineId The unique identifier of the target query pipeline.
|
|
11
|
+
* @param {ListStatementParams} options Listing options.
|
|
12
|
+
* @returns {Promise<PageModel<StatementModel, "statements">>} The matching statements in the current page of results
|
|
13
|
+
*/
|
|
14
|
+
list(pipelineId: string, options?: ListStatementParams): Promise<PageModel<StatementModel, 'statements'>>;
|
|
15
|
+
/**
|
|
16
|
+
* Exports the definition, condition, and description of statements from a specific query pipeline to a CSV file.
|
|
17
|
+
*
|
|
18
|
+
* @param {string} pipelineId The unique identifier of the target query pipeline.
|
|
19
|
+
* @param {ExportStatementParams} options Export options
|
|
20
|
+
* @returns {Promise<Blob>} The file containing the exported data.
|
|
21
|
+
*/
|
|
8
22
|
exportCSV(pipelineId: string, options?: ExportStatementParams): Promise<Blob>;
|
|
23
|
+
/**
|
|
24
|
+
* Import the definition, condition, and description of statements from a CSV file to a specific query pipeline.
|
|
25
|
+
*
|
|
26
|
+
* @param {string} pipelineId The unique identifier of the target query pipeline.
|
|
27
|
+
* @param {File | string} csvFile The file containing the statements to import.
|
|
28
|
+
* @param {ExportStatementParams} options Import options
|
|
29
|
+
*/
|
|
9
30
|
importCSV(pipelineId: string, csvFile: File | string, options?: ExportStatementParams): Promise<Record<string, unknown>>;
|
|
31
|
+
/**
|
|
32
|
+
* Creates a new query pipeline statement in a specific query pipeline.
|
|
33
|
+
*
|
|
34
|
+
* @param {string} pipelineId The unique identifier of the target query pipeline.
|
|
35
|
+
* @param {CreateStatementModel} model The query pipeline statement information.
|
|
36
|
+
* @returns {Promise<StatementModel>} The created statement.
|
|
37
|
+
*/
|
|
10
38
|
create(pipelineId: string, model: CreateStatementModel): Promise<StatementModel>;
|
|
39
|
+
/**
|
|
40
|
+
* Updates a single query pipeline statement in a specific query pipeline.
|
|
41
|
+
*
|
|
42
|
+
* @param {string} pipelineId The unique identifier of the target query pipeline.
|
|
43
|
+
* @param {string} statementId The unique identifier of the target statement.
|
|
44
|
+
* @param {CreateStatementModel} model The updated query pipeline statement information.
|
|
45
|
+
* @returns {Promise<StatementModel>} The updated statement.
|
|
46
|
+
*/
|
|
11
47
|
update(pipelineId: string, statementId: string, model: CreateStatementModel): Promise<StatementModel>;
|
|
48
|
+
/**
|
|
49
|
+
* Copies specific statements from an origin to a target query pipeline. Using the same pipeline as origin and target will duplicate the specified statements in that pipeline.
|
|
50
|
+
*
|
|
51
|
+
* @param {string} pipelineId The unique identifier of the target query pipeline.
|
|
52
|
+
* @param {CopyStatementModel} model The copy operation to perform.
|
|
53
|
+
* @returns {Promise<PageModel<StatementModel, "statements">>} The matching statements in the current page of results.
|
|
54
|
+
*/
|
|
12
55
|
copy(pipelineId: string, model: CopyStatementModel): Promise<PageModel<StatementModel, "statements">>;
|
|
56
|
+
/**
|
|
57
|
+
* Gets a single query pipeline statement from a specific query pipeline.
|
|
58
|
+
*
|
|
59
|
+
* @param {string} pipelineId The unique identifier of the target query pipeline.
|
|
60
|
+
* @param {string} statementId The unique identifier of the target statement.
|
|
61
|
+
* @returns {Promise<StatementModel>} The statement
|
|
62
|
+
*/
|
|
13
63
|
get(pipelineId: string, statementId: string): Promise<StatementModel>;
|
|
14
|
-
|
|
64
|
+
/**
|
|
65
|
+
* Sets the position of a query pipeline statement in a specific query pipeline and updates other statement positions as appropriate.
|
|
66
|
+
*
|
|
67
|
+
* @param {string} pipelineId The unique identifier of the target query pipeline.
|
|
68
|
+
* @param {string} statementId The unique identifier of the target statement.
|
|
69
|
+
* @param {MoveStatementModel} model The move operation to perform.
|
|
70
|
+
* @returns {Promise<PageModel<StatementModel, 'statements'>>} The matching statements in the current page of results.
|
|
71
|
+
*/
|
|
72
|
+
move(pipelineId: string, statementId: string, model: MoveStatementModel): Promise<PageModel<StatementModel, 'statements'>>;
|
|
73
|
+
/**
|
|
74
|
+
* Deletes a single query pipeline statement from a specific query pipeline.
|
|
75
|
+
*
|
|
76
|
+
* @param {string} pipelineId The unique identifier of the target query pipeline.
|
|
77
|
+
* @param {string} statementId The unique identifier of the target statement.
|
|
78
|
+
*/
|
|
15
79
|
delete(pipelineId: string, statementId: string): Promise<Record<string, unknown>>;
|
|
16
|
-
|
|
80
|
+
/**
|
|
81
|
+
* Gets a sorted page of query pipeline statements matching certain criteria from a specific query pipeline.
|
|
82
|
+
*
|
|
83
|
+
* @param {string} pipelineId The unique identifier of the target query pipeline.
|
|
84
|
+
* @param {BulkGetStatementsParams} params A set of parameters to customize the results.
|
|
85
|
+
* @returns {Promise<PageModel<StatementModel, 'statements'>>} The matching statements in the current page of results.
|
|
86
|
+
*/
|
|
87
|
+
bulkGet(pipelineId: string, { ids, ...allQueryStringOptions }: BulkGetStatementsParams): Promise<PageModel<StatementModel, 'statements'>>;
|
|
88
|
+
/**
|
|
89
|
+
* Delete multiple statements at once for a specific pipeline.
|
|
90
|
+
*
|
|
91
|
+
* @param {string} pipelineId The unique identifier of the target query pipeline.
|
|
92
|
+
* @param {string[]} ids A list of resource identifiers to delete. A maximum of 100 can be sent.
|
|
93
|
+
*/
|
|
94
|
+
bulkDelete(pipelineId: string, ids: string[]): Promise<Record<string, unknown>>;
|
|
17
95
|
}
|