@adobe/aio-lib-console
Adobe I/O Lib for the Developer Console
Last updated 2 months ago by moritzraho .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @adobe/aio-lib-console 
SYNC missed versions from official npm registry.

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

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

Returns a Promise that resolves with a new CoreConsoleAPI object

Typedefs

ProjectDetails : object
WorkspaceDetails : object
IntegrationDetails : 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 Default Description
accessToken string the access token corresponding to an integration or user token
apiKey string api key to access the Developer Console
[env] string "prod" the server environment ('prod' or 'stage')

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 ID

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

Create a new Firefly Project (from template) in an Organization

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

Param Type Description
organizationId string Organization 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 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 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 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 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 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 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 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 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 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 ID
projectId string Project ID
workspaceId string Workspace ID

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

Get all Integrations for a Workspace

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

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

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

Create a new Enterprise Integration

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

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

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

Create a new AdobeID Integration

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

Param Type Description
organizationId string Organization ID
projectId string Project ID
workspaceId string Workspace ID
integrationDetails IntegrationDetails Integration details

coreConsoleAPI.subscribeIntegrationToServices(organizationId, projectId, workspaceId, integrationType, integrationId, serviceInfo) ⇒ Promise.<Response>

Subscribe an Integration to Services

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

Param Type Description
organizationId string Organization ID
projectId string Project ID
workspaceId string Workspace ID
integrationType string Integration type (adobeid, analytics or entp)
integrationId string Integration ID
serviceInfo object Information about the services like SDK Codes, licenseConfig and roles

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

Get the Workspace for an Integration

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

Param Type Description
organizationId string Organization ID
integrationId string Integration 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 ID
workspaceId string Workspace ID

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

Delete an Integration

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

Param Type Description
organizationId string Organization ID
projectId string Project ID
workspaceId string Workspace ID
integrationType string Integration type (adobeid, analytics or entp)
integrationId string Integration ID

coreConsoleAPI.getOrganizations() ⇒ Promise.<Response>

Get all Organizations

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

coreConsoleAPI.getServicesForOrg(organizationId) ⇒ 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 ID

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 Default Description
accessToken string the access token corresponding to an integration or user token
apiKey string api key to access the Developer Console
[env] string "prod" the server environment ('prod' or 'stage')

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

IntegrationDetails : 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

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.

Current Tags

  • 1.2.0                                ...           latest (2 months ago)

7 Versions

  • 1.2.0                                ...           2 months ago
  • 1.1.1                                ...           7 months ago
  • 1.1.0                                ...           7 months ago
  • 1.0.3                                ...           7 months ago
  • 1.0.2                                ...           7 months ago
  • 1.0.1                                ...           7 months ago
  • 1.0.0                                ...           7 months ago

Copyright 2014 - 2016 © taobao.org |