attlaz-client 1.13.41 → 1.13.42
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.
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Endpoint } from './Endpoint.js';
|
|
2
2
|
import { Trigger } from '../Model/Trigger/Trigger.js';
|
|
3
3
|
import { CollectionResult } from '../Model/Result/CollectionResult.js';
|
|
4
|
+
import { CursorPagination } from '../Model/Pagination/CursorPagination.js';
|
|
4
5
|
export declare class TriggerEndpoint extends Endpoint {
|
|
5
|
-
getByFlow(flowId: string, projectEnvironmentId?: string | null): Promise<CollectionResult<Trigger>>;
|
|
6
|
+
getByFlow(flowId: string, projectEnvironmentId?: string | null, pagination?: CursorPagination | null): Promise<CollectionResult<Trigger>>;
|
|
6
7
|
getById(id: string): Promise<Trigger | null>;
|
|
7
8
|
save(trigger: Trigger): Promise<Trigger>;
|
|
8
9
|
}
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import { Endpoint } from './Endpoint.js';
|
|
2
2
|
import { Trigger } from '../Model/Trigger/Trigger.js';
|
|
3
3
|
import { Utils } from '../Utils.js';
|
|
4
|
+
import { QueryString } from '../Http/Data/QueryString.js';
|
|
4
5
|
export class TriggerEndpoint extends Endpoint {
|
|
5
|
-
async getByFlow(flowId, projectEnvironmentId = null) {
|
|
6
|
+
async getByFlow(flowId, projectEnvironmentId = null, pagination = null) {
|
|
6
7
|
try {
|
|
8
|
+
const queryString = new QueryString('/flows/' + flowId + '/triggers');
|
|
9
|
+
if (pagination !== null) {
|
|
10
|
+
queryString.addPagination(pagination);
|
|
11
|
+
}
|
|
7
12
|
let parameters = null;
|
|
8
13
|
if (!Utils.isNullOrUndefined(projectEnvironmentId)) {
|
|
9
14
|
parameters = { environment: projectEnvironmentId };
|
|
10
15
|
}
|
|
11
|
-
const rawTriggers = await this.requestCollection(
|
|
16
|
+
const rawTriggers = await this.requestCollection(queryString, Trigger.parse, parameters);
|
|
12
17
|
return rawTriggers;
|
|
13
18
|
}
|
|
14
19
|
catch (error) {
|