Skip to content

Commit

Permalink
Updated API from documentation release
Browse files Browse the repository at this point in the history
  • Loading branch information
ct-sdks[bot] committed Nov 12, 2024
1 parent 0be6928 commit 605a1ff
Show file tree
Hide file tree
Showing 20 changed files with 207 additions and 67 deletions.
35 changes: 18 additions & 17 deletions api-specs/connect/api.raml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ uses:
version: v1
mediaType: application/json
baseUri: https://connect.{region}.commercetools.com
(annotations.sdkBaseUri): https://connect.europe-west1.gcp.commercetools.com
(annotations.sdkBaseUri): https://connect.{region}.commercetools.com
baseUriParameters:
region:
type: string
Expand Down Expand Up @@ -114,14 +114,11 @@ resourceTypes: !include types/resource-types.raml
type: DeploymentDraft
example: !include ./examples/deployment/draft.json
description: |
Specific error codes:
Specific Error Codes:
- [ConnectorStagedNotPreviewable](ctp:connect:type:ConnectorStagedNotPreviewableError)
- [DeploymentUnsupportedRegion](ctp:connect:type:DeploymentUnsupportedRegionError)
- [DeploymentUnknownApplicationConfiguration](ctp:connect:type:DeploymentUnknownApplicationConfigurationError)
- [DeploymentUnknownApplicationConfigurationKey](ctp:connect:type:DeploymentUnknownApplicationConfigurationKeyError)
- [DeploymentApplicationDoNotBelong](ctp:connect:type:DeploymentApplicationDoNotBelongError)
- [DeploymentMustIncludeApplication](ctp:connect:type:DeploymentMustIncludeApplicationError)
- [DeploymentApplicationRequired](ctp:connect:type:DeploymentApplicationRequiredError)
responses:
201:
body:
Expand All @@ -133,14 +130,6 @@ resourceTypes: !include types/resource-types.raml
type: ErrorResponse
get:
queryParameters:
integrationTypes?:
description: |
Filter the results by the `integrationType` of a Connector.
type: common.IntegrationType[]
deploymentType?:
description: |
Filter the results by the `deploymentType` of a Connector.
type: common.DeploymentType
limit?:
type: number
format: int64
Expand All @@ -153,6 +142,14 @@ resourceTypes: !include types/resource-types.raml
Number of [elements skipped](/../api/general-concepts#offset).
sort?:
type: string[]
integrationTypes?:
description: |
Filter the results by the `integrationType` of a Connector.
type: common.IntegrationType[]
deploymentType?:
description: |
Filter the results by the `deploymentType` of a Connector.
type: common.DeploymentType
description: Retrieves all deployments of a project key.
is:
- secured_by_view_connectors_deployments
Expand Down Expand Up @@ -283,10 +280,6 @@ resourceTypes: !include types/resource-types.raml
type: ErrorResponse
get:
queryParameters:
integrationTypes?:
description: |
Filter the results by the `integrationType` of a ConnectorStaged.
type: common.IntegrationType[]
limit?:
type: number
format: int64
Expand All @@ -299,6 +292,14 @@ resourceTypes: !include types/resource-types.raml
Number of [elements skipped](/../api/general-concepts#offset).
sort?:
type: string[]
isPrivate?:
type: boolean
description: |
If `true`, only private Connectors are returned. If `false`, only public Connectors are returned.
integrationTypes?:
description: |
Filter the results by the `integrationType` of a ConnectorStaged.
type: common.IntegrationType[]
is:
- secured_by_view_connectors
responses:
Expand Down
6 changes: 6 additions & 0 deletions api-specs/connect/examples/connector/ConfigurationKey.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"key": "CONFIG_KEY",
"description": "config key description",
"required": true,
"default": "config default value"
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
"standardConfiguration": [
{
"key": "CONFIG_KEY",
"description": "config key description"
"description": "config key description",
"required": true,
"default": "config key default value"
}
],
"securedConfiguration": [
{
"key": "CONFIG_SECRET_KEY",
"description": "config secret description"
"description": "config secret description",
"required": true
}
]
}
33 changes: 33 additions & 0 deletions api-specs/connect/examples/connector/draft.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"id": "5ab3edcd-9d23-4934-8f48-256805253119",
"key": "connector-key",
"version": 1,
"name": "Connector's name",
"description": "Connector's description",
"creator": {
Expand All @@ -14,5 +16,36 @@
"tag": "0.0.0"
},
"privateProjects": [],
"private": false,
"hasChanges": true,
"alreadyListed": true,
"isPreviewable": "true",
"status": "Draft",
"publishingReport": null,
"previewableReport": {
"entries": [
{
"title": "Image security analysis check succeeded",
"type": "Information",
"message": null,
"createdAt": "2024-02-15T10:12:12.069Z",
"application": null
},
{
"title": "SAST and SCA analysis check succeeded",
"type": "Information",
"message": null,
"createdAt": "2024-02-15T10:12:12.072Z",
"application": null
},
{
"title": "Connector specification file validation check succeeded",
"type": "Information",
"message": null,
"createdAt": "2024-02-15T10:12:12.073Z",
"application": null
}
]
},
"supportedRegions": ["us-central1.gcp", "europe-west1.gcp"]
}
7 changes: 5 additions & 2 deletions api-specs/connect/examples/connector/minimal.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,16 @@
"standardConfiguration": [
{
"key": "CONFIG_KEY",
"description": "config key description"
"description": "config key description",
"required": true,
"default": null
}
],
"securedConfiguration": [
{
"key": "CONFIG_SECRET_KEY",
"description": "config secret description"
"description": "config secret description",
"required": true
}
]
}
Expand Down
7 changes: 5 additions & 2 deletions api-specs/connect/examples/connector/paged.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,16 @@
"standardConfiguration": [
{
"key": "CONFIG_KEY",
"description": "config key description"
"description": "config key description",
"required": true,
"default": null
}
],
"securedConfiguration": [
{
"key": "CONFIG_SECRET_KEY",
"description": "config secret description"
"description": "config secret description",
"required": true
}
]
}
Expand Down
7 changes: 5 additions & 2 deletions api-specs/connect/examples/connector/staged-paged.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,16 @@
"standardConfiguration": [
{
"key": "CONFIG_KEY",
"description": "config key description"
"description": "config key description",
"required": true,
"default": "config default value"
}
],
"securedConfiguration": [
{
"key": "CONFIG_SECRET_KEY",
"description": "config secret description"
"description": "config secret description",
"required": true
}
]
}
Expand Down
7 changes: 5 additions & 2 deletions api-specs/connect/examples/connector/staged.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,16 @@
"standardConfiguration": [
{
"key": "CONFIG_KEY",
"description": "config key description"
"description": "config key description",
"required": true,
"default": "config default value"
}
],
"securedConfiguration": [
{
"key": "CONFIG_SECRET_KEY",
"description": "config secret description"
"description": "config secret description",
"required": true
}
]
}
Expand Down
4 changes: 3 additions & 1 deletion api-specs/connect/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@
<rule enabled="false">
<name>com.commercetools.rmf.validators.FilenameRule</name>
</rule>
<rule enabled="false">
<name>com.commercetools.rmf.validators.SdkBaseUriRule</name>
</rule>
<rule>
<name>com.commercetools.rmf.validators.ResourcePluralRule</name>
<options>
<option type="exclude">search</option>
<option type="exclude">stream</option>
</options>
</rule>
<rule>
Expand Down
78 changes: 57 additions & 21 deletions api-specs/connect/types/common.raml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ types:
comment:
type: string
description: The body text of the comment.
ConfigurationKeyStandard:
example: !include ../examples/connector/ConfigurationKeyStandard.json
StandardConfigurationKey:
example: !include ../examples/connector/ConfigurationKey.json
description: |
The name, description, and default value of a standard environment variable.
properties:
Expand All @@ -49,8 +49,8 @@ types:
type: boolean
description: Indicates if the environment variable is required.
default: false
ConfigurationKeySecured:
example: !include ../examples/connector/ConfigurationKeySecured.json
SecuredConfigurationKey:
example: !include ../examples/connector/ConfigurationKey.json
description: |
The name and description of a secret environment variable.
properties:
Expand Down Expand Up @@ -91,13 +91,22 @@ types:
- service
- event
- job
- mc-app
- merchant-center-custom-application
- assets
standardConfiguration:
type: ConfigurationKeyStandard[]
type: StandardConfigurationKey[]
description: Contains the name, description, and default values of standard environment variables.
securedConfiguration:
type: ConfigurationKeySecured[]
type: SecuredConfigurationKey[]
description: Contains the name and description of secret environment variables.
ConnectorGlobalConfiguration:
description: Global configuration applied to all applications in the deployment.
properties:
standardConfiguration?:
type: StandardConfigurationKey[]
description: Contains the name and description of standard environment variables.
securedConfiguration?:
type: SecuredConfigurationKey[]
description: Contains the name and description of secret environment variables.
DeploymentConfigurationApplication:
description: |
Expand Down Expand Up @@ -270,9 +279,30 @@ types:
repository:
type: Repository
description: Details of the GitHub repository that contains the Connect applications.
configurations?:
type: ConnectorConfigurationApplication[]
description: Configurations needed by Connectors for hosting. Loaded as environment variables in the application.
globalConfiguration?:
type: ConnectorGlobalConfiguration
description: Global configuration applied to all applications in the deployment.
certified:
type: boolean
description: If `true`, the Connector is certified.
supportedRegions?:
type: Region[]
description: If not empty, Connectors can only be deployed in these Regions. If empty, Connectors can be deployed in any [supported Region](hosts-and-authorization#hosts).
documentationUrl?:
type: string
description: URL to the documentation of the Connector.
DeploymentGlobalConfiguration:
description: Global configuration applied to all applications in the deployment.
properties:
standardConfiguration?:
type: ConfigurationValue[]
description: List of standard environment variables.
securedConfiguration?:
type: ConfigurationValue[]
description: List of secured environment variables.
DeploymentCreator:
example: !include ../examples/deployment/DeploymentCreator.json
description: The details of the deployed [DeploymentConnector](ctp:connect:type:DeploymentConnector) creator.
Expand All @@ -293,6 +323,12 @@ types:
noOfContributors?:
type: integer
description: Number of contributors currently working for the company.
logoUrl?:
type: string
description: URL to an image used as the company logo.
supportUrl?:
type: string
description: Url to support website of the company.
DeploymentReportEntryType:
type: string
description: |
Expand Down Expand Up @@ -403,20 +439,6 @@ types:
IntegrationType:
description: |
Integration type of the Connector.
enum:
- tax
- marketplace
- oms
- psp
- pim
- promotion
- search
- erp
- crm
- email
- analytics
- shipping
- other
(annotations.enumDescriptions):
tax: Tax.
marketplace: Marketplace.
Expand All @@ -431,6 +453,20 @@ types:
analytics: Analytics.
shipping: Shipping and delivery.
other: The Connector provides a service or functionality that is not covered by the other values.
enum:
- tax
- marketplace
- oms
- psp
- pim
- promotion
- search
- erp
- crm
- email
- analytics
- shipping
- other
DeploymentType:
description: |
Deployment type of the Connector.
Expand Down
5 changes: 4 additions & 1 deletion api-specs/connect/types/connector/connector-staged.raml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ properties:
description: GitHub repository details of the Connector.
configurations:
type: common.ConnectorConfigurationApplication[]
description: Configurations needed by Connectors for hosting. Loaded as environment variables in the workload.
description: Configurations needed by Connectors for hosting. Loaded as environment variables in the application.
globalConfiguration?:
type: common.ConnectorGlobalConfiguration
description: Global configuration applied to all applications in the Deployment.
private:
type: boolean
description: If `true`, only Composable Commerce Projects specified in `privateProjects` can access the Connector.
Expand Down
Loading

0 comments on commit 605a1ff

Please sign in to comment.