Skip to content

Commit 73b0621

Browse files
fix(openapi): sync with openapi definition (#218)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 80e13cd commit 73b0621

File tree

2 files changed

+219
-1
lines changed

2 files changed

+219
-1
lines changed

openapi.json

Lines changed: 148 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1152,6 +1152,16 @@
11521152
"type": "object",
11531153
"description": "",
11541154
"default": null
1155+
},
1156+
"action": {
1157+
"type": "string",
1158+
"description": "",
1159+
"default": ""
1160+
},
1161+
"actionPolicyIndex": {
1162+
"type": "integer",
1163+
"description": "",
1164+
"default": 0
11551165
}
11561166
},
11571167
"required": [
@@ -5178,10 +5188,16 @@
51785188
"type": "number",
51795189
"description": "",
51805190
"default": 0
5191+
},
5192+
"repository": {
5193+
"type": "string",
5194+
"description": "",
5195+
"default": ""
51815196
}
51825197
},
51835198
"required": [
5184-
"percentageSuspiciousStars"
5199+
"percentageSuspiciousStars",
5200+
"repository"
51855201
]
51865202
},
51875203
"usage": {
@@ -10483,6 +10499,137 @@
1048310499
"x-readme": {}
1048410500
}
1048510501
},
10502+
"/threat-feed": {
10503+
"get": {
10504+
"tags": [
10505+
"Threat Feed"
10506+
],
10507+
"summary": "Get Threat Feed Items (Beta)",
10508+
"operationId": "getThreatFeedItems",
10509+
"parameters": [
10510+
{
10511+
"name": "per_page",
10512+
"in": "query",
10513+
"required": false,
10514+
"description": "Number of items per page",
10515+
"schema": {
10516+
"type": "integer",
10517+
"minimum": 1,
10518+
"maximum": 100,
10519+
"default": 30
10520+
}
10521+
},
10522+
{
10523+
"name": "page",
10524+
"in": "query",
10525+
"required": false,
10526+
"description": "Page token",
10527+
"schema": {
10528+
"type": "string",
10529+
"default": "1"
10530+
}
10531+
}
10532+
],
10533+
"security": [
10534+
{
10535+
"basicAuth": [
10536+
"threat-feed:list"
10537+
]
10538+
}
10539+
],
10540+
"description": "Paginated list of threat feed items.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- threat-feed:list",
10541+
"responses": {
10542+
"200": {
10543+
"content": {
10544+
"application/json": {
10545+
"schema": {
10546+
"type": "object",
10547+
"additionalProperties": false,
10548+
"description": "",
10549+
"properties": {
10550+
"results": {
10551+
"type": "array",
10552+
"items": {
10553+
"type": "object",
10554+
"additionalProperties": false,
10555+
"properties": {
10556+
"createdAt": {
10557+
"type": "string",
10558+
"description": "",
10559+
"default": ""
10560+
},
10561+
"description": {
10562+
"type": "string",
10563+
"description": "",
10564+
"default": ""
10565+
},
10566+
"id": {
10567+
"type": "integer",
10568+
"description": "",
10569+
"default": 0
10570+
},
10571+
"locationHtmlUrl": {
10572+
"type": "string",
10573+
"description": "",
10574+
"default": ""
10575+
},
10576+
"packageHtmlUrl": {
10577+
"type": "string",
10578+
"description": "",
10579+
"default": ""
10580+
},
10581+
"purl": {
10582+
"type": "string",
10583+
"description": "",
10584+
"default": ""
10585+
},
10586+
"removedAt": {
10587+
"type": "string",
10588+
"description": "",
10589+
"default": ""
10590+
},
10591+
"threatType": {
10592+
"type": "string",
10593+
"description": "",
10594+
"default": ""
10595+
}
10596+
}
10597+
}
10598+
},
10599+
"nextPage": {
10600+
"type": "string",
10601+
"description": "",
10602+
"default": ""
10603+
}
10604+
},
10605+
"required": [
10606+
"nextPage",
10607+
"results"
10608+
]
10609+
}
10610+
}
10611+
},
10612+
"description": "The paginated list of items in the threat feed and the next page querystring token."
10613+
},
10614+
"400": {
10615+
"$ref": "#/components/responses/SocketBadRequest"
10616+
},
10617+
"401": {
10618+
"$ref": "#/components/responses/SocketUnauthorized"
10619+
},
10620+
"403": {
10621+
"$ref": "#/components/responses/SocketForbidden"
10622+
},
10623+
"404": {
10624+
"$ref": "#/components/responses/SocketNotFoundResponse"
10625+
},
10626+
"429": {
10627+
"$ref": "#/components/responses/SocketTooManyRequestsResponse"
10628+
}
10629+
},
10630+
"x-readme": {}
10631+
}
10632+
},
1048610633
"/openapi": {
1048710634
"get": {
1048810635
"tags": [

types/api.d.ts

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,18 @@ export interface paths {
436436
*/
437437
get: operations["getRepoList"];
438438
};
439+
"/threat-feed": {
440+
/**
441+
* Get Threat Feed Items (Beta)
442+
* @description Paginated list of threat feed items.
443+
*
444+
* This endpoint consumes 1 unit of your quota.
445+
*
446+
* This endpoint requires the following org token scopes:
447+
* - threat-feed:list
448+
*/
449+
get: operations["getThreatFeedItems"];
450+
};
439451
"/openapi": {
440452
/**
441453
* Returns the OpenAPI definition
@@ -788,6 +800,10 @@ export interface components {
788800
end?: number;
789801
/** @default null */
790802
props?: Record<string, never>;
803+
/** @default */
804+
action?: string;
805+
/** @default 0 */
806+
actionPolicyIndex?: number;
791807
};
792808
SocketBatchPURLRequest: {
793809
/** @default */
@@ -1740,6 +1756,8 @@ export interface components {
17401756
props: {
17411757
/** @default 0 */
17421758
percentageSuspiciousStars: number;
1759+
/** @default */
1760+
repository: string;
17431761
};
17441762
usage?: components["schemas"]["SocketUsageRef"];
17451763
};
@@ -3944,6 +3962,59 @@ export interface operations {
39443962
429: components["responses"]["SocketTooManyRequestsResponse"];
39453963
};
39463964
};
3965+
/**
3966+
* Get Threat Feed Items (Beta)
3967+
* @description Paginated list of threat feed items.
3968+
*
3969+
* This endpoint consumes 1 unit of your quota.
3970+
*
3971+
* This endpoint requires the following org token scopes:
3972+
* - threat-feed:list
3973+
*/
3974+
getThreatFeedItems: {
3975+
parameters: {
3976+
query?: {
3977+
/** @description Number of items per page */
3978+
per_page?: number;
3979+
/** @description Page token */
3980+
page?: string;
3981+
};
3982+
};
3983+
responses: {
3984+
/** @description The paginated list of items in the threat feed and the next page querystring token. */
3985+
200: {
3986+
content: {
3987+
"application/json": {
3988+
results: {
3989+
/** @default */
3990+
createdAt?: string;
3991+
/** @default */
3992+
description?: string;
3993+
/** @default 0 */
3994+
id?: number;
3995+
/** @default */
3996+
locationHtmlUrl?: string;
3997+
/** @default */
3998+
packageHtmlUrl?: string;
3999+
/** @default */
4000+
purl?: string;
4001+
/** @default */
4002+
removedAt?: string;
4003+
/** @default */
4004+
threatType?: string;
4005+
}[];
4006+
/** @default */
4007+
nextPage: string;
4008+
};
4009+
};
4010+
};
4011+
400: components["responses"]["SocketBadRequest"];
4012+
401: components["responses"]["SocketUnauthorized"];
4013+
403: components["responses"]["SocketForbidden"];
4014+
404: components["responses"]["SocketNotFoundResponse"];
4015+
429: components["responses"]["SocketTooManyRequestsResponse"];
4016+
};
4017+
};
39474018
/**
39484019
* Returns the OpenAPI definition
39494020
* @description Retrieve the API specification in an Openapi JSON format.

0 commit comments

Comments
 (0)