Skip to content

Commit 4a03c01

Browse files
Merge branch 'microsoft:dev' into dev
2 parents 1aba17f + be4aef6 commit 4a03c01

File tree

24 files changed

+9879
-511
lines changed

24 files changed

+9879
-511
lines changed

certified-connectors/Exact Online Premium/apiDefinition.swagger.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,7 @@
519519
}
520520
},
521521
"summary": "Get values",
522+
"consumes": [ "text/plain", "application/json" ],
522523
"description": "This loads the values from the trigger's Payload field in a format of choice.",
523524
"operationId": "GetValues",
524525
"parameters": [

certified-connectors/Exact Online Premium/apiProperties.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
"iconBrandColor": "#ff0000",
3030
"scriptOperations": [],
3131
"capabilities": [],
32+
"policyTemplateInstances": [],
3233
"publisher": "Exact Cloud Development Benelux",
33-
"stackOwner": "Exact Cloud Development Benelux",
34-
"policyTemplateInstances": []
34+
"stackOwner": "Exact Cloud Development Benelux"
3535
}
3636
}

certified-connectors/Exact Online Premium/script.csx

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Newtonsoft.Json;
1+
using Newtonsoft.Json;
22
using Newtonsoft.Json.Linq;
33
using System.Net;
44
using System.Net.Http.Headers;
@@ -65,9 +65,17 @@ public class Script : ScriptBase
6565
if (string.IsNullOrWhiteSpace(jsonText))
6666
return ErrorMessage("Empty payload");
6767

68-
var obj = jsonText.AsJObject();
68+
var token = JToken.Parse(jsonText);
69+
if (token == null)
70+
return ErrorMessage("Unable to read payload");
71+
if (token.Type == JTokenType.String)
72+
token = JToken.Parse(token.Value<string>());
73+
if (token.Type != JTokenType.Object)
74+
return ErrorMessage("Payload is not a valid json object");
75+
76+
var obj = token as JObject;
6977
if (obj == null)
70-
return ErrorMessage("Unable to parse payload");
78+
return ErrorMessage("Unable to read json from payload");
7179

7280
if (string.IsNullOrWhiteSpace(key))
7381
{
@@ -93,7 +101,7 @@ public class Script : ScriptBase
93101
};
94102

95103
if (string.IsNullOrWhiteSpace(emptyJson))
96-
return ErrorMessage("Invalid value type", key);
104+
return ErrorMessage($"Invalid value type: {key}");
97105

98106
var changes = obj.Property("Changes");
99107
if (changes == null || changes.Value.Type != JTokenType.Array || changes.Value is not JArray)
@@ -281,7 +289,7 @@ public class Script : ScriptBase
281289
private static HttpResponseMessage CreateJsonResponse(JToken? token, HttpStatusCode statusCode = HttpStatusCode.OK)
282290
=> CreateJsonResponse(token.GetString(), statusCode);
283291

284-
private static HttpResponseMessage ErrorMessage(string errorMessage, HttpStatusCode statusCode = HttpStatusCode.OK) => CreateJsonResponse($"{{\"error\":\"{errorMessage}\"}}", statusCode);
292+
private static HttpResponseMessage ErrorMessage(string errorMessage, HttpStatusCode statusCode = HttpStatusCode.BadRequest) => CreateJsonResponse($"{{\"error\":\"{errorMessage}\"}}", statusCode);
285293

286294
private static HttpResponseMessage ErrorMessage(string errorMessage, string incomingMessage) => CreateJsonResponse($"{{\"error\":\"{errorMessage}\",\"message\":\"{incomingMessage}\"}}", HttpStatusCode.OK);
287295

@@ -503,7 +511,7 @@ public static class SchemaHelper
503511
"sPurchaseVATCodeDescription","iQuotationMarkupType","bRecepientOfCommissions","sRemarks","iReminderFlowCategory","gReseller","sResellerCode","sResellerName",
504512
"sSalesCurrency","sSalesCurrencyDescription","sSalesVATCode","sSalesVATCodeDescription","gSBICode","sSbiCodeDescription","gSbiCodeSector","gSbiCodeSubSector",
505513
"sSearchCode","iSecurityLevel","iSendPurchaseOrderMethod","sSepaDDCreditorIdentifier","bSeparateInvPerProject","bSeparateInvPerSubscription","iShippingLeadDays",
506-
"gShippingMethod","sShippingMethodCode","sShippingMethodDescription","iSource","dStartDate","sState","sStateDisplayValue","sStateName","sStatus","dStatusSince",/
514+
"gShippingMethod","sShippingMethodCode","sShippingMethodDescription","iSource","dStartDate","sState","sStateDisplayValue","sStateName","sStatus","dStatusSince",
507515
"sTaxReferenceNumber","sTradeName","sType","bUseTimeSpecification","sVATLiability","sVATNumber","sVatSystem","sWebsite","sWithholdingTaxDescription","sWithholdingTaxKey"
508516
};
509517

certified-connectors/RecordedFutureIdentity/apiDefinition.swagger.json

Lines changed: 1702 additions & 405 deletions
Large diffs are not rendered by default.
Lines changed: 251 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,251 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"title": "AI or Not",
5+
"contact": {
6+
"name": "Fördős András",
7+
"email": "fordosa90+ipc_aion@gmail.com"
8+
},
9+
"description": "Detect AI-generated images & audio for your business - and yourself - with AI or Not.",
10+
"version": "1.0"
11+
},
12+
"host": "api.aiornot.com",
13+
"basePath": "/",
14+
"schemes": [
15+
"https"
16+
],
17+
"consumes": [],
18+
"produces": [
19+
"application/json"
20+
],
21+
"paths": {
22+
"/v1/system/live": {
23+
"get": {
24+
"responses": {
25+
"200": {
26+
"description": "OK",
27+
"schema": {
28+
"type": "object",
29+
"properties": {
30+
"is_live": {
31+
"type": "boolean",
32+
"description": "True or false indicating, whether the system is alive.",
33+
"title": "Is Live"
34+
}
35+
}
36+
}
37+
}
38+
},
39+
"summary": "Is Live",
40+
"description": "Check if system is alive and ready to serve requests.",
41+
"operationId": "IsLive",
42+
"parameters": []
43+
}
44+
},
45+
"/v1/reports/image": {
46+
"post": {
47+
"responses": {
48+
"200": {
49+
"description": "OK",
50+
"schema": {
51+
"type": "object",
52+
"properties": {
53+
"id": {
54+
"type": "string",
55+
"description": "id"
56+
},
57+
"created_at": {
58+
"type": "string",
59+
"description": "The date and time when the report was created.",
60+
"title": "Created at"
61+
},
62+
"report": {
63+
"type": "object",
64+
"properties": {
65+
"verdict": {
66+
"type": "string",
67+
"description": "The verdict of the report. The verdict can be 'ai' or 'human'.",
68+
"title": "Verdict"
69+
},
70+
"ai": {
71+
"type": "object",
72+
"properties": {
73+
"confidence": {
74+
"type": "number",
75+
"format": "double",
76+
"description": "The confidence of the AI analysis.",
77+
"title": "Confidence"
78+
},
79+
"is_detected": {
80+
"type": "boolean",
81+
"description": "The detection status of the AI analysis.",
82+
"title": "Is detected"
83+
}
84+
},
85+
"description": "The results of the AI analysis. The results contain the confidence and the detection status.",
86+
"title": "AI"
87+
},
88+
"human": {
89+
"type": "object",
90+
"properties": {
91+
"confidence": {
92+
"type": "number",
93+
"format": "double",
94+
"description": "The confidence of the human analysis.",
95+
"title": "Confidence"
96+
},
97+
"is_detected": {
98+
"type": "boolean",
99+
"description": "The detection status of the human analysis.",
100+
"title": "Is detected"
101+
}
102+
},
103+
"description": "The results of the human analysis. The results contain the confidence and the detection status.",
104+
"title": "Human"
105+
},
106+
"generator": {
107+
"type": "object",
108+
"properties": {
109+
"midjourney": {
110+
"$ref": "#/definitions/AiGenerator"
111+
},
112+
"dall_e": {
113+
"$ref": "#/definitions/AiGenerator"
114+
},
115+
"stable_diffusion": {
116+
"$ref": "#/definitions/AiGenerator"
117+
},
118+
"this_person_does_not_exist": {
119+
"$ref": "#/definitions/AiGenerator"
120+
}
121+
},
122+
"description": "The results of the AI generators. The results contain the confidence and the detection status.",
123+
"title": "Generator"
124+
}
125+
},
126+
"description": "The report itself. The report contains the verdict, the results of the AI and human analysis, and the results of the AI generators.",
127+
"title": "Report"
128+
},
129+
"facets": {
130+
"type": "object",
131+
"properties": {
132+
"quality": {
133+
"type": "object",
134+
"properties": {
135+
"version": {
136+
"type": "string",
137+
"description": "Version of the detection module.",
138+
"title": "Version"
139+
},
140+
"is_detected": {
141+
"type": "boolean",
142+
"description": "The detection status of the image quality check.",
143+
"title": "Is detected"
144+
}
145+
},
146+
"description": "The results of the image quality check. The results contain the detection status.",
147+
"title": "Quality"
148+
},
149+
"nsfw": {
150+
"type": "object",
151+
"properties": {
152+
"version": {
153+
"type": "string",
154+
"description": "Version of the detection module.",
155+
"title": "Version"
156+
},
157+
"is_detected": {
158+
"type": "boolean",
159+
"description": "The detection status of the NSFW analysis.",
160+
"title": "Is detected"
161+
}
162+
},
163+
"description": "The results of the NSFW analysis. The results contain the detection status.",
164+
"title": "NSFW"
165+
}
166+
},
167+
"description": "The results of the image quality check and NSFW.",
168+
"title": "Facets"
169+
}
170+
}
171+
}
172+
}
173+
},
174+
"consumes": [
175+
"application/json"
176+
],
177+
"summary": "Image reports",
178+
"description": "The response model containing the result of the image report processing, which includes the results of the image quality check, NSFW, and the image analysis itself.",
179+
"operationId": "ImageReport",
180+
"parameters": [
181+
{
182+
"name": "body",
183+
"in": "body",
184+
"required": true,
185+
"schema": {
186+
"type": "object",
187+
"properties": {
188+
"object": {
189+
"type": "string",
190+
"description": "The image URL that needs to be verified.",
191+
"title": "Object"
192+
}
193+
},
194+
"required": [
195+
"object"
196+
]
197+
}
198+
}
199+
]
200+
}
201+
}
202+
},
203+
"responses": {},
204+
"parameters": {},
205+
"definitions": {
206+
"AiGenerator": {
207+
"type": "object",
208+
"description": "The results of the generator. The results contain the confidence and the detection status.",
209+
"properties": {
210+
"confidence": {
211+
"type": "number",
212+
"format": "double",
213+
"description": "The confidence of the analysis.",
214+
"title": "Confidence"
215+
},
216+
"is_detected": {
217+
"type": "boolean",
218+
"description": "The detection status of the analysis.",
219+
"title": "Is detected"
220+
}
221+
}
222+
}
223+
},
224+
"securityDefinitions": {
225+
"API Key": {
226+
"type": "apiKey",
227+
"in": "header",
228+
"name": "api_key"
229+
}
230+
},
231+
"security": [
232+
{
233+
"API Key": []
234+
}
235+
],
236+
"tags": [],
237+
"x-ms-connector-metadata": [
238+
{
239+
"propertyName": "Website",
240+
"propertyValue": "https://www.aiornot.com/"
241+
},
242+
{
243+
"propertyName": "Privacy policy",
244+
"propertyValue": "https://www.aiornot.com/privacy-policy"
245+
},
246+
{
247+
"propertyName": "Categories",
248+
"propertyValue": "AI;Productivity"
249+
}
250+
]
251+
}
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",
8+
"description": "The API Key for this api",
9+
"tooltip": "Provide your API Key",
10+
"constraints": {
11+
"tabIndex": 2,
12+
"clearText": false,
13+
"required": "true"
14+
}
15+
}
16+
}
17+
},
18+
"iconBrandColor": "#da3b01",
19+
"capabilities": [],
20+
"publisher": "Fördős András",
21+
"stackOwner": "AIorNot INC"
22+
}
23+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# AI or Not
2+
In today's digital world, distinguishing real from digitally altered images is more critical than ever. AI or Not is here to help! Empower your applications, protect your business and your users with the ability to differentiate between genuine and AI-generated images. Let's lead the charge in maintaining the authenticity of visual content.
3+
4+
## Publisher: Fördős András
5+
6+
## Prerequisites
7+
An AI or Not account is required. You can sign up for a free plan or select from the paid memberships: [https://www.aiornot.com/](https://www.aiornot.com/)
8+
9+
## Obtaining Credentials
10+
This connector uses API-Key as a bearer token for autehentication. Once signed up, visit your profile home page to get your API-Key: [https://www.aiornot.com/dashboard/api](https://www.aiornot.com/dashboard/api)
11+
12+
## Supported Operations
13+
14+
### Is Live
15+
Check if system is alive and ready to serve requests.
16+
17+
### Image reports
18+
The response model containing the result of the image report processing, which includes the results of the image quality check, NSFW, and the image analysis itself.
19+
20+
## Known Issues and Limitations
21+
22+
The current version of the connector is an initial one, meaning it does not provide access to all the service endpoints and response data provided by AI or Not, especially around the paid services.
23+
24+
Please reach out and connect me when you see the need for any additional extension and let us collaborate!
25+
26+
Important note, that the underlying service has various limitations applied (rates and data) based on your membership plan.

0 commit comments

Comments
 (0)