forked from himanshu-skid19/Inter-IIT-12-Devrev-AI-Agent-007
-
Notifications
You must be signed in to change notification settings - Fork 0
/
all_apis.py
383 lines (380 loc) · 14.9 KB
/
all_apis.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
API_LIST = [
{
"name": "works_list",
"description": "Returns a list of work items matching the request.",
"arguments": [
{
"argument_name": "applies_to_part",
"argument_description": "Filters for work belonging to any of the provided parts",
"argument_type": "array of strings"
},
{
"argument_name": "created_by",
"argument_description": "Filters for work created by any of these users",
"argument_type": "array of strings"
},
{
"argument_name": "issue.priority",
"argument_description": "Filters for issues with any of the provided priorities. Allowed values: p0, p1, p2, p3",
"argument_type": "array of strings"
},
{
"argument_name": "issue.rev_orgs",
"argument_description": "Filters for issues with any of the provided Rev organizations",
"argument_type": "array of strings"
},
{
"argument_name": "limit",
"argument_description": "The maximum number of works to return. The default is '50'",
"argument_type": "integer (int32)"
},
{
"argument_name": "owned_by",
"argument_description": "Filters for work owned by any of these users",
"argument_type": "array of strings"
},
{
"argument_name": "stage.name",
"argument_description": "Filters for records in the provided stage(s) by name",
"argument_type": "array of strings"
},
{
"argument_name": "ticket.needs_response",
"argument_description": "Filters for tickets that need a response",
"argument_type": "boolean"
},
{
"argument_name": "ticket.rev_org",
"argument_description": "Filters for tickets associated with any of the provided Rev organizations",
"argument_type": "array of strings"
},
{
"argument_name": "ticket.severity",
"argument_description": "Filters for tickets with any of the provided severities. Allowed values: blocker, high, low, medium",
"argument_type": "array of strings"
},
{
"argument_name": "ticket.source_channel",
"argument_description": "Filters for tickets with any of the provided source channels",
"argument_type": "array of strings"
},
{
"argument_name": "type",
"argument_description": "Filters for work of the provided types. Allowed values: issue, ticket, task",
"argument_type": "array of strings"
},
{
"argument_name": "date_of_creation",
"argument_description": "Filters for the date of creation of the work item. Allowed format: yyyy-MM-dd HH:mm:ss"
},
{
"argument_name": "last_modified",
"argument_description": "Filters for work items last modified since a specified date. Allowed format: yyyy-MM-dd HH:mm:ss"
},
{
"argument_name": "target_close_date",
"argument_description": "Filter for the timestamp for when the work is expected to be complete. Allowed format: yyyy-MM-dd HH:mm:ss"
}
]
},
{
"name": "summarize_objects",
"description": "Summarizes a list of objects. The logic of how to summarize a particular object type is an internal implementation detail.",
"arguments": [
{
"argument_name": "objects",
"argument_description": "List of objects to summarize",
"argument_type": "array of objects"
}
]
},
{
"name": "prioritize_objects",
"description": "Returns a list of objects sorted by priority. The logic of what constitutes priority for a given object is an internal implementation detail.",
"arguments": [
{
"argument_name": "objects",
"argument_description": "A list of objects to be prioritized",
"argument_type": "array of objects"
}
]
},
{
"name": "add_work_items_to_sprint",
"description": "Adds the given work items to the sprint",
"arguments": [
{
"argument_name": "work_ids",
"argument_description": "A list of work item IDs to be added to the sprint.",
"argument_type": "array of strings"
},
{
"argument_name": "sprint_id",
"argument_description": "The ID of the sprint to which the work items should be added",
"argument_type": "string"
}
]
},
{
"name": "get_sprint_id",
"description": "Returns the ID of the current sprint",
"arguments": []
},
{
"name": "get_similar_work_items",
"description": "Returns a list of work items that are similar to the given work item",
"arguments": [
{
"argument_name": "work_id",
"argument_description": "The ID of the work item for which you want to find similar items",
"argument_type": "string"
}
]
},
{
"name": "search_object_by_name",
"description": "Given a search string, returns the id of a matching object in the system of record. If multiple matches are found, it returns the one where the confidence is highest.",
"arguments": [
{
"argument_name": "query",
"argument_description": "The search string, could be for example customer's name, part name, username.",
"argument_type": "string"
}
]
},
{
"name": "create_actionable_tasks_from_text",
"description": "Given a text, extracts actionable insights, and creates tasks for them, which are kind of a work item.",
"arguments": [
{
"argument_name": "text",
"argument_description": "The text from which the actionable insights need to be created.",
"argument_type": "string"
}
]
},
{
"name": "who_am_i",
"description": "Returns the ID of the current user",
"arguments": []
},
{
"name": "is_empty",
"description": "Checks if a given list is empty and returns one of two lists based on the result.",
"arguments": [
{
"argument_name": "list_to_check",
"argument_description": "The list to be checked for emptiness.",
"argument_type": "array"
},
{
"argument_name": "options",
"argument_description": "Two lists of objects. Returns the first one if the list_to_check is empty, otherwise returns the second one.",
"argument_type": "array of arrays"
}
]
},
{
"name": "count",
"description": "Returns the number of work items in the output of an API call.",
"arguments": [
{
"argument_name": "objects",
"argument_description": "A list of objects to be counted.",
"argument_type": "array of objects"
}
]
},
{
"name": "works-create",
"description": "Creates work items based on the provided parameters.",
"arguments": [
{
"argument_name": "applies_to_part",
"argument_description": "The part that the work applies to. Specifying a part is required when creating tickets and issues. Note: REQUIRED",
"argument_type": "array of strings"
},
{
"argument_name": "created_by",
"argument_description": "The users that reported the work",
"argument_type": "array of strings"
},
{
"argument_name": "issue.priority",
"argument_description": "The Priority of the work based upon impact and criticality. Allowed values: p0, p1, p2, p3",
"argument_type": "string"
},
{
"argument_name": "developed_with",
"argument_description": "The IDs of the parts associated with work item",
"argument_type": "array of strings"
},
{
"argument_name": "owned_by",
"argument_description": "The users that own the work. Note: REQUIRED",
"argument_type": "array of strings"
},
{
"argument_name": "stage.name",
"argument_description": "Sets an objects initial stage",
"argument_type": "string"
},
{
"argument_name": "sprint",
"argument_description": "The sprint that the issue belongs to",
"argument_type": "string"
},
{
"argument_name": "type",
"argument_description": "Type of the work item. Allowed values: issue, ticket, task. Note: REQUIRED",
"argument_type": "string"
},
{
"argument_name": "target_close_date",
"argument_description": "Timestamp for when the work is expected to be complete. Allowed format: yyyy-MM-dd HH:mm:ss",
"argument_type": "date"
},
{
"argument_name": "title",
"argument_description": "Title of the work object; Note: REQUIRED. Allowed values: issue, ticket",
"argument_type": "string"
}
]
},
{
"name": "works-delete",
"description": "Deletes a work item.",
"arguments": [
{
"argument_name": "id",
"argument_description": "The work's ID",
"argument_type": "array of objects"
}
]
},
{
"name": "works-update",
"description": "Updates a work item's information",
"arguments": [
{
"argument_name": "id",
"argument_description": "id of the work item to be updated. REQUIRED.",
"argument_type": "array of strings"
},
{
"argument_name": "applies_to_part",
"argument_description": "Updates the part(s) that the work item applies to.",
"argument_type": "array of strings"
},
{
"argument_name": "created_by",
"argument_description": "Sets the users that reported the work to the provided user IDs",
"argument_type": "array of strings"
},
{
"argument_name": "owned_by",
"argument_description": "Sets the owner IDs to the provided user IDs. This must not be empty",
"argument_type": "array of strings"
},
{
"argument_name": "stage.name",
"argument_description": "The updated name of the stage, otherwise unchanged if not set",
"argument_type": "string"
},
{
"argument_name": "type",
"argument_description": "Updates the type of the work item. Allowed values: issue, ticket, task",
"argument_type": "string"
},
{
"argument_name": "target_close_date",
"argument_description": "Updates the timestamp for when the work is expected to complete",
"argument_type": "date"
},
{
"argument_name": "title",
"argument_description": "Updated title of the work object, or unchanged if not provided",
"argument_type": "string"
},
{
"argument_name": "priority",
"argument_description": "Updates the priority of the work item. Allowed values: p0, p1, p2, p3",
"argument_type": "string"
}
]
},
{
"name": "rev-orgs-create",
"description": "Creates a Rev organization based on provided parameters.",
"arguments": [
{
"argument_name": "description",
"argument_description": "Description of the Rev organization",
"argument_type": "string "
},
{
"argument_name": "display_name",
"argument_description": "Name of the Rev organization",
"argument_type": "string"
},
{
"argument_name": "environment",
"argument_description": "The environment of the Org. Defaults to 'production' if not specified.",
"argument_type": "string"
}
]
},
{
"name": "rev-orgs-delete",
"description": "Deletes a Rev organization.",
"arguments": [
{
"argument_name": "id",
"argument_description": "Id of the Rev organization to be deleted",
"argument_type": "string "
}
]
},
{
"name": "rev-orgs-update",
"description": "Creates a Rev organization based on provided parameters.",
"arguments": [
{
"argument_name": "description",
"argument_description": "Description of the Rev organization",
"argument_type": "string "
},
{
"argument_name": "display_name",
"argument_description": "Name of the Rev organization",
"argument_type": "string"
},
{
"argument_name": "environment",
"argument_description": "The environment of the Org. Defaults to 'production' if not specified.",
"argument_type": "string"
},
{
"argument_name": "id",
"argument_description": "The ID of Rev organization to update.",
"argument_type": "string"
}
]
},
{
"name": "get_works_id",
"description": "Get's the work id of the input objects",
"arguments": [
{
"argument_name": "objects",
"argument_description": "List of objects to get ID of",
"argument_type": "array of objects"
}
]
},
{
"name": "get_current_date",
"description": "Get's the current date",
"arguments": []
}
]