From 118a45bf478b36709843956b5e0e83373dad5aaf Mon Sep 17 00:00:00 2001 From: Auto Mation Date: Wed, 25 Oct 2023 10:24:36 +0000 Subject: [PATCH] Updated API from documentation release --- api-specs/connect/api.raml | 8 +++--- .../examples/connector/staged-paged.json | 3 ++- api-specs/connect/types/common.raml | 15 ----------- ...connector-search-paged-query-response.raml | 25 +++++++++++++++++++ ...connector-staged-paged-query-response.raml | 25 +++++++++++++++++++ ...yment-log-cursor-paged-query-response.raml | 12 +++++++++ .../deployment-paged-query-response.raml | 25 +++++++++++++++++++ api-specs/connect/types/resource-types.raml | 2 +- api-specs/connect/types/types.raml | 4 +++ 9 files changed, 97 insertions(+), 22 deletions(-) create mode 100644 api-specs/connect/types/connector/connector-search-paged-query-response.raml create mode 100644 api-specs/connect/types/connector/connector-staged-paged-query-response.raml create mode 100644 api-specs/connect/types/deployment/deployment-log-cursor-paged-query-response.raml create mode 100644 api-specs/connect/types/deployment/deployment-paged-query-response.raml diff --git a/api-specs/connect/api.raml b/api-specs/connect/api.raml index fc6f9d8ba..f4d81c7af 100644 --- a/api-specs/connect/api.raml +++ b/api-specs/connect/api.raml @@ -143,7 +143,7 @@ resourceTypes: !include types/resource-types.raml responses: 200: body: - type: common.Paged + type: DeploymentPagedQueryResponse properties: results: Deployment[] example: !include ./examples/deployment/paged.json @@ -238,7 +238,7 @@ resourceTypes: !include types/resource-types.raml responses: 200: body: - type: common.Paged + type: ConnectorSearchPagedQueryResponse properties: results: Connector[] example: !include ./examples/connector/paged.json @@ -280,9 +280,7 @@ resourceTypes: !include types/resource-types.raml responses: 200: body: - type: common.Paged - properties: - results: ConnectorStaged[] + type: ConnectorStagedPagedQueryResponse example: !include ./examples/connector/staged-paged.json /{ID}: (annotations.methodName): withId diff --git a/api-specs/connect/examples/connector/staged-paged.json b/api-specs/connect/examples/connector/staged-paged.json index 2a44d4bce..3fc832aec 100644 --- a/api-specs/connect/examples/connector/staged-paged.json +++ b/api-specs/connect/examples/connector/staged-paged.json @@ -47,7 +47,8 @@ "status": "Draft", "publishingReport": null, "isPreviewable": "none", - "previewableReport": null + "previewableReport": null, + "certified": true } ] } diff --git a/api-specs/connect/types/common.raml b/api-specs/connect/types/common.raml index 8d59855aa..b1e9311e0 100644 --- a/api-specs/connect/types/common.raml +++ b/api-specs/connect/types/common.raml @@ -397,21 +397,6 @@ types: pattern: ^[a-zA-Z0-9-_.]+:[a-zA-Z0-9-_]{2,36}$ description: Identifies a Composable Commerce Project. Uses the format "{region}:{projectKey}". example: europe-west1.gcp:my-project-key - Paged: - description: | - A Paged Result. - properties: - limit: number - offset: number - count: number - total: number - results: any - CursorPaged: - description: | - A Cursor Paged Result. - properties: - data: any - next: string IsPreviewable: type: string description: | diff --git a/api-specs/connect/types/connector/connector-search-paged-query-response.raml b/api-specs/connect/types/connector/connector-search-paged-query-response.raml new file mode 100644 index 000000000..80a256e65 --- /dev/null +++ b/api-specs/connect/types/connector/connector-search-paged-query-response.raml @@ -0,0 +1,25 @@ +#%RAML 1.0 DataType +(annotations.package): Connector +displayName: ConnectorSearchPagedQueryResponse +description: | + [PagedQueryResult](/../api/general-concepts#pagedqueryresult) with results containing an array of [Connector](ctp:connect:type:Connector). +properties: + limit: + type: number + format: int64 + description: The maximum number of Connectors returned. + offset: + type: number + format: int64 + description: The offset of the Connectors returned. + count: + type: number + format: int64 + description: The number of Connectors returned. + total: + type: number + format: int64 + description: The total number of Connectors matching the query. + results: + type: Connector[] + description: Connectors matching the query. diff --git a/api-specs/connect/types/connector/connector-staged-paged-query-response.raml b/api-specs/connect/types/connector/connector-staged-paged-query-response.raml new file mode 100644 index 000000000..27598f0bb --- /dev/null +++ b/api-specs/connect/types/connector/connector-staged-paged-query-response.raml @@ -0,0 +1,25 @@ +#%RAML 1.0 DataType +(annotations.package): Connector +displayName: ConnectorStagedPagedQueryResponse +description: | + [PagedQueryResult](/../api/general-concepts#pagedqueryresult) with results containing an array of [ConnectorStaged](ctp:connect:type:ConnectorStaged). +properties: + limit: + type: number + format: int64 + description: The maximum number of the ConnectorStaged returned. + offset: + type: number + format: int64 + description: The offset of the ConnectorStaged returned. + count: + type: number + format: int64 + description: The number of ConnectorStaged returned. + total: + type: number + format: int64 + description: The total number of ConnectorStaged matching the query. + results: + type: ConnectorStaged[] + description: ConnectorStaged matching the query. diff --git a/api-specs/connect/types/deployment/deployment-log-cursor-paged-query-response.raml b/api-specs/connect/types/deployment/deployment-log-cursor-paged-query-response.raml new file mode 100644 index 000000000..be50f47d7 --- /dev/null +++ b/api-specs/connect/types/deployment/deployment-log-cursor-paged-query-response.raml @@ -0,0 +1,12 @@ +#%RAML 1.0 DataType +(annotations.package): Deployment +displayName: DeploymentLogCursorPagedQueryResponse +description: | + A cursor paged query result containing an array of [DeploymentLog](ctp:connect:type:DeploymentLog). +properties: + data: + type: DeploymentLog[] + description: Array of DeploymentLog objects. + next: + type: string + description: The next page token. diff --git a/api-specs/connect/types/deployment/deployment-paged-query-response.raml b/api-specs/connect/types/deployment/deployment-paged-query-response.raml new file mode 100644 index 000000000..745c59f69 --- /dev/null +++ b/api-specs/connect/types/deployment/deployment-paged-query-response.raml @@ -0,0 +1,25 @@ +#%RAML 1.0 DataType +(annotations.package): Deployment +displayName: DeploymentPagedQueryResponse +description: | + [PagedQueryResult](/../api/general-concepts#pagedqueryresult) with results containing an array of [Deployment](ctp:connect:type:Deployment). +properties: + limit: + type: number + format: int64 + description: The limit of the Deployments returned. + offset: + type: number + format: int64 + description: The offset of the Deployments returned. + count: + type: number + format: int64 + description: The number of Deployments returned. + total: + type: number + format: int64 + description: The total number of Deployments available. + results: + type: Deployment[] + description: Deployments matching the query. diff --git a/api-specs/connect/types/resource-types.raml b/api-specs/connect/types/resource-types.raml index 9599b03d9..76e8eb2ac 100644 --- a/api-specs/connect/types/resource-types.raml +++ b/api-specs/connect/types/resource-types.raml @@ -111,7 +111,7 @@ deploymentLogs: responses: 200: body: - type: common.CursorPaged + type: DeploymentLogCursorPagedQueryResponse properties: data: DeploymentLog[] example: !include ../examples/deployment-log/cursor-paged.json diff --git a/api-specs/connect/types/types.raml b/api-specs/connect/types/types.raml index cd3bd6d60..1f892c71a 100644 --- a/api-specs/connect/types/types.raml +++ b/api-specs/connect/types/types.raml @@ -2,6 +2,8 @@ Connector: !include connector/connector.raml ConnectorDraft: !include connector/connector-draft.raml ConnectorStaged: !include connector/connector-staged.raml +ConnectorStagedPagedQueryResponse: !include connector/connector-staged-paged-query-response.raml +ConnectorSearchPagedQueryResponse: !include connector/connector-search-paged-query-response.raml ConnectorUpdate: !include connector/connector-update.raml ConnectorUpdateAction: !include connector/connector-update-action.raml ConnectorSetCreatorCompanyAction: !include connector/updates/connector-set-company-action.raml @@ -24,11 +26,13 @@ ConnectorUpdatePreviewableAction: !include connector/updates/connector-update-pr ConnectorPublishAction: !include connector/updates/connector-publish-action.raml # Deployment Deployment: !include deployment/deployment.raml +DeploymentPagedQueryResponse: !include deployment/deployment-paged-query-response.raml DeploymentDraft: !include deployment/deployment-draft.raml DeploymentUpdate: !include deployment/deployment-update.raml DeploymentUpdateAction: !include deployment/deployment-update-action.raml DeploymentRedeployAction: !include deployment/updates/deployment-redeploy-action.raml DeploymentLog: !include deployment/deployment-log.raml +DeploymentLogCursorPagedQueryResponse: !include deployment/deployment-log-cursor-paged-query-response.raml # Error ErrorObject: !include error/ErrorObject.raml