diff --git a/certified-connectors/SmartCOMM On Demand Doc-Gen/apiDefinition.swagger.json b/certified-connectors/SmartCOMM On Demand Doc-Gen/apiDefinition.swagger.json index d1a6fecbf7..df16750498 100644 --- a/certified-connectors/SmartCOMM On Demand Doc-Gen/apiDefinition.swagger.json +++ b/certified-connectors/SmartCOMM On Demand Doc-Gen/apiDefinition.swagger.json @@ -10,7 +10,7 @@ "email": "support@smartcommunications.com" } }, - "host": "eu10-sb.smartcommunications.cloud", + "host": "ap10-sb.smartcommunications.cloud", "basePath": "/", "schemes": [ "https" @@ -22,7 +22,7 @@ "application/json" ], "paths": { - "/one/oauth2/api/v11/job/generateDocument": { + "/one/oauth2/api/v10/job/generateDocument": { "post": { "summary": "Generate Document", "description": "This function generates a document.", @@ -47,9 +47,8 @@ "required": true, "type": "string", "default": "application/json", - "description": "The API accepts both XML and JSON requests. The request type is determined by the 'Content-Type' HTTP header in the request.", - "x-ms-summary": "Content-Type", - "x-ms-visibility": "internal" + "description": "The API accepts both XML and JSON requests. The request type is determined by the \u2018Content-Type\u2019 HTTP header in the request.", + "x-ms-summary": "Content-Type" }, { "name": "Accept", @@ -57,9 +56,8 @@ "required": true, "type": "string", "default": "application/json", - "description": "The API accepts both XML and JSON responses. The response type is determined by the 'Accept' HTTP header in the request.", - "x-ms-summary": "Accept", - "x-ms-visibility": "internal" + "description": "The API accepts both XML and JSON responses. The response type is determined by the \u2018Accept\u2019 HTTP header in the request.", + "x-ms-summary": "Accept" }, { "name": "body", @@ -70,19 +68,18 @@ "properties": { "projectId": { "type": "integer", - "format": "int64", + "format": "int32", "description": "The CMS project ID used to scope the request execution. If this value is not specified then the job will execute in production mode.", - "title": "projectId", - "x-ms-summary": "Project ID" + "title": "projectId" }, "transactionData": { "type": "string", - "description": "The sample data.", + "description": "The sample data. The data is encoded as Base64.", "title": "transactionData" }, "batchConfigResId": { "type": "integer", - "format": "int64", + "format": "int32", "description": "The CMS ID of the Template Selector resource. The Template Selector is used to map the transaction data to the Template and Data Model.", "title": "batchConfigResId" }, @@ -97,11 +94,7 @@ "type": "string", "description": "The content type of the transaction data. Can be 'application/xml' or 'application/json'. Defaults to 'application/xml'.", "title": "transactionDataType", - "default": "application/xml", - "enum": [ - "application/xml", - "application/json" - ] + "default": "application/xml" }, "properties": { "type": "array", @@ -143,13 +136,13 @@ "properties": { "classId": { "type": "integer", - "format": "int64", + "format": "int32", "description": "The code of the business exception.", "title": "classId" }, "id": { "type": "integer", - "format": "int64", + "format": "int32", "description": "The unique ID of the business exception.", "title": "id" }, @@ -192,20 +185,18 @@ "type": "object", "properties": { "startPage": { - "type": "integer", - "format": "int32", + "type": "string", "description": "The start page number of an enclosed document in the primary merged print document.", "title": "startPage" }, "pageCount": { - "type": "integer", - "format": "int32", + "type": "string", "description": "The number of pages in the document generated.", "title": "pageCount" }, "channelType": { "type": "integer", - "format": "int64", + "format": "int32", "description": "The type of the channel. Possible types are: '1' TYPE_HTML '2' TYPE_PRINT '3' TYPE_SMS '4' TYPE_TEXT '5' TYPE_TML '6' TYPE_XML '7' TYPE_WORDML '8' TYPE_XSLFO.", "title": "channelType" }, @@ -248,7 +239,7 @@ }, "channelId": { "type": "integer", - "format": "int64", + "format": "int32", "description": "The channel Id of the document.", "title": "channelId" }, @@ -266,18 +257,16 @@ "type": "object", "properties": { "startPage": { - "type": "integer", - "format": "int32", + "type": "string", "description": "startPage" }, "pageCount": { - "type": "integer", - "format": "int32", + "type": "string", "description": "pageCount" }, "channelType": { "type": "integer", - "format": "int64", + "format": "int32", "description": "channelType" }, "channelName": { @@ -315,7 +304,7 @@ }, "channelId": { "type": "integer", - "format": "int64", + "format": "int32", "description": "channelId" }, "partLocation": { @@ -350,7 +339,7 @@ }, "destID": { "type": "integer", - "format": "int64", + "format": "int32", "description": "The ID of the destination.", "title": "destID" }, @@ -431,8 +420,8 @@ "oauth2_auth": { "type": "oauth2", "flow": "accessCode", - "authorizationUrl": "https://eu10-sb.smartcommunications.cloud/one/oauth2Server/authorize", - "tokenUrl": "https://eu10-sb.smartcommunications.cloud/one/oauth2Server/token", + "authorizationUrl": "https://ap10-sb.smartcommunications.cloud/one/oauth2Server/authorize", + "tokenUrl": "https://ap10-sb.smartcommunications.cloud/one/oauth2Server/token", "scopes": {} } }, diff --git a/certified-connectors/SmartCOMM On Demand Doc-Gen/script.csx b/certified-connectors/SmartCOMM On Demand Doc-Gen/script.csx deleted file mode 100644 index 0cde3c14f7..0000000000 --- a/certified-connectors/SmartCOMM On Demand Doc-Gen/script.csx +++ /dev/null @@ -1,19 +0,0 @@ -public class Script : ScriptBase -{ - public override async Task ExecuteAsync() - { - await this.UpdateRequest().ConfigureAwait(false); - var response = await this.Context.SendAsync(this.Context.Request, this.CancellationToken).ConfigureAwait(false); - return response; - } - - private async Task UpdateRequest() - { - var contentAsString = await this.Context.Request.Content.ReadAsStringAsync().ConfigureAwait(false); - var contentAsJson = JObject.Parse(contentAsString); - var transactionData = (string)contentAsJson["transactionData"]; - var transactionDataBytes = System.Text.Encoding.UTF8.GetBytes(transactionData); - contentAsJson["transactionData"] = System.Convert.ToBase64String(transactionDataBytes); - this.Context.Request.Content = CreateJsonContent(contentAsJson.ToString()); - } -} \ No newline at end of file