attlaz-client 1.13.40 → 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.
@@ -0,0 +1,10 @@
1
+ export declare class FlowTemplate {
2
+ id: string;
3
+ name: string;
4
+ icon: string;
5
+ description: string;
6
+ source: string;
7
+ requiredTriggers: string[];
8
+ requiredAdapters: string[];
9
+ requiredChannels: string[];
10
+ }
@@ -0,0 +1,10 @@
1
+ export class FlowTemplate {
2
+ id;
3
+ name;
4
+ icon;
5
+ description;
6
+ source;
7
+ requiredTriggers;
8
+ requiredAdapters;
9
+ requiredChannels;
10
+ }
@@ -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('/flows/' + flowId + '/triggers', Trigger.parse, parameters);
16
+ const rawTriggers = await this.requestCollection(queryString, Trigger.parse, parameters);
12
17
  return rawTriggers;
13
18
  }
14
19
  catch (error) {
package/dist/index.d.ts CHANGED
@@ -106,6 +106,7 @@ export { FlowRunStatus } from './Model/Flow/FlowRunStatus.js';
106
106
  export { FlowRunSummary } from './Model/Flow/FlowRunSummary.js';
107
107
  export { FlowRunStats } from './Model/Flow/FlowRunStats.js';
108
108
  export { FlowSummary } from './Model/Flow/FlowSummary.js';
109
+ export { FlowTemplate } from './Model/Flow/FlowTemplate.js';
109
110
  export { User } from './Model/User/User.js';
110
111
  export { UserAuthProvider } from './Model/User/UserAuthProvider.js';
111
112
  export { UserAction } from './Model/User/UserAction.js';
package/dist/index.js CHANGED
@@ -100,6 +100,7 @@ export { FlowRunStatus } from './Model/Flow/FlowRunStatus.js';
100
100
  export { FlowRunSummary } from './Model/Flow/FlowRunSummary.js';
101
101
  export { FlowRunStats } from './Model/Flow/FlowRunStats.js';
102
102
  export { FlowSummary } from './Model/Flow/FlowSummary.js';
103
+ export { FlowTemplate } from './Model/Flow/FlowTemplate.js';
103
104
  export { User } from './Model/User/User.js';
104
105
  export { UserAuthProvider } from './Model/User/UserAuthProvider.js';
105
106
  export { UserAction } from './Model/User/UserAction.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "attlaz-client",
3
- "version": "1.13.40",
3
+ "version": "1.13.42",
4
4
  "description": "Javascript Client to access Attlaz API",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",