Skip to content

Commit 605a1ff

Browse files
committed
Updated API from documentation release
1 parent 0be6928 commit 605a1ff

20 files changed

+207
-67
lines changed

api-specs/connect/api.raml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ uses:
99
version: v1
1010
mediaType: application/json
1111
baseUri: https://connect.{region}.commercetools.com
12-
(annotations.sdkBaseUri): https://connect.europe-west1.gcp.commercetools.com
12+
(annotations.sdkBaseUri): https://connect.{region}.commercetools.com
1313
baseUriParameters:
1414
region:
1515
type: string
@@ -114,14 +114,11 @@ resourceTypes: !include types/resource-types.raml
114114
type: DeploymentDraft
115115
example: !include ./examples/deployment/draft.json
116116
description: |
117-
Specific error codes:
117+
Specific Error Codes:
118118
- [ConnectorStagedNotPreviewable](ctp:connect:type:ConnectorStagedNotPreviewableError)
119119
- [DeploymentUnsupportedRegion](ctp:connect:type:DeploymentUnsupportedRegionError)
120120
- [DeploymentUnknownApplicationConfiguration](ctp:connect:type:DeploymentUnknownApplicationConfigurationError)
121121
- [DeploymentUnknownApplicationConfigurationKey](ctp:connect:type:DeploymentUnknownApplicationConfigurationKeyError)
122-
- [DeploymentApplicationDoNotBelong](ctp:connect:type:DeploymentApplicationDoNotBelongError)
123-
- [DeploymentMustIncludeApplication](ctp:connect:type:DeploymentMustIncludeApplicationError)
124-
- [DeploymentApplicationRequired](ctp:connect:type:DeploymentApplicationRequiredError)
125122
responses:
126123
201:
127124
body:
@@ -133,14 +130,6 @@ resourceTypes: !include types/resource-types.raml
133130
type: ErrorResponse
134131
get:
135132
queryParameters:
136-
integrationTypes?:
137-
description: |
138-
Filter the results by the `integrationType` of a Connector.
139-
type: common.IntegrationType[]
140-
deploymentType?:
141-
description: |
142-
Filter the results by the `deploymentType` of a Connector.
143-
type: common.DeploymentType
144133
limit?:
145134
type: number
146135
format: int64
@@ -153,6 +142,14 @@ resourceTypes: !include types/resource-types.raml
153142
Number of [elements skipped](/../api/general-concepts#offset).
154143
sort?:
155144
type: string[]
145+
integrationTypes?:
146+
description: |
147+
Filter the results by the `integrationType` of a Connector.
148+
type: common.IntegrationType[]
149+
deploymentType?:
150+
description: |
151+
Filter the results by the `deploymentType` of a Connector.
152+
type: common.DeploymentType
156153
description: Retrieves all deployments of a project key.
157154
is:
158155
- secured_by_view_connectors_deployments
@@ -283,10 +280,6 @@ resourceTypes: !include types/resource-types.raml
283280
type: ErrorResponse
284281
get:
285282
queryParameters:
286-
integrationTypes?:
287-
description: |
288-
Filter the results by the `integrationType` of a ConnectorStaged.
289-
type: common.IntegrationType[]
290283
limit?:
291284
type: number
292285
format: int64
@@ -299,6 +292,14 @@ resourceTypes: !include types/resource-types.raml
299292
Number of [elements skipped](/../api/general-concepts#offset).
300293
sort?:
301294
type: string[]
295+
isPrivate?:
296+
type: boolean
297+
description: |
298+
If `true`, only private Connectors are returned. If `false`, only public Connectors are returned.
299+
integrationTypes?:
300+
description: |
301+
Filter the results by the `integrationType` of a ConnectorStaged.
302+
type: common.IntegrationType[]
302303
is:
303304
- secured_by_view_connectors
304305
responses:
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"key": "CONFIG_KEY",
3+
"description": "config key description",
4+
"required": true,
5+
"default": "config default value"
6+
}

api-specs/connect/examples/connector/ConnectorConfigurationApplication.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,16 @@
44
"standardConfiguration": [
55
{
66
"key": "CONFIG_KEY",
7-
"description": "config key description"
7+
"description": "config key description",
8+
"required": true,
9+
"default": "config key default value"
810
}
911
],
1012
"securedConfiguration": [
1113
{
1214
"key": "CONFIG_SECRET_KEY",
13-
"description": "config secret description"
15+
"description": "config secret description",
16+
"required": true
1417
}
1518
]
1619
}

api-specs/connect/examples/connector/draft.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
2+
"id": "5ab3edcd-9d23-4934-8f48-256805253119",
23
"key": "connector-key",
4+
"version": 1,
35
"name": "Connector's name",
46
"description": "Connector's description",
57
"creator": {
@@ -14,5 +16,36 @@
1416
"tag": "0.0.0"
1517
},
1618
"privateProjects": [],
19+
"private": false,
20+
"hasChanges": true,
21+
"alreadyListed": true,
22+
"isPreviewable": "true",
23+
"status": "Draft",
24+
"publishingReport": null,
25+
"previewableReport": {
26+
"entries": [
27+
{
28+
"title": "Image security analysis check succeeded",
29+
"type": "Information",
30+
"message": null,
31+
"createdAt": "2024-02-15T10:12:12.069Z",
32+
"application": null
33+
},
34+
{
35+
"title": "SAST and SCA analysis check succeeded",
36+
"type": "Information",
37+
"message": null,
38+
"createdAt": "2024-02-15T10:12:12.072Z",
39+
"application": null
40+
},
41+
{
42+
"title": "Connector specification file validation check succeeded",
43+
"type": "Information",
44+
"message": null,
45+
"createdAt": "2024-02-15T10:12:12.073Z",
46+
"application": null
47+
}
48+
]
49+
},
1750
"supportedRegions": ["us-central1.gcp", "europe-west1.gcp"]
1851
}

api-specs/connect/examples/connector/minimal.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,16 @@
2323
"standardConfiguration": [
2424
{
2525
"key": "CONFIG_KEY",
26-
"description": "config key description"
26+
"description": "config key description",
27+
"required": true,
28+
"default": null
2729
}
2830
],
2931
"securedConfiguration": [
3032
{
3133
"key": "CONFIG_SECRET_KEY",
32-
"description": "config secret description"
34+
"description": "config secret description",
35+
"required": true
3336
}
3437
]
3538
}

api-specs/connect/examples/connector/paged.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,16 @@
2929
"standardConfiguration": [
3030
{
3131
"key": "CONFIG_KEY",
32-
"description": "config key description"
32+
"description": "config key description",
33+
"required": true,
34+
"default": null
3335
}
3436
],
3537
"securedConfiguration": [
3638
{
3739
"key": "CONFIG_SECRET_KEY",
38-
"description": "config secret description"
40+
"description": "config secret description",
41+
"required": true
3942
}
4043
]
4144
}

api-specs/connect/examples/connector/staged-paged.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,16 @@
2929
"standardConfiguration": [
3030
{
3131
"key": "CONFIG_KEY",
32-
"description": "config key description"
32+
"description": "config key description",
33+
"required": true,
34+
"default": "config default value"
3335
}
3436
],
3537
"securedConfiguration": [
3638
{
3739
"key": "CONFIG_SECRET_KEY",
38-
"description": "config secret description"
40+
"description": "config secret description",
41+
"required": true
3942
}
4043
]
4144
}

api-specs/connect/examples/connector/staged.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,16 @@
2323
"standardConfiguration": [
2424
{
2525
"key": "CONFIG_KEY",
26-
"description": "config key description"
26+
"description": "config key description",
27+
"required": true,
28+
"default": "config default value"
2729
}
2830
],
2931
"securedConfiguration": [
3032
{
3133
"key": "CONFIG_SECRET_KEY",
32-
"description": "config secret description"
34+
"description": "config secret description",
35+
"required": true
3336
}
3437
]
3538
}

api-specs/connect/ruleset.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77
<rule enabled="false">
88
<name>com.commercetools.rmf.validators.FilenameRule</name>
99
</rule>
10+
<rule enabled="false">
11+
<name>com.commercetools.rmf.validators.SdkBaseUriRule</name>
12+
</rule>
1013
<rule>
1114
<name>com.commercetools.rmf.validators.ResourcePluralRule</name>
1215
<options>
1316
<option type="exclude">search</option>
14-
<option type="exclude">stream</option>
1517
</options>
1618
</rule>
1719
<rule>

api-specs/connect/types/common.raml

Lines changed: 57 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ types:
3131
comment:
3232
type: string
3333
description: The body text of the comment.
34-
ConfigurationKeyStandard:
35-
example: !include ../examples/connector/ConfigurationKeyStandard.json
34+
StandardConfigurationKey:
35+
example: !include ../examples/connector/ConfigurationKey.json
3636
description: |
3737
The name, description, and default value of a standard environment variable.
3838
properties:
@@ -49,8 +49,8 @@ types:
4949
type: boolean
5050
description: Indicates if the environment variable is required.
5151
default: false
52-
ConfigurationKeySecured:
53-
example: !include ../examples/connector/ConfigurationKeySecured.json
52+
SecuredConfigurationKey:
53+
example: !include ../examples/connector/ConfigurationKey.json
5454
description: |
5555
The name and description of a secret environment variable.
5656
properties:
@@ -91,13 +91,22 @@ types:
9191
- service
9292
- event
9393
- job
94-
- mc-app
94+
- merchant-center-custom-application
9595
- assets
9696
standardConfiguration:
97-
type: ConfigurationKeyStandard[]
97+
type: StandardConfigurationKey[]
9898
description: Contains the name, description, and default values of standard environment variables.
9999
securedConfiguration:
100-
type: ConfigurationKeySecured[]
100+
type: SecuredConfigurationKey[]
101+
description: Contains the name and description of secret environment variables.
102+
ConnectorGlobalConfiguration:
103+
description: Global configuration applied to all applications in the deployment.
104+
properties:
105+
standardConfiguration?:
106+
type: StandardConfigurationKey[]
107+
description: Contains the name and description of standard environment variables.
108+
securedConfiguration?:
109+
type: SecuredConfigurationKey[]
101110
description: Contains the name and description of secret environment variables.
102111
DeploymentConfigurationApplication:
103112
description: |
@@ -270,9 +279,30 @@ types:
270279
repository:
271280
type: Repository
272281
description: Details of the GitHub repository that contains the Connect applications.
282+
configurations?:
283+
type: ConnectorConfigurationApplication[]
284+
description: Configurations needed by Connectors for hosting. Loaded as environment variables in the application.
285+
globalConfiguration?:
286+
type: ConnectorGlobalConfiguration
287+
description: Global configuration applied to all applications in the deployment.
273288
certified:
274289
type: boolean
275290
description: If `true`, the Connector is certified.
291+
supportedRegions?:
292+
type: Region[]
293+
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).
294+
documentationUrl?:
295+
type: string
296+
description: URL to the documentation of the Connector.
297+
DeploymentGlobalConfiguration:
298+
description: Global configuration applied to all applications in the deployment.
299+
properties:
300+
standardConfiguration?:
301+
type: ConfigurationValue[]
302+
description: List of standard environment variables.
303+
securedConfiguration?:
304+
type: ConfigurationValue[]
305+
description: List of secured environment variables.
276306
DeploymentCreator:
277307
example: !include ../examples/deployment/DeploymentCreator.json
278308
description: The details of the deployed [DeploymentConnector](ctp:connect:type:DeploymentConnector) creator.
@@ -293,6 +323,12 @@ types:
293323
noOfContributors?:
294324
type: integer
295325
description: Number of contributors currently working for the company.
326+
logoUrl?:
327+
type: string
328+
description: URL to an image used as the company logo.
329+
supportUrl?:
330+
type: string
331+
description: Url to support website of the company.
296332
DeploymentReportEntryType:
297333
type: string
298334
description: |
@@ -403,20 +439,6 @@ types:
403439
IntegrationType:
404440
description: |
405441
Integration type of the Connector.
406-
enum:
407-
- tax
408-
- marketplace
409-
- oms
410-
- psp
411-
- pim
412-
- promotion
413-
- search
414-
- erp
415-
- crm
416-
- email
417-
- analytics
418-
- shipping
419-
- other
420442
(annotations.enumDescriptions):
421443
tax: Tax.
422444
marketplace: Marketplace.
@@ -431,6 +453,20 @@ types:
431453
analytics: Analytics.
432454
shipping: Shipping and delivery.
433455
other: The Connector provides a service or functionality that is not covered by the other values.
456+
enum:
457+
- tax
458+
- marketplace
459+
- oms
460+
- psp
461+
- pim
462+
- promotion
463+
- search
464+
- erp
465+
- crm
466+
- email
467+
- analytics
468+
- shipping
469+
- other
434470
DeploymentType:
435471
description: |
436472
Deployment type of the Connector.

0 commit comments

Comments
 (0)