Skip to content

Commit 7a88488

Browse files
authored
feat(content-set): add Content Set Public API (#376). fixes #378
feat(content-flow): add Content Flow Public API
1 parent bce9e63 commit 7a88488

16 files changed

+1157
-2
lines changed

README.md

Lines changed: 217 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,24 @@ with valid values for orgId, apiKey and accessToken</p>
127127
<dd></dd>
128128
<dt><a href="#PipelineUpdate">PipelineUpdate</a> : <code>object</code></dt>
129129
<dd></dd>
130+
<dt><a href="#ContentSet">ContentSet</a> : <code>object</code></dt>
131+
<dd><p>A representation of a Content Set known to Cloud Manager.</p>
132+
<dd></dd>
133+
<dt><a href="#ContentSetList">ContentSetList</a> : <code>object</code></dt>
134+
<dd><p>A representation of a Content Set List known to Cloud Manager.</p>
135+
<dd></dd>
136+
<dt><a href="#ContentFlow">ContentFlow</a> : <code>object</code></dt>
137+
<dd><p>A representation of a Content Flow known to Cloud Manager.</p>
138+
<dd></dd>
139+
<dt><a href="#ContentFlowList">ContentFlowList</a> : <code>object</code></dt>
140+
<dd><p>A representation of a Content Flow List known to Cloud Manager.</p>
141+
<dd></dd>
142+
<dt><a href="#ContentFlowResults">ContentFlowResults</a> : <code>object</code></dt>
143+
<dd><p>A representation of a Content Flow Results known to Cloud Manager.</p>
144+
<dd></dd>
145+
<dt><a href="#ContentFlowResultDetails">ContentFlowResultDetails</a> : <code>object</code></dt>
146+
<dd><p>A representation of a Content Flow Result details known to Cloud Manager.</p>
147+
<dd></dd>
130148
</dl>
131149

132150
<a name="CloudManagerAPI"></a>
@@ -174,7 +192,15 @@ with valid values for orgId, apiKey and accessToken
174192
* ~~[.startExecution(programId, pipelineId, mode)](#CloudManagerAPI+startExecution) ⇒ <code>Promise.&lt;string&gt;</code>~~
175193
* [.tailExecutionStepLog(programId, pipelineId, action, logFile, outputStream)](#CloudManagerAPI+tailExecutionStepLog)[<code>Promise.&lt;PipelineExecutionStepState&gt;</code>](#PipelineExecutionStepState)
176194
* [.updateIpAllowlist(programId, ipAllowlistId, cidrBlocks)](#CloudManagerAPI+updateIpAllowlist) ⇒ <code>Promise.&lt;object&gt;</code>
177-
* [.updatePipeline(programId, pipelineId, changes)](#CloudManagerAPI+updatePipeline)[<code>Promise.&lt;Pipeline&gt;</code>](#Pipeline)
195+
* [.createContentSet(programId, contentSet)](#CloudManagerAPI+createContentSet)[<code>Promise.&lt;ContentSet&gt;</code>](#ContentSet)
196+
* [.deleteContentSet(programId, contentSetId)](#CloudManagerAPI+deleteContentSet) ⇒ <code>Promise.&lt;object&gt;</code>
197+
* [.getContentSet(programId, contentSetId)](#CloudManagerAPI+getContentSet)[<code>Promise.&lt;ContentSet&gt;</code>](#ContentSet)
198+
* [.updateContentSet(programId, contentsetId, updated)](#CloudManagerAPI+updateContentSet)[<code>Promise.&lt;ContentSet&gt;</code>](#ContentSet)
199+
* [.listContentSets(programId)](#CloudManagerAPI+listContentSets)[<code>Promise.&lt;ContentSetList&gt;</code>](#ContentSetList)
200+
* [.createContentFlow(programId, environmentId, contentFlow)](#CloudManagerAPI+createContentFlow)[<code>Promise.&lt;ContentFlow&gt;</code>](#ContentFlow)
201+
* [.getContentFlow(programId, environmentId, contentFlow)](#CloudManagerAPI+getContentFlow)[<code>Promise.&lt;ContentFlow&gt;</code>](#ContentFlow)
202+
* [.cancelContentFlow(programId, contentFlowId)](#CloudManagerAPI+cancelContentFlow)[<code>Promise.&lt;object&gt;</code>](#ContentFlow)
203+
* [.listContentFlows(programId)](#CloudManagerAPI+listContentFlows)[<code>Promise.&lt;ContentFlowList&gt;</code>](#ContentFlowList)
178204

179205
<a name="CloudManagerAPI+orgId"></a>
180206

@@ -661,6 +687,126 @@ Find the first waiting step in a pipeline execution
661687
| --- | --- | --- |
662688
| execution | [<code>PipelineExecution</code>](#PipelineExecution) | the execution |
663689

690+
<a name="CloudManagerAPI+listContentSets"></a>
691+
692+
### cloudManagerAPI.listContentSets(programId) ⇒ [<code>Promise.&lt;ContentSetList&gt;</code>](#ContentSetList)
693+
List content sets
694+
695+
**Kind**: instance method of [<code>CloudManagerAPI</code>](#CloudManagerAPI)
696+
**Returns**: [<code>Promise.&lt;ContentSetList&gt;</code>](#ContentSetList) - list of the content sets in the program
697+
698+
| Param | Type | Description |
699+
| --- | --- | --- |
700+
| programId | <code>string</code> | the program id |
701+
702+
<a name="CloudManagerAPI+getContentSet"></a>
703+
704+
### cloudManagerAPI.getContentSet(programId, contentSetId) ⇒ [<code>Promise.&lt;ContentSet&gt;</code>](#ContentSet)
705+
Get the content set
706+
707+
**Kind**: instance method of [<code>CloudManagerAPI</code>](#CloudManagerAPI)
708+
**Returns**: [<code>Promise.&lt;ContentSet&gt;</code>](#ContentSet) - the content set definition
709+
710+
| Param | Type | Description |
711+
| --- | --- |--------------------|
712+
| programId | <code>string</code> | the program id |
713+
| contentSetId | <code>string</code> | the content set id |
714+
715+
<a name="CloudManagerAPI+createContentSet"></a>
716+
717+
### cloudManagerAPI.createContentSet(programId, contentSet) ⇒ [<code>Promise.&lt;ContentSet&gt;</code>](#ContentSet)
718+
Create a content set
719+
720+
**Kind**: instance method of [<code>CloudManagerAPI</code>](#CloudManagerAPI)
721+
**Returns**: [<code>Promise.&lt;ContentSet&gt;</code>](#ContentSet) - the created content set definition
722+
723+
| Param | Type | Description |
724+
| --- |----------------------------------------|-------------------------------|
725+
| programId | <code>string</code> | the program id |
726+
| contentSet | [<code>ContentSet</code>](#ContentSet) | the content set to be created |
727+
728+
<a name="CloudManagerAPI+updateContentSet"></a>
729+
730+
### cloudManagerAPI.updateContentSet(programId, contentSetId, updatedContentSet) ⇒ [<code>Promise.&lt;ContentSet&gt;</code>](#ContentSet)
731+
Update a content set
732+
733+
**Kind**: instance method of [<code>CloudManagerAPI</code>](#CloudManagerAPI)
734+
**Returns**: [<code>Promise.&lt;ContentSet&gt;</code>](#ContentSet) - the updated content set definition
735+
736+
| Param | Type | Description |
737+
|--------------|------------------------------------------------|------------------------------------|
738+
| programId | <code>string</code> | the program id |
739+
| contentSetId | <code>string</code> (#ContentSet) | the content set id |
740+
| update | [<code>ContentSet</code>](#ContentSet) | the changed content set definition |
741+
742+
<a name="CloudManagerAPI+deleteContentSet"></a>
743+
744+
### cloudManagerAPI.deleteContentSet(programId, contentSetId) ⇒ <code>Promise.&lt;object&gt;</code>
745+
Delete a content set
746+
747+
**Kind**: instance method of [<code>CloudManagerAPI</code>](#CloudManagerAPI)
748+
**Returns**: <code>Promise.&lt;object&gt;</code> - a truthy value
749+
750+
| Param | Type | Description |
751+
|--------------|------------------------------------------------|------------------------------------|
752+
| programId | <code>string</code> | the program id |
753+
| contentSetId | <code>string</code> (#ContentSet) | the content set id |
754+
755+
756+
<a name="CloudManagerAPI+createContentFlow"></a>
757+
758+
### cloudManagerAPI.createContentFlow(programId, contentFlow) ⇒ [<code>Promise.&lt;ContentFlow&gt;</code>](#ContentFlow)
759+
Crate a content flow
760+
761+
**Kind**: instance method of [<code>CloudManagerAPI</code>](#CloudManagerAPI)
762+
**Returns**: [<code>Promise.&lt;ContentFlow&gt;</code>](#ContentFlow) - the created content flow definition
763+
764+
| Param | Type | Description |
765+
|---------------|------------------------------------------|-----------------------------|
766+
| programId | <code>string</code> | the program id |
767+
| environmentId | <code>string</code> | the environment id |
768+
| contentFlow | [<code>ContentFlow</code>](#ContentFlow) | the content flow definition |
769+
770+
771+
<a name="CloudManagerAPI+getContentFlow"></a>
772+
773+
### cloudManagerAPI.getContentFlow(programId, contentFlowId) ⇒ [<code>Promise.&lt;ContentFlow&gt;</code>](#ContentFlow)
774+
Get a content flow
775+
776+
**Kind**: instance method of [<code>CloudManagerAPI</code>](#CloudManagerAPI)
777+
**Returns**: [<code>Promise.&lt;ContentFlow&gt;</code>](#ContentFlow) - the content flow definition
778+
779+
| Param | Type | Description |
780+
|---------------| --- |---------------------|
781+
| programId | <code>string</code> | the program id |
782+
| contentFlowId | <code>string</code> | the content flow id |
783+
784+
<a name="CloudManagerAPI+listContentFlows"></a>
785+
786+
### cloudManagerAPI.listContentFlows(programId) ⇒ [<code>Promise.&lt;ContentFlowList&gt;</code>](#ContentFlowList)
787+
List content flows
788+
789+
**Kind**: instance method of [<code>CloudManagerAPI</code>](#CloudManagerAPI)
790+
**Returns**: [<code>Promise.&lt;ContentFlowList&gt;</code>](#ContentFlowList) - list of the content flows in the program
791+
792+
| Param | Type | Description |
793+
| --- | --- | --- |
794+
| programId | <code>string</code> | the program id |
795+
796+
<a name="CloudManagerAPI+cancelContentFlow"></a>
797+
798+
### cloudManagerAPI.cancelContentFlow(programId, contentFlowId) ⇒ <code>Promise.&lt;object&gt;</code>
799+
Cancel content flow
800+
801+
**Kind**: instance method of [<code>CloudManagerAPI</code>](#CloudManagerAPI)
802+
**Returns**: <code>Promise.&lt;object&gt;</code> - a truthy value
803+
804+
| Param | Type | Description |
805+
|---------------| --- |---------------------|
806+
| programId | <code>string</code> | the program id |
807+
| contentFlowId | <code>string</code> | the content flow id |
808+
809+
664810
<a name="init"></a>
665811

666812
## init(orgId, apiKey, accessToken, baseUrl) ⇒ [<code>Promise.&lt;CloudManagerAPI&gt;</code>](#CloudManagerAPI)
@@ -676,6 +822,7 @@ Returns a Promise that resolves with a new CloudManagerAPI object.
676822
| accessToken | <code>string</code> | the access token for your integration |
677823
| baseUrl | <code>string</code> | the base URL to access the API (defaults to https://cloudmanager.adobe.io) |
678824

825+
679826
<a name="EmbeddedProgram"></a>
680827

681828
## EmbeddedProgram : <code>object</code>
@@ -927,6 +1074,75 @@ Options to the listPipeline function
9271074
| stageEnvironmentId | <code>string</code> | the new stage environment id |
9281075
| prodEnvironmentId | <code>string</code> | the new prod environment id |
9291076

1077+
1078+
<a name="ContentSet"></a>
1079+
1080+
## ContentSet : <code>object</code>
1081+
**Kind**: global typedef
1082+
**Properties**
1083+
1084+
| Name | Type | Description |
1085+
| --- |-------------------------------| --- |
1086+
| id | <code>string</code> | Identifier of the Content Set |
1087+
| name | <code>string</code> | The name of the content set |
1088+
| paths | <code>[ContentSetPath]</code> | Included asset paths |
1089+
| programId | <code>string</code> | Identifier of the program. Unique within the space |
1090+
1091+
## ContentSetList : <code>object</code>
1092+
**Kind**: global typedef
1093+
**Properties**
1094+
1095+
| Name | Type | Description |
1096+
|--------------------|---------------------------|------------------------------|
1097+
| embedded | <code>[ContentSet]</code> | List of the content sets |
1098+
1099+
1100+
## ContentFlow : <code>object</code>
1101+
**Kind**: global typedef
1102+
**Properties**
1103+
1104+
| Name | Type | Description |
1105+
| --- | --- | --- |
1106+
| contentSetId | <code>string</code> | The content set id |
1107+
| contentSetName | <code>string</code> | The content set name|
1108+
| srcEnvironmentId | <code>string</code> | Source environment id |
1109+
| srcEnvironmentName | <code>string</code> | Source environment name |
1110+
| destEnvironmentId | <code>string</code> | Destination environment id |
1111+
| destEnvironmentName | <code>string</code> | Destination environment name |
1112+
| tier | <code>string</code> | the tier |
1113+
| destProgramId | <code>string</code> | Destination program id |
1114+
| resultDetails | <code>ContentFlowResults</code> | The Content Flow Results |
1115+
1116+
## ContentFlowResults : <code>object</code>
1117+
**Kind**: global typedef
1118+
**Properties**
1119+
1120+
| Name | Type | Description |
1121+
|---------------|---------------------|----------------|
1122+
| exportResults | <code>[ContentFlowResultDetails]</code> | export details |
1123+
| ImportResults | <code>[ContentFlowResultDetails]</code> | import details |
1124+
1125+
1126+
## ContentFlowResultDetails : <code>object</code>
1127+
**Kind**: global typedef
1128+
**Properties**
1129+
1130+
| Name | Type | Description |
1131+
|-----------|---------------------|-----------------------------|
1132+
| errorCode | <code>string</code> | content flow error |
1133+
| message | <code>string</code> | content flow error message |
1134+
| details | <code>[string]</code> | content flow error details |
1135+
| phase | <code>string</code> | content flow phase |
1136+
1137+
## ContentFlowList : <code>object</code>
1138+
**Kind**: global typedef
1139+
**Properties**
1140+
1141+
| Name | Type | Description |
1142+
|--------------------|----------------------------|---------------------------|
1143+
| embedded | <code>[ContentFlow]</code> | List of the content flows |
1144+
1145+
9301146
### Debug Logs
9311147

9321148
```bash

src/SDKErrors.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,12 @@ E('ERROR_FIND_PIPELINE_CACHE_LINK', 'Could not find cache link for pipeline %s f
112112
E('ERROR_PIPELINE_CACHE_INVALIDATE', 'Could not invalidate pipeline cache: %s')
113113
E('ERROR_COMMAND_NOT_RUNNING', 'The command associated with execution %s is not running.')
114114
E('ERROR_NO_LOG_URL', 'Could not get the log url for environment: %s')
115+
E('ERROR_CREATE_CONTENTSET', 'Unable to create content set for program: %s')
116+
E('ERROR_DELETE_CONTENTSET', 'Unable to delete content set: %s')
117+
E('ERROR_GET_CONTENTSET', 'Unable to get content set for program: %s')
118+
E('ERROR_UPDATE_CONTENTSET', 'Unable to update content set %s')
119+
E('ERROR_LIST_CONTENTSETS', 'Unable to list content sets for program: %s')
120+
E('ERROR_CREATE_CONTENTFLOW', 'Unable to create content flow for program %s')
121+
E('ERROR_LIST_CONTENTFLOWS', 'Unable to get content flows for program: %s')
122+
E('ERROR_GET_CONTENTFLOW', 'Unable to get content flow for %s')
123+
E('ERROR_CANCEL_CONTENTFLOW', 'Unable to cancel content flow for %s')

src/constants.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ module.exports = {
3434
commerceCommandExecutionId: 'http://ns.adobe.com/adobecloud/rel/commerceCommandExecution/id',
3535
pipelineCache: 'http://ns.adobe.com/adobecloud/rel/cache',
3636
commerceLogs: 'http://ns.adobe.com/adobecloud/rel/commerceCommandExecution/logs',
37+
contentSet: 'http://ns.adobe.com/adobecloud/rel/contentSet',
38+
contentSets: 'http://ns.adobe.com/adobecloud/rel/contentSets',
39+
contentFlows: 'http://ns.adobe.com/adobecloud/rel/contentFlows',
3740
},
3841
config: {
3942
programId: 'cloudmanager_programid',

0 commit comments

Comments
 (0)