@mediarithmics/plugins-nodejs-sdk
Version:
This is the mediarithmics nodejs to help plugin developers bootstrapping their plugin without having to deal with most of the plugin boilerplate
93 lines (92 loc) • 3.58 kB
TypeScript
import { AudienceFeedConnectorBaseInstanceContext } from '../../../plugins/audience-feed-connector/AudienceFeedConnectorBasePlugin';
import { UserDeviceTechnicalIdentifierType } from '../../reference/UserIdentifierInterface';
export interface AssetFilePropertyResource {
original_file_name?: string;
original_name?: string;
asset_id?: string;
file_path?: string;
file?: string;
}
export interface AssetFolderPropertyResource {
original_name?: string;
asset_id?: string;
path?: string;
}
export interface DataFilePropertyResource {
uri?: string;
last_modified?: number;
}
export interface UrlPropertyResource {
url?: string;
}
export interface StringPropertyResource {
value?: string;
}
export interface AdLayoutPropertyResource {
id?: string;
version?: string;
}
export interface StyleSheetPropertyResource {
id?: string;
version?: string;
}
export interface PixelTagPropertyResource {
value?: string;
}
export interface DoublePropertyResource {
value?: number;
}
export interface BooleanPropertyResource {
value?: boolean;
}
export interface IntPropertyResource {
value?: number;
}
export interface RecommenderPropertyResource {
recommender_id?: string;
}
export interface NativeDataPropertyResource {
required_display?: boolean;
type?: number;
value?: string;
}
export interface NativeTitlePropertyResource {
required_display?: boolean;
value?: string;
}
export interface NativeImagePropertyResource {
required_display?: boolean;
width?: number;
height?: number;
type?: number;
original_file_name?: string;
asset_id?: string;
file_path?: string;
}
export type IdentifyingResourceType = 'USER_ACCOUNT' | 'USER_EMAIL' | 'USER_DEVICE_TECHNICAL_ID' | 'USER_PROFILE';
interface AbstractIdentifyingResource {
type: IdentifyingResourceType;
}
export interface IdentifyingAccount extends AbstractIdentifyingResource {
type: 'USER_ACCOUNT';
compartment_id?: string;
}
export interface IdentifyingEmail extends AbstractIdentifyingResource {
type: 'USER_EMAIL';
}
export interface IdentifyingDeviceTechnicalId extends AbstractIdentifyingResource {
type: 'USER_DEVICE_TECHNICAL_ID';
registry_type: UserDeviceTechnicalIdentifierType;
registry_id?: string;
}
export interface IdentifyingProfile extends AbstractIdentifyingResource {
type: 'USER_PROFILE';
compartment_id?: string;
}
export type IdentifyingResourceShape = IdentifyingAccount | IdentifyingEmail | IdentifyingDeviceTechnicalId | IdentifyingProfile;
export declare const isIdentifyingAccount: (resourceShape: IdentifyingResourceShape) => resourceShape is IdentifyingAccount;
export declare const isIdentifyingEmail: (resourceShape: IdentifyingResourceShape) => resourceShape is IdentifyingEmail;
export declare const isIdentifyingDeviceTechnicalId: (resourceShape: IdentifyingResourceShape) => resourceShape is IdentifyingDeviceTechnicalId;
export declare const isIdentifyingProfile: (resourceShape: IdentifyingResourceShape) => resourceShape is IdentifyingProfile;
export declare const hasIdentifyingAccountSelectedResource: (baseInstanceContext: AudienceFeedConnectorBaseInstanceContext) => boolean, hasIdentifyingEmailSelectedResource: (baseInstanceContext: AudienceFeedConnectorBaseInstanceContext) => boolean, hasIdentifyingDeviceTechnicalIdSelectedResource: (baseInstanceContext: AudienceFeedConnectorBaseInstanceContext) => boolean, hasIdentifyingProfileSelectedResource: (baseInstanceContext: AudienceFeedConnectorBaseInstanceContext) => boolean;
export {};