UNPKG

@nacelle/compatibility-connector

Version:

Connect @nacelle/client-js-sdk to Nacelle's v2 back end with minimal code changes

54 lines (53 loc) 1.44 kB
type DataTypes = 'CONTENT' | 'PRODUCT' | 'PRODUCT_VARIANT' | 'COLLECTION'; export type SourceName = 'CONTENTFUL' | 'SANITY' | 'SHOPIFY'; interface NacelleEntryIdProperties { /** * A Nacelle data type * @example * 'CONTENT' */ dataType: DataTypes; /** * An IETF locale * @example * 'en-US' */ locale: string; /** * A Nacelle source name * @example * 'CONTENTFUL' * @example * 'SHOPIFY' */ sourceName: SourceName; /** * An ID assigned to a piece of data by an upstream system * @example * 'MTIzNDU2Nzg=' */ sourceEntryId: string; /** * A source environment name * @example * 'master' (the default production environment name in Contentful) * @example * 'default' (for systems with no concept of environments, such as Shopify) */ sourceSubset: string; /** * A source space ID * @example * '1xqo9yrzp7yz' (a Contentful Space ID) * @example * 'gamma-nova-jewelry' (a Shopify Shop ID / "subdomain") */ externalId: string; } /** * Creates a nacelleEntryId for any type of data in Nacelle's indices * @param {string} nacelleEntryId a Base64-encoded nacelleEntryId * @returns {Object} an object containing all parts of a nacelleEntryId */ export declare function destructureNacelleEntryId(nacelleEntryId: string): NacelleEntryIdProperties; export {};