@breign/client 1.0.178 → 1.0.180

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.
Files changed (47) hide show
  1. package/dist/apis/ScheduledTasksApi.d.ts +116 -1
  2. package/dist/apis/ScheduledTasksApi.js +286 -0
  3. package/dist/models/AutomationDayCountUio.d.ts +44 -0
  4. package/dist/models/AutomationDayCountUio.js +58 -0
  5. package/dist/models/AutomationLastRunUio.d.ts +51 -0
  6. package/dist/models/AutomationLastRunUio.js +63 -0
  7. package/dist/models/AutomationListUio.d.ts +46 -0
  8. package/dist/models/AutomationListUio.js +60 -0
  9. package/dist/models/AutomationRunDeliveryUio.d.ts +60 -0
  10. package/dist/models/AutomationRunDeliveryUio.js +72 -0
  11. package/dist/models/AutomationRunListUio.d.ts +39 -0
  12. package/dist/models/AutomationRunListUio.js +55 -0
  13. package/dist/models/AutomationRunOutcomeUio.d.ts +26 -0
  14. package/dist/models/AutomationRunOutcomeUio.js +52 -0
  15. package/dist/models/AutomationRunSourceUio.d.ts +108 -0
  16. package/dist/models/AutomationRunSourceUio.js +82 -0
  17. package/dist/models/AutomationRunUio.d.ts +126 -0
  18. package/dist/models/AutomationRunUio.js +114 -0
  19. package/dist/models/AutomationStatsUio.d.ts +62 -0
  20. package/dist/models/AutomationStatsUio.js +70 -0
  21. package/dist/models/AutomationSummaryUio.d.ts +137 -0
  22. package/dist/models/AutomationSummaryUio.js +126 -0
  23. package/dist/models/AutomationTriggerKindUio.d.ts +26 -0
  24. package/dist/models/AutomationTriggerKindUio.js +52 -0
  25. package/dist/models/ScheduledTaskCreateUio.d.ts +1 -1
  26. package/dist/models/ScheduledTaskRunTriggerUio.d.ts +37 -12
  27. package/dist/models/ScheduledTaskRunTriggerUio.js +21 -34
  28. package/dist/models/ScheduledTaskUio.d.ts +8 -1
  29. package/dist/models/ScheduledTaskUio.js +3 -0
  30. package/dist/models/TaskTriggerUio.d.ts +8 -1
  31. package/dist/models/TaskTriggerUio.js +4 -1
  32. package/dist/models/WebhookEndpointUio.d.ts +82 -0
  33. package/dist/models/WebhookEndpointUio.js +84 -0
  34. package/dist/models/WebhookEndpointUpdateUio.d.ts +46 -0
  35. package/dist/models/WebhookEndpointUpdateUio.js +58 -0
  36. package/dist/models/WebhookEventListUio.d.ts +33 -0
  37. package/dist/models/WebhookEventListUio.js +51 -0
  38. package/dist/models/WebhookEventUio.d.ts +87 -0
  39. package/dist/models/WebhookEventUio.js +87 -0
  40. package/dist/models/WebhookTestRequestUio.d.ts +38 -0
  41. package/dist/models/WebhookTestRequestUio.js +50 -0
  42. package/dist/models/WebhookTestResponseUio.d.ts +32 -0
  43. package/dist/models/WebhookTestResponseUio.js +50 -0
  44. package/dist/models/index.d.ts +17 -0
  45. package/dist/models/index.js +17 -0
  46. package/dist/openapi.json +1121 -154
  47. package/package.json +1 -1
@@ -0,0 +1,126 @@
1
+ /**
2
+ * brain-client
3
+ * Api ands models for brain-app and brain-app
4
+ *
5
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { AutomationRunSourceUio } from './AutomationRunSourceUio';
13
+ import type { AutomationRunOutcomeUio } from './AutomationRunOutcomeUio';
14
+ import type { AutomationTriggerKindUio } from './AutomationTriggerKindUio';
15
+ import type { AutomationRunDeliveryUio } from './AutomationRunDeliveryUio';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface AutomationRunUio
20
+ */
21
+ export interface AutomationRunUio {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof AutomationRunUio
26
+ */
27
+ id: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof AutomationRunUio
32
+ */
33
+ taskId: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof AutomationRunUio
38
+ */
39
+ taskName: string | null;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof AutomationRunUio
44
+ */
45
+ agentId: string;
46
+ /**
47
+ *
48
+ * @type {string}
49
+ * @memberof AutomationRunUio
50
+ */
51
+ agentName: string | null;
52
+ /**
53
+ *
54
+ * @type {AutomationRunOutcomeUio}
55
+ * @memberof AutomationRunUio
56
+ */
57
+ status: AutomationRunOutcomeUio;
58
+ /**
59
+ *
60
+ * @type {Date}
61
+ * @memberof AutomationRunUio
62
+ */
63
+ triggeredAt: Date;
64
+ /**
65
+ *
66
+ * @type {Date}
67
+ * @memberof AutomationRunUio
68
+ */
69
+ startedAt: Date | null;
70
+ /**
71
+ *
72
+ * @type {Date}
73
+ * @memberof AutomationRunUio
74
+ */
75
+ finishedAt: Date | null;
76
+ /**
77
+ *
78
+ * @type {number}
79
+ * @memberof AutomationRunUio
80
+ */
81
+ durationMs: number | null;
82
+ /**
83
+ *
84
+ * @type {string}
85
+ * @memberof AutomationRunUio
86
+ */
87
+ conversationId: string | null;
88
+ /**
89
+ *
90
+ * @type {AutomationTriggerKindUio}
91
+ * @memberof AutomationRunUio
92
+ */
93
+ trigger: AutomationTriggerKindUio;
94
+ /**
95
+ *
96
+ * @type {AutomationRunSourceUio}
97
+ * @memberof AutomationRunUio
98
+ */
99
+ source: AutomationRunSourceUio;
100
+ /**
101
+ *
102
+ * @type {AutomationRunDeliveryUio}
103
+ * @memberof AutomationRunUio
104
+ */
105
+ delivery: AutomationRunDeliveryUio;
106
+ /**
107
+ * Start of the agent answer (500 characters at most).
108
+ * @type {string}
109
+ * @memberof AutomationRunUio
110
+ */
111
+ reply: string | null;
112
+ /**
113
+ *
114
+ * @type {string}
115
+ * @memberof AutomationRunUio
116
+ */
117
+ error: string | null;
118
+ }
119
+ /**
120
+ * Check if a given object implements the AutomationRunUio interface.
121
+ */
122
+ export declare function instanceOfAutomationRunUio(value: object): value is AutomationRunUio;
123
+ export declare function AutomationRunUioFromJSON(json: any): AutomationRunUio;
124
+ export declare function AutomationRunUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): AutomationRunUio;
125
+ export declare function AutomationRunUioToJSON(json: any): AutomationRunUio;
126
+ export declare function AutomationRunUioToJSONTyped(value?: AutomationRunUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,114 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * brain-client
6
+ * Api ands models for brain-app and brain-app
7
+ *
8
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfAutomationRunUio = instanceOfAutomationRunUio;
17
+ exports.AutomationRunUioFromJSON = AutomationRunUioFromJSON;
18
+ exports.AutomationRunUioFromJSONTyped = AutomationRunUioFromJSONTyped;
19
+ exports.AutomationRunUioToJSON = AutomationRunUioToJSON;
20
+ exports.AutomationRunUioToJSONTyped = AutomationRunUioToJSONTyped;
21
+ const AutomationRunSourceUio_1 = require("./AutomationRunSourceUio");
22
+ const AutomationRunOutcomeUio_1 = require("./AutomationRunOutcomeUio");
23
+ const AutomationTriggerKindUio_1 = require("./AutomationTriggerKindUio");
24
+ const AutomationRunDeliveryUio_1 = require("./AutomationRunDeliveryUio");
25
+ /**
26
+ * Check if a given object implements the AutomationRunUio interface.
27
+ */
28
+ function instanceOfAutomationRunUio(value) {
29
+ if (!('id' in value) || value['id'] === undefined)
30
+ return false;
31
+ if (!('taskId' in value) || value['taskId'] === undefined)
32
+ return false;
33
+ if (!('taskName' in value) || value['taskName'] === undefined)
34
+ return false;
35
+ if (!('agentId' in value) || value['agentId'] === undefined)
36
+ return false;
37
+ if (!('agentName' in value) || value['agentName'] === undefined)
38
+ return false;
39
+ if (!('status' in value) || value['status'] === undefined)
40
+ return false;
41
+ if (!('triggeredAt' in value) || value['triggeredAt'] === undefined)
42
+ return false;
43
+ if (!('startedAt' in value) || value['startedAt'] === undefined)
44
+ return false;
45
+ if (!('finishedAt' in value) || value['finishedAt'] === undefined)
46
+ return false;
47
+ if (!('durationMs' in value) || value['durationMs'] === undefined)
48
+ return false;
49
+ if (!('conversationId' in value) || value['conversationId'] === undefined)
50
+ return false;
51
+ if (!('trigger' in value) || value['trigger'] === undefined)
52
+ return false;
53
+ if (!('source' in value) || value['source'] === undefined)
54
+ return false;
55
+ if (!('delivery' in value) || value['delivery'] === undefined)
56
+ return false;
57
+ if (!('reply' in value) || value['reply'] === undefined)
58
+ return false;
59
+ if (!('error' in value) || value['error'] === undefined)
60
+ return false;
61
+ return true;
62
+ }
63
+ function AutomationRunUioFromJSON(json) {
64
+ return AutomationRunUioFromJSONTyped(json, false);
65
+ }
66
+ function AutomationRunUioFromJSONTyped(json, ignoreDiscriminator) {
67
+ if (json == null) {
68
+ return json;
69
+ }
70
+ return {
71
+ 'id': json['id'],
72
+ 'taskId': json['taskId'],
73
+ 'taskName': json['taskName'],
74
+ 'agentId': json['agentId'],
75
+ 'agentName': json['agentName'],
76
+ 'status': (0, AutomationRunOutcomeUio_1.AutomationRunOutcomeUioFromJSON)(json['status']),
77
+ 'triggeredAt': (new Date(json['triggeredAt'])),
78
+ 'startedAt': (json['startedAt'] == null ? null : new Date(json['startedAt'])),
79
+ 'finishedAt': (json['finishedAt'] == null ? null : new Date(json['finishedAt'])),
80
+ 'durationMs': json['durationMs'],
81
+ 'conversationId': json['conversationId'],
82
+ 'trigger': (0, AutomationTriggerKindUio_1.AutomationTriggerKindUioFromJSON)(json['trigger']),
83
+ 'source': (0, AutomationRunSourceUio_1.AutomationRunSourceUioFromJSON)(json['source']),
84
+ 'delivery': (0, AutomationRunDeliveryUio_1.AutomationRunDeliveryUioFromJSON)(json['delivery']),
85
+ 'reply': json['reply'],
86
+ 'error': json['error'],
87
+ };
88
+ }
89
+ function AutomationRunUioToJSON(json) {
90
+ return AutomationRunUioToJSONTyped(json, false);
91
+ }
92
+ function AutomationRunUioToJSONTyped(value, ignoreDiscriminator = false) {
93
+ if (value == null) {
94
+ return value;
95
+ }
96
+ return {
97
+ 'id': value['id'],
98
+ 'taskId': value['taskId'],
99
+ 'taskName': value['taskName'],
100
+ 'agentId': value['agentId'],
101
+ 'agentName': value['agentName'],
102
+ 'status': (0, AutomationRunOutcomeUio_1.AutomationRunOutcomeUioToJSON)(value['status']),
103
+ 'triggeredAt': ((value['triggeredAt']).toISOString()),
104
+ 'startedAt': (value['startedAt'] == null ? null : value['startedAt'].toISOString()),
105
+ 'finishedAt': (value['finishedAt'] == null ? null : value['finishedAt'].toISOString()),
106
+ 'durationMs': value['durationMs'],
107
+ 'conversationId': value['conversationId'],
108
+ 'trigger': (0, AutomationTriggerKindUio_1.AutomationTriggerKindUioToJSON)(value['trigger']),
109
+ 'source': (0, AutomationRunSourceUio_1.AutomationRunSourceUioToJSON)(value['source']),
110
+ 'delivery': (0, AutomationRunDeliveryUio_1.AutomationRunDeliveryUioToJSON)(value['delivery']),
111
+ 'reply': value['reply'],
112
+ 'error': value['error'],
113
+ };
114
+ }
@@ -0,0 +1,62 @@
1
+ /**
2
+ * brain-client
3
+ * Api ands models for brain-app and brain-app
4
+ *
5
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface AutomationStatsUio
16
+ */
17
+ export interface AutomationStatsUio {
18
+ /**
19
+ *
20
+ * @type {number}
21
+ * @memberof AutomationStatsUio
22
+ */
23
+ active: number;
24
+ /**
25
+ * Active automations triggered by a GitLab mention or a webhook.
26
+ * @type {number}
27
+ * @memberof AutomationStatsUio
28
+ */
29
+ event: number;
30
+ /**
31
+ *
32
+ * @type {number}
33
+ * @memberof AutomationStatsUio
34
+ */
35
+ runs24h: number;
36
+ /**
37
+ *
38
+ * @type {number}
39
+ * @memberof AutomationStatsUio
40
+ */
41
+ runs7d: number;
42
+ /**
43
+ *
44
+ * @type {number}
45
+ * @memberof AutomationStatsUio
46
+ */
47
+ failures7d: number;
48
+ /**
49
+ * Mentions and webhook calls of the organization not handled yet.
50
+ * @type {number}
51
+ * @memberof AutomationStatsUio
52
+ */
53
+ pending: number;
54
+ }
55
+ /**
56
+ * Check if a given object implements the AutomationStatsUio interface.
57
+ */
58
+ export declare function instanceOfAutomationStatsUio(value: object): value is AutomationStatsUio;
59
+ export declare function AutomationStatsUioFromJSON(json: any): AutomationStatsUio;
60
+ export declare function AutomationStatsUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): AutomationStatsUio;
61
+ export declare function AutomationStatsUioToJSON(json: any): AutomationStatsUio;
62
+ export declare function AutomationStatsUioToJSONTyped(value?: AutomationStatsUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * brain-client
6
+ * Api ands models for brain-app and brain-app
7
+ *
8
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfAutomationStatsUio = instanceOfAutomationStatsUio;
17
+ exports.AutomationStatsUioFromJSON = AutomationStatsUioFromJSON;
18
+ exports.AutomationStatsUioFromJSONTyped = AutomationStatsUioFromJSONTyped;
19
+ exports.AutomationStatsUioToJSON = AutomationStatsUioToJSON;
20
+ exports.AutomationStatsUioToJSONTyped = AutomationStatsUioToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the AutomationStatsUio interface.
23
+ */
24
+ function instanceOfAutomationStatsUio(value) {
25
+ if (!('active' in value) || value['active'] === undefined)
26
+ return false;
27
+ if (!('event' in value) || value['event'] === undefined)
28
+ return false;
29
+ if (!('runs24h' in value) || value['runs24h'] === undefined)
30
+ return false;
31
+ if (!('runs7d' in value) || value['runs7d'] === undefined)
32
+ return false;
33
+ if (!('failures7d' in value) || value['failures7d'] === undefined)
34
+ return false;
35
+ if (!('pending' in value) || value['pending'] === undefined)
36
+ return false;
37
+ return true;
38
+ }
39
+ function AutomationStatsUioFromJSON(json) {
40
+ return AutomationStatsUioFromJSONTyped(json, false);
41
+ }
42
+ function AutomationStatsUioFromJSONTyped(json, ignoreDiscriminator) {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+ 'active': json['active'],
48
+ 'event': json['event'],
49
+ 'runs24h': json['runs24h'],
50
+ 'runs7d': json['runs7d'],
51
+ 'failures7d': json['failures7d'],
52
+ 'pending': json['pending'],
53
+ };
54
+ }
55
+ function AutomationStatsUioToJSON(json) {
56
+ return AutomationStatsUioToJSONTyped(json, false);
57
+ }
58
+ function AutomationStatsUioToJSONTyped(value, ignoreDiscriminator = false) {
59
+ if (value == null) {
60
+ return value;
61
+ }
62
+ return {
63
+ 'active': value['active'],
64
+ 'event': value['event'],
65
+ 'runs24h': value['runs24h'],
66
+ 'runs7d': value['runs7d'],
67
+ 'failures7d': value['failures7d'],
68
+ 'pending': value['pending'],
69
+ };
70
+ }
@@ -0,0 +1,137 @@
1
+ /**
2
+ * brain-client
3
+ * Api ands models for brain-app and brain-app
4
+ *
5
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { TaskScheduleUio } from './TaskScheduleUio';
13
+ import type { AutomationTriggerKindUio } from './AutomationTriggerKindUio';
14
+ import type { AutomationLastRunUio } from './AutomationLastRunUio';
15
+ import type { AutomationDayCountUio } from './AutomationDayCountUio';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface AutomationSummaryUio
20
+ */
21
+ export interface AutomationSummaryUio {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof AutomationSummaryUio
26
+ */
27
+ id: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof AutomationSummaryUio
32
+ */
33
+ name: string | null;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof AutomationSummaryUio
38
+ */
39
+ message: string;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof AutomationSummaryUio
44
+ */
45
+ agentId: string;
46
+ /**
47
+ *
48
+ * @type {string}
49
+ * @memberof AutomationSummaryUio
50
+ */
51
+ agentName: string | null;
52
+ /**
53
+ *
54
+ * @type {string}
55
+ * @memberof AutomationSummaryUio
56
+ */
57
+ mode: AutomationSummaryUioModeEnum;
58
+ /**
59
+ *
60
+ * @type {string}
61
+ * @memberof AutomationSummaryUio
62
+ */
63
+ status: AutomationSummaryUioStatusEnum;
64
+ /**
65
+ *
66
+ * @type {AutomationTriggerKindUio}
67
+ * @memberof AutomationSummaryUio
68
+ */
69
+ trigger: AutomationTriggerKindUio;
70
+ /**
71
+ *
72
+ * @type {TaskScheduleUio}
73
+ * @memberof AutomationSummaryUio
74
+ */
75
+ schedule: TaskScheduleUio | null;
76
+ /**
77
+ *
78
+ * @type {string}
79
+ * @memberof AutomationSummaryUio
80
+ */
81
+ timezone: string;
82
+ /**
83
+ *
84
+ * @type {Date}
85
+ * @memberof AutomationSummaryUio
86
+ */
87
+ nextRunAt: Date | null;
88
+ /**
89
+ *
90
+ * @type {string}
91
+ * @memberof AutomationSummaryUio
92
+ */
93
+ callbackUrl: string | null;
94
+ /**
95
+ *
96
+ * @type {AutomationLastRunUio}
97
+ * @memberof AutomationSummaryUio
98
+ */
99
+ lastRun: AutomationLastRunUio | null;
100
+ /**
101
+ * The last 7 UTC days, oldest first.
102
+ * @type {Array<AutomationDayCountUio>}
103
+ * @memberof AutomationSummaryUio
104
+ */
105
+ days: Array<AutomationDayCountUio>;
106
+ /**
107
+ *
108
+ * @type {number}
109
+ * @memberof AutomationSummaryUio
110
+ */
111
+ runs7d: number;
112
+ }
113
+ /**
114
+ * @export
115
+ */
116
+ export declare const AutomationSummaryUioModeEnum: {
117
+ readonly Once: "once";
118
+ readonly Recurring: "recurring";
119
+ };
120
+ export type AutomationSummaryUioModeEnum = typeof AutomationSummaryUioModeEnum[keyof typeof AutomationSummaryUioModeEnum];
121
+ /**
122
+ * @export
123
+ */
124
+ export declare const AutomationSummaryUioStatusEnum: {
125
+ readonly Active: "active";
126
+ readonly Paused: "paused";
127
+ readonly Done: "done";
128
+ };
129
+ export type AutomationSummaryUioStatusEnum = typeof AutomationSummaryUioStatusEnum[keyof typeof AutomationSummaryUioStatusEnum];
130
+ /**
131
+ * Check if a given object implements the AutomationSummaryUio interface.
132
+ */
133
+ export declare function instanceOfAutomationSummaryUio(value: object): value is AutomationSummaryUio;
134
+ export declare function AutomationSummaryUioFromJSON(json: any): AutomationSummaryUio;
135
+ export declare function AutomationSummaryUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): AutomationSummaryUio;
136
+ export declare function AutomationSummaryUioToJSON(json: any): AutomationSummaryUio;
137
+ export declare function AutomationSummaryUioToJSONTyped(value?: AutomationSummaryUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,126 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * brain-client
6
+ * Api ands models for brain-app and brain-app
7
+ *
8
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.AutomationSummaryUioStatusEnum = exports.AutomationSummaryUioModeEnum = void 0;
17
+ exports.instanceOfAutomationSummaryUio = instanceOfAutomationSummaryUio;
18
+ exports.AutomationSummaryUioFromJSON = AutomationSummaryUioFromJSON;
19
+ exports.AutomationSummaryUioFromJSONTyped = AutomationSummaryUioFromJSONTyped;
20
+ exports.AutomationSummaryUioToJSON = AutomationSummaryUioToJSON;
21
+ exports.AutomationSummaryUioToJSONTyped = AutomationSummaryUioToJSONTyped;
22
+ const TaskScheduleUio_1 = require("./TaskScheduleUio");
23
+ const AutomationTriggerKindUio_1 = require("./AutomationTriggerKindUio");
24
+ const AutomationLastRunUio_1 = require("./AutomationLastRunUio");
25
+ const AutomationDayCountUio_1 = require("./AutomationDayCountUio");
26
+ /**
27
+ * @export
28
+ */
29
+ exports.AutomationSummaryUioModeEnum = {
30
+ Once: 'once',
31
+ Recurring: 'recurring'
32
+ };
33
+ /**
34
+ * @export
35
+ */
36
+ exports.AutomationSummaryUioStatusEnum = {
37
+ Active: 'active',
38
+ Paused: 'paused',
39
+ Done: 'done'
40
+ };
41
+ /**
42
+ * Check if a given object implements the AutomationSummaryUio interface.
43
+ */
44
+ function instanceOfAutomationSummaryUio(value) {
45
+ if (!('id' in value) || value['id'] === undefined)
46
+ return false;
47
+ if (!('name' in value) || value['name'] === undefined)
48
+ return false;
49
+ if (!('message' in value) || value['message'] === undefined)
50
+ return false;
51
+ if (!('agentId' in value) || value['agentId'] === undefined)
52
+ return false;
53
+ if (!('agentName' in value) || value['agentName'] === undefined)
54
+ return false;
55
+ if (!('mode' in value) || value['mode'] === undefined)
56
+ return false;
57
+ if (!('status' in value) || value['status'] === undefined)
58
+ return false;
59
+ if (!('trigger' in value) || value['trigger'] === undefined)
60
+ return false;
61
+ if (!('schedule' in value) || value['schedule'] === undefined)
62
+ return false;
63
+ if (!('timezone' in value) || value['timezone'] === undefined)
64
+ return false;
65
+ if (!('nextRunAt' in value) || value['nextRunAt'] === undefined)
66
+ return false;
67
+ if (!('callbackUrl' in value) || value['callbackUrl'] === undefined)
68
+ return false;
69
+ if (!('lastRun' in value) || value['lastRun'] === undefined)
70
+ return false;
71
+ if (!('days' in value) || value['days'] === undefined)
72
+ return false;
73
+ if (!('runs7d' in value) || value['runs7d'] === undefined)
74
+ return false;
75
+ return true;
76
+ }
77
+ function AutomationSummaryUioFromJSON(json) {
78
+ return AutomationSummaryUioFromJSONTyped(json, false);
79
+ }
80
+ function AutomationSummaryUioFromJSONTyped(json, ignoreDiscriminator) {
81
+ if (json == null) {
82
+ return json;
83
+ }
84
+ return {
85
+ 'id': json['id'],
86
+ 'name': json['name'],
87
+ 'message': json['message'],
88
+ 'agentId': json['agentId'],
89
+ 'agentName': json['agentName'],
90
+ 'mode': json['mode'],
91
+ 'status': json['status'],
92
+ 'trigger': (0, AutomationTriggerKindUio_1.AutomationTriggerKindUioFromJSON)(json['trigger']),
93
+ 'schedule': (0, TaskScheduleUio_1.TaskScheduleUioFromJSON)(json['schedule']),
94
+ 'timezone': json['timezone'],
95
+ 'nextRunAt': (json['nextRunAt'] == null ? null : new Date(json['nextRunAt'])),
96
+ 'callbackUrl': json['callbackUrl'],
97
+ 'lastRun': (0, AutomationLastRunUio_1.AutomationLastRunUioFromJSON)(json['lastRun']),
98
+ 'days': (json['days'].map(AutomationDayCountUio_1.AutomationDayCountUioFromJSON)),
99
+ 'runs7d': json['runs7d'],
100
+ };
101
+ }
102
+ function AutomationSummaryUioToJSON(json) {
103
+ return AutomationSummaryUioToJSONTyped(json, false);
104
+ }
105
+ function AutomationSummaryUioToJSONTyped(value, ignoreDiscriminator = false) {
106
+ if (value == null) {
107
+ return value;
108
+ }
109
+ return {
110
+ 'id': value['id'],
111
+ 'name': value['name'],
112
+ 'message': value['message'],
113
+ 'agentId': value['agentId'],
114
+ 'agentName': value['agentName'],
115
+ 'mode': value['mode'],
116
+ 'status': value['status'],
117
+ 'trigger': (0, AutomationTriggerKindUio_1.AutomationTriggerKindUioToJSON)(value['trigger']),
118
+ 'schedule': (0, TaskScheduleUio_1.TaskScheduleUioToJSON)(value['schedule']),
119
+ 'timezone': value['timezone'],
120
+ 'nextRunAt': (value['nextRunAt'] == null ? null : value['nextRunAt'].toISOString()),
121
+ 'callbackUrl': value['callbackUrl'],
122
+ 'lastRun': (0, AutomationLastRunUio_1.AutomationLastRunUioToJSON)(value['lastRun']),
123
+ 'days': (value['days'].map(AutomationDayCountUio_1.AutomationDayCountUioToJSON)),
124
+ 'runs7d': value['runs7d'],
125
+ };
126
+ }
@@ -0,0 +1,26 @@
1
+ /**
2
+ * brain-client
3
+ * Api ands models for brain-app and brain-app
4
+ *
5
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * What starts the automation, as shown in lists — its schedule, a GitLab mention, or its webhook.
14
+ * @export
15
+ */
16
+ export declare const AutomationTriggerKindUio: {
17
+ readonly Schedule: "schedule";
18
+ readonly Gitlab: "gitlab";
19
+ readonly Webhook: "webhook";
20
+ };
21
+ export type AutomationTriggerKindUio = typeof AutomationTriggerKindUio[keyof typeof AutomationTriggerKindUio];
22
+ export declare function instanceOfAutomationTriggerKindUio(value: any): boolean;
23
+ export declare function AutomationTriggerKindUioFromJSON(json: any): AutomationTriggerKindUio;
24
+ export declare function AutomationTriggerKindUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): AutomationTriggerKindUio;
25
+ export declare function AutomationTriggerKindUioToJSON(value?: AutomationTriggerKindUio | null): any;
26
+ export declare function AutomationTriggerKindUioToJSONTyped(value: any, ignoreDiscriminator: boolean): AutomationTriggerKindUio;