Options
All
  • Public
  • Public/Protected
  • All
Menu

dc-management-sdk-js

Index

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Object literals

Type aliases

FacetField

FacetField: EnumFacet | DateFacet

HierarchyChildrenModelJson

HierarchyChildrenModelJson: HierarchyNodeModel & { children: Array<HierarchyNodeModel> }

HierarchyNodeModel

HierarchyNodeModel: HierarchyMeta & { contentTypeUri: string; hasChildren: boolean; id: string; label: string; publishingStatus: ContentItemPublishingStatus | string; repositoryId: string }

HierarchyParentModelJson

HierarchyParentModelJson: HierarchyNodeModel & { parents: Array<HierarchyNodeModel> }

WebhookCustomPayload

WebhookCustomPayload: { type: "text/x-handlebars-template"; value: string }

A custom payload format for the webhook.

Type declaration

  • type: "text/x-handlebars-template"

    MIME type of the custom payload.

  • value: string

    Custom payload.

WebhookFilter

WebhookFilter: { arguments: [WebhookFilterJSONPathArgument, WebhookFilterValueArgument]; type: "equal" | "in" }

A webhook filter.

Type declaration

WebhookFilterJSONPathArgument

WebhookFilterJSONPathArgument: { jsonPath: string }

A JSON Path argument.

Type declaration

  • jsonPath: string

WebhookFilterValueArgument

WebhookFilterValueArgument: { value: string | string[] }

A value argument.

Type declaration

  • value: string | string[]

WebhookHeader

WebhookHeader: { key: string; secret?: boolean; value: string }

A custom webhook header which will be sent along with a webhook.

Type declaration

  • key: string

    The header

  • Optional secret?: boolean

    Indicates this header value is sensitive.

  • value: string

    The header's value.

Variables

Const FACETED_CONTENT_ITEM

FACETED_CONTENT_ITEM: { schema: string } = (() => {const facetedContentItem = {...CONTENT_ITEM,schema: CONTENT_ITEM.body._meta.schema,};delete facetedContentItem.body;return facetedContentItem;})()

Type declaration

  • schema: string

Const FIXTURE_WEBHOOK_WITH_EXTRA_PROPS

FIXTURE_WEBHOOK_WITH_EXTRA_PROPS: Webhook = new Webhook({active: true,label: 'Unit Test',handlers: ['http://example.com/webhook'],method: 'POST',events: ['dynamic-content.content-item.created'],filters: [{type: 'equal',arguments: [{jsonPath: '$.payload.id',},{value: 'abc',},],},{type: 'in',arguments: [{jsonPath: '$.payload.id',},{value: ['abc', 'def'],},],},{type: 'equal',arguments: [{jsonPath: '$.payload.not_present',},{value: '123',},],},],headers: [{key: 'X-Secret',value: 'abc123',secret: true,},{key: 'X-Header',value: 'abc123',},],customPayload: {type: 'text/x-handlebars-template',value:'{{#withDeliveryContentItem contentItemId=payload.id account="myAccountId" stagingEnvironment="myVseUrl"}}{{{JSONstringify this}}}{{/withDeliveryContentItem}}',},secret: 'SECRET',})

Const GET_SETTINGS_URL

GET_SETTINGS_URL: "https://api.amplience.net/v2/content/algolia-search/5b32377e4cedfd01c45036d8/indexes/00112233445566778899aabb/settings" = "https://api.amplience.net/v2/content/algolia-search/5b32377e4cedfd01c45036d8/indexes/00112233445566778899aabb/settings"

Const RETRY_DELAY

RETRY_DELAY: number = 2 * 1000

Const RETRY_TIMEOUT

RETRY_TIMEOUT: number = 5 * 1000

Const arrayTestCases

arrayTestCases: (false | true | string[])[][] = [[['value1'], ['value1'], true],[['value1'], ['value2'], false],[['value1', 'value2'], ['value1', 'value2'], true],[['value1', 'value2'], ['value2', 'value1'], false],[['value1'], ['value1', 'value2'], false],]

Const objectTestCases

objectTestCases: ((string | false | true | { arrayTest: string[]; booleanTest: boolean; nullTest: null; numberTest: number; stringTest: string })[] | (string | false | true | { propA: string; propB: string; propC: string } | { propA: string; propB: string })[] | (string | false | true | { propA: string; propB: object })[] | (string | false | true | { propA: ({ propB: string } | { propC: string })[] })[])[] = [[{booleanTest: true,numberTest: 2,nullTest: null,stringTest: '<em>',arrayTest: ['value 1', 'value 2'],},{booleanTest: true,numberTest: 2,nullTest: null,stringTest: '<em>',arrayTest: ['value 1', 'value 2'],},true,'should return true when objects with all types match',],[{ propA: 'valueA', propB: 'valueB', propC: 'valueC' },{ propB: 'valueB', propA: 'valueA', propC: 'valueC' },true,'should return true when object property order changes',],[{ propA: 'valueA', propB: 'valueB', propC: 'valueC' },{ propA: 'valueA', propB: 'valueB' },false,'should return false when object number of properties differ',],[{ propA: 'valueA', propB: { propC: 'valueC' } },{ propA: 'valueA', propB: { propC: 'valueC' } },true,'should return true when object property contains a nested object',],[{ propA: 'valueA', propB: { propC: 'valueC' } },{ propA: 'valueA', propB: { propC: 'valueD' } },false,'should return false when object property contains a nested object that differ',],[{ propA: [{ propB: 'valueB' }, { propC: 'valueC' }] },{ propA: [{ propB: 'valueB' }, { propC: 'valueC' }] },true,'should return true when object property contains an array of object',],[{ propA: [{ propB: 'valueB' }, { propC: 'valueC' }] },{ propA: [{ propC: 'valueC' }, { propB: 'valueB' }] },false,'should return false when object property contains an array of object in different order',],]

Const primitiveTestCases

primitiveTestCases: ((number | false | true)[] | (string | false | true)[])[] = [[null, null, true],[true, true, true],[false, false, true],[true, false, false],[1, 1, true],[1, 2, false],['value1', 'value1', true],['value1', 'value2', false],]

Functions

Const getCalls

  • getCalls(client: MockDynamicContent, url: string): AxiosRequestConfig<any>[]

isEqual

  • isEqual(x: unknown, y: unknown): boolean

retry

  • retry<T>(method: () => Promise<T>, overrideOptions?: Partial<RetryOptions>): Promise<T>
  • Type parameters

    • T

    Parameters

    • method: () => Promise<T>
        • (): Promise<T>
        • Returns Promise<T>

    • Default value overrideOptions: Partial<RetryOptions> = {}

    Returns Promise<T>

Const sleep

  • sleep(timeout: number): Promise<unknown>

Object literals

Const CONTENT_ITEMS_FACET

CONTENT_ITEMS_FACET: object

_embedded

_embedded: object

content-items

content-items: { schema: string }[] = [FACETED_CONTENT_ITEM]

_facets

_facets: object

assignees

assignees: { _id: string; count: number }[] = [{_id: '7078e5e7-d5bf-4015-9add-b75fb6f60537',count: 0,},]

lastModifiedDate:Last 14 days

lastModifiedDate:Last 14 days: undefined[] = []

lastModifiedDate:Last 30 days

lastModifiedDate:Last 30 days: undefined[] = []

lastModifiedDate:Last 60 days

lastModifiedDate:Last 60 days: undefined[] = []

lastModifiedDate:Last 7 days

lastModifiedDate:Last 7 days: undefined[] = []

lastModifiedDate:Over 60 days

lastModifiedDate:Over 60 days: undefined[] = []

locale

locale: undefined[] = []

publishingStatus

publishingStatus: undefined[] = []

root

root: { _id: string; count: number }[] = [{_id: '0',count: 0,},]

schema

schema: { _id: string; count: number }[] = [{_id: 'http://deliver.bigcontent.io/schema/nested/nested-type.json',count: 0,},]

workflow.state

workflow.state: undefined[] = []

_links

_links: object

first

first: object

href

href: string = "https://api.amplience.net/v2/content/hubs/5d4aed7dc9e77c00015fa180/content-items/facet?query=status%3A%22ACTIVE%22contentRepositoryId%3A%225d4af2ccc9e77c00015fa183%22sss&sort=relevance&page=0&size=30"

last

last: object

href

href: string = "https://api.amplience.net/v2/content/hubs/5d4aed7dc9e77c00015fa180/content-items/facet?query=status%3A%22ACTIVE%22contentRepositoryId%3A%225d4af2ccc9e77c00015fa183%22sss&sort=relevance&page=0&size=30"

self

self: object

href

href: string = "https://api.amplience.net/v2/content/hubs/5d4aed7dc9e77c00015fa180/content-items/facet?query=status%3A%22ACTIVE%22contentRepositoryId%3A%225d4af2ccc9e77c00015fa183%22sss&sort=relevance&page=0&size=30"

page

page: object

number

number: number = 0

size

size: number = 30

totalElements

totalElements: number = 0

totalPages

totalPages: number = 0

Const CONTENT_ITEM_WITH_WORKFLOW_STATE_ASSIGNED

CONTENT_ITEM_WITH_WORKFLOW_STATE_ASSIGNED: object

workflow

workflow: object

state

state: string = WORKFLOW_STATE.id

Const CONTENT_ITEM_WITH_WORKFLOW_STATE_REMOVED

CONTENT_ITEM_WITH_WORKFLOW_STATE_REMOVED: object

createdBy

createdBy: string = "user"

createdDate

createdDate: string = "2018-06-26T12:54:16.216Z"

deliveryId

deliveryId: string = "f3a2d4ec-8d81-4e7f-9a24-40947e0613d6"

folderId

folderId: string = "5b3237784cedfd01c4503658"

id

id: string = "f3a2d4ec-8d81-4e7f-9a24-40947e0613d6"

label

label: string = "Banner Ad Homepage"

lastModifiedBy

lastModifiedBy: string = "user"

lastModifiedDate

lastModifiedDate: string = "2018-06-26T12:54:16.216Z"

locale

locale: string = "en-GB"

status

status: string = "ACTIVE"

version

version: number = 1

_links

_links: object

archive

archive: object

href

href: string = "https://api.amplience.net/v2/content/content-items/f3a2d4ec-8d81-4e7f-9a24-40947e0613d6/archive"

content-item

content-item: object

href

href: string = "https://api.amplience.net/v2/content/content-items/f3a2d4ec-8d81-4e7f-9a24-40947e0613d6"

content-item-history

content-item-history: object

href

href: string = "https://api.amplience.net/v2/content/content-items/f3a2d4ec-8d81-4e7f-9a24-40947e0613d6/history{?page,size,sort}"

templated

templated: boolean = true

content-item-version

content-item-version: object

href

href: string = "https://api.amplience.net/v2/content/content-items/f3a2d4ec-8d81-4e7f-9a24-40947e0613d6/versions{/version}"

templated

templated: boolean = true

content-item-versions

content-item-versions: object

href

href: string = "https://api.amplience.net/v2/content/content-items/f3a2d4ec-8d81-4e7f-9a24-40947e0613d6/versions{?page,size,sort}"

templated

templated: boolean = true

content-item-with-children

content-item-with-children: object

href

href: string = "https://api.amplience.net/v2/content/content-items/search/findByIdWithChildren?id=f3a2d4ec-8d81-4e7f-9a24-40947e0613d6"

content-repository

content-repository: object

href

href: string = "https://api.amplience.net/v2/content/content-repositories/5b32377b4cedfd01c4503691"

copy

copy: object

href

href: string = "https://api.amplience.net/v2/content/content-repositories/{id}/content-items?sourceContentItemId=f3a2d4ec-8d81-4e7f-9a24-40947e0613d6"

templated

templated: boolean = true

create-localizations

create-localizations: object

href

href: string = "http://api.amplience.net/v2/content/content-items/f3a2d4ec-8d81-4e7f-9a24-40947e0613d6/localize"

delete

delete: object

href

href: string = "https://api.amplience.net/v2/content/content-items/f3a2d4ec-8d81-4e7f-9a24-40947e0613d6/versions/1"

edit-workflow

edit-workflow: object

href

href: string = "https://api.amplience.net/v2/content/content-items/f3a2d4ec-8d81-4e7f-9a24-40947e0613d6/workflow"

folder

folder: object

href

href: string = "https://api.amplience.net/v2/content/folders/5b3237784cedfd01c4503658"

planned

planned: object

href

href: string = "https://api.amplience.net/v2/content/content-items/f3a2d4ec-8d81-4e7f-9a24-40947e0613d6/planned{?epoch,time}"

templated

templated: boolean = true

publish

publish: object

href

href: string = "https://api.amplience.net/v2/content/content-items/f3a2d4ec-8d81-4e7f-9a24-40947e0613d6/publish"

restore-version

restore-version: object

href

href: string = "https://api.amplience.net/v2/content/content-items/f3a2d4ec-8d81-4e7f-9a24-40947e0613d6/restore"

self

self: object

href

href: string = "https://api.amplience.net/v2/content/content-items/f3a2d4ec-8d81-4e7f-9a24-40947e0613d6"

set-locale

set-locale: object

href

href: string = "https://api.amplience.net/v2/content/content-items/f3a2d4ec-8d81-4e7f-9a24-40947e0613d6/locale"

unarchive

unarchive: object

href

href: string = "https://api.amplience.net/v2/content/content-items/f3a2d4ec-8d81-4e7f-9a24-40947e0613d6/unarchive"

update

update: object

href

href: string = "https://api.amplience.net/v2/content/content-items/f3a2d4ec-8d81-4e7f-9a24-40947e0613d6"

body

body: object

_meta

_meta: object

name

name: string = "main-banner"

schema

schema: string = "http://deliver.bigcontent.io/schema/nested/nested-type.json"

Const DEFAULT_RETRY_CONFIG

DEFAULT_RETRY_CONFIG: object

retries

retries: number = 3

retryDelay

retryDelay: exponentialDelay = axiosRetry.exponentialDelay

retryCondition

  • retryCondition(error: AxiosError): boolean

Const HIERARCHY_NODE

HIERARCHY_NODE: object

contentTypeUri

contentTypeUri: string = "http://release.sort.com"

hasChildren

hasChildren: boolean = true

id

id: string = "cb1f55f2-e541-4502-bd74-01052edc399d"

label

label: string = "Countries"

publishingStatus

publishingStatus: string = "NONE"

repositoryId

repositoryId: string = "5f647f72c9e77c0001706820"

root

root: boolean = true

_links

_links: object

archive

archive: object

href

href: string = "https://api.amplience.net/v2/content/content-items/cb1f55f2-e541-4502-bd74-01052edc399d/archive"

content-item

content-item: object

href

href: string = "https://api.amplience.net/v2/content/content-items/cb1f55f2-e541-4502-bd74-01052edc399d"

get-hierarchy-children

get-hierarchy-children: object

href

href: string = "https://api.amplience.net/v2/content/hierarchy-node/07d9e788-6ee8-49a8-b343-7f01d18f5205/children"

get-hierarchy-parents

get-hierarchy-parents: object

href

href: string = "https://api.amplience.net/v2/content/hierarchy-node/07d9e788-6ee8-49a8-b343-7f01d18f5205/parents"

Const SEARCH_INDEX_RETRY_OPTIONS

SEARCH_INDEX_RETRY_OPTIONS: object

timeout

timeout: number = 3 * 60 * 1000

Const WEBHOOK_WITH_EXTRAS

WEBHOOK_WITH_EXTRAS: object

active

active: boolean = true

createdDate

createdDate: string = "2021-04-20T08:08:36.678Z"

events

events: string[] = ['dynamic-content.content-item.created']

filters

filters: ({ arguments: ({ jsonPath: string } | { value: string })[]; type: string } | { arguments: ({ jsonPath: string } | { value: string[] })[]; type: string })[] = [{type: 'equal',arguments: [{jsonPath: '$.payload.id',},{value: 'abc',},],},{type: 'in',arguments: [{jsonPath: '$.payload.id',},{value: ['abc', 'def'],},],},{type: 'equal',arguments: [{jsonPath: '$.payload.not_present',},{value: '123',},],},]

handlers

handlers: string[] = ['http://example.com/webhook']

headers

headers: ({ key: string; secret: boolean; value: null } | { key: string; secret: null; value: string })[] = [{key: 'X-Secret',value: null,secret: true,},{key: 'X-Header',value: 'abc123',secret: null,},]

id

id: string = "5a497a000000000000000000"

label

label: string = "Unit Test"

lastModifiedDate

lastModifiedDate: string = "2021-04-20T08:08:36.678Z"

method

method: string = "POST"

notifications

notifications: undefined[] = []

secret

secret: string = "SECRET"

_links

_links: object

delete

delete: object

href

href: string = "https://api.amplience-dev.net/v2/content/hubs/5b32377e4cedfd01c45036d8/webhooks/5a497a000000000000000000"

event-types

event-types: object

href

href: string = "https://api.amplience-dev.net/v2/content/hubs/5b32377e4cedfd01c45036d8/webhooks/event-types"

hub

hub: object

href

href: string = "https://api.amplience-dev.net/v2/content/hubs/5b32377e4cedfd01c45036d8"

requests

requests: object

href

href: string = "https://api.amplience-dev.net/v2/content/hubs/5b32377e4cedfd01c45036d8/webhooks/5a497a000000000000000000/requests{?cursor,limit,excludeStatus}"

templated

templated: boolean = true

self

self: object

href

href: string = "https://api.amplience-dev.net/v2/content/hubs/5b32377e4cedfd01c45036d8/webhooks/5a497a000000000000000000"

update

update: object

href

href: string = "https://api.amplience-dev.net/v2/content/hubs/5b32377e4cedfd01c45036d8/webhooks/5a497a000000000000000000"

customPayload

customPayload: object

type

type: string = "text/x-handlebars-template"

value

value: string = "{{#withDeliveryContentItem contentItemId=payload.id account="myAccountId" stagingEnvironment="myVseUrl"}}{{{JSONstringify this}}}{{/withDeliveryContentItem}}"

Const defaultOptions

defaultOptions: object

delay

delay: number = 3 * 1000

timeout

timeout: number = 60 * 1000

Generated using TypeDoc