Skip to content

Commit 7e0fd32

Browse files
fix(openapi): sync with openapi definition (#224)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 1cdf5e2 commit 7e0fd32

File tree

2 files changed

+267
-0
lines changed

2 files changed

+267
-0
lines changed

openapi.json

Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7590,6 +7590,15 @@
75907590
"type": "string",
75917591
"default": "1"
75927592
}
7593+
},
7594+
{
7595+
"name": "from",
7596+
"in": "query",
7597+
"required": false,
7598+
"description": "A Unix timestamp in seconds to filter results prior to this date.",
7599+
"schema": {
7600+
"type": "string"
7601+
}
75937602
}
75947603
],
75957604
"security": [
@@ -11620,6 +11629,168 @@
1162011629
"x-readme": {}
1162111630
}
1162211631
},
11632+
"/orgs/{org_slug}/settings/integrations/{integration_id}/events": {
11633+
"get": {
11634+
"tags": [
11635+
"Organizations",
11636+
"Integrations",
11637+
"Events"
11638+
],
11639+
"summary": "Get integration events",
11640+
"operationId": "getIntegrationEvents",
11641+
"parameters": [
11642+
{
11643+
"name": "org_slug",
11644+
"in": "path",
11645+
"required": true,
11646+
"description": "The slug of the organization",
11647+
"schema": {
11648+
"type": "string"
11649+
}
11650+
},
11651+
{
11652+
"name": "integration_id",
11653+
"in": "path",
11654+
"required": true,
11655+
"description": "The id of the integration",
11656+
"schema": {
11657+
"type": "string"
11658+
}
11659+
}
11660+
],
11661+
"security": [
11662+
{
11663+
"basicAuth": [
11664+
"integration:list"
11665+
]
11666+
}
11667+
],
11668+
"description": "Retrieve events for integration.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- integration:list",
11669+
"responses": {
11670+
"200": {
11671+
"content": {
11672+
"application/json": {
11673+
"schema": {
11674+
"type": "array",
11675+
"items": {
11676+
"type": "object",
11677+
"additionalProperties": false,
11678+
"description": "",
11679+
"properties": {
11680+
"id": {
11681+
"type": "string",
11682+
"description": "",
11683+
"default": ""
11684+
},
11685+
"integration_id": {
11686+
"type": "string",
11687+
"description": "",
11688+
"default": ""
11689+
},
11690+
"type": {
11691+
"type": "string",
11692+
"description": "",
11693+
"default": ""
11694+
},
11695+
"payload": {
11696+
"type": "object",
11697+
"additionalProperties": false,
11698+
"description": "",
11699+
"properties": {}
11700+
},
11701+
"status_code": {
11702+
"type": "integer",
11703+
"description": "",
11704+
"default": 0
11705+
},
11706+
"error": {
11707+
"type": "string",
11708+
"description": "",
11709+
"default": ""
11710+
},
11711+
"sent_at": {
11712+
"type": "string",
11713+
"description": "",
11714+
"default": ""
11715+
},
11716+
"retry_info": {
11717+
"type": "array",
11718+
"items": {
11719+
"type": "object",
11720+
"additionalProperties": false,
11721+
"description": "",
11722+
"properties": {
11723+
"status_code": {
11724+
"type": "integer",
11725+
"description": "",
11726+
"default": 0
11727+
},
11728+
"error": {
11729+
"type": "string",
11730+
"description": "",
11731+
"default": ""
11732+
},
11733+
"sent_at": {
11734+
"type": "string",
11735+
"description": "",
11736+
"default": ""
11737+
}
11738+
},
11739+
"required": [
11740+
"error",
11741+
"sent_at",
11742+
"status_code"
11743+
]
11744+
}
11745+
},
11746+
"created_at": {
11747+
"type": "string",
11748+
"description": "",
11749+
"default": ""
11750+
},
11751+
"updated_at": {
11752+
"type": "string",
11753+
"description": "",
11754+
"default": ""
11755+
}
11756+
},
11757+
"required": [
11758+
"created_at",
11759+
"error",
11760+
"id",
11761+
"integration_id",
11762+
"payload",
11763+
"retry_info",
11764+
"sent_at",
11765+
"status_code",
11766+
"type",
11767+
"updated_at"
11768+
]
11769+
}
11770+
}
11771+
}
11772+
},
11773+
"description": "Lists events for the specified integration. The authenticated user must be a member of the organization."
11774+
},
11775+
"400": {
11776+
"$ref": "#/components/responses/SocketBadRequest"
11777+
},
11778+
"401": {
11779+
"$ref": "#/components/responses/SocketUnauthorized"
11780+
},
11781+
"403": {
11782+
"$ref": "#/components/responses/SocketForbidden"
11783+
},
11784+
"404": {
11785+
"$ref": "#/components/responses/SocketNotFoundResponse"
11786+
},
11787+
"429": {
11788+
"$ref": "#/components/responses/SocketTooManyRequestsResponse"
11789+
}
11790+
},
11791+
"x-readme": {}
11792+
}
11793+
},
1162311794
"/analytics/org/{filter}": {
1162411795
"get": {
1162511796
"tags": [
@@ -12788,6 +12959,26 @@
1278812959
"type": "string",
1278912960
"default": "1"
1279012961
}
12962+
},
12963+
{
12964+
"name": "direction",
12965+
"in": "query",
12966+
"required": false,
12967+
"description": "Order asc or desc by the createdAt attribute.",
12968+
"schema": {
12969+
"type": "string",
12970+
"default": "desc"
12971+
}
12972+
},
12973+
{
12974+
"name": "filter",
12975+
"in": "query",
12976+
"required": false,
12977+
"description": "Filter what type of threats to return",
12978+
"schema": {
12979+
"type": "string",
12980+
"default": "mal"
12981+
}
1279112982
}
1279212983
],
1279312984
"security": [

types/api.d.ts

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,18 @@ export interface paths {
313313
*/
314314
delete: operations["deleteOrgRepo"];
315315
};
316+
"/orgs/{org_slug}/settings/integrations/{integration_id}/events": {
317+
/**
318+
* Get integration events
319+
* @description Retrieve events for integration.
320+
*
321+
* This endpoint consumes 1 unit of your quota.
322+
*
323+
* This endpoint requires the following org token scopes:
324+
* - integration:list
325+
*/
326+
get: operations["getIntegrationEvents"];
327+
};
316328
"/analytics/org/{filter}": {
317329
/**
318330
* Get organization analytics (unstable)
@@ -2620,6 +2632,8 @@ export interface operations {
26202632
per_page?: number;
26212633
/** @description Page token */
26222634
page?: string;
2635+
/** @description A Unix timestamp in seconds to filter results prior to this date. */
2636+
from?: string;
26232637
};
26242638
path: {
26252639
/** @description The slug of the organization */
@@ -4191,6 +4205,64 @@ export interface operations {
41914205
429: components["responses"]["SocketTooManyRequestsResponse"];
41924206
};
41934207
};
4208+
/**
4209+
* Get integration events
4210+
* @description Retrieve events for integration.
4211+
*
4212+
* This endpoint consumes 1 unit of your quota.
4213+
*
4214+
* This endpoint requires the following org token scopes:
4215+
* - integration:list
4216+
*/
4217+
getIntegrationEvents: {
4218+
parameters: {
4219+
path: {
4220+
/** @description The slug of the organization */
4221+
org_slug: string;
4222+
/** @description The id of the integration */
4223+
integration_id: string;
4224+
};
4225+
};
4226+
responses: {
4227+
/** @description Lists events for the specified integration. The authenticated user must be a member of the organization. */
4228+
200: {
4229+
content: {
4230+
"application/json": {
4231+
/** @default */
4232+
id: string;
4233+
/** @default */
4234+
integration_id: string;
4235+
/** @default */
4236+
type: string;
4237+
payload: Record<string, never>;
4238+
/** @default 0 */
4239+
status_code: number;
4240+
/** @default */
4241+
error: string;
4242+
/** @default */
4243+
sent_at: string;
4244+
retry_info: {
4245+
/** @default 0 */
4246+
status_code: number;
4247+
/** @default */
4248+
error: string;
4249+
/** @default */
4250+
sent_at: string;
4251+
}[];
4252+
/** @default */
4253+
created_at: string;
4254+
/** @default */
4255+
updated_at: string;
4256+
}[];
4257+
};
4258+
};
4259+
400: components["responses"]["SocketBadRequest"];
4260+
401: components["responses"]["SocketUnauthorized"];
4261+
403: components["responses"]["SocketForbidden"];
4262+
404: components["responses"]["SocketNotFoundResponse"];
4263+
429: components["responses"]["SocketTooManyRequestsResponse"];
4264+
};
4265+
};
41944266
/**
41954267
* Get organization analytics (unstable)
41964268
* @description Get analytics data regarding the number of alerts found across all active repositories.
@@ -4685,6 +4757,10 @@ export interface operations {
46854757
per_page?: number;
46864758
/** @description Page token */
46874759
page?: string;
4760+
/** @description Order asc or desc by the createdAt attribute. */
4761+
direction?: string;
4762+
/** @description Filter what type of threats to return */
4763+
filter?: string;
46884764
};
46894765
};
46904766
responses: {

0 commit comments

Comments
 (0)