Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@adobe/aio-lib-console

Package Overview
Dependencies
Maintainers
18
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adobe/aio-lib-console

Adobe I/O Lib for the Developer Console

  • 2.2.1-next.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.5K
decreased by-24.47%
Maintainers
18
Weekly downloads
 
Created
Source

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
ExtensionWrokspaceEndpoints : object
ExtensionWorkspaceServices : object
ExtensionWorkspaceDetails : 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

ParamTypeDefaultDescription
accessTokenstringthe access token corresponding to an integration or user token
apiKeystringapi 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

ParamTypeDescription
organizationIdstringOrganization AMS 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

ParamTypeDescription
organizationIdstringOrganization AMS ID
projectDetailsProjectDetailsProject 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

ParamTypeDescription
organizationIdstringOrganization AMS ID
projectDetailsProjectDetailsProject 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

ParamTypeDescription
organizationIdstringOrganization AMS ID
projectIdstringProject ID

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

Delete a Project

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

ParamTypeDescription
organizationIdstringOrganization AMS ID
projectIdstringProject ID

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

Edit a Project

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

ParamTypeDescription
organizationIdstringOrganization AMS ID
projectIdstringProject ID
projectDetailsProjectDetailsProject 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

ParamTypeDescription
organizationIdstringOrganization AMS ID
projectIdstringProject ID

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

Download the Workspace Configuration File (json)

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

ParamTypeDescription
organizationIdstringOrganization AMS ID
projectIdstringProject ID
workspaceIdstringWorkspace ID

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

Create a new Workspace

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

ParamTypeDescription
organizationIdstringOrganization AMS ID
projectIdstringProject ID
workspaceDetailsWorkspaceDetailsWorkspace 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

ParamTypeDescription
organizationIdstringOrganization AMS ID
projectIdstringProject ID
workspaceIdstringWorkspace ID
workspaceDetailsWorkspaceDetailsWorkspace 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

ParamTypeDescription
organizationIdstringOrganization AMS ID
projectIdstringProject ID
workspaceIdstringWorkspace ID

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

Delete a Workspace

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

ParamTypeDescription
organizationIdstringOrganization AMS ID
projectIdstringProject ID
workspaceIdstringWorkspace ID

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

Get all credentials for a Workspace

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

ParamTypeDescription
organizationIdstringOrganization AMS ID
projectIdstringProject ID
workspaceIdstringWorkspace 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

ParamTypeDescription
organizationIdstringOrganization AMS ID
projectIdstringProject ID
workspaceIdstringWorkspace ID
certificateobjectA Readable stream with certificate content. eg: fs.createReadStream()
namestringCredential name
descriptionstringCredential 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

ParamTypeDescription
organizationIdstringOrganization AMS ID
projectIdstringProject ID
workspaceIdstringWorkspace ID
credentialDetailsAdobeIdIntegrationDetailsCredential 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

ParamTypeDescription
organizationIdstringOrganization AMS ID
projectIdstringProject ID
workspaceIdstringWorkspace ID
credentialDetailsAdobeIdIntegrationDetailsCredential 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

ParamTypeDescription
organizationIdstringOrganization AMS ID
projectIdstringProject ID
workspaceIdstringWorkspace ID
credentialTypestringCredential type (adobeid, analytics or entp)
credentialIdstringCredential ID
serviceInfoobjectInformation 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

ParamTypeDescription
organizationIdstringOrganization AMS ID
credentialIdstringCredential ID

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

Get the Project of a Workspace

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

ParamTypeDescription
organizationIdstringOrganization AMS ID
workspaceIdstringWorkspace ID

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

Delete a Workspace Credential

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

ParamTypeDescription
organizationIdstringOrganization AMS ID
projectIdstringProject ID
workspaceIdstringWorkspace ID
credentialTypestringCredential type (adobeid, analytics or entp)
credentialIdstringCredential 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

ParamTypeDescription
organizationIdstringOrganization AMS ID

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

ParamTypeDescription
organizationIdstringOrganization AMS ID
projectIdstringProject ID
workspaceIdstringWorkspace ID

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

Get plugins for workspace

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

ParamTypeDescription
organizationIdstringOrganization AMS ID
projectIdstringProject ID
workspaceIdstringWorkspace ID

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

Get Integrations for an Organization

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

ParamTypeDescription
organizationIdstringOrganization 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

ParamTypeDescription
organizationIdstringOrganization AMS ID
certificateobjectA Readable stream with certificate content. eg: fs.createReadStream()
namestringIntegration name
descriptionstringIntegration 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

ParamTypeDescription
organizationIdstringOrganization AMS ID
integrationDetailsAdobeIdIntegrationDetailsIntegration 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

ParamTypeDescription
organizationIdstringOrganization AMS ID
integrationIdstringIntegration ID to update
integrationDetailsAdobeIdIntegrationDetailsIntegration details

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

Subscribe Organization AdobeId Integration to Services

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

ParamTypeDescription
organizationIdstringOrganization AMS ID
integrationIdstringIntegration ID
serviceInfoobjectInformation 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

ParamTypeDescription
organizationIdstringOrganization AMS ID
integrationIdstringIntegration ID
serviceInfoobjectInformation 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

ParamTypeDescription
organizationIdstringOrganization AMS ID
integrationIdstringIntegration 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

ParamTypeDescription
organizationIdstringOrganization AMS ID
integrationIdstringIntegration ID
certificateobjectA 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

ParamTypeDescription
organizationIdstringOrganization AMS ID
integrationIdstringIntegration ID
bindingIdstringBinding ID

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

Get Integration details

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

ParamTypeDescription
organizationIdstringOrganization AMS ID
integrationIdstringIntegration ID

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

Get Integration secrets

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

ParamTypeDescription
organizationIdstringOrganization AMS ID
integrationIdstringIntegration ID

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

Delete an Integration

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

ParamTypeDescription
organizationIdstringOrganization AMS ID
integrationIdstringIntegration 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

ParamTypeDescription
organizationIdstringOrganization AMS ID
integrationIdstringIntegration ID

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

Get Atlas quota usage for an Integration

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

ParamTypeDescription
organizationIdstringOrganization AMS ID
integrationIdstringIntegration ID

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

Get all available extension points

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

ParamTypeDefaultDescription
organizationIdstringOrganization AMS ID
[xpId]string"firefly"xp ID, default 'firefly'
[options]objectGet options
[options.offset]numberOffset
[options.pageSize]numberpage size

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

Get endpoints in a workspace

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

ParamTypeDescription
organizationIdstringOrganization AMS ID
projectIdstringProject ID
workspaceIdstringWorkspace ID

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

Update endpoints in a workspace

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

ParamTypeDescription
organizationIdstringOrganization AMS ID
projectIdstringProject ID
workspaceIdstringWorkspace ID
endpointDetailsEndpointDetailsendpoint details

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

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

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

ParamTypeDescription
organizationIdstringOrganization AMS ID
integrationIdstringIntegration ID
sdkCodestringthe service sdkCode to query (e.g. AdobeAnalyticsSDK)

createRequestOptions(apiKey, options) ⇒ Array

Create request options compatible with the console swagger definition

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

ParamTypeDescription
apiKeystringapiKey to access console api
optionsobjectoptional data used for building the request options
[options.parameters]objectparameters to set to the request, specific to each endpoint
[options.body]objectrequest 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

ParamTypeDescription
coreConsoleAPIInstanceobjectconsole core api instance
apihoststringconsole api url host

responseInterceptor(res) ⇒ object

A swagger response interceptor for the console sdk

Kind: global function
Returns: object - the response object

ParamTypeDescription
resobjectthe 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

ParamTypeDefaultDescription
accessTokenstringthe access token corresponding to an integration or user token
apiKeystringapi key to access the Developer Console
[env]string"prod"the server environment ('prod' or 'stage')

Response : object

Kind: global typedef
Properties

NameTypeDescription
urlstringrequested url
okbooleanresponse ok indicator
statusnumberresponse status code
statusTextnumberresponse status text
headersobjectresponse headers
bodyobjectresponse body object
objobjectresponse body object
dataobjectresponse body string
textobjectresponse body string

ProjectDetails : object

Kind: global typedef
Properties

NameTypeDescription
namestringName
titlestringTitle
[who_created]stringCreator name
[description]stringDescription
typestringType (default or jaeger)

WorkspaceDetails : object

Kind: global typedef
Properties

NameTypeDescription
namestringName
[title]stringTitle
[who_created]stringCreator name
[description]stringDescription
[type]stringType
[quotaRule]stringquotaRule

AdobeIdIntegrationDetails : object

Kind: global typedef
Properties

NameTypeDescription
namestringName
descriptionstringDescription
platformstringPlatform
[urlScheme]stringurl scheme
[redirectUriList]objectList of redirect URIs
[defaultRedirectUri]stringDefault redirect URI
[domain]stringdomain
[approvalInfo]objectapprovalInfo

ExtensionIcon : object

Kind: global typedef
Properties

NameTypeDescription
idstringId

ExtensionMedia : object

Kind: global typedef
Properties

NameTypeDescription
idstringId
typestringType
orderstringorder

ExtensionDetails : object

Kind: global typedef
Properties

NameTypeDescription
namestringName
titlestringTitle
descriptionstringDescription
versionstringVersion
iconExtensionIconIcon
mediaArray.<ExtensionMedia>array of Media Objects

ExtensionSubmissionDetails : object

Kind: global typedef
Properties

NameTypeDescription
appTypestringapp type
idstringId
notesstringNotes

ExtensionWrokspaceEndpoints : object

Kind: global typedef
Properties

NameTypeDescription
additionalProp1objectadditional property 1
additionalProp2objectadditional property 2

ExtensionWorkspaceServices : object

Kind: global typedef
Properties

NameTypeDescription
codestringCode
namestringName
licenseGroupIdsArray.<string>License group Ids

ExtensionWorkspaceDetails : object

Kind: global typedef
Properties

NameTypeDescription
idstringId
namestringName
endpointsExtensionWrokspaceEndpointsDescription
servicesExtensionWorkspaceServicesServices
iconExtensionIconIcon
releaseNotesstringRelease Notes
technicalUserIdstringTechnical user Id
appIdstringApp Id
publisherIdstringPublisher Id

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.

FAQs

Package last updated on 29 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc