Giter VIP home page Giter VIP logo

aio-lib-console's Introduction

Version Downloads/week Build Status License Codecov Coverage

Adobe I/O Console SDK Library

Installing

$ npm install @adobe/aio-lib-console

Usage

  1. Initialize the SDK
const sdk = require('@adobe/aio-lib-console')

async function sdkTest() {
  //initialize sdk
  const client = await sdk.init('<valid auth token>', 'x-api-key')
}
  1. Call methods using the initialized SDK
const sdk = require('@adobe/aio-lib-console')

async function sdkTest() {
  // initialize sdk
  const client = await sdk.init('<valid auth token>', 'x-api-key')

  // call methods
  try {
    // get... something
    const result = await client.getOrganizations()
    console.log(result)

  } catch (e) {
    console.error(e)
  }
}

Classes

CoreConsoleAPI

This class provides methods to call your CoreConsoleAPI APIs. Before calling any method, initialize the instance by calling the init method on it with valid values for apiKey and accessToken

Functions

createRequestOptions(apiKey, options)Array

Create request options compatible with the console swagger definition

requestInterceptorBuilder(coreConsoleAPIInstance, apihost)function

Build a swagger request interceptor for the console sdk

responseInterceptor(res)object

A swagger response interceptor for the console sdk

init(accessToken, apiKey, env)Promise.<CoreConsoleAPI>

Returns a Promise that resolves with a new CoreConsoleAPI object

Typedefs

Response : object
ProjectDetails : object
WorkspaceDetails : object
AdobeIdIntegrationDetails : object
ExtensionIcon : object
ExtensionMedia : object
ExtensionDetails : object
ExtensionSubmissionDetails : object
ExtensionWorkspaceEndpoints : object
ExtensionWorkspaceServices : object
ExtensionWorkspaceDetails : object
ServiceInfo : object
SubscribeToServices : object
LicenseConfig : object
Role : object
OauthS2SIntegrationDetails : object

CoreConsoleAPI

This class provides methods to call your CoreConsoleAPI APIs. Before calling any method, initialize the instance by calling the init method on it with valid values for apiKey and accessToken

Kind: global class

coreConsoleAPI.init(accessToken, apiKey, env) ⇒ Promise.<CoreConsoleAPI>

Initializes a CoreConsoleAPI object and returns it

Kind: instance method of CoreConsoleAPI
Returns: Promise.<CoreConsoleAPI> - a CoreConsoleAPI object

Param Type Description
accessToken string the access token corresponding to an integration or user token
apiKey string api key to access the Developer Console
env string The name of the environment. prod and stage are the only values supported. prod is default and any value other than prod or stage it is assumed to be the default value of prod. If not set, it will get the global cli env value. See https://github.com/adobe/aio-lib-env (which defaults to prod as well if not set)

coreConsoleAPI.getProjectsForOrg(organizationId) ⇒ Promise.<Response>

Get all Projects in an Organization

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID

coreConsoleAPI.createFireflyProject(organizationId, projectDetails) ⇒ Promise.<Response>

Create a new App Builder Project (from template) in an Organization

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
projectDetails ProjectDetails Project details including name, title, who_created, description and type

coreConsoleAPI.createProject(organizationId, projectDetails) ⇒ Promise.<Response>

Create a new Project in an Organization

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
projectDetails ProjectDetails Project details including name, title, who_created, description and type

coreConsoleAPI.getWorkspacesForProject(organizationId, projectId) ⇒ Promise.<Response>

Get all Workspaces for a Project

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
projectId string Project ID

coreConsoleAPI.deleteProject(organizationId, projectId) ⇒ Promise.<Response>

Delete a Project

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
projectId string Project ID

coreConsoleAPI.editProject(organizationId, projectId, projectDetails) ⇒ Promise.<Response>

Edit a Project

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
projectId string Project ID
projectDetails ProjectDetails Project details including name, title, who_created, description and type

coreConsoleAPI.getProject(organizationId, projectId) ⇒ Promise.<Response>

Get a Project by ID

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
projectId string Project ID

coreConsoleAPI.downloadWorkspaceJson(organizationId, projectId, workspaceId) ⇒ Promise.<Response>

Download the Workspace Configuration File (json)

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
projectId string Project ID
workspaceId string Workspace ID

coreConsoleAPI.createWorkspace(organizationId, projectId, workspaceDetails) ⇒ Promise.<Response>

Create a new Workspace

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
projectId string Project ID
workspaceDetails WorkspaceDetails Workspace details including name, title, who_created, description, type and quotaRule

coreConsoleAPI.editWorkspace(organizationId, projectId, workspaceId, workspaceDetails) ⇒ Promise.<Response>

Edit a Workspace

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
projectId string Project ID
workspaceId string Workspace ID
workspaceDetails WorkspaceDetails Workspace details including name, title, who_created, description, type and quotaRule

coreConsoleAPI.getWorkspace(organizationId, projectId, workspaceId) ⇒ Promise.<Response>

Get a Workspace by ID

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
projectId string Project ID
workspaceId string Workspace ID

coreConsoleAPI.deleteWorkspace(organizationId, projectId, workspaceId) ⇒ Promise.<Response>

Delete a Workspace

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
projectId string Project ID
workspaceId string Workspace ID

coreConsoleAPI.getCredentials(organizationId, projectId, workspaceId) ⇒ Promise.<Response>

Get all credentials for a Workspace

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
projectId string Project ID
workspaceId string Workspace ID

coreConsoleAPI.createOAuthServerToServerCredential(organizationId, projectId, workspaceId, name, description) ⇒ Promise.<Response>

Create a new OAuth Server-to-Server Credential for a Workspace

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
projectId string Project ID
workspaceId string Workspace ID
name string Credential name
description string Credential description

coreConsoleAPI.getProjectInstallConfig(projectId) ⇒ Promise.<Response>

Get the install config for an Adobe Developer Console project

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
projectId string Project ID

coreConsoleAPI.createEnterpriseCredential(organizationId, projectId, workspaceId, certificate, name, description) ⇒ Promise.<Response>

Create a new Enterprise Credential for a Workspace

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
projectId string Project ID
workspaceId string Workspace ID
certificate object A Readable stream with certificate content. eg: fs.createReadStream()
name string Credential name
description string Credential description

coreConsoleAPI.createAdobeIdCredential(organizationId, projectId, workspaceId, credentialDetails) ⇒ Promise.<Response>

Create a new AdobeID Credential for a Workspace

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
projectId string Project ID
workspaceId string Workspace ID
credentialDetails AdobeIdIntegrationDetails Credential details

coreConsoleAPI.createAnalyticsCredential(organizationId, projectId, workspaceId, credentialDetails) ⇒ Promise.<Response>

Create a new Analytics Credential for a Workspace

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
projectId string Project ID
workspaceId string Workspace ID
credentialDetails AdobeIdIntegrationDetails Credential details

coreConsoleAPI.subscribeCredentialToServices(organizationId, projectId, workspaceId, credentialType, credentialId, serviceInfo) ⇒ Promise.<Response>

Subscribe a Workspace Credential to Services

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
projectId string Project ID
workspaceId string Workspace ID
credentialType string Credential type (adobeid, analytics or entp)
credentialId string Credential ID
serviceInfo Array.<ServiceInfo> Information about the services like SDK Codes, licenseConfig and roles

coreConsoleAPI.getWorkspaceForCredential(organizationId, credentialId) ⇒ Promise.<Response>

Get the Workspace from a Credential ID

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
credentialId string Credential ID

coreConsoleAPI.getProjectForWorkspace(organizationId, workspaceId) ⇒ Promise.<Response>

Get the Project of a Workspace

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
workspaceId string Workspace ID

coreConsoleAPI.deleteCredential(organizationId, projectId, workspaceId, credentialType, credentialId) ⇒ Promise.<Response>

Deprecated

Delete a Workspace Credential

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
projectId string Project ID
workspaceId string Workspace ID
credentialType string Credential type (adobeid, analytics or entp). Unused.
credentialId string Credential ID

coreConsoleAPI.deleteCredentialById(organizationId, projectId, workspaceId, credentialId) ⇒ Promise.<Response>

Delete a Workspace Credential by credential id.

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
projectId string Project ID
workspaceId string Workspace ID
credentialId string Credential ID

coreConsoleAPI.getOrganizations() ⇒ Promise.<Response>

Get all Organizations

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

coreConsoleAPI.getServicesForOrg(organizationId, sdkCodes) ⇒ Promise.<Response>

Get all Services available to an Organization

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
sdkCodes string comma separated list of sdk codes

coreConsoleAPI.getServicesForOrgV2(imsOrgId, sdkCodes) ⇒ Promise.<Response>

Get org services v2. Can be used for getting services for a user in an org irrespective of the user's role in the org. They should just be a member. Also includes the information needed for requesting access to services that support it.

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
imsOrgId string IMS org id in format abc@AdobeOrg
sdkCodes string comma separated list of sdk codes

coreConsoleAPI.checkOrgDevTerms(organizationId) ⇒ Promise.<Response>

Check developer terms acceptance

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID

coreConsoleAPI.acceptOrgDevTerms(organizationId) ⇒ Promise.<Response>

Accept developer terms

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID

coreConsoleAPI.getDevTerms() ⇒ Promise.<Response>

Get developer terms

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

coreConsoleAPI.createRuntimeNamespace(organizationId, projectId, workspaceId) ⇒ Promise.<Response>

Create an Adobe I/O Runtime namespace in the given workspace

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
projectId string Project ID
workspaceId string Workspace ID

coreConsoleAPI.getPluginsForWorkspace(organizationId, projectId, workspaceId) ⇒ Promise.<Response>

Get plugins for workspace

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
projectId string Project ID
workspaceId string Workspace ID

coreConsoleAPI.getIntegrationsForOrg(organizationId) ⇒ Promise.<Response>

Get Integrations for an Organization

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID

coreConsoleAPI.createEnterpriseIntegration(organizationId, certificate, name, description) ⇒ Promise.<Response>

Create a new Enterprise Integration for an Organization

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
certificate object A Readable stream with certificate content. eg: fs.createReadStream()
name string Integration name
description string Integration description

coreConsoleAPI.createAdobeIdIntegration(organizationId, integrationDetails) ⇒ Promise.<Response>

Create a new AdobeID Integration for an Organization

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
integrationDetails AdobeIdIntegrationDetails Integration details

coreConsoleAPI.updateAdobeIdIntegration(organizationId, integrationId, integrationDetails) ⇒ Promise.<Response>

Update an AdobeID Integration for an Organization

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
integrationId string Integration ID to update
integrationDetails AdobeIdIntegrationDetails Integration details

coreConsoleAPI.subscribeAdobeIdIntegrationToServices(organizationId, integrationId, serviceInfo) ⇒ Promise.<Response>

Subscribe Organization AdobeId Integration to Services

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
integrationId string Integration ID
serviceInfo object Information about the services like SDK Codes, licenseConfig and roles

coreConsoleAPI.subscribeEnterpriseIntegrationToServices(organizationId, integrationId, serviceInfo) ⇒ Promise.<Response>

Subscribe Organization Enterprise Integration to Services

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
integrationId string Integration ID
serviceInfo object Information about the services like SDK Codes, licenseConfig and roles

coreConsoleAPI.subscribeOAuthServerToServerIntegrationToServices(organizationId, credentialId, serviceInfo) ⇒ Promise.<Response>

Subscribe Organization OAuth Server-to-Server Integration to Services

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
credentialId string Credential ID
serviceInfo object Information about the services like SDK Codes, licenseConfig and roles

coreConsoleAPI.getBindingsForIntegration(organizationId, integrationId) ⇒ Promise.<Response>

List certification bindings for an Integration

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
integrationId string Integration ID

coreConsoleAPI.uploadAndBindCertificate(organizationId, integrationId, certificate) ⇒ Promise.<Response>

Upload and bind a certificate to an Organization Integration

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
integrationId string Integration ID
certificate object A Readable stream with certificate content. eg: fs.createReadStream()

coreConsoleAPI.deleteBinding(organizationId, integrationId, bindingId) ⇒ Promise.<Response>

Delete a certificate binding for an Integration

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
integrationId string Integration ID
bindingId string Binding ID

coreConsoleAPI.getIntegration(organizationId, integrationId) ⇒ Promise.<Response>

Get Integration details

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
integrationId string Integration ID

coreConsoleAPI.getIntegrationSecrets(organizationId, integrationId) ⇒ Promise.<Response>

Get Integration secrets

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
integrationId string Integration ID

coreConsoleAPI.deleteIntegration(organizationId, integrationId) ⇒ Promise.<Response>

Delete an Integration

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
integrationId string Integration ID

coreConsoleAPI.createIMSOrg() ⇒ Promise.<Response>

Create an IMS Org

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

coreConsoleAPI.getAtlasApplicationPolicy(organizationId, integrationId) ⇒ Promise.<Response>

Get Application Atlas Policy for an Integration

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
integrationId string Integration ID

coreConsoleAPI.getAtlasQuotaUsage(organizationId, integrationId) ⇒ Promise.<Response>

Get Atlas quota usage for an Integration

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
integrationId string Integration ID

coreConsoleAPI.getAllExtensionPoints(organizationId, [xpId], [options]) ⇒ Promise.<Response>

Get all available extension points

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Default Description
organizationId string Organization AMS ID
[xpId] string "firefly" xp ID, default 'firefly'
[options] object Get options
[options.offset] number Offset
[options.pageSize] number page size

coreConsoleAPI.getApplicationExtensions(organizationId, applicationId) ⇒ Promise.<Response>

Get Extensions for an App Builder application

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
applicationId string App Builder Application ID

coreConsoleAPI.getEndPointsInWorkspace(organizationId, projectId, workspaceId) ⇒ Promise.<Response>

Get endpoints in a workspace

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
projectId string Project ID
workspaceId string Workspace ID

coreConsoleAPI.updateEndPointsInWorkspace(organizationId, projectId, workspaceId, endpointDetails) ⇒ Promise.<Response>

Update endpoints in a workspace

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
projectId string Project ID
workspaceId string Workspace ID
endpointDetails object endpoint details

coreConsoleAPI.getSDKProperties(organizationId, integrationId, sdkCode) ⇒ Promise.<Response>

Get details about a service (SDK) subscribed to an integration

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
integrationId string Integration ID
sdkCode string the service sdkCode to query (e.g. AdobeAnalyticsSDK)

coreConsoleAPI.createOauthS2SCredentialIntegration(organizationId, integrationDetails) ⇒ Promise.<Response>

Create a new oauth server to server credential for an Organization

Kind: instance method of CoreConsoleAPI
Returns: Promise.<Response> - the response

Param Type Description
organizationId string Organization AMS ID
integrationDetails OauthS2SIntegrationDetails Integration details

createRequestOptions(apiKey, options) ⇒ Array

Create request options compatible with the console swagger definition

Kind: global function
Returns: Array - [{ swaggerParameters }, { requestBody }]

Param Type Description
apiKey string apiKey to access console api
options object optional data used for building the request options
[options.parameters] object parameters to set to the request, specific to each endpoint
[options.body] object request body for the request

requestInterceptorBuilder(coreConsoleAPIInstance, apihost) ⇒ function

Build a swagger request interceptor for the console sdk

Kind: global function
Returns: function - a request interceptor

Param Type Description
coreConsoleAPIInstance object console core api instance
apihost string console api url host

responseInterceptor(res) ⇒ object

A swagger response interceptor for the console sdk

Kind: global function
Returns: object - the response object

Param Type Description
res object the response object

init(accessToken, apiKey, env) ⇒ Promise.<CoreConsoleAPI>

Returns a Promise that resolves with a new CoreConsoleAPI object

Kind: global function
Returns: Promise.<CoreConsoleAPI> - a Promise with a CoreConsoleAPI object

Param Type Description
accessToken string the access token corresponding to an integration or user token
apiKey string api key to access the Developer Console
env string The name of the environment. prod and stage are the only values supported. prod is default and any value other than prod or stage it is assumed to be the default value of prod. If not set, it will get the global cli env value. See https://github.com/adobe/aio-lib-env (which defaults to prod as well if not set)

Response : object

Kind: global typedef
Properties

Name Type Description
url string requested url
ok boolean response ok indicator
status number response status code
statusText number response status text
headers object response headers
body object response body object
obj object response body object
data object response body string
text object response body string

ProjectDetails : object

Kind: global typedef
Properties

Name Type Description
name string Name
title string Title
[who_created] string Creator name
[description] string Description
type string Type (default or jaeger)

WorkspaceDetails : object

Kind: global typedef
Properties

Name Type Description
name string Name
[title] string Title
[who_created] string Creator name
[description] string Description
[type] string Type
[quotaRule] string quotaRule

AdobeIdIntegrationDetails : object

Kind: global typedef
Properties

Name Type Description
name string Name
description string Description
platform string Platform
[urlScheme] string url scheme
[redirectUriList] object List of redirect URIs
[defaultRedirectUri] string Default redirect URI
[domain] string domain
[approvalInfo] object approvalInfo
[templateId] string templateId
[services] Array.<SubscribeToServices> services

ExtensionIcon : object

Kind: global typedef
Properties

Name Type Description
id string Id

ExtensionMedia : object

Kind: global typedef
Properties

Name Type Description
id string Id
type string Type
order string order

ExtensionDetails : object

Kind: global typedef
Properties

Name Type Description
name string Name
title string Title
description string Description
version string Version
icon ExtensionIcon Icon
media Array.<ExtensionMedia> array of Media Objects

ExtensionSubmissionDetails : object

Kind: global typedef
Properties

Name Type Description
appType string app type
id string Id
notes string Notes

ExtensionWorkspaceEndpoints : object

Kind: global typedef
Properties

Name Type Description
additionalProp1 object additional property 1
additionalProp2 object additional property 2

ExtensionWorkspaceServices : object

Kind: global typedef
Properties

Name Type Description
code string Code
name string Name
licenseGroupIds Array.<string> License group Ids

ExtensionWorkspaceDetails : object

Kind: global typedef
Properties

Name Type Description
id string Id
name string Name
endpoints ExtensionWorkspaceEndpoints Description
services ExtensionWorkspaceServices Services
icon ExtensionIcon Icon
releaseNotes string Release Notes
technicalUserId string Technical user Id
appId string App Id
publisherId string Publisher Id

ServiceInfo : object

Kind: global typedef
Properties

Name Type Description
sdkCode string the sdk code
roles Array.<Role> the roles
licenseConfigs Array.<LicenseConfig> the license configs

SubscribeToServices : object

Kind: global typedef
Properties

Name Type Description
sdkCode string the sdk code
atlasPlanCode string the atlas plan code
roles Array.<Role> the roles
licenseConfigs Array.<LicenseConfig> the license configs

LicenseConfig : object

Kind: global typedef
Properties

Name Type Description
op string the operation (e.g. 'add')
id string the license id
productId string the product id

Role : object

Kind: global typedef
Properties

Name Type Description
id number the role id
code string the role code
name string the role name

OauthS2SIntegrationDetails : object

Kind: global typedef
Properties

Name Type Description
name string Name
description string Description
[templateId] string templateId
[services] Array.<SubscribeToServices> services

Debug Logs

LOG_LEVEL=debug <your_call_here>

Prepend the LOG_LEVEL environment variable and debug value to the call that invokes your function, on the command line. This should output a lot of debug data for your SDK calls.

Contributing

Contributions are welcome! Read the Contributing Guide for more information.

Licensing

This project is licensed under the Apache V2 License. See LICENSE for more information.

aio-lib-console's People

Contributors

adamcin avatar amulyakashyap09 avatar arjuncooliitr avatar dc297 avatar dependabot[bot] avatar florind-ens avatar greenkeeper[bot] avatar himavanth avatar michaelgoberling avatar moritzraho avatar purplecabbage avatar sandeep-paliwal avatar shazron avatar slitviachenko avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aio-lib-console's Issues

e2e failures

Expand to see Test Log
❯ npm run e2e

> @adobe/[email protected] e2e /Users/shazron/Documents/git/work/adobe/aio-lib-console
> jest --config e2e/jest.config.js

 FAIL  e2e/e2e.js (71.321 s)
  init and input checks
    ✓ sdk init test (1 ms)
    ✓ test bad access token (1339 ms)
    ✓ test bad api key (1062 ms)
  organizations
    ✓ test getOrganizations API (1249 ms)
    ✓ test getProjectsForOrg API (2185 ms)
  create, edit, get
    ✓ test createFireflyProject API (3267 ms)
    ✓ test createProject API (default project type) (1101 ms)
    ✓ test editProject API (default project type) (842 ms)
    ✓ test editProject API for firefly project (1053 ms)
    ✓ test getProject API (default type) (1100 ms)
    ✓ test getProject API (firefly project type) (1154 ms)
    ✓ test createWorkspace API for default project type - should fail because only one is allowed for a default project (1091 ms)
    ✓ test deleteWorkspace API for default project type (to delete the default workspace) (1153 ms)
    ✓ test createWorkspace API for default project type (1219 ms)
    ✓ test createWorkspace API for firefly project type (1380 ms)
    ✓ test getWorkspacesForProject API for firefly project type (1304 ms)
    ✓ test getWorkspacesForProject API for default project type (1100 ms)
    ✓ test editWorkspace API for default project type (1277 ms)
    ✓ test editWorkspace API for firefly project type (1275 ms)
    ✓ test getWorkspace API for default project type (1114 ms)
    ✓ test getWorkspace API for firefly project type (1016 ms)
    ✓ test getProjectForWorkspace API for default project type (1176 ms)
    ✓ test getProjectForWorkspace API for firefly project type (1420 ms)
  Workspace credential test
    Enterprise credentials
      ✓ test createEnterpriseCredential API (2715 ms)
      ✓ test getCredentials API (service) (1040 ms)
      ✓ test subscribeCredentialToServices API (AdobeIOManagementAPISDK) (2354 ms)
      ✓ test downloadWorkspaceJson API (2526 ms)
      ✓ test getIntegration API (1022 ms)
      ✓ test getIntegrationSecrets API (1456 ms)
      ✓ test uploadAndBindCertificate API (1636 ms)
      ✓ test deleteCredential API (integrationType: entp) (2613 ms)
    AdobeID credentials
      ✕ test createAdobeIdCredential API (1137 ms)
      ✕ test getCredentials API (oauthweb) (1 ms)
      ✕ test subscribeCredentialToServices API (Adobe Stock) (1 ms)
      ✕ test getWorkspaceForCredential API
      ✕ test getIntegration API
      ✕ test getIntegrationSecrets API
      ✕ test deleteCredential API (integrationType: adobeid)
  Extension API tests
    ✓ test get ALL ExtensionPoints API (1426 ms)
    ✕ test update endpoints for workspace API (1447 ms)
    ✕ test get endpoints for workspace API (1189 ms)
  delete workspace/project
    ✓ test deleteWorkspace API (1237 ms)
    ✓ test deleteWorkspace API for firefly project (1269 ms)
    ✓ test deleteProject API (default type) (1100 ms)
    ✕ test deleteProject API (firefly project template) (873 ms)
  dev terms
    ✓ get dev terms (1305 ms)
    ✓ check dev terms (1084 ms)
    ✓ accept dev terms (1173 ms)
  getSDKProperties
    ✕ getSDKProperties (1179 ms)
  create, edit, get, delete: test trailing spaces
    ✕ test trailing spaces for firefly project (6197 ms)
    ✓ test trailing spaces for firefly workspace (3630 ms)
    ✕ delete (2176 ms)

  ● Workspace credential test › AdobeID credentials › test createAdobeIdCredential API

    CoreConsoleAPIError: [CoreConsoleAPISDK:ERROR_CREATE_ADOBEID_CREDENTIAL] 400 - Bad Request ({"id":"e5a8b3e0-5966-4820-bb62-c70e94ff2979","messages":[{"template":"ERR_MSG_GENERIC_MESSAGE","message":"adobeid invalid platform Web"}]})

      523 |       return res
      524 |     } catch (err) {
    > 525 |       throw new codes.ERROR_CREATE_ADOBEID_CREDENTIAL({ sdkDetails, messageValues: reduceError(err) })
          |             ^
      526 |     }
      527 |   }
      528 |

      at new <anonymous> (../node_modules/@adobe/aio-lib-core-errors/src/AioCoreSDKErrorWrapper.js:33:9)
      at CoreConsoleAPI.createAdobeIdCredential (../src/index.js:525:13)
      at Object.<anonymous> (e2e.js:495:19)

  ● Workspace credential test › AdobeID credentials › test getCredentials API (oauthweb)

    expect(received).toBeDefined()

    Received: undefined

      503 |
      504 |     test('test getCredentials API (oauthweb)', async () => {
    > 505 |       expect(credentialId).toBeDefined() // if not, createAdobeIdCredential test failed
          |                            ^
      506 |       expect(orgId).toBeDefined()
      507 |       expect(projectId).toBeDefined()
      508 |       expect(workspaceId).toBeDefined()

      at Object.<anonymous> (e2e.js:505:28)

  ● Workspace credential test › AdobeID credentials › test subscribeCredentialToServices API (Adobe Stock)

    expect(received).toBeDefined()

    Received: undefined

      520 |
      521 |     test('test subscribeCredentialToServices API (Adobe Stock)', async () => {
    > 522 |       expect(credentialId).toBeDefined() // if not, createAdobeIdCredential test failed
          |                            ^
      523 |       expect(orgId).toBeDefined()
      524 |       expect(projectId).toBeDefined()
      525 |       expect(workspaceId).toBeDefined()

      at Object.<anonymous> (e2e.js:522:28)

  ● Workspace credential test › AdobeID credentials › test getWorkspaceForCredential API

    expect(received).toBeDefined()

    Received: undefined

      541 |
      542 |     test('test getWorkspaceForCredential API', async () => {
    > 543 |       expect(credentialId).toBeDefined() // if not, createAdobeIdCredential test failed
          |                            ^
      544 |       expect(orgId).toBeDefined()
      545 |       expect(projectId).toBeDefined()
      546 |       expect(workspaceId).toBeDefined()

      at Object.<anonymous> (e2e.js:543:28)

  ● Workspace credential test › AdobeID credentials › test getIntegration API

    expect(received).toBeDefined()

    Received: undefined

      557 |     // organization integration APIs on workspace credentials
      558 |     test('test getIntegration API', async () => {
    > 559 |       expect(credentialId).toBeDefined() // if not, createEnterpriseIntegration test failed
          |                            ^
      560 |       expect(orgId).toBeDefined()
      561 |       const res = await sdkClient.getIntegration(orgId, credentialId)
      562 |       expect(res.ok).toBe(true)

      at Object.<anonymous> (e2e.js:559:28)

  ● Workspace credential test › AdobeID credentials › test getIntegrationSecrets API

    expect(received).toBeDefined()

    Received: undefined

      569 |
      570 |     test('test getIntegrationSecrets API', async () => {
    > 571 |       expect(credentialId).toBeDefined() // if not, createEnterpriseIntegration test failed
          |                            ^
      572 |       expect(orgId).toBeDefined()
      573 |       const res = await sdkClient.getIntegrationSecrets(orgId, credentialId)
      574 |       expect(res.ok).toBe(true)

      at Object.<anonymous> (e2e.js:571:28)

  ● Workspace credential test › AdobeID credentials › test deleteCredential API (integrationType: adobeid)

    expect(received).toBeDefined()

    Received: undefined

      610 |     // delete
      611 |     test('test deleteCredential API (integrationType: adobeid)', async () => {
    > 612 |       expect(credentialId).toBeDefined() // if not, createAdobeIdCredential test failed
          |                            ^
      613 |       expect(orgId).toBeDefined()
      614 |       expect(projectId).toBeDefined()
      615 |       expect(workspaceId).toBeDefined()

      at Object.<anonymous> (e2e.js:612:28)

  ● Extension API tests › test update endpoints for workspace API

    CoreConsoleAPIError: [CoreConsoleAPISDK:ERROR_UPDATE_WORKSPACE_ENDPOINTS] 400 - Bad Request ([{"template":"ERR_MSG_RETRY_OR_CONTACT","message":"{\"errors\":[{\"error_code\":\"1060\",\"message\":\"Extension point 'firefly/excshell/1' does not exist\"}]}"}])

      1207 |       return res
      1208 |     } catch (err) {
    > 1209 |       throw new codes.ERROR_UPDATE_WORKSPACE_ENDPOINTS({ sdkDetails, messageValues: reduceError(err) })
           |             ^
      1210 |     }
      1211 |   }
      1212 |

      at new <anonymous> (../node_modules/@adobe/aio-lib-core-errors/src/AioCoreSDKErrorWrapper.js:33:9)
      at CoreConsoleAPI.updateEndPointsInWorkspace (../src/index.js:1209:13)
      at Object.<anonymous> (e2e.js:647:17)

  ● Extension API tests › test get endpoints for workspace API

    CoreConsoleAPIError: [CoreConsoleAPISDK:ERROR_GET_WORKSPACE_ENDPOINTS] 400 - Bad Request ([{"template":"ERR_MSG_RETRY_OR_CONTACT","message":"{\"errors\":[{\"error_code\":\"1095\",\"message\":\"Workspace 'WN1655954575512' not found\"}]}"}])

      1183 |       return res
      1184 |     } catch (err) {
    > 1185 |       throw new codes.ERROR_GET_WORKSPACE_ENDPOINTS({ sdkDetails, messageValues: reduceError(err) })
           |             ^
      1186 |     }
      1187 |   }
      1188 |

      at new <anonymous> (../node_modules/@adobe/aio-lib-core-errors/src/AioCoreSDKErrorWrapper.js:33:9)
      at CoreConsoleAPI.getEndPointsInWorkspace (../src/index.js:1185:13)
      at Object.<anonymous> (e2e.js:655:17)

  ● delete workspace/project › test deleteProject API (firefly project template)

    CoreConsoleAPIError: [CoreConsoleAPISDK:ERROR_DELETE_PROJECT] 400 - Bad Request ("Project Firefly can not be deleted")

      284 |       return res
      285 |     } catch (err) {
    > 286 |       throw new codes.ERROR_DELETE_PROJECT({ sdkDetails, messageValues: reduceError(err) })
          |             ^
      287 |     }
      288 |   }
      289 |

      at new <anonymous> (../node_modules/@adobe/aio-lib-core-errors/src/AioCoreSDKErrorWrapper.js:33:9)
      at CoreConsoleAPI.deleteProject (../src/index.js:286:13)
      at Object.<anonymous> (e2e.js:700:17)

  ● getSDKProperties › getSDKProperties

    CoreConsoleAPIError: [CoreConsoleAPISDK:ERROR_GET_SDK_PROPERTIES] 404 - Not Found ({"id":"f2af7f56-a6c5-45f3-bd8a-f32b0fe3b13d","messages":[{"template":"ERR_MSG_NOT_FOUND"}]})

      1240 |       return res
      1241 |     } catch (err) {
    > 1242 |       throw new codes.ERROR_GET_SDK_PROPERTIES({ sdkDetails, messageValues: reduceError(err) })
           |             ^
      1243 |     }
      1244 |   }
      1245 | }

      at new <anonymous> (../node_modules/@adobe/aio-lib-core-errors/src/AioCoreSDKErrorWrapper.js:33:9)
      at CoreConsoleAPI.getSDKProperties (../src/index.js:1242:13)
      at Object.<anonymous> (e2e.js:873:17)

  ● create, edit, get, delete: test trailing spaces › test trailing spaces for firefly project

    CoreConsoleAPIError: [CoreConsoleAPISDK:ERROR_EDIT_PROJECT] 400 - Bad Request ("Invalid value(s)")

      308 |       return res
      309 |     } catch (err) {
    > 310 |       throw new codes.ERROR_EDIT_PROJECT({ sdkDetails, messageValues: reduceError(err) })
          |             ^
      311 |     }
      312 |   }
      313 |

      at new <anonymous> (../node_modules/@adobe/aio-lib-core-errors/src/AioCoreSDKErrorWrapper.js:33:9)
      at CoreConsoleAPI.editProject (../src/index.js:310:13)
      at Object.<anonymous> (e2e.js:909:11)

  ● create, edit, get, delete: test trailing spaces › delete

    CoreConsoleAPIError: [CoreConsoleAPISDK:ERROR_DELETE_PROJECT] 400 - Bad Request ("Project Firefly can not be deleted")

      284 |       return res
      285 |     } catch (err) {
    > 286 |       throw new codes.ERROR_DELETE_PROJECT({ sdkDetails, messageValues: reduceError(err) })
          |             ^
      287 |     }
      288 |   }
      289 |

      at new <anonymous> (../node_modules/@adobe/aio-lib-core-errors/src/AioCoreSDKErrorWrapper.js:33:9)
      at CoreConsoleAPI.deleteProject (../src/index.js:286:13)
      at Object.<anonymous> (e2e.js:954:11)

Test Suites: 1 failed, 1 total
Tests:       13 failed, 39 passed, 52 total
Snapshots:   0 total
Time:        71.369 s
Ran all test suites.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @adobe/[email protected] e2e: `jest --config e2e/jest.config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @adobe/[email protected] e2e script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/shazron/.npm/_logs/2022-06-23T03_24_06_805Z-debug.log

An in-range update of swagger-client is breaking the build 🚨


🚨 Reminder! Less than one month left to migrate your repositories over to Snyk before Greenkeeper says goodbye on June 3rd! 💜 🚚💨 💚

Find out how to migrate to Snyk at greenkeeper.io


The dependency swagger-client was updated from 3.10.1 to 3.10.2.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

swagger-client is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details

Commits

The new version differs by 22 commits.

  • cb95875 release: v3.10.2
  • af7f7b5 fix: amend header serialization algorithm (#1523)
  • d89a926 docs(tags-interface): add authorizations example (#1525)
  • 39d8b0c docs(tags-interface): document usage of security
  • 0340b15 test(client): fix test for requesting https over http
  • b55fa92 docs(http-client): document possible upload progress
  • 0dffbec Fix typos in documentation (#1520)
  • 3e7d9bf refactor: use noop instead of Function object (#1515)
  • dcddd66 docs(tags-interface): add file uploads example
  • 42718aa docs(try-it-out): add docs for attachContentTypeForEmptyPayload option
  • 13ed570 docs(try-it-out): document interceptor options
  • d82c8dc docs(try-it-out): add array parameter example
  • 2213b8d docs(resolver): fix option default value and description
  • 8a2357b docs(resolver): mention instance method
  • da389b0 docs(API): add basic documentation about library API

There are 22 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Attempting to create a workspace that already exists throws Bad Request.

Expected Behaviour

The user should be informed of why the request failed.

Actual Behaviour

A generic Bad Request error is thrown which doesn't provide enough info about the error.

Reproduce Scenario (including but not limited to)

Create a workspace with a name that already exists.

Steps to Reproduce

Platform and Version

Sample Code that illustrates the problem

Logs taken while reproducing problem

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.