Skip to content

Commit 767133f

Browse files
authored
Threads (Independent Publisher) (#2598)
* Add files via upload * Add files via upload * Add files via upload * Add files via upload
1 parent 9d82418 commit 767133f

File tree

3 files changed

+412
-0
lines changed

3 files changed

+412
-0
lines changed
Lines changed: 362 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,362 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"title": "Threads",
5+
"description": "Threads is a Slack replacement designed for makers. Threads provide a simple, focused canvas for sharing your work and getting rich feedback in return.",
6+
"version": "1.0",
7+
"contact": {
8+
"name": "Troy Taylor",
9+
"url": "https://www.hitachisolutions.com",
10+
"email": "ttaylor@hitachisolutions.com"
11+
}
12+
},
13+
"host": "threads.com",
14+
"basePath": "/api/public/",
15+
"schemes": [
16+
"https"
17+
],
18+
"consumes": [
19+
"multipart/form-data",
20+
"application/json"
21+
],
22+
"produces": [
23+
"application/json"
24+
],
25+
"paths": {
26+
"/postThread": {
27+
"post": {
28+
"responses": {
29+
"200": {
30+
"description": "default",
31+
"schema": {
32+
"type": "object",
33+
"properties": {
34+
"ok": {
35+
"type": "boolean",
36+
"description": "Whether okay.",
37+
"title": "OK"
38+
},
39+
"result": {
40+
"type": "object",
41+
"properties": {
42+
"threadID": {
43+
"type": "string",
44+
"description": "The thread identifier.",
45+
"title": "Thread ID"
46+
},
47+
"threadURL": {
48+
"type": "string",
49+
"description": "The thread URL address.",
50+
"title": "Thread URL"
51+
}
52+
},
53+
"title": "Result"
54+
}
55+
}
56+
}
57+
}
58+
},
59+
"summary": "Post thread",
60+
"description": "Post a thread to a channel.",
61+
"operationId": "ThreadPost",
62+
"parameters": [
63+
{
64+
"name": "body",
65+
"in": "body",
66+
"required": false,
67+
"schema": {
68+
"type": "object",
69+
"properties": {
70+
"channel": {
71+
"type": "string",
72+
"description": "The channel.",
73+
"title": "Channel"
74+
},
75+
"channelID": {
76+
"type": "string",
77+
"description": "The channel identifier.",
78+
"title": "Channel ID"
79+
},
80+
"blocks": {
81+
"type": "array",
82+
"items": {
83+
"type": "string"
84+
},
85+
"description": "The blocks.",
86+
"title": "Blocks"
87+
}
88+
}
89+
}
90+
}
91+
],
92+
"x-ms-visibility": "important"
93+
}
94+
},
95+
"/deleteThread": {
96+
"post": {
97+
"responses": {
98+
"200": {
99+
"description": "default",
100+
"schema": {
101+
"type": "object",
102+
"properties": {
103+
"ok": {
104+
"type": "boolean",
105+
"description": "Whether okay.",
106+
"title": "OK"
107+
}
108+
}
109+
}
110+
}
111+
},
112+
"summary": "Delete thread",
113+
"description": "Delete a thread from a channel that was posted by this bot.",
114+
"operationId": "ThreadDelete",
115+
"parameters": [
116+
{
117+
"name": "body",
118+
"in": "body",
119+
"required": false,
120+
"schema": {
121+
"type": "object",
122+
"properties": {
123+
"threadID": {
124+
"type": "string",
125+
"description": "The thread identifier.",
126+
"title": "Thread ID"
127+
}
128+
},
129+
"required": [
130+
"threadID"
131+
]
132+
}
133+
}
134+
]
135+
}
136+
},
137+
"/channels": {
138+
"post": {
139+
"responses": {
140+
"200": {
141+
"description": "default",
142+
"schema": {
143+
"type": "object",
144+
"properties": {
145+
"ok": {
146+
"type": "boolean",
147+
"description": "Whether okay.",
148+
"title": "OK"
149+
},
150+
"result": {
151+
"type": "array",
152+
"items": {
153+
"type": "object",
154+
"properties": {
155+
"channelID": {
156+
"type": "string",
157+
"description": "The channel identifier.",
158+
"title": "Channel ID"
159+
},
160+
"name": {
161+
"type": "string",
162+
"description": "The name.",
163+
"title": "Name"
164+
}
165+
}
166+
},
167+
"title": "Result"
168+
}
169+
}
170+
}
171+
}
172+
},
173+
"summary": "List channels",
174+
"description": "Retrieve a list of all channels visible to your bot.",
175+
"operationId": "ChannelsPost",
176+
"parameters": [],
177+
"x-ms-visibility": "advanced"
178+
}
179+
},
180+
"/postChatMessage": {
181+
"post": {
182+
"responses": {
183+
"200": {
184+
"description": "default",
185+
"schema": {
186+
"type": "object",
187+
"properties": {
188+
"ok": {
189+
"type": "boolean",
190+
"description": "Whether okay.",
191+
"title": "OK"
192+
},
193+
"result": {
194+
"type": "object",
195+
"properties": {
196+
"chatMessageID": {
197+
"type": "string",
198+
"description": "The chat message identifier.",
199+
"title": "Chat Message ID"
200+
},
201+
"chatMessageURL": {
202+
"type": "string",
203+
"description": "The chat message URL address.",
204+
"title": "Chat Message URL"
205+
}
206+
},
207+
"title": "Result"
208+
}
209+
}
210+
}
211+
}
212+
},
213+
"summary": "Post chat message",
214+
"description": "Post a message to a chat.",
215+
"operationId": "ChatPost",
216+
"parameters": [
217+
{
218+
"name": "body",
219+
"in": "body",
220+
"required": false,
221+
"schema": {
222+
"type": "object",
223+
"properties": {
224+
"chat": {
225+
"type": "string",
226+
"description": "The chat.",
227+
"title": "Chat"
228+
},
229+
"chatID": {
230+
"type": "string",
231+
"description": "The chat identifier.",
232+
"title": "Chat ID"
233+
},
234+
"body": {
235+
"type": "string",
236+
"description": "The body.",
237+
"title": "Body"
238+
}
239+
}
240+
}
241+
}
242+
],
243+
"x-ms-visibility": "important"
244+
}
245+
},
246+
"/deleteChatMessage": {
247+
"post": {
248+
"responses": {
249+
"200": {
250+
"description": "default",
251+
"schema": {
252+
"type": "object",
253+
"properties": {
254+
"ok": {
255+
"type": "boolean",
256+
"description": "Whether okay.",
257+
"title": "OK"
258+
}
259+
}
260+
}
261+
}
262+
},
263+
"summary": "Delete chat message",
264+
"description": "Deletes a message from a chat.",
265+
"operationId": "ChatDelete",
266+
"parameters": [
267+
{
268+
"name": "body",
269+
"in": "body",
270+
"required": false,
271+
"schema": {
272+
"type": "object",
273+
"properties": {
274+
"messageID": {
275+
"type": "string",
276+
"description": "The message identifier.",
277+
"title": "Message ID"
278+
}
279+
}
280+
}
281+
}
282+
]
283+
}
284+
},
285+
"/uploadFile": {
286+
"post": {
287+
"responses": {
288+
"200": {
289+
"description": "default",
290+
"schema": {
291+
"type": "object",
292+
"properties": {
293+
"ok": {
294+
"type": "boolean",
295+
"description": "Whether okay.",
296+
"title": "OK"
297+
},
298+
"result": {
299+
"type": "object",
300+
"properties": {
301+
"fileID": {
302+
"type": "string",
303+
"description": "The file identifier.",
304+
"title": "File ID"
305+
}
306+
},
307+
"title": "Result"
308+
}
309+
}
310+
}
311+
}
312+
},
313+
"summary": "Upload file",
314+
"description": "Uploads a file which can be used in a subsequent post thread or post chat message requests.",
315+
"operationId": "FilePost",
316+
"consumes": [
317+
"multipart/form-data"
318+
],
319+
"parameters": [
320+
{
321+
"name": "data",
322+
"in": "formData",
323+
"description": "The file content.",
324+
"x-ms-summary": "File Content",
325+
"required": false,
326+
"type": "file"
327+
}
328+
]
329+
}
330+
}
331+
},
332+
"definitions": {},
333+
"parameters": {},
334+
"responses": {},
335+
"securityDefinitions": {
336+
"API Key": {
337+
"type": "apiKey",
338+
"in": "header",
339+
"name": "Authorization"
340+
}
341+
},
342+
"security": [
343+
{
344+
"API Key": []
345+
}
346+
],
347+
"tags": [],
348+
"x-ms-connector-metadata": [
349+
{
350+
"propertyName": "Website",
351+
"propertyValue": "https://threads.com/"
352+
},
353+
{
354+
"propertyName": "Privacy policy",
355+
"propertyValue": "https://terms.threads.com/privacy-policy"
356+
},
357+
{
358+
"propertyName": "Categories",
359+
"propertyValue": "Communication;Collaboration"
360+
}
361+
]
362+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"properties": {
3+
"connectionParameters": {
4+
"api_key": {
5+
"type": "securestring",
6+
"uiDefinition": {
7+
"displayName": "API Key (in the form \"Bearer yourAPIKey\")",
8+
"description": "The API Key (in the form \"Bearer yourAPIKey\") for this api",
9+
"tooltip": "Provide your API Key (in the form \"Bearer yourAPIKey\")",
10+
"constraints": {
11+
"tabIndex": 2,
12+
"clearText": false,
13+
"required": "true"
14+
}
15+
}
16+
}
17+
},
18+
"iconBrandColor": "#da3b01",
19+
"capabilities": [],
20+
"publisher": "Troy Taylor",
21+
"stackOwner": "Threads, Inc."
22+
}
23+
}

0 commit comments

Comments
 (0)