@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,52 @@
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.AutomationTriggerKindUio = void 0;
17
+ exports.instanceOfAutomationTriggerKindUio = instanceOfAutomationTriggerKindUio;
18
+ exports.AutomationTriggerKindUioFromJSON = AutomationTriggerKindUioFromJSON;
19
+ exports.AutomationTriggerKindUioFromJSONTyped = AutomationTriggerKindUioFromJSONTyped;
20
+ exports.AutomationTriggerKindUioToJSON = AutomationTriggerKindUioToJSON;
21
+ exports.AutomationTriggerKindUioToJSONTyped = AutomationTriggerKindUioToJSONTyped;
22
+ /**
23
+ * What starts the automation, as shown in lists — its schedule, a GitLab mention, or its webhook.
24
+ * @export
25
+ */
26
+ exports.AutomationTriggerKindUio = {
27
+ Schedule: 'schedule',
28
+ Gitlab: 'gitlab',
29
+ Webhook: 'webhook'
30
+ };
31
+ function instanceOfAutomationTriggerKindUio(value) {
32
+ for (const key in exports.AutomationTriggerKindUio) {
33
+ if (Object.prototype.hasOwnProperty.call(exports.AutomationTriggerKindUio, key)) {
34
+ if (exports.AutomationTriggerKindUio[key] === value) {
35
+ return true;
36
+ }
37
+ }
38
+ }
39
+ return false;
40
+ }
41
+ function AutomationTriggerKindUioFromJSON(json) {
42
+ return AutomationTriggerKindUioFromJSONTyped(json, false);
43
+ }
44
+ function AutomationTriggerKindUioFromJSONTyped(json, ignoreDiscriminator) {
45
+ return json;
46
+ }
47
+ function AutomationTriggerKindUioToJSON(value) {
48
+ return value;
49
+ }
50
+ function AutomationTriggerKindUioToJSONTyped(value, ignoreDiscriminator) {
51
+ return value;
52
+ }
@@ -12,7 +12,7 @@
12
12
  import type { TaskScheduleUio } from './TaskScheduleUio';
13
13
  import type { TaskTriggerUio } from './TaskTriggerUio';
14
14
  /**
15
- * `schedule` is required unless `trigger.type` is `event` (then `mode` must be `recurring`).
15
+ * `schedule` is required unless `trigger.type` is `event` or `webhook` (then `mode` must be `recurring`). A `webhook` trigger creates the webhook, returned in `webhook` with its secret (shown once).
16
16
  * @export
17
17
  * @interface ScheduledTaskCreateUio
18
18
  */
@@ -13,7 +13,7 @@ import type { ExternalEventRoutingUio } from './ExternalEventRoutingUio';
13
13
  import type { ScheduledTaskRunTriggerAuthorUio } from './ScheduledTaskRunTriggerAuthorUio';
14
14
  import type { ExternalEventStatusUio } from './ExternalEventStatusUio';
15
15
  /**
16
- * The GitLab mention that triggered a run.
16
+ * The external event that triggered a run: a GitLab mention (`source: gitlab`, GitLab fields set) or a webhook call (`source: webhook`: `thread`, `contentType`, `payload`).
17
17
  * @export
18
18
  * @interface ScheduledTaskRunTriggerUio
19
19
  */
@@ -30,6 +30,30 @@ export interface ScheduledTaskRunTriggerUio {
30
30
  * @memberof ScheduledTaskRunTriggerUio
31
31
  */
32
32
  source: ScheduledTaskRunTriggerUioSourceEnum;
33
+ /**
34
+ * webhook only — the `X-Breign-Thread` of the call.
35
+ * @type {string}
36
+ * @memberof ScheduledTaskRunTriggerUio
37
+ */
38
+ thread?: string | null;
39
+ /**
40
+ * webhook only.
41
+ * @type {string}
42
+ * @memberof ScheduledTaskRunTriggerUio
43
+ */
44
+ contentType?: string;
45
+ /**
46
+ * webhook only — the body received (untrusted caller data), or its start as text.
47
+ * @type {any}
48
+ * @memberof ScheduledTaskRunTriggerUio
49
+ */
50
+ payload?: any | null;
51
+ /**
52
+ * webhook only.
53
+ * @type {boolean}
54
+ * @memberof ScheduledTaskRunTriggerUio
55
+ */
56
+ payloadTruncated?: boolean;
33
57
  /**
34
58
  *
35
59
  * @type {ExternalEventStatusUio}
@@ -47,67 +71,67 @@ export interface ScheduledTaskRunTriggerUio {
47
71
  * @type {string}
48
72
  * @memberof ScheduledTaskRunTriggerUio
49
73
  */
50
- projectPath: string;
74
+ projectPath?: string;
51
75
  /**
52
76
  *
53
77
  * @type {string}
54
78
  * @memberof ScheduledTaskRunTriggerUio
55
79
  */
56
- targetType: ScheduledTaskRunTriggerUioTargetTypeEnum;
80
+ targetType?: ScheduledTaskRunTriggerUioTargetTypeEnum;
57
81
  /**
58
82
  *
59
83
  * @type {number}
60
84
  * @memberof ScheduledTaskRunTriggerUio
61
85
  */
62
- targetIid: number | null;
86
+ targetIid?: number | null;
63
87
  /**
64
88
  *
65
89
  * @type {string}
66
90
  * @memberof ScheduledTaskRunTriggerUio
67
91
  */
68
- targetTitle: string | null;
92
+ targetTitle?: string | null;
69
93
  /**
70
94
  *
71
95
  * @type {string}
72
96
  * @memberof ScheduledTaskRunTriggerUio
73
97
  */
74
- targetUrl: string | null;
98
+ targetUrl?: string | null;
75
99
  /**
76
100
  *
77
101
  * @type {string}
78
102
  * @memberof ScheduledTaskRunTriggerUio
79
103
  */
80
- noteUrl: string | null;
104
+ noteUrl?: string | null;
81
105
  /**
82
106
  *
83
107
  * @type {ScheduledTaskRunTriggerAuthorUio}
84
108
  * @memberof ScheduledTaskRunTriggerUio
85
109
  */
86
- author: ScheduledTaskRunTriggerAuthorUio;
110
+ author?: ScheduledTaskRunTriggerAuthorUio;
87
111
  /**
88
112
  * The comment text (untrusted user content).
89
113
  * @type {string}
90
114
  * @memberof ScheduledTaskRunTriggerUio
91
115
  */
92
- body: string;
116
+ body?: string;
93
117
  /**
94
118
  *
95
119
  * @type {string}
96
120
  * @memberof ScheduledTaskRunTriggerUio
97
121
  */
98
- botUsername: string | null;
122
+ botUsername?: string | null;
99
123
  /**
100
124
  *
101
125
  * @type {ExternalEventRoutingUio}
102
126
  * @memberof ScheduledTaskRunTriggerUio
103
127
  */
104
- routing: ExternalEventRoutingUio | null;
128
+ routing?: ExternalEventRoutingUio | null;
105
129
  /**
106
130
  *
107
131
  * @type {string}
108
132
  * @memberof ScheduledTaskRunTriggerUio
109
133
  */
110
- replyUrl: string | null;
134
+ replyUrl?: string | null;
111
135
  /**
112
136
  *
113
137
  * @type {string}
@@ -120,6 +144,7 @@ export interface ScheduledTaskRunTriggerUio {
120
144
  */
121
145
  export declare const ScheduledTaskRunTriggerUioSourceEnum: {
122
146
  readonly Gitlab: "gitlab";
147
+ readonly Webhook: "webhook";
123
148
  };
124
149
  export type ScheduledTaskRunTriggerUioSourceEnum = typeof ScheduledTaskRunTriggerUioSourceEnum[keyof typeof ScheduledTaskRunTriggerUioSourceEnum];
125
150
  /**
@@ -26,7 +26,8 @@ const ExternalEventStatusUio_1 = require("./ExternalEventStatusUio");
26
26
  * @export
27
27
  */
28
28
  exports.ScheduledTaskRunTriggerUioSourceEnum = {
29
- Gitlab: 'gitlab'
29
+ Gitlab: 'gitlab',
30
+ Webhook: 'webhook'
30
31
  };
31
32
  /**
32
33
  * @export
@@ -49,28 +50,6 @@ function instanceOfScheduledTaskRunTriggerUio(value) {
49
50
  return false;
50
51
  if (!('receivedAt' in value) || value['receivedAt'] === undefined)
51
52
  return false;
52
- if (!('projectPath' in value) || value['projectPath'] === undefined)
53
- return false;
54
- if (!('targetType' in value) || value['targetType'] === undefined)
55
- return false;
56
- if (!('targetIid' in value) || value['targetIid'] === undefined)
57
- return false;
58
- if (!('targetTitle' in value) || value['targetTitle'] === undefined)
59
- return false;
60
- if (!('targetUrl' in value) || value['targetUrl'] === undefined)
61
- return false;
62
- if (!('noteUrl' in value) || value['noteUrl'] === undefined)
63
- return false;
64
- if (!('author' in value) || value['author'] === undefined)
65
- return false;
66
- if (!('body' in value) || value['body'] === undefined)
67
- return false;
68
- if (!('botUsername' in value) || value['botUsername'] === undefined)
69
- return false;
70
- if (!('routing' in value) || value['routing'] === undefined)
71
- return false;
72
- if (!('replyUrl' in value) || value['replyUrl'] === undefined)
73
- return false;
74
53
  if (!('conversationId' in value) || value['conversationId'] === undefined)
75
54
  return false;
76
55
  return true;
@@ -85,19 +64,23 @@ function ScheduledTaskRunTriggerUioFromJSONTyped(json, ignoreDiscriminator) {
85
64
  return {
86
65
  'eventId': json['eventId'],
87
66
  'source': json['source'],
67
+ 'thread': json['thread'] == null ? undefined : json['thread'],
68
+ 'contentType': json['contentType'] == null ? undefined : json['contentType'],
69
+ 'payload': json['payload'] == null ? undefined : json['payload'],
70
+ 'payloadTruncated': json['payloadTruncated'] == null ? undefined : json['payloadTruncated'],
88
71
  'status': (0, ExternalEventStatusUio_1.ExternalEventStatusUioFromJSON)(json['status']),
89
72
  'receivedAt': (new Date(json['receivedAt'])),
90
- 'projectPath': json['projectPath'],
91
- 'targetType': json['targetType'],
92
- 'targetIid': json['targetIid'],
93
- 'targetTitle': json['targetTitle'],
94
- 'targetUrl': json['targetUrl'],
95
- 'noteUrl': json['noteUrl'],
96
- 'author': (0, ScheduledTaskRunTriggerAuthorUio_1.ScheduledTaskRunTriggerAuthorUioFromJSON)(json['author']),
97
- 'body': json['body'],
98
- 'botUsername': json['botUsername'],
99
- 'routing': (0, ExternalEventRoutingUio_1.ExternalEventRoutingUioFromJSON)(json['routing']),
100
- 'replyUrl': json['replyUrl'],
73
+ 'projectPath': json['projectPath'] == null ? undefined : json['projectPath'],
74
+ 'targetType': json['targetType'] == null ? undefined : json['targetType'],
75
+ 'targetIid': json['targetIid'] == null ? undefined : json['targetIid'],
76
+ 'targetTitle': json['targetTitle'] == null ? undefined : json['targetTitle'],
77
+ 'targetUrl': json['targetUrl'] == null ? undefined : json['targetUrl'],
78
+ 'noteUrl': json['noteUrl'] == null ? undefined : json['noteUrl'],
79
+ 'author': json['author'] == null ? undefined : (0, ScheduledTaskRunTriggerAuthorUio_1.ScheduledTaskRunTriggerAuthorUioFromJSON)(json['author']),
80
+ 'body': json['body'] == null ? undefined : json['body'],
81
+ 'botUsername': json['botUsername'] == null ? undefined : json['botUsername'],
82
+ 'routing': json['routing'] == null ? undefined : (0, ExternalEventRoutingUio_1.ExternalEventRoutingUioFromJSON)(json['routing']),
83
+ 'replyUrl': json['replyUrl'] == null ? undefined : json['replyUrl'],
101
84
  'conversationId': json['conversationId'],
102
85
  };
103
86
  }
@@ -111,6 +94,10 @@ function ScheduledTaskRunTriggerUioToJSONTyped(value, ignoreDiscriminator = fals
111
94
  return {
112
95
  'eventId': value['eventId'],
113
96
  'source': value['source'],
97
+ 'thread': value['thread'],
98
+ 'contentType': value['contentType'],
99
+ 'payload': value['payload'],
100
+ 'payloadTruncated': value['payloadTruncated'],
114
101
  'status': (0, ExternalEventStatusUio_1.ExternalEventStatusUioToJSON)(value['status']),
115
102
  'receivedAt': ((value['receivedAt']).toISOString()),
116
103
  'projectPath': value['projectPath'],
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import type { TaskScheduleUio } from './TaskScheduleUio';
13
+ import type { WebhookEndpointUio } from './WebhookEndpointUio';
13
14
  import type { TaskTriggerUio } from './TaskTriggerUio';
14
15
  /**
15
16
  *
@@ -60,7 +61,7 @@ export interface ScheduledTaskUio {
60
61
  */
61
62
  status: ScheduledTaskUioStatusEnum;
62
63
  /**
63
- * null for an automation triggered by an event.
64
+ * null for an automation triggered by an event or a webhook.
64
65
  * @type {TaskScheduleUio}
65
66
  * @memberof ScheduledTaskUio
66
67
  */
@@ -71,6 +72,12 @@ export interface ScheduledTaskUio {
71
72
  * @memberof ScheduledTaskUio
72
73
  */
73
74
  trigger?: TaskTriggerUio;
75
+ /**
76
+ *
77
+ * @type {WebhookEndpointUio}
78
+ * @memberof ScheduledTaskUio
79
+ */
80
+ webhook?: WebhookEndpointUio;
74
81
  /**
75
82
  *
76
83
  * @type {string}
@@ -20,6 +20,7 @@ exports.ScheduledTaskUioFromJSONTyped = ScheduledTaskUioFromJSONTyped;
20
20
  exports.ScheduledTaskUioToJSON = ScheduledTaskUioToJSON;
21
21
  exports.ScheduledTaskUioToJSONTyped = ScheduledTaskUioToJSONTyped;
22
22
  const TaskScheduleUio_1 = require("./TaskScheduleUio");
23
+ const WebhookEndpointUio_1 = require("./WebhookEndpointUio");
23
24
  const TaskTriggerUio_1 = require("./TaskTriggerUio");
24
25
  /**
25
26
  * @export
@@ -85,6 +86,7 @@ function ScheduledTaskUioFromJSONTyped(json, ignoreDiscriminator) {
85
86
  'status': json['status'],
86
87
  'schedule': (0, TaskScheduleUio_1.TaskScheduleUioFromJSON)(json['schedule']),
87
88
  'trigger': json['trigger'] == null ? undefined : (0, TaskTriggerUio_1.TaskTriggerUioFromJSON)(json['trigger']),
89
+ 'webhook': json['webhook'] == null ? undefined : (0, WebhookEndpointUio_1.WebhookEndpointUioFromJSON)(json['webhook']),
88
90
  'cronExpression': json['cronExpression'],
89
91
  'timezone': json['timezone'],
90
92
  'lang': json['lang'],
@@ -113,6 +115,7 @@ function ScheduledTaskUioToJSONTyped(value, ignoreDiscriminator = false) {
113
115
  'status': value['status'],
114
116
  'schedule': (0, TaskScheduleUio_1.TaskScheduleUioToJSON)(value['schedule']),
115
117
  'trigger': (0, TaskTriggerUio_1.TaskTriggerUioToJSON)(value['trigger']),
118
+ 'webhook': (0, WebhookEndpointUio_1.WebhookEndpointUioToJSON)(value['webhook']),
116
119
  'cronExpression': value['cronExpression'],
117
120
  'timezone': value['timezone'],
118
121
  'lang': value['lang'],
@@ -11,7 +11,7 @@
11
11
  */
12
12
  import type { TaskTriggerReplyUio } from './TaskTriggerReplyUio';
13
13
  /**
14
- * What starts the automation. `schedule` (default): its schedule. `event`: a mention of one of the bot accounts in GitLab, in the given kinds of objects and projects (empty: all projects; `groupe/projet` or `groupe/*`).
14
+ * What starts the automation. `schedule` (default): its schedule. `event`: a mention of one of the bot accounts in GitLab, in the given kinds of objects and projects (empty: all projects; `groupe/projet` or `groupe/*`). `webhook`: a call to its webhook (see `ScheduledTask.webhook`); the result goes to `callbackUrl`.
15
15
  * @export
16
16
  * @interface TaskTriggerUio
17
17
  */
@@ -22,6 +22,12 @@ export interface TaskTriggerUio {
22
22
  * @memberof TaskTriggerUio
23
23
  */
24
24
  type: TaskTriggerUioTypeEnum;
25
+ /**
26
+ * `webhook` only, on create or update: the member the conversations run as (default: the caller; another member requires an organization admin). Not stored on the task.
27
+ * @type {string}
28
+ * @memberof TaskTriggerUio
29
+ */
30
+ runAsUserId?: string;
25
31
  /**
26
32
  *
27
33
  * @type {string}
@@ -59,6 +65,7 @@ export interface TaskTriggerUio {
59
65
  export declare const TaskTriggerUioTypeEnum: {
60
66
  readonly Schedule: "schedule";
61
67
  readonly Event: "event";
68
+ readonly Webhook: "webhook";
62
69
  };
63
70
  export type TaskTriggerUioTypeEnum = typeof TaskTriggerUioTypeEnum[keyof typeof TaskTriggerUioTypeEnum];
64
71
  /**
@@ -25,7 +25,8 @@ const TaskTriggerReplyUio_1 = require("./TaskTriggerReplyUio");
25
25
  */
26
26
  exports.TaskTriggerUioTypeEnum = {
27
27
  Schedule: 'schedule',
28
- Event: 'event'
28
+ Event: 'event',
29
+ Webhook: 'webhook'
29
30
  };
30
31
  /**
31
32
  * @export
@@ -59,6 +60,7 @@ function TaskTriggerUioFromJSONTyped(json, ignoreDiscriminator) {
59
60
  }
60
61
  return {
61
62
  'type': json['type'],
63
+ 'runAsUserId': json['runAsUserId'] == null ? undefined : json['runAsUserId'],
62
64
  'source': json['source'] == null ? undefined : json['source'],
63
65
  'botAccountIds': json['botAccountIds'] == null ? undefined : json['botAccountIds'],
64
66
  'kinds': json['kinds'] == null ? undefined : json['kinds'],
@@ -75,6 +77,7 @@ function TaskTriggerUioToJSONTyped(value, ignoreDiscriminator = false) {
75
77
  }
76
78
  return {
77
79
  'type': value['type'],
80
+ 'runAsUserId': value['runAsUserId'],
78
81
  'source': value['source'],
79
82
  'botAccountIds': value['botAccountIds'],
80
83
  'kinds': value['kinds'],
@@ -0,0 +1,82 @@
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
+ * The public address of an automation triggered by a webhook. Callers POST to `url` with `Authorization: Bearer <secret>`, or sign the raw body with HMAC-SHA256 (`X-Breign-Signature: sha256=<hex>`; with `X-Breign-Timestamp: <unix seconds>` the signature covers `<timestamp>.<body>`). Optional headers: `Idempotency-Key`, `X-Breign-Thread`.
14
+ * @export
15
+ * @interface WebhookEndpointUio
16
+ */
17
+ export interface WebhookEndpointUio {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof WebhookEndpointUio
22
+ */
23
+ id: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof WebhookEndpointUio
28
+ */
29
+ url: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof WebhookEndpointUio
34
+ */
35
+ status: WebhookEndpointUioStatusEnum;
36
+ /**
37
+ * The organization member the conversations run as (user-scoped MCP tools, quotas, history).
38
+ * @type {string}
39
+ * @memberof WebhookEndpointUio
40
+ */
41
+ runAsUserId: string;
42
+ /**
43
+ *
44
+ * @type {Date}
45
+ * @memberof WebhookEndpointUio
46
+ */
47
+ lastEventAt: Date | null;
48
+ /**
49
+ *
50
+ * @type {Date}
51
+ * @memberof WebhookEndpointUio
52
+ */
53
+ createdAt: Date;
54
+ /**
55
+ *
56
+ * @type {Date}
57
+ * @memberof WebhookEndpointUio
58
+ */
59
+ updatedAt: Date;
60
+ /**
61
+ * Only returned when the endpoint is created and after a rotation.
62
+ * @type {string}
63
+ * @memberof WebhookEndpointUio
64
+ */
65
+ secret?: string;
66
+ }
67
+ /**
68
+ * @export
69
+ */
70
+ export declare const WebhookEndpointUioStatusEnum: {
71
+ readonly Active: "active";
72
+ readonly Disabled: "disabled";
73
+ };
74
+ export type WebhookEndpointUioStatusEnum = typeof WebhookEndpointUioStatusEnum[keyof typeof WebhookEndpointUioStatusEnum];
75
+ /**
76
+ * Check if a given object implements the WebhookEndpointUio interface.
77
+ */
78
+ export declare function instanceOfWebhookEndpointUio(value: object): value is WebhookEndpointUio;
79
+ export declare function WebhookEndpointUioFromJSON(json: any): WebhookEndpointUio;
80
+ export declare function WebhookEndpointUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebhookEndpointUio;
81
+ export declare function WebhookEndpointUioToJSON(json: any): WebhookEndpointUio;
82
+ export declare function WebhookEndpointUioToJSONTyped(value?: WebhookEndpointUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,84 @@
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.WebhookEndpointUioStatusEnum = void 0;
17
+ exports.instanceOfWebhookEndpointUio = instanceOfWebhookEndpointUio;
18
+ exports.WebhookEndpointUioFromJSON = WebhookEndpointUioFromJSON;
19
+ exports.WebhookEndpointUioFromJSONTyped = WebhookEndpointUioFromJSONTyped;
20
+ exports.WebhookEndpointUioToJSON = WebhookEndpointUioToJSON;
21
+ exports.WebhookEndpointUioToJSONTyped = WebhookEndpointUioToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.WebhookEndpointUioStatusEnum = {
26
+ Active: 'active',
27
+ Disabled: 'disabled'
28
+ };
29
+ /**
30
+ * Check if a given object implements the WebhookEndpointUio interface.
31
+ */
32
+ function instanceOfWebhookEndpointUio(value) {
33
+ if (!('id' in value) || value['id'] === undefined)
34
+ return false;
35
+ if (!('url' in value) || value['url'] === undefined)
36
+ return false;
37
+ if (!('status' in value) || value['status'] === undefined)
38
+ return false;
39
+ if (!('runAsUserId' in value) || value['runAsUserId'] === undefined)
40
+ return false;
41
+ if (!('lastEventAt' in value) || value['lastEventAt'] === undefined)
42
+ return false;
43
+ if (!('createdAt' in value) || value['createdAt'] === undefined)
44
+ return false;
45
+ if (!('updatedAt' in value) || value['updatedAt'] === undefined)
46
+ return false;
47
+ return true;
48
+ }
49
+ function WebhookEndpointUioFromJSON(json) {
50
+ return WebhookEndpointUioFromJSONTyped(json, false);
51
+ }
52
+ function WebhookEndpointUioFromJSONTyped(json, ignoreDiscriminator) {
53
+ if (json == null) {
54
+ return json;
55
+ }
56
+ return {
57
+ 'id': json['id'],
58
+ 'url': json['url'],
59
+ 'status': json['status'],
60
+ 'runAsUserId': json['runAsUserId'],
61
+ 'lastEventAt': (json['lastEventAt'] == null ? null : new Date(json['lastEventAt'])),
62
+ 'createdAt': (new Date(json['createdAt'])),
63
+ 'updatedAt': (new Date(json['updatedAt'])),
64
+ 'secret': json['secret'] == null ? undefined : json['secret'],
65
+ };
66
+ }
67
+ function WebhookEndpointUioToJSON(json) {
68
+ return WebhookEndpointUioToJSONTyped(json, false);
69
+ }
70
+ function WebhookEndpointUioToJSONTyped(value, ignoreDiscriminator = false) {
71
+ if (value == null) {
72
+ return value;
73
+ }
74
+ return {
75
+ 'id': value['id'],
76
+ 'url': value['url'],
77
+ 'status': value['status'],
78
+ 'runAsUserId': value['runAsUserId'],
79
+ 'lastEventAt': (value['lastEventAt'] == null ? null : value['lastEventAt'].toISOString()),
80
+ 'createdAt': ((value['createdAt']).toISOString()),
81
+ 'updatedAt': ((value['updatedAt']).toISOString()),
82
+ 'secret': value['secret'],
83
+ };
84
+ }
@@ -0,0 +1,46 @@
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 WebhookEndpointUpdateUio
16
+ */
17
+ export interface WebhookEndpointUpdateUio {
18
+ /**
19
+ * Another member than the caller requires an organization admin.
20
+ * @type {string}
21
+ * @memberof WebhookEndpointUpdateUio
22
+ */
23
+ runAsUserId?: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof WebhookEndpointUpdateUio
28
+ */
29
+ status?: WebhookEndpointUpdateUioStatusEnum;
30
+ }
31
+ /**
32
+ * @export
33
+ */
34
+ export declare const WebhookEndpointUpdateUioStatusEnum: {
35
+ readonly Active: "active";
36
+ readonly Disabled: "disabled";
37
+ };
38
+ export type WebhookEndpointUpdateUioStatusEnum = typeof WebhookEndpointUpdateUioStatusEnum[keyof typeof WebhookEndpointUpdateUioStatusEnum];
39
+ /**
40
+ * Check if a given object implements the WebhookEndpointUpdateUio interface.
41
+ */
42
+ export declare function instanceOfWebhookEndpointUpdateUio(value: object): value is WebhookEndpointUpdateUio;
43
+ export declare function WebhookEndpointUpdateUioFromJSON(json: any): WebhookEndpointUpdateUio;
44
+ export declare function WebhookEndpointUpdateUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebhookEndpointUpdateUio;
45
+ export declare function WebhookEndpointUpdateUioToJSON(json: any): WebhookEndpointUpdateUio;
46
+ export declare function WebhookEndpointUpdateUioToJSONTyped(value?: WebhookEndpointUpdateUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,58 @@
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.WebhookEndpointUpdateUioStatusEnum = void 0;
17
+ exports.instanceOfWebhookEndpointUpdateUio = instanceOfWebhookEndpointUpdateUio;
18
+ exports.WebhookEndpointUpdateUioFromJSON = WebhookEndpointUpdateUioFromJSON;
19
+ exports.WebhookEndpointUpdateUioFromJSONTyped = WebhookEndpointUpdateUioFromJSONTyped;
20
+ exports.WebhookEndpointUpdateUioToJSON = WebhookEndpointUpdateUioToJSON;
21
+ exports.WebhookEndpointUpdateUioToJSONTyped = WebhookEndpointUpdateUioToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.WebhookEndpointUpdateUioStatusEnum = {
26
+ Active: 'active',
27
+ Disabled: 'disabled'
28
+ };
29
+ /**
30
+ * Check if a given object implements the WebhookEndpointUpdateUio interface.
31
+ */
32
+ function instanceOfWebhookEndpointUpdateUio(value) {
33
+ return true;
34
+ }
35
+ function WebhookEndpointUpdateUioFromJSON(json) {
36
+ return WebhookEndpointUpdateUioFromJSONTyped(json, false);
37
+ }
38
+ function WebhookEndpointUpdateUioFromJSONTyped(json, ignoreDiscriminator) {
39
+ if (json == null) {
40
+ return json;
41
+ }
42
+ return {
43
+ 'runAsUserId': json['runAsUserId'] == null ? undefined : json['runAsUserId'],
44
+ 'status': json['status'] == null ? undefined : json['status'],
45
+ };
46
+ }
47
+ function WebhookEndpointUpdateUioToJSON(json) {
48
+ return WebhookEndpointUpdateUioToJSONTyped(json, false);
49
+ }
50
+ function WebhookEndpointUpdateUioToJSONTyped(value, ignoreDiscriminator = false) {
51
+ if (value == null) {
52
+ return value;
53
+ }
54
+ return {
55
+ 'runAsUserId': value['runAsUserId'],
56
+ 'status': value['status'],
57
+ };
58
+ }