Dev Guide
Dev GuideUser GuidesLegal TermsGitHubDevCommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

ODP Node SDK / ODPClient

ODPClient

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor()

Signature

new ODPClient(config: null | Config | InternalConfig = null): ODPClient;

Parameters

NameTypeDefault value
confignull | Config | InternalConfignull

Returns

ODPClient

Defined in: src/Api/ODPClient.ts:45

Properties

identifier

Identifier

Manage customer identifiers using the v3 APIs

Defined in: src/Api/ODPClient.ts:33

list

Lists

Manage list subscriptions using the v3 APIs

Defined in: src/Api/ODPClient.ts:38

schema

Schema

Manage schema (ODP domain objects and fields) using the v3 APIs

Defined in: src/Api/ODPClient.ts:28

v3Api

API

Direct access to query any API by path using the v3 API helper

Defined in: src/Api/ODPClient.ts:43

Methods

customer()

Create or Update a customer profile in ODP using the v3 profiles API

Signature

customer(payload: CustomerPayload | CustomerPayload[], opts?: PayloadOptions): Promise<HttpResponse<CustomerResponse>>;

Parameters

Returns

Promise<HttpResponse<CustomerResponse>>

Defined in: src/Api/ODPClient.ts:62

event()

Send an event to ODP using the v3 event API

Signature

event(payload: EventPayload | EventPayload[]): Promise<HttpResponse<EventResponse>>;

Parameters

NameType
payloadEventPayload | EventPayload[]

Returns

Promise<HttpResponse<EventResponse>>

Defined in: src/Api/ODPClient.ts:55

graphql()

Query data using the GraphQL API

Signature

graphql<T>(query: string, variables?: object): Promise<GqlHttpResponse<T>>;

Type parameters

Parameters

NameType
querystring
variables?{}

Returns

Promise<GqlHttpResponse<T>>

Defined in: src/Api/ODPClient.ts:79

object()

Create or Update an object in ODP using the v3 objects API

Signature

object(type: string, payload: ObjectPayload | ObjectPayload[], opts?: PayloadOptions): Promise<HttpResponse<ObjectResponse>>;

Parameters

NameType
typestring
payloadObjectPayload | ObjectPayload[]
opts?PayloadOptions

Returns

Promise<HttpResponse<ObjectResponse>>

Defined in: src/Api/ODPClient.ts:70